RTEMS 4.10.2Annotated Report
Tue Dec 13 19:53:07 2011
00009388 <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 ) {
9388: e5903000 ldr r3, [r0]
938c: e593204c ldr r2, [r3, #76] ; 0x4c
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
9390: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
9394: e2422001 sub r2, r2, #1
)
{
IMFS_jnode_t *node = loc->node_access;
IMFS_fs_info_t *fs_info;
fs_info = loc->mt_entry->fs_info;
9398: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
939c: e3520006 cmp r2, #6
93a0: 979ff102 ldrls pc, [pc, r2, lsl #2]
93a4: ea000010 b 93ec <IMFS_Set_handlers+0x64> <== NOT EXECUTED
93a8: 000093c4 .word 0x000093c4 <== NOT EXECUTED
93ac: 000093cc .word 0x000093cc <== NOT EXECUTED
93b0: 000093d4 .word 0x000093d4 <== NOT EXECUTED
93b4: 000093d4 .word 0x000093d4 <== NOT EXECUTED
93b8: 000093dc .word 0x000093dc <== NOT EXECUTED
93bc: 000093dc .word 0x000093dc <== NOT EXECUTED
93c0: 000093e4 .word 0x000093e4 <== NOT EXECUTED
case IMFS_DIRECTORY:
loc->handlers = fs_info->directory_handlers;
93c4: e593300c ldr r3, [r3, #12]
93c8: ea000006 b 93e8 <IMFS_Set_handlers+0x60>
break;
case IMFS_DEVICE:
loc->handlers = &IMFS_device_handlers;
93cc: e59f3020 ldr r3, [pc, #32] ; 93f4 <IMFS_Set_handlers+0x6c>
93d0: ea000004 b 93e8 <IMFS_Set_handlers+0x60>
break;
case IMFS_SYM_LINK:
case IMFS_HARD_LINK:
loc->handlers = &IMFS_link_handlers;
93d4: e59f301c ldr r3, [pc, #28] ; 93f8 <IMFS_Set_handlers+0x70>
93d8: ea000002 b 93e8 <IMFS_Set_handlers+0x60>
break;
case IMFS_LINEAR_FILE:
loc->handlers = fs_info->memfile_handlers;
break;
case IMFS_MEMORY_FILE:
loc->handlers = fs_info->memfile_handlers;
93dc: e5933008 ldr r3, [r3, #8]
93e0: ea000000 b 93e8 <IMFS_Set_handlers+0x60>
break;
case IMFS_FIFO:
loc->handlers = &IMFS_fifo_handlers;
93e4: e59f3010 ldr r3, [pc, #16] ; 93fc <IMFS_Set_handlers+0x74>
93e8: e5803008 str r3, [r0, #8]
break;
}
return 0;
}
93ec: e3a00000 mov r0, #0
93f0: e12fff1e bx lr
00009128 <IMFS_chown>:
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
9128: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr}
912c: e1a02802 lsl r2, r2, #16
9130: e1a01801 lsl r1, r1, #16
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = (IMFS_jnode_t *) pathloc->node_access;
9134: e5904000 ldr r4, [r0]
int IMFS_chown(
rtems_filesystem_location_info_t *pathloc, /* IN */
uid_t owner, /* IN */
gid_t group /* IN */
)
{
9138: e1a07821 lsr r7, r1, #16
913c: 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();
9140: eb000496 bl a3a0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
9144: e1d453bc ldrh r5, [r4, #60] ; 0x3c
9148: e3500000 cmp r0, #0
914c: 11550000 cmpne r5, r0
9150: 03a05000 moveq r5, #0
9154: 13a05001 movne r5, #1
9158: 0a000004 beq 9170 <IMFS_chown+0x48>
rtems_set_errno_and_return_minus_one( EPERM );
915c: eb001560 bl e6e4 <__errno> <== NOT EXECUTED
9160: e3a03001 mov r3, #1 <== NOT EXECUTED
9164: e5803000 str r3, [r0] <== NOT EXECUTED
9168: e3e00000 mvn r0, #0 <== NOT EXECUTED
916c: ea000007 b 9190 <IMFS_chown+0x68> <== NOT EXECUTED
#endif
jnode->st_uid = owner;
9170: e1c473bc strh r7, [r4, #60] ; 0x3c
jnode->st_gid = group;
9174: e1c463be strh r6, [r4, #62] ; 0x3e
IMFS_update_ctime( jnode );
9178: e1a0000d mov r0, sp
917c: e1a01005 mov r1, r5
9180: ebffe37b bl 1f74 <gettimeofday>
9184: e59d3000 ldr r3, [sp]
9188: e5843048 str r3, [r4, #72] ; 0x48
918c: e1a00005 mov r0, r5
return 0;
}
9190: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc}
0000924c <IMFS_create_node>:
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
924c: 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 )
9250: e2504000 subs r4, r0, #0
IMFS_jnode_types_t type,
const char *name,
mode_t mode,
const IMFS_types_union *info
)
{
9254: e1a05001 mov r5, r1
9258: e59d6014 ldr r6, [sp, #20]
925c: e1a01002 mov r1, r2
IMFS_fs_info_t *fs_info;
/*
* MUST have a parent node to call this routine.
*/
if ( parent_loc == NULL )
9260: 01a07004 moveq r7, r4
9264: 0a000041 beq 9370 <IMFS_create_node+0x124>
return NULL;
/*
* Allocate filesystem node and fill in basic information
*/
node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
9268: e59f2108 ldr r2, [pc, #264] ; 9378 <IMFS_create_node+0x12c>
926c: e5922000 ldr r2, [r2]
9270: e592202c ldr r2, [r2, #44] ; 0x2c
9274: e1a00005 mov r0, r5
9278: e1c32002 bic r2, r3, r2
927c: ebffffc4 bl 9194 <IMFS_allocate_node>
if ( !node )
9280: e2507000 subs r7, r0, #0
9284: 0a000039 beq 9370 <IMFS_create_node+0x124>
return NULL;
/*
* Set the type specific information
*/
switch (type) {
9288: e2455001 sub r5, r5, #1
928c: e3550006 cmp r5, #6
9290: 979ff105 ldrls pc, [pc, r5, lsl #2]
9294: ea000025 b 9330 <IMFS_create_node+0xe4> <== NOT EXECUTED
9298: 000092b4 .word 0x000092b4 <== NOT EXECUTED
929c: 000092d8 .word 0x000092d8 <== NOT EXECUTED
92a0: 000092d0 .word 0x000092d0 <== NOT EXECUTED
92a4: 000092d0 .word 0x000092d0 <== NOT EXECUTED
92a8: 00009300 .word 0x00009300 <== NOT EXECUTED
92ac: 000092e8 .word 0x000092e8 <== NOT EXECUTED
92b0: 00009324 .word 0x00009324 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
92b4: e2872054 add r2, r7, #84 ; 0x54
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
92b8: e2873050 add r3, r7, #80 ; 0x50
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
92bc: e5872050 str r2, [r7, #80] ; 0x50
the_chain->permanent_null = NULL;
92c0: e3a02000 mov r2, #0
92c4: e5872054 str r2, [r7, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
92c8: e5873058 str r3, [r7, #88] ; 0x58
92cc: ea00001c b 9344 <IMFS_create_node+0xf8>
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;
92d0: e5963000 ldr r3, [r6]
92d4: ea000013 b 9328 <IMFS_create_node+0xdc>
break;
case IMFS_DEVICE:
node->info.device.major = info->device.major;
node->info.device.minor = info->device.minor;
92d8: 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;
92dc: e5963000 ldr r3, [r6]
node->info.device.minor = info->device.minor;
92e0: e5872054 str r2, [r7, #84] ; 0x54
92e4: ea00000f b 9328 <IMFS_create_node+0xdc>
break;
case IMFS_LINEAR_FILE:
node->info.linearfile.size = 0;
92e8: e3a03000 mov r3, #0 <== NOT EXECUTED
92ec: e3a02000 mov r2, #0 <== NOT EXECUTED
92f0: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED
92f4: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED
node->info.linearfile.direct = 0;
92f8: e3a03000 mov r3, #0 <== NOT EXECUTED
92fc: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED
case IMFS_MEMORY_FILE:
node->info.file.size = 0;
node->info.file.indirect = 0;
9300: 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;
9304: e3a01000 mov r1, #0
9308: e3a02000 mov r2, #0
930c: e5871050 str r1, [r7, #80] ; 0x50
9310: e5872054 str r2, [r7, #84] ; 0x54
node->info.file.indirect = 0;
node->info.file.doubly_indirect = 0;
node->info.file.triply_indirect = 0;
9314: 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;
9318: e5873058 str r3, [r7, #88] ; 0x58
node->info.file.doubly_indirect = 0;
931c: e587305c str r3, [r7, #92] ; 0x5c
node->info.file.triply_indirect = 0;
break;
9320: ea000007 b 9344 <IMFS_create_node+0xf8>
case IMFS_FIFO:
node->info.fifo.pipe = NULL;
9324: e3a03000 mov r3, #0
9328: e5873050 str r3, [r7, #80] ; 0x50
break;
932c: ea000004 b 9344 <IMFS_create_node+0xf8>
default:
assert(0);
9330: e59f0044 ldr r0, [pc, #68] ; 937c <IMFS_create_node+0x130> <== NOT EXECUTED
9334: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED
9338: e59f2040 ldr r2, [pc, #64] ; 9380 <IMFS_create_node+0x134> <== NOT EXECUTED
933c: e59f3040 ldr r3, [pc, #64] ; 9384 <IMFS_create_node+0x138> <== NOT EXECUTED
9340: eb00039b bl a1b4 <__assert_func> <== NOT EXECUTED
/*
* 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;
9344: e5943010 ldr r3, [r4, #16]
9348: e5932034 ldr r2, [r3, #52] ; 0x34
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
934c: e5923004 ldr r3, [r2, #4]
}
/*
* This node MUST have a parent, so put it in that directory list.
*/
parent = parent_loc->node_access;
9350: e5940000 ldr r0, [r4]
fs_info = parent_loc->mt_entry->fs_info;
node->Parent = parent;
node->st_ino = ++fs_info->ino_count;
9354: e2833001 add r3, r3, #1
9358: 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;
935c: e5870008 str r0, [r7, #8]
node->st_ino = ++fs_info->ino_count;
9360: e5873038 str r3, [r7, #56] ; 0x38
9364: e2800050 add r0, r0, #80 ; 0x50
9368: e1a01007 mov r1, r7
936c: ebfff1c8 bl 5a94 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node );
return node;
}
9370: e1a00007 mov r0, r7
9374: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003e30 <IMFS_dump_directory>:
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
3e30: e3500000 cmp r0, #0
void IMFS_dump_directory(
IMFS_jnode_t *the_directory,
int level
)
{
3e34: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
3e38: e1a05001 mov r5, r1
rtems_chain_node *the_node;
rtems_chain_control *the_chain;
IMFS_jnode_t *the_jnode;
int i;
assert( the_directory );
3e3c: 059f00a4 ldreq r0, [pc, #164] ; 3ee8 <IMFS_dump_directory+0xb8>
3e40: 03a01084 moveq r1, #132 ; 0x84
3e44: 059f20a0 ldreq r2, [pc, #160] ; 3eec <IMFS_dump_directory+0xbc>
3e48: 059f30a0 ldreq r3, [pc, #160] ; 3ef0 <IMFS_dump_directory+0xc0>
3e4c: 0a000005 beq 3e68 <IMFS_dump_directory+0x38>
assert( level >= 0 );
3e50: e3510000 cmp r1, #0
3e54: aa000004 bge 3e6c <IMFS_dump_directory+0x3c>
3e58: e59f0088 ldr r0, [pc, #136] ; 3ee8 <IMFS_dump_directory+0xb8><== NOT EXECUTED
3e5c: e59f2088 ldr r2, [pc, #136] ; 3eec <IMFS_dump_directory+0xbc><== NOT EXECUTED
3e60: e59f308c ldr r3, [pc, #140] ; 3ef4 <IMFS_dump_directory+0xc4><== NOT EXECUTED
3e64: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED
3e68: eb000216 bl 46c8 <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
3e6c: e590304c ldr r3, [r0, #76] ; 0x4c
3e70: e3530001 cmp r3, #1
3e74: 159f006c ldrne r0, [pc, #108] ; 3ee8 <IMFS_dump_directory+0xb8>
3e78: 13a01088 movne r1, #136 ; 0x88
3e7c: 159f2068 ldrne r2, [pc, #104] ; 3eec <IMFS_dump_directory+0xbc>
3e80: 159f3070 ldrne r3, [pc, #112] ; 3ef8 <IMFS_dump_directory+0xc8>
3e84: 1afffff7 bne 3e68 <IMFS_dump_directory+0x38>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
3e88: e280a054 add sl, r0, #84 ; 0x54
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3e8c: e5904050 ldr r4, [r0, #80] ; 0x50
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
3e90: e59f8064 ldr r8, [pc, #100] ; 3efc <IMFS_dump_directory+0xcc>
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
3e94: e2817001 add r7, r1, #1
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3e98: ea00000f b 3edc <IMFS_dump_directory+0xac>
!rtems_chain_is_tail( the_chain, the_node );
the_node = the_node->next ) {
the_jnode = (IMFS_jnode_t *) the_node;
3e9c: e3a06000 mov r6, #0
for ( i=0 ; i<=level ; i++ )
fprintf(stdout, "...." );
3ea0: e5983000 ldr r3, [r8]
!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++ )
3ea4: e2866001 add r6, r6, #1
fprintf(stdout, "...." );
3ea8: e5931008 ldr r1, [r3, #8]
3eac: e59f004c ldr r0, [pc, #76] ; 3f00 <IMFS_dump_directory+0xd0>
3eb0: eb003b9c bl 12d28 <fputs>
!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++ )
3eb4: e1560005 cmp r6, r5
3eb8: dafffff8 ble 3ea0 <IMFS_dump_directory+0x70>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
3ebc: e1a00004 mov r0, r4
3ec0: ebffff7e bl 3cc0 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
3ec4: e594304c ldr r3, [r4, #76] ; 0x4c
3ec8: e3530001 cmp r3, #1
IMFS_dump_directory( the_jnode, level + 1 );
3ecc: 01a00004 moveq r0, r4
3ed0: 01a01007 moveq r1, r7
3ed4: 0bffffd5 bleq 3e30 <IMFS_dump_directory>
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 ) {
3ed8: e5944000 ldr r4, [r4]
assert( the_directory->type == IMFS_DIRECTORY );
the_chain = &the_directory->info.directory.Entries;
for ( the_node = the_chain->first;
3edc: e154000a cmp r4, sl
3ee0: 1affffed bne 3e9c <IMFS_dump_directory+0x6c>
fprintf(stdout, "...." );
IMFS_print_jnode( the_jnode );
if ( the_jnode->type == IMFS_DIRECTORY )
IMFS_dump_directory( the_jnode, level + 1 );
}
}
3ee4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00009574 <IMFS_eval_path>:
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
9574: 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 ) ) {
9578: e3d27007 bics r7, r2, #7
const char *pathname, /* IN */
size_t pathnamelen, /* IN */
int flags, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
957c: e24dd028 sub sp, sp, #40 ; 0x28
9580: e1a0a002 mov sl, r2
9584: e1a08000 mov r8, r0
9588: e1a06001 mov r6, r1
958c: e1a04003 mov r4, r3
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
9590: 05935000 ldreq r5, [r3]
9594: 03a09001 moveq r9, #1
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 ) ) {
9598: 0a000084 beq 97b0 <IMFS_eval_path+0x23c>
assert( 0 );
959c: e59f02b4 ldr r0, [pc, #692] ; 9858 <IMFS_eval_path+0x2e4> <== NOT EXECUTED
95a0: e3a01f82 mov r1, #520 ; 0x208 <== NOT EXECUTED
95a4: e59f22b0 ldr r2, [pc, #688] ; 985c <IMFS_eval_path+0x2e8> <== NOT EXECUTED
95a8: e59f32b0 ldr r3, [pc, #688] ; 9860 <IMFS_eval_path+0x2ec> <== NOT EXECUTED
95ac: eb000300 bl a1b4 <__assert_func> <== NOT EXECUTED
* 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 );
95b0: e28d3024 add r3, sp, #36 ; 0x24
95b4: e0880007 add r0, r8, r7
95b8: e1a01006 mov r1, r6
95bc: e1a0200d mov r2, sp
95c0: eb000260 bl 9f48 <IMFS_get_token>
pathnamelen -= len;
i += len;
if ( !pathloc->node_access )
95c4: e5943000 ldr r3, [r4]
95c8: 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 );
95cc: e1a09000 mov r9, r0
pathnamelen -= len;
95d0: e59db024 ldr fp, [sp, #36] ; 0x24
i += len;
if ( !pathloc->node_access )
95d4: 0a000044 beq 96ec <IMFS_eval_path+0x178>
rtems_set_errno_and_return_minus_one( ENOENT );
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
95d8: e3500000 cmp r0, #0
95dc: 0a000006 beq 95fc <IMFS_eval_path+0x88>
if ( node->type == IMFS_DIRECTORY )
95e0: e595104c ldr r1, [r5, #76] ; 0x4c
95e4: e3510001 cmp r1, #1
95e8: 1a000003 bne 95fc <IMFS_eval_path+0x88>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
95ec: e1a00004 mov r0, r4
95f0: ebffff82 bl 9400 <IMFS_evaluate_permission>
95f4: e3500000 cmp r0, #0
95f8: 0a00008f beq 983c <IMFS_eval_path+0x2c8>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
switch( type ) {
95fc: e3590003 cmp r9, #3
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
i += len;
9600: e087700b add r7, r7, fp
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
pathnamelen -= len;
9604: e06b6006 rsb r6, fp, r6
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;
9608: e5945000 ldr r5, [r4]
switch( type ) {
960c: 0a000018 beq 9674 <IMFS_eval_path+0x100>
9610: e3590004 cmp r9, #4
9614: 0a000062 beq 97a4 <IMFS_eval_path+0x230>
9618: e3590002 cmp r9, #2
961c: 1a000063 bne 97b0 <IMFS_eval_path+0x23c>
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
9620: e59f223c ldr r2, [pc, #572] ; 9864 <IMFS_eval_path+0x2f0>
9624: e5923000 ldr r3, [r2]
9628: e5933018 ldr r3, [r3, #24]
962c: e1550003 cmp r5, r3
9630: 0a00005e beq 97b0 <IMFS_eval_path+0x23c>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access) {
9634: e594c010 ldr ip, [r4, #16]
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
9638: e59c301c ldr r3, [ip, #28]
963c: e1550003 cmp r5, r3
9640: 1a000005 bne 965c <IMFS_eval_path+0xe8>
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break; /* Throw out the .. in this case */
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
9644: e28cc008 add ip, ip, #8
9648: e8bc000f ldm ip!, {r0, r1, r2, r3}
964c: e1a05004 mov r5, r4
9650: e8a5000f stmia r5!, {r0, r1, r2, r3}
9654: e1a03005 mov r3, r5
9658: ea000062 b 97e8 <IMFS_eval_path+0x274>
return (*pathloc->ops->evalpath_h)(&(pathname[i-len]),
pathnamelen+len,
flags,pathloc);
}
} else {
if ( !node->Parent )
965c: e5955008 ldr r5, [r5, #8]
9660: e3550000 cmp r5, #0
9664: 1a00004c bne 979c <IMFS_eval_path+0x228>
rtems_set_errno_and_return_minus_one( ENOENT );
9668: eb00141d bl e6e4 <__errno>
966c: e5809000 str r9, [r0]
9670: ea000074 b 9848 <IMFS_eval_path+0x2d4>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
9674: e595304c ldr r3, [r5, #76] ; 0x4c
9678: e3530003 cmp r3, #3
967c: 1a000006 bne 969c <IMFS_eval_path+0x128>
IMFS_evaluate_hard_link( pathloc, 0 );
9680: e1a00004 mov r0, r4
9684: e3a01000 mov r1, #0
9688: ebffff76 bl 9468 <IMFS_evaluate_hard_link>
node = pathloc->node_access;
968c: e5945000 ldr r5, [r4]
if ( !node )
9690: e3550000 cmp r5, #0
9694: 1a000009 bne 96c0 <IMFS_eval_path+0x14c>
9698: ea00000b b 96cc <IMFS_eval_path+0x158> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR );
} else if ( node->type == IMFS_SYM_LINK ) {
969c: e3530004 cmp r3, #4
96a0: 1a000006 bne 96c0 <IMFS_eval_path+0x14c>
result = IMFS_evaluate_sym_link( pathloc, 0 );
96a4: e1a00004 mov r0, r4
96a8: e3a01000 mov r1, #0
96ac: ebffff84 bl 94c4 <IMFS_evaluate_sym_link>
node = pathloc->node_access;
if ( result == -1 )
96b0: 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 );
96b4: e1a0b000 mov fp, r0
node = pathloc->node_access;
96b8: e5945000 ldr r5, [r4]
if ( result == -1 )
96bc: 0a000062 beq 984c <IMFS_eval_path+0x2d8>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
96c0: e595304c ldr r3, [r5, #76] ; 0x4c
96c4: e3530001 cmp r3, #1
96c8: 0a000002 beq 96d8 <IMFS_eval_path+0x164>
rtems_set_errno_and_return_minus_one( ENOTDIR );
96cc: eb001404 bl e6e4 <__errno>
96d0: e3a03014 mov r3, #20
96d4: ea00005a b 9844 <IMFS_eval_path+0x2d0>
/*
* Find the token name in the current node.
*/
node = IMFS_find_match_in_dir( node, token );
96d8: e1a00005 mov r0, r5
96dc: e1a0100d mov r1, sp
96e0: eb0001f0 bl 9ea8 <IMFS_find_match_in_dir>
if ( !node )
96e4: e2505000 subs r5, r0, #0
96e8: 1a000002 bne 96f8 <IMFS_eval_path+0x184>
rtems_set_errno_and_return_minus_one( ENOENT );
96ec: eb0013fc bl e6e4 <__errno>
96f0: e3a03002 mov r3, #2
96f4: ea000052 b 9844 <IMFS_eval_path+0x2d0>
* 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 )) {
96f8: e595304c ldr r3, [r5, #76] ; 0x4c
96fc: e3530001 cmp r3, #1
9700: 1a000025 bne 979c <IMFS_eval_path+0x228>
9704: e595305c ldr r3, [r5, #92] ; 0x5c
9708: e3530000 cmp r3, #0
970c: 1088b007 addne fp, r8, r7
9710: 1a000002 bne 9720 <IMFS_eval_path+0x1ac>
9714: ea000020 b 979c <IMFS_eval_path+0x228>
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
++(*index);
9718: e2877001 add r7, r7, #1
--(*len);
971c: e2466001 sub r6, r6, #1
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
9720: e5db0000 ldrb r0, [fp]
9724: ebffe5a1 bl 2db0 <rtems_filesystem_is_separator>
9728: e3500000 cmp r0, #0
++(*index);
--(*len);
972c: 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 ) {
9730: 0a000005 beq 974c <IMFS_eval_path+0x1d8>
9734: e5db3000 ldrb r3, [fp]
9738: e3530000 cmp r3, #0
973c: 0a000002 beq 974c <IMFS_eval_path+0x1d8>
9740: e3560000 cmp r6, #0
9744: e28bb001 add fp, fp, #1
9748: 1afffff2 bne 9718 <IMFS_eval_path+0x1a4>
* 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] != '.')) {
974c: e5dc3000 ldrb r3, [ip]
9750: e353002e cmp r3, #46 ; 0x2e
9754: 1a000003 bne 9768 <IMFS_eval_path+0x1f4>
9758: e0883007 add r3, r8, r7
975c: e5d33001 ldrb r3, [r3, #1]
9760: e353002e cmp r3, #46 ; 0x2e
9764: 0a000009 beq 9790 <IMFS_eval_path+0x21c>
*pathloc = node->info.directory.mt_fs->mt_fs_root;
9768: e595e05c ldr lr, [r5, #92] ; 0x5c
976c: e28ee01c add lr, lr, #28
9770: e8be000f ldm lr!, {r0, r1, r2, r3}
9774: e1a05004 mov r5, r4
9778: e8a5000f stmia r5!, {r0, r1, r2, r3}
977c: e59e2000 ldr r2, [lr]
return (*pathloc->ops->evalpath_h)( &pathname[i],
9780: 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;
9784: e5852000 str r2, [r5]
return (*pathloc->ops->evalpath_h)( &pathname[i],
9788: e1a01006 mov r1, r6
978c: ea00001b b 9800 <IMFS_eval_path+0x28c>
pathnamelen,
flags, pathloc );
}
i += 2;
pathnamelen -= 2;
node = node->Parent;
9790: e5955008 ldr r5, [r5, #8]
*pathloc = node->info.directory.mt_fs->mt_fs_root;
return (*pathloc->ops->evalpath_h)( &pathname[i],
pathnamelen,
flags, pathloc );
}
i += 2;
9794: e2877002 add r7, r7, #2
pathnamelen -= 2;
9798: e2466002 sub r6, r6, #2
/*
* Set the node access to the point we have found.
*/
pathloc->node_access = node;
979c: e5845000 str r5, [r4]
97a0: ea000002 b 97b0 <IMFS_eval_path+0x23c>
case IMFS_NO_MORE_PATH:
case IMFS_CURRENT_DIR:
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
97a4: eb0013ce bl e6e4 <__errno>
97a8: e3a0305b mov r3, #91 ; 0x5b
97ac: ea000024 b 9844 <IMFS_eval_path+0x2d0>
/*
* Evaluate all tokens until we are done or an error occurs.
*/
while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
97b0: e3590004 cmp r9, #4
97b4: 13590000 cmpne r9, #0
97b8: 1affff7c bne 95b0 <IMFS_eval_path+0x3c>
* 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 ) {
97bc: e595304c ldr r3, [r5, #76] ; 0x4c
97c0: e3530001 cmp r3, #1
97c4: 1a000014 bne 981c <IMFS_eval_path+0x2a8>
if ( node->info.directory.mt_fs != NULL ) {
97c8: e595c05c ldr ip, [r5, #92] ; 0x5c
97cc: e35c0000 cmp ip, #0
97d0: 0a000011 beq 981c <IMFS_eval_path+0x2a8>
*pathloc = node->info.directory.mt_fs->mt_fs_root;
97d4: e28cc01c add ip, ip, #28 <== NOT EXECUTED
97d8: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
97dc: e1a0e004 mov lr, r4 <== NOT EXECUTED
97e0: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
97e4: e1a0300e mov r3, lr <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
97e8: e59d1024 ldr r1, [sp, #36] ; 0x24
* 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;
97ec: e59c2000 ldr r2, [ip]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
97f0: e0610007 rsb r0, r1, r7
* 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;
97f4: e5832000 str r2, [r3]
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
97f8: e0880000 add r0, r8, r0
97fc: e0861001 add r1, r6, r1
9800: e1a0200a mov r2, sl
9804: e1a03004 mov r3, r4
9808: e594c00c ldr ip, [r4, #12]
980c: e1a0e00f mov lr, pc
9810: e59cf000 ldr pc, [ip]
9814: e1a0b000 mov fp, r0
9818: ea00000b b 984c <IMFS_eval_path+0x2d8>
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
981c: e1a00004 mov r0, r4
9820: ebfffed8 bl 9388 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
9824: e1a0100a mov r1, sl
flags, pathloc );
} else {
result = IMFS_Set_handlers( pathloc );
}
} else {
result = IMFS_Set_handlers( pathloc );
9828: e1a0b000 mov fp, r0
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( pathloc, flags ) )
982c: e1a00004 mov r0, r4
9830: ebfffef2 bl 9400 <IMFS_evaluate_permission>
9834: e3500000 cmp r0, #0
9838: 1a000003 bne 984c <IMFS_eval_path+0x2d8>
rtems_set_errno_and_return_minus_one( EACCES );
983c: eb0013a8 bl e6e4 <__errno>
9840: e3a0300d mov r3, #13
9844: e5803000 str r3, [r0]
9848: e3e0b000 mvn fp, #0
return result;
}
984c: e1a0000b mov r0, fp
9850: e28dd028 add sp, sp, #40 ; 0x28
9854: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000991c <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 */
)
{
991c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
9920: e24dd028 sub sp, sp, #40 ; 0x28
9924: e1a04001 mov r4, r1
/*
* This was filled in by the caller and is valid in the
* mount table.
*/
node = pathloc->node_access;
9928: 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 */
)
{
992c: e1a0a002 mov sl, r2
9930: e1a08000 mov r8, r0
node = pathloc->node_access;
/*
* Get the path length.
*/
pathlen = strlen( path );
9934: eb00176f bl f6f8 <strlen>
9938: e3a05000 mov r5, #0
993c: e1a07000 mov r7, r0
* Evaluate all tokens until we are done or an error occurs.
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
9940: e28d3024 add r3, sp, #36 ; 0x24
9944: e0880005 add r0, r8, r5
9948: e1a01007 mov r1, r7
994c: e1a0200d mov r2, sp
9950: eb00017c bl 9f48 <IMFS_get_token>
pathlen -= len;
i += len;
if ( !pathloc->node_access )
9954: e5943000 ldr r3, [r4]
9958: 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 );
995c: e1a09000 mov r9, r0
pathlen -= len;
9960: e59db024 ldr fp, [sp, #36] ; 0x24
i += len;
if ( !pathloc->node_access )
9964: 0a000080 beq 9b6c <IMFS_evaluate_for_make+0x250>
/*
* I cannot move out of this directory without execute permission.
*/
if ( type != IMFS_NO_MORE_PATH )
9968: e3500000 cmp r0, #0
996c: 0a000006 beq 998c <IMFS_evaluate_for_make+0x70>
if ( node->type == IMFS_DIRECTORY )
9970: e596104c ldr r1, [r6, #76] ; 0x4c
9974: e3510001 cmp r1, #1
9978: 1a000003 bne 998c <IMFS_evaluate_for_make+0x70>
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
997c: e1a00004 mov r0, r4
9980: ebfffe9e bl 9400 <IMFS_evaluate_permission>
9984: e3500000 cmp r0, #0
9988: 0a00008c beq 9bc0 <IMFS_evaluate_for_make+0x2a4>
rtems_set_errno_and_return_minus_one( EACCES );
node = pathloc->node_access;
998c: e5943000 ldr r3, [r4]
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
i += len;
9990: e085500b add r5, r5, fp
*/
while( !done ) {
type = IMFS_get_token( &path[i], pathlen, token, &len );
pathlen -= len;
9994: e06b7007 rsb r7, fp, r7
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;
9998: e1a06003 mov r6, r3
switch( type ) {
999c: e3590004 cmp r9, #4
99a0: 979ff109 ldrls pc, [pc, r9, lsl #2]
99a4: eaffffe5 b 9940 <IMFS_evaluate_for_make+0x24> <== NOT EXECUTED
99a8: 00009b2c .word 0x00009b2c <== NOT EXECUTED
99ac: 00009940 .word 0x00009940 <== NOT EXECUTED
99b0: 000099bc .word 0x000099bc <== NOT EXECUTED
99b4: 00009a18 .word 0x00009a18 <== NOT EXECUTED
99b8: 00009b38 .word 0x00009b38 <== NOT EXECUTED
case IMFS_UP_DIR:
/*
* Am I at the root of all filesystems? (chroot'ed?)
*/
if ( pathloc->node_access == rtems_filesystem_root.node_access )
99bc: e59f1218 ldr r1, [pc, #536] ; 9bdc <IMFS_evaluate_for_make+0x2c0>
99c0: e5912000 ldr r2, [r1]
99c4: e5922018 ldr r2, [r2, #24]
99c8: e1530002 cmp r3, r2
99cc: 0affffdb beq 9940 <IMFS_evaluate_for_make+0x24>
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
99d0: e594c010 ldr ip, [r4, #16]
99d4: e59c201c ldr r2, [ip, #28]
99d8: e1530002 cmp r3, r2
99dc: 1a000009 bne 9a08 <IMFS_evaluate_for_make+0xec>
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
99e0: e28cc008 add ip, ip, #8
99e4: e8bc000f ldm ip!, {r0, r1, r2, r3}
99e8: e1a0e004 mov lr, r4
99ec: e8ae000f stmia lr!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
99f0: e59d3024 ldr r3, [sp, #36] ; 0x24
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
99f4: e59c2000 ldr r2, [ip]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
99f8: e0635005 rsb r5, r3, r5
if ( pathloc->node_access == rtems_filesystem_root.node_access ) {
break;
} else {
*pathloc = pathloc->mt_entry->mt_point_node;
99fc: e58e2000 str r2, [lr]
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
9a00: e0880005 add r0, r8, r5
9a04: ea00003c b 9afc <IMFS_evaluate_for_make+0x1e0>
}
} else {
if ( !node->Parent )
9a08: e5936008 ldr r6, [r3, #8]
9a0c: e3560000 cmp r6, #0
9a10: 1a000043 bne 9b24 <IMFS_evaluate_for_make+0x208>
9a14: ea000054 b 9b6c <IMFS_evaluate_for_make+0x250>
case IMFS_NAME:
/*
* If we are at a link follow it.
*/
if ( node->type == IMFS_HARD_LINK ) {
9a18: e593304c ldr r3, [r3, #76] ; 0x4c
9a1c: e3530003 cmp r3, #3
9a20: 0a000001 beq 9a2c <IMFS_evaluate_for_make+0x110>
result = IMFS_evaluate_link( pathloc, 0 );
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
9a24: e3530004 cmp r3, #4
9a28: 1a000005 bne 9a44 <IMFS_evaluate_for_make+0x128>
result = IMFS_evaluate_link( pathloc, 0 );
9a2c: e1a00004 mov r0, r4
9a30: e3a01000 mov r1, #0
9a34: ebffff8b bl 9868 <IMFS_evaluate_link>
if ( result == -1 )
9a38: e3700001 cmn r0, #1
if ( result == -1 )
return -1;
} else if ( node->type == IMFS_SYM_LINK ) {
result = IMFS_evaluate_link( pathloc, 0 );
9a3c: e1a06000 mov r6, r0
if ( result == -1 )
9a40: 0a000062 beq 9bd0 <IMFS_evaluate_for_make+0x2b4>
return -1;
}
node = pathloc->node_access;
9a44: e5940000 ldr r0, [r4]
if ( !node )
9a48: e3500000 cmp r0, #0
9a4c: 0a000053 beq 9ba0 <IMFS_evaluate_for_make+0x284>
/*
* Only a directory can be decended into.
*/
if ( node->type != IMFS_DIRECTORY )
9a50: e590304c ldr r3, [r0, #76] ; 0x4c
9a54: e3530001 cmp r3, #1
9a58: 1a000050 bne 9ba0 <IMFS_evaluate_for_make+0x284>
/*
* Find the token name in the present location.
*/
node = IMFS_find_match_in_dir( node, token );
9a5c: e1a0100d mov r1, sp
9a60: eb000110 bl 9ea8 <IMFS_find_match_in_dir>
/*
* If there is no node we have found the name of the node we
* wish to create.
*/
if ( ! node )
9a64: e2506000 subs r6, r0, #0
9a68: 0a000035 beq 9b44 <IMFS_evaluate_for_make+0x228>
done = true;
else {
if (( node->type == IMFS_DIRECTORY ) && ( node->info.directory.mt_fs != NULL )) {
9a6c: e596304c ldr r3, [r6, #76] ; 0x4c
9a70: e3530001 cmp r3, #1
9a74: 1a00002a bne 9b24 <IMFS_evaluate_for_make+0x208>
9a78: e596305c ldr r3, [r6, #92] ; 0x5c
9a7c: e3530000 cmp r3, #0
9a80: 10889005 addne r9, r8, r5
9a84: 1a000002 bne 9a94 <IMFS_evaluate_for_make+0x178>
9a88: ea000025 b 9b24 <IMFS_evaluate_for_make+0x208>
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
++(*index);
9a8c: e2855001 add r5, r5, #1
--(*len);
9a90: e2477001 sub r7, r7, #1
const char *path, /* IN */
size_t *len, /* IN/OUT */
int *index /* IN/OUT */
)
{
while ( IMFS_is_separator( path[*index] ) && path[*index] && *len ) {
9a94: e5d90000 ldrb r0, [r9]
9a98: ebffe4c4 bl 2db0 <rtems_filesystem_is_separator>
9a9c: e3500000 cmp r0, #0
++(*index);
--(*len);
9aa0: 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 ) {
9aa4: 0a000005 beq 9ac0 <IMFS_evaluate_for_make+0x1a4>
9aa8: e5d93000 ldrb r3, [r9]
9aac: e3530000 cmp r3, #0
9ab0: 0a000002 beq 9ac0 <IMFS_evaluate_for_make+0x1a4>
9ab4: e3570000 cmp r7, #0
9ab8: e2899001 add r9, r9, #1
9abc: 1afffff2 bne 9a8c <IMFS_evaluate_for_make+0x170>
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] != '.')) {
9ac0: e5dc3000 ldrb r3, [ip]
9ac4: e353002e cmp r3, #46 ; 0x2e
9ac8: 1a000003 bne 9adc <IMFS_evaluate_for_make+0x1c0>
9acc: e0883005 add r3, r8, r5
9ad0: e5d33001 ldrb r3, [r3, #1]
9ad4: e353002e cmp r3, #46 ; 0x2e
9ad8: 0a00000e beq 9b18 <IMFS_evaluate_for_make+0x1fc>
*pathloc = node->info.directory.mt_fs->mt_fs_root;
9adc: e596e05c ldr lr, [r6, #92] ; 0x5c
9ae0: e28ee01c add lr, lr, #28
9ae4: e8be000f ldm lr!, {r0, r1, r2, r3}
9ae8: e1a05004 mov r5, r4
9aec: e8a5000f stmia r5!, {r0, r1, r2, r3}
9af0: e59e2000 ldr r2, [lr]
9af4: e5852000 str r2, [r5]
return (*pathloc->ops->evalformake_h)( &path[i],
9af8: e1a0000c mov r0, ip
9afc: e1a01004 mov r1, r4
9b00: e1a0200a mov r2, sl
9b04: e594300c ldr r3, [r4, #12]
9b08: e1a0e00f mov lr, pc
9b0c: e593f004 ldr pc, [r3, #4]
9b10: e1a06000 mov r6, r0
9b14: ea00002d b 9bd0 <IMFS_evaluate_for_make+0x2b4>
pathloc,
name );
}
i += 2;
pathlen -= 2;
node = node->Parent;
9b18: 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;
9b1c: e2855002 add r5, r5, #2
pathlen -= 2;
9b20: e2477002 sub r7, r7, #2
node = node->Parent;
}
pathloc->node_access = node;
9b24: e5846000 str r6, [r4]
9b28: eaffff84 b 9940 <IMFS_evaluate_for_make+0x24>
}
break;
case IMFS_NO_MORE_PATH:
rtems_set_errno_and_return_minus_one( EEXIST );
9b2c: eb0012ec bl e6e4 <__errno>
9b30: e3a03011 mov r3, #17
9b34: ea000023 b 9bc8 <IMFS_evaluate_for_make+0x2ac>
break;
case IMFS_INVALID_TOKEN:
rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
9b38: eb0012e9 bl e6e4 <__errno>
9b3c: e3a0305b mov r3, #91 ; 0x5b
9b40: ea000020 b 9bc8 <IMFS_evaluate_for_make+0x2ac>
case IMFS_CURRENT_DIR:
break;
}
}
*name = &path[ i - len ];
9b44: e59d3024 ldr r3, [sp, #36] ; 0x24
9b48: e0633005 rsb r3, r3, r5
9b4c: e0883003 add r3, r8, r3
9b50: e58a3000 str r3, [sl]
9b54: e0885005 add r5, r8, r5
/*
* 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++) {
9b58: ea000006 b 9b78 <IMFS_evaluate_for_make+0x25c>
if ( !IMFS_is_separator( path[ i ] ) )
9b5c: ebffe493 bl 2db0 <rtems_filesystem_is_separator>
9b60: e3500000 cmp r0, #0
9b64: e2855001 add r5, r5, #1
9b68: 1a000002 bne 9b78 <IMFS_evaluate_for_make+0x25c>
rtems_set_errno_and_return_minus_one( ENOENT );
9b6c: eb0012dc bl e6e4 <__errno>
9b70: e3a03002 mov r3, #2
9b74: ea000013 b 9bc8 <IMFS_evaluate_for_make+0x2ac>
/*
* 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++) {
9b78: e5d53000 ldrb r3, [r5]
9b7c: e2530000 subs r0, r3, #0
9b80: 1afffff5 bne 9b5c <IMFS_evaluate_for_make+0x240>
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
9b84: e1a00004 mov r0, r4
9b88: ebfffdfe bl 9388 <IMFS_Set_handlers>
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
9b8c: e5943000 ldr r3, [r4]
9b90: e593304c ldr r3, [r3, #76] ; 0x4c
9b94: e3530001 cmp r3, #1
/*
* Verify we can execute and write to this directory.
*/
result = IMFS_Set_handlers( pathloc );
9b98: e1a06000 mov r6, r0
/*
* The returned node must be a directory
*/
node = pathloc->node_access;
9b9c: 0a000002 beq 9bac <IMFS_evaluate_for_make+0x290>
if ( node->type != IMFS_DIRECTORY )
rtems_set_errno_and_return_minus_one( ENOTDIR );
9ba0: eb0012cf bl e6e4 <__errno>
9ba4: e3a03014 mov r3, #20
9ba8: ea000006 b 9bc8 <IMFS_evaluate_for_make+0x2ac>
/*
* We must have Write and execute permission on the returned node.
*/
if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
9bac: e1a00004 mov r0, r4
9bb0: e3a01003 mov r1, #3
9bb4: ebfffe11 bl 9400 <IMFS_evaluate_permission>
9bb8: e3500000 cmp r0, #0
9bbc: 1a000003 bne 9bd0 <IMFS_evaluate_for_make+0x2b4>
rtems_set_errno_and_return_minus_one( EACCES );
9bc0: eb0012c7 bl e6e4 <__errno>
9bc4: e3a0300d mov r3, #13
9bc8: e5803000 str r3, [r0]
9bcc: e3e06000 mvn r6, #0
return result;
}
9bd0: e1a00006 mov r0, r6
9bd4: e28dd028 add sp, sp, #40 ; 0x28
9bd8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00009468 <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;
9468: e5903000 ldr r3, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
946c: e593204c ldr r2, [r3, #76] ; 0x4c
9470: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
9474: e92d4030 push {r4, r5, lr}
9478: e1a04000 mov r4, r0
947c: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_HARD_LINK )
rtems_fatal_error_occurred (0xABCD0000);
9480: 159f0038 ldrne r0, [pc, #56] ; 94c0 <IMFS_evaluate_hard_link+0x58>
9484: 1bfff0c8 blne 57ac <rtems_fatal_error_occurred>
/*
* Set the hard link value and the handlers.
*/
node->node_access = jnode->info.hard_link.link_node;
9488: e5933050 ldr r3, [r3, #80] ; 0x50
948c: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
9490: ebffffbc bl 9388 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
9494: e1a00004 mov r0, r4
9498: e1a01005 mov r1, r5
949c: ebffffd7 bl 9400 <IMFS_evaluate_permission>
94a0: e3500000 cmp r0, #0
94a4: 13a00000 movne r0, #0
94a8: 18bd8030 popne {r4, r5, pc}
rtems_set_errno_and_return_minus_one( EACCES );
94ac: eb00148c bl e6e4 <__errno> <== NOT EXECUTED
94b0: e3a0300d mov r3, #13 <== NOT EXECUTED
94b4: e5803000 str r3, [r0] <== NOT EXECUTED
94b8: e3e00000 mvn r0, #0 <== NOT EXECUTED
return result;
}
94bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00009400 <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 ) )
9400: e3d13007 bics r3, r1, #7
int IMFS_evaluate_permission(
rtems_filesystem_location_info_t *node,
int flags
)
{
9404: e92d4070 push {r4, r5, r6, lr}
9408: e1a04001 mov r4, r1
uid_t st_uid;
gid_t st_gid;
IMFS_jnode_t *jnode;
int flags_to_test;
if ( !rtems_libio_is_valid_perms( flags ) )
940c: 0a000004 beq 9424 <IMFS_evaluate_permission+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
9410: eb0014b3 bl e6e4 <__errno> <== NOT EXECUTED
9414: e3a03001 mov r3, #1 <== NOT EXECUTED
9418: e5803000 str r3, [r0] <== NOT EXECUTED
941c: e3e00000 mvn r0, #0 <== NOT EXECUTED
9420: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
jnode = node->node_access;
9424: e5905000 ldr r5, [r0]
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
9428: eb0003dc bl a3a0 <geteuid>
942c: e1a06000 mov r6, r0
st_gid = getegid();
9430: eb0003d5 bl a38c <getegid>
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
9434: e1d533bc ldrh r3, [r5, #60] ; 0x3c
9438: e1530006 cmp r3, r6
flags_to_test <<= 6;
943c: 01a04304 lsleq r4, r4, #6
* Check if I am owner or a group member or someone else.
*/
flags_to_test = flags;
if ( st_uid == jnode->st_uid )
9440: 0a000002 beq 9450 <IMFS_evaluate_permission+0x50>
flags_to_test <<= 6;
else if ( st_gid == jnode->st_gid )
9444: e1d533be ldrh r3, [r5, #62] ; 0x3e
9448: e1530000 cmp r3, r0
flags_to_test <<= 3;
944c: 01a04184 lsleq r4, r4, #3
/*
* If all of the flags are set we have permission
* to do this.
*/
if ( ( flags_to_test & jnode->st_mode) == flags_to_test )
9450: e5950030 ldr r0, [r5, #48] ; 0x30
9454: e0040000 and r0, r4, r0
9458: e1500004 cmp r0, r4
945c: 13a00000 movne r0, #0
9460: 03a00001 moveq r0, #1
return 1;
return 0;
}
9464: e8bd8070 pop {r4, r5, r6, pc}
000094c4 <IMFS_evaluate_sym_link>:
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
94c4: e92d4071 push {r0, r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
94c8: e5906000 ldr r6, [r0]
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
94cc: e596304c ldr r3, [r6, #76] ; 0x4c
94d0: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link(
rtems_filesystem_location_info_t *node, /* IN/OUT */
int flags /* IN */
)
{
94d4: e1a04000 mov r4, r0
94d8: e1a05001 mov r5, r1
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
rtems_fatal_error_occurred (0xABCD0000);
94dc: 159f0088 ldrne r0, [pc, #136] ; 956c <IMFS_evaluate_sym_link+0xa8>
/*
* Check for things that should never happen.
*/
if ( jnode->type != IMFS_SYM_LINK )
94e0: 1a000003 bne 94f4 <IMFS_evaluate_sym_link+0x30>
rtems_fatal_error_occurred (0xABCD0000);
if ( !jnode->Parent )
94e4: e5963008 ldr r3, [r6, #8]
94e8: e3530000 cmp r3, #0
94ec: 1a000001 bne 94f8 <IMFS_evaluate_sym_link+0x34>
rtems_fatal_error_occurred( 0xBAD00000 );
94f0: e59f0078 ldr r0, [pc, #120] ; 9570 <IMFS_evaluate_sym_link+0xac><== NOT EXECUTED
94f4: ebfff0ac bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Move the node_access to either the symbolic links parent or
* root depending on the symbolic links path.
*/
node->node_access = jnode->Parent;
94f8: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
94fc: e1a0100d mov r1, sp
9500: e5960050 ldr r0, [r6, #80] ; 0x50
9504: e1a02004 mov r2, r4
9508: eb0004ec bl a8c0 <rtems_filesystem_get_sym_start_loc>
/*
* Use eval path to evaluate the path of the symbolic link.
*/
result = IMFS_eval_path(
950c: e59d3000 ldr r3, [sp]
9510: e5966050 ldr r6, [r6, #80] ; 0x50
9514: e0866003 add r6, r6, r3
9518: e1a00006 mov r0, r6
951c: eb001875 bl f6f8 <strlen>
9520: e1a02005 mov r2, r5
9524: e1a01000 mov r1, r0
9528: e1a03004 mov r3, r4
952c: e1a00006 mov r0, r6
9530: eb00000f bl 9574 <IMFS_eval_path>
9534: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ),
flags,
node
);
IMFS_Set_handlers( node );
9538: e1a00004 mov r0, r4
953c: ebffff91 bl 9388 <IMFS_Set_handlers>
/*
* Verify we have the correct permissions for this node.
*/
if ( !IMFS_evaluate_permission( node, flags ) )
9540: e1a00004 mov r0, r4
9544: e1a01005 mov r1, r5
9548: ebffffac bl 9400 <IMFS_evaluate_permission>
954c: e3500000 cmp r0, #0
9550: 1a000003 bne 9564 <IMFS_evaluate_sym_link+0xa0>
rtems_set_errno_and_return_minus_one( EACCES );
9554: eb001462 bl e6e4 <__errno> <== NOT EXECUTED
9558: e3a0300d mov r3, #13 <== NOT EXECUTED
955c: e5803000 str r3, [r0] <== NOT EXECUTED
9560: e3e06000 mvn r6, #0 <== NOT EXECUTED
return result;
}
9564: e1a00006 mov r0, r6
9568: e8bd8078 pop {r3, r4, r5, r6, pc}
0000d53c <IMFS_fchmod>:
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
d53c: e92d4073 push {r0, r1, r4, r5, r6, lr}
IMFS_jnode_t *jnode;
#if defined(RTEMS_POSIX_API)
uid_t st_uid;
#endif
jnode = loc->node_access;
d540: e5904000 ldr r4, [r0]
int IMFS_fchmod(
rtems_filesystem_location_info_t *loc,
mode_t mode
)
{
d544: e1a06001 mov r6, r1
/*
* Verify I am the owner of the node or the super user.
*/
#if defined(RTEMS_POSIX_API)
st_uid = geteuid();
d548: ebfff394 bl a3a0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
d54c: e1d453bc ldrh r5, [r4, #60] ; 0x3c
d550: e3500000 cmp r0, #0
d554: 11550000 cmpne r5, r0
d558: 03a05000 moveq r5, #0
d55c: 13a05001 movne r5, #1
d560: 0a000004 beq d578 <IMFS_fchmod+0x3c>
rtems_set_errno_and_return_minus_one( EPERM );
d564: eb00045e bl e6e4 <__errno> <== NOT EXECUTED
d568: e3a03001 mov r3, #1 <== NOT EXECUTED
d56c: e5803000 str r3, [r0] <== NOT EXECUTED
d570: e3e00000 mvn r0, #0 <== NOT EXECUTED
d574: ea00000c b d5ac <IMFS_fchmod+0x70> <== NOT EXECUTED
/*
* 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);
d578: e5943030 ldr r3, [r4, #48] ; 0x30
d57c: e1a06a06 lsl r6, r6, #20
d580: e3c33eff bic r3, r3, #4080 ; 0xff0
d584: e3c3300f bic r3, r3, #15
d588: e1a06a26 lsr r6, r6, #20
d58c: e1866003 orr r6, r6, r3
d590: e5846030 str r6, [r4, #48] ; 0x30
IMFS_update_ctime( jnode );
d594: e1a0000d mov r0, sp
d598: e1a01005 mov r1, r5
d59c: ebffd274 bl 1f74 <gettimeofday>
d5a0: e59d3000 ldr r3, [sp]
d5a4: e5843048 str r3, [r4, #72] ; 0x48
d5a8: e1a00005 mov r0, r5
return 0;
}
d5ac: e8bd807c pop {r2, r3, r4, r5, r6, pc}
00009d40 <IMFS_fifo_close>:
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
9d40: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
9d44: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
9d48: e1a01000 mov r1, r0 <== NOT EXECUTED
}
int IMFS_fifo_close(
rtems_libio_t *iop
)
{
9d4c: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_release(&JNODE2PIPE(jnode), iop);
9d50: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED
9d54: ebfffbd4 bl 8cac <pipe_release> <== NOT EXECUTED
if (! err) {
9d58: e2506000 subs r6, r0, #0 <== NOT EXECUTED
9d5c: 1a00000c bne 9d94 <IMFS_fifo_close+0x54> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
9d60: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
9d64: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
9d68: e5853014 str r3, [r5, #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)
9d6c: e1a00004 mov r0, r4 <== NOT EXECUTED
9d70: eb0001a3 bl a404 <rtems_libio_is_file_open> <== NOT EXECUTED
9d74: e3500000 cmp r0, #0 <== NOT EXECUTED
9d78: 1a00000a bne 9da8 <IMFS_fifo_close+0x68> <== NOT EXECUTED
9d7c: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED
9d80: e3530000 cmp r3, #0 <== NOT EXECUTED
9d84: 1a000007 bne 9da8 <IMFS_fifo_close+0x68> <== NOT EXECUTED
free(jnode);
9d88: e1a00004 mov r0, r4 <== NOT EXECUTED
9d8c: ebffe04f bl 1ed0 <free> <== NOT EXECUTED
9d90: ea000004 b 9da8 <IMFS_fifo_close+0x68> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
9d94: aa000003 bge 9da8 <IMFS_fifo_close+0x68> <== NOT EXECUTED
9d98: eb001251 bl e6e4 <__errno> <== NOT EXECUTED
9d9c: e2666000 rsb r6, r6, #0 <== NOT EXECUTED
9da0: e5806000 str r6, [r0] <== NOT EXECUTED
9da4: e3e06000 mvn r6, #0 <== NOT EXECUTED
}
9da8: e1a00006 mov r0, r6 <== NOT EXECUTED
9dac: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00009c28 <IMFS_fifo_ioctl>:
void *buffer
)
{
int err;
if (command == FIONBIO) {
9c28: e59f3068 ldr r3, [pc, #104] ; 9c98 <IMFS_fifo_ioctl+0x70> <== NOT EXECUTED
9c2c: e1510003 cmp r1, r3 <== NOT EXECUTED
int IMFS_fifo_ioctl(
rtems_libio_t *iop,
uint32_t command,
void *buffer
)
{
9c30: e92d4010 push {r4, lr} <== NOT EXECUTED
9c34: e1a03000 mov r3, r0 <== NOT EXECUTED
int err;
if (command == FIONBIO) {
9c38: 1a00000b bne 9c6c <IMFS_fifo_ioctl+0x44> <== NOT EXECUTED
if (buffer == NULL)
9c3c: e3520000 cmp r2, #0 <== NOT EXECUTED
9c40: 03e0400d mvneq r4, #13 <== NOT EXECUTED
9c44: 0a00000d beq 9c80 <IMFS_fifo_ioctl+0x58> <== NOT EXECUTED
err = -EFAULT;
else {
if (*(int *)buffer)
9c48: e5924000 ldr r4, [r2] <== NOT EXECUTED
9c4c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
9c50: e3540000 cmp r4, #0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
9c54: 13822001 orrne r2, r2, #1 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
9c58: 03c22001 biceq r2, r2, #1 <== NOT EXECUTED
if (command == FIONBIO) {
if (buffer == NULL)
err = -EFAULT;
else {
if (*(int *)buffer)
iop->flags |= LIBIO_FLAGS_NO_DELAY;
9c5c: 15832014 strne r2, [r3, #20] <== NOT EXECUTED
9c60: 13a04000 movne r4, #0 <== NOT EXECUTED
else
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
9c64: 05832014 streq r2, [r3, #20] <== NOT EXECUTED
9c68: ea000008 b 9c90 <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED
return 0;
}
}
else
err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
9c6c: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED
9c70: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED
9c74: ebfffb22 bl 8904 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9c78: e2504000 subs r4, r0, #0 <== NOT EXECUTED
9c7c: aa000003 bge 9c90 <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED
9c80: eb001297 bl e6e4 <__errno> <== NOT EXECUTED
9c84: e2644000 rsb r4, r4, #0 <== NOT EXECUTED
9c88: e5804000 str r4, [r0] <== NOT EXECUTED
9c8c: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
9c90: e1a00004 mov r0, r4 <== NOT EXECUTED
9c94: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00009be0 <IMFS_fifo_lseek>:
rtems_off64_t IMFS_fifo_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
9be0: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
9be4: e58d0000 str r0, [sp] <== NOT EXECUTED
9be8: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED
9bec: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED
9bf0: ebfffb29 bl 889c <pipe_lseek> <== NOT EXECUTED
9bf4: e1a03000 mov r3, r0 <== NOT EXECUTED
9bf8: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9bfc: 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);
9c00: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9c04: aa000004 bge 9c1c <IMFS_fifo_lseek+0x3c> <== NOT EXECUTED
9c08: eb0012b5 bl e6e4 <__errno> <== NOT EXECUTED
9c0c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
9c10: e5805000 str r5, [r0] <== NOT EXECUTED
9c14: e3e03000 mvn r3, #0 <== NOT EXECUTED
9c18: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
9c1c: e1a01004 mov r1, r4 <== NOT EXECUTED
9c20: e1a00003 mov r0, r3 <== NOT EXECUTED
9c24: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
00009cf0 <IMFS_fifo_read>:
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
9cf0: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
9cf4: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
9cf8: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
9cfc: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED
9d00: ebfffb17 bl 8964 <pipe_read> <== NOT EXECUTED
if (err > 0)
9d04: e2505000 subs r5, r0, #0 <== NOT EXECUTED
9d08: da000005 ble 9d24 <IMFS_fifo_read+0x34> <== NOT EXECUTED
IMFS_update_atime(jnode);
9d0c: e1a0000d mov r0, sp <== NOT EXECUTED
9d10: e3a01000 mov r1, #0 <== NOT EXECUTED
9d14: ebffe096 bl 1f74 <gettimeofday> <== NOT EXECUTED
9d18: e59d3000 ldr r3, [sp] <== NOT EXECUTED
9d1c: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
9d20: ea000004 b 9d38 <IMFS_fifo_read+0x48> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
9d24: 0a000003 beq 9d38 <IMFS_fifo_read+0x48> <== NOT EXECUTED
9d28: eb00126d bl e6e4 <__errno> <== NOT EXECUTED
9d2c: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
9d30: e5805000 str r5, [r0] <== NOT EXECUTED
9d34: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
9d38: e1a00005 mov r0, r5 <== NOT EXECUTED
9d3c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00009c9c <IMFS_fifo_write>:
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
9c9c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
9ca0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_write(
rtems_libio_t *iop,
const void *buffer,
size_t count
)
{
9ca4: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
9ca8: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED
9cac: ebfffb88 bl 8ad4 <pipe_write> <== NOT EXECUTED
if (err > 0) {
9cb0: e2505000 subs r5, r0, #0 <== NOT EXECUTED
9cb4: da000006 ble 9cd4 <IMFS_fifo_write+0x38> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
9cb8: e1a0000d mov r0, sp <== NOT EXECUTED
9cbc: e3a01000 mov r1, #0 <== NOT EXECUTED
9cc0: ebffe0ab bl 1f74 <gettimeofday> <== NOT EXECUTED
9cc4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
9cc8: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED
9ccc: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
9cd0: ea000004 b 9ce8 <IMFS_fifo_write+0x4c> <== NOT EXECUTED
}
IMFS_FIFO_RETURN(err);
9cd4: 0a000003 beq 9ce8 <IMFS_fifo_write+0x4c> <== NOT EXECUTED
9cd8: eb001281 bl e6e4 <__errno> <== NOT EXECUTED
9cdc: e2655000 rsb r5, r5, #0 <== NOT EXECUTED
9ce0: e5805000 str r5, [r0] <== NOT EXECUTED
9ce4: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
9ce8: e1a00005 mov r0, r5 <== NOT EXECUTED
9cec: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00009dec <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
)
{
9dec: 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;
9df0: e1a0c000 mov ip, r0
9df4: 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
)
{
9df8: e1a05000 mov r5, r0
9dfc: e24dd014 sub sp, sp, #20
* 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;
9e00: e8bc000f ldm ip!, {r0, r1, r2, r3}
9e04: e1a0e00d mov lr, sp
9e08: e8ae000f stmia lr!, {r0, r1, r2, r3}
9e0c: e59c3000 ldr r3, [ip]
9e10: e58e3000 str r3, [lr]
/*
* Set this to null to indicate that it is being unmounted.
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
9e14: e3a03000 mov r3, #0
9e18: e585301c str r3, [r5, #28]
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
9e1c: e1a0500d mov r5, sp
9e20: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
loc.node_access = (void *)jnode;
9e24: e58d4000 str r4, [sp]
*/
temp_mt_entry->mt_fs_root.node_access = NULL;
do {
next = jnode->Parent;
9e28: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode;
IMFS_Set_handlers( &loc );
9e2c: ebfffd55 bl 9388 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
9e30: e594204c ldr r2, [r4, #76] ; 0x4c
9e34: e3520001 cmp r2, #1
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
9e38: e2843054 add r3, r4, #84 ; 0x54
9e3c: 1a000002 bne 9e4c <IMFS_fsunmount+0x60>
9e40: e5942050 ldr r2, [r4, #80] ; 0x50
9e44: e1520003 cmp r2, r3
9e48: 1a000005 bne 9e64 <IMFS_fsunmount+0x78>
result = IMFS_unlink( NULL, &loc );
if (result != 0)
return -1;
jnode = next;
} else if ( jnode_has_no_children( jnode ) ) {
result = IMFS_unlink( NULL, &loc );
9e4c: e3a00000 mov r0, #0
9e50: e1a0100d mov r1, sp
9e54: ebffdeb3 bl 1928 <IMFS_unlink>
if (result != 0)
9e58: e3500000 cmp r0, #0
9e5c: 1a00000c bne 9e94 <IMFS_fsunmount+0xa8>
9e60: e1a04006 mov r4, r6
return -1;
jnode = next;
}
if ( jnode != NULL ) {
9e64: e3540000 cmp r4, #0
9e68: 0a00000b beq 9e9c <IMFS_fsunmount+0xb0>
if ( jnode->type == IMFS_DIRECTORY ) {
9e6c: e594304c ldr r3, [r4, #76] ; 0x4c
9e70: e3530001 cmp r3, #1
9e74: 1affffe9 bne 9e20 <IMFS_fsunmount+0x34>
9e78: e5943050 ldr r3, [r4, #80] ; 0x50
9e7c: e2842054 add r2, r4, #84 ; 0x54
9e80: e1530002 cmp r3, r2
9e84: 0affffe5 beq 9e20 <IMFS_fsunmount+0x34>
if ( jnode_has_children( jnode ) )
jnode = jnode_get_first_child( jnode );
}
}
} while (jnode != NULL);
9e88: e2534000 subs r4, r3, #0
9e8c: 1affffe3 bne 9e20 <IMFS_fsunmount+0x34>
9e90: ea000001 b 9e9c <IMFS_fsunmount+0xb0> <== NOT EXECUTED
9e94: e3e00000 mvn r0, #0 <== NOT EXECUTED
9e98: ea000000 b 9ea0 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
9e9c: e3a00000 mov r0, #0
return 0;
}
9ea0: e28dd014 add sp, sp, #20
9ea4: e8bd8070 pop {r4, r5, r6, pc}
00001548 <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,
1548: e59fc0d4 ldr ip, [pc, #212] ; 1624 <IMFS_initialize_support+0xdc>
154c: e59cc000 ldr ip, [ip]
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
)
{
1550: e92d41f0 push {r4, r5, r6, r7, r8, lr}
1554: e1a08002 mov r8, r2
1558: e1a06003 mov r6, r3
155c: e1a04000 mov r4, r0
1560: e1a07001 mov r7, r1
IMFS_jnode_t *jnode;
/*
* determine/check value for imfs_memfile_bytes_per_block
*/
IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block,
1564: e3a02000 mov r2, #0
1568: e3a03010 mov r3, #16
int bit_mask;
/*
* check, whether requested bytes per block is valid
*/
for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) {
156c: e153000c cmp r3, ip
1570: e2822001 add r2, r2, #1
1574: 0a000003 beq 1588 <IMFS_initialize_support+0x40>
1578: e3520006 cmp r2, #6
157c: e1a03083 lsl r3, r3, #1
1580: 1afffff9 bne 156c <IMFS_initialize_support+0x24>
1584: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) {
is_valid = true;
}
}
*dest_bytes_per_block = ((is_valid)
1588: e59f5098 ldr r5, [pc, #152] ; 1628 <IMFS_initialize_support+0xe0>
158c: e5853000 str r3, [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();
1590: eb001f1d bl 920c <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;
1594: e59fe090 ldr lr, [pc, #144] ; 162c <IMFS_initialize_support+0xe4>
/*
* 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();
1598: 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;
159c: e8be000f ldm lr!, {r0, r1, r2, r3}
15a0: e284c038 add ip, r4, #56 ; 0x38
15a4: e8ac000f stmia ip!, {r0, r1, r2, r3}
15a8: e8be000f ldm lr!, {r0, r1, r2, r3}
15ac: e8ac000f stmia ip!, {r0, r1, r2, r3}
15b0: 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;
15b4: e5847028 str r7, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
15b8: 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;
15bc: 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 ) );
15c0: e3a00001 mov r0, #1
15c4: e3a01010 mov r1, #16
15c8: eb0001b8 bl 1cb0 <calloc>
if ( !fs_info ) {
15cc: e3500000 cmp r0, #0
15d0: 1a000006 bne 15f0 <IMFS_initialize_support+0xa8>
free(temp_mt_entry->mt_fs_root.node_access);
15d4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
15d8: eb00023c bl 1ed0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
15dc: eb003440 bl e6e4 <__errno> <== NOT EXECUTED
15e0: e3a0300c mov r3, #12 <== NOT EXECUTED
15e4: e5803000 str r3, [r0] <== NOT EXECUTED
15e8: e3e00000 mvn r0, #0 <== NOT EXECUTED
15ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
15f0: 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;
15f4: e594101c ldr r1, [r4, #28]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
fs_info->ino_count = 1;
15f8: e3a03001 mov r3, #1
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
15fc: e880000c stm r0, {r2, r3}
fs_info->ino_count = 1;
fs_info->memfile_handlers = memfile_handlers;
fs_info->directory_handlers = directory_handlers;
1600: 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;
1604: e5808008 str r8, [r0, #8]
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1608: 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;
160c: 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;
1610: e5813038 str r3, [r1, #56] ; 0x38
/*
* Set st_ino for the root to 1.
*/
fs_info->instance = imfs_instance++;
1614: 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();
1618: eb001ca1 bl 88a4 <rtems_pipe_initialize>
161c: e3a00000 mov r0, #0
return 0;
}
1620: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00001630 <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 */
)
{
1630: e92d4070 push {r4, r5, r6, lr}
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
1634: 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 */
)
{
1638: e24dd048 sub sp, sp, #72 ; 0x48
int i;
/*
* Verify this node can be linked to.
*/
info.hard_link.link_node = to_loc->node_access;
163c: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
1640: e1d333b4 ldrh r3, [r3, #52] ; 0x34
1644: 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 */
)
{
1648: e1a05001 mov r5, r1
164c: 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 )
1650: 9a000002 bls 1660 <IMFS_link+0x30>
rtems_set_errno_and_return_minus_one( EMLINK );
1654: eb003422 bl e6e4 <__errno>
1658: e3a0301f mov r3, #31
165c: ea000012 b 16ac <IMFS_link+0x7c>
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( token, strlen( token ), new_name, &i );
1660: e1a00002 mov r0, r2
1664: eb003823 bl f6f8 <strlen>
1668: e28d4004 add r4, sp, #4
166c: e1a01000 mov r1, r0
1670: e1a02004 mov r2, r4
1674: e28d3044 add r3, sp, #68 ; 0x44
1678: e1a00006 mov r0, r6
167c: eb002231 bl 9f48 <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(
1680: e28dc028 add ip, sp, #40 ; 0x28
1684: e1a00005 mov r0, r5
1688: e1a02004 mov r2, r4
168c: e3a01003 mov r1, #3
1690: e59f3054 ldr r3, [pc, #84] ; 16ec <IMFS_link+0xbc>
1694: e58dc000 str ip, [sp]
1698: eb001eeb bl 924c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if ( !new_node )
169c: e3500000 cmp r0, #0
16a0: 1a000004 bne 16b8 <IMFS_link+0x88>
rtems_set_errno_and_return_minus_one( ENOMEM );
16a4: eb00340e bl e6e4 <__errno> <== NOT EXECUTED
16a8: e3a0300c mov r3, #12 <== NOT EXECUTED
16ac: e5803000 str r3, [r0]
16b0: e3e00000 mvn r0, #0
16b4: ea00000a b 16e4 <IMFS_link+0xb4>
/*
* Increment the link count of the node being pointed to.
*/
info.hard_link.link_node->st_nlink++;
16b8: e59d3028 ldr r3, [sp, #40] ; 0x28
16bc: e1d323b4 ldrh r2, [r3, #52] ; 0x34
16c0: e2822001 add r2, r2, #1
16c4: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
16c8: e28d003c add r0, sp, #60 ; 0x3c
16cc: e3a01000 mov r1, #0
16d0: eb000227 bl 1f74 <gettimeofday>
16d4: e59d203c ldr r2, [sp, #60] ; 0x3c
16d8: e59d3028 ldr r3, [sp, #40] ; 0x28
16dc: e5832048 str r2, [r3, #72] ; 0x48
16e0: e3a00000 mov r0, #0
return 0;
}
16e4: e28dd048 add sp, sp, #72 ; 0x48
16e8: e8bd8070 pop {r4, r5, r6, pc}
0000c654 <IMFS_memfile_addblock>:
)
{
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
c654: e2503000 subs r3, r0, #0
MEMFILE_STATIC int IMFS_memfile_addblock(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
c658: e92d4030 push {r4, r5, lr}
block_p memory;
block_p *block_entry_ptr;
assert( the_jnode );
c65c: 059f0060 ldreq r0, [pc, #96] ; c6c4 <IMFS_memfile_addblock+0x70>
c660: 059f1060 ldreq r1, [pc, #96] ; c6c8 <IMFS_memfile_addblock+0x74>
c664: 059f2060 ldreq r2, [pc, #96] ; c6cc <IMFS_memfile_addblock+0x78>
c668: 059f3060 ldreq r3, [pc, #96] ; c6d0 <IMFS_memfile_addblock+0x7c>
c66c: 0a000006 beq c68c <IMFS_memfile_addblock+0x38>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c670: e593304c ldr r3, [r3, #76] ; 0x4c
c674: e3530005 cmp r3, #5
c678: 0a000004 beq c690 <IMFS_memfile_addblock+0x3c>
c67c: e59f0040 ldr r0, [pc, #64] ; c6c4 <IMFS_memfile_addblock+0x70><== NOT EXECUTED
c680: e59f104c ldr r1, [pc, #76] ; c6d4 <IMFS_memfile_addblock+0x80><== NOT EXECUTED
c684: e59f2040 ldr r2, [pc, #64] ; c6cc <IMFS_memfile_addblock+0x78><== NOT EXECUTED
c688: e59f3048 ldr r3, [pc, #72] ; c6d8 <IMFS_memfile_addblock+0x84><== NOT EXECUTED
c68c: ebfff6c8 bl a1b4 <__assert_func> <== NOT EXECUTED
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 );
c690: e3a02001 mov r2, #1
c694: ebfffeaf bl c158 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
c698: e5904000 ldr r4, [r0]
c69c: 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 );
c6a0: e1a05000 mov r5, r0
if ( *block_entry_ptr )
c6a4: 13a00000 movne r0, #0
c6a8: 18bd8030 popne {r4, r5, pc}
#if 0
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
c6ac: ebfffe9c bl c124 <memfile_alloc_block>
if ( !memory )
c6b0: e3500000 cmp r0, #0
return 1;
*block_entry_ptr = memory;
c6b4: 15850000 strne r0, [r5]
fprintf(stdout, "%d %p", block, block_entry_ptr );
fflush(stdout);
#endif
memory = memfile_alloc_block();
if ( !memory )
c6b8: 03a00001 moveq r0, #1
return 1;
*block_entry_ptr = memory;
c6bc: 11a00004 movne r0, r4
return 0;
}
c6c0: e8bd8030 pop {r4, r5, pc}
0000c6dc <IMFS_memfile_extend>:
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
c6dc: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c6e0: e2504000 subs r4, r0, #0
MEMFILE_STATIC int IMFS_memfile_extend(
IMFS_jnode_t *the_jnode,
off_t new_length
)
{
c6e4: e1a05001 mov r5, r1
c6e8: e1a06002 mov r6, r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c6ec: 059f0134 ldreq r0, [pc, #308] ; c828 <IMFS_memfile_extend+0x14c>
c6f0: 059f1134 ldreq r1, [pc, #308] ; c82c <IMFS_memfile_extend+0x150>
c6f4: 059f2134 ldreq r2, [pc, #308] ; c830 <IMFS_memfile_extend+0x154>
c6f8: 059f3134 ldreq r3, [pc, #308] ; c834 <IMFS_memfile_extend+0x158>
c6fc: 0a000006 beq c71c <IMFS_memfile_extend+0x40>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c700: e594304c ldr r3, [r4, #76] ; 0x4c
c704: e3530005 cmp r3, #5
c708: 0a000004 beq c720 <IMFS_memfile_extend+0x44>
c70c: e59f0114 ldr r0, [pc, #276] ; c828 <IMFS_memfile_extend+0x14c><== NOT EXECUTED
c710: e59f1120 ldr r1, [pc, #288] ; c838 <IMFS_memfile_extend+0x15c><== NOT EXECUTED
c714: e59f2114 ldr r2, [pc, #276] ; c830 <IMFS_memfile_extend+0x154><== NOT EXECUTED
c718: e59f311c ldr r3, [pc, #284] ; c83c <IMFS_memfile_extend+0x160><== NOT EXECUTED
c71c: ebfff6a4 bl a1b4 <__assert_func> <== NOT EXECUTED
if ( the_jnode->type != IMFS_MEMORY_FILE )
rtems_set_errno_and_return_minus_one( EIO );
if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE )
c720: e59f3118 ldr r3, [pc, #280] ; c840 <IMFS_memfile_extend+0x164>
c724: e593b000 ldr fp, [r3]
c728: e1a0312b lsr r3, fp, #2
c72c: e2832001 add r2, r3, #1
c730: e0010293 mul r1, r3, r2
c734: e2811001 add r1, r1, #1
c738: e0020193 mul r2, r3, r1
c73c: e3a03000 mov r3, #0
c740: e1530006 cmp r3, r6
c744: e2422001 sub r2, r2, #1
c748: e003029b mul r3, fp, r2
c74c: ca000005 bgt c768 <IMFS_memfile_extend+0x8c>
c750: 1a000001 bne c75c <IMFS_memfile_extend+0x80>
c754: e1530005 cmp r3, r5
c758: 8a000002 bhi c768 <IMFS_memfile_extend+0x8c>
rtems_set_errno_and_return_minus_one( EINVAL );
c75c: eb0007e0 bl e6e4 <__errno> <== NOT EXECUTED
c760: e3a03016 mov r3, #22 <== NOT EXECUTED
c764: ea000025 b c800 <IMFS_memfile_extend+0x124> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
c768: e5948054 ldr r8, [r4, #84] ; 0x54
c76c: e1560008 cmp r6, r8
c770: e5947050 ldr r7, [r4, #80] ; 0x50
c774: ca000002 bgt c784 <IMFS_memfile_extend+0xa8>
c778: 1a000028 bne c820 <IMFS_memfile_extend+0x144>
c77c: e1550007 cmp r5, r7
c780: 9a000026 bls c820 <IMFS_memfile_extend+0x144>
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
c784: e1a0cfcb asr ip, fp, #31
c788: e1a0300c mov r3, ip
c78c: e1a0200b mov r2, fp
c790: e1a00005 mov r0, r5
c794: e1a01006 mov r1, r6
c798: e58dc000 str ip, [sp]
c79c: eb00309b bl 18a10 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
c7a0: e59dc000 ldr ip, [sp]
c7a4: e1a01008 mov r1, r8
/*
* Calculate the number of range of blocks to allocate
*/
new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
c7a8: e1a0a000 mov sl, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
c7ac: e1a0200b mov r2, fp
c7b0: e1a00007 mov r0, r7
c7b4: e1a0300c mov r3, ip
c7b8: eb003094 bl 18a10 <__divdi3>
c7bc: e1a08000 mov r8, r0
c7c0: e1a07000 mov r7, r0
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
c7c4: ea000011 b c810 <IMFS_memfile_extend+0x134>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
c7c8: e1a00004 mov r0, r4
c7cc: e1a01007 mov r1, r7
c7d0: ebffff9f bl c654 <IMFS_memfile_addblock>
c7d4: e3500000 cmp r0, #0
c7d8: 0a00000b beq c80c <IMFS_memfile_extend+0x130>
c7dc: ea000003 b c7f0 <IMFS_memfile_extend+0x114> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) {
IMFS_memfile_remove_block( the_jnode, block );
c7e0: e1a01007 mov r1, r7 <== NOT EXECUTED
c7e4: e1a00004 mov r0, r4 <== NOT EXECUTED
c7e8: ebfffefa bl c3d8 <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-- ) {
c7ec: e2477001 sub r7, r7, #1 <== NOT EXECUTED
c7f0: e1570008 cmp r7, r8 <== NOT EXECUTED
c7f4: 2afffff9 bcs c7e0 <IMFS_memfile_extend+0x104> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block );
}
rtems_set_errno_and_return_minus_one( ENOSPC );
c7f8: eb0007b9 bl e6e4 <__errno> <== NOT EXECUTED
c7fc: e3a0301c mov r3, #28 <== NOT EXECUTED
c800: e5803000 str r3, [r0] <== NOT EXECUTED
c804: e3e00000 mvn r0, #0 <== NOT EXECUTED
c808: ea000005 b c824 <IMFS_memfile_extend+0x148> <== NOT EXECUTED
/*
* Now allocate each of those blocks.
*/
for ( block=old_blocks ; block<=new_blocks ; block++ ) {
c80c: e2877001 add r7, r7, #1
c810: e157000a cmp r7, sl
c814: 9affffeb bls c7c8 <IMFS_memfile_extend+0xec>
/*
* Set the new length of the file.
*/
the_jnode->info.file.size = new_length;
c818: e5846054 str r6, [r4, #84] ; 0x54
c81c: e5845050 str r5, [r4, #80] ; 0x50
c820: e3a00000 mov r0, #0
return 0;
}
c824: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc}
0000c158 <IMFS_memfile_get_block_pointer>:
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
c158: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c15c: e2504000 subs r4, r0, #0
#endif
IMFS_jnode_t *the_jnode,
unsigned int block,
int malloc_it
)
{
c160: e1a06001 mov r6, r1
c164: e1a08002 mov r8, r2
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c168: 059f01d8 ldreq r0, [pc, #472] ; c348 <IMFS_memfile_get_block_pointer+0x1f0>
c16c: 03a01fe2 moveq r1, #904 ; 0x388
c170: 059f21d4 ldreq r2, [pc, #468] ; c34c <IMFS_memfile_get_block_pointer+0x1f4>
c174: 059f31d4 ldreq r3, [pc, #468] ; c350 <IMFS_memfile_get_block_pointer+0x1f8>
c178: 0a000006 beq c198 <IMFS_memfile_get_block_pointer+0x40>
if ( !the_jnode )
return NULL;
assert( the_jnode->type == IMFS_MEMORY_FILE );
c17c: e594304c ldr r3, [r4, #76] ; 0x4c
c180: e3530005 cmp r3, #5
c184: 0a000004 beq c19c <IMFS_memfile_get_block_pointer+0x44>
c188: e59f01b8 ldr r0, [pc, #440] ; c348 <IMFS_memfile_get_block_pointer+0x1f0><== NOT EXECUTED
c18c: e59f21b8 ldr r2, [pc, #440] ; c34c <IMFS_memfile_get_block_pointer+0x1f4><== NOT EXECUTED
c190: e59f31bc ldr r3, [pc, #444] ; c354 <IMFS_memfile_get_block_pointer+0x1fc><== NOT EXECUTED
c194: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED
c198: ebfff805 bl a1b4 <__assert_func> <== NOT EXECUTED
/*
* Is the block number in the simple indirect portion?
*/
if ( my_block <= LAST_INDIRECT ) {
c19c: e59f31b4 ldr r3, [pc, #436] ; c358 <IMFS_memfile_get_block_pointer+0x200>
c1a0: e5935000 ldr r5, [r3]
c1a4: e1a05125 lsr r5, r5, #2
c1a8: e2453001 sub r3, r5, #1
c1ac: e1510003 cmp r1, r3
c1b0: 8a00000e bhi c1f0 <IMFS_memfile_get_block_pointer+0x98>
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
if ( malloc_it ) {
c1b4: e3520000 cmp r2, #0
if ( my_block <= LAST_INDIRECT ) {
#if 0
fprintf(stdout, "(s %d) ", block );
fflush(stdout);
#endif
p = info->indirect;
c1b8: e5940058 ldr r0, [r4, #88] ; 0x58
if ( malloc_it ) {
c1bc: 0a000007 beq c1e0 <IMFS_memfile_get_block_pointer+0x88>
if ( !p ) {
c1c0: e3500000 cmp r0, #0
c1c4: 1a000003 bne c1d8 <IMFS_memfile_get_block_pointer+0x80>
p = memfile_alloc_block();
c1c8: ebffffd5 bl c124 <memfile_alloc_block>
if ( !p )
c1cc: e3500000 cmp r0, #0
c1d0: 0a00005a beq c340 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
info->indirect = p;
c1d4: e5840058 str r0, [r4, #88] ; 0x58
}
return &info->indirect[ my_block ];
c1d8: e5940058 ldr r0, [r4, #88] ; 0x58
c1dc: ea000001 b c1e8 <IMFS_memfile_get_block_pointer+0x90>
}
if ( !p )
c1e0: e3500000 cmp r0, #0
c1e4: 0a000055 beq c340 <IMFS_memfile_get_block_pointer+0x1e8>
return 0;
return &info->indirect[ my_block ];
c1e8: e0800106 add r0, r0, r6, lsl #2
c1ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/*
* Is the block number in the doubly indirect portion?
*/
if ( my_block <= LAST_DOUBLY_INDIRECT ) {
c1f0: e2852001 add r2, r5, #1 <== NOT EXECUTED
c1f4: e0030295 mul r3, r5, r2 <== NOT EXECUTED
c1f8: e2432001 sub r2, r3, #1 <== NOT EXECUTED
c1fc: e1510002 cmp r1, r2 <== NOT EXECUTED
c200: 8a000015 bhi c25c <IMFS_memfile_get_block_pointer+0x104> <== NOT EXECUTED
#if 0
fprintf(stdout, "(d %d) ", block );
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
c204: e0656001 rsb r6, r5, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c208: e1a00006 mov r0, r6 <== NOT EXECUTED
c20c: e1a01005 mov r1, r5 <== NOT EXECUTED
c210: eb002f51 bl 17f5c <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c214: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout);
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c218: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c21c: e1a00006 mov r0, r6 <== NOT EXECUTED
c220: eb002eb9 bl 17d0c <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect;
if ( malloc_it ) {
c224: e3580000 cmp r8, #0 <== NOT EXECUTED
#endif
my_block -= FIRST_DOUBLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c228: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->doubly_indirect;
c22c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( malloc_it ) {
c230: 0a00003b beq c324 <IMFS_memfile_get_block_pointer+0x1cc> <== NOT EXECUTED
if ( !p ) {
c234: e3530000 cmp r3, #0 <== NOT EXECUTED
c238: 1a000003 bne c24c <IMFS_memfile_get_block_pointer+0xf4> <== NOT EXECUTED
p = memfile_alloc_block();
c23c: ebffffb8 bl c124 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
c240: e2503000 subs r3, r0, #0 <== NOT EXECUTED
c244: 0a00003d beq c340 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
info->doubly_indirect = p;
c248: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
}
p1 = (block_p *)p[ doubly ];
c24c: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
c250: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
c254: e3500000 cmp r0, #0 <== NOT EXECUTED
c258: ea000028 b c300 <IMFS_memfile_get_block_pointer+0x1a8> <== NOT EXECUTED
#endif
/*
* Is the block number in the triply indirect portion?
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
c25c: e2831001 add r1, r3, #1 <== NOT EXECUTED
c260: e0020195 mul r2, r5, r1 <== NOT EXECUTED
c264: e2422001 sub r2, r2, #1 <== NOT EXECUTED
c268: e1560002 cmp r6, r2 <== NOT EXECUTED
c26c: 8a000033 bhi c340 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
c270: e0636006 rsb r6, r3, r6 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c274: e1a01005 mov r1, r5 <== NOT EXECUTED
c278: e1a00006 mov r0, r6 <== NOT EXECUTED
c27c: eb002f36 bl 17f5c <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c280: e1a01005 mov r1, r5 <== NOT EXECUTED
*/
if ( my_block <= LAST_TRIPLY_INDIRECT ) {
my_block -= FIRST_TRIPLY_INDIRECT;
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
c284: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
c288: e1a00006 mov r0, r6 <== NOT EXECUTED
c28c: eb002e9e bl 17d0c <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
c290: 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;
c294: e1a06000 mov r6, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
c298: eb002e9b bl 17d0c <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
c29c: 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;
c2a0: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
c2a4: e1a00006 mov r0, r6 <== NOT EXECUTED
c2a8: eb002f2b bl 17f5c <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect;
if ( malloc_it ) {
c2ac: e3580000 cmp r8, #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;
c2b0: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->triply_indirect;
c2b4: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if ( malloc_it ) {
c2b8: 0a000016 beq c318 <IMFS_memfile_get_block_pointer+0x1c0> <== NOT EXECUTED
if ( !p ) {
c2bc: e3530000 cmp r3, #0 <== NOT EXECUTED
c2c0: 1a000003 bne c2d4 <IMFS_memfile_get_block_pointer+0x17c> <== NOT EXECUTED
p = memfile_alloc_block();
c2c4: ebffff96 bl c124 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
c2c8: e2503000 subs r3, r0, #0 <== NOT EXECUTED
c2cc: 0a00001b beq c340 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
info->triply_indirect = p;
c2d0: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED
}
p1 = (block_p *) p[ triply ];
c2d4: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
c2d8: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( !p )
return 0;
info->triply_indirect = p;
}
p1 = (block_p *) p[ triply ];
c2dc: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
c2e0: 1a000003 bne c2f4 <IMFS_memfile_get_block_pointer+0x19c> <== NOT EXECUTED
p1 = memfile_alloc_block();
c2e4: ebffff8e bl c124 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
c2e8: e2502000 subs r2, r0, #0 <== NOT EXECUTED
c2ec: 0a000013 beq c340 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
p[ triply ] = (block_p) p1;
c2f0: e5872000 str r2, [r7] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
c2f4: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED
c2f8: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED
if ( !p2 ) {
c2fc: e3500000 cmp r0, #0 <== NOT EXECUTED
c300: 1a00000c bne c338 <IMFS_memfile_get_block_pointer+0x1e0> <== NOT EXECUTED
p2 = memfile_alloc_block();
c304: ebffff86 bl c124 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
c308: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
p1[ doubly ] = (block_p) p2;
c30c: 15850000 strne r0, [r5] <== NOT EXECUTED
}
p2 = (block_p *)p1[ doubly ];
if ( !p2 ) {
p2 = memfile_alloc_block();
if ( !p2 )
c310: 1a000008 bne c338 <IMFS_memfile_get_block_pointer+0x1e0> <== NOT EXECUTED
c314: ea000009 b c340 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2;
}
return (block_p *)&p2[ singly ];
}
if ( !p )
c318: e3530000 cmp r3, #0 <== NOT EXECUTED
c31c: 0a000007 beq c340 <IMFS_memfile_get_block_pointer+0x1e8> <== 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 ];
c320: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 )
c324: e3530000 cmp r3, #0 <== NOT EXECUTED
c328: 0a000004 beq c340 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
p2 = (block_p *)p1[ doubly ];
c32c: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED
if ( !p2 )
c330: e3500000 cmp r0, #0 <== NOT EXECUTED
c334: 0a000001 beq c340 <IMFS_memfile_get_block_pointer+0x1e8> <== NOT EXECUTED
return 0;
return (block_p *)&p2[ singly ];
c338: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED
c33c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
c340: e3a00000 mov r0, #0 <== NOT EXECUTED
/*
* This means the requested block number is out of range.
*/
return 0;
}
c344: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0000cc64 <IMFS_memfile_read>:
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
cc64: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
cc68: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
unsigned char *destination,
unsigned int length
)
{
cc6c: e24dd014 sub sp, sp, #20
cc70: e1a06003 mov r6, r3
cc74: e1a08001 mov r8, r1
cc78: e1a09002 mov r9, r2
cc7c: e59d7038 ldr r7, [sp, #56] ; 0x38
/*
* Perform internal consistency checks
*/
assert( the_jnode );
cc80: 059f0268 ldreq r0, [pc, #616] ; cef0 <IMFS_memfile_read+0x28c>
cc84: 03a01f93 moveq r1, #588 ; 0x24c
cc88: 059f2264 ldreq r2, [pc, #612] ; cef4 <IMFS_memfile_read+0x290>
cc8c: 059f3264 ldreq r3, [pc, #612] ; cef8 <IMFS_memfile_read+0x294>
cc90: 0a000007 beq ccb4 <IMFS_memfile_read+0x50>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE ||
cc94: e594304c ldr r3, [r4, #76] ; 0x4c
cc98: e2432005 sub r2, r3, #5
cc9c: e3520001 cmp r2, #1
cca0: 9a000004 bls ccb8 <IMFS_memfile_read+0x54>
cca4: e59f0244 ldr r0, [pc, #580] ; cef0 <IMFS_memfile_read+0x28c><== NOT EXECUTED
cca8: e59f124c ldr r1, [pc, #588] ; cefc <IMFS_memfile_read+0x298><== NOT EXECUTED
ccac: e59f2240 ldr r2, [pc, #576] ; cef4 <IMFS_memfile_read+0x290><== NOT EXECUTED
ccb0: e59f3248 ldr r3, [pc, #584] ; cf00 <IMFS_memfile_read+0x29c><== NOT EXECUTED
ccb4: ebfff53e bl a1b4 <__assert_func> <== NOT EXECUTED
/*
* Error checks on arguments
*/
assert( dest );
ccb8: e3560000 cmp r6, #0
ccbc: 059f022c ldreq r0, [pc, #556] ; cef0 <IMFS_memfile_read+0x28c>
ccc0: 059f123c ldreq r1, [pc, #572] ; cf04 <IMFS_memfile_read+0x2a0>
ccc4: 059f2228 ldreq r2, [pc, #552] ; cef4 <IMFS_memfile_read+0x290>
ccc8: 059f3238 ldreq r3, [pc, #568] ; cf08 <IMFS_memfile_read+0x2a4>
cccc: 0afffff8 beq ccb4 <IMFS_memfile_read+0x50>
/*
* If there is nothing to read, then quick exit.
*/
my_length = length;
if ( !my_length )
ccd0: e3570000 cmp r7, #0
ccd4: 1a000004 bne ccec <IMFS_memfile_read+0x88>
rtems_set_errno_and_return_minus_one( EINVAL );
ccd8: eb000681 bl e6e4 <__errno> <== NOT EXECUTED
ccdc: e3a03016 mov r3, #22 <== NOT EXECUTED
cce0: e5803000 str r3, [r0] <== NOT EXECUTED
cce4: e3e07000 mvn r7, #0 <== NOT EXECUTED
cce8: ea00007d b cee4 <IMFS_memfile_read+0x280> <== NOT EXECUTED
/*
* Linear files (as created from a tar file are easier to handle
* than block files).
*/
if (the_jnode->type == IMFS_LINEAR_FILE) {
ccec: e3530006 cmp r3, #6
ccf0: 1a000012 bne cd40 <IMFS_memfile_read+0xdc>
unsigned char *file_ptr;
file_ptr = (unsigned char *)the_jnode->info.linearfile.direct;
if (my_length > (the_jnode->info.linearfile.size - start))
ccf4: e2843050 add r3, r4, #80 ; 0x50 <== NOT EXECUTED
ccf8: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
ccfc: e1a00002 mov r0, r2 <== NOT EXECUTED
cd00: e1a01003 mov r1, r3 <== NOT EXECUTED
cd04: e3a0c000 mov ip, #0 <== NOT EXECUTED
cd08: e0500008 subs r0, r0, r8 <== NOT EXECUTED
cd0c: e0c11009 sbc r1, r1, r9 <== NOT EXECUTED
cd10: e15c0001 cmp ip, 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;
cd14: e594c058 ldr ip, [r4, #88] ; 0x58 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
cd18: ca000002 bgt cd28 <IMFS_memfile_read+0xc4> <== NOT EXECUTED
cd1c: 1a000002 bne cd2c <IMFS_memfile_read+0xc8> <== NOT EXECUTED
cd20: e1570000 cmp r7, r0 <== NOT EXECUTED
cd24: 9a000000 bls cd2c <IMFS_memfile_read+0xc8> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
cd28: e0687002 rsb r7, r8, r2 <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
cd2c: e08c1008 add r1, ip, r8 <== NOT EXECUTED
cd30: e1a00006 mov r0, r6 <== NOT EXECUTED
cd34: e1a02007 mov r2, r7 <== NOT EXECUTED
cd38: eb000877 bl ef1c <memcpy> <== NOT EXECUTED
cd3c: ea000063 b ced0 <IMFS_memfile_read+0x26c> <== NOT EXECUTED
* 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 )
cd40: e5943054 ldr r3, [r4, #84] ; 0x54
cd44: e3a02000 mov r2, #0
cd48: e1520003 cmp r2, r3
cd4c: e5945050 ldr r5, [r4, #80] ; 0x50
/*
* 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;
cd50: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
cd54: e0872001 add r2, r7, r1
cd58: ca000004 bgt cd70 <IMFS_memfile_read+0x10c>
cd5c: 1a000001 bne cd68 <IMFS_memfile_read+0x104>
cd60: e1520005 cmp r2, r5
cd64: 8a000001 bhi cd70 <IMFS_memfile_read+0x10c>
cd68: e1a05007 mov r5, r7
cd6c: ea000000 b cd74 <IMFS_memfile_read+0x110>
my_length = the_jnode->info.file.size - start;
cd70: e0635005 rsb r5, r3, r5
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
cd74: e59f3190 ldr r3, [pc, #400] ; cf0c <IMFS_memfile_read+0x2a8>
cd78: e593a000 ldr sl, [r3]
cd7c: e1a0b00a mov fp, sl
cd80: e1a0cfcb asr ip, fp, #31
cd84: e1a0300c mov r3, ip
cd88: e1a00008 mov r0, r8
cd8c: e1a01009 mov r1, r9
cd90: e1a0200b mov r2, fp
cd94: e58dc000 str ip, [sp]
cd98: eb003046 bl 18eb8 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
cd9c: e59dc000 ldr ip, [sp]
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
cda0: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
cda4: e1a01009 mov r1, r9
cda8: e1a00008 mov r0, r8
cdac: e1a0200b mov r2, fp
cdb0: e1a0300c mov r3, ip
cdb4: eb002f15 bl 18a10 <__divdi3>
if ( start_offset ) {
cdb8: e3570000 cmp r7, #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;
cdbc: e1a08000 mov r8, r0
if ( start_offset ) {
cdc0: 058d6008 streq r6, [sp, #8]
cdc4: 01a09007 moveq r9, r7
cdc8: 0a000013 beq ce1c <IMFS_memfile_read+0x1b8>
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 );
cdcc: e1a00004 mov r0, r4
cdd0: e1a01008 mov r1, r8
cdd4: e3a02000 mov r2, #0
cdd8: ebfffcde bl c158 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cddc: e3500000 cmp r0, #0
cde0: 059f0108 ldreq r0, [pc, #264] ; cef0 <IMFS_memfile_read+0x28c>
cde4: 059f1124 ldreq r1, [pc, #292] ; cf10 <IMFS_memfile_read+0x2ac>
cde8: 0a000030 beq ceb0 <IMFS_memfile_read+0x24c>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
cdec: 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;
cdf0: e067900a rsb r9, r7, sl
cdf4: e1550009 cmp r5, r9
cdf8: 31a09005 movcc r9, 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 );
cdfc: e1a00006 mov r0, r6
ce00: e0811007 add r1, r1, r7
ce04: e1a02009 mov r2, r9
dest += to_copy;
ce08: e0866009 add r6, r6, r9
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 );
ce0c: eb000842 bl ef1c <memcpy>
dest += to_copy;
ce10: e58d6008 str r6, [sp, #8]
block++;
ce14: e2888001 add r8, r8, #1
my_length -= to_copy;
ce18: e0695005 rsb r5, r9, r5
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ce1c: e59f30e8 ldr r3, [pc, #232] ; cf0c <IMFS_memfile_read+0x2a8>
ce20: e3a06000 mov r6, #0
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ce24: e1a0b003 mov fp, r3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ce28: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ce2c: ea00000e b ce6c <IMFS_memfile_read+0x208>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ce30: e1a00004 mov r0, r4
ce34: e1a01008 mov r1, r8
ce38: e3a02000 mov r2, #0
ce3c: ebfffcc5 bl c158 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
ce40: e2503000 subs r3, r0, #0
* Phase 2: all of zero of more blocks
*/
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 );
ce44: e086600a add r6, r6, sl
assert( block_ptr );
ce48: 059f00a0 ldreq r0, [pc, #160] ; cef0 <IMFS_memfile_read+0x28c>
ce4c: 059f10c0 ldreq r1, [pc, #192] ; cf14 <IMFS_memfile_read+0x2b0>
ce50: 0a000016 beq ceb0 <IMFS_memfile_read+0x24c>
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
ce54: e59d0004 ldr r0, [sp, #4]
ce58: e5931000 ldr r1, [r3]
ce5c: e1a0200a mov r2, sl
ce60: eb00082d bl ef1c <memcpy>
dest += to_copy;
block++;
ce64: e2888001 add r8, r8, #1
my_length -= to_copy;
ce68: 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 ) {
ce6c: e59b3000 ldr r3, [fp]
ce70: e1550003 cmp r5, r3
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
ce74: e59d3008 ldr r3, [sp, #8]
ce78: e0833006 add r3, r3, r6
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
dest += to_copy;
block++;
my_length -= to_copy;
ce7c: e0867009 add r7, r6, r9
* are between the offset and the end of the file will result in
* reading the data between offset and the end of the file (truncated
* read).
*/
MEMFILE_STATIC ssize_t IMFS_memfile_read(
ce80: e58d3004 str r3, [sp, #4]
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ce84: 2affffe9 bcs ce30 <IMFS_memfile_read+0x1cc>
* Phase 3: possibly the first part of one block
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
if ( my_length ) {
ce88: e3550000 cmp r5, #0
ce8c: 0a00000f beq ced0 <IMFS_memfile_read+0x26c>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
ce90: e1a01008 mov r1, r8
ce94: e1a00004 mov r0, r4
ce98: e3a02000 mov r2, #0
ce9c: ebfffcad bl c158 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cea0: e2503000 subs r3, r0, #0
cea4: 1a000004 bne cebc <IMFS_memfile_read+0x258>
cea8: e59f0040 ldr r0, [pc, #64] ; cef0 <IMFS_memfile_read+0x28c><== NOT EXECUTED
ceac: e59f1064 ldr r1, [pc, #100] ; cf18 <IMFS_memfile_read+0x2b4><== NOT EXECUTED
ceb0: e59f203c ldr r2, [pc, #60] ; cef4 <IMFS_memfile_read+0x290><== NOT EXECUTED
ceb4: e59f3060 ldr r3, [pc, #96] ; cf1c <IMFS_memfile_read+0x2b8><== NOT EXECUTED
ceb8: eaffff7d b ccb4 <IMFS_memfile_read+0x50> <== NOT EXECUTED
if ( !block_ptr )
return copied;
memcpy( dest, &(*block_ptr)[ 0 ], my_length );
cebc: e59d0004 ldr r0, [sp, #4]
cec0: e5931000 ldr r1, [r3]
cec4: e1a02005 mov r2, r5
cec8: eb000813 bl ef1c <memcpy>
copied += my_length;
cecc: e0857007 add r7, r5, r7
}
IMFS_update_atime( the_jnode );
ced0: e28d000c add r0, sp, #12
ced4: e3a01000 mov r1, #0
ced8: ebffd425 bl 1f74 <gettimeofday>
cedc: e59d300c ldr r3, [sp, #12]
cee0: e5843040 str r3, [r4, #64] ; 0x40
return copied;
}
cee4: e1a00007 mov r0, r7
cee8: e28dd014 add sp, sp, #20
ceec: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000c424 <IMFS_memfile_remove>:
*/
int IMFS_memfile_remove(
IMFS_jnode_t *the_jnode
)
{
c424: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c428: e2504000 subs r4, r0, #0
c42c: 059f012c ldreq r0, [pc, #300] ; c560 <IMFS_memfile_remove+0x13c>
c430: 059f112c ldreq r1, [pc, #300] ; c564 <IMFS_memfile_remove+0x140>
c434: 059f212c ldreq r2, [pc, #300] ; c568 <IMFS_memfile_remove+0x144>
c438: 059f312c ldreq r3, [pc, #300] ; c56c <IMFS_memfile_remove+0x148>
c43c: 0a000006 beq c45c <IMFS_memfile_remove+0x38>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c440: e594304c ldr r3, [r4, #76] ; 0x4c
c444: e3530005 cmp r3, #5
c448: 0a000004 beq c460 <IMFS_memfile_remove+0x3c>
c44c: e59f010c ldr r0, [pc, #268] ; c560 <IMFS_memfile_remove+0x13c><== NOT EXECUTED
c450: e59f1118 ldr r1, [pc, #280] ; c570 <IMFS_memfile_remove+0x14c><== NOT EXECUTED
c454: e59f210c ldr r2, [pc, #268] ; c568 <IMFS_memfile_remove+0x144><== NOT EXECUTED
c458: e59f3114 ldr r3, [pc, #276] ; c574 <IMFS_memfile_remove+0x150><== NOT EXECUTED
c45c: ebfff754 bl a1b4 <__assert_func> <== NOT EXECUTED
/*
* 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;
c460: e59f2110 ldr r2, [pc, #272] ; c578 <IMFS_memfile_remove+0x154>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c464: e5943058 ldr r3, [r4, #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;
c468: e5925000 ldr r5, [r2]
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c46c: 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;
c470: e1a05125 lsr r5, r5, #2
*/
info = &the_jnode->info.file;
if ( info->indirect ) {
memfile_free_blocks_in_table( &info->indirect, to_free );
c474: 12840058 addne r0, r4, #88 ; 0x58
c478: 11a01005 movne r1, r5
c47c: 1bffffb6 blne c35c <memfile_free_blocks_in_table>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c480: e594305c ldr r3, [r4, #92] ; 0x5c
c484: e3530000 cmp r3, #0
c488: 13a06000 movne r6, #0
memfile_free_blocks_in_table( &info->indirect, to_free );
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
c48c: 159f70e4 ldrne r7, [pc, #228] ; c578 <IMFS_memfile_remove+0x154>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c490: 1a000008 bne c4b8 <IMFS_memfile_remove+0x94>
c494: ea00000d b c4d0 <IMFS_memfile_remove+0xac>
}
if ( info->doubly_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
if ( info->doubly_indirect[i] ) {
c498: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
c49c: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED
c4a0: e3520000 cmp r2, #0 <== NOT EXECUTED
c4a4: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED
memfile_free_blocks_in_table(
c4a8: 10830000 addne r0, r3, r0 <== NOT EXECUTED
c4ac: 11a01005 movne r1, r5 <== NOT EXECUTED
c4b0: 1bffffa9 blne c35c <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++ ) {
c4b4: e2866001 add r6, r6, #1 <== NOT EXECUTED
c4b8: e5973000 ldr r3, [r7] <== NOT EXECUTED
c4bc: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
c4c0: 3afffff4 bcc c498 <IMFS_memfile_remove+0x74> <== 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 );
c4c4: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED
c4c8: e1a01005 mov r1, r5 <== NOT EXECUTED
c4cc: ebffffa2 bl c35c <memfile_free_blocks_in_table> <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c4d0: e5943060 ldr r3, [r4, #96] ; 0x60
c4d4: e3530000 cmp r3, #0
c4d8: 13a06000 movne r6, #0
memfile_free_blocks_in_table( &info->doubly_indirect, to_free );
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
c4dc: 159fa094 ldrne sl, [pc, #148] ; c578 <IMFS_memfile_remove+0x154>
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c4e0: 1a000016 bne c540 <IMFS_memfile_remove+0x11c>
c4e4: ea00001b b c558 <IMFS_memfile_remove+0x134>
}
if ( info->triply_indirect ) {
for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) {
p = (block_p *) info->triply_indirect[i];
c4e8: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
c4ec: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
c4f0: e3570000 cmp r7, #0 <== NOT EXECUTED
* + indirect
* + doubly indirect
* + triply indirect
*/
info = &the_jnode->info.file;
c4f4: e1a09106 lsl r9, r6, #2 <== 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 */
c4f8: 0a000013 beq c54c <IMFS_memfile_remove+0x128> <== NOT EXECUTED
c4fc: e3a08000 mov r8, #0 <== NOT EXECUTED
c500: ea000006 b c520 <IMFS_memfile_remove+0xfc> <== NOT EXECUTED
break;
for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) {
if ( p[j] ) {
c504: e5973000 ldr r3, [r7] <== NOT EXECUTED
c508: e3530000 cmp r3, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
c50c: 11a00007 movne r0, r7 <== NOT EXECUTED
c510: 11a01005 movne r1, r5 <== NOT EXECUTED
c514: 1bffff90 blne c35c <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++ ) {
c518: e2888001 add r8, r8, #1 <== NOT EXECUTED
c51c: e2877004 add r7, r7, #4 <== NOT EXECUTED
c520: e59a3000 ldr r3, [sl] <== NOT EXECUTED
c524: e1580123 cmp r8, r3, lsr #2 <== NOT EXECUTED
c528: 3afffff5 bcc c504 <IMFS_memfile_remove+0xe0> <== NOT EXECUTED
if ( p[j] ) {
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
}
}
memfile_free_blocks_in_table(
c52c: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
c530: e1a01005 mov r1, r5 <== NOT EXECUTED
c534: e0800009 add r0, r0, r9 <== NOT EXECUTED
c538: ebffff87 bl c35c <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++ ) {
c53c: e2866001 add r6, r6, #1 <== NOT EXECUTED
c540: e59a3000 ldr r3, [sl] <== NOT EXECUTED
c544: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED
c548: 3affffe6 bcc c4e8 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
}
}
memfile_free_blocks_in_table(
(block_p **)&info->triply_indirect[i], to_free );
}
memfile_free_blocks_in_table(
c54c: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
c550: e1a01005 mov r1, r5 <== NOT EXECUTED
c554: ebffff80 bl c35c <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free );
}
return 0;
}
c558: e3a00000 mov r0, #0
c55c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0000c3d8 <IMFS_memfile_remove_block>:
MEMFILE_STATIC int IMFS_memfile_remove_block(
IMFS_jnode_t *the_jnode,
unsigned int block
)
{
c3d8: 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 );
c3dc: e3a02000 mov r2, #0 <== NOT EXECUTED
c3e0: ebffff5c bl c158 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
c3e4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
c3e8: 059f0024 ldreq r0, [pc, #36] ; c414 <IMFS_memfile_remove_block+0x3c><== NOT EXECUTED
c3ec: 059f1024 ldreq r1, [pc, #36] ; c418 <IMFS_memfile_remove_block+0x40><== NOT EXECUTED
c3f0: 059f2024 ldreq r2, [pc, #36] ; c41c <IMFS_memfile_remove_block+0x44><== NOT EXECUTED
c3f4: 059f3024 ldreq r3, [pc, #36] ; c420 <IMFS_memfile_remove_block+0x48><== NOT EXECUTED
c3f8: 0bfff76d bleq a1b4 <__assert_func> <== NOT EXECUTED
if ( block_ptr ) {
ptr = *block_ptr;
*block_ptr = 0;
c3fc: 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;
c400: e5930000 ldr r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
c404: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
c408: ebffff3d bl c104 <memfile_free_block> <== NOT EXECUTED
}
return 1;
}
c40c: e3a00001 mov r0, #1 <== NOT EXECUTED
c410: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000c934 <IMFS_memfile_write>:
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
c934: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c938: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode,
off_t start,
const unsigned char *source,
unsigned int length
)
{
c93c: e1a08001 mov r8, r1
c940: e1a0a002 mov sl, r2
c944: e1a06003 mov r6, r3
c948: e59d5030 ldr r5, [sp, #48] ; 0x30
/*
* Perform internal consistency checks
*/
assert( the_jnode );
c94c: 059f0204 ldreq r0, [pc, #516] ; cb58 <IMFS_memfile_write+0x224>
c950: 059f1204 ldreq r1, [pc, #516] ; cb5c <IMFS_memfile_write+0x228>
c954: 059f2204 ldreq r2, [pc, #516] ; cb60 <IMFS_memfile_write+0x22c>
c958: 059f3204 ldreq r3, [pc, #516] ; cb64 <IMFS_memfile_write+0x230>
c95c: 0a000006 beq c97c <IMFS_memfile_write+0x48>
if ( !the_jnode )
rtems_set_errno_and_return_minus_one( EIO );
assert( the_jnode->type == IMFS_MEMORY_FILE );
c960: e594304c ldr r3, [r4, #76] ; 0x4c
c964: e3530005 cmp r3, #5
c968: 0a000004 beq c980 <IMFS_memfile_write+0x4c>
c96c: e59f01e4 ldr r0, [pc, #484] ; cb58 <IMFS_memfile_write+0x224><== NOT EXECUTED
c970: e59f11f0 ldr r1, [pc, #496] ; cb68 <IMFS_memfile_write+0x234><== NOT EXECUTED
c974: e59f21e4 ldr r2, [pc, #484] ; cb60 <IMFS_memfile_write+0x22c><== NOT EXECUTED
c978: e59f31ec ldr r3, [pc, #492] ; cb6c <IMFS_memfile_write+0x238><== NOT EXECUTED
c97c: ebfff60c bl a1b4 <__assert_func> <== NOT EXECUTED
/*
* Error check arguments
*/
assert( source );
c980: e3560000 cmp r6, #0
c984: 059f01cc ldreq r0, [pc, #460] ; cb58 <IMFS_memfile_write+0x224>
c988: 059f11e0 ldreq r1, [pc, #480] ; cb70 <IMFS_memfile_write+0x23c>
c98c: 059f21cc ldreq r2, [pc, #460] ; cb60 <IMFS_memfile_write+0x22c>
c990: 059f31dc ldreq r3, [pc, #476] ; cb74 <IMFS_memfile_write+0x240>
c994: 0afffff8 beq c97c <IMFS_memfile_write+0x48>
/*
* If there is nothing to write, then quick exit.
*/
my_length = length;
if ( !my_length )
c998: e3550000 cmp r5, #0
c99c: 1a000002 bne c9ac <IMFS_memfile_write+0x78>
rtems_set_errno_and_return_minus_one( EINVAL );
c9a0: eb00074f bl e6e4 <__errno> <== NOT EXECUTED
c9a4: e3a03016 mov r3, #22 <== NOT EXECUTED
c9a8: ea00000e b c9e8 <IMFS_memfile_write+0xb4> <== NOT EXECUTED
* 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 ) {
c9ac: e5943054 ldr r3, [r4, #84] ; 0x54
c9b0: e3530000 cmp r3, #0
c9b4: e0851001 add r1, r5, r1
c9b8: ba000003 blt c9cc <IMFS_memfile_write+0x98>
c9bc: 1a00000c bne c9f4 <IMFS_memfile_write+0xc0>
c9c0: e5943050 ldr r3, [r4, #80] ; 0x50
c9c4: e1530001 cmp r3, r1
c9c8: 2a000009 bcs c9f4 <IMFS_memfile_write+0xc0>
status = IMFS_memfile_extend( the_jnode, last_byte );
c9cc: e1a00004 mov r0, r4
c9d0: e3a02000 mov r2, #0
c9d4: ebffff40 bl c6dc <IMFS_memfile_extend>
if ( status )
c9d8: e3500000 cmp r0, #0
c9dc: 0a000004 beq c9f4 <IMFS_memfile_write+0xc0>
rtems_set_errno_and_return_minus_one( ENOSPC );
c9e0: eb00073f bl e6e4 <__errno> <== NOT EXECUTED
c9e4: e3a0301c mov r3, #28 <== NOT EXECUTED
c9e8: e5803000 str r3, [r0] <== NOT EXECUTED
c9ec: e3e07000 mvn r7, #0 <== NOT EXECUTED
c9f0: ea000056 b cb50 <IMFS_memfile_write+0x21c> <== NOT EXECUTED
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
c9f4: e59f317c ldr r3, [pc, #380] ; cb78 <IMFS_memfile_write+0x244>
c9f8: e5939000 ldr r9, [r3]
c9fc: e1a0b009 mov fp, r9
ca00: e1a0cfcb asr ip, fp, #31
ca04: e1a0300c mov r3, ip
ca08: e1a00008 mov r0, r8
ca0c: e1a0200b mov r2, fp
ca10: e1a0100a mov r1, sl
ca14: e58dc000 str ip, [sp]
ca18: eb003126 bl 18eb8 <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ca1c: e59dc000 ldr ip, [sp]
/*
* Phase 1: possibly the last part of one block
*/
start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
ca20: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
ca24: e1a0100a mov r1, sl
ca28: e1a00008 mov r0, r8
ca2c: e1a0200b mov r2, fp
ca30: e1a0300c mov r3, ip
ca34: eb002ff5 bl 18a10 <__divdi3>
if ( start_offset ) {
ca38: e3570000 cmp r7, #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;
ca3c: e1a08000 mov r8, r0
if ( start_offset ) {
ca40: 0a000013 beq ca94 <IMFS_memfile_write+0x160>
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 );
ca44: e1a01008 mov r1, r8
ca48: e1a00004 mov r0, r4
ca4c: e3a02000 mov r2, #0
ca50: ebfffdc0 bl c158 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
ca54: e3500000 cmp r0, #0
ca58: 059f00f8 ldreq r0, [pc, #248] ; cb58 <IMFS_memfile_write+0x224>
ca5c: 03a01fc7 moveq r1, #796 ; 0x31c
ca60: 0a00002c beq cb18 <IMFS_memfile_write+0x1e4>
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 );
ca64: 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;
ca68: e067a009 rsb sl, r7, r9
ca6c: e15a0005 cmp sl, r5
ca70: 21a0a005 movcs sl, r5
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 );
ca74: e0800007 add r0, r0, r7
ca78: e1a01006 mov r1, r6
ca7c: e1a0200a mov r2, sl
ca80: eb000925 bl ef1c <memcpy>
src += to_copy;
ca84: e086600a add r6, r6, sl
block++;
ca88: e2888001 add r8, r8, #1
my_length -= to_copy;
ca8c: e06a5005 rsb r5, sl, r5
copied += to_copy;
ca90: e1a0700a mov r7, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ca94: e59f30dc ldr r3, [pc, #220] ; cb78 <IMFS_memfile_write+0x244>
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
ca98: e1a09003 mov r9, r3
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
ca9c: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
caa0: ea00000f b cae4 <IMFS_memfile_write+0x1b0>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
caa4: e1a00004 mov r0, r4
caa8: e1a01008 mov r1, r8
caac: e3a02000 mov r2, #0
cab0: ebfffda8 bl c158 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cab4: e3500000 cmp r0, #0
cab8: 059f0098 ldreq r0, [pc, #152] ; cb58 <IMFS_memfile_write+0x224>
cabc: 03a01e33 moveq r1, #816 ; 0x330
cac0: 0a000014 beq cb18 <IMFS_memfile_write+0x1e4>
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 );
cac4: e1a01006 mov r1, r6
cac8: e5900000 ldr r0, [r0]
cacc: e1a0200a mov r2, sl
cad0: eb000911 bl ef1c <memcpy>
src += to_copy;
cad4: e086600a add r6, r6, sl
block++;
cad8: e2888001 add r8, r8, #1
my_length -= to_copy;
cadc: e06a5005 rsb r5, sl, r5
*
* 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(
cae0: e087700a add r7, r7, sl
/*
* Phase 2: all of zero of more blocks
*/
to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
cae4: e5993000 ldr r3, [r9]
cae8: e1550003 cmp r5, r3
caec: 2affffec bcs caa4 <IMFS_memfile_write+0x170>
*/
assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK );
to_copy = my_length;
if ( my_length ) {
caf0: e3550000 cmp r5, #0
caf4: 0a00000f beq cb38 <IMFS_memfile_write+0x204>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
caf8: e1a01008 mov r1, r8
cafc: e1a00004 mov r0, r4
cb00: e3a02000 mov r2, #0
cb04: ebfffd93 bl c158 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
cb08: e3500000 cmp r0, #0
cb0c: 1a000004 bne cb24 <IMFS_memfile_write+0x1f0>
cb10: e59f0040 ldr r0, [pc, #64] ; cb58 <IMFS_memfile_write+0x224><== NOT EXECUTED
cb14: e59f1060 ldr r1, [pc, #96] ; cb7c <IMFS_memfile_write+0x248><== NOT EXECUTED
cb18: e59f2040 ldr r2, [pc, #64] ; cb60 <IMFS_memfile_write+0x22c><== NOT EXECUTED
cb1c: e59f305c ldr r3, [pc, #92] ; cb80 <IMFS_memfile_write+0x24c><== NOT EXECUTED
cb20: eaffff95 b c97c <IMFS_memfile_write+0x48> <== NOT EXECUTED
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 );
cb24: e5900000 ldr r0, [r0]
cb28: e1a01006 mov r1, r6
cb2c: e1a02005 mov r2, r5
cb30: eb0008f9 bl ef1c <memcpy>
my_length = 0;
copied += to_copy;
cb34: e0877005 add r7, r7, r5
}
IMFS_mtime_ctime_update( the_jnode );
cb38: e28d0004 add r0, sp, #4
cb3c: e3a01000 mov r1, #0
cb40: ebffd50b bl 1f74 <gettimeofday>
cb44: e59d3004 ldr r3, [sp, #4]
cb48: e5843048 str r3, [r4, #72] ; 0x48
cb4c: e5843044 str r3, [r4, #68] ; 0x44
return copied;
}
cb50: e1a00007 mov r0, r7
cb54: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000016f0 <IMFS_mknod>:
const char *token, /* IN */
mode_t mode, /* IN */
dev_t dev, /* IN */
rtems_filesystem_location_info_t *pathloc /* IN/OUT */
)
{
16f0: e92d40f0 push {r4, r5, r6, r7, lr}
16f4: e24dd040 sub sp, sp, #64 ; 0x40
16f8: e1a04001 mov r4, r1
16fc: e1a07000 mov r7, r0
1700: e1a06002 mov r6, r2
1704: e1a05003 mov r5, r3
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 );
1708: eb0037fa bl f6f8 <strlen>
170c: e28d303c add r3, sp, #60 ; 0x3c
1710: e1a01000 mov r1, r0
1714: e28d2004 add r2, sp, #4
1718: e1a00007 mov r0, r7
171c: eb002209 bl 9f48 <IMFS_get_token>
/*
* Figure out what type of IMFS node this is.
*/
if ( S_ISDIR(mode) )
1720: e2043a0f and r3, r4, #61440 ; 0xf000
1724: e3530901 cmp r3, #16384 ; 0x4000
1728: 0a00000e beq 1768 <IMFS_mknod+0x78>
type = IMFS_DIRECTORY;
else if ( S_ISREG(mode) )
172c: e3530902 cmp r3, #32768 ; 0x8000
1730: 03a01005 moveq r1, #5
1734: 0a00000c beq 176c <IMFS_mknod+0x7c>
type = IMFS_MEMORY_FILE;
else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
1738: e3530a06 cmp r3, #24576 ; 0x6000
173c: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
1740: 058d6028 streq r6, [sp, #40] ; 0x28
1744: 058d502c streq r5, [sp, #44] ; 0x2c
1748: 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) ) {
174c: 0a000006 beq 176c <IMFS_mknod+0x7c>
type = IMFS_DEVICE;
rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
}
else if (S_ISFIFO(mode))
1750: e3530a01 cmp r3, #4096 ; 0x1000
1754: 03a01007 moveq r1, #7
1758: 0a000003 beq 176c <IMFS_mknod+0x7c>
type = IMFS_FIFO;
else {
rtems_set_errno_and_return_minus_one( EINVAL );
175c: eb0033e0 bl e6e4 <__errno> <== NOT EXECUTED
1760: e3a03016 mov r3, #22 <== NOT EXECUTED
1764: ea00000b b 1798 <IMFS_mknod+0xa8> <== NOT EXECUTED
1768: e3a01001 mov r1, #1
* 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(
176c: e28dc028 add ip, sp, #40 ; 0x28
1770: e59d0054 ldr r0, [sp, #84] ; 0x54
1774: e1a03004 mov r3, r4
1778: e28d2004 add r2, sp, #4
177c: e58dc000 str ip, [sp]
1780: eb001eb1 bl 924c <IMFS_create_node>
new_name,
mode,
&info
);
if ( !new_node )
1784: e3500000 cmp r0, #0
1788: 13a00000 movne r0, #0
178c: 1a000003 bne 17a0 <IMFS_mknod+0xb0>
rtems_set_errno_and_return_minus_one( ENOMEM );
1790: eb0033d3 bl e6e4 <__errno> <== NOT EXECUTED
1794: e3a0300c mov r3, #12 <== NOT EXECUTED
1798: e5803000 str r3, [r0] <== NOT EXECUTED
179c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return 0;
}
17a0: e28dd040 add sp, sp, #64 ; 0x40
17a4: e8bd80f0 pop {r4, r5, r6, r7, pc}
000017a8 <IMFS_mount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
17a8: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
17ac: e593204c ldr r2, [r3, #76] ; 0x4c
17b0: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_mount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
17b4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
17b8: 0a000004 beq 17d0 <IMFS_mount+0x28>
rtems_set_errno_and_return_minus_one( ENOTDIR );
17bc: eb0033c8 bl e6e4 <__errno> <== NOT EXECUTED
17c0: e3a03014 mov r3, #20 <== NOT EXECUTED
17c4: e5803000 str r3, [r0] <== NOT EXECUTED
17c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
17cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* Set mt_fs pointer to point to the mount table entry for
* the mounted file system.
*/
node->info.directory.mt_fs = mt_entry;
17d0: e583005c str r0, [r3, #92] ; 0x5c
17d4: e3a00000 mov r0, #0
return 0;
}
17d8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00003cc0 <IMFS_print_jnode>:
*/
void IMFS_print_jnode(
IMFS_jnode_t *the_jnode
)
{
3cc0: e92d4030 push {r4, r5, lr}
assert( the_jnode );
3cc4: e2504000 subs r4, r0, #0
3cc8: 059f0130 ldreq r0, [pc, #304] ; 3e00 <IMFS_print_jnode+0x140>
3ccc: 03a01038 moveq r1, #56 ; 0x38
3cd0: 059f212c ldreq r2, [pc, #300] ; 3e04 <IMFS_print_jnode+0x144>
3cd4: 059f312c ldreq r3, [pc, #300] ; 3e08 <IMFS_print_jnode+0x148>
3cd8: 0a00002f beq 3d9c <IMFS_print_jnode+0xdc>
fprintf(stdout, "%s", the_jnode->name );
3cdc: e59f5128 ldr r5, [pc, #296] ; 3e0c <IMFS_print_jnode+0x14c>
3ce0: e5953000 ldr r3, [r5]
3ce4: e284000c add r0, r4, #12
3ce8: e5931008 ldr r1, [r3, #8]
3cec: eb003c0d bl 12d28 <fputs>
switch( the_jnode->type ) {
3cf0: e594204c ldr r2, [r4, #76] ; 0x4c
3cf4: e2423001 sub r3, r2, #1
3cf8: e3530006 cmp r3, #6
3cfc: 979ff103 ldrls pc, [pc, r3, lsl #2]
3d00: ea000034 b 3dd8 <IMFS_print_jnode+0x118> <== NOT EXECUTED
3d04: 00003d20 .word 0x00003d20 <== NOT EXECUTED
3d08: 00003d34 .word 0x00003d34 <== NOT EXECUTED
3d0c: 00003d7c .word 0x00003d7c <== NOT EXECUTED
3d10: 00003da0 .word 0x00003da0 <== NOT EXECUTED
3d14: 00003d64 .word 0x00003d64 <== NOT EXECUTED
3d18: 00003d48 .word 0x00003d48 <== NOT EXECUTED
3d1c: 00003dbc .word 0x00003dbc <== NOT EXECUTED
case IMFS_DIRECTORY:
fprintf(stdout, "/" );
3d20: e5953000 ldr r3, [r5]
3d24: e3a0002f mov r0, #47 ; 0x2f
3d28: e5931008 ldr r1, [r3, #8]
3d2c: eb003bb8 bl 12c14 <fputc>
break;
3d30: ea00002f b 3df4 <IMFS_print_jnode+0x134>
case IMFS_DEVICE:
fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
3d34: e5952000 ldr r2, [r5]
3d38: e5943054 ldr r3, [r4, #84] ; 0x54
3d3c: e5920008 ldr r0, [r2, #8]
3d40: e59f10c8 ldr r1, [pc, #200] ; 3e10 <IMFS_print_jnode+0x150>
3d44: ea000003 b 3d58 <IMFS_print_jnode+0x98>
the_jnode->info.device.major, the_jnode->info.device.minor );
break;
case IMFS_LINEAR_FILE:
fprintf(stdout, " (file %" PRId32 " %p)",
3d48: e5952000 ldr r2, [r5] <== NOT EXECUTED
3d4c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
3d50: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED
3d54: e59f10b8 ldr r1, [pc, #184] ; 3e14 <IMFS_print_jnode+0x154><== NOT EXECUTED
3d58: e5942050 ldr r2, [r4, #80] ; 0x50
3d5c: eb003b90 bl 12ba4 <fprintf>
(uint32_t)the_jnode->info.linearfile.size,
the_jnode->info.linearfile.direct
);
break;
3d60: ea000023 b 3df4 <IMFS_print_jnode+0x134>
the_jnode->info.file.indirect,
the_jnode->info.file.doubly_indirect,
the_jnode->info.file.triply_indirect
);
#else
fprintf(stdout, " (file %" PRId32 ")",
3d64: e5953000 ldr r3, [r5]
3d68: e5942050 ldr r2, [r4, #80] ; 0x50
3d6c: e5930008 ldr r0, [r3, #8]
3d70: e59f10a0 ldr r1, [pc, #160] ; 3e18 <IMFS_print_jnode+0x158>
3d74: eb003b8a bl 12ba4 <fprintf>
(uint32_t)the_jnode->info.file.size );
#endif
break;
3d78: ea00001d b 3df4 <IMFS_print_jnode+0x134>
case IMFS_HARD_LINK:
fprintf(stdout, " links not printed\n" );
3d7c: e5953000 ldr r3, [r5] <== NOT EXECUTED
3d80: e59f0094 ldr r0, [pc, #148] ; 3e1c <IMFS_print_jnode+0x15c><== NOT EXECUTED
3d84: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
3d88: eb003be6 bl 12d28 <fputs> <== NOT EXECUTED
assert(0);
3d8c: e59f006c ldr r0, [pc, #108] ; 3e00 <IMFS_print_jnode+0x140><== NOT EXECUTED
3d90: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED
3d94: e59f2068 ldr r2, [pc, #104] ; 3e04 <IMFS_print_jnode+0x144><== NOT EXECUTED
3d98: e59f3080 ldr r3, [pc, #128] ; 3e20 <IMFS_print_jnode+0x160><== NOT EXECUTED
3d9c: eb000249 bl 46c8 <__assert_func> <== NOT EXECUTED
break;
case IMFS_SYM_LINK:
fprintf(stdout, " links not printed\n" );
3da0: e5953000 ldr r3, [r5] <== NOT EXECUTED
3da4: e59f0070 ldr r0, [pc, #112] ; 3e1c <IMFS_print_jnode+0x15c><== NOT EXECUTED
3da8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
3dac: eb003bdd bl 12d28 <fputs> <== NOT EXECUTED
assert(0);
3db0: e59f0048 ldr r0, [pc, #72] ; 3e00 <IMFS_print_jnode+0x140> <== NOT EXECUTED
3db4: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED
3db8: eafffff5 b 3d94 <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break;
case IMFS_FIFO:
fprintf(stdout, " FIFO not printed\n" );
3dbc: e5953000 ldr r3, [r5] <== NOT EXECUTED
3dc0: e59f005c ldr r0, [pc, #92] ; 3e24 <IMFS_print_jnode+0x164> <== NOT EXECUTED
3dc4: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED
3dc8: eb003bd6 bl 12d28 <fputs> <== NOT EXECUTED
assert(0);
3dcc: e59f002c ldr r0, [pc, #44] ; 3e00 <IMFS_print_jnode+0x140> <== NOT EXECUTED
3dd0: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED
3dd4: eaffffee b 3d94 <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break;
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
3dd8: e5953000 ldr r3, [r5] <== NOT EXECUTED
3ddc: e59f1044 ldr r1, [pc, #68] ; 3e28 <IMFS_print_jnode+0x168> <== NOT EXECUTED
3de0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
3de4: eb003b6e bl 12ba4 <fprintf> <== NOT EXECUTED
assert(0);
3de8: e59f0010 ldr r0, [pc, #16] ; 3e00 <IMFS_print_jnode+0x140> <== NOT EXECUTED
3dec: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED
3df0: eaffffe7 b 3d94 <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break;
}
puts("");
3df4: e59f0030 ldr r0, [pc, #48] ; 3e2c <IMFS_print_jnode+0x16c>
}
3df8: e8bd4030 pop {r4, r5, lr}
default:
fprintf(stdout, " bad type %d\n", the_jnode->type );
assert(0);
break;
}
puts("");
3dfc: ea004297 b 14860 <puts>
000017e8 <IMFS_readlink>:
)
{
IMFS_jnode_t *node;
int i;
node = loc->node_access;
17e8: e5903000 ldr r3, [r0]
if ( node->type != IMFS_SYM_LINK )
17ec: e593004c ldr r0, [r3, #76] ; 0x4c
17f0: e3500004 cmp r0, #4
int IMFS_readlink(
rtems_filesystem_location_info_t *loc,
char *buf, /* OUT */
size_t bufsize
)
{
17f4: e52de004 push {lr} ; (str lr, [sp, #-4]!)
IMFS_jnode_t *node;
int i;
node = loc->node_access;
if ( node->type != IMFS_SYM_LINK )
17f8: 03a00000 moveq r0, #0
17fc: 0a000006 beq 181c <IMFS_readlink+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
1800: eb0033b7 bl e6e4 <__errno> <== NOT EXECUTED
1804: e3a03016 mov r3, #22 <== NOT EXECUTED
1808: e5803000 str r3, [r0] <== NOT EXECUTED
180c: e3e00000 mvn r0, #0 <== NOT EXECUTED
1810: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
for( i=0; ((i<bufsize) && (node->info.sym_link.name[i] != '\0')); i++ )
buf[i] = node->info.sym_link.name[i];
1814: e7c1c000 strb ip, [r1, r0]
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++ )
1818: e2800001 add r0, r0, #1
181c: e1500002 cmp r0, r2
1820: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4)
1824: e593c050 ldr ip, [r3, #80] ; 0x50
1828: e7dcc000 ldrb ip, [ip, r0]
182c: e35c0000 cmp ip, #0
1830: 1afffff7 bne 1814 <IMFS_readlink+0x2c>
buf[i] = node->info.sym_link.name[i];
return i;
}
1834: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000a0c4 <IMFS_stat>:
{
IMFS_fs_info_t *fs_info;
IMFS_jnode_t *the_jnode;
IMFS_device_t *io;
the_jnode = loc->node_access;
a0c4: e5903000 ldr r3, [r0]
switch ( the_jnode->type ) {
a0c8: e593204c ldr r2, [r3, #76] ; 0x4c
a0cc: e2422002 sub r2, r2, #2
int IMFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
a0d0: e92d4810 push {r4, fp, lr}
IMFS_device_t *io;
the_jnode = loc->node_access;
switch ( the_jnode->type ) {
a0d4: e3520005 cmp r2, #5
a0d8: 979ff102 ldrls pc, [pc, r2, lsl #2]
a0dc: ea000012 b a12c <IMFS_stat+0x68> <== NOT EXECUTED
a0e0: 0000a0f8 .word 0x0000a0f8 <== NOT EXECUTED
a0e4: 0000a12c .word 0x0000a12c <== NOT EXECUTED
a0e8: 0000a118 .word 0x0000a118 <== NOT EXECUTED
a0ec: 0000a10c .word 0x0000a10c <== NOT EXECUTED
a0f0: 0000a10c .word 0x0000a10c <== NOT EXECUTED
a0f4: 0000a118 .word 0x0000a118 <== NOT EXECUTED
case IMFS_DEVICE:
io = &the_jnode->info.device;
buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
a0f8: e2832050 add r2, r3, #80 ; 0x50
a0fc: e8921004 ldm r2, {r2, ip}
a100: e581c01c str ip, [r1, #28]
a104: e5812018 str r2, [r1, #24]
break;
a108: ea00000c b a140 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE:
case IMFS_MEMORY_FILE:
buf->st_size = the_jnode->info.file.size;
a10c: e283c050 add ip, r3, #80 ; 0x50
a110: e89c1800 ldm ip, {fp, ip}
a114: ea000001 b a120 <IMFS_stat+0x5c>
case IMFS_SYM_LINK:
buf->st_size = 0;
break;
case IMFS_FIFO:
buf->st_size = 0;
a118: e3a0b000 mov fp, #0 <== NOT EXECUTED
a11c: e3a0c000 mov ip, #0 <== NOT EXECUTED
a120: e581b020 str fp, [r1, #32]
a124: e581c024 str ip, [r1, #36] ; 0x24
break;
a128: ea000004 b a140 <IMFS_stat+0x7c>
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
a12c: eb00116c bl e6e4 <__errno> <== NOT EXECUTED
a130: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
a134: e5803000 str r3, [r0] <== NOT EXECUTED
a138: e3e00000 mvn r0, #0 <== NOT EXECUTED
a13c: e8bd8810 pop {r4, fp, pc} <== 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;
a140: e5932030 ldr r2, [r3, #48] ; 0x30
a144: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink;
buf->st_ino = the_jnode->st_ino;
a148: e5932038 ldr r2, [r3, #56] ; 0x38
a14c: 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;
a150: e5932040 ldr r2, [r3, #64] ; 0x40
a154: 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 );
a158: e5902010 ldr r2, [r0, #16]
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;
a15c: e5930044 ldr r0, [r3, #68] ; 0x44
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;
a160: e1d343b4 ldrh r4, [r3, #52] ; 0x34
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;
a164: e5810030 str r0, [r1, #48] ; 0x30
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;
a168: e1c141b0 strh r4, [r1, #16]
* 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 );
a16c: e5920034 ldr r0, [r2, #52] ; 0x34
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;
buf->st_ctime = the_jnode->stat_ctime;
a170: e5932048 ldr r2, [r3, #72] ; 0x48
buf->st_blksize = imfs_rq_memfile_bytes_per_block;
a174: e59fc030 ldr ip, [pc, #48] ; a1ac <IMFS_stat+0xe8>
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;
buf->st_ctime = the_jnode->stat_ctime;
a178: e5812038 str r2, [r1, #56] ; 0x38
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;
a17c: e1d323bc ldrh r2, [r3, #60] ; 0x3c
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;
a180: e59cc000 ldr ip, [ip]
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;
a184: e1c121b2 strh r2, [r1, #18]
* 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 );
a188: e5900000 ldr r0, [r0]
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;
a18c: e581c040 str ip, [r1, #64] ; 0x40
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;
a190: e1d333be ldrh r3, [r3, #62] ; 0x3e
/*
* 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 =
a194: e59fc014 ldr ip, [pc, #20] ; a1b0 <IMFS_stat+0xec>
a198: e5810004 str r0, [r1, #4]
a19c: e581c000 str ip, [r1]
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;
a1a0: 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;
a1a4: e3a00000 mov r0, #0
return 0;
}
a1a8: e8bd8810 pop {r4, fp, pc}
00001894 <IMFS_symlink>:
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
1894: e92d40f0 push {r4, r5, r6, r7, lr}
1898: e1a05000 mov r5, r0
189c: 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 );
18a0: e1a00002 mov r0, r2
int IMFS_symlink(
rtems_filesystem_location_info_t *parent_loc,
const char *link_name,
const char *node_name
)
{
18a4: e1a07002 mov r7, r2
18a8: e1a06001 mov r6, r1
int i;
/*
* Remove any separators at the end of the string.
*/
IMFS_get_token( node_name, strlen( node_name ), new_name, &i );
18ac: eb003791 bl f6f8 <strlen>
18b0: e28d4004 add r4, sp, #4
18b4: e1a01000 mov r1, r0
18b8: e1a02004 mov r2, r4
18bc: e28d303c add r3, sp, #60 ; 0x3c
18c0: e1a00007 mov r0, r7
18c4: eb00219f bl 9f48 <IMFS_get_token>
/*
* Duplicate link name
*/
info.sym_link.name = strdup(link_name);
18c8: e1a00006 mov r0, r6
18cc: eb003775 bl f6a8 <strdup>
if (info.sym_link.name == NULL) {
18d0: 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);
18d4: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) {
18d8: 0a00000b beq 190c <IMFS_symlink+0x78>
* 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(
18dc: e28dc028 add ip, sp, #40 ; 0x28
18e0: e1a00005 mov r0, r5
18e4: e1a02004 mov r2, r4
18e8: e3a01004 mov r1, #4
18ec: e59f3030 ldr r3, [pc, #48] ; 1924 <IMFS_symlink+0x90>
18f0: e58dc000 str ip, [sp]
18f4: eb001e54 bl 924c <IMFS_create_node>
new_name,
( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )),
&info
);
if (new_node == NULL) {
18f8: e3500000 cmp r0, #0
18fc: 13a00000 movne r0, #0
1900: 1a000005 bne 191c <IMFS_symlink+0x88>
free(info.sym_link.name);
1904: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
1908: eb000170 bl 1ed0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
190c: eb003374 bl e6e4 <__errno> <== NOT EXECUTED
1910: e3a0300c mov r3, #12 <== NOT EXECUTED
1914: e5803000 str r3, [r0] <== NOT EXECUTED
1918: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
return 0;
}
191c: e28dd040 add sp, sp, #64 ; 0x40
1920: e8bd80f0 pop {r4, r5, r6, r7, pc}
00001928 <IMFS_unlink>:
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
1928: 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;
192c: e5915000 ldr r5, [r1]
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1930: e595304c ldr r3, [r5, #76] ; 0x4c
1934: e3530003 cmp r3, #3
int IMFS_unlink(
rtems_filesystem_location_info_t *parentloc, /* IN */
rtems_filesystem_location_info_t *loc /* IN */
)
{
1938: e24dd01c sub sp, sp, #28
193c: e1a04001 mov r4, r1
1940: e1a06000 mov r6, r0
/*
* If this is the last last pointer to the node
* free the node.
*/
if ( node->type == IMFS_HARD_LINK ) {
1944: 1a000025 bne 19e0 <IMFS_unlink+0xb8>
if ( !node->info.hard_link.link_node )
1948: e595e050 ldr lr, [r5, #80] ; 0x50
194c: e35e0000 cmp lr, #0
1950: 1a000003 bne 1964 <IMFS_unlink+0x3c>
rtems_set_errno_and_return_minus_one( EINVAL );
1954: eb003362 bl e6e4 <__errno> <== NOT EXECUTED
1958: e3a03016 mov r3, #22 <== NOT EXECUTED
195c: e5803000 str r3, [r0] <== NOT EXECUTED
1960: ea000014 b 19b8 <IMFS_unlink+0x90> <== NOT EXECUTED
the_link = *loc;
1964: e1a07001 mov r7, r1
1968: e8b7000f ldm r7!, {r0, r1, r2, r3}
196c: e1a0c00d mov ip, sp
1970: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
1974: e28d801c add r8, sp, #28
1978: 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;
197c: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1980: 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;
1984: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node;
IMFS_Set_handlers( &the_link );
1988: eb001e7e bl 9388 <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)
198c: e5953050 ldr r3, [r5, #80] ; 0x50
1990: e1d323b4 ldrh r2, [r3, #52] ; 0x34
1994: e3520001 cmp r2, #1
1998: 1a000008 bne 19c0 <IMFS_unlink+0x98>
{
result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
199c: e1a0100d mov r1, sp
19a0: e1a00006 mov r0, r6
19a4: e59d3008 ldr r3, [sp, #8]
19a8: e1a0e00f mov lr, pc
19ac: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
19b0: e3500000 cmp r0, #0
19b4: 0a000009 beq 19e0 <IMFS_unlink+0xb8>
19b8: e3e00000 mvn r0, #0
19bc: ea00000c b 19f4 <IMFS_unlink+0xcc>
return -1;
}
else
{
node->info.hard_link.link_node->st_nlink --;
19c0: e2422001 sub r2, r2, #1
19c4: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
19c8: e28d0014 add r0, sp, #20
19cc: e3a01000 mov r1, #0
19d0: eb000167 bl 1f74 <gettimeofday>
19d4: e5953050 ldr r3, [r5, #80] ; 0x50
19d8: e59d2014 ldr r2, [sp, #20]
19dc: e5832048 str r2, [r3, #72] ; 0x48
/*
* Now actually free the node we were asked to free.
*/
result = (*loc->handlers->rmnod_h)( parentloc, loc );
19e0: e1a00006 mov r0, r6
19e4: e1a01004 mov r1, r4
19e8: e5943008 ldr r3, [r4, #8]
19ec: e1a0e00f mov lr, pc
19f0: e593f034 ldr pc, [r3, #52] ; 0x34
return result;
}
19f4: e28dd01c add sp, sp, #28
19f8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000019fc <IMFS_unmount>:
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
IMFS_jnode_t *node;
node = mt_entry->mt_point_node.node_access;
19fc: e5903008 ldr r3, [r0, #8]
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1a00: e593204c ldr r2, [r3, #76] ; 0x4c
1a04: e3520001 cmp r2, #1
#include <rtems/seterr.h>
int IMFS_unmount(
rtems_filesystem_mount_table_entry_t *mt_entry
)
{
1a08: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/*
* Is the node that we are mounting onto a directory node ?
*/
if ( node->type != IMFS_DIRECTORY )
1a0c: 0a000002 beq 1a1c <IMFS_unmount+0x20>
rtems_set_errno_and_return_minus_one( ENOTDIR );
1a10: eb003333 bl e6e4 <__errno> <== NOT EXECUTED
1a14: e3a03014 mov r3, #20 <== NOT EXECUTED
1a18: ea000004 b 1a30 <IMFS_unmount+0x34> <== NOT EXECUTED
/*
* Did the node indicate that there was a directory mounted here?
*/
if ( node->info.directory.mt_fs == NULL )
1a1c: e593205c ldr r2, [r3, #92] ; 0x5c
1a20: e3520000 cmp r2, #0
1a24: 1a000004 bne 1a3c <IMFS_unmount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
1a28: eb00332d bl e6e4 <__errno> <== NOT EXECUTED
1a2c: e3a03016 mov r3, #22 <== NOT EXECUTED
1a30: e5803000 str r3, [r0] <== NOT EXECUTED
1a34: e3e00000 mvn r0, #0 <== NOT EXECUTED
1a38: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
/*
* 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;
1a3c: e3a00000 mov r0, #0
1a40: e583005c str r0, [r3, #92] ; 0x5c
return 0;
}
1a44: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00002118 <RTEMS_Malloc_Initialize>:
#endif
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
2118: e59f30c8 ldr r3, [pc, #200] ; 21e8 <RTEMS_Malloc_Initialize+0xd0>
211c: e5933000 ldr r3, [r3]
2120: e3530000 cmp r3, #0
void RTEMS_Malloc_Initialize(
void *heap_begin,
uintptr_t heap_size,
size_t sbrk_amount
)
{
2124: e92d4070 push {r4, r5, r6, lr}
2128: e1a04000 mov r4, r0
212c: e1a05001 mov r5, r1
2130: e1a06002 mov r6, r2
/*
* If configured, initialize the statistics support
*/
if ( rtems_malloc_statistics_helpers != NULL ) {
(*rtems_malloc_statistics_helpers->initialize)();
2134: 11a0e00f movne lr, pc
2138: 1593f000 ldrne pc, [r3]
}
/*
* Initialize the garbage collection list to start with nothing on it.
*/
malloc_deferred_frees_initialize();
213c: ebffffe1 bl 20c8 <malloc_deferred_frees_initialize>
/*
* Initialize the optional sbrk support for extending the heap
*/
if ( rtems_malloc_sbrk_helpers != NULL ) {
2140: e59f30a4 ldr r3, [pc, #164] ; 21ec <RTEMS_Malloc_Initialize+0xd4>
2144: e5933000 ldr r3, [r3]
2148: e3530000 cmp r3, #0
214c: 0a000006 beq 216c <RTEMS_Malloc_Initialize+0x54>
void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
2150: e1a00004 mov r0, r4 <== NOT EXECUTED
2154: e1a01006 mov r1, r6 <== NOT EXECUTED
2158: e1a0e00f mov lr, pc <== NOT EXECUTED
215c: e593f000 ldr pc, [r3] <== NOT EXECUTED
heap_begin,
sbrk_amount
);
heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
2160: e0845005 add r5, r4, r5 <== NOT EXECUTED
2164: e0605005 rsb r5, r0, r5 <== NOT EXECUTED
2168: e1a04000 mov r4, 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 (
216c: e59f307c ldr r3, [pc, #124] ; 21f0 <RTEMS_Malloc_Initialize+0xd8>
2170: e5d31000 ldrb r1, [r3]
2174: e3510000 cmp r1, #0
2178: 1a000005 bne 2194 <RTEMS_Malloc_Initialize+0x7c>
!rtems_unified_work_area
&& rtems_configuration_get_do_zero_of_workspace()
217c: e59f3070 ldr r3, [pc, #112] ; 21f4 <RTEMS_Malloc_Initialize+0xdc>
2180: e5d33028 ldrb r3, [r3, #40] ; 0x28
2184: e3530000 cmp r3, #0
) {
memset( heap_begin, 0, heap_size );
2188: 11a00004 movne r0, r4
218c: 11a02005 movne r2, r5
2190: 1b00339d blne f00c <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 ) {
2194: e59f3054 ldr r3, [pc, #84] ; 21f0 <RTEMS_Malloc_Initialize+0xd8>
2198: e5d33000 ldrb r3, [r3]
219c: e3530000 cmp r3, #0
21a0: 1a000008 bne 21c8 <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 );
21a4: e59f304c ldr r3, [pc, #76] ; 21f8 <RTEMS_Malloc_Initialize+0xe0>
21a8: e1a01004 mov r1, r4
21ac: e5930000 ldr r0, [r3]
21b0: e1a02005 mov r2, r5
21b4: e3a03004 mov r3, #4
21b8: eb000f84 bl 5fd0 <_Heap_Initialize>
RTEMS_Malloc_Heap,
heap_begin,
heap_size,
CPU_HEAP_ALIGNMENT
);
if ( status == 0 ) {
21bc: e3500000 cmp r0, #0
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
21c0: 0280001a addeq r0, r0, #26
21c4: 0b000d78 bleq 57ac <rtems_fatal_error_occurred>
}
}
MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
21c8: e59f3028 ldr r3, [pc, #40] ; 21f8 <RTEMS_Malloc_Initialize+0xe0>
21cc: e59f4028 ldr r4, [pc, #40] ; 21fc <RTEMS_Malloc_Initialize+0xe4>
21d0: e5930000 ldr r0, [r3]
21d4: e5945000 ldr r5, [r4]
21d8: eb00125d bl 6b54 <_Protected_heap_Get_size>
21dc: e0800005 add r0, r0, r5
21e0: e5840000 str r0, [r4]
printk( "\n" );
rtems_print_buffer( (heap_begin + heap_size) - 48, 48 );
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
}
#endif
}
21e4: e8bd8070 pop {r4, r5, r6, pc}
00005bfc <Stack_check_Dump_threads_usage>:
static rtems_printk_plugin_t print_handler;
void Stack_check_Dump_threads_usage(
Thread_Control *the_thread
)
{
5bfc: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}<== NOT EXECUTED
void *high_water_mark;
void *current;
Stack_Control *stack;
char name[5];
if ( !the_thread )
5c00: e250a000 subs sl, r0, #0 <== NOT EXECUTED
5c04: 0a000043 beq 5d18 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
return;
if ( !print_handler )
5c08: e59f310c ldr r3, [pc, #268] ; 5d1c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED
5c0c: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED
5c10: e3570000 cmp r7, #0 <== NOT EXECUTED
5c14: 0a00003f beq 5d18 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
5c18: e37a0001 cmn sl, #1 <== NOT EXECUTED
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
5c1c: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED
current = 0;
}
else
return;
} else {
stack = &the_thread->Start.Initial_stack;
5c20: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED
/*
* Obtain interrupt stack information
*/
if (the_thread == (Thread_Control *) -1) {
5c24: 1a000005 bne 5c40 <Stack_check_Dump_threads_usage+0x44> <== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
5c28: e59f40f0 ldr r4, [pc, #240] ; 5d20 <Stack_check_Dump_threads_usage+0x124><== NOT EXECUTED
5c2c: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
5c30: e3530000 cmp r3, #0 <== NOT EXECUTED
5c34: 13a06000 movne r6, #0 <== NOT EXECUTED
5c38: 11a0a006 movne sl, r6 <== NOT EXECUTED
5c3c: 0a000035 beq 5d18 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
} else {
stack = &the_thread->Start.Initial_stack;
current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
}
low = Stack_check_usable_stack_start(stack);
5c40: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED
5c44: e2899010 add r9, r9, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
5c48: e2455010 sub r5, r5, #16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
5c4c: e1a00009 mov r0, r9 <== NOT EXECUTED
5c50: e1a01005 mov r1, r5 <== NOT EXECUTED
5c54: ebffffda bl 5bc4 <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
5c58: e2508000 subs r8, r0, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
5c5c: 10899005 addne r9, r9, r5 <== NOT EXECUTED
5c60: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED
else
used = 0;
if ( the_thread ) {
5c64: e35a0000 cmp sl, #0 <== NOT EXECUTED
5c68: e59f30ac ldr r3, [pc, #172] ; 5d1c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED
5c6c: 0a00000c beq 5ca4 <Stack_check_Dump_threads_usage+0xa8> <== NOT EXECUTED
(*print_handler)(
5c70: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED
5c74: e28d2008 add r2, sp, #8 <== NOT EXECUTED
5c78: e1a0000a mov r0, sl <== NOT EXECUTED
5c7c: e3a01005 mov r1, #5 <== NOT EXECUTED
5c80: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED
5c84: eb001663 bl b618 <rtems_object_get_name> <== NOT EXECUTED
5c88: e1a0200a mov r2, sl <== NOT EXECUTED
5c8c: e1a03000 mov r3, r0 <== NOT EXECUTED
5c90: e59f108c ldr r1, [pc, #140] ; 5d24 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED
5c94: e1a00009 mov r0, r9 <== NOT EXECUTED
5c98: e1a0e00f mov lr, pc <== NOT EXECUTED
5c9c: e12fff17 bx r7 <== NOT EXECUTED
5ca0: ea000004 b 5cb8 <Stack_check_Dump_threads_usage+0xbc> <== 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 );
5ca4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
5ca8: e59f1078 ldr r1, [pc, #120] ; 5d28 <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED
5cac: e3e02000 mvn r2, #0 <== NOT EXECUTED
5cb0: e1a0e00f mov lr, pc <== NOT EXECUTED
5cb4: e12fff17 bx r7 <== NOT EXECUTED
}
(*print_handler)(
5cb8: e5943000 ldr r3, [r4] <== NOT EXECUTED
5cbc: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
5cc0: e59f4054 ldr r4, [pc, #84] ; 5d1c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED
5cc4: e58d6000 str r6, [sp] <== NOT EXECUTED
5cc8: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
5ccc: e2433001 sub r3, r3, #1 <== NOT EXECUTED
5cd0: e0823003 add r3, r2, r3 <== NOT EXECUTED
5cd4: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
5cd8: e59f104c ldr r1, [pc, #76] ; 5d2c <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED
5cdc: e1a0e00f mov lr, pc <== NOT EXECUTED
5ce0: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
stack->area + stack->size - 1,
current,
size
);
if (Stack_check_Initialized == 0) {
5ce4: e5943000 ldr r3, [r4] <== NOT EXECUTED
5ce8: e3530000 cmp r3, #0 <== NOT EXECUTED
5cec: 1a000004 bne 5d04 <Stack_check_Dump_threads_usage+0x108> <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
5cf0: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
5cf4: e59f1034 ldr r1, [pc, #52] ; 5d30 <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED
5cf8: e1a0e00f mov lr, pc <== NOT EXECUTED
5cfc: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
5d00: ea000004 b 5d18 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
} else {
(*print_handler)( print_context, "%8" PRId32 "\n", used );
5d04: e1a02008 mov r2, r8 <== NOT EXECUTED
5d08: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
5d0c: e59f1020 ldr r1, [pc, #32] ; 5d34 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED
5d10: e1a0e00f mov lr, pc <== NOT EXECUTED
5d14: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
}
}
5d18: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED
00005bc4 <Stack_check_find_high_water_mark>:
/*
* start at lower memory and find first word that does not
* match pattern
*/
base += PATTERN_SIZE_WORDS;
5bc4: e2800010 add r0, r0, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
5bc8: e3c11003 bic r1, r1, #3 <== NOT EXECUTED
5bcc: e0801001 add r1, r0, r1 <== NOT EXECUTED
if (*base != U32_PATTERN)
5bd0: e59f3020 ldr r3, [pc, #32] ; 5bf8 <Stack_check_find_high_water_mark+0x34><== 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++)
5bd4: ea000003 b 5be8 <Stack_check_find_high_water_mark+0x24> <== NOT EXECUTED
if (*base != U32_PATTERN)
5bd8: e5902000 ldr r2, [r0] <== NOT EXECUTED
5bdc: e1520003 cmp r2, r3 <== NOT EXECUTED
5be0: 112fff1e bxne lr <== 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++)
5be4: e2800004 add r0, r0, #4 <== NOT EXECUTED
5be8: e1500001 cmp r0, r1 <== NOT EXECUTED
5bec: 3afffff9 bcc 5bd8 <Stack_check_find_high_water_mark+0x14> <== NOT EXECUTED
5bf0: e3a00000 mov r0, #0 <== NOT EXECUTED
if (*base != U32_PATTERN)
return (void *) base;
#endif
return (void *)0;
}
5bf4: e12fff1e bx lr <== NOT EXECUTED
0003da28 <T.57>:
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3da28: 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;
3da2c: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3da30: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
3da34: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
rtems_rfs_bitmap_element* map_bits;
int map_index;
int map_offset;
int rc;
*found = false;
3da38: e5c26000 strb r6, [r2] <== NOT EXECUTED
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
3da3c: e28d1018 add r1, sp, #24 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3da40: e58d200c str r2, [sp, #12] <== NOT EXECUTED
3da44: e1a04003 mov r4, r3 <== NOT EXECUTED
3da48: e1a05000 mov r5, r0 <== NOT EXECUTED
*found = false;
/*
* Load the bitmap.
*/
rc = rtems_rfs_bitmap_load_map (control, &map);
3da4c: ebffff07 bl 3d670 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
3da50: e3500000 cmp r0, #0 <== NOT EXECUTED
3da54: ca000075 bgt 3dc30 <T.57+0x208> <== NOT EXECUTED
return rc;
/*
* Calculate the bit we are testing plus the end point we search over.
*/
test_bit = *bit;
3da58: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
3da5c: e5903000 ldr r3, [r0] <== NOT EXECUTED
end_bit = test_bit + (window * direction);
if (end_bit < 0)
3da60: e093c584 adds ip, r3, r4, lsl #11 <== NOT EXECUTED
3da64: 41a0c006 movmi ip, r6 <== NOT EXECUTED
3da68: 4a000002 bmi 3da78 <T.57+0x50> <== NOT EXECUTED
end_bit = 0;
else if (end_bit >= control->size)
3da6c: e595200c ldr r2, [r5, #12] <== NOT EXECUTED
3da70: e15c0002 cmp ip, r2 <== NOT EXECUTED
end_bit = control->size - 1;
3da74: 2242c001 subcs ip, r2, #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];
3da78: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED
map_bits = &map[map_index];
3da7c: e59d7018 ldr r7, [sp, #24] <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
3da80: e1a09104 lsl r9, r4, #2 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3da84: e1a0b284 lsl fp, r4, #5 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
3da88: e1a00fa4 lsr r0, 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);
3da8c: e1a062c3 asr r6, r3, #5 <== NOT EXECUTED
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];
3da90: e1a08543 asr r8, r3, #10 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
3da94: e58d9004 str r9, [sp, #4] <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3da98: e58db014 str fp, [sp, #20] <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
3da9c: e58d0010 str r0, [sp, #16] <== 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];
3daa0: e0828108 add r8, r2, r8, lsl #2 <== NOT EXECUTED
map_bits = &map[map_index];
3daa4: e0877106 add r7, r7, r6, 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);
3daa8: e203101f and r1, r3, #31 <== NOT EXECUTED
search_index = rtems_rfs_bitmap_map_index (map_index);
search_offset = rtems_rfs_bitmap_map_offset (map_index);
3daac: e206201f and r2, r6, #31 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
3dab0: e1a0a005 mov sl, r5 <== 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))
3dab4: e5980000 ldr r0, [r8] <== NOT EXECUTED
3dab8: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3dabc: 10865004 addne r5, r6, r4 <== NOT EXECUTED
3dac0: 11a05285 lslne r5, r5, #5 <== 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))
3dac4: 1a000038 bne 3dbac <T.57+0x184> <== NOT EXECUTED
3dac8: ea00003a b 3dbb8 <T.57+0x190> <== 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);
3dacc: e3a09001 mov r9, #1 <== NOT EXECUTED
3dad0: e1a09219 lsl r9, r9, r2 <== 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))
3dad4: e1190000 tst r9, r0 <== 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);
3dad8: e58d9000 str r9, [sp] <== 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))
3dadc: 1a00001d bne 3db58 <T.57+0x130> <== NOT EXECUTED
3dae0: ea00001e b 3db60 <T.57+0x138> <== 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);
3dae4: e3a0b001 mov fp, #1 <== NOT EXECUTED
3dae8: e1a0911b lsl r9, fp, r1 <== 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))
3daec: e597b000 ldr fp, [r7] <== NOT EXECUTED
3daf0: e119000b tst r9, fp <== NOT EXECUTED
3daf4: 0a000013 beq 3db48 <T.57+0x120> <== 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);
3daf8: e1cb9009 bic r9, fp, r9 <== 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);
3dafc: e5879000 str r9, [r7] <== NOT EXECUTED
if (rtems_rfs_bitmap_match(*map_bits,
3db00: e3590000 cmp r9, #0 <== NOT EXECUTED
RTEMS_RFS_BITMAP_ELEMENT_SET))
*search_bits = rtems_rfs_bitmap_set (*search_bits,
3db04: 05982000 ldreq r2, [r8] <== NOT EXECUTED
3db08: 059d0000 ldreq r0, [sp] <== NOT EXECUTED
3db0c: 01c22000 biceq r2, r2, r0 <== NOT EXECUTED
3db10: 05882000 streq r2, [r8] <== NOT EXECUTED
1 << search_offset);
control->free--;
3db14: e59a0010 ldr r0, [sl, #16] <== NOT EXECUTED
*bit = test_bit;
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
3db18: e59a1000 ldr r1, [sl] <== 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;
3db1c: e28d9008 add r9, sp, #8 <== NOT EXECUTED
3db20: e8990a00 ldm r9, {r9, fp} <== NOT EXECUTED
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
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--;
3db24: e2400001 sub r0, r0, #1 <== NOT EXECUTED
*bit = test_bit;
*found = true;
3db28: e3a02001 mov r2, #1 <== NOT EXECUTED
*map_bits = rtems_rfs_bitmap_set (*map_bits, 1 << map_offset);
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--;
3db2c: e58a0010 str r0, [sl, #16] <== NOT EXECUTED
*bit = test_bit;
*found = true;
3db30: e5cb2000 strb r2, [fp] <== NOT EXECUTED
3db34: e1a0500a mov r5, sl <== 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;
3db38: e5893000 str r3, [r9] <== NOT EXECUTED
*found = true;
rtems_rfs_buffer_mark_dirty (control->buffer);
3db3c: e5c12000 strb r2, [r1] <== NOT EXECUTED
3db40: e3a00000 mov r0, #0 <== NOT EXECUTED
3db44: ea000039 b 3dc30 <T.57+0x208> <== NOT EXECUTED
return 0;
}
if (test_bit == end_bit)
3db48: e153000c cmp r3, ip <== NOT EXECUTED
3db4c: 0a000003 beq 3db60 <T.57+0x138> <== NOT EXECUTED
3db50: e0811004 add r1, r1, r4 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3db54: e0833004 add r3, r3, r4 <== 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)
3db58: e351001f cmp r1, #31 <== NOT EXECUTED
3db5c: 9affffe0 bls 3dae4 <T.57+0xbc> <== NOT EXECUTED
}
}
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
3db60: e3540000 cmp r4, #0 <== NOT EXECUTED
3db64: d3a0101f movle r1, #31 <== NOT EXECUTED
3db68: c3a01000 movgt r1, #0 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
3db6c: e59d9010 ldr r9, [sp, #16] <== NOT EXECUTED
map_bits += direction;
map_index += direction;
map_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
3db70: e0813005 add r3, r1, r5 <== NOT EXECUTED
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
3db74: e153000c cmp r3, ip <== NOT EXECUTED
3db78: c3a09000 movgt r9, #0 <== NOT EXECUTED
3db7c: d2099001 andle r9, r9, #1 <== NOT EXECUTED
3db80: e3590000 cmp r9, #0 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
3db84: e59d9004 ldr r9, [sp, #4] <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_search_map_for_clear_bit (rtems_rfs_bitmap_control* control,
3db88: e0866004 add r6, r6, r4 <== NOT EXECUTED
map_offset += direction;
test_bit += direction;
}
}
map_bits += direction;
3db8c: e0877009 add r7, r7, r9 <== NOT EXECUTED
test_bit = (map_index * rtems_rfs_bitmap_element_bits ()) + map_offset;
search_offset += direction;
if (((direction < 0) && (test_bit <= end_bit))
3db90: 1a000014 bne 3dbe8 <T.57+0x1c0> <== NOT EXECUTED
3db94: e59db014 ldr fp, [sp, #20] <== NOT EXECUTED
3db98: e153000c cmp r3, ip <== NOT EXECUTED
3db9c: a3540000 cmpge r4, #0 <== NOT EXECUTED
3dba0: e085500b add r5, r5, fp <== NOT EXECUTED
3dba4: ca00000f bgt 3dbe8 <T.57+0x1c0> <== NOT EXECUTED
3dba8: e0822004 add r2, r2, r4 <== 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)
3dbac: e352001f cmp r2, #31 <== NOT EXECUTED
3dbb0: 9affffc5 bls 3dacc <T.57+0xa4> <== NOT EXECUTED
3dbb4: ea00000b b 3dbe8 <T.57+0x1c0> <== 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)
3dbb8: 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;
3dbbc: d1e01282 mvnle r1, r2, 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;
3dbc0: c2622020 rsbgt r2, r2, #32 <== NOT EXECUTED
test_bit += bits_skipped * rtems_rfs_bitmap_element_bits ();
map_offset = 0;
}
else
{
bits_skipped = search_offset + 1;
3dbc4: d2822001 addle r2, r2, #1 <== 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 ();
3dbc8: c1a01000 movgt r1, r0 <== 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;
3dbcc: e0000294 mul r0, r4, r2 <== 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);
3dbd0: e3c3301f bic r3, r3, #31 <== 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;
3dbd4: d0813003 addle r3, r1, r3 <== 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 ();
3dbd8: c0833282 addgt r3, r3, r2, 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;
3dbdc: d3a0101f movle r1, #31 <== NOT EXECUTED
map_offset = rtems_rfs_bitmap_element_bits () - 1;
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
3dbe0: e0866000 add r6, r6, r0 <== 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;
3dbe4: e0877100 add r7, r7, r0, lsl #2 <== NOT EXECUTED
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
3dbe8: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
3dbec: e153000c cmp r3, ip <== NOT EXECUTED
3dbf0: b3a00000 movlt r0, #0 <== NOT EXECUTED
3dbf4: a2000001 andge r0, r0, #1 <== NOT EXECUTED
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
3dbf8: e3540000 cmp r4, #0 <== NOT EXECUTED
3dbfc: d3a0201f movle r2, #31 <== NOT EXECUTED
3dc00: c3a02000 movgt r2, #0 <== NOT EXECUTED
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
3dc04: e3500000 cmp r0, #0 <== NOT EXECUTED
}
map_bits += direction * bits_skipped;
map_index += direction * bits_skipped;
}
search_bits += direction;
3dc08: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
3dc0c: e0888000 add r8, r8, r0 <== NOT EXECUTED
search_offset = direction > 0 ? 0 : rtems_rfs_bitmap_element_bits () - 1;
}
while (((direction < 0) && (test_bit >= end_bit))
|| ((direction > 0) && (test_bit <= end_bit)));
3dc10: 1affffa7 bne 3dab4 <T.57+0x8c> <== NOT EXECUTED
3dc14: e153000c cmp r3, ip <== NOT EXECUTED
3dc18: c3a00000 movgt r0, #0 <== NOT EXECUTED
3dc1c: d3a00001 movle r0, #1 <== NOT EXECUTED
3dc20: e3540000 cmp r4, #0 <== NOT EXECUTED
3dc24: d3a00000 movle r0, #0 <== NOT EXECUTED
3dc28: e3500000 cmp r0, #0 <== NOT EXECUTED
3dc2c: 1affffa0 bne 3dab4 <T.57+0x8c> <== NOT EXECUTED
return 0;
}
3dc30: e28dd01c add sp, sp, #28 <== NOT EXECUTED
3dc34: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00000448 <_Barrier_Manager_initialization>:
#include <rtems/score/object.h>
#include <rtems/rtems/barrier.h>
void _Barrier_Manager_initialization(void)
{
}
448: e12fff1e bx lr
0000044c <_Dual_ported_memory_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/dpmem.h>
void _Dual_ported_memory_Manager_initialization(void)
{
}
44c: e12fff1e bx lr
00000450 <_Event_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Event_Manager_initialization(void)
{
}
450: e12fff1e bx lr
0000046c <_Extension_Manager_initialization>:
#include <rtems/extension.h>
#include <rtems/score/interr.h>
void _Extension_Manager_initialization(void)
{
}
46c: e12fff1e bx lr
00000454 <_Message_queue_Manager_initialization>:
#include <rtems/score/wkspace.h>
#include <rtems/score/interr.h>
void _Message_queue_Manager_initialization(void)
{
}
454: e12fff1e bx lr
000061b4 <_POSIX_Condition_variables_Wait_support>:
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
61b4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr}
61b8: e1a04001 mov r4, r1
61bc: 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 ) ) {
61c0: e1a0100d mov r1, sp
61c4: e1a00004 mov r0, r4
pthread_cond_t *cond,
pthread_mutex_t *mutex,
Watchdog_Interval timeout,
bool already_timedout
)
{
61c8: e1a08002 mov r8, r2
61cc: 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 ) ) {
61d0: eb00006f bl 6394 <_POSIX_Mutex_Get>
61d4: e3500000 cmp r0, #0
61d8: 0a000032 beq 62a8 <_POSIX_Condition_variables_Wait_support+0xf4>
*/
RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void )
{
RTEMS_COMPILER_MEMORY_BARRIER();
_Thread_Dispatch_disable_level -= 1;
61dc: e59f30d0 ldr r3, [pc, #208] ; 62b4 <_POSIX_Condition_variables_Wait_support+0x100>
61e0: e5932000 ldr r2, [r3]
61e4: e2422001 sub r2, r2, #1
61e8: e5832000 str r2, [r3]
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
61ec: e1a0100d mov r1, sp
61f0: e1a00006 mov r0, r6
61f4: ebffff7c bl 5fec <_POSIX_Condition_variables_Get>
switch ( location ) {
61f8: e59d3000 ldr r3, [sp]
61fc: e3530000 cmp r3, #0
return EINVAL;
}
_Thread_Unnest_dispatch();
the_cond = _POSIX_Condition_variables_Get( cond, &location );
6200: e1a0a000 mov sl, r0
switch ( location ) {
6204: 1a000027 bne 62a8 <_POSIX_Condition_variables_Wait_support+0xf4>
case OBJECTS_LOCAL:
if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
6208: e5903014 ldr r3, [r0, #20]
620c: e3530000 cmp r3, #0
6210: 0a000004 beq 6228 <_POSIX_Condition_variables_Wait_support+0x74>
6214: e5942000 ldr r2, [r4]
6218: e1530002 cmp r3, r2
621c: 0a000001 beq 6228 <_POSIX_Condition_variables_Wait_support+0x74>
_Thread_Enable_dispatch();
6220: eb000bff bl 9224 <_Thread_Enable_dispatch>
6224: ea00001f b 62a8 <_POSIX_Condition_variables_Wait_support+0xf4>
return EINVAL;
}
(void) pthread_mutex_unlock( mutex );
6228: e1a00004 mov r0, r4
622c: eb0000de bl 65ac <pthread_mutex_unlock>
_Thread_Enable_dispatch();
return EINVAL;
}
*/
if ( !already_timedout ) {
6230: e3570000 cmp r7, #0
6234: 1a000015 bne 6290 <_POSIX_Condition_variables_Wait_support+0xdc>
the_cond->Mutex = *mutex;
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6238: e59f5078 ldr r5, [pc, #120] ; 62b8 <_POSIX_Condition_variables_Wait_support+0x104>
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
623c: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6240: e5953000 ldr r3, [r5]
return EINVAL;
}
*/
if ( !already_timedout ) {
the_cond->Mutex = *mutex;
6244: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue );
_Thread_Executing->Wait.return_code = 0;
6248: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue;
_Thread_Executing->Wait.id = *cond;
624c: 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;
6250: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
6254: 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;
6258: 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;
625c: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond;
_Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
6260: e1a00002 mov r0, r2
6264: e58a1048 str r1, [sl, #72] ; 0x48
6268: e59f204c ldr r2, [pc, #76] ; 62bc <_POSIX_Condition_variables_Wait_support+0x108>
626c: e1a01008 mov r1, r8
6270: eb000d24 bl 9708 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
6274: eb000bea bl 9224 <_Thread_Enable_dispatch>
/*
* Switch ourself out because we blocked as a result of the
* _Thread_queue_Enqueue.
*/
status = _Thread_Executing->Wait.return_code;
6278: e5953000 ldr r3, [r5]
627c: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
6280: e3550074 cmp r5, #116 ; 0x74
6284: 13550000 cmpne r5, #0
6288: 0a000002 beq 6298 <_POSIX_Condition_variables_Wait_support+0xe4>
628c: ea000006 b 62ac <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED
return status;
} else {
_Thread_Enable_dispatch();
6290: eb000be3 bl 9224 <_Thread_Enable_dispatch>
6294: e3a05074 mov r5, #116 ; 0x74
/*
* When we get here the dispatch disable level is 0.
*/
mutex_status = pthread_mutex_lock( mutex );
6298: e1a00004 mov r0, r4
629c: eb0000a3 bl 6530 <pthread_mutex_lock>
if ( mutex_status )
62a0: e3500000 cmp r0, #0
62a4: 0a000000 beq 62ac <_POSIX_Condition_variables_Wait_support+0xf8>
62a8: e3a05016 mov r5, #22
case OBJECTS_ERROR:
break;
}
return EINVAL;
}
62ac: e1a00005 mov r0, r5
62b0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
0000d924 <_POSIX_Keys_Run_destructors>:
*/
void _POSIX_Keys_Run_destructors(
Thread_Control *thread
)
{
d924: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Objects_Maximum thread_index = _Objects_Get_index( thread->Object.id );
d928: e5906008 ldr r6, [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);
d92c: e1a08c26 lsr r8, r6, #24
d930: e2088007 and r8, r8, #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 ];
d934: e1a06806 lsl r6, r6, #16
*
* 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;
d938: e59f7074 ldr r7, [pc, #116] ; d9b4 <_POSIX_Keys_Run_destructors+0x90>
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 ];
d93c: e1a06726 lsr r6, r6, #14
d940: e2888005 add r8, r8, #5
if ( value != NULL ) {
key->Values [ thread_api ][ thread_index ] = NULL;
d944: e3a05000 mov r5, #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;
d948: e3a04001 mov r4, #1
d94c: e1d7a1b0 ldrh sl, [r7, #16]
d950: e1a01004 mov r1, r4
done = true;
for ( index = 1 ; index <= max ; ++index ) {
d954: ea000011 b d9a0 <_POSIX_Keys_Run_destructors+0x7c>
POSIX_Keys_Control *key = (POSIX_Keys_Control *)
_POSIX_Keys_Information.local_table [ index ];
d958: e597301c ldr r3, [r7, #28]
d95c: e7932104 ldr r2, [r3, r4, lsl #2]
if ( key != NULL && key->destructor != NULL ) {
d960: e3520000 cmp r2, #0
d964: 0a00000a beq d994 <_POSIX_Keys_Run_destructors+0x70>
d968: e5923010 ldr r3, [r2, #16]
d96c: e3530000 cmp r3, #0
d970: 0a000007 beq d994 <_POSIX_Keys_Run_destructors+0x70>
void *value = key->Values [ thread_api ][ thread_index ];
d974: e7922108 ldr r2, [r2, r8, lsl #2]
d978: e7920006 ldr r0, [r2, r6]
if ( value != NULL ) {
d97c: e3500000 cmp r0, #0
d980: 0a000003 beq d994 <_POSIX_Keys_Run_destructors+0x70>
key->Values [ thread_api ][ thread_index ] = NULL;
d984: e7825006 str r5, [r2, r6] <== NOT EXECUTED
(*key->destructor)( value );
d988: e1a0e00f mov lr, pc <== NOT EXECUTED
d98c: e12fff13 bx r3 <== NOT EXECUTED
d990: e1a01005 mov r1, r5 <== NOT EXECUTED
Objects_Maximum index = 0;
Objects_Maximum max = _POSIX_Keys_Information.maximum;
done = true;
for ( index = 1 ; index <= max ; ++index ) {
d994: e2844001 add r4, r4, #1
d998: e1a04804 lsl r4, r4, #16
d99c: e1a04824 lsr r4, r4, #16
d9a0: e154000a cmp r4, sl
d9a4: 9affffeb bls d958 <_POSIX_Keys_Run_destructors+0x34>
* 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 ) {
d9a8: e3510000 cmp r1, #0
d9ac: 0affffe5 beq d948 <_POSIX_Keys_Run_destructors+0x24>
done = false;
}
}
}
}
}
d9b0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0000ad7c <_POSIX_Threads_Delete_extension>:
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ad7c: e92d40f0 push {r4, r5, r6, r7, lr}
api = deleted->API_Extensions[ THREAD_API_POSIX ];
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ad80: e1a00001 mov r0, r1
*/
void _POSIX_Threads_Delete_extension(
Thread_Control *executing __attribute__((unused)),
Thread_Control *deleted
)
{
ad84: e1a04001 mov r4, r1
Thread_Control *the_thread;
POSIX_API_Control *api;
void **value_ptr;
api = deleted->API_Extensions[ THREAD_API_POSIX ];
ad88: e5915108 ldr r5, [r1, #264] ; 0x108
/*
* Run the POSIX cancellation handlers
*/
_POSIX_Threads_cancel_run( deleted );
ad8c: eb000acc bl d8c4 <_POSIX_Threads_cancel_run>
/*
* Run all the key destructors
*/
_POSIX_Keys_Run_destructors( deleted );
ad90: e1a00004 mov r0, r4
ad94: eb000ae2 bl d924 <_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 )) )
ad98: e2857040 add r7, r5, #64 ; 0x40
_POSIX_Keys_Run_destructors( deleted );
/*
* Wakeup all the tasks which joined with this one
*/
value_ptr = (void **) deleted->Wait.return_argument;
ad9c: e5946028 ldr r6, [r4, #40] ; 0x28
while ( (the_thread = _Thread_queue_Dequeue( &api->Join_List )) )
ada0: ea000001 b adac <_POSIX_Threads_Delete_extension+0x30>
*(void **)the_thread->Wait.return_argument = value_ptr;
ada4: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
ada8: e5836000 str r6, [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 )) )
adac: e1a00007 mov r0, r7
adb0: ebfff1bc bl 74a8 <_Thread_queue_Dequeue>
adb4: e3500000 cmp r0, #0
adb8: 1afffff9 bne ada4 <_POSIX_Threads_Delete_extension+0x28>
*(void **)the_thread->Wait.return_argument = value_ptr;
if ( api->schedpolicy == SCHED_SPORADIC )
adbc: e5953080 ldr r3, [r5, #128] ; 0x80
adc0: e3530004 cmp r3, #4
(void) _Watchdog_Remove( &api->Sporadic_timer );
adc4: 028500a4 addeq r0, r5, #164 ; 0xa4
adc8: 0bfff53f bleq 82cc <_Watchdog_Remove>
deleted->API_Extensions[ THREAD_API_POSIX ] = NULL;
adcc: e3a03000 mov r3, #0
(void) _Workspace_Free( api );
add0: e1a00005 mov r0, r5
*(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;
add4: e5843108 str r3, [r4, #264] ; 0x108
(void) _Workspace_Free( api );
}
add8: 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 );
addc: eafff59a b 844c <_Workspace_Free>
00000458 <_Partition_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Partition_Manager_initialization(void)
{
}
458: e12fff1e bx lr
00000468 <_Rate_monotonic_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/ratemon.h>
void _Rate_monotonic_Manager_initialization(void)
{
}
468: e12fff1e bx lr
0000045c <_Region_Manager_initialization>:
#include <rtems/score/thread.h>
#include <rtems/score/interr.h>
void _Region_Manager_initialization(void)
{
}
45c: e12fff1e bx lr
000076b0 <_Thread_queue_Enqueue_priority>:
Thread_blocking_operation_States _Thread_queue_Enqueue_priority (
Thread_queue_Control *the_thread_queue,
Thread_Control *the_thread,
ISR_Level *level_p
)
{
76b0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
Priority_Control priority;
States_Control block_state;
_Chain_Initialize_empty( &the_thread->Wait.Block2n );
priority = the_thread->current_priority;
76b4: e5913014 ldr r3, [r1, #20]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
76b8: e281503c add r5, r1, #60 ; 0x3c
76bc: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
76c0: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
76c4: e281c038 add ip, r1, #56 ; 0x38
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
76c8: e3130020 tst r3, #32
_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 ];
76cc: e1a04323 lsr r4, r3, #6
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
76d0: e581503c str r5, [r1, #60] ; 0x3c
76d4: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
76d8: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
76dc: e5907038 ldr r7, [r0, #56] ; 0x38
_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 ];
76e0: e02c0495 mla ip, r5, r4, r0
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
76e4: 159f8154 ldrne r8, [pc, #340] ; 7840 <_Thread_queue_Enqueue_priority+0x190>
priority = the_thread->current_priority;
header_index = _Thread_queue_Header_number( priority );
header = &the_thread_queue->Queues.Priority[ header_index ];
block_state = the_thread_queue->state;
if ( _Thread_queue_Is_reverse_search( priority ) )
76e8: 1a000023 bne 777c <_Thread_queue_Enqueue_priority+0xcc>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
76ec: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
76f0: e10f5000 mrs r5, CPSR
76f4: e3854080 orr r4, r5, #128 ; 0x80
76f8: 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;
76fc: e3e06000 mvn r6, #0
7700: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
7704: ea00000b b 7738 <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
7708: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
770c: e1530006 cmp r3, r6
7710: 9a00000a bls 7740 <_Thread_queue_Enqueue_priority+0x90>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
7714: e10fa000 mrs sl, CPSR
7718: e129f005 msr CPSR_fc, r5
771c: e129f00a msr CPSR_fc, sl
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) ) {
7720: e594a010 ldr sl, [r4, #16]
7724: e117000a tst r7, sl
7728: 1a000001 bne 7734 <_Thread_queue_Enqueue_priority+0x84>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
772c: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
7730: eaffffee b 76f0 <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_forward_search;
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
7734: 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 ) ) {
7738: e1540008 cmp r4, r8
773c: 1afffff1 bne 7708 <_Thread_queue_Enqueue_priority+0x58>
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
7740: e590c030 ldr ip, [r0, #48] ; 0x30
7744: e35c0001 cmp ip, #1
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 ) ) {
7748: e1a0c005 mov ip, r5
}
search_thread =
(Thread_Control *)search_thread->Object.Node.next;
}
if ( the_thread_queue->sync_state !=
774c: 1a000038 bne 7834 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
7750: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
7754: e3a03000 mov r3, #0
7758: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
775c: 0a00002a beq 780c <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
previous_node = search_node->previous;
7760: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7764: e5814000 str r4, [r1]
the_node->previous = previous_node;
7768: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
776c: 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;
7770: e5831000 str r1, [r3]
search_node->previous = the_node;
7774: e5841004 str r1, [r4, #4]
7778: ea000021 b 7804 <_Thread_queue_Enqueue_priority+0x154>
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
restart_reverse_search:
search_priority = PRIORITY_MAXIMUM + 1;
777c: e5d86000 ldrb r6, [r8]
7780: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
7784: e10f5000 mrs r5, CPSR
7788: e3854080 orr r4, r5, #128 ; 0x80
778c: e129f004 msr CPSR_fc, r4
_ISR_Disable( level );
search_thread = (Thread_Control *) header->last;
7790: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7794: ea00000b b 77c8 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
7798: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
779c: e1530006 cmp r3, r6
77a0: 2a00000a bcs 77d0 <_Thread_queue_Enqueue_priority+0x120>
static inline void arm_interrupt_flash( uint32_t level )
{
uint32_t arm_switch_reg;
asm volatile (
77a4: e10fa000 mrs sl, CPSR
77a8: e129f005 msr CPSR_fc, r5
77ac: e129f00a msr CPSR_fc, sl
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) ) {
77b0: e594a010 ldr sl, [r4, #16]
77b4: e117000a tst r7, sl
77b8: 1a000001 bne 77c4 <_Thread_queue_Enqueue_priority+0x114>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
77bc: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED
77c0: eaffffed b 777c <_Thread_queue_Enqueue_priority+0xcc> <== NOT EXECUTED
_ISR_Enable( level );
goto restart_reverse_search;
}
search_thread = (Thread_Control *)
77c4: 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 ) ) {
77c8: e154000c cmp r4, ip
77cc: 1afffff1 bne 7798 <_Thread_queue_Enqueue_priority+0xe8>
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
77d0: e590c030 ldr ip, [r0, #48] ; 0x30
77d4: 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 ) ) {
77d8: e1a0c005 mov ip, r5
}
search_thread = (Thread_Control *)
search_thread->Object.Node.previous;
}
if ( the_thread_queue->sync_state !=
77dc: 1a000014 bne 7834 <_Thread_queue_Enqueue_priority+0x184>
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
if ( priority == search_priority )
77e0: e1530006 cmp r3, r6
if ( the_thread_queue->sync_state !=
THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
goto synchronize;
the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_SYNCHRONIZED;
77e4: e3a03000 mov r3, #0
77e8: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority )
77ec: 0a000006 beq 780c <_Thread_queue_Enqueue_priority+0x15c>
goto equal_priority;
search_node = (Chain_Node *) search_thread;
next_node = search_node->next;
77f0: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread;
the_node->next = next_node;
the_node->previous = search_node;
77f4: e8810018 stm r1, {r3, r4}
search_node->next = the_node;
next_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
77f8: 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;
77fc: e5841000 str r1, [r4]
next_node->previous = the_node;
7800: e5831004 str r1, [r3, #4]
7804: e129f005 msr CPSR_fc, r5
7808: ea000007 b 782c <_Thread_queue_Enqueue_priority+0x17c>
780c: 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;
7810: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread;
the_node->next = search_node;
7814: e5814000 str r4, [r1]
the_node->previous = previous_node;
7818: e5813004 str r3, [r1, #4]
previous_node->next = the_node;
search_node->previous = the_node;
the_thread->Wait.queue = the_thread_queue;
781c: 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;
7820: e5831000 str r1, [r3]
search_node->previous = the_node;
7824: e5841004 str r1, [r4, #4]
7828: e129f00c msr CPSR_fc, ip
782c: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue;
_ISR_Enable( level );
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
7830: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
* 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;
7834: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
7838: e5900030 ldr r0, [r0, #48] ; 0x30
}
783c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00000464 <_Timer_Manager_initialization>:
#include <rtems/rtems/types.h>
#include <rtems/rtems/timer.h>
void _Timer_Manager_initialization(void)
{
}
464: e12fff1e bx lr
00015138 <_Timer_server_Body>:
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
15138: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
1513c: e24dd020 sub sp, sp, #32
15140: e28d3014 add r3, sp, #20
15144: e28d5008 add r5, sp, #8
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
15148: e3a09000 mov r9, #0
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
1514c: e283a004 add sl, r3, #4
15150: e2858004 add r8, r5, #4
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
15154: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15158: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
1515c: e2803040 add r3, r0, #64 ; 0x40
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15160: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
15164: e58d9018 str r9, [sp, #24]
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
15168: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
1516c: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
15170: e58d5010 str r5, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
15174: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
15178: e58d3000 str r3, [sp]
* @a arg points to the corresponding timer server control block.
*/
static rtems_task _Timer_server_Body(
rtems_task_argument arg
)
{
1517c: e1a04000 mov r4, r0
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
15180: e280b030 add fp, r0, #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 );
15184: e2807068 add r7, r0, #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;
15188: e28d2014 add r2, sp, #20
1518c: e5842078 str r2, [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;
15190: e59f2168 ldr r2, [pc, #360] ; 15300 <_Timer_server_Body+0x1c8>
15194: e5923000 ldr r3, [r2]
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
15198: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot;
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
1519c: e1a02005 mov r2, r5
151a0: e0611003 rsb r1, r1, r3
/*
* We assume adequate unsigned arithmetic here.
*/
Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
watchdogs->last_snapshot = snapshot;
151a4: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
151a8: e1a0000b mov r0, fp
151ac: eb001060 bl 19334 <_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();
151b0: e59f314c ldr r3, [pc, #332] ; 15304 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
151b4: e5942074 ldr r2, [r4, #116] ; 0x74
static void _Timer_server_Process_tod_watchdogs(
Timer_server_Watchdogs *watchdogs,
Chain_Control *fire_chain
)
{
Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch();
151b8: e5936000 ldr r6, [r3]
/*
* 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 ) {
151bc: e1560002 cmp r6, r2
151c0: 9a000004 bls 151d8 <_Timer_server_Body+0xa0>
/*
* 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 );
151c4: e0621006 rsb r1, r2, r6
151c8: e1a00007 mov r0, r7
151cc: e1a02005 mov r2, r5
151d0: eb001057 bl 19334 <_Watchdog_Adjust_to_chain>
151d4: ea000003 b 151e8 <_Timer_server_Body+0xb0>
/*
* 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 );
151d8: 30662002 rsbcc r2, r6, r2
151dc: 31a00007 movcc r0, r7
151e0: 33a01001 movcc r1, #1
151e4: 3b00102a blcc 19294 <_Watchdog_Adjust>
}
watchdogs->last_snapshot = snapshot;
151e8: e5846074 str r6, [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 );
151ec: e5940078 ldr r0, [r4, #120] ; 0x78
151f0: eb000234 bl 15ac8 <_Chain_Get>
if ( timer == NULL ) {
151f4: e2501000 subs r1, r0, #0
151f8: 0a00000a beq 15228 <_Timer_server_Body+0xf0>
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
151fc: e5913038 ldr r3, [r1, #56] ; 0x38
15200: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
15204: 02811010 addeq r1, r1, #16
15208: 01a0000b moveq r0, fp
static void _Timer_server_Insert_timer(
Timer_server_Control *ts,
Timer_Control *timer
)
{
if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) {
1520c: 0a000003 beq 15220 <_Timer_server_Body+0xe8>
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
} else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
15210: e3530003 cmp r3, #3
15214: 1afffff4 bne 151ec <_Timer_server_Body+0xb4>
_Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
15218: e2811010 add r1, r1, #16
1521c: e1a00007 mov r0, r7
15220: eb001070 bl 193e8 <_Watchdog_Insert>
15224: eafffff0 b 151ec <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
15228: e10f3000 mrs r3, CPSR
1522c: e3832080 orr r2, r3, #128 ; 0x80
15230: e129f002 msr CPSR_fc, r2
* body loop.
*/
_Timer_server_Process_insertions( ts );
_ISR_Disable( level );
if ( _Chain_Is_empty( insert_chain ) ) {
15234: e59d2014 ldr r2, [sp, #20]
15238: e152000a cmp r2, sl
1523c: 1a000005 bne 15258 <_Timer_server_Body+0x120>
ts->insert_chain = NULL;
15240: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
15244: e129f003 msr CPSR_fc, r3
_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 ) ) {
15248: e59d3008 ldr r3, [sp, #8]
1524c: e1530008 cmp r3, r8
15250: 1a000002 bne 15260 <_Timer_server_Body+0x128>
15254: ea000015 b 152b0 <_Timer_server_Body+0x178>
15258: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
1525c: eaffffcb b 15190 <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
15260: e10f2000 mrs r2, CPSR
15264: e3823080 orr r3, r2, #128 ; 0x80
15268: e129f003 msr CPSR_fc, r3
*/
RTEMS_INLINE_ROUTINE bool _Chain_Is_empty(
Chain_Control *the_chain
)
{
return (the_chain->first == _Chain_Tail(the_chain));
1526c: e59d3008 ldr r3, [sp, #8]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected(
Chain_Control *the_chain
)
{
if ( !_Chain_Is_empty(the_chain))
15270: e1530008 cmp r3, r8
15274: 0a00000b beq 152a8 <_Timer_server_Body+0x170>
{
Chain_Node *return_node;
Chain_Node *new_first;
return_node = the_chain->first;
new_first = return_node->next;
15278: e5931000 ldr r1, [r3]
* It is essential that interrupts are disable here since an interrupt
* service routine may remove a watchdog from the chain.
*/
_ISR_Disable( level );
watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain );
if ( watchdog != NULL ) {
1527c: e3530000 cmp r3, #0
the_chain->first = new_first;
15280: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
15284: e5815004 str r5, [r1, #4]
15288: 0a000006 beq 152a8 <_Timer_server_Body+0x170>
watchdog->state = WATCHDOG_INACTIVE;
1528c: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
15290: e129f002 msr CPSR_fc, r2
/*
* 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 );
15294: e2830020 add r0, r3, #32
15298: e8900003 ldm r0, {r0, r1}
1529c: e1a0e00f mov lr, pc
152a0: e593f01c ldr pc, [r3, #28]
}
152a4: eaffffed b 15260 <_Timer_server_Body+0x128>
152a8: e129f002 msr CPSR_fc, r2
152ac: eaffffb5 b 15188 <_Timer_server_Body+0x50>
} else {
ts->active = false;
152b0: e5c4907c strb r9, [r4, #124] ; 0x7c
152b4: e59f304c ldr r3, [pc, #76] ; 15308 <_Timer_server_Body+0x1d0>
152b8: e5932000 ldr r2, [r3]
152bc: e2822001 add r2, r2, #1
152c0: e5832000 str r2, [r3]
/*
* Block until there is something to do.
*/
_Thread_Disable_dispatch();
_Thread_Set_state( ts->thread, STATES_DELAYING );
152c4: e3a01008 mov r1, #8
152c8: e5940000 ldr r0, [r4]
152cc: eb000d95 bl 18928 <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
152d0: e1a00004 mov r0, r4
152d4: ebffff6b bl 15088 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
152d8: e1a00004 mov r0, r4
152dc: ebffff7f bl 150e0 <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
152e0: eb000af7 bl 17ec4 <_Thread_Enable_dispatch>
ts->active = true;
152e4: e3a03001 mov r3, #1
152e8: e5c4307c strb r3, [r4, #124] ; 0x7c
static void _Timer_server_Stop_interval_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
152ec: e59d0004 ldr r0, [sp, #4]
152f0: eb001094 bl 19548 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog(
Timer_server_Control *ts
)
{
_Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
152f4: e59d0000 ldr r0, [sp]
152f8: eb001092 bl 19548 <_Watchdog_Remove>
152fc: eaffffa1 b 15188 <_Timer_server_Body+0x50>
0001a240 <_exit>:
/*
* If the toolset uses init/fini sections, then we need to
* run the global destructors now.
*/
#if defined(__USE_INIT_FINI__)
FINI_SYMBOL();
1a240: e1a04000 mov r4, r0
1a244: eb000229 bl 1aaf0 <___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();
1a248: ebffffe0 bl 1a1d0 <libc_wrapup>
rtems_shutdown_executive(status);
1a24c: e1a00004 mov r0, r4
1a250: eb00003b bl 1a344 <rtems_shutdown_executive>
1a254: eafffffe b 1a254 <_exit+0x14> <== NOT EXECUTED
00022e98 <_fat_block_read>:
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
22e98: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== 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;
22e9c: e3a04000 mov r4, #0 <== NOT EXECUTED
22ea0: e28d7004 add r7, sp, #4 <== NOT EXECUTED
uint32_t start,
uint32_t offset,
uint32_t count,
void *buff
)
{
22ea4: e1a05003 mov r5, r3 <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
22ea8: e5909034 ldr r9, [r0, #52] ; 0x34 <== NOT EXECUTED
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
22eac: e5274004 str r4, [r7, #-4]! <== NOT EXECUTED
22eb0: e1a06002 mov r6, r2 <== NOT EXECUTED
22eb4: e1a08001 mov r8, r1 <== NOT EXECUTED
uint32_t c = 0;
while (count > 0)
22eb8: ea000012 b 22f08 <_fat_block_read+0x70> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
22ebc: ebfffec4 bl 229d4 <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);
22ec0: 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)
22ec4: e250b000 subs fp, r0, #0 <== NOT EXECUTED
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
22ec8: e0830004 add r0, r3, r4 <== 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)
22ecc: 13e04000 mvnne r4, #0 <== NOT EXECUTED
22ed0: 1a000012 bne 22f20 <_fat_block_read+0x88> <== NOT EXECUTED
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
22ed4: e1d9a0b0 ldrh sl, [r9] <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
22ed8: 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));
22edc: e066a00a rsb sl, r6, sl <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
22ee0: 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));
22ee4: e15a0005 cmp sl, r5 <== NOT EXECUTED
22ee8: 21a0a005 movcs sl, r5 <== NOT EXECUTED
memcpy((buff + cmpltd), (block->buffer + ofs), c);
22eec: e0811006 add r1, r1, r6 <== NOT EXECUTED
22ef0: e1a0200a mov r2, sl <== NOT EXECUTED
22ef4: eb0079e3 bl 41688 <memcpy> <== NOT EXECUTED
count -= c;
cmpltd += c;
22ef8: e08a4004 add r4, sl, r4 <== NOT EXECUTED
return -1;
c = MIN(count, (fs_info->vol.bps - ofs));
memcpy((buff + cmpltd), (block->buffer + ofs), c);
count -= c;
22efc: e06a5005 rsb r5, sl, r5 <== NOT EXECUTED
cmpltd += c;
blk++;
22f00: e2888001 add r8, r8, #1 <== NOT EXECUTED
22f04: e1a0600b mov r6, fp <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
22f08: e3550000 cmp r5, #0 <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
22f0c: e1a01008 mov r1, r8 <== NOT EXECUTED
22f10: e3a02001 mov r2, #1 <== NOT EXECUTED
22f14: e1a0300d mov r3, sp <== NOT EXECUTED
22f18: e1a00009 mov r0, r9 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while (count > 0)
22f1c: 1affffe6 bne 22ebc <_fat_block_read+0x24> <== NOT EXECUTED
cmpltd += c;
blk++;
ofs = 0;
}
return cmpltd;
}
22f20: e1a00004 mov r0, r4 <== NOT EXECUTED
22f24: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000229cc <_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);
229cc: e5900034 ldr r0, [r0, #52] ; 0x34 <== NOT EXECUTED
229d0: eaffffaf b 22894 <fat_buf_release> <== NOT EXECUTED
00022bac <_fat_block_write>:
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
22bac: e92d4ff1 push {r0, 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;
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
22bb0: e3a05000 mov r5, #0 <== NOT EXECUTED
22bb4: e28d8004 add r8, sp, #4 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start,
uint32_t offset,
uint32_t count,
const void *buff)
{
22bb8: e1a07003 mov r7, r3 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
22bbc: e5906034 ldr r6, [r0, #52] ; 0x34 <== NOT EXECUTED
ssize_t cmpltd = 0;
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
22bc0: e5285004 str r5, [r8, #-4]! <== NOT EXECUTED
22bc4: e1a0b002 mov fp, r2 <== NOT EXECUTED
22bc8: e1a0a001 mov sl, r1 <== NOT EXECUTED
uint32_t c = 0;
while(count > 0)
22bcc: ea00001e b 22c4c <_fat_block_write+0xa0> <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bps - ofs));
22bd0: e1d630b0 ldrh r3, [r6] <== NOT EXECUTED
22bd4: e06b4003 rsb r4, fp, r3 <== NOT EXECUTED
22bd8: e1540007 cmp r4, r7 <== NOT EXECUTED
22bdc: 21a04007 movcs r4, r7 <== NOT EXECUTED
if (c == fs_info->vol.bps)
22be0: e1540003 cmp r4, r3 <== NOT EXECUTED
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_GET, &block);
22be4: 01a00006 moveq r0, r6 <== NOT EXECUTED
22be8: 01a0100a moveq r1, sl <== NOT EXECUTED
22bec: 03a02002 moveq r2, #2 <== NOT EXECUTED
22bf0: 01a0300d moveq r3, sp <== NOT EXECUTED
else
rc = fat_buf_access(fs_info, blk, FAT_OP_TYPE_READ, &block);
22bf4: 11a0100a movne r1, sl <== NOT EXECUTED
22bf8: 13a02001 movne r2, #1 <== NOT EXECUTED
22bfc: 11a0300d movne r3, sp <== NOT EXECUTED
22c00: 11a00006 movne r0, r6 <== NOT EXECUTED
22c04: ebffff72 bl 229d4 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
22c08: e3500000 cmp r0, #0 <== 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);
22c0c: e1a09000 mov r9, r0 <== NOT EXECUTED
if (rc != RC_OK)
22c10: 13e05000 mvnne r5, #0 <== NOT EXECUTED
22c14: 1a00000e bne 22c54 <_fat_block_write+0xa8> <== NOT EXECUTED
return -1;
memcpy((block->buffer + ofs), (buff + cmpltd), c);
22c18: e59d3000 ldr r3, [sp] <== NOT EXECUTED
22c1c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
22c20: e59d3028 ldr r3, [sp, #40] ; 0x28 <== NOT EXECUTED
22c24: e080000b add r0, r0, fp <== NOT EXECUTED
22c28: e0831005 add r1, r3, r5 <== NOT EXECUTED
22c2c: e1a02004 mov r2, r4 <== NOT EXECUTED
22c30: eb007a94 bl 41688 <memcpy> <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
22c34: e3a03001 mov r3, #1 <== NOT EXECUTED
22c38: e5c63080 strb r3, [r6, #128] ; 0x80 <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
count -= c;
cmpltd +=c;
22c3c: e0845005 add r5, r4, r5 <== NOT EXECUTED
memcpy((block->buffer + ofs), (buff + cmpltd), c);
fat_buf_mark_modified(fs_info);
count -= c;
22c40: e0647007 rsb r7, r4, r7 <== NOT EXECUTED
cmpltd +=c;
blk++;
22c44: e28aa001 add sl, sl, #1 <== NOT EXECUTED
22c48: e1a0b009 mov fp, r9 <== NOT EXECUTED
uint32_t blk = start;
uint32_t ofs = offset;
rtems_bdbuf_buffer *block = NULL;
uint32_t c = 0;
while(count > 0)
22c4c: e3570000 cmp r7, #0 <== NOT EXECUTED
22c50: 1affffde bne 22bd0 <_fat_block_write+0x24> <== NOT EXECUTED
cmpltd +=c;
blk++;
ofs = 0;
}
return cmpltd;
}
22c54: e1a00005 mov r0, r5 <== NOT EXECUTED
22c58: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0003a818 <_fcntl_r>:
int fd,
int cmd,
int arg
)
{
return fcntl( fd, cmd, arg );
3a818: e1a00001 mov r0, r1 <== NOT EXECUTED
3a81c: e1a01002 mov r1, r2 <== NOT EXECUTED
3a820: e1a02003 mov r2, r3 <== NOT EXECUTED
3a824: eaffff8b b 3a658 <fcntl> <== NOT EXECUTED
0000a3bc <_getpid_r>:
pid_t _getpid_r(
struct _reent *ptr __attribute__((unused))
)
{
return getpid();
}
a3bc: e3a00001 mov r0, #1 <== NOT EXECUTED
a3c0: e12fff1e bx lr <== NOT EXECUTED
00001fcc <_gettimeofday>:
int _gettimeofday(
struct timeval *tp,
struct timezone *tzp
)
{
return gettimeofday( tp, tzp );
1fcc: eaffffe8 b 1f74 <gettimeofday> <== NOT EXECUTED
00026200 <_link_r>:
struct _reent *ptr __attribute__((unused)),
const char *existing,
const char *new
)
{
return link( existing, new );
26200: e1a00001 mov r0, r1 <== NOT EXECUTED
26204: e1a01002 mov r1, r2 <== NOT EXECUTED
26208: eaffff7f b 2600c <link> <== NOT EXECUTED
000263fc <_lstat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
263fc: e1a00001 mov r0, r1 <== NOT EXECUTED
26400: e1a01002 mov r1, r2 <== NOT EXECUTED
26404: eaffffc4 b 2631c <lstat> <== NOT EXECUTED
0001a328 <_realloc_r>:
struct _reent *ignored __attribute__((unused)),
void *ptr,
size_t size
)
{
return realloc( ptr, size );
1a328: e1a00001 mov r0, r1 <== NOT EXECUTED
1a32c: e1a01002 mov r1, r2 <== NOT EXECUTED
1a330: ea00000e b 1a370 <realloc> <== NOT EXECUTED
00008f14 <_stat_r>:
struct _reent *ptr __attribute__((unused)),
const char *path,
struct stat *buf
)
{
return _STAT_NAME( path, buf );
8f14: e1a00001 mov r0, r1 <== NOT EXECUTED
8f18: e1a01002 mov r1, r2 <== NOT EXECUTED
8f1c: eaffffc4 b 8e34 <stat> <== NOT EXECUTED
0000d8bc <_unlink_r>:
int _unlink_r(
struct _reent *ptr __attribute__((unused)),
const char *path
)
{
return unlink( path );
d8bc: e1a00001 mov r0, r1 <== NOT EXECUTED
d8c0: eaffff71 b d68c <unlink> <== NOT EXECUTED
00025074 <chdir>:
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
25074: e92d4030 push {r4, r5, lr}
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
25078: e2505000 subs r5, r0, #0
#include <rtems/seterr.h>
int chdir(
const char *pathname
)
{
2507c: e24dd018 sub sp, sp, #24
rtems_filesystem_location_info_t loc;
int result;
if ( !pathname )
25080: 1a000002 bne 25090 <chdir+0x1c>
rtems_set_errno_and_return_minus_one( EFAULT );
25084: eb0064cf bl 3e3c8 <__errno>
25088: e3a0300e mov r3, #14
2508c: ea000025 b 25128 <chdir+0xb4>
/*
* Get the node where we wish to go.
*/
result = rtems_filesystem_evaluate_path(
25090: eb007fda bl 45000 <strlen>
25094: e28d4004 add r4, sp, #4
25098: e3a0c001 mov ip, #1
2509c: e1a01000 mov r1, r0
250a0: e1a0200c mov r2, ip
250a4: e1a00005 mov r0, r5
250a8: e1a03004 mov r3, r4
250ac: e58dc000 str ip, [sp]
250b0: ebff8961 bl 763c <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
if ( result != 0 )
250b4: e3500000 cmp r0, #0
250b8: 1a00001b bne 2512c <chdir+0xb8>
return -1;
/*
* Verify you can change directory into this node.
*/
if ( !loc.ops->node_type_h ) {
250bc: e59d2010 ldr r2, [sp, #16]
250c0: e5923010 ldr r3, [r2, #16]
250c4: e3530000 cmp r3, #0
250c8: 1a000007 bne 250ec <chdir+0x78>
rtems_filesystem_freenode( &loc );
250cc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
250d0: e3530000 cmp r3, #0 <== NOT EXECUTED
250d4: 11a00004 movne r0, r4 <== NOT EXECUTED
250d8: 11a0e00f movne lr, pc <== NOT EXECUTED
250dc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
250e0: eb0064b8 bl 3e3c8 <__errno> <== NOT EXECUTED
250e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
250e8: ea00000e b 25128 <chdir+0xb4> <== NOT EXECUTED
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
250ec: e1a00004 mov r0, r4
250f0: e1a0e00f mov lr, pc
250f4: e12fff13 bx r3
250f8: e3500001 cmp r0, #1
250fc: 0a00000c beq 25134 <chdir+0xc0>
rtems_filesystem_freenode( &loc );
25100: e59d3010 ldr r3, [sp, #16]
25104: e3530000 cmp r3, #0
25108: 0a000004 beq 25120 <chdir+0xac>
2510c: e593301c ldr r3, [r3, #28]
25110: e3530000 cmp r3, #0
25114: 11a00004 movne r0, r4
25118: 11a0e00f movne lr, pc
2511c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
25120: eb0064a8 bl 3e3c8 <__errno>
25124: e3a03014 mov r3, #20
25128: e5803000 str r3, [r0]
2512c: e3e00000 mvn r0, #0
25130: ea000012 b 25180 <chdir+0x10c>
}
rtems_filesystem_freenode( &rtems_filesystem_current );
25134: e59f304c ldr r3, [pc, #76] ; 25188 <chdir+0x114>
25138: e5930000 ldr r0, [r3]
2513c: e5903010 ldr r3, [r0, #16]
25140: e3530000 cmp r3, #0
25144: 0a000004 beq 2515c <chdir+0xe8>
25148: e593301c ldr r3, [r3, #28]
2514c: e3530000 cmp r3, #0
25150: 12800004 addne r0, r0, #4
25154: 11a0e00f movne lr, pc
25158: 112fff13 bxne r3
rtems_filesystem_current = loc;
2515c: e59f3024 ldr r3, [pc, #36] ; 25188 <chdir+0x114>
25160: e28d4004 add r4, sp, #4
25164: e593c000 ldr ip, [r3]
25168: e8b4000f ldm r4!, {r0, r1, r2, r3}
2516c: e28cc004 add ip, ip, #4
25170: e8ac000f stmia ip!, {r0, r1, r2, r3}
25174: e5943000 ldr r3, [r4]
25178: e58c3000 str r3, [ip]
2517c: e3a00000 mov r0, #0
return 0;
}
25180: e28dd018 add sp, sp, #24
25184: e8bd8030 pop {r4, r5, pc}
00007140 <chmod>:
int chmod(
const char *path,
mode_t mode
)
{
7140: e92d4070 push {r4, r5, r6, lr}
7144: e24dd018 sub sp, sp, #24
7148: e1a05001 mov r5, r1
714c: 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 );
7150: eb00f7aa bl 45000 <strlen>
7154: e28d4004 add r4, sp, #4
7158: e1a01000 mov r1, r0
715c: e3a0c001 mov ip, #1
7160: e1a00006 mov r0, r6
7164: e3a02000 mov r2, #0
7168: e1a03004 mov r3, r4
716c: e58dc000 str ip, [sp]
7170: eb000131 bl 763c <rtems_filesystem_evaluate_path>
if ( status != 0 )
7174: e3500000 cmp r0, #0
7178: 1a00000d bne 71b4 <chmod+0x74>
return -1;
if ( !loc.handlers ){
717c: e59d300c ldr r3, [sp, #12]
7180: e3530000 cmp r3, #0
7184: 1a00000c bne 71bc <chmod+0x7c>
rtems_filesystem_freenode( &loc );
7188: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
718c: e3530000 cmp r3, #0 <== NOT EXECUTED
7190: 0a000004 beq 71a8 <chmod+0x68> <== NOT EXECUTED
7194: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
7198: e3530000 cmp r3, #0 <== NOT EXECUTED
719c: 11a00004 movne r0, r4 <== NOT EXECUTED
71a0: 11a0e00f movne lr, pc <== NOT EXECUTED
71a4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
71a8: eb00dc86 bl 3e3c8 <__errno> <== NOT EXECUTED
71ac: e3a03009 mov r3, #9 <== NOT EXECUTED
71b0: e5803000 str r3, [r0] <== NOT EXECUTED
71b4: e3e05000 mvn r5, #0
71b8: ea00001a b 7228 <chmod+0xe8>
}
if ( !loc.handlers->fchmod_h ){
71bc: e593301c ldr r3, [r3, #28]
71c0: e3530000 cmp r3, #0
71c4: 1a00000a bne 71f4 <chmod+0xb4>
rtems_filesystem_freenode( &loc );
71c8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
71cc: e3530000 cmp r3, #0 <== NOT EXECUTED
71d0: 0a000004 beq 71e8 <chmod+0xa8> <== NOT EXECUTED
71d4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
71d8: e3530000 cmp r3, #0 <== NOT EXECUTED
71dc: 11a00004 movne r0, r4 <== NOT EXECUTED
71e0: 11a0e00f movne lr, pc <== NOT EXECUTED
71e4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
71e8: eb00dc76 bl 3e3c8 <__errno> <== NOT EXECUTED
71ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
71f0: eaffffee b 71b0 <chmod+0x70> <== NOT EXECUTED
}
result = (*loc.handlers->fchmod_h)( &loc, mode );
71f4: e1a01005 mov r1, r5
71f8: e1a00004 mov r0, r4
71fc: e1a0e00f mov lr, pc
7200: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
7204: e59d3010 ldr r3, [sp, #16]
7208: 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 );
720c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
7210: 0a000004 beq 7228 <chmod+0xe8>
7214: e593301c ldr r3, [r3, #28]
7218: e3530000 cmp r3, #0
721c: 11a00004 movne r0, r4
7220: 11a0e00f movne lr, pc
7224: 112fff13 bxne r3
return result;
}
7228: e1a00005 mov r0, r5
722c: e28dd018 add sp, sp, #24
7230: e8bd8070 pop {r4, r5, r6, pc}
0002518c <chown>:
int chown(
const char *path,
uid_t owner,
gid_t group
)
{
2518c: e92d40f0 push {r4, r5, r6, r7, lr}
25190: e1a01801 lsl r1, r1, #16
25194: e24dd018 sub sp, sp, #24
25198: e1a02802 lsl r2, r2, #16
2519c: e1a06821 lsr r6, r1, #16
251a0: e1a05822 lsr r5, r2, #16
251a4: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
251a8: eb007f94 bl 45000 <strlen>
251ac: e28d4004 add r4, sp, #4
251b0: e1a01000 mov r1, r0
251b4: e3a0c001 mov ip, #1
251b8: e1a00007 mov r0, r7
251bc: e3a02000 mov r2, #0
251c0: e1a03004 mov r3, r4
251c4: e58dc000 str ip, [sp]
251c8: ebff891b bl 763c <rtems_filesystem_evaluate_path>
251cc: e3500000 cmp r0, #0
251d0: 1a00000b bne 25204 <chown+0x78>
return -1;
if ( !loc.ops->chown_h ) {
251d4: e59d2010 ldr r2, [sp, #16]
251d8: e5923018 ldr r3, [r2, #24]
251dc: e3530000 cmp r3, #0
251e0: 1a000009 bne 2520c <chown+0x80>
rtems_filesystem_freenode( &loc );
251e4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
251e8: e3530000 cmp r3, #0 <== NOT EXECUTED
251ec: 11a00004 movne r0, r4 <== NOT EXECUTED
251f0: 11a0e00f movne lr, pc <== NOT EXECUTED
251f4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
251f8: eb006472 bl 3e3c8 <__errno> <== NOT EXECUTED
251fc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
25200: e5803000 str r3, [r0] <== NOT EXECUTED
25204: e3e05000 mvn r5, #0
25208: ea00000d b 25244 <chown+0xb8>
}
result = (*loc.ops->chown_h)( &loc, owner, group );
2520c: e1a02005 mov r2, r5
25210: e1a01006 mov r1, r6
25214: e1a00004 mov r0, r4
25218: e1a0e00f mov lr, pc
2521c: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
25220: e59d3010 ldr r3, [sp, #16]
25224: 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 );
25228: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
2522c: 0a000004 beq 25244 <chown+0xb8>
25230: e593301c ldr r3, [r3, #28]
25234: e3530000 cmp r3, #0
25238: 11a00004 movne r0, r4
2523c: 11a0e00f movne lr, pc
25240: 112fff13 bxne r3
return result;
}
25244: e1a00005 mov r0, r5
25248: e28dd018 add sp, sp, #24
2524c: e8bd80f0 pop {r4, r5, r6, r7, pc}
00025250 <chroot>:
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
25250: 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) {
25254: e59f50d4 ldr r5, [pc, #212] ; 25330 <chroot+0xe0>
25258: e59f30d4 ldr r3, [pc, #212] ; 25334 <chroot+0xe4>
2525c: e5954000 ldr r4, [r5]
25260: e1540003 cmp r4, r3
#include <rtems/seterr.h>
int chroot(
const char *pathname
)
{
25264: e24dd018 sub sp, sp, #24
25268: 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) {
2526c: 1a000007 bne 25290 <chroot+0x40>
rtems_libio_set_private_env(); /* try to set a new private env*/
25270: eb000590 bl 268b8 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
25274: e5953000 ldr r3, [r5]
25278: e1530004 cmp r3, r4
2527c: 1a000003 bne 25290 <chroot+0x40>
rtems_set_errno_and_return_minus_one( ENOTSUP );
25280: eb006450 bl 3e3c8 <__errno> <== NOT EXECUTED
25284: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
25288: e5803000 str r3, [r0] <== NOT EXECUTED
2528c: ea000008 b 252b4 <chroot+0x64> <== NOT EXECUTED
}
result = chdir(pathname);
25290: e1a00006 mov r0, r6
25294: ebffff76 bl 25074 <chdir>
if (result) {
25298: e250c000 subs ip, r0, #0
2529c: 0a000006 beq 252bc <chroot+0x6c>
rtems_set_errno_and_return_minus_one( errno );
252a0: eb006448 bl 3e3c8 <__errno> <== NOT EXECUTED
252a4: e1a04000 mov r4, r0 <== NOT EXECUTED
252a8: eb006446 bl 3e3c8 <__errno> <== NOT EXECUTED
252ac: e5903000 ldr r3, [r0] <== NOT EXECUTED
252b0: e5843000 str r3, [r4] <== NOT EXECUTED
252b4: e3e00000 mvn r0, #0 <== NOT EXECUTED
252b8: ea00001a b 25328 <chroot+0xd8> <== NOT EXECUTED
}
/* clone the new root location */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
252bc: e1a0200c mov r2, ip
252c0: e59f0070 ldr r0, [pc, #112] ; 25338 <chroot+0xe8>
252c4: e3a01001 mov r1, #1
252c8: e28d3004 add r3, sp, #4
252cc: e58dc000 str ip, [sp]
252d0: ebff88d9 bl 763c <rtems_filesystem_evaluate_path>
252d4: e3500000 cmp r0, #0
252d8: 1afffff0 bne 252a0 <chroot+0x50>
/* 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);
252dc: e59f304c ldr r3, [pc, #76] ; 25330 <chroot+0xe0>
252e0: e5930000 ldr r0, [r3]
252e4: e5903024 ldr r3, [r0, #36] ; 0x24
252e8: e3530000 cmp r3, #0
252ec: 0a000004 beq 25304 <chroot+0xb4>
252f0: e593301c ldr r3, [r3, #28]
252f4: e3530000 cmp r3, #0
252f8: 12800018 addne r0, r0, #24
252fc: 11a0e00f movne lr, pc
25300: 112fff13 bxne r3
rtems_filesystem_root = loc;
25304: e59f3024 ldr r3, [pc, #36] ; 25330 <chroot+0xe0>
25308: e28d4004 add r4, sp, #4
2530c: e593c000 ldr ip, [r3]
25310: e8b4000f ldm r4!, {r0, r1, r2, r3}
25314: e28cc018 add ip, ip, #24
25318: e8ac000f stmia ip!, {r0, r1, r2, r3}
2531c: e5943000 ldr r3, [r4]
25320: e58c3000 str r3, [ip]
25324: e3a00000 mov r0, #0
return 0;
}
25328: e28dd018 add sp, sp, #24
2532c: e8bd8070 pop {r4, r5, r6, pc}
000020c0 <create_disk>:
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
rtems_filesystem_split_dev_t(dev, major, minor);
if (major >= disktab_size) {
20c0: e59fc19c ldr ip, [pc, #412] ; 2264 <create_disk+0x1a4>
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
20c4: 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) {
20c8: e59c4000 ldr r4, [ip]
20cc: e1500004 cmp r0, r4
return disktab [major].minor + minor;
}
static rtems_status_code
create_disk(dev_t dev, const char *name, rtems_disk_device **dd_ptr)
{
20d0: e1a05000 mov r5, r0
20d4: e1a06001 mov r6, r1
20d8: e1a08002 mov r8, r2
20dc: e1a09003 mov r9, 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) {
20e0: 3a00000e bcc 2120 <create_disk+0x60>
rtems_disk_device_table *table = disktab;
rtems_device_major_number old_size = disktab_size;
rtems_device_major_number new_size = 2 * old_size;
20e4: e1a07084 lsl r7, r4, #1
if (major >= new_size) {
20e8: e1500007 cmp r0, r7
new_size = major + 1;
20ec: 22857001 addcs r7, 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;
20f0: e59c0004 ldr r0, [ip, #4]
if (major >= new_size) {
new_size = major + 1;
}
table = realloc(table, new_size * sizeof(*table));
20f4: e1a01187 lsl r1, r7, #3
20f8: eb0006cd bl 3c34 <realloc>
if (table == NULL) {
20fc: e250a000 subs sl, r0, #0
2100: 0a00004e beq 2240 <create_disk+0x180>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2104: e0642007 rsb r2, r4, r7 <== NOT EXECUTED
2108: e08a0184 add r0, sl, r4, lsl #3 <== NOT EXECUTED
210c: e1a02182 lsl r2, r2, #3 <== NOT EXECUTED
2110: e3a01000 mov r1, #0 <== NOT EXECUTED
2114: eb004291 bl 12b60 <memset> <== NOT EXECUTED
disktab = table;
2118: e59f3144 ldr r3, [pc, #324] ; 2264 <create_disk+0x1a4> <== NOT EXECUTED
disktab_size = new_size;
211c: e8830480 stm r3, {r7, sl} <== NOT EXECUTED
}
if (disktab [major].minor == NULL || minor >= disktab[major].size) {
2120: e59f313c ldr r3, [pc, #316] ; 2264 <create_disk+0x1a4>
2124: e5933004 ldr r3, [r3, #4]
2128: e7930185 ldr r0, [r3, r5, lsl #3]
212c: e1a0a185 lsl sl, r5, #3
2130: e3500000 cmp r0, #0
2134: e083300a add r3, r3, sl
2138: 0a000002 beq 2148 <create_disk+0x88>
213c: e5932004 ldr r2, [r3, #4]
2140: e1560002 cmp r6, r2
2144: 3a000013 bcc 2198 <create_disk+0xd8>
rtems_disk_device **table = disktab [major].minor;
rtems_device_minor_number old_size = disktab [major].size;
2148: e593b004 ldr fp, [r3, #4]
rtems_device_minor_number new_size = 0;
if (old_size == 0) {
214c: e35b0000 cmp fp, #0
2150: 03a04008 moveq r4, #8
new_size = DISKTAB_INITIAL_SIZE;
} else {
new_size = 2 * old_size;
2154: 11a0408b lslne r4, fp, #1
}
if (minor >= new_size) {
2158: e1560004 cmp r6, r4
new_size = minor + 1;
215c: 22864001 addcs r4, r6, #1
}
table = realloc(table, new_size * sizeof(*table));
2160: e1a01104 lsl r1, r4, #2
2164: eb0006b2 bl 3c34 <realloc>
if (table == NULL) {
2168: e2507000 subs r7, r0, #0
216c: 0a000033 beq 2240 <create_disk+0x180>
return NULL;
}
memset(table + old_size, 0, (new_size - old_size) * sizeof(*table));
2170: e06b2004 rsb r2, fp, r4
2174: e087010b add r0, r7, fp, lsl #2
2178: e1a02102 lsl r2, r2, #2
217c: e3a01000 mov r1, #0
2180: eb004276 bl 12b60 <memset>
disktab [major].minor = table;
2184: e59f30d8 ldr r3, [pc, #216] ; 2264 <create_disk+0x1a4>
2188: e5933004 ldr r3, [r3, #4]
218c: e083a00a add sl, r3, sl
2190: e7837185 str r7, [r3, r5, lsl #3]
disktab [major].size = new_size;
2194: e58a4004 str r4, [sl, #4]
}
return disktab [major].minor + minor;
2198: e59f30c4 ldr r3, [pc, #196] ; 2264 <create_disk+0x1a4>
219c: e5933004 ldr r3, [r3, #4]
21a0: e7937185 ldr r7, [r3, r5, lsl #3]
21a4: e0873106 add r3, r7, r6, lsl #2
{
rtems_disk_device **dd_entry = create_disk_table_entry(dev);
rtems_disk_device *dd = NULL;
char *alloc_name = NULL;
if (dd_entry == NULL) {
21a8: e3530000 cmp r3, #0
21ac: 0a000023 beq 2240 <create_disk+0x180>
return RTEMS_NO_MEMORY;
}
if (*dd_entry != NULL) {
21b0: e7973106 ldr r3, [r7, r6, lsl #2]
21b4: e3530000 cmp r3, #0
21b8: 13a0000c movne r0, #12
21bc: 18bd8ff0 popne {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return RTEMS_RESOURCE_IN_USE;
}
dd = malloc(sizeof(*dd));
21c0: e3a00034 mov r0, #52 ; 0x34
21c4: eb0003c8 bl 30ec <malloc>
if (dd == NULL) {
21c8: e2504000 subs r4, r0, #0
21cc: 0a00001b beq 2240 <create_disk+0x180>
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
21d0: e3580000 cmp r8, #0
21d4: 0a00000f beq 2218 <create_disk+0x158>
alloc_name = strdup(name);
21d8: e1a00008 mov r0, r8
21dc: eb0043da bl 1314c <strdup>
if (alloc_name == NULL) {
21e0: e3500000 cmp r0, #0
if (dd == NULL) {
return RTEMS_NO_MEMORY;
}
if (name != NULL) {
alloc_name = strdup(name);
21e4: e1a08000 mov r8, r0
21e8: e1a0a000 mov sl, r0
if (alloc_name == NULL) {
21ec: 1a000015 bne 2248 <create_disk+0x188>
free(dd);
21f0: e1a00004 mov r0, r4 <== NOT EXECUTED
21f4: eb0002f0 bl 2dbc <free> <== NOT EXECUTED
21f8: e3a0001a mov r0, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
21fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
free(alloc_name);
2200: e1a00008 mov r0, r8 <== NOT EXECUTED
2204: eb0002ec bl 2dbc <free> <== NOT EXECUTED
free(dd);
2208: e1a00004 mov r0, r4 <== NOT EXECUTED
220c: eb0002ea bl 2dbc <free> <== NOT EXECUTED
2210: e3a0000d mov r0, #13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
2214: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
2218: e1a0a008 mov sl, r8
}
}
dd->dev = dev;
dd->name = alloc_name;
dd->uses = 0;
221c: e3a00000 mov r0, #0
dd->deleted = false;
*dd_entry = dd;
2220: e7874106 str r4, [r7, r6, lsl #2]
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
2224: e5845000 str r5, [r4]
dd->name = alloc_name;
dd->uses = 0;
dd->deleted = false;
*dd_entry = dd;
*dd_ptr = dd;
2228: e5894000 str r4, [r9]
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
dd->name = alloc_name;
222c: e584a010 str sl, [r4, #16]
free(dd);
return RTEMS_UNSATISFIED;
}
}
dd->dev = dev;
2230: e5846004 str r6, [r4, #4]
dd->name = alloc_name;
dd->uses = 0;
2234: e5840014 str r0, [r4, #20]
dd->deleted = false;
2238: e5c40030 strb r0, [r4, #48] ; 0x30
*dd_entry = dd;
*dd_ptr = dd;
return RTEMS_SUCCESSFUL;
223c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
2240: e3a0001a mov r0, #26
}
2244: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
return RTEMS_NO_MEMORY;
}
}
if (name != NULL) {
if (mknod(alloc_name, 0777 | S_IFBLK, dev) < 0) {
2248: e59f1018 ldr r1, [pc, #24] ; 2268 <create_disk+0x1a8>
224c: e1a02005 mov r2, r5
2250: e1a03006 mov r3, r6
2254: eb0003e6 bl 31f4 <mknod>
2258: e3500000 cmp r0, #0
225c: aaffffee bge 221c <create_disk+0x15c>
2260: eaffffe6 b 2200 <create_disk+0x140> <== NOT EXECUTED
00008158 <devFS_evaluate_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8158: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
815c: e3d27007 bics r7, r2, #7
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
8160: e1a09000 mov r9, r0
8164: e1a04001 mov r4, r1
8168: e1a05003 mov r5, r3
int i;
rtems_device_name_t *device_name_table;
/* see if 'flags' is valid */
if ( !rtems_libio_is_valid_perms( flags ) )
816c: 0a000002 beq 817c <devFS_evaluate_path+0x24>
rtems_set_errno_and_return_minus_one( EPERM );
8170: eb00093e bl a670 <__errno> <== NOT EXECUTED
8174: e3a03001 mov r3, #1 <== NOT EXECUTED
8178: ea000005 b 8194 <devFS_evaluate_path+0x3c> <== NOT EXECUTED
/* get the device name table */
device_name_table = (rtems_device_name_t *)pathloc->node_access;
817c: e5936000 ldr r6, [r3]
if (!device_name_table)
8180: e3560000 cmp r6, #0
rtems_set_errno_and_return_minus_one( EFAULT );
for (i = 0; i < rtems_device_table_size; i++) {
8184: 159fa090 ldrne sl, [pc, #144] ; 821c <devFS_evaluate_path+0xc4>
if ( !rtems_libio_is_valid_perms( flags ) )
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)
8188: 1a000019 bne 81f4 <devFS_evaluate_path+0x9c>
rtems_set_errno_and_return_minus_one( EFAULT );
818c: eb000937 bl a670 <__errno> <== NOT EXECUTED
8190: e3a0300e mov r3, #14 <== NOT EXECUTED
8194: e5803000 str r3, [r0] <== NOT EXECUTED
8198: e3e00000 mvn r0, #0 <== NOT EXECUTED
819c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
for (i = 0; i < rtems_device_table_size; i++) {
if (!device_name_table[i].device_name)
81a0: e5968000 ldr r8, [r6]
81a4: e2581000 subs r1, r8, #0
81a8: 0a00000f beq 81ec <devFS_evaluate_path+0x94>
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
81ac: eb000ce5 bl b548 <strncmp>
81b0: e3500000 cmp r0, #0
81b4: 1a00000c bne 81ec <devFS_evaluate_path+0x94>
continue;
if (device_name_table[i].device_name[pathnamelen] != '\0')
81b8: e7d80004 ldrb r0, [r8, r4]
81bc: e3500000 cmp r0, #0
81c0: 1a000009 bne 81ec <devFS_evaluate_path+0x94>
/* 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;
81c4: e59f3054 ldr r3, [pc, #84] ; 8220 <devFS_evaluate_path+0xc8>
81c8: e5933000 ldr r3, [r3]
81cc: e5933028 ldr r3, [r3, #40] ; 0x28
81d0: e5853010 str r3, [r5, #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;
81d4: e59f3048 ldr r3, [pc, #72] ; 8224 <devFS_evaluate_path+0xcc>
81d8: e5853008 str r3, [r5, #8]
pathloc->ops = &devFS_ops;
81dc: e59f3044 ldr r3, [pc, #68] ; 8228 <devFS_evaluate_path+0xd0>
if (device_name_table[i].device_name[pathnamelen] != '\0')
continue;
/* find the device, set proper values */
pathloc->node_access = (void *)&device_name_table[i];
81e0: e5856000 str r6, [r5]
pathloc->handlers = &devFS_file_handlers;
pathloc->ops = &devFS_ops;
81e4: e585300c str r3, [r5, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
81e8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
/* 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++) {
81ec: e2877001 add r7, r7, #1
81f0: e2866014 add r6, r6, #20
81f4: e59a3000 ldr r3, [sl]
81f8: e1570003 cmp r7, r3
if (!device_name_table[i].device_name)
continue;
if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
81fc: e1a00009 mov r0, r9
8200: e1a02004 mov r2, r4
/* 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++) {
8204: 3affffe5 bcc 81a0 <devFS_evaluate_path+0x48>
pathloc->mt_entry = rtems_filesystem_root.mt_entry;
return 0;
}
/* no such file or directory */
rtems_set_errno_and_return_minus_one( ENOENT );
8208: eb000918 bl a670 <__errno>
820c: e3a03002 mov r3, #2
8210: e5803000 str r3, [r0]
8214: e3e00000 mvn r0, #0
}
8218: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
000012a4 <devFS_initialize>:
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
12a4: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_device_name_t *device_name_table;
/* allocate device only filesystem name table */
device_name_table = (rtems_device_name_t *)_Workspace_Allocate(
12a8: e59f7058 ldr r7, [pc, #88] ; 1308 <devFS_initialize+0x64>
12ac: e5973000 ldr r3, [r7]
12b0: e3a06014 mov r6, #20
int devFS_initialize(
rtems_filesystem_mount_table_entry_t *temp_mt_entry,
const void *data
)
{
12b4: 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(
12b8: e0000396 mul r0, r6, r3
12bc: eb001a79 bl 7ca8 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size )
);
/* no memory for device filesystem */
if (!device_name_table)
12c0: e2505000 subs r5, r0, #0
12c4: 1a000004 bne 12dc <devFS_initialize+0x38>
rtems_set_errno_and_return_minus_one( ENOMEM );
12c8: eb0024e8 bl a670 <__errno> <== NOT EXECUTED
12cc: e3a0300c mov r3, #12 <== NOT EXECUTED
12d0: e5803000 str r3, [r0] <== NOT EXECUTED
12d4: e3e00000 mvn r0, #0 <== NOT EXECUTED
12d8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
memset(
12dc: e5972000 ldr r2, [r7]
12e0: e3a01000 mov r1, #0
12e4: e0020296 mul r2, r6, r2
12e8: eb00270e bl af28 <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;
12ec: e59f3018 ldr r3, [pc, #24] ; 130c <devFS_initialize+0x68>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
12f0: 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;
12f4: 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;
12f8: 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;
12fc: 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;
1300: e3a00000 mov r0, #0
return 0;
}
1304: e8bd80f0 pop {r4, r5, r6, r7, pc}
00001310 <devFS_mknod>:
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
1310: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
1314: 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') &&
1318: e5d00000 ldrb r0, [r0]
131c: e3500064 cmp r0, #100 ; 0x64
const char *path,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
1320: e1a05001 mov r5, r1
1324: e58d2000 str r2, [sp]
1328: e1a09003 mov r9, 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') &&
132c: 1a000008 bne 1354 <devFS_mknod+0x44>
1330: e5d43001 ldrb r3, [r4, #1]
1334: e3530065 cmp r3, #101 ; 0x65
1338: 1a000005 bne 1354 <devFS_mknod+0x44>
(path[2] == 'v') && (path[3] == '\0'))
133c: e5d43002 ldrb r3, [r4, #2]
1340: e3530076 cmp r3, #118 ; 0x76
1344: 1a000002 bne 1354 <devFS_mknod+0x44>
1348: e5d40003 ldrb r0, [r4, #3]
134c: e3500000 cmp r0, #0
1350: 0a000039 beq 143c <devFS_mknod+0x12c>
return 0;
/* must be a character device or a block device */
if (!S_ISBLK(mode) && !S_ISCHR(mode))
1354: e205aa0f and sl, r5, #61440 ; 0xf000
1358: e35a0a02 cmp sl, #8192 ; 0x2000
135c: 135a0a06 cmpne sl, #24576 ; 0x6000
1360: 03a0a000 moveq sl, #0
1364: 13a0a001 movne sl, #1
1368: 0a000002 beq 1378 <devFS_mknod+0x68>
rtems_set_errno_and_return_minus_one( EINVAL );
136c: eb0024bf bl a670 <__errno> <== NOT EXECUTED
1370: e3a03016 mov r3, #22 <== NOT EXECUTED
1374: ea000008 b 139c <devFS_mknod+0x8c> <== NOT EXECUTED
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;
1378: e59d3028 ldr r3, [sp, #40] ; 0x28
137c: e5936000 ldr r6, [r3]
if (!device_name_table)
1380: e3560000 cmp r6, #0
1384: 13e07000 mvnne r7, #0
1388: 11a0800a movne r8, sl
rtems_set_errno_and_return_minus_one( EFAULT );
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
138c: 159fb0ac ldrne fp, [pc, #172] ; 1440 <devFS_mknod+0x130>
1390: 1a000010 bne 13d8 <devFS_mknod+0xc8>
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 );
1394: eb0024b5 bl a670 <__errno> <== NOT EXECUTED
1398: e3a0300e mov r3, #14 <== NOT EXECUTED
139c: e5803000 str r3, [r0] <== NOT EXECUTED
13a0: e3e00000 mvn r0, #0 <== NOT EXECUTED
13a4: ea000024 b 143c <devFS_mknod+0x12c> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){
if (device_name_table[i].device_name == NULL)
13a8: e796300a ldr r3, [r6, sl]
13ac: e2531000 subs r1, r3, #0
13b0: 0a000005 beq 13cc <devFS_mknod+0xbc>
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
13b4: eb002783 bl b1c8 <strcmp> <== NOT EXECUTED
13b8: e3500000 cmp r0, #0 <== NOT EXECUTED
13bc: 1a000003 bne 13d0 <devFS_mknod+0xc0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EEXIST );
13c0: eb0024aa bl a670 <__errno> <== NOT EXECUTED
13c4: e3a03011 mov r3, #17 <== NOT EXECUTED
13c8: eafffff3 b 139c <devFS_mknod+0x8c> <== NOT EXECUTED
13cc: e1a07008 mov r7, r8
/* 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++){
13d0: e2888001 add r8, r8, #1
13d4: e28aa014 add sl, sl, #20
13d8: e59b3000 ldr r3, [fp]
13dc: e1580003 cmp r8, r3
if (device_name_table[i].device_name == NULL)
slot = i;
else
if (strcmp(path, device_name_table[i].device_name) == 0)
13e0: e1a00004 mov r0, r4
/* 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++){
13e4: 3affffef bcc 13a8 <devFS_mknod+0x98>
else
if (strcmp(path, device_name_table[i].device_name) == 0)
rtems_set_errno_and_return_minus_one( EEXIST );
}
if (slot == -1)
13e8: e3770001 cmn r7, #1
13ec: 1a000004 bne 1404 <devFS_mknod+0xf4>
rtems_set_errno_and_return_minus_one( ENOMEM );
13f0: eb00249e bl a670 <__errno> <== NOT EXECUTED
13f4: e3a0300c mov r3, #12 <== NOT EXECUTED
13f8: e5803000 str r3, [r0] <== NOT EXECUTED
13fc: e1a00007 mov r0, r7 <== NOT EXECUTED
1400: ea00000d b 143c <devFS_mknod+0x12c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
1404: e10f8000 mrs r8, CPSR
1408: e3883080 orr r3, r8, #128 ; 0x80
140c: e129f003 msr CPSR_fc, r3
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
1410: e3a02014 mov r2, #20
1414: e0030792 mul r3, r2, r7
device_name_table[slot].device_name_length = strlen(path);
1418: e1a00004 mov r0, r4
if (slot == -1)
rtems_set_errno_and_return_minus_one( ENOMEM );
_ISR_Disable(level);
device_name_table[slot].device_name = (char *)path;
141c: e7864003 str r4, [r6, r3]
1420: e0866003 add r6, r6, r3
device_name_table[slot].device_name_length = strlen(path);
1424: eb00282f bl b4e8 <strlen>
device_name_table[slot].major = major;
1428: e59d3000 ldr r3, [sp]
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
142c: e5865010 str r5, [r6, #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);
1430: e9860209 stmib r6, {r0, r3, r9}
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
1434: e129f008 msr CPSR_fc, r8
1438: e3a00000 mov r0, #0
device_name_table[slot].minor = minor;
device_name_table[slot].mode = mode;
_ISR_Enable(level);
return 0;
}
143c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000014c0 <devFS_read>:
ssize_t devFS_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
14c0: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED
14c4: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
14c8: 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;
14cc: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags;
args.bytes_moved = 0;
14d0: e3a02000 mov r2, #0 <== NOT EXECUTED
14d4: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
14d8: 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;
14dc: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
14e0: e283c00c add ip, r3, #12 <== NOT EXECUTED
14e4: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
14e8: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
14ec: e2820008 add r0, r2, #8 <== NOT EXECUTED
14f0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
14f4: 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;
14f8: 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;
14fc: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
1500: eb000f83 bl 5314 <rtems_io_read> <== NOT EXECUTED
np->major,
np->minor,
(void *) &args
);
if ( status )
1504: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
1508: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
150c: 1b001b46 blne 822c <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
1510: e28dd01c add sp, sp, #28 <== NOT EXECUTED
1514: e8bd8800 pop {fp, pc} <== NOT EXECUTED
00001518 <devFS_stat>:
struct stat *buf
)
{
rtems_device_name_t *the_dev;
the_dev = (rtems_device_name_t *)loc->node_access;
1518: e5903000 ldr r3, [r0]
if (!the_dev)
151c: e3530000 cmp r3, #0
int devFS_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
1520: 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)
1524: 1a000004 bne 153c <devFS_stat+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
1528: eb002450 bl a670 <__errno> <== NOT EXECUTED
152c: e3a0300e mov r3, #14 <== NOT EXECUTED
1530: e5803000 str r3, [r0] <== NOT EXECUTED
1534: e3e00000 mvn r0, #0 <== NOT EXECUTED
1538: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor );
buf->st_mode = the_dev->mode;
153c: 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 );
1540: e593200c ldr r2, [r3, #12]
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
1544: e5933008 ldr r3, [r3, #8]
1548: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
154c: 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 );
1550: e5813018 str r3, [r1, #24]
buf->st_mode = the_dev->mode;
1554: e3a00000 mov r0, #0
return 0;
}
1558: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000d15c <device_read>:
ssize_t device_read(
rtems_libio_t *iop,
void *buffer,
size_t count
)
{
d15c: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr}
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
d160: e5903014 ldr r3, [r0, #20]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
d164: e280c00c add ip, r0, #12
d168: e89c1800 ldm ip, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
d16c: e58d3014 str r3, [sp, #20]
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
d170: e98d1800 stmib sp, {fp, ip}
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
d174: e3a03000 mov r3, #0
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
d178: e58d2010 str r2, [sp, #16]
args.flags = iop->flags;
args.bytes_moved = 0;
d17c: e58d3018 str r3, [sp, #24]
the_jnode = iop->file_info;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
d180: e58d100c str r1, [sp, #12]
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
args.iop = iop;
d184: e58d0000 str r0, [sp]
{
rtems_libio_rw_args_t args;
rtems_status_code status;
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
d188: e5903038 ldr r3, [r0, #56] ; 0x38
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
status = rtems_io_read(
d18c: e1a0200d mov r2, sp
d190: e2830050 add r0, r3, #80 ; 0x50
d194: e8900003 ldm r0, {r0, r1}
d198: eb00047d bl e394 <rtems_io_read>
the_jnode->info.device.major,
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
d19c: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status);
return (ssize_t) args.bytes_moved;
d1a0: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
the_jnode->info.device.minor,
(void *) &args
);
if ( status )
return rtems_deviceio_errno(status);
d1a4: 1b000501 blne e5b0 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
d1a8: e28dd01c add sp, sp, #28 <== NOT EXECUTED
d1ac: e8bd8800 pop {fp, pc} <== NOT EXECUTED
00001d80 <disk_unlock>:
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
1d80: e59f3020 ldr r3, [pc, #32] ; 1da8 <disk_unlock+0x28>
1d84: e3a02000 mov r2, #0
}
}
static void
disk_unlock(void)
{
1d88: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
sc = rtems_semaphore_release(diskdevs_mutex);
1d8c: e5930008 ldr r0, [r3, #8]
static void
disk_unlock(void)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
diskdevs_protected = false;
1d90: e5c3200c strb r2, [r3, #12]
sc = rtems_semaphore_release(diskdevs_mutex);
1d94: eb0011c0 bl 649c <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL) {
1d98: e3500000 cmp r0, #0
1d9c: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
/* FIXME: Error number */
rtems_fatal_error_occurred(0xdeadbeef);
1da0: e59f0004 ldr r0, [pc, #4] ; 1dac <disk_unlock+0x2c> <== NOT EXECUTED
1da4: eb0012e5 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
00003aa0 <drainOutput>:
drainOutput (struct rtems_termios_tty *tty)
{
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3aa0: e59030b4 ldr r3, [r0, #180] ; 0xb4
3aa4: e3530000 cmp r3, #0
/*
* Drain output queue
*/
static void
drainOutput (struct rtems_termios_tty *tty)
{
3aa8: e92d4030 push {r4, r5, lr}
3aac: e1a04000 mov r4, r0
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3ab0: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3ab4: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3ab8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
3abc: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable (level);
while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) {
tty->rawOutBufState = rob_wait;
3ac0: e3a05002 mov r5, #2 <== 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) {
3ac4: ea00000a b 3af4 <drainOutput+0x54> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
3ac8: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3acc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
3ad0: e3a01000 mov r1, #0 <== NOT EXECUTED
3ad4: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
3ad8: e1a02001 mov r2, r1 <== NOT EXECUTED
3adc: eb0005ae bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3ae0: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3ae4: 1b000730 blne 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3ae8: e10f3000 mrs r3, CPSR <== NOT EXECUTED
3aec: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
3af0: 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) {
3af4: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED
3af8: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED
3afc: e1510002 cmp r1, r2 <== NOT EXECUTED
3b00: 1afffff0 bne 3ac8 <drainOutput+0x28> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3b04: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
3b08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00002568 <dup2>:
int dup2(
int fildes,
int fildes2
)
{
2568: e92d4070 push {r4, r5, r6, lr}
256c: e24dd048 sub sp, sp, #72 ; 0x48
2570: e1a04001 mov r4, r1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2574: e1a0100d mov r1, sp
int dup2(
int fildes,
int fildes2
)
{
2578: e1a06000 mov r6, r0
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
257c: eb000181 bl 2b88 <fstat>
if ( status == -1 )
2580: e3700001 cmn r0, #1
/*
* If fildes is not valid, then fildes2 should not be closed.
*/
status = fstat( fildes, &buf );
2584: e1a0500d mov r5, sp
if ( status == -1 )
2588: 0a000009 beq 25b4 <dup2+0x4c>
/*
* If fildes2 is not valid, then we should not do anything either.
*/
status = fstat( fildes2, &buf );
258c: e1a0100d mov r1, sp
2590: e1a00004 mov r0, r4
2594: eb00017b bl 2b88 <fstat>
if ( status == -1 )
2598: e3700001 cmn r0, #1
259c: 0a000004 beq 25b4 <dup2+0x4c>
/*
* This fcntl handles everything else.
*/
return fcntl( fildes, F_DUPFD, fildes2 );
25a0: e1a00006 mov r0, r6 <== NOT EXECUTED
25a4: e1a02004 mov r2, r4 <== NOT EXECUTED
25a8: e3a01000 mov r1, #0 <== NOT EXECUTED
25ac: eb00007b bl 27a0 <fcntl> <== NOT EXECUTED
25b0: ea000000 b 25b8 <dup2+0x50> <== NOT EXECUTED
25b4: e3e00000 mvn r0, #0
}
25b8: e28dd048 add sp, sp, #72 ; 0x48
25bc: e8bd8070 pop {r4, r5, r6, pc}
000035a0 <echo>:
* 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')) {
35a0: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED
35a4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Echo a typed character
*/
static void
echo (unsigned char c, struct rtems_termios_tty *tty)
{
35a8: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
35ac: e1a04001 mov r4, r1 <== NOT EXECUTED
35b0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
35b4: 0a000015 beq 3610 <echo+0x70> <== NOT EXECUTED
35b8: e59f305c ldr r3, [pc, #92] ; 361c <echo+0x7c> <== NOT EXECUTED
35bc: e5933000 ldr r3, [r3] <== NOT EXECUTED
35c0: e0833000 add r3, r3, r0 <== NOT EXECUTED
35c4: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
35c8: e2503009 subs r3, r0, #9 <== NOT EXECUTED
35cc: 13a03001 movne r3, #1 <== NOT EXECUTED
35d0: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED
35d4: 0a00000d beq 3610 <echo+0x70> <== NOT EXECUTED
35d8: e350000a cmp r0, #10 <== NOT EXECUTED
35dc: 0a00000b beq 3610 <echo+0x70> <== NOT EXECUTED
char echobuf[2];
echobuf[0] = '^';
echobuf[1] = c ^ 0x40;
35e0: 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] = '^';
35e4: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
35e8: e1a0000d mov r0, sp <== NOT EXECUTED
35ec: e3a01002 mov r1, #2 <== NOT EXECUTED
35f0: 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;
35f4: 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] = '^';
35f8: e5cdc000 strb ip, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
35fc: ebffff50 bl 3344 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
3600: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3604: e2833002 add r3, r3, #2 <== NOT EXECUTED
3608: 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')) {
360c: ea000001 b 3618 <echo+0x78> <== NOT EXECUTED
echobuf[1] = c ^ 0x40;
rtems_termios_puts (echobuf, 2, tty);
tty->column += 2;
}
else {
oproc (c, tty);
3610: e1a01004 mov r1, r4 <== NOT EXECUTED
3614: ebffff8b bl 3448 <oproc> <== NOT EXECUTED
}
}
3618: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
000256cc <endgrent>:
group_fp = fopen("/etc/group", "r");
}
void endgrent(void)
{
if (group_fp != NULL)
256cc: e59f300c ldr r3, [pc, #12] ; 256e0 <endgrent+0x14> <== NOT EXECUTED
256d0: e5930000 ldr r0, [r3] <== NOT EXECUTED
256d4: e3500000 cmp r0, #0 <== NOT EXECUTED
256d8: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
256dc: ea006386 b 3e4fc <fclose> <== NOT EXECUTED
000256e4 <endpwent>:
passwd_fp = fopen("/etc/passwd", "r");
}
void endpwent(void)
{
if (passwd_fp != NULL)
256e4: e59f300c ldr r3, [pc, #12] ; 256f8 <endpwent+0x14> <== NOT EXECUTED
256e8: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
256ec: e3500000 cmp r0, #0 <== NOT EXECUTED
256f0: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
256f4: ea006380 b 3e4fc <fclose> <== NOT EXECUTED
00003620 <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)
3620: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
3624: 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)
{
3628: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
362c: e1a04000 mov r4, r0 <== NOT EXECUTED
3630: e1a07001 mov r7, r1 <== NOT EXECUTED
if (tty->ccount == 0)
3634: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return;
if (lineFlag) {
3638: e3510000 cmp r1, #0 <== NOT EXECUTED
363c: 0a000062 beq 37cc <erase+0x1ac> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
3640: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED
3644: e2132008 ands r2, r3, #8 <== NOT EXECUTED
tty->ccount = 0;
3648: 05802020 streq r2, [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)) {
364c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
tty->ccount = 0;
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
3650: e2133010 ands r3, r3, #16 <== NOT EXECUTED
3654: 1a00005c bne 37cc <erase+0x1ac> <== NOT EXECUTED
tty->ccount = 0;
3658: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
365c: e1a01004 mov r1, r4 <== NOT EXECUTED
3660: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED
3664: ebffffcd bl 35a0 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
3668: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
366c: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
3670: 11a01004 movne r1, r4 <== NOT EXECUTED
3674: 13a0000a movne r0, #10 <== NOT EXECUTED
return;
}
if (!(tty->termios.c_lflag & ECHOE)) {
tty->ccount = 0;
echo (tty->termios.c_cc[VKILL], tty);
if (tty->termios.c_lflag & ECHOK)
3678: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
367c: ea00000c b 36b4 <erase+0x94> <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3680: e2411001 sub r1, r1, #1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3684: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3688: e5841020 str r1, [r4, #32] <== NOT EXECUTED
368c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3690: e3130008 tst r3, #8 <== NOT EXECUTED
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
unsigned char c = tty->cbuf[--tty->ccount];
3694: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
3698: 0a000048 beq 37c0 <erase+0x1a0> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
369c: e3570000 cmp r7, #0 <== NOT EXECUTED
36a0: 1a000005 bne 36bc <erase+0x9c> <== NOT EXECUTED
36a4: e3130010 tst r3, #16 <== NOT EXECUTED
36a8: 1a000003 bne 36bc <erase+0x9c> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
36ac: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED
36b0: e1a01004 mov r1, r4 <== NOT EXECUTED
}
}
if (!lineFlag)
break;
}
}
36b4: e8bd41f0 pop {r4, r5, r6, r7, r8, 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);
36b8: eaffffb8 b 35a0 <echo> <== NOT EXECUTED
}
else if (c == '\t') {
36bc: e3550009 cmp r5, #9 <== NOT EXECUTED
36c0: 1a000020 bne 3748 <erase+0x128> <== NOT EXECUTED
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
if (tty->termios.c_lflag & ECHOCTL)
36c4: e2033c02 and r3, r3, #512 ; 0x200 <== 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;
36c8: e594502c ldr r5, [r4, #44] ; 0x2c <== NOT EXECUTED
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
36cc: e596c000 ldr ip, [r6] <== NOT EXECUTED
36d0: e3a02000 mov r2, #0 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
36d4: ea00000d b 3710 <erase+0xf0> <== NOT EXECUTED
c = tty->cbuf[i++];
36d8: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
36dc: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED
if (c == '\t') {
36e0: e3500009 cmp r0, #9 <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
36e4: e08c8000 add r8, ip, r0 <== NOT EXECUTED
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
col = (col | 7) + 1;
36e8: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
if (c == '\t') {
36ec: 0a000005 beq 3708 <erase+0xe8> <== NOT EXECUTED
col = (col | 7) + 1;
}
else if (iscntrl (c)) {
36f0: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED
36f4: e3100020 tst r0, #32 <== NOT EXECUTED
36f8: 0a000002 beq 3708 <erase+0xe8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
36fc: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
3700: 12855002 addne r5, r5, #2 <== NOT EXECUTED
3704: ea000000 b 370c <erase+0xec> <== NOT EXECUTED
}
else {
col++;
3708: e2855001 add r5, r5, #1 <== NOT EXECUTED
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
c = tty->cbuf[i++];
370c: e2822001 add r2, r2, #1 <== NOT EXECUTED
int i = 0;
/*
* Find the character before the tab
*/
while (i != tty->ccount) {
3710: e1520001 cmp r2, r1 <== NOT EXECUTED
3714: 1affffef bne 36d8 <erase+0xb8> <== NOT EXECUTED
3718: ea000006 b 3738 <erase+0x118> <== NOT EXECUTED
/*
* Back up over the tab
*/
while (tty->column > col) {
rtems_termios_puts ("\b", 1, tty);
371c: e59f00bc ldr r0, [pc, #188] ; 37e0 <erase+0x1c0> <== NOT EXECUTED
3720: e3a01001 mov r1, #1 <== NOT EXECUTED
3724: e1a02004 mov r2, r4 <== NOT EXECUTED
3728: ebffff05 bl 3344 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
372c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3730: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3734: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/*
* Back up over the tab
*/
while (tty->column > col) {
3738: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
373c: e1530005 cmp r3, r5 <== NOT EXECUTED
3740: cafffff5 bgt 371c <erase+0xfc> <== NOT EXECUTED
3744: ea00001d b 37c0 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty);
tty->column--;
}
}
else {
if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
3748: e5962000 ldr r2, [r6] <== NOT EXECUTED
374c: e2855001 add r5, r5, #1 <== NOT EXECUTED
3750: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED
3754: e3120020 tst r2, #32 <== NOT EXECUTED
3758: 0a000009 beq 3784 <erase+0x164> <== NOT EXECUTED
375c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
3760: 0a000007 beq 3784 <erase+0x164> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
3764: e59f0078 ldr r0, [pc, #120] ; 37e4 <erase+0x1c4> <== NOT EXECUTED
3768: e3a01003 mov r1, #3 <== NOT EXECUTED
376c: e1a02004 mov r2, r4 <== NOT EXECUTED
3770: ebfffef3 bl 3344 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3774: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3778: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
377c: 12433001 subne r3, r3, #1 <== NOT EXECUTED
3780: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
3784: e5963000 ldr r3, [r6] <== NOT EXECUTED
3788: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED
378c: e3130020 tst r3, #32 <== NOT EXECUTED
3790: 0a000002 beq 37a0 <erase+0x180> <== NOT EXECUTED
3794: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3798: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
379c: 0a000007 beq 37c0 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
37a0: e59f003c ldr r0, [pc, #60] ; 37e4 <erase+0x1c4> <== NOT EXECUTED
37a4: e3a01003 mov r1, #3 <== NOT EXECUTED
37a8: e1a02004 mov r2, r4 <== NOT EXECUTED
37ac: ebfffee4 bl 3344 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
37b0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
37b4: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
37b8: 12433001 subne r3, r3, #1 <== NOT EXECUTED
37bc: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
}
}
}
if (!lineFlag)
37c0: e3570000 cmp r7, #0 <== NOT EXECUTED
37c4: 1a000001 bne 37d0 <erase+0x1b0> <== NOT EXECUTED
37c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
37cc: e59f6014 ldr r6, [pc, #20] ; 37e8 <erase+0x1c8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
echo ('\n', tty);
return;
}
}
while (tty->ccount) {
37d0: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
37d4: e3510000 cmp r1, #0 <== NOT EXECUTED
37d8: 1affffa8 bne 3680 <erase+0x60> <== NOT EXECUTED
37dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000229d4 <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)
{
229d4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
229d8: 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)
229dc: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED
229e0: 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)
{
229e4: e1a05001 mov r5, r1 <== NOT EXECUTED
229e8: e1a07002 mov r7, r2 <== NOT EXECUTED
229ec: e1a0a003 mov sl, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
uint8_t i;
bool sec_of_fat;
if (fs_info->c.state == FAT_CACHE_EMPTY)
229f0: 1a00000f bne 22a34 <fat_buf_access+0x60> <== NOT EXECUTED
{
if (op_type == FAT_OP_TYPE_READ)
229f4: e3520001 cmp r2, #1 <== NOT EXECUTED
229f8: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
229fc: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
22a00: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED
22a04: 1a000002 bne 22a14 <fat_buf_access+0x40> <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
22a08: e1a02005 mov r2, r5 <== NOT EXECUTED
22a0c: ebff8a35 bl 52e8 <rtems_bdbuf_read> <== NOT EXECUTED
22a10: ea000001 b 22a1c <fat_buf_access+0x48> <== NOT EXECUTED
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
22a14: e1a02005 mov r2, r5 <== NOT EXECUTED
22a18: ebff89ff bl 521c <rtems_bdbuf_get> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
22a1c: e3500000 cmp r0, #0 <== NOT EXECUTED
22a20: 1a000058 bne 22b88 <fat_buf_access+0x1b4> <== 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;
22a24: 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;
22a28: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_ACTUAL;
22a2c: e5c43081 strb r3, [r4, #129] ; 0x81 <== 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;
22a30: e584507c str r5, [r4, #124] ; 0x7c <== NOT EXECUTED
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) &&
22a34: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
22a38: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED
22a3c: e1530002 cmp r3, r2 <== NOT EXECUTED
22a40: 33a06000 movcc r6, #0 <== NOT EXECUTED
22a44: 3a000003 bcc 22a58 <fat_buf_access+0x84> <== NOT EXECUTED
22a48: e594601c ldr r6, [r4, #28] <== NOT EXECUTED
22a4c: e1530006 cmp r3, r6 <== NOT EXECUTED
22a50: 23a06000 movcs r6, #0 <== NOT EXECUTED
22a54: 33a06001 movcc r6, #1 <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.blk_num != blk)
22a58: e1530005 cmp r3, r5 <== NOT EXECUTED
22a5c: 0a00004e beq 22b9c <fat_buf_access+0x1c8> <== NOT EXECUTED
{
if (fs_info->c.modified)
22a60: e5d48080 ldrb r8, [r4, #128] ; 0x80 <== NOT EXECUTED
22a64: e3580000 cmp r8, #0 <== NOT EXECUTED
22a68: 0a000032 beq 22b38 <fat_buf_access+0x164> <== NOT EXECUTED
{
if (sec_of_fat && !fs_info->vol.mirror)
22a6c: e21660ff ands r6, r6, #255 ; 0xff <== NOT EXECUTED
22a70: 0a000006 beq 22a90 <fat_buf_access+0xbc> <== NOT EXECUTED
22a74: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
22a78: e3530000 cmp r3, #0 <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer,
22a7c: 05943084 ldreq r3, [r4, #132] ; 0x84 <== NOT EXECUTED
22a80: 05940088 ldreq r0, [r4, #136] ; 0x88 <== NOT EXECUTED
22a84: 05931020 ldreq r1, [r3, #32] <== NOT EXECUTED
22a88: 01d420b0 ldrheq r2, [r4] <== NOT EXECUTED
22a8c: 0b007afd bleq 41688 <memcpy> <== NOT EXECUTED
fs_info->vol.bps);
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
22a90: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
22a94: ebff85b1 bl 4160 <rtems_bdbuf_release_modified> <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
22a98: e3a03000 mov r3, #0 <== NOT EXECUTED
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
22a9c: 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;
22aa0: 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;
22aa4: e5c43081 strb r3, [r4, #129] ; 0x81 <== NOT EXECUTED
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
22aa8: 1a000036 bne 22b88 <fat_buf_access+0x1b4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
22aac: e3560000 cmp r6, #0 <== NOT EXECUTED
22ab0: 0a000025 beq 22b4c <fat_buf_access+0x178> <== NOT EXECUTED
22ab4: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
22ab8: e3530000 cmp r3, #0 <== NOT EXECUTED
22abc: 03a06001 moveq r6, #1 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
22ac0: 01a0800d moveq r8, sp <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
fs_info->c.modified = 0;
if (sc != RTEMS_SUCCESSFUL)
rtems_set_errno_and_return_minus_one(EIO);
if (sec_of_fat && !fs_info->vol.mirror)
22ac4: 0a000016 beq 22b24 <fat_buf_access+0x150> <== NOT EXECUTED
22ac8: ea00001f b 22b4c <fat_buf_access+0x178> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
22acc: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
22ad0: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
22ad4: e0222691 mla r2, r1, r6, r2 <== NOT EXECUTED
22ad8: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
22adc: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
22ae0: ebff89cd bl 521c <rtems_bdbuf_get> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
22ae4: e3500000 cmp r0, #0 <== NOT EXECUTED
22ae8: 1a000008 bne 22b10 <fat_buf_access+0x13c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
22aec: e59d3000 ldr r3, [sp] <== NOT EXECUTED
22af0: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
22af4: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
22af8: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
22afc: eb007ae1 bl 41688 <memcpy> <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
22b00: e59d0000 ldr r0, [sp] <== NOT EXECUTED
22b04: ebff8595 bl 4160 <rtems_bdbuf_release_modified> <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
22b08: e3500000 cmp r0, #0 <== NOT EXECUTED
22b0c: 0a000002 beq 22b1c <fat_buf_access+0x148> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
22b10: eb006e2c bl 3e3c8 <__errno> <== NOT EXECUTED
22b14: e3a0300c mov r3, #12 <== NOT EXECUTED
22b18: ea00001c b 22b90 <fat_buf_access+0x1bc> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
22b1c: e2866001 add r6, r6, #1 <== NOT EXECUTED
22b20: e20660ff and r6, r6, #255 ; 0xff <== NOT EXECUTED
22b24: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED
22b28: e1520006 cmp r2, r6 <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
22b2c: e1a0300d mov r3, sp <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
22b30: 8affffe5 bhi 22acc <fat_buf_access+0xf8> <== NOT EXECUTED
22b34: ea000004 b 22b4c <fat_buf_access+0x178> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
22b38: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
22b3c: ebff85a9 bl 41e8 <rtems_bdbuf_release> <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_EMPTY;
if (sc != RTEMS_SUCCESSFUL)
22b40: e3500000 cmp r0, #0 <== NOT EXECUTED
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
fs_info->c.state = FAT_CACHE_EMPTY;
22b44: e5c48081 strb r8, [r4, #129] ; 0x81 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
22b48: 1a00000e bne 22b88 <fat_buf_access+0x1b4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
}
if (op_type == FAT_OP_TYPE_READ)
22b4c: e3570001 cmp r7, #1 <== NOT EXECUTED
22b50: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
22b54: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
22b58: e2843084 add r3, r4, #132 ; 0x84 <== NOT EXECUTED
22b5c: 1a000002 bne 22b6c <fat_buf_access+0x198> <== NOT EXECUTED
sc = rtems_bdbuf_read(fs_info->vol.dev, blk, &fs_info->c.buf);
22b60: e1a02005 mov r2, r5 <== NOT EXECUTED
22b64: ebff89df bl 52e8 <rtems_bdbuf_read> <== NOT EXECUTED
22b68: ea000001 b 22b74 <fat_buf_access+0x1a0> <== NOT EXECUTED
else
sc = rtems_bdbuf_get(fs_info->vol.dev, blk, &fs_info->c.buf);
22b6c: e1a02005 mov r2, r5 <== NOT EXECUTED
22b70: ebff89a9 bl 521c <rtems_bdbuf_get> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
22b74: 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;
22b78: 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;
22b7c: 0584507c streq r5, [r4, #124] ; 0x7c <== NOT EXECUTED
fs_info->c.state = FAT_CACHE_ACTUAL;
22b80: 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)
22b84: 0a000004 beq 22b9c <fat_buf_access+0x1c8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
22b88: eb006e0e bl 3e3c8 <__errno> <== NOT EXECUTED
22b8c: e3a03005 mov r3, #5 <== NOT EXECUTED
22b90: e5803000 str r3, [r0] <== NOT EXECUTED
22b94: e3e00000 mvn r0, #0 <== NOT EXECUTED
22b98: ea000002 b 22ba8 <fat_buf_access+0x1d4> <== NOT EXECUTED
fs_info->c.blk_num = blk;
fs_info->c.state = FAT_CACHE_ACTUAL;
}
*buf = fs_info->c.buf;
22b9c: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
22ba0: e58a3000 str r3, [sl] <== NOT EXECUTED
22ba4: e3a00000 mov r0, #0 <== NOT EXECUTED
return RC_OK;
}
22ba8: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00022894 <fat_buf_release>:
return RC_OK;
}
int
fat_buf_release(fat_fs_info_t *fs_info)
{
22894: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED
22898: 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)
2289c: e5d00081 ldrb r0, [r0, #129] ; 0x81 <== NOT EXECUTED
228a0: e3500000 cmp r0, #0 <== NOT EXECUTED
228a4: 0a000047 beq 229c8 <fat_buf_release+0x134> <== NOT EXECUTED
return RC_OK;
sec_of_fat = ((fs_info->c.blk_num >= fs_info->vol.fat_loc) &&
228a8: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
228ac: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED
228b0: e1530002 cmp r3, r2 <== NOT EXECUTED
228b4: 33a05000 movcc r5, #0 <== NOT EXECUTED
228b8: 3a000003 bcc 228cc <fat_buf_release+0x38> <== NOT EXECUTED
228bc: e594501c ldr r5, [r4, #28] <== NOT EXECUTED
228c0: e1530005 cmp r3, r5 <== NOT EXECUTED
228c4: 23a05000 movcs r5, #0 <== NOT EXECUTED
228c8: 33a05001 movcc r5, #1 <== NOT EXECUTED
(fs_info->c.blk_num < fs_info->vol.rdir_loc));
if (fs_info->c.modified)
228cc: e5d43080 ldrb r3, [r4, #128] ; 0x80 <== NOT EXECUTED
228d0: e3530000 cmp r3, #0 <== NOT EXECUTED
228d4: 0a000032 beq 229a4 <fat_buf_release+0x110> <== NOT EXECUTED
{
if (sec_of_fat && !fs_info->vol.mirror)
228d8: e21550ff ands r5, r5, #255 ; 0xff <== NOT EXECUTED
228dc: 0a000006 beq 228fc <fat_buf_release+0x68> <== NOT EXECUTED
228e0: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
228e4: e3530000 cmp r3, #0 <== NOT EXECUTED
memcpy(fs_info->sec_buf, fs_info->c.buf->buffer, fs_info->vol.bps);
228e8: 05943084 ldreq r3, [r4, #132] ; 0x84 <== NOT EXECUTED
228ec: 05940088 ldreq r0, [r4, #136] ; 0x88 <== NOT EXECUTED
228f0: 05931020 ldreq r1, [r3, #32] <== NOT EXECUTED
228f4: 01d420b0 ldrheq r2, [r4] <== NOT EXECUTED
228f8: 0b007b62 bleq 41688 <memcpy> <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(fs_info->c.buf);
228fc: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
22900: ebff8616 bl 4160 <rtems_bdbuf_release_modified> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
22904: e3500000 cmp r0, #0 <== NOT EXECUTED
22908: 1a000029 bne 229b4 <fat_buf_release+0x120> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
fs_info->c.modified = 0;
if (sec_of_fat && !fs_info->vol.mirror)
2290c: 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;
22910: e5c40080 strb r0, [r4, #128] ; 0x80 <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
22914: 0a000029 beq 229c0 <fat_buf_release+0x12c> <== NOT EXECUTED
22918: e5d43048 ldrb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
2291c: e3530000 cmp r3, #0 <== NOT EXECUTED
22920: 03a05001 moveq r5, #1 <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
22924: 01a0600d moveq r6, sp <== NOT EXECUTED
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;
if (sec_of_fat && !fs_info->vol.mirror)
22928: 0a000018 beq 22990 <fat_buf_release+0xfc> <== NOT EXECUTED
2292c: ea000023 b 229c0 <fat_buf_release+0x12c> <== NOT EXECUTED
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
22930: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
22934: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
22938: e0222591 mla r2, r1, r5, r2 <== NOT EXECUTED
2293c: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
22940: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
22944: ebff8a34 bl 521c <rtems_bdbuf_get> <== NOT EXECUTED
fs_info->c.blk_num +
fs_info->vol.fat_length * i,
&b);
if ( sc != RTEMS_SUCCESSFUL)
22948: e3500000 cmp r0, #0 <== NOT EXECUTED
2294c: 0a000004 beq 22964 <fat_buf_release+0xd0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
22950: eb006e9c bl 3e3c8 <__errno> <== NOT EXECUTED
22954: e3a0300c mov r3, #12 <== NOT EXECUTED
22958: e5803000 str r3, [r0] <== NOT EXECUTED
2295c: e3e00000 mvn r0, #0 <== NOT EXECUTED
22960: ea000018 b 229c8 <fat_buf_release+0x134> <== NOT EXECUTED
memcpy(b->buffer, fs_info->sec_buf, fs_info->vol.bps);
22964: e59d3000 ldr r3, [sp] <== NOT EXECUTED
22968: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
2296c: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
22970: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
22974: eb007b43 bl 41688 <memcpy> <== NOT EXECUTED
sc = rtems_bdbuf_release_modified(b);
22978: e59d0000 ldr r0, [sp] <== NOT EXECUTED
2297c: ebff85f7 bl 4160 <rtems_bdbuf_release_modified> <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL)
22980: e3500000 cmp r0, #0 <== NOT EXECUTED
22984: 1afffff1 bne 22950 <fat_buf_release+0xbc> <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
22988: e2855001 add r5, r5, #1 <== NOT EXECUTED
2298c: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
22990: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED
22994: e1520005 cmp r2, r5 <== NOT EXECUTED
{
sc = rtems_bdbuf_get(fs_info->vol.dev,
22998: e1a0300d mov r3, sp <== NOT EXECUTED
if (sec_of_fat && !fs_info->vol.mirror)
{
rtems_bdbuf_buffer *b;
for (i = 1; i < fs_info->vol.fats; i++)
2299c: 8affffe3 bhi 22930 <fat_buf_release+0x9c> <== NOT EXECUTED
229a0: ea000006 b 229c0 <fat_buf_release+0x12c> <== NOT EXECUTED
}
}
}
else
{
sc = rtems_bdbuf_release(fs_info->c.buf);
229a4: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
229a8: ebff860e bl 41e8 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
229ac: e3500000 cmp r0, #0 <== NOT EXECUTED
229b0: 0a000002 beq 229c0 <fat_buf_release+0x12c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
229b4: eb006e83 bl 3e3c8 <__errno> <== NOT EXECUTED
229b8: e3a03005 mov r3, #5 <== NOT EXECUTED
229bc: eaffffe5 b 22958 <fat_buf_release+0xc4> <== NOT EXECUTED
}
fs_info->c.state = FAT_CACHE_EMPTY;
229c0: e3a00000 mov r0, #0 <== NOT EXECUTED
229c4: e5c40081 strb r0, [r4, #129] ; 0x81 <== NOT EXECUTED
return RC_OK;
}
229c8: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED
00023518 <fat_cluster_read>:
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)) )
23518: e2513000 subs r3, r1, #0 <== NOT EXECUTED
fat_cluster_read(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
void *buff
)
{
2351c: e1a0c002 mov ip, r2 <== NOT EXECUTED
23520: e92d4001 push {r0, lr} <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
23524: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED
23528: 1a000003 bne 2353c <fat_cluster_read+0x24> <== NOT EXECUTED
2352c: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED
23530: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
23534: 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)) )
23538: 1a000003 bne 2354c <fat_cluster_read+0x34> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
2353c: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED
23540: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED
23544: e2433002 sub r3, r3, #2 <== NOT EXECUTED
23548: 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,
2354c: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED
23550: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED
23554: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED
23558: e3a02000 mov r2, #0 <== NOT EXECUTED
2355c: e58dc000 str ip, [sp] <== NOT EXECUTED
23560: ebfffe4c bl 22e98 <_fat_block_read> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
23564: e8bd8008 pop {r3, pc} <== NOT EXECUTED
00022da0 <fat_cluster_write>:
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)) )
22da0: e2513000 subs r3, r1, #0 <== NOT EXECUTED
fat_cluster_write(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
const void *buff
)
{
22da4: e1a0c002 mov ip, r2 <== NOT EXECUTED
22da8: e92d4001 push {r0, lr} <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
22dac: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED
22db0: 1a000003 bne 22dc4 <fat_cluster_write+0x24> <== NOT EXECUTED
22db4: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED
22db8: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
22dbc: 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)) )
22dc0: 1a000003 bne 22dd4 <fat_cluster_write+0x34> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
22dc4: e5d21005 ldrb r1, [r2, #5] <== NOT EXECUTED
22dc8: e592e030 ldr lr, [r2, #48] ; 0x30 <== NOT EXECUTED
22dcc: e2433002 sub r3, r3, #2 <== NOT EXECUTED
22dd0: 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,
22dd4: e5d23002 ldrb r3, [r2, #2] <== NOT EXECUTED
22dd8: e5d22004 ldrb r2, [r2, #4] <== NOT EXECUTED
22ddc: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED
22de0: e3a02000 mov r2, #0 <== NOT EXECUTED
22de4: e58dc000 str ip, [sp] <== NOT EXECUTED
22de8: ebffff6f bl 22bac <_fat_block_write> <== NOT EXECUTED
fs_info->vol.spc << fs_info->vol.sec_log2, buff);
}
22dec: e8bd8008 pop {r3, pc} <== NOT EXECUTED
00022c5c <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
)
{
22c5c: e92d4077 push {r0, r1, r2, r4, r5, r6, lr} <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
22c60: 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,
22c64: e1d533bc ldrh r3, [r5, #60] ; 0x3c <== NOT EXECUTED
22c68: 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);
22c6c: e58d1008 str r1, [sp, #8] <== NOT EXECUTED
le_next_free = CT_LE_L(next_free);
22c70: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
ret1 = _fat_block_write(mt_entry,
22c74: e1a01003 mov r1, r3 <== NOT EXECUTED
22c78: e3a02f7a mov r2, #488 ; 0x1e8 <== NOT EXECUTED
22c7c: 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
)
{
22c80: 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,
22c84: e58dc000 str ip, [sp] <== NOT EXECUTED
22c88: ebffffc7 bl 22bac <_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,
22c8c: e3a03004 mov r3, #4 <== NOT EXECUTED
22c90: e1d513bc ldrh r1, [r5, #60] ; 0x3c <== NOT EXECUTED
22c94: 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,
22c98: 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,
22c9c: e3a02f7b mov r2, #492 ; 0x1ec <== NOT EXECUTED
22ca0: e1a00004 mov r0, r4 <== NOT EXECUTED
22ca4: e58dc000 str ip, [sp] <== NOT EXECUTED
22ca8: ebffffbf bl 22bac <_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) )
22cac: e1a06fa6 lsr r6, r6, #31 <== NOT EXECUTED
22cb0: e1960fa0 orrs r0, r6, r0, lsr #31 <== NOT EXECUTED
return -1;
return RC_OK;
}
22cb4: 13e00000 mvnne r0, #0 <== NOT EXECUTED
22cb8: e8bd807e pop {r1, r2, r3, r4, r5, r6, pc} <== NOT EXECUTED
000224a8 <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)
224a8: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
224ac: e3530001 cmp r3, #1 <== NOT EXECUTED
int
fat_file_close(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
224b0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
224b4: e1a04001 mov r4, r1 <== NOT EXECUTED
224b8: e1a05000 mov r5, r0 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
224bc: e5906034 ldr r6, [r0, #52] ; 0x34 <== 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)
224c0: 9a000003 bls 224d4 <fat_file_close+0x2c> <== NOT EXECUTED
{
fat_fd->links_num--;
224c4: e2433001 sub r3, r3, #1 <== NOT EXECUTED
224c8: e5813008 str r3, [r1, #8] <== NOT EXECUTED
224cc: e3a00000 mov r0, #0 <== NOT EXECUTED
return rc;
224d0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
}
key = fat_construct_key(mt_entry, &fat_fd->dir_pos.sname);
if (fat_fd->flags & FAT_FILE_REMOVED)
224d4: e5d17030 ldrb r7, [r1, #48] ; 0x30 <== NOT EXECUTED
224d8: e2177001 ands r7, r7, #1 <== NOT EXECUTED
224dc: 0a00000e beq 2251c <fat_file_close+0x74> <== NOT EXECUTED
{
rc = fat_file_truncate(mt_entry, fat_fd, 0);
224e0: e3a02000 mov r2, #0 <== NOT EXECUTED
224e4: ebfffe36 bl 21dc4 <fat_file_truncate> <== NOT EXECUTED
if ( rc != RC_OK )
224e8: e3500000 cmp r0, #0 <== NOT EXECUTED
224ec: 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 );
224f0: e1a00004 mov r0, r4 <== NOT EXECUTED
224f4: ebffa7e4 bl c48c <_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) )
224f8: e1a00005 mov r0, r5 <== NOT EXECUTED
224fc: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
22500: eb0000af bl 227c4 <fat_ino_is_unique> <== NOT EXECUTED
22504: e3500000 cmp r0, #0 <== NOT EXECUTED
22508: 0a00000a beq 22538 <fat_file_close+0x90> <== NOT EXECUTED
fat_free_unique_ino(mt_entry, fat_fd->ino);
2250c: e1a00005 mov r0, r5 <== NOT EXECUTED
22510: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
22514: eb0000a0 bl 2279c <fat_free_unique_ino> <== NOT EXECUTED
22518: ea000006 b 22538 <fat_file_close+0x90> <== NOT EXECUTED
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
2251c: e591100c ldr r1, [r1, #12] <== NOT EXECUTED
22520: eb0000a7 bl 227c4 <fat_ino_is_unique> <== NOT EXECUTED
22524: e3500000 cmp r0, #0 <== NOT EXECUTED
{
fat_fd->links_num = 0;
22528: 15847008 strne r7, [r4, #8] <== NOT EXECUTED
free(fat_fd);
}
else
{
if (fat_ino_is_unique(mt_entry, fat_fd->ino))
2252c: 1a000003 bne 22540 <fat_file_close+0x98> <== NOT EXECUTED
22530: e1a00004 mov r0, r4 <== NOT EXECUTED
22534: ebffa7d4 bl c48c <_Chain_Extract> <== NOT EXECUTED
fat_fd->links_num = 0;
}
else
{
_hash_delete(fs_info->vhash, key, fat_fd->ino, fat_fd);
free(fat_fd);
22538: e1a00004 mov r0, r4 <== NOT EXECUTED
2253c: ebff945c bl 76b4 <free> <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
22540: e1a00006 mov r0, r6 <== NOT EXECUTED
return rc;
}
22544: e8bd40f0 pop {r4, r5, r6, r7, lr} <== NOT EXECUTED
}
}
/*
* flush any modified "cached" buffer back to disk
*/
rc = fat_buf_release(fs_info);
22548: ea0000d1 b 22894 <fat_buf_release> <== NOT EXECUTED
00021bc0 <fat_file_datasync>:
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
21bc0: e92d47f3 push {r0, r1, 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)
21bc4: e5914018 ldr r4, [r1, #24] <== NOT EXECUTED
21bc8: e3540000 cmp r4, #0 <== NOT EXECUTED
int
fat_file_datasync(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
21bcc: e1a07000 mov r7, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
fat_fs_info_t *fs_info = mt_entry->fs_info;
21bd0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cur_cln = fat_fd->cln;
21bd4: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
rtems_bdbuf_buffer *block = NULL;
uint32_t sec = 0;
uint32_t i = 0;
if (fat_fd->fat_file_size == 0)
21bd8: 0a000036 beq 21cb8 <fat_file_datasync+0xf8> <== 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;
21bdc: e3a02000 mov r2, #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);
21be0: 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;
21be4: e88d000c stm sp, {r2, r3} <== 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);
21be8: eb000329 bl 22894 <fat_buf_release> <== NOT EXECUTED
if (rc != RC_OK)
21bec: e2504000 subs r4, r0, #0 <== 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++ )
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
21bf0: 01a0a00d moveq sl, 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);
21bf4: 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)
21bf8: 0a000028 beq 21ca0 <fat_file_datasync+0xe0> <== NOT EXECUTED
21bfc: ea00002d b 21cb8 <fat_file_datasync+0xf8> <== 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)) )
21c00: e3530000 cmp r3, #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;
21c04: e5972034 ldr r2, [r7, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
21c08: 1a000003 bne 21c1c <fat_file_datasync+0x5c> <== NOT EXECUTED
21c0c: e5d2100a ldrb r1, [r2, #10] <== NOT EXECUTED
21c10: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
21c14: 1592801c ldrne r8, [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)) )
21c18: 1a000003 bne 21c2c <fat_file_datasync+0x6c> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
21c1c: e5921030 ldr r1, [r2, #48] ; 0x30 <== NOT EXECUTED
21c20: e5d22005 ldrb r2, [r2, #5] <== NOT EXECUTED
21c24: e2438002 sub r8, r3, #2 <== NOT EXECUTED
21c28: e0818218 add r8, r1, r8, lsl r2 <== NOT EXECUTED
21c2c: e3a06000 mov r6, #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++ )
21c30: ea00000e b 21c70 <fat_file_datasync+0xb0> <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
21c34: e2851054 add r1, r5, #84 ; 0x54 <== NOT EXECUTED
21c38: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
21c3c: ebff8da9 bl 52e8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
21c40: e3500000 cmp r0, #0 <== NOT EXECUTED
21c44: 1a000003 bne 21c58 <fat_file_datasync+0x98> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
sc = rtems_bdbuf_sync(block);
21c48: e59d0000 ldr r0, [sp] <== NOT EXECUTED
21c4c: ebff8b9a bl 4abc <rtems_bdbuf_sync> <== NOT EXECUTED
if ( sc != RTEMS_SUCCESSFUL )
21c50: e3500000 cmp r0, #0 <== NOT EXECUTED
21c54: 0a000004 beq 21c6c <fat_file_datasync+0xac> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
21c58: eb0071da bl 3e3c8 <__errno> <== NOT EXECUTED
21c5c: e3a03005 mov r3, #5 <== NOT EXECUTED
21c60: e5803000 str r3, [r0] <== NOT EXECUTED
21c64: e3e04000 mvn r4, #0 <== NOT EXECUTED
21c68: ea000012 b 21cb8 <fat_file_datasync+0xf8> <== 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++ )
21c6c: e2866001 add r6, r6, #1 <== NOT EXECUTED
21c70: e5d51004 ldrb r1, [r5, #4] <== NOT EXECUTED
21c74: e1560001 cmp r6, r1 <== NOT EXECUTED
{
/* ... sync it */
sc = rtems_bdbuf_read(fs_info->vol.dev, (sec + i), &block);
21c78: e0862008 add r2, r6, r8 <== NOT EXECUTED
21c7c: e1a0300a mov r3, sl <== 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++ )
21c80: 3affffeb bcc 21c34 <fat_file_datasync+0x74> <== 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);
21c84: e1a00007 mov r0, r7 <== NOT EXECUTED
21c88: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
21c8c: e1a02009 mov r2, r9 <== NOT EXECUTED
21c90: eb006030 bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
21c94: e3500000 cmp r0, #0 <== NOT EXECUTED
21c98: 11a04000 movne r4, r0 <== NOT EXECUTED
21c9c: 1a000005 bne 21cb8 <fat_file_datasync+0xf8> <== 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)
21ca0: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
21ca4: e285100c add r1, r5, #12 <== NOT EXECUTED
21ca8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
21cac: e0031001 and r1, r3, r1 <== NOT EXECUTED
21cb0: e1510002 cmp r1, r2 <== NOT EXECUTED
21cb4: 3affffd1 bcc 21c00 <fat_file_datasync+0x40> <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
if ( rc != RC_OK )
return rc;
}
return rc;
}
21cb8: e1a00004 mov r0, r4 <== NOT EXECUTED
21cbc: e8bd87fc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00021ebc <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
)
{
21ebc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
21ec0: e1a0b003 mov fp, 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;
21ec4: e58b2000 str r2, [fp] <== NOT EXECUTED
if (new_length <= fat_fd->fat_file_size)
21ec8: e5919018 ldr r9, [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
)
{
21ecc: 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;
21ed0: 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)
21ed4: e1520009 cmp r2, r9 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length,
uint32_t *a_length
)
{
21ed8: e1a07002 mov r7, r2 <== NOT EXECUTED
21edc: e1a04001 mov r4, r1 <== NOT EXECUTED
21ee0: e1a05000 mov r5, 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;
21ee4: 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;
21ee8: 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;
21eec: e5906034 ldr r6, [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)
21ef0: 9a000061 bls 2207c <fat_file_extend+0x1c0> <== NOT EXECUTED
return RC_OK;
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
21ef4: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
21ef8: e3530001 cmp r3, #1 <== NOT EXECUTED
21efc: 1a000005 bne 21f18 <fat_file_extend+0x5c> <== NOT EXECUTED
21f00: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED
21f04: e3530000 cmp r3, #0 <== NOT EXECUTED
21f08: 1a000002 bne 21f18 <fat_file_extend+0x5c> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
21f0c: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED
21f10: e3130003 tst r3, #3 <== NOT EXECUTED
21f14: 1a00001a bne 21f84 <fat_file_extend+0xc8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOSPC );
bytes_remain = (fs_info->vol.bpc -
21f18: e1d620b6 ldrh r2, [r6, #6] <== NOT EXECUTED
(fat_fd->fat_file_size & (fs_info->vol.bpc - 1))) &
21f1c: 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 -
21f20: e0038009 and r8, r3, r9 <== NOT EXECUTED
21f24: e0688002 rsb r8, r8, r2 <== NOT EXECUTED
21f28: e0088003 and r8, r8, 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;
21f2c: e0699007 rsb r9, r9, r7 <== NOT EXECUTED
if (bytes2add > bytes_remain)
21f30: e1590008 cmp r9, r8 <== NOT EXECUTED
21f34: 9a000050 bls 2207c <fat_file_extend+0x1c0> <== 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)
21f38: e0599008 subs r9, r9, r8 <== NOT EXECUTED
21f3c: 0a00004e beq 2207c <fat_file_extend+0x1c0> <== NOT EXECUTED
return RC_OK;
cls2add = ((bytes2add - 1) >> fs_info->vol.bpc_log2) + 1;
21f40: e5d63008 ldrb r3, [r6, #8] <== NOT EXECUTED
21f44: e249a001 sub sl, r9, #1 <== NOT EXECUTED
21f48: e1a0a33a lsr sl, sl, r3 <== NOT EXECUTED
21f4c: e28aa001 add sl, sl, #1 <== NOT EXECUTED
rc = fat_scan_fat_for_free_clusters(mt_entry, &chain, cls2add,
21f50: e28dc008 add ip, sp, #8 <== NOT EXECUTED
21f54: e1a00005 mov r0, r5 <== NOT EXECUTED
21f58: e28d1010 add r1, sp, #16 <== NOT EXECUTED
21f5c: e1a0200a mov r2, sl <== NOT EXECUTED
21f60: e28d3004 add r3, sp, #4 <== NOT EXECUTED
21f64: e58dc000 str ip, [sp] <== NOT EXECUTED
21f68: eb006003 bl 39f7c <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)
21f6c: e3500000 cmp r0, #0 <== NOT EXECUTED
21f70: 11a08000 movne r8, r0 <== NOT EXECUTED
21f74: 1a000041 bne 22080 <fat_file_extend+0x1c4> <== NOT EXECUTED
return rc;
/* this means that no space left on device */
if ((cls_added == 0) && (bytes_remain == 0))
21f78: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
21f7c: e1988003 orrs r8, r8, r3 <== NOT EXECUTED
21f80: 1a000004 bne 21f98 <fat_file_extend+0xdc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOSPC);
21f84: eb00710f bl 3e3c8 <__errno> <== NOT EXECUTED
21f88: e3a0301c mov r3, #28 <== NOT EXECUTED
21f8c: e5803000 str r3, [r0] <== NOT EXECUTED
21f90: e3e08000 mvn r8, #0 <== NOT EXECUTED
21f94: ea000039 b 22080 <fat_file_extend+0x1c4> <== NOT EXECUTED
/* check wether we satisfied request for 'cls2add' clusters */
if (cls2add != cls_added)
21f98: e15a0003 cmp sl, r3 <== NOT EXECUTED
21f9c: 0a000008 beq 21fc4 <fat_file_extend+0x108> <== NOT EXECUTED
*a_length = new_length -
21fa0: e1e03003 mvn r3, r3 <== NOT EXECUTED
21fa4: e5d62008 ldrb r2, [r6, #8] <== NOT EXECUTED
21fa8: e083a00a add sl, r3, sl <== NOT EXECUTED
21fac: e047a21a sub sl, r7, sl, lsl r2 <== NOT EXECUTED
21fb0: e1d630b6 ldrh r3, [r6, #6] <== NOT EXECUTED
21fb4: e2433001 sub r3, r3, #1 <== NOT EXECUTED
21fb8: e0099003 and r9, r9, r3 <== NOT EXECUTED
21fbc: e069900a rsb r9, r9, sl <== NOT EXECUTED
21fc0: e58b9000 str r9, [fp] <== 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 )
21fc4: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
21fc8: e3530000 cmp r3, #0 <== NOT EXECUTED
{
fat_fd->map.disk_cln = fat_fd->cln = chain;
21fcc: 059d2010 ldreq r2, [sp, #16] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
21fd0: 05843034 streq r3, [r4, #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;
21fd4: 05842038 streq r2, [r4, #56] ; 0x38 <== NOT EXECUTED
21fd8: 0584201c streq r2, [r4, #28] <== NOT EXECUTED
21fdc: 0a000014 beq 22034 <fat_file_extend+0x178> <== NOT EXECUTED
fat_fd->map.file_cln = 0;
}
else
{
if (fat_fd->map.last_cln != FAT_UNDEFINED_VALUE)
21fe0: e594203c ldr r2, [r4, #60] ; 0x3c <== NOT EXECUTED
21fe4: e3720001 cmn r2, #1 <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
21fe8: 158d200c strne r2, [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)
21fec: 1a000008 bne 22014 <fat_file_extend+0x158> <== NOT EXECUTED
{
old_last_cl = fat_fd->map.last_cln;
}
else
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
21ff0: e28dc00c add ip, sp, #12 <== NOT EXECUTED
21ff4: e2433001 sub r3, r3, #1 <== NOT EXECUTED
21ff8: e1a00005 mov r0, r5 <== NOT EXECUTED
21ffc: e1a01004 mov r1, r4 <== NOT EXECUTED
22000: e3a02001 mov r2, #1 <== NOT EXECUTED
22004: e58dc000 str ip, [sp] <== NOT EXECUTED
22008: ebffff3f bl 21d0c <fat_file_ioctl> <== NOT EXECUTED
(fat_fd->fat_file_size - 1), &old_last_cl);
if ( rc != RC_OK )
2200c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
22010: 1a000014 bne 22068 <fat_file_extend+0x1ac> <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
}
rc = fat_set_fat_cluster(mt_entry, old_last_cl, chain);
22014: e1a00005 mov r0, r5 <== NOT EXECUTED
22018: e28d100c add r1, sp, #12 <== NOT EXECUTED
2201c: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
22020: eb005eb4 bl 39af8 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
22024: e2508000 subs r8, r0, #0 <== NOT EXECUTED
22028: 1a00000e bne 22068 <fat_file_extend+0x1ac> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
return rc;
}
fat_buf_release(fs_info);
2202c: e1a00006 mov r0, r6 <== NOT EXECUTED
22030: eb000217 bl 22894 <fat_buf_release> <== NOT EXECUTED
}
/* update number of the last cluster of the file if it changed */
if (cls_added != 0)
22034: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
22038: e3530000 cmp r3, #0 <== NOT EXECUTED
2203c: 0a00000d beq 22078 <fat_file_extend+0x1bc> <== NOT EXECUTED
{
fat_fd->map.last_cln = last_cl;
if (fat_fd->fat_file_type == FAT_DIRECTORY)
22040: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
22044: 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;
22048: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
2204c: e584303c str r3, [r4, #60] ; 0x3c <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
22050: 1a000008 bne 22078 <fat_file_extend+0x1bc> <== NOT EXECUTED
{
rc = fat_init_clusters_chain(mt_entry, chain);
22054: e1a00005 mov r0, r5 <== NOT EXECUTED
22058: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
2205c: eb000363 bl 22df0 <fat_init_clusters_chain> <== NOT EXECUTED
if ( rc != RC_OK )
22060: e2508000 subs r8, r0, #0 <== NOT EXECUTED
22064: 0a000003 beq 22078 <fat_file_extend+0x1bc> <== NOT EXECUTED
{
fat_free_fat_clusters_chain(mt_entry, chain);
22068: e1a00005 mov r0, r5 <== NOT EXECUTED
2206c: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
22070: eb005f92 bl 39ec0 <fat_free_fat_clusters_chain> <== NOT EXECUTED
return rc;
22074: ea000001 b 22080 <fat_file_extend+0x1c4> <== NOT EXECUTED
}
}
}
fat_fd->fat_file_size = new_length;
22078: e5847018 str r7, [r4, #24] <== NOT EXECUTED
return RC_OK;
2207c: e3a08000 mov r8, #0 <== NOT EXECUTED
}
22080: e1a00008 mov r0, r8 <== NOT EXECUTED
22084: e28dd014 add sp, sp, #20 <== NOT EXECUTED
22088: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00021d0c <fat_file_ioctl>:
fat_file_ioctl(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
int cmd,
...)
{
21d0c: e92d000c push {r2, r3} <== NOT EXECUTED
21d10: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
21d14: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
21d18: e3530001 cmp r3, #1 <== NOT EXECUTED
int cmd,
...)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = 0;
21d1c: e3a03000 mov r3, #0 <== NOT EXECUTED
21d20: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
uint32_t cl_start = 0;
uint32_t pos = 0;
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
21d24: e28d3018 add r3, sp, #24 <== NOT EXECUTED
21d28: e58d3000 str r3, [sp] <== NOT EXECUTED
fat_file_fd_t *fat_fd,
int cmd,
...)
{
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
21d2c: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t *ret;
va_list ap;
va_start(ap, cmd);
switch (cmd)
21d30: 1a00001c bne 21da8 <fat_file_ioctl+0x9c> <== 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 )
21d34: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
va_start(ap, cmd);
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t );
21d38: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
ret = va_arg(ap, uint32_t *);
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
21d3c: e1520003 cmp r2, r3 <== NOT EXECUTED
switch (cmd)
{
case F_CLU_NUM:
pos = va_arg(ap, uint32_t );
ret = va_arg(ap, uint32_t *);
21d40: e28d3020 add r3, sp, #32 <== NOT EXECUTED
21d44: e58d3000 str r3, [sp] <== NOT EXECUTED
21d48: e59d401c ldr r4, [sp, #28] <== NOT EXECUTED
/* sanity check */
if ( pos >= fat_fd->fat_file_size )
21d4c: 3a000002 bcc 21d5c <fat_file_ioctl+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
21d50: eb00719c bl 3e3c8 <__errno> <== NOT EXECUTED
21d54: e3a03005 mov r3, #5 <== NOT EXECUTED
21d58: ea000014 b 21db0 <fat_file_ioctl+0xa4> <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
21d5c: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
21d60: e3530001 cmp r3, #1 <== NOT EXECUTED
21d64: 1a000007 bne 21d88 <fat_file_ioctl+0x7c> <== NOT EXECUTED
21d68: e5913024 ldr r3, [r1, #36] ; 0x24 <== NOT EXECUTED
21d6c: e3530000 cmp r3, #0 <== NOT EXECUTED
21d70: 1a000004 bne 21d88 <fat_file_ioctl+0x7c> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
21d74: e5dc500a ldrb r5, [ip, #10] <== NOT EXECUTED
21d78: e3150003 tst r5, #3 <== NOT EXECUTED
{
/* cluster 0 (zero) reserved for root dir */
*ret = 0;
21d7c: 15843000 strne r3, [r4] <== NOT EXECUTED
21d80: 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)))
21d84: 1a00000b bne 21db8 <fat_file_ioctl+0xac> <== 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);
21d88: e5dc3008 ldrb r3, [ip, #8] <== NOT EXECUTED
21d8c: e1a02332 lsr r2, r2, r3 <== NOT EXECUTED
21d90: e28d3004 add r3, sp, #4 <== NOT EXECUTED
21d94: ebffff64 bl 21b2c <fat_file_lseek> <== NOT EXECUTED
if ( rc != RC_OK )
21d98: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
*ret = cur_cln;
21d9c: 059d3004 ldreq r3, [sp, #4] <== NOT EXECUTED
21da0: 05843000 streq r3, [r4] <== NOT EXECUTED
21da4: ea000003 b 21db8 <fat_file_ioctl+0xac> <== NOT EXECUTED
break;
default:
errno = EINVAL;
21da8: eb007186 bl 3e3c8 <__errno> <== NOT EXECUTED
21dac: e3a03016 mov r3, #22 <== NOT EXECUTED
21db0: e5803000 str r3, [r0] <== NOT EXECUTED
21db4: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc = -1;
break;
}
return rc;
}
21db8: e8bd403c pop {r2, r3, r4, r5, lr} <== NOT EXECUTED
21dbc: e28dd008 add sp, sp, #8 <== NOT EXECUTED
21dc0: e12fff1e bx lr <== NOT EXECUTED
00021b2c <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
)
{
21b2c: e92d47f1 push {r0, r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
21b30: e5918034 ldr r8, [r1, #52] ; 0x34 <== NOT EXECUTED
21b34: e1520008 cmp r2, r8 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t file_cln,
uint32_t *disk_cln
)
{
21b38: e1a07003 mov r7, r3 <== NOT EXECUTED
21b3c: e1a04001 mov r4, r1 <== NOT EXECUTED
21b40: e1a05002 mov r5, r2 <== NOT EXECUTED
21b44: e1a09000 mov r9, r0 <== NOT EXECUTED
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
*disk_cln = fat_fd->map.disk_cln;
21b48: 05913038 ldreq r3, [r1, #56] ; 0x38 <== NOT EXECUTED
uint32_t *disk_cln
)
{
int rc = RC_OK;
if (file_cln == fat_fd->map.file_cln)
21b4c: 0a000015 beq 21ba8 <fat_file_lseek+0x7c> <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
21b50: 85913038 ldrhi r3, [r1, #56] ; 0x38 <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
}
else
{
cur_cln = fat_fd->cln;
21b54: 9591301c ldrls r3, [r1, #28] <== NOT EXECUTED
uint32_t count;
uint32_t i;
if (file_cln > fat_fd->map.file_cln)
{
cur_cln = fat_fd->map.disk_cln;
21b58: 858d3000 strhi r3, [sp] <== NOT EXECUTED
count = file_cln - fat_fd->map.file_cln;
21b5c: 80688002 rsbhi r8, r8, r2 <== NOT EXECUTED
}
else
{
cur_cln = fat_fd->cln;
21b60: 958d3000 strls r3, [sp] <== NOT EXECUTED
21b64: 91a08002 movls r8, r2 <== NOT EXECUTED
21b68: e3a06000 mov r6, #0 <== NOT EXECUTED
}
/* skip over the clusters */
for (i = 0; i < count; i++)
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
21b6c: e1a0a00d mov sl, sp <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
21b70: ea000005 b 21b8c <fat_file_lseek+0x60> <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
21b74: e59d1000 ldr r1, [sp] <== NOT EXECUTED
21b78: eb006076 bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
21b7c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
return rc;
21b80: 11a04fc3 asrne r4, r3, #31 <== NOT EXECUTED
21b84: 1a00000a bne 21bb4 <fat_file_lseek+0x88> <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
21b88: e2866001 add r6, r6, #1 <== NOT EXECUTED
21b8c: e1560008 cmp r6, r8 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
21b90: e1a00009 mov r0, r9 <== NOT EXECUTED
21b94: e1a0200d mov r2, sp <== NOT EXECUTED
cur_cln = fat_fd->cln;
count = file_cln;
}
/* skip over the clusters */
for (i = 0; i < count; i++)
21b98: 3afffff5 bcc 21b74 <fat_file_lseek+0x48> <== NOT EXECUTED
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
fat_fd->map.disk_cln = cur_cln;
21b9c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
}
/* update cache */
fat_fd->map.file_cln = file_cln;
21ba0: e5845034 str r5, [r4, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = cur_cln;
21ba4: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
*disk_cln = cur_cln;
21ba8: e5873000 str r3, [r7] <== NOT EXECUTED
21bac: e3a04000 mov r4, #0 <== NOT EXECUTED
21bb0: e3a03000 mov r3, #0 <== NOT EXECUTED
}
return RC_OK;
}
21bb4: e1a01004 mov r1, r4 <== NOT EXECUTED
21bb8: e1a00003 mov r0, r3 <== NOT EXECUTED
21bbc: e8bd87f8 pop {r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00021cc0 <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) +
21cc0: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
21cc4: 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
)
{
21cc8: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
21ccc: e1a04001 mov r4, r1 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
21cd0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
21cd4: e5946024 ldr r6, [r4, #36] ; 0x24 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
21cd8: e1a00004 mov r0, r4 <== NOT EXECUTED
21cdc: ebffa9ea bl c48c <_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 );
21ce0: e1a062a6 lsr r6, r6, #5 <== NOT EXECUTED
21ce4: e5953068 ldr r3, [r5, #104] ; 0x68 <== NOT EXECUTED
21ce8: e2066001 and r6, r6, #1 <== NOT EXECUTED
21cec: e3a0000c mov r0, #12 <== NOT EXECUTED
21cf0: e0203096 mla r0, r6, r0, r3 <== NOT EXECUTED
21cf4: e1a01004 mov r1, r4 <== NOT EXECUTED
21cf8: ebffa9d8 bl c460 <_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;
21cfc: e5d43030 ldrb r3, [r4, #48] ; 0x30 <== NOT EXECUTED
21d00: e3833001 orr r3, r3, #1 <== NOT EXECUTED
21d04: e5c43030 strb r3, [r4, #48] ; 0x30 <== NOT EXECUTED
}
21d08: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0002254c <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
)
{
2254c: 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) +
22550: e5916000 ldr r6, [r1] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
22554: e3560001 cmp r6, #1 <== NOT EXECUTED
22558: e1a08001 mov r8, r1 <== NOT EXECUTED
2255c: e1a0b000 mov fp, r0 <== NOT EXECUTED
22560: e1a0a002 mov sl, r2 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
22564: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
22568: 0a00000b beq 2259c <fat_file_open+0x50> <== 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)) )
2256c: e3560000 cmp r6, #0 <== NOT EXECUTED
22570: 1a000003 bne 22584 <fat_file_open+0x38> <== NOT EXECUTED
22574: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
22578: e3130003 tst r3, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2257c: 1594601c ldrne r6, [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)) )
22580: 1a000003 bne 22594 <fat_file_open+0x48> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
22584: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED
22588: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
2258c: e2466002 sub r6, r6, #2 <== NOT EXECUTED
22590: e0836216 add r6, r3, r6, 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) <<
22594: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED
22598: e1a06316 lsl r6, r6, r3 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2259c: 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) +
225a0: e1a022a3 lsr r2, r3, #5 <== NOT EXECUTED
225a4: e08664a3 add r6, r6, r3, lsr #9 <== NOT EXECUTED
225a8: e202200f and r2, r2, #15 <== NOT EXECUTED
225ac: e0826206 add r6, r2, r6, 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;
225b0: e2063001 and r3, r6, #1 <== NOT EXECUTED
225b4: e3a0200c mov r2, #12 <== NOT EXECUTED
225b8: e0070392 mul r7, r2, r3 <== NOT EXECUTED
225bc: e5943064 ldr r3, [r4, #100] ; 0x64 <== NOT EXECUTED
225c0: e0830007 add r0, r3, r7 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
225c4: e2800004 add r0, r0, #4 <== NOT EXECUTED
225c8: e7933007 ldr r3, [r3, r7] <== NOT EXECUTED
225cc: ea00001c b 22644 <fat_file_open+0xf8> <== NOT EXECUTED
225d0: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
225d4: 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) +
225d8: e242c002 sub ip, r2, #2 <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
225dc: 0a00000a beq 2260c <fat_file_open+0xc0> <== 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)) )
225e0: e3520000 cmp r2, #0 <== NOT EXECUTED
225e4: 1a000003 bne 225f8 <fat_file_open+0xac> <== NOT EXECUTED
225e8: e5d4200a ldrb r2, [r4, #10] <== NOT EXECUTED
225ec: e3120003 tst r2, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
225f0: 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)) )
225f4: 1a000002 bne 22604 <fat_file_open+0xb8> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
225f8: e5d42005 ldrb r2, [r4, #5] <== NOT EXECUTED
225fc: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED
22600: e081221c add r2, r1, ip, 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) <<
22604: e5d41003 ldrb r1, [r4, #3] <== NOT EXECUTED
22608: e1a02112 lsl r2, r2, r1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2260c: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
for ( ; !rtems_chain_is_tail((hash) + mod, the_node) ; )
{
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)
22610: e1a0c2a1 lsr ip, r1, #5 <== NOT EXECUTED
22614: e20cc00f and ip, ip, #15 <== NOT EXECUTED
22618: e08224a1 add r2, r2, r1, lsr #9 <== NOT EXECUTED
2261c: e08c2202 add r2, ip, r2, lsl #4 <== NOT EXECUTED
22620: e1560002 cmp r6, r2 <== NOT EXECUTED
22624: 1a000005 bne 22640 <fat_file_open+0xf4> <== 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++;
22628: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
2262c: e2822001 add r2, r2, #1 <== NOT EXECUTED
22630: 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;
22634: e58a3000 str r3, [sl] <== NOT EXECUTED
lfat_fd->links_num++;
22638: e3a00000 mov r0, #0 <== NOT EXECUTED
return rc;
2263c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
22640: 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) ; )
22644: e1530000 cmp r3, r0 <== NOT EXECUTED
22648: 1affffe0 bne 225d0 <fat_file_open+0x84> <== NOT EXECUTED
2264c: ea00004d b 22788 <fat_file_open+0x23c> <== 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) +
22650: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
uint32_t cln
)
{
fat_fs_info_t *fs_info = mt_entry->fs_info;
if (cln == 1)
22654: e3520001 cmp r2, #1 <== NOT EXECUTED
22658: 0a00000b beq 2268c <fat_file_open+0x140> <== 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)) )
2265c: e3520000 cmp r2, #0 <== NOT EXECUTED
22660: 1a000003 bne 22674 <fat_file_open+0x128> <== NOT EXECUTED
22664: e5d4100a ldrb r1, [r4, #10] <== NOT EXECUTED
22668: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2266c: 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)) )
22670: 1a000003 bne 22684 <fat_file_open+0x138> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
22674: e5d4c005 ldrb ip, [r4, #5] <== NOT EXECUTED
22678: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED
2267c: e2422002 sub r2, r2, #2 <== NOT EXECUTED
22680: e0812c12 add r2, r1, r2, lsl ip <== 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) <<
22684: e5d41003 ldrb r1, [r4, #3] <== NOT EXECUTED
22688: e1a02112 lsl r2, r2, r1 <== NOT EXECUTED
(pos->ofs >> FAT_SECTOR512_BITS)) << 4) +
2268c: 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)
22690: e1a0c2a1 lsr ip, r1, #5 <== NOT EXECUTED
22694: e08224a1 add r2, r2, r1, lsr #9 <== NOT EXECUTED
22698: e20cc00f and ip, ip, #15 <== NOT EXECUTED
2269c: e08c2202 add r2, ip, r2, lsl #4 <== NOT EXECUTED
226a0: e1560002 cmp r6, r2 <== NOT EXECUTED
226a4: 1a000004 bne 226bc <fat_file_open+0x170> <== NOT EXECUTED
{
if ( ((key2) == 0) || ((key2) == ffd->ino) )
226a8: e3560000 cmp r6, #0 <== NOT EXECUTED
226ac: 0a000007 beq 226d0 <fat_file_open+0x184> <== NOT EXECUTED
226b0: e593200c ldr r2, [r3, #12] <== NOT EXECUTED
226b4: e1560002 cmp r6, r2 <== NOT EXECUTED
226b8: 0a000004 beq 226d0 <fat_file_open+0x184> <== NOT EXECUTED
{
*ret = (void *)the_node;
return 0;
}
}
the_node = the_node->next;
226bc: 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) ; )
226c0: e1530000 cmp r3, r0 <== NOT EXECUTED
226c4: 1affffe1 bne 22650 <fat_file_open+0x104> <== NOT EXECUTED
226c8: e3e09000 mvn r9, #0 <== NOT EXECUTED
226cc: ea000000 b 226d4 <fat_file_open+0x188> <== NOT EXECUTED
226d0: e3a09000 mov r9, #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));
226d4: e3a00044 mov r0, #68 ; 0x44 <== NOT EXECUTED
226d8: ebff959c bl 7d50 <malloc> <== NOT EXECUTED
if ( lfat_fd == NULL )
226dc: 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));
226e0: e1a05000 mov r5, r0 <== NOT EXECUTED
226e4: e58a0000 str r0, [sl] <== NOT EXECUTED
if ( lfat_fd == NULL )
226e8: 1a000004 bne 22700 <fat_file_open+0x1b4> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
226ec: eb006f35 bl 3e3c8 <__errno> <== NOT EXECUTED
226f0: e3a0300c mov r3, #12 <== NOT EXECUTED
226f4: e5803000 str r3, [r0] <== NOT EXECUTED
226f8: e3e00000 mvn r0, #0 <== NOT EXECUTED
226fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
memset(lfat_fd, 0, sizeof(fat_file_fd_t));
22700: e3a01000 mov r1, #0 <== NOT EXECUTED
22704: e3a02044 mov r2, #68 ; 0x44 <== NOT EXECUTED
22708: eb007c65 bl 418a4 <memset> <== NOT EXECUTED
lfat_fd->links_num = 1;
lfat_fd->flags &= ~FAT_FILE_REMOVED;
2270c: e5d5c030 ldrb ip, [r5, #48] ; 0x30 <== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
22710: 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;
22714: e3cce001 bic lr, ip, #1 <== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
lfat_fd->dir_pos = *dir_pos;
22718: e285c020 add ip, r5, #32 <== NOT EXECUTED
if ( rc != RC_OK )
2271c: e3590000 cmp r9, #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;
22720: e3e08000 mvn r8, #0 <== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
22724: 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;
22728: e3a03001 mov r3, #1 <== NOT EXECUTED
2272c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
lfat_fd->flags &= ~FAT_FILE_REMOVED;
22730: e5c5e030 strb lr, [r5, #48] ; 0x30 <== NOT EXECUTED
lfat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
22734: e585803c str r8, [r5, #60] ; 0x3c <== NOT EXECUTED
lfat_fd->dir_pos = *dir_pos;
if ( rc != RC_OK )
lfat_fd->ino = key;
22738: 1585600c strne r6, [r5, #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 )
2273c: 1a00000b bne 22770 <fat_file_open+0x224> <== NOT EXECUTED
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
22740: e1a0000b mov r0, fp <== NOT EXECUTED
22744: eb000024 bl 227dc <fat_get_unique_ino> <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
22748: e3500000 cmp r0, #0 <== NOT EXECUTED
if ( rc != RC_OK )
lfat_fd->ino = key;
else
{
lfat_fd->ino = fat_get_unique_ino(mt_entry);
2274c: e585000c str r0, [r5, #12] <== NOT EXECUTED
if ( lfat_fd->ino == 0 )
22750: 1a000006 bne 22770 <fat_file_open+0x224> <== NOT EXECUTED
{
free((*fat_fd));
22754: e59a0000 ldr r0, [sl] <== NOT EXECUTED
22758: ebff93d5 bl 76b4 <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 );
2275c: eb006f19 bl 3e3c8 <__errno> <== NOT EXECUTED
22760: e3a0300c mov r3, #12 <== NOT EXECUTED
22764: e5803000 str r3, [r0] <== NOT EXECUTED
22768: e1a00008 mov r0, r8 <== NOT EXECUTED
2276c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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 );
22770: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
22774: e1a01005 mov r1, r5 <== NOT EXECUTED
22778: e0800007 add r0, r0, r7 <== NOT EXECUTED
2277c: ebffa737 bl c460 <_Chain_Append> <== NOT EXECUTED
22780: e3a00000 mov r0, #0 <== NOT EXECUTED
* other fields of fat-file descriptor will be initialized on upper
* level
*/
return RC_OK;
}
22784: 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;
22788: e5943068 ldr r3, [r4, #104] ; 0x68 <== NOT EXECUTED
2278c: e0830007 add r0, r3, r7 <== NOT EXECUTED
22790: e2800004 add r0, r0, #4 <== NOT EXECUTED
22794: e7933007 ldr r3, [r3, r7] <== NOT EXECUTED
22798: eaffffc8 b 226c0 <fat_file_open+0x174> <== NOT EXECUTED
000222c0 <fat_file_read>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
222c0: e92d4fff push {r0, r1, r2, r3, 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)
222c4: e2535000 subs r5, r3, #0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
uint8_t *buf
)
{
222c8: e1a08000 mov r8, r0 <== NOT EXECUTED
222cc: e1a06001 mov r6, r1 <== NOT EXECUTED
222d0: e1a07002 mov r7, r2 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
222d4: e5904034 ldr r4, [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)
222d8: 0a00006d beq 22494 <fat_file_read+0x1d4> <== NOT EXECUTED
/*
* >= because start is offset and computed from 0 and file_size
* computed from 1
*/
if ( start >= fat_fd->fat_file_size )
222dc: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
222e0: e1520003 cmp r2, r3 <== NOT EXECUTED
222e4: 2a00006a bcs 22494 <fat_file_read+0x1d4> <== NOT EXECUTED
return FAT_EOF;
if ((count > fat_fd->fat_file_size) ||
222e8: e1550003 cmp r5, r3 <== NOT EXECUTED
222ec: 8a000002 bhi 222fc <fat_file_read+0x3c> <== NOT EXECUTED
222f0: e0652003 rsb r2, r5, r3 <== NOT EXECUTED
222f4: e1570002 cmp r7, r2 <== NOT EXECUTED
222f8: 9a000000 bls 22300 <fat_file_read+0x40> <== NOT EXECUTED
(start > fat_fd->fat_file_size - count))
count = fat_fd->fat_file_size - start;
222fc: e0675003 rsb r5, r7, r3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
22300: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
22304: 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;
22308: e3a03000 mov r3, #0 <== NOT EXECUTED
2230c: e58d300c str r3, [sp, #12] <== 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)) &&
22310: 1a000019 bne 2237c <fat_file_read+0xbc> <== NOT EXECUTED
22314: e5963024 ldr r3, [r6, #36] ; 0x24 <== NOT EXECUTED
22318: e3530000 cmp r3, #0 <== NOT EXECUTED
2231c: 1a000016 bne 2237c <fat_file_read+0xbc> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
22320: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
22324: e3130003 tst r3, #3 <== NOT EXECUTED
22328: 0a000013 beq 2237c <fat_file_read+0xbc> <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
2232c: e596201c ldr r2, [r6, #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)) )
22330: e3520000 cmp r2, #0 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
22334: 15d40005 ldrbne r0, [r4, #5] <== NOT EXECUTED
22338: 15941030 ldrne r1, [r4, #48] ; 0x30 <== NOT EXECUTED
2233c: 12423002 subne r3, r2, #2 <== NOT EXECUTED
22340: 10813013 addne r3, r1, r3, lsl r0 <== 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);
22344: e1d420b0 ldrh r2, [r4] <== 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;
22348: 0594301c ldreq r3, [r4, #28] <== NOT EXECUTED
2234c: e5d41002 ldrb r1, [r4, #2] <== NOT EXECUTED
22350: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED
22354: e2422001 sub r2, r2, #1 <== NOT EXECUTED
22358: e0831137 add r1, r3, r7, lsr r1 <== NOT EXECUTED
2235c: e0072002 and r2, r7, r2 <== NOT EXECUTED
22360: e1a00008 mov r0, r8 <== NOT EXECUTED
22364: e1a03005 mov r3, r5 <== NOT EXECUTED
22368: e58dc000 str ip, [sp] <== NOT EXECUTED
2236c: eb0002c9 bl 22e98 <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
22370: e3500000 cmp r0, #0 <== NOT EXECUTED
22374: aa000049 bge 224a0 <fat_file_read+0x1e0> <== NOT EXECUTED
22378: ea000047 b 2249c <fat_file_read+0x1dc> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
2237c: e5d43008 ldrb r3, [r4, #8] <== NOT EXECUTED
22380: e1a03337 lsr r3, r7, r3 <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
22384: e28db00c add fp, sp, #12 <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
22388: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
2238c: e1a02003 mov r2, r3 <== NOT EXECUTED
22390: e1a00008 mov r0, r8 <== NOT EXECUTED
22394: e1a01006 mov r1, r6 <== NOT EXECUTED
22398: 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);
2239c: e1d4a0b6 ldrh sl, [r4, #6] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
223a0: ebfffde1 bl 21b2c <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
223a4: e3500000 cmp r0, #0 <== NOT EXECUTED
223a8: 1a00003c bne 224a0 <fat_file_read+0x1e0> <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
223ac: e24aa001 sub sl, sl, #1 <== NOT EXECUTED
223b0: e007a00a and sl, r7, sl <== NOT EXECUTED
223b4: e58da004 str sl, [sp, #4] <== NOT EXECUTED
223b8: e1a0100a mov r1, sl <== NOT EXECUTED
223bc: e1a09000 mov r9, r0 <== NOT EXECUTED
223c0: e1a0a000 mov sl, r0 <== NOT EXECUTED
223c4: ea000026 b 22464 <fat_file_read+0x1a4> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
223c8: e1d4c0b6 ldrh ip, [r4, #6] <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
223cc: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
223d0: e061c00c rsb ip, r1, ip <== NOT EXECUTED
223d4: e15c0005 cmp ip, r5 <== NOT EXECUTED
223d8: 21a0c005 movcs ip, 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)) )
223dc: e3570000 cmp r7, #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;
223e0: e5983034 ldr r3, [r8, #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) +
223e4: e2477002 sub r7, r7, #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)) )
223e8: 1a000003 bne 223fc <fat_file_read+0x13c> <== NOT EXECUTED
223ec: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED
223f0: e3120003 tst r2, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
223f4: 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)) )
223f8: 1a000002 bne 22408 <fat_file_read+0x148> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
223fc: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
22400: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
22404: e0827317 add r7, r2, r7, lsl r3 <== 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);
22408: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
2240c: e5d49002 ldrb r9, [r4, #2] <== NOT EXECUTED
22410: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
22414: e2422001 sub r2, r2, #1 <== NOT EXECUTED
22418: e083e00a add lr, r3, sl <== NOT EXECUTED
2241c: e0012002 and r2, r1, r2 <== NOT EXECUTED
22420: e1a0300c mov r3, ip <== NOT EXECUTED
22424: e1a00008 mov r0, r8 <== NOT EXECUTED
22428: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED
2242c: e58de000 str lr, [sp] <== NOT EXECUTED
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
22430: e08aa00c add sl, sl, ip <== NOT EXECUTED
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
22434: e06c5005 rsb r5, ip, 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_read(mt_entry, sec, byte, c, buf + cmpltd);
22438: eb000296 bl 22e98 <_fat_block_read> <== NOT EXECUTED
if ( ret < 0 )
2243c: 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);
22440: e1a0200b mov r2, fp <== NOT EXECUTED
22444: e1a00008 mov r0, r8 <== 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 )
22448: ba000013 blt 2249c <fat_file_read+0x1dc> <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
2244c: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
22450: e1a01009 mov r1, r9 <== NOT EXECUTED
22454: eb005e3f bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
22458: e3500000 cmp r0, #0 <== NOT EXECUTED
2245c: 1a00000f bne 224a0 <fat_file_read+0x1e0> <== NOT EXECUTED
ret = _fat_block_read(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
22460: e1a01000 mov r1, r0 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
22464: e3550000 cmp r5, #0 <== NOT EXECUTED
22468: 1affffd6 bne 223c8 <fat_file_read+0x108> <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
2246c: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
22470: e5d43008 ldrb r3, [r4, #8] <== NOT EXECUTED
22474: e24c7001 sub r7, ip, #1 <== NOT EXECUTED
22478: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
2247c: e087700a add r7, r7, sl <== NOT EXECUTED
22480: e0827337 add r7, r2, r7, lsr r3 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
22484: e5869038 str r9, [r6, #56] ; 0x38 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
22488: e5867034 str r7, [r6, #52] ; 0x34 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
2248c: e1a0000a mov r0, sl <== NOT EXECUTED
22490: ea000002 b 224a0 <fat_file_read+0x1e0> <== NOT EXECUTED
22494: e3a00000 mov r0, #0 <== NOT EXECUTED
22498: ea000000 b 224a0 <fat_file_read+0x1e0> <== NOT EXECUTED
2249c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
224a0: e28dd010 add sp, sp, #16 <== NOT EXECUTED
224a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00021a74 <fat_file_reopen>:
* RC_OK
*/
int
fat_file_reopen(fat_file_fd_t *fat_fd)
{
fat_fd->links_num++;
21a74: e5903008 ldr r3, [r0, #8] <== NOT EXECUTED
21a78: e2833001 add r3, r3, #1 <== NOT EXECUTED
21a7c: e5803008 str r3, [r0, #8] <== NOT EXECUTED
return RC_OK;
}
21a80: e3a00000 mov r0, #0 <== NOT EXECUTED
21a84: e12fff1e bx lr <== NOT EXECUTED
00021a88 <fat_file_size>:
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)) &&
21a88: e5913020 ldr r3, [r1, #32] <== NOT EXECUTED
21a8c: e3530001 cmp r3, #1 <== NOT EXECUTED
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
21a90: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
uint32_t cur_cln = fat_fd->cln;
21a94: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
int
fat_file_size(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
21a98: e1a04001 mov r4, r1 <== NOT EXECUTED
21a9c: e1a08000 mov r8, r0 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
21aa0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
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)) &&
21aa4: 1a000007 bne 21ac8 <fat_file_size+0x40> <== NOT EXECUTED
21aa8: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED
21aac: e3500000 cmp r0, #0 <== NOT EXECUTED
21ab0: 1a000004 bne 21ac8 <fat_file_size+0x40> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
21ab4: e5d5200a ldrb r2, [r5, #10] <== NOT EXECUTED
21ab8: e3120003 tst r2, #3 <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
21abc: 15953028 ldrne r3, [r5, #40] ; 0x28 <== NOT EXECUTED
21ac0: 15813018 strne r3, [r1, #24] <== NOT EXECUTED
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)) &&
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
21ac4: 1a000017 bne 21b28 <fat_file_size+0xa0> <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
return rc;
}
fat_fd->fat_file_size = 0;
21ac8: e3a0c000 mov ip, #0 <== 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;
21acc: e28d6004 add r6, sp, #4 <== NOT EXECUTED
21ad0: e5263004 str r3, [r6, #-4]! <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->vol.rdir_size;
return rc;
}
fat_fd->fat_file_size = 0;
21ad4: e584c018 str ip, [r4, #24] <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
21ad8: ea000007 b 21afc <fat_file_size+0x74> <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
21adc: eb00609d bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
21ae0: e3500000 cmp r0, #0 <== NOT EXECUTED
21ae4: 1a00000f bne 21b28 <fat_file_size+0xa0> <== NOT EXECUTED
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
21ae8: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
21aec: e1d530b6 ldrh r3, [r5, #6] <== NOT EXECUTED
21af0: e0823003 add r3, r2, r3 <== NOT EXECUTED
21af4: e5843018 str r3, [r4, #24] <== NOT EXECUTED
21af8: e1a0c007 mov ip, r7 <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
21afc: e59d7000 ldr r7, [sp] <== NOT EXECUTED
21b00: e285300c add r3, r5, #12 <== NOT EXECUTED
21b04: e8930408 ldm r3, {r3, sl} <== NOT EXECUTED
21b08: e0073003 and r3, r7, r3 <== NOT EXECUTED
21b0c: e153000a cmp r3, sl <== NOT EXECUTED
{
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
21b10: e1a00008 mov r0, r8 <== NOT EXECUTED
21b14: e1a0200d mov r2, sp <== NOT EXECUTED
21b18: e1a01007 mov r1, r7 <== NOT EXECUTED
return rc;
}
fat_fd->fat_file_size = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
21b1c: 3affffee bcc 21adc <fat_file_size+0x54> <== NOT EXECUTED
if ( rc != RC_OK )
return rc;
fat_fd->fat_file_size += fs_info->vol.bpc;
}
fat_fd->map.last_cln = save_cln;
21b20: e584c03c str ip, [r4, #60] ; 0x3c <== NOT EXECUTED
21b24: e3a00000 mov r0, #0 <== NOT EXECUTED
return rc;
}
21b28: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00021dc4 <fat_file_truncate>:
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 )
21dc4: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
21dc8: e1520003 cmp r2, r3 <== NOT EXECUTED
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
21dcc: e92d4073 push {r0, r1, r4, r5, r6, lr} <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
21dd0: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED
fat_file_truncate(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
uint32_t new_length
)
{
21dd4: e1a05001 mov r5, r1 <== NOT EXECUTED
21dd8: e1a06000 mov r6, r0 <== 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 )
21ddc: 2a000030 bcs 21ea4 <fat_file_truncate+0xe0> <== 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;
21de0: e3a04000 mov r4, #0 <== NOT EXECUTED
21de4: e58d4004 str r4, [sp, #4] <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
21de8: 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;
21dec: e3e04000 mvn r4, #0 <== NOT EXECUTED
21df0: e58d4000 str r4, [sp] <== NOT EXECUTED
if ( new_length >= fat_fd->fat_file_size )
return rc;
assert(fat_fd->fat_file_size);
21df4: 059f00b0 ldreq r0, [pc, #176] ; 21eac <fat_file_truncate+0xe8><== NOT EXECUTED
21df8: 059f10b0 ldreq r1, [pc, #176] ; 21eb0 <fat_file_truncate+0xec><== NOT EXECUTED
21dfc: 059f20b0 ldreq r2, [pc, #176] ; 21eb4 <fat_file_truncate+0xf0><== NOT EXECUTED
21e00: 059f30b0 ldreq r3, [pc, #176] ; 21eb8 <fat_file_truncate+0xf4><== NOT EXECUTED
21e04: 0b000c38 bleq 24eec <__assert_func> <== NOT EXECUTED
cl_start = (new_length + fs_info->vol.bpc - 1) >> fs_info->vol.bpc_log2;
21e08: e1dc40b6 ldrh r4, [ip, #6] <== NOT EXECUTED
21e0c: e5dcc008 ldrb ip, [ip, #8] <== NOT EXECUTED
21e10: e2444001 sub r4, r4, #1 <== NOT EXECUTED
21e14: e0844002 add r4, r4, r2 <== NOT EXECUTED
21e18: e1a04c34 lsr r4, r4, ip <== NOT EXECUTED
if ((cl_start << fs_info->vol.bpc_log2) >= fat_fd->fat_file_size)
21e1c: e1530c14 cmp r3, r4, lsl ip <== NOT EXECUTED
21e20: 9a00001f bls 21ea4 <fat_file_truncate+0xe0> <== NOT EXECUTED
return RC_OK;
if (cl_start != 0)
21e24: e3540000 cmp r4, #0 <== NOT EXECUTED
21e28: 0a000004 beq 21e40 <fat_file_truncate+0x7c> <== NOT EXECUTED
{
rc = fat_file_lseek(mt_entry, fat_fd, cl_start - 1, &new_last_cln);
21e2c: e2442001 sub r2, r4, #1 <== NOT EXECUTED
21e30: e1a0300d mov r3, sp <== NOT EXECUTED
21e34: ebffff3c bl 21b2c <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
21e38: e3500000 cmp r0, #0 <== NOT EXECUTED
21e3c: 1a000019 bne 21ea8 <fat_file_truncate+0xe4> <== NOT EXECUTED
return rc;
}
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
21e40: e1a00006 mov r0, r6 <== NOT EXECUTED
21e44: e1a01005 mov r1, r5 <== NOT EXECUTED
21e48: e1a02004 mov r2, r4 <== NOT EXECUTED
21e4c: e28d3004 add r3, sp, #4 <== NOT EXECUTED
21e50: ebffff35 bl 21b2c <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
21e54: e3500000 cmp r0, #0 <== NOT EXECUTED
21e58: 1a000012 bne 21ea8 <fat_file_truncate+0xe4> <== NOT EXECUTED
return rc;
rc = fat_free_fat_clusters_chain(mt_entry, cur_cln);
21e5c: e1a00006 mov r0, r6 <== NOT EXECUTED
21e60: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
21e64: eb006015 bl 39ec0 <fat_free_fat_clusters_chain> <== NOT EXECUTED
if (rc != RC_OK)
21e68: e3500000 cmp r0, #0 <== NOT EXECUTED
21e6c: 1a00000d bne 21ea8 <fat_file_truncate+0xe4> <== NOT EXECUTED
return rc;
if (cl_start != 0)
21e70: e3540000 cmp r4, #0 <== NOT EXECUTED
21e74: 0a00000b beq 21ea8 <fat_file_truncate+0xe4> <== NOT EXECUTED
{
rc = fat_set_fat_cluster(mt_entry, new_last_cln, FAT_GENFAT_EOC);
21e78: e1a00006 mov r0, r6 <== NOT EXECUTED
21e7c: e59d1000 ldr r1, [sp] <== NOT EXECUTED
21e80: e3e02000 mvn r2, #0 <== NOT EXECUTED
21e84: eb005f1b bl 39af8 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
21e88: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
fat_fd->map.file_cln = cl_start - 1;
fat_fd->map.disk_cln = new_last_cln;
21e8c: 059d3000 ldreq 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;
21e90: 02444001 subeq r4, r4, #1 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
fat_fd->map.last_cln = new_last_cln;
21e94: 0585303c streq 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;
21e98: 05854034 streq r4, [r5, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = new_last_cln;
21e9c: 05853038 streq r3, [r5, #56] ; 0x38 <== NOT EXECUTED
21ea0: ea000000 b 21ea8 <fat_file_truncate+0xe4> <== NOT EXECUTED
fat_fd->map.last_cln = new_last_cln;
21ea4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return RC_OK;
}
21ea8: e8bd807c pop {r2, r3, r4, r5, r6, pc} <== NOT EXECUTED
0002208c <fat_file_write>:
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
2208c: e92d4fff push {r0, r1, r2, r3, 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 )
22090: e2534000 subs r4, r3, #0 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t start,
uint32_t count,
const uint8_t *buf
)
{
22094: e1a06001 mov r6, r1 <== NOT EXECUTED
22098: e1a08000 mov r8, r0 <== NOT EXECUTED
2209c: e1a07002 mov r7, r2 <== NOT EXECUTED
int rc = 0;
ssize_t ret = 0;
fat_fs_info_t *fs_info = mt_entry->fs_info;
220a0: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t save_ofs;
uint32_t sec = 0;
uint32_t byte = 0;
uint32_t c = 0;
if ( count == 0 )
220a4: 01a01004 moveq r1, r4 <== NOT EXECUTED
220a8: 0a000081 beq 222b4 <fat_file_write+0x228> <== NOT EXECUTED
return cmpltd;
if ( start > fat_fd->fat_file_size )
220ac: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED
220b0: e1520003 cmp r2, r3 <== 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;
220b4: 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;
220b8: e58d3008 str r3, [sp, #8] <== 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;
220bc: e58d300c str r3, [sp, #12] <== NOT EXECUTED
uint32_t c = 0;
if ( count == 0 )
return cmpltd;
if ( start > fat_fd->fat_file_size )
220c0: 8a000005 bhi 220dc <fat_file_write+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
if ((count > fat_fd->size_limit) ||
220c4: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
220c8: e1540003 cmp r4, r3 <== NOT EXECUTED
220cc: 8a000002 bhi 220dc <fat_file_write+0x50> <== NOT EXECUTED
220d0: e0643003 rsb r3, r4, r3 <== NOT EXECUTED
220d4: e1520003 cmp r2, r3 <== NOT EXECUTED
220d8: 9a000003 bls 220ec <fat_file_write+0x60> <== NOT EXECUTED
(start > fat_fd->size_limit - count))
rtems_set_errno_and_return_minus_one( EIO );
220dc: eb0070b9 bl 3e3c8 <__errno> <== NOT EXECUTED
220e0: e3a03005 mov r3, #5 <== NOT EXECUTED
220e4: e5803000 str r3, [r0] <== NOT EXECUTED
220e8: ea000070 b 222b0 <fat_file_write+0x224> <== NOT EXECUTED
rc = fat_file_extend(mt_entry, fat_fd, start + count, &c);
220ec: e084a002 add sl, r4, r2 <== NOT EXECUTED
220f0: e1a0200a mov r2, sl <== NOT EXECUTED
220f4: e28d3008 add r3, sp, #8 <== NOT EXECUTED
220f8: ebffff6f bl 21ebc <fat_file_extend> <== NOT EXECUTED
if (rc != RC_OK)
220fc: e2501000 subs r1, r0, #0 <== NOT EXECUTED
22100: 1a00006b bne 222b4 <fat_file_write+0x228> <== NOT EXECUTED
/*
* check whether there was enough room on device to locate
* file of 'start + count' bytes
*/
if (c != (start + count))
22104: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
22108: e153000a cmp r3, sl <== NOT EXECUTED
count = c - start;
2210c: 10674003 rsbne r4, r7, r3 <== NOT EXECUTED
if ((FAT_FD_OF_ROOT_DIR(fat_fd)) &&
22110: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
22114: e3530001 cmp r3, #1 <== NOT EXECUTED
22118: 1a00001e bne 22198 <fat_file_write+0x10c> <== NOT EXECUTED
2211c: e5963024 ldr r3, [r6, #36] ; 0x24 <== NOT EXECUTED
22120: e3530000 cmp r3, #0 <== NOT EXECUTED
22124: 1a00001b bne 22198 <fat_file_write+0x10c> <== NOT EXECUTED
(fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)))
22128: e5d5300a ldrb r3, [r5, #10] <== NOT EXECUTED
2212c: e3130003 tst r3, #3 <== NOT EXECUTED
22130: 0a000018 beq 22198 <fat_file_write+0x10c> <== NOT EXECUTED
{
sec = fat_cluster_num_to_sector_num(mt_entry, fat_fd->cln);
22134: e596201c ldr r2, [r6, #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)) )
22138: 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;
2213c: e5983034 ldr r3, [r8, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
22140: 1a000003 bne 22154 <fat_file_write+0xc8> <== NOT EXECUTED
22144: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
22148: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
2214c: 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)) )
22150: 1a000003 bne 22164 <fat_file_write+0xd8> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
22154: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED
22158: e5d30005 ldrb r0, [r3, #5] <== NOT EXECUTED
2215c: e2423002 sub r3, r2, #2 <== NOT EXECUTED
22160: e0813013 add r3, r1, r3, lsl r0 <== 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);
22164: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED
22168: e5d51002 ldrb r1, [r5, #2] <== NOT EXECUTED
2216c: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED
22170: e2422001 sub r2, r2, #1 <== NOT EXECUTED
22174: e0831137 add r1, r3, r7, lsr r1 <== NOT EXECUTED
22178: e0072002 and r2, r7, r2 <== NOT EXECUTED
2217c: e1a00008 mov r0, r8 <== NOT EXECUTED
22180: e1a03004 mov r3, r4 <== NOT EXECUTED
22184: e58dc000 str ip, [sp] <== NOT EXECUTED
22188: eb000287 bl 22bac <_fat_block_write> <== NOT EXECUTED
if ( ret < 0 )
2218c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
22190: aa000047 bge 222b4 <fat_file_write+0x228> <== NOT EXECUTED
22194: ea000045 b 222b0 <fat_file_write+0x224> <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
22198: e5d53008 ldrb r3, [r5, #8] <== NOT EXECUTED
2219c: e1a03337 lsr r3, r7, r3 <== NOT EXECUTED
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
221a0: e28da00c add sl, sp, #12 <== NOT EXECUTED
return -1;
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
221a4: 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);
221a8: e1a02003 mov r2, r3 <== NOT EXECUTED
221ac: e1a00008 mov r0, r8 <== NOT EXECUTED
221b0: e1a01006 mov r1, r6 <== NOT EXECUTED
221b4: e1a0300a mov r3, sl <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
221b8: e1d5b0b6 ldrh fp, [r5, #6] <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
221bc: ebfffe5a bl 21b2c <fat_file_lseek> <== NOT EXECUTED
if (rc != RC_OK)
221c0: e3500000 cmp r0, #0 <== 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);
221c4: e1a01000 mov r1, r0 <== NOT EXECUTED
if (rc != RC_OK)
221c8: 1a000039 bne 222b4 <fat_file_write+0x228> <== NOT EXECUTED
return ret;
}
cl_start = start >> fs_info->vol.bpc_log2;
save_ofs = ofs = start & (fs_info->vol.bpc - 1);
221cc: e24bb001 sub fp, fp, #1 <== NOT EXECUTED
221d0: e007b00b and fp, r7, fp <== NOT EXECUTED
221d4: e1a09000 mov r9, r0 <== NOT EXECUTED
221d8: e1a0100b mov r1, fp <== NOT EXECUTED
221dc: e1a0a000 mov sl, r0 <== NOT EXECUTED
221e0: ea000027 b 22284 <fat_file_write+0x1f8> <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
221e4: e1d5c0b6 ldrh ip, [r5, #6] <== NOT EXECUTED
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
221e8: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
221ec: e061c00c rsb ip, r1, ip <== NOT EXECUTED
221f0: e15c0004 cmp ip, r4 <== NOT EXECUTED
221f4: 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)) )
221f8: e3570000 cmp r7, #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;
221fc: e5983034 ldr r3, [r8, #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) +
22200: e2477002 sub r7, r7, #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)) )
22204: 1a000003 bne 22218 <fat_file_write+0x18c> <== NOT EXECUTED
22208: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED
2220c: e3120003 tst r2, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
22210: 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)) )
22214: 1a000002 bne 22224 <fat_file_write+0x198> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
22218: e5932030 ldr r2, [r3, #48] ; 0x30 <== NOT EXECUTED
2221c: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
22220: e0827317 add r7, r2, r7, lsl r3 <== 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);
22224: e1d520b0 ldrh r2, [r5] <== NOT EXECUTED
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
sec = fat_cluster_num_to_sector_num(mt_entry, cur_cln);
sec += (ofs >> fs_info->vol.sec_log2);
22228: e5d59002 ldrb r9, [r5, #2] <== NOT EXECUTED
byte = ofs & (fs_info->vol.bps - 1);
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
2222c: e59d0034 ldr r0, [sp, #52] ; 0x34 <== NOT EXECUTED
{
c = MIN(count, (fs_info->vol.bpc - ofs));
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);
22230: e2422001 sub r2, r2, #1 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
22234: e0012002 and r2, r1, r2 <== NOT EXECUTED
22238: e080e00a add lr, r0, sl <== NOT EXECUTED
2223c: e1a0300c mov r3, ip <== NOT EXECUTED
22240: e1a00008 mov r0, r8 <== NOT EXECUTED
22244: e0871931 add r1, r7, r1, lsr r9 <== NOT EXECUTED
22248: e58de000 str lr, [sp] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
while (count > 0)
{
c = MIN(count, (fs_info->vol.bpc - ofs));
2224c: e58dc008 str ip, [sp, #8] <== 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);
22250: eb000255 bl 22bac <_fat_block_write> <== NOT EXECUTED
if ( ret < 0 )
22254: 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);
22258: e28d200c add r2, sp, #12 <== NOT EXECUTED
2225c: e1a00008 mov r0, r8 <== 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 )
22260: ba000012 blt 222b0 <fat_file_write+0x224> <== NOT EXECUTED
return -1;
count -= c;
cmpltd += c;
save_cln = cur_cln;
22264: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
22268: e1a01009 mov r1, r9 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
2226c: e59d7008 ldr r7, [sp, #8] <== NOT EXECUTED
cmpltd += c;
save_cln = cur_cln;
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
22270: eb005eb8 bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
22274: e2501000 subs r1, r0, #0 <== NOT EXECUTED
22278: 1a00000d bne 222b4 <fat_file_write+0x228> <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
cmpltd += c;
2227c: e08aa007 add sl, sl, r7 <== NOT EXECUTED
ret = _fat_block_write(mt_entry, sec, byte, c, buf + cmpltd);
if ( ret < 0 )
return -1;
count -= c;
22280: e0674004 rsb r4, r7, r4 <== NOT EXECUTED
rc = fat_file_lseek(mt_entry, fat_fd, cl_start, &cur_cln);
if (rc != RC_OK)
return rc;
while (count > 0)
22284: e3540000 cmp r4, #0 <== NOT EXECUTED
22288: 1affffd5 bne 221e4 <fat_file_write+0x158> <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
2228c: e5d53008 ldrb r3, [r5, #8] <== NOT EXECUTED
22290: e24bb001 sub fp, fp, #1 <== NOT EXECUTED
22294: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
22298: e08bb00a add fp, fp, sl <== NOT EXECUTED
2229c: e082b33b add fp, r2, fp, lsr r3 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
222a0: e5869038 str r9, [r6, #56] ; 0x38 <== NOT EXECUTED
ofs = 0;
}
/* update cache */
/* XXX: check this - I'm not sure :( */
fat_fd->map.file_cln = cl_start +
222a4: e586b034 str fp, [r6, #52] ; 0x34 <== NOT EXECUTED
((save_ofs + cmpltd - 1) >> fs_info->vol.bpc_log2);
fat_fd->map.disk_cln = save_cln;
return cmpltd;
222a8: e1a0100a mov r1, sl <== NOT EXECUTED
222ac: ea000000 b 222b4 <fat_file_write+0x228> <== NOT EXECUTED
222b0: e3e01000 mvn r1, #0 <== NOT EXECUTED
}
222b4: e1a00001 mov r0, r1 <== NOT EXECUTED
222b8: e28dd010 add sp, sp, #16 <== NOT EXECUTED
222bc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00039ec0 <fat_free_fat_clusters_chain>:
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
39ec0: e92d47f1 push {r0, 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;
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
39ec4: e3a03000 mov r3, #0 <== NOT EXECUTED
39ec8: e28da004 add sl, sp, #4 <== NOT EXECUTED
int
fat_free_fat_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
39ecc: e1a08000 mov r8, r0 <== NOT EXECUTED
39ed0: 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;
39ed4: e1a05003 mov r5, r3 <== NOT EXECUTED
39ed8: e52a3004 str r3, [sl, #-4]! <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t chain
)
{
int rc = RC_OK, rc1 = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
39edc: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cur_cln = chain;
uint32_t next_cln = 0;
39ee0: e1a06001 mov r6, r1 <== NOT EXECUTED
39ee4: e1a07003 mov r7, r3 <== NOT EXECUTED
uint32_t freed_cls_cnt = 0;
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
39ee8: ea000011 b 39f34 <fat_free_fat_clusters_chain+0x74> <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
39eec: ebffff99 bl 39d58 <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);
39ef0: e1a01006 mov r1, 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 )
39ef4: e2506000 subs r6, r0, #0 <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
39ef8: e1a02006 mov r2, r6 <== NOT EXECUTED
39efc: e1a00008 mov r0, r8 <== 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 )
39f00: 0a000006 beq 39f20 <fat_free_fat_clusters_chain+0x60> <== NOT EXECUTED
{
if(fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
39f04: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
39f08: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
39f0c: 10855003 addne r5, r5, r3 <== NOT EXECUTED
39f10: 15845040 strne r5, [r4, #64] ; 0x40 <== NOT EXECUTED
fat_buf_release(fs_info);
39f14: e1a00004 mov r0, r4 <== NOT EXECUTED
39f18: ebffa25d bl 22894 <fat_buf_release> <== NOT EXECUTED
return rc;
39f1c: ea000014 b 39f74 <fat_free_fat_clusters_chain+0xb4> <== NOT EXECUTED
}
rc = fat_set_fat_cluster(mt_entry, cur_cln, FAT_GENFAT_FREE);
39f20: ebfffef4 bl 39af8 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
rc1 = rc;
freed_cls_cnt++;
cur_cln = next_cln;
39f24: e59d6000 ldr r6, [sp] <== 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 )
39f28: e3500000 cmp r0, #0 <== NOT EXECUTED
39f2c: 11a07000 movne r7, r0 <== NOT EXECUTED
rc1 = rc;
freed_cls_cnt++;
39f30: e2855001 add r5, r5, #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)
39f34: e284300c add r3, r4, #12 <== NOT EXECUTED
39f38: e8931008 ldm r3, {r3, ip} <== NOT EXECUTED
39f3c: e0063003 and r3, r6, r3 <== NOT EXECUTED
39f40: e153000c cmp r3, ip <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cur_cln, &next_cln);
39f44: e1a01006 mov r1, r6 <== NOT EXECUTED
39f48: e1a0200d mov r2, sp <== NOT EXECUTED
39f4c: e1a00008 mov r0, r8 <== 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)
39f50: 3affffe5 bcc 39eec <fat_free_fat_clusters_chain+0x2c> <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
39f54: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
39f58: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls += freed_cls_cnt;
39f5c: 10855003 addne r5, r5, r3 <== NOT EXECUTED
freed_cls_cnt++;
cur_cln = next_cln;
}
fs_info->vol.next_cl = chain;
39f60: e5849044 str r9, [r4, #68] ; 0x44 <== NOT EXECUTED
if (fs_info->vol.free_cls != FAT_UNDEFINED_VALUE)
fs_info->vol.free_cls += freed_cls_cnt;
39f64: 15845040 strne r5, [r4, #64] ; 0x40 <== NOT EXECUTED
fat_buf_release(fs_info);
39f68: e1a00004 mov r0, r4 <== NOT EXECUTED
39f6c: ebffa248 bl 22894 <fat_buf_release> <== NOT EXECUTED
39f70: e1a06007 mov r6, r7 <== NOT EXECUTED
if (rc1 != RC_OK)
return rc1;
return RC_OK;
}
39f74: e1a00006 mov r0, r6 <== NOT EXECUTED
39f78: e8bd87f8 pop {r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
0002279c <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;
2279c: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
FAT_SET_UNIQ_INO_FREE((ino - fs_info->uino_base), fs_info->uino);
227a0: e5932078 ldr r2, [r3, #120] ; 0x78 <== NOT EXECUTED
227a4: e593306c ldr r3, [r3, #108] ; 0x6c <== NOT EXECUTED
227a8: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
227ac: e7d301a2 ldrb r0, [r3, r2, lsr #3] <== NOT EXECUTED
227b0: e2021007 and r1, r2, #7 <== NOT EXECUTED
227b4: e3a0c001 mov ip, #1 <== NOT EXECUTED
227b8: e1c0111c bic r1, r0, ip, lsl r1 <== NOT EXECUTED
227bc: e7c311a2 strb r1, [r3, r2, lsr #3] <== NOT EXECUTED
}
227c0: e12fff1e bx lr <== NOT EXECUTED
00039d58 <fat_get_fat_cluster>:
fat_get_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t *ret_val
)
{
39d58: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
rtems_bdbuf_buffer *block0 = NULL;
39d5c: e3a03000 mov r3, #0 <== NOT EXECUTED
uint32_t sec = 0;
uint32_t ofs = 0;
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
39d60: 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
)
{
39d64: e1a04001 mov r4, r1 <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
rtems_bdbuf_buffer *block0 = NULL;
39d68: 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
)
{
39d6c: e1a05002 mov r5, r2 <== NOT EXECUTED
int rc = RC_OK;
register fat_fs_info_t *fs_info = mt_entry->fs_info;
39d70: e5906034 ldr r6, [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)) )
39d74: 9a00004b bls 39ea8 <fat_get_fat_cluster+0x150> <== NOT EXECUTED
39d78: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED
39d7c: e2833001 add r3, r3, #1 <== NOT EXECUTED
39d80: e1510003 cmp r1, r3 <== NOT EXECUTED
39d84: 8a000047 bhi 39ea8 <fat_get_fat_cluster+0x150> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
39d88: e5d6300a ldrb r3, [r6, #10] <== NOT EXECUTED
39d8c: e2130001 ands r0, r3, #1 <== NOT EXECUTED
39d90: 108120a1 addne r2, r1, r1, lsr #1 <== NOT EXECUTED
39d94: 1a000002 bne 39da4 <fat_get_fat_cluster+0x4c> <== NOT EXECUTED
39d98: e3130002 tst r3, #2 <== NOT EXECUTED
39d9c: 11a02081 lslne r2, r1, #1 <== NOT EXECUTED
39da0: 01a02101 lsleq r2, r1, #2 <== NOT EXECUTED
39da4: e5d6a002 ldrb sl, [r6, #2] <== NOT EXECUTED
39da8: e596104c ldr r1, [r6, #76] ; 0x4c <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
39dac: e3500000 cmp r0, #0 <== 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) +
39db0: e081aa32 add sl, r1, r2, lsr sl <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
39db4: 108480a4 addne r8, r4, r4, lsr #1 <== NOT EXECUTED
39db8: 1a000002 bne 39dc8 <fat_get_fat_cluster+0x70> <== NOT EXECUTED
39dbc: e3130002 tst r3, #2 <== NOT EXECUTED
39dc0: 11a08084 lslne r8, r4, #1 <== NOT EXECUTED
39dc4: 01a08104 lsleq r8, r4, #2 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
39dc8: e1a00006 mov r0, r6 <== NOT EXECUTED
39dcc: e1a0100a mov r1, sl <== NOT EXECUTED
39dd0: e3a02001 mov r2, #1 <== NOT EXECUTED
39dd4: 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);
39dd8: e1d6b0b0 ldrh fp, [r6] <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
39ddc: ebffa2fc bl 229d4 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
39de0: e2507000 subs r7, 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);
39de4: e1a0900d mov r9, sp <== NOT EXECUTED
if (rc != RC_OK)
39de8: 1a000032 bne 39eb8 <fat_get_fat_cluster+0x160> <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
39dec: e5d6200a ldrb r2, [r6, #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);
39df0: e24bb001 sub fp, fp, #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 )
39df4: 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);
39df8: e008800b and r8, r8, fp <== 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 )
39dfc: 0a000020 beq 39e84 <fat_get_fat_cluster+0x12c> <== NOT EXECUTED
39e00: e3520004 cmp r2, #4 <== NOT EXECUTED
39e04: 0a000022 beq 39e94 <fat_get_fat_cluster+0x13c> <== NOT EXECUTED
39e08: e3520001 cmp r2, #1 <== NOT EXECUTED
39e0c: 1a000025 bne 39ea8 <fat_get_fat_cluster+0x150> <== 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)));
39e10: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39e14: e593b020 ldr fp, [r3, #32] <== NOT EXECUTED
if ( ofs == (fs_info->vol.bps - 1) )
39e18: e1d610b0 ldrh r1, [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)));
39e1c: e7db3008 ldrb r3, [fp, r8] <== NOT EXECUTED
if ( ofs == (fs_info->vol.bps - 1) )
39e20: e2411001 sub r1, r1, #1 <== NOT EXECUTED
39e24: e1580001 cmp r8, r1 <== 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)));
39e28: e5853000 str r3, [r5] <== NOT EXECUTED
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
39e2c: 108b8008 addne r8, fp, r8 <== NOT EXECUTED
39e30: 15d82001 ldrbne r2, [r8, #1] <== NOT EXECUTED
/*
* we are enforced in complex computations for FAT12 to escape CPU
* align problems for some architectures
*/
*ret_val = (*((uint8_t *)(block0->buffer + ofs)));
if ( ofs == (fs_info->vol.bps - 1) )
39e34: 1a00000a bne 39e64 <fat_get_fat_cluster+0x10c> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
39e38: e1a00006 mov r0, r6 <== NOT EXECUTED
39e3c: e28a1001 add r1, sl, #1 <== NOT EXECUTED
39e40: e1a0300d mov r3, sp <== NOT EXECUTED
39e44: ebffa2e2 bl 229d4 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
39e48: e3500000 cmp r0, #0 <== NOT EXECUTED
39e4c: 11a07000 movne r7, r0 <== NOT EXECUTED
39e50: 1a000018 bne 39eb8 <fat_get_fat_cluster+0x160> <== NOT EXECUTED
return rc;
*ret_val |= (*((uint8_t *)(block0->buffer)))<<8;
39e54: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39e58: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39e5c: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
39e60: e5953000 ldr r3, [r5] <== NOT EXECUTED
}
else
{
*ret_val |= (*((uint8_t *)(block0->buffer + ofs + 1)))<<8;
39e64: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
39e68: e5853000 str r3, [r5] <== NOT EXECUTED
39e6c: e5953000 ldr r3, [r5] <== NOT EXECUTED
}
if ( FAT_CLUSTER_IS_ODD(cln) )
39e70: e3140001 tst r4, #1 <== NOT EXECUTED
*ret_val = (*ret_val) >> FAT12_SHIFT;
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
39e74: 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;
39e78: 11a03223 lsrne r3, r3, #4 <== NOT EXECUTED
else
*ret_val = (*ret_val) & FAT_FAT12_MASK;
39e7c: 01a03a23 lsreq r3, r3, #20 <== NOT EXECUTED
39e80: ea000006 b 39ea0 <fat_get_fat_cluster+0x148> <== NOT EXECUTED
break;
case FAT_FAT16:
*ret_val = *((uint16_t *)(block0->buffer + ofs));
*ret_val = CF_LE_W(*ret_val);
39e84: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39e88: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39e8c: e19330b8 ldrh r3, [r3, r8] <== NOT EXECUTED
39e90: ea000002 b 39ea0 <fat_get_fat_cluster+0x148> <== NOT EXECUTED
break;
case FAT_FAT32:
*ret_val = *((uint32_t *)(block0->buffer + ofs));
*ret_val = CF_LE_L(*ret_val);
39e94: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39e98: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39e9c: e7933008 ldr r3, [r3, r8] <== NOT EXECUTED
39ea0: e5853000 str r3, [r5] <== NOT EXECUTED
break;
39ea4: ea000003 b 39eb8 <fat_get_fat_cluster+0x160> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one(EIO);
39ea8: eb001146 bl 3e3c8 <__errno> <== NOT EXECUTED
39eac: e3a03005 mov r3, #5 <== NOT EXECUTED
39eb0: e5803000 str r3, [r0] <== NOT EXECUTED
39eb4: e3e07000 mvn r7, #0 <== NOT EXECUTED
break;
}
return RC_OK;
}
39eb8: e1a00007 mov r0, r7 <== NOT EXECUTED
39ebc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000227dc <fat_get_unique_ino>:
* 0 means FAILED !!!
*
*/
uint32_t
fat_get_unique_ino(rtems_filesystem_mount_table_entry_t *mt_entry)
{
227dc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
register fat_fs_info_t *fs_info = mt_entry->fs_info;
227e0: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t j = 0;
bool resrc_unsuff = false;
while (!resrc_unsuff)
{
for (j = 0; j < fs_info->uino_pool_size; j++)
227e4: e3a05000 mov r5, #0 <== NOT EXECUTED
227e8: ea000024 b 22880 <fat_get_unique_ino+0xa4> <== NOT EXECUTED
{
if (!FAT_UNIQ_INO_IS_BUSY(fs_info->index, fs_info->uino))
227ec: e5943070 ldr r3, [r4, #112] ; 0x70 <== NOT EXECUTED
227f0: e594706c ldr r7, [r4, #108] ; 0x6c <== NOT EXECUTED
227f4: e7d701a3 ldrb r0, [r7, r3, lsr #3] <== NOT EXECUTED
227f8: e203c007 and ip, r3, #7 <== NOT EXECUTED
227fc: e1a08c50 asr r8, r0, ip <== NOT EXECUTED
22800: e3180001 tst r8, #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++;
22804: e2836001 add r6, r3, #1 <== 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))
22808: e08731a3 add r3, r7, r3, lsr #3 <== NOT EXECUTED
2280c: 1a000006 bne 2282c <fat_get_unique_ino+0x50> <== NOT EXECUTED
{
FAT_SET_UNIQ_INO_BUSY(fs_info->index, fs_info->uino);
22810: e3a02001 mov r2, #1 <== NOT EXECUTED
22814: e1800c12 orr r0, r0, r2, lsl ip <== NOT EXECUTED
22818: e5c30000 strb r0, [r3] <== NOT EXECUTED
return (fs_info->uino_base + fs_info->index);
2281c: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
22820: e5940070 ldr r0, [r4, #112] ; 0x70 <== NOT EXECUTED
22824: e0800003 add r0, r0, r3 <== NOT EXECUTED
22828: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
}
fs_info->index++;
if (fs_info->index >= fs_info->uino_pool_size)
2282c: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED
22830: e1560003 cmp r6, r3 <== NOT EXECUTED
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);
}
fs_info->index++;
22834: e5846070 str r6, [r4, #112] ; 0x70 <== NOT EXECUTED
if (fs_info->index >= fs_info->uino_pool_size)
fs_info->index = 0;
22838: 25845070 strcs r5, [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++)
2283c: e2822001 add r2, r2, #1 <== NOT EXECUTED
22840: e1520001 cmp r2, r1 <== NOT EXECUTED
22844: 3affffe8 bcc 227ec <fat_get_unique_ino+0x10> <== 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))
22848: e5942078 ldr r2, [r4, #120] ; 0x78 <== NOT EXECUTED
2284c: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED
22850: e0623003 rsb r3, r2, r3 <== NOT EXECUTED
22854: e1a01081 lsl r1, r1, #1 <== NOT EXECUTED
22858: e1510003 cmp r1, r3 <== NOT EXECUTED
2285c: 2a00000a bcs 2288c <fat_get_unique_ino+0xb0> <== NOT EXECUTED
{
fs_info->uino_pool_size <<= 1;
22860: e5841074 str r1, [r4, #116] ; 0x74 <== NOT EXECUTED
fs_info->uino = realloc(fs_info->uino, fs_info->uino_pool_size);
22864: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
22868: ebff989d bl 8ae4 <realloc> <== NOT EXECUTED
if (fs_info->uino != NULL)
2286c: 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);
22870: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED
if (fs_info->uino != NULL)
22874: 0a000004 beq 2288c <fat_get_unique_ino+0xb0> <== NOT EXECUTED
fs_info->index = fs_info->uino_pool_size;
22878: e5943074 ldr r3, [r4, #116] ; 0x74 <== NOT EXECUTED
2287c: e5843070 str r3, [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++)
22880: e5941074 ldr r1, [r4, #116] ; 0x74 <== NOT EXECUTED
22884: e3a02000 mov r2, #0 <== NOT EXECUTED
22888: eaffffec b 22840 <fat_get_unique_ino+0x64> <== NOT EXECUTED
2288c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
else
resrc_unsuff = true;
}
return 0;
}
22890: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00022df0 <fat_init_clusters_chain>:
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
22df0: e92d41f1 push {r0, 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;
22df4: e5905034 ldr r5, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cur_cln = start_cln;
22df8: e58d1000 str r1, [sp] <== NOT EXECUTED
int
fat_init_clusters_chain(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t start_cln
)
{
22dfc: e1a06000 mov r6, 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));
22e00: e3a01001 mov r1, #1 <== NOT EXECUTED
22e04: e1d500b6 ldrh r0, [r5, #6] <== NOT EXECUTED
22e08: ebff90b9 bl 70f4 <calloc> <== NOT EXECUTED
if ( buf == NULL )
22e0c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
22e10: 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 )
22e14: 1a000011 bne 22e60 <fat_init_clusters_chain+0x70> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
22e18: eb006d6a bl 3e3c8 <__errno> <== NOT EXECUTED
22e1c: e3a03005 mov r3, #5 <== NOT EXECUTED
22e20: e5803000 str r3, [r0] <== NOT EXECUTED
22e24: e3e08000 mvn r8, #0 <== NOT EXECUTED
22e28: ea000018 b 22e90 <fat_init_clusters_chain+0xa0> <== NOT EXECUTED
while ((cur_cln & fs_info->vol.mask) < fs_info->vol.eoc_val)
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
22e2c: ebffffdb bl 22da0 <fat_cluster_write> <== NOT EXECUTED
22e30: e1a08000 mov r8, r0 <== NOT EXECUTED
if ( ret == -1 )
22e34: e3780001 cmn r8, #1 <== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
22e38: e1a0200d mov r2, sp <== NOT EXECUTED
22e3c: e1a00006 mov r0, r6 <== 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 )
22e40: 0a000003 beq 22e54 <fat_init_clusters_chain+0x64> <== NOT EXECUTED
{
free(buf);
return -1;
}
rc = fat_get_fat_cluster(mt_entry, cur_cln, &cur_cln);
22e44: e59d1000 ldr r1, [sp] <== NOT EXECUTED
22e48: eb005bc2 bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
22e4c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
22e50: 0a000002 beq 22e60 <fat_init_clusters_chain+0x70> <== NOT EXECUTED
{
free(buf);
22e54: e1a00004 mov r0, r4 <== NOT EXECUTED
22e58: ebff9215 bl 76b4 <free> <== NOT EXECUTED
return rc;
22e5c: ea00000b b 22e90 <fat_init_clusters_chain+0xa0> <== 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)
22e60: e59d3000 ldr r3, [sp] <== NOT EXECUTED
22e64: e595e00c ldr lr, [r5, #12] <== NOT EXECUTED
22e68: e595c010 ldr ip, [r5, #16] <== NOT EXECUTED
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
22e6c: 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)
22e70: e003300e and r3, r3, lr <== NOT EXECUTED
22e74: e153000c cmp r3, ip <== NOT EXECUTED
{
ret = fat_cluster_write(mt_entry, cur_cln, buf);
22e78: e1a02004 mov r2, r4 <== NOT EXECUTED
22e7c: e1a00006 mov r0, r6 <== 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)
22e80: 3affffe9 bcc 22e2c <fat_init_clusters_chain+0x3c> <== NOT EXECUTED
free(buf);
return rc;
}
}
free(buf);
22e84: e1a00004 mov r0, r4 <== NOT EXECUTED
22e88: ebff9209 bl 76b4 <free> <== NOT EXECUTED
22e8c: e3a08000 mov r8, #0 <== NOT EXECUTED
return rc;
}
22e90: e1a00008 mov r0, r8 <== NOT EXECUTED
22e94: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00022f28 <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)
{
22f28: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
22f2c: e24dd0b8 sub sp, sp, #184 ; 0xb8 <== NOT EXECUTED
22f30: 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;
22f34: e3a06000 mov r6, #0 <== NOT EXECUTED
rc = stat(mt_entry->dev, &stat_buf);
22f38: e5900070 ldr r0, [r0, #112] ; 0x70 <== NOT EXECUTED
22f3c: 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;
22f40: 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;
22f44: 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);
22f48: ebff97b9 bl 8e34 <stat> <== NOT EXECUTED
if (rc == -1)
22f4c: 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);
22f50: e1a07000 mov r7, r0 <== NOT EXECUTED
if (rc == -1)
22f54: 0a000167 beq 234f8 <fat_init_volume_info+0x5d0> <== NOT EXECUTED
return rc;
/* Must be a block device. */
if (!S_ISBLK(stat_buf.st_mode))
22f58: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED
22f5c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
22f60: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
22f64: 0a000002 beq 22f74 <fat_init_volume_info+0x4c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTTY);
22f68: eb006d16 bl 3e3c8 <__errno> <== NOT EXECUTED
22f6c: e3a03019 mov r3, #25 <== NOT EXECUTED
22f70: ea00015e b 234f0 <fat_init_volume_info+0x5c8> <== NOT EXECUTED
/* check that device is registred as block device and lock it */
vol->dd = rtems_disk_obtain(stat_buf.st_rdev);
22f74: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED
22f78: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
22f7c: ebff8cc6 bl 629c <rtems_disk_obtain> <== NOT EXECUTED
if (vol->dd == NULL)
22f80: 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);
22f84: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if (vol->dd == NULL)
22f88: 0a00000a beq 22fb8 <fat_init_volume_info+0x90> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
vol->dev = stat_buf.st_rdev;
22f8c: e28d1078 add r1, sp, #120 ; 0x78 <== NOT EXECUTED
22f90: 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);
22f94: 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;
22f98: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED
22f9c: 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);
22fa0: e28d30b4 add r3, sp, #180 ; 0xb4 <== NOT EXECUTED
22fa4: ebff88cf bl 52e8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
22fa8: e3500000 cmp r0, #0 <== NOT EXECUTED
22fac: 0a000004 beq 22fc4 <fat_init_volume_info+0x9c> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
22fb0: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
22fb4: ebff8d34 bl 648c <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO);
22fb8: eb006d02 bl 3e3c8 <__errno> <== NOT EXECUTED
22fbc: e3a03005 mov r3, #5 <== NOT EXECUTED
22fc0: ea00014a b 234f0 <fat_init_volume_info+0x5c8> <== NOT EXECUTED
}
memcpy( boot_rec, block->buffer, FAT_MAX_BPB_SIZE);
22fc4: e59d30b4 ldr r3, [sp, #180] ; 0xb4 <== NOT EXECUTED
22fc8: e3a0205a mov r2, #90 ; 0x5a <== NOT EXECUTED
22fcc: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
22fd0: e28d0004 add r0, sp, #4 <== NOT EXECUTED
22fd4: eb0079ab bl 41688 <memcpy> <== NOT EXECUTED
sc = rtems_bdbuf_release( block);
22fd8: e59d00b4 ldr r0, [sp, #180] ; 0xb4 <== NOT EXECUTED
22fdc: ebff8481 bl 41e8 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
22fe0: e3500000 cmp r0, #0 <== NOT EXECUTED
22fe4: 1afffff1 bne 22fb0 <fat_init_volume_info+0x88> <== 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);
22fe8: e5dd2010 ldrb r2, [sp, #16] <== NOT EXECUTED
22fec: e5dd300f ldrb r3, [sp, #15] <== NOT EXECUTED
22ff0: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
if ( (vol->bps != 512) &&
22ff4: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
22ff8: 13530c02 cmpne r3, #512 ; 0x200 <== 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);
22ffc: e1c430b0 strh r3, [r4] <== NOT EXECUTED
if ( (vol->bps != 512) &&
23000: 0a000003 beq 23014 <fat_init_volume_info+0xec> <== NOT EXECUTED
23004: e3530b02 cmp r3, #2048 ; 0x800 <== NOT EXECUTED
23008: 0a000001 beq 23014 <fat_init_volume_info+0xec> <== NOT EXECUTED
2300c: e3530a01 cmp r3, #4096 ; 0x1000 <== NOT EXECUTED
23010: 1a0000ad bne 232cc <fat_init_volume_info+0x3a4> <== 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;
23014: e3a02000 mov r2, #0 <== NOT EXECUTED
23018: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED
2301c: e1a034a3 lsr r3, r3, #9 <== NOT EXECUTED
23020: ea000003 b 23034 <fat_init_volume_info+0x10c> <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
23024: e5d42003 ldrb r2, [r4, #3] <== NOT EXECUTED
23028: e2822001 add r2, r2, #1 <== NOT EXECUTED
2302c: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED
23030: e1a030c3 asr r3, r3, #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;
23034: e3130001 tst r3, #1 <== NOT EXECUTED
23038: 0afffff9 beq 23024 <fat_init_volume_info+0xfc> <== NOT EXECUTED
i >>= 1, vol->sec_mul++);
for (vol->sec_log2 = 0, i = vol->bps; (i & 1) == 0;
2303c: e3a03000 mov r3, #0 <== NOT EXECUTED
23040: e5c43002 strb r3, [r4, #2] <== NOT EXECUTED
23044: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED
23048: ea000003 b 2305c <fat_init_volume_info+0x134> <== NOT EXECUTED
i >>= 1, vol->sec_log2++);
2304c: e5d42002 ldrb r2, [r4, #2] <== NOT EXECUTED
23050: e2822001 add r2, r2, #1 <== NOT EXECUTED
23054: e5c42002 strb r2, [r4, #2] <== NOT EXECUTED
23058: e1a030c3 asr r3, r3, #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;
2305c: e3130001 tst r3, #1 <== NOT EXECUTED
23060: 0afffff9 beq 2304c <fat_init_volume_info+0x124> <== NOT EXECUTED
i >>= 1, vol->sec_log2++);
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
23064: e5dd2011 ldrb r2, [sp, #17] <== NOT EXECUTED
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
23068: e3520000 cmp r2, #0 <== 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;
2306c: 13a03000 movne 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);
23070: e5c42004 strb r2, [r4, #4] <== 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;
23074: 15c43005 strbne r3, [r4, #5] <== NOT EXECUTED
vol->spc = FAT_GET_BR_SECTORS_PER_CLUSTER(boot_rec);
/*
* "sectors per cluster" of zero is invalid
* (and would hang the following loop)
*/
if (vol->spc == 0)
23078: 1a000003 bne 2308c <fat_init_volume_info+0x164> <== NOT EXECUTED
2307c: ea000092 b 232cc <fat_init_volume_info+0x3a4> <== 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;
i >>= 1, vol->spc_log2++);
23080: e2833001 add r3, r3, #1 <== NOT EXECUTED
23084: e5c43005 strb r3, [r4, #5] <== NOT EXECUTED
23088: e1a020c2 asr r2, 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;
2308c: e3120001 tst r2, #1 <== NOT EXECUTED
23090: e5d43005 ldrb r3, [r4, #5] <== NOT EXECUTED
23094: 0afffff9 beq 23080 <fat_init_volume_info+0x158> <== 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)
23098: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
2309c: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED
230a0: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
230a4: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED
230a8: e3530902 cmp r3, #32768 ; 0x8000 <== 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;
230ac: 93a02000 movls r2, #0 <== 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)
230b0: e1c430b6 strh r3, [r4, #6] <== 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;
230b4: 95c42008 strbls r2, [r4, #8] <== 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)
230b8: 9a000004 bls 230d0 <fat_init_volume_info+0x1a8> <== NOT EXECUTED
230bc: ea000082 b 232cc <fat_init_volume_info+0x3a4> <== 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;
i >>= 1, vol->bpc_log2++);
230c0: e5d42008 ldrb r2, [r4, #8] <== NOT EXECUTED
230c4: e2822001 add r2, r2, #1 <== NOT EXECUTED
230c8: e5c42008 strb r2, [r4, #8] <== NOT EXECUTED
230cc: e1a030c3 asr r3, r3, #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;
230d0: e3130001 tst r3, #1 <== NOT EXECUTED
230d4: 0afffff9 beq 230c0 <fat_init_volume_info+0x198> <== NOT EXECUTED
i >>= 1, vol->bpc_log2++);
vol->fats = FAT_GET_BR_FAT_NUM(boot_rec);
230d8: e5dd3014 ldrb r3, [sp, #20] <== NOT EXECUTED
230dc: e5c43009 strb r3, [r4, #9] <== NOT EXECUTED
vol->fat_loc = FAT_GET_BR_RESERVED_SECTORS_NUM(boot_rec);
230e0: e5dd2013 ldrb r2, [sp, #19] <== NOT EXECUTED
230e4: e5dd3012 ldrb r3, [sp, #18] <== NOT EXECUTED
230e8: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
230ec: e1c431b4 strh r3, [r4, #20] <== NOT EXECUTED
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)) /
230f0: e1d410b0 ldrh r1, [r4] <== 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);
230f4: e5dd2016 ldrb r2, [sp, #22] <== NOT EXECUTED
230f8: 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)) /
230fc: 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);
23100: 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)) /
23104: 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);
23108: 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)) /
2310c: eb00ccc0 bl 56414 <__aeabi_idiv> <== NOT EXECUTED
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
23110: e5d43002 ldrb r3, [r4, #2] <== NOT EXECUTED
23114: 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)) /
23118: e5840024 str r0, [r4, #36] ; 0x24 <== NOT EXECUTED
vol->bps;
vol->rdir_size = vol->rdir_secs << vol->sec_log2;
2311c: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
if ( (FAT_GET_BR_SECTORS_PER_FAT(boot_rec)) != 0)
23120: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED
23124: e5dd301a ldrb r3, [sp, #26] <== NOT EXECUTED
23128: e1933402 orrs r3, 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);
2312c: 05dd302a ldrbeq r3, [sp, #42] ; 0x2a <== NOT EXECUTED
23130: 05dd2029 ldrbeq r2, [sp, #41] ; 0x29 <== NOT EXECUTED
23134: 05dd1028 ldrbeq r1, [sp, #40] ; 0x28 <== NOT EXECUTED
23138: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED
2313c: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED
23140: 05dd202b ldrbeq r2, [sp, #43] ; 0x2b <== NOT EXECUTED
23144: 01833001 orreq r3, r3, r1 <== NOT EXECUTED
23148: 01833c02 orreq r3, r3, r2, lsl #24 <== NOT EXECUTED
2314c: e5843018 str r3, [r4, #24] <== NOT EXECUTED
vol->data_fsec = vol->fat_loc + vol->fats * vol->fat_length +
23150: e5d42009 ldrb r2, [r4, #9] <== NOT EXECUTED
23154: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
23158: e0030291 mul r3, r1, r2 <== NOT EXECUTED
2315c: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED
23160: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
23164: e0821001 add r1, r2, r1 <== NOT EXECUTED
vol->rdir_secs;
/* for FAT12/16 root dir starts at(sector) */
vol->rdir_loc = vol->fat_loc + vol->fats * vol->fat_length;
23168: e0832002 add r2, r3, r2 <== 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 +
2316c: e0813003 add r3, r1, r3 <== NOT EXECUTED
23170: 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;
23174: e584201c str r2, [r4, #28] <== NOT EXECUTED
if ( (FAT_GET_BR_TOTAL_SECTORS_NUM16(boot_rec)) != 0)
23178: e5dd2018 ldrb r2, [sp, #24] <== NOT EXECUTED
2317c: e5dd3017 ldrb r3, [sp, #23] <== NOT EXECUTED
23180: e1933402 orrs r3, r3, r2, 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);
23184: 05dd3026 ldrbeq r3, [sp, #38] ; 0x26 <== NOT EXECUTED
23188: 05dd2025 ldrbeq r2, [sp, #37] ; 0x25 <== NOT EXECUTED
2318c: 01a03803 lsleq r3, r3, #16 <== NOT EXECUTED
23190: 05dd1024 ldrbeq r1, [sp, #36] ; 0x24 <== NOT EXECUTED
23194: 01833402 orreq r3, r3, r2, lsl #8 <== NOT EXECUTED
23198: 05dd2027 ldrbeq r2, [sp, #39] ; 0x27 <== NOT EXECUTED
2319c: 01833001 orreq r3, r3, r1 <== NOT EXECUTED
231a0: 01833c02 orreq r3, r3, r2, lsl #24 <== NOT EXECUTED
231a4: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
data_secs = vol->tot_secs - vol->data_fsec;
vol->data_cls = data_secs / vol->spc;
231a8: e5d41004 ldrb r1, [r4, #4] <== NOT EXECUTED
231ac: e284302c add r3, r4, #44 ; 0x2c <== NOT EXECUTED
231b0: e8930009 ldm r3, {r0, r3} <== NOT EXECUTED
231b4: e0400003 sub r0, r0, r3 <== NOT EXECUTED
231b8: eb00cc51 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
231bc: e59f3340 ldr r3, [pc, #832] ; 23504 <fat_init_volume_info+0x5dc><== NOT EXECUTED
231c0: 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;
231c4: e5840034 str r0, [r4, #52] ; 0x34 <== NOT EXECUTED
/* determine FAT type at least */
if ( vol->data_cls < FAT_FAT12_MAX_CLN)
{
vol->type = FAT_FAT12;
231c8: 93a03001 movls r3, #1 <== NOT EXECUTED
231cc: 95c4300a strbls r3, [r4, #10] <== NOT EXECUTED
vol->mask = FAT_FAT12_MASK;
231d0: 959f3330 ldrls r3, [pc, #816] ; 23508 <fat_init_volume_info+0x5e0><== NOT EXECUTED
231d4: 9a000005 bls 231f0 <fat_init_volume_info+0x2c8> <== NOT EXECUTED
vol->eoc_val = FAT_FAT12_EOC;
}
else
{
if ( vol->data_cls < FAT_FAT16_MAX_CLN)
231d8: e59f332c ldr r3, [pc, #812] ; 2350c <fat_init_volume_info+0x5e4><== NOT EXECUTED
231dc: e1500003 cmp r0, r3 <== NOT EXECUTED
231e0: 8a000005 bhi 231fc <fat_init_volume_info+0x2d4> <== NOT EXECUTED
{
vol->type = FAT_FAT16;
231e4: e3a03002 mov r3, #2 <== NOT EXECUTED
231e8: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED
vol->mask = FAT_FAT16_MASK;
231ec: e59f331c ldr r3, [pc, #796] ; 23510 <fat_init_volume_info+0x5e8><== NOT EXECUTED
231f0: e584300c str r3, [r4, #12] <== NOT EXECUTED
vol->eoc_val = FAT_FAT16_EOC;
231f4: e2433007 sub r3, r3, #7 <== NOT EXECUTED
231f8: ea000004 b 23210 <fat_init_volume_info+0x2e8> <== NOT EXECUTED
}
else
{
vol->type = FAT_FAT32;
231fc: e3a03004 mov r3, #4 <== NOT EXECUTED
23200: e5c4300a strb r3, [r4, #10] <== NOT EXECUTED
vol->mask = FAT_FAT32_MASK;
23204: e3e0320f mvn r3, #-268435456 ; 0xf0000000 <== NOT EXECUTED
23208: e584300c str r3, [r4, #12] <== NOT EXECUTED
vol->eoc_val = FAT_FAT32_EOC;
2320c: e3e0327f mvn r3, #-268435449 ; 0xf0000007 <== NOT EXECUTED
23210: e5843010 str r3, [r4, #16] <== NOT EXECUTED
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;
register fat_vol_t *vol = &fs_info->vol;
23214: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
23218: e3530004 cmp r3, #4 <== NOT EXECUTED
2321c: 1a000059 bne 23388 <fat_init_volume_info+0x460> <== NOT EXECUTED
}
}
if (vol->type == FAT_FAT32)
{
vol->rdir_cl = FAT_GET_BR_FAT32_ROOT_CLUSTER(boot_rec);
23220: e5dd3032 ldrb r3, [sp, #50] ; 0x32 <== NOT EXECUTED
23224: e5dd2031 ldrb r2, [sp, #49] ; 0x31 <== NOT EXECUTED
23228: e5dd1030 ldrb r1, [sp, #48] ; 0x30 <== NOT EXECUTED
2322c: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
23230: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
23234: e5dd2033 ldrb r2, [sp, #51] ; 0x33 <== NOT EXECUTED
23238: e1833001 orr r3, r3, r1 <== NOT EXECUTED
2323c: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
23240: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
vol->mirror = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_MIRROR;
23244: e5dd302c ldrb r3, [sp, #44] ; 0x2c <== NOT EXECUTED
23248: e2033080 and r3, r3, #128 ; 0x80 <== NOT EXECUTED
2324c: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
if (vol->mirror)
23250: e3530000 cmp r3, #0 <== NOT EXECUTED
vol->afat = FAT_GET_BR_EXT_FLAGS(boot_rec) & FAT_BR_EXT_FLAGS_FAT_NUM;
23254: 15dd302c ldrbne r3, [sp, #44] ; 0x2c <== NOT EXECUTED
23258: 1203300f andne r3, r3, #15 <== NOT EXECUTED
else
vol->afat = 0;
2325c: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED
vol->info_sec = FAT_GET_BR_FAT32_FS_INFO_SECTOR(boot_rec);
23260: e5dd1035 ldrb r1, [sp, #53] ; 0x35 <== NOT EXECUTED
23264: e5dd3034 ldrb r3, [sp, #52] ; 0x34 <== NOT EXECUTED
23268: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED
if( vol->info_sec == 0 )
2326c: 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);
23270: e1c413bc strh r1, [r4, #60] ; 0x3c <== NOT EXECUTED
if( vol->info_sec == 0 )
23274: 0a000014 beq 232cc <fat_init_volume_info+0x3a4> <== 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,
23278: e28d60a8 add r6, sp, #168 ; 0xa8 <== NOT EXECUTED
2327c: e1a00005 mov r0, r5 <== NOT EXECUTED
23280: e3a02000 mov r2, #0 <== NOT EXECUTED
23284: e3a03004 mov r3, #4 <== NOT EXECUTED
23288: e58d6000 str r6, [sp] <== NOT EXECUTED
2328c: ebffff01 bl 22e98 <_fat_block_read> <== NOT EXECUTED
FAT_FSI_LEADSIG_SIZE, fs_info_sector);
if ( ret < 0 )
23290: e3500000 cmp r0, #0 <== NOT EXECUTED
23294: ba00001b blt 23308 <fat_init_volume_info+0x3e0> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
return -1;
}
if (FAT_GET_FSINFO_LEAD_SIGNATURE(fs_info_sector) !=
23298: e5dd20aa ldrb r2, [sp, #170] ; 0xaa <== NOT EXECUTED
2329c: e5dd30a9 ldrb r3, [sp, #169] ; 0xa9 <== NOT EXECUTED
232a0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
232a4: e5dd10a8 ldrb r1, [sp, #168] ; 0xa8 <== NOT EXECUTED
232a8: e1822403 orr r2, r2, r3, lsl #8 <== NOT EXECUTED
232ac: e5dd30ab ldrb r3, [sp, #171] ; 0xab <== NOT EXECUTED
232b0: e1822001 orr r2, r2, r1 <== NOT EXECUTED
232b4: e1822c03 orr r2, r2, r3, lsl #24 <== NOT EXECUTED
232b8: e59f3254 ldr r3, [pc, #596] ; 23514 <fat_init_volume_info+0x5ec><== NOT EXECUTED
232bc: e1520003 cmp r2, r3 <== NOT EXECUTED
232c0: 0a000006 beq 232e0 <fat_init_volume_info+0x3b8> <== 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);
232c4: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
232c8: ebfffd71 bl 22894 <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);
232cc: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
232d0: ebff8c6d bl 648c <rtems_disk_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
232d4: eb006c3b bl 3e3c8 <__errno> <== NOT EXECUTED
232d8: e3a03016 mov r3, #22 <== NOT EXECUTED
232dc: ea000083 b 234f0 <fat_init_volume_info+0x5c8> <== NOT EXECUTED
}
else
{
ret = _fat_block_read(mt_entry, vol->info_sec , FAT_FSI_INFO,
232e0: e1d413bc ldrh r1, [r4, #60] ; 0x3c <== NOT EXECUTED
232e4: e1a00005 mov r0, r5 <== NOT EXECUTED
232e8: e3a02f79 mov r2, #484 ; 0x1e4 <== NOT EXECUTED
232ec: e3a0300c mov r3, #12 <== NOT EXECUTED
232f0: e58d6000 str r6, [sp] <== NOT EXECUTED
232f4: ebfffee7 bl 22e98 <_fat_block_read> <== NOT EXECUTED
FAT_USEFUL_INFO_SIZE, fs_info_sector);
if ( ret < 0 )
232f8: e3500000 cmp r0, #0 <== NOT EXECUTED
232fc: aa000004 bge 23314 <fat_init_volume_info+0x3ec> <== 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);
23300: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
23304: ebfffd62 bl 22894 <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);
23308: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
2330c: ebff8c5e bl 648c <rtems_disk_release> <== NOT EXECUTED
23310: ea000077 b 234f4 <fat_init_volume_info+0x5cc> <== NOT EXECUTED
return -1;
}
vol->free_cls = FAT_GET_FSINFO_FREE_CLUSTER_COUNT(fs_info_sector);
23314: e5dd30ae ldrb r3, [sp, #174] ; 0xae <== NOT EXECUTED
23318: e5dd20ad ldrb r2, [sp, #173] ; 0xad <== NOT EXECUTED
2331c: e5dd10ac ldrb r1, [sp, #172] ; 0xac <== NOT EXECUTED
23320: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
23324: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
23328: e5dd20af ldrb r2, [sp, #175] ; 0xaf <== NOT EXECUTED
2332c: e1833001 orr r3, r3, r1 <== NOT EXECUTED
23330: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
23334: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
vol->next_cl = FAT_GET_FSINFO_NEXT_FREE_CLUSTER(fs_info_sector);
23338: e5dd30b2 ldrb r3, [sp, #178] ; 0xb2 <== NOT EXECUTED
2333c: e5dd20b1 ldrb r2, [sp, #177] ; 0xb1 <== NOT EXECUTED
23340: e5dd10b0 ldrb r1, [sp, #176] ; 0xb0 <== NOT EXECUTED
23344: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
23348: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
2334c: e5dd20b3 ldrb r2, [sp, #179] ; 0xb3 <== NOT EXECUTED
23350: e1833001 orr r3, r3, r1 <== NOT EXECUTED
23354: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
23358: 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);
2335c: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
rc = fat_fat32_update_fsinfo_sector(mt_entry, 0xFFFFFFFF,
23360: e1a00005 mov r0, r5 <== NOT EXECUTED
23364: e1a02001 mov r2, r1 <== NOT EXECUTED
23368: ebfffe3b bl 22c5c <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
0xFFFFFFFF);
if ( rc != RC_OK )
2336c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
23370: 0a00000b beq 233a4 <fat_init_volume_info+0x47c> <== 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);
23374: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
23378: ebfffd45 bl 22894 <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);
2337c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
23380: ebff8c41 bl 648c <rtems_disk_release> <== NOT EXECUTED
return rc;
23384: ea00005b b 234f8 <fat_init_volume_info+0x5d0> <== NOT EXECUTED
}
}
}
else
{
vol->rdir_cl = 0;
23388: e3a03000 mov r3, #0 <== NOT EXECUTED
vol->mirror = 0;
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
2338c: e3e02000 mvn r2, #0 <== NOT EXECUTED
}
else
{
vol->rdir_cl = 0;
vol->mirror = 0;
vol->afat = 0;
23390: e5c43050 strb r3, [r4, #80] ; 0x50 <== NOT EXECUTED
vol->free_cls = 0xFFFFFFFF;
vol->next_cl = 0xFFFFFFFF;
23394: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED
}
}
}
else
{
vol->rdir_cl = 0;
23398: e5843038 str r3, [r4, #56] ; 0x38 <== NOT EXECUTED
vol->mirror = 0;
2339c: e5c43048 strb r3, [r4, #72] ; 0x48 <== NOT EXECUTED
vol->afat = 0;
vol->free_cls = 0xFFFFFFFF;
233a0: 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);
233a4: e5950034 ldr r0, [r5, #52] ; 0x34 <== NOT EXECUTED
233a8: ebfffd39 bl 22894 <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;
233ac: e5d41050 ldrb r1, [r4, #80] ; 0x50 <== NOT EXECUTED
233b0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
233b4: e1d421b4 ldrh r2, [r4, #20] <== NOT EXECUTED
233b8: 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));
233bc: 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;
233c0: 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));
233c4: e3a0100c mov r1, #12 <== NOT EXECUTED
233c8: ebff8f49 bl 70f4 <calloc> <== NOT EXECUTED
if ( fs_info->vhash == NULL )
233cc: 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));
233d0: e1a03000 mov r3, r0 <== NOT EXECUTED
233d4: e5840064 str r0, [r4, #100] ; 0x64 <== NOT EXECUTED
if ( fs_info->vhash == NULL )
233d8: 0a000010 beq 23420 <fat_init_volume_info+0x4f8> <== 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);
233dc: 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);
233e0: e280c004 add ip, r0, #4 <== NOT EXECUTED
the_chain->permanent_null = NULL;
233e4: e3a05000 mov r5, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
233e8: e280e010 add lr, r0, #16 <== NOT EXECUTED
the_chain->permanent_null = NULL;
233ec: e5835004 str r5, [r3, #4] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
233f0: e5833008 str r3, [r3, #8] <== NOT EXECUTED
fs_info->rhash = calloc(FAT_HASH_SIZE, sizeof(rtems_chain_control));
233f4: e3a00002 mov r0, #2 <== NOT EXECUTED
233f8: e3a0100c mov r1, #12 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
233fc: e583e00c str lr, [r3, #12] <== NOT EXECUTED
23400: e583c000 str ip, [r3] <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
23404: 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;
23408: e5825004 str r5, [r2, #4] <== NOT EXECUTED
2340c: ebff8f38 bl 70f4 <calloc> <== NOT EXECUTED
if ( fs_info->rhash == NULL )
23410: 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));
23414: e5840068 str r0, [r4, #104] ; 0x68 <== NOT EXECUTED
if ( fs_info->rhash == NULL )
23418: 1a000003 bne 2342c <fat_init_volume_info+0x504> <== NOT EXECUTED
2341c: ea000018 b 23484 <fat_init_volume_info+0x55c> <== 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);
23420: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
23424: ebff8c18 bl 648c <rtems_disk_release> <== NOT EXECUTED
23428: ea00002e b 234e8 <fat_init_volume_info+0x5c0> <== 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);
2342c: 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);
23430: e2802004 add r2, r0, #4 <== NOT EXECUTED
23434: e2801010 add r1, r0, #16 <== NOT EXECUTED
23438: e580100c str r1, [r0, #12] <== NOT EXECUTED
2343c: e8800024 stm r0, {r2, r5} <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
23440: 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;
23444: e5835004 str r5, [r3, #4] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
23448: 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;
2344c: e594202c ldr r2, [r4, #44] ; 0x2c <== NOT EXECUTED
23450: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED
23454: 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;
23458: e3a00c01 mov r0, #256 ; 0x100 <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
2345c: e1a03203 lsl r3, r3, #4 <== NOT EXECUTED
23460: 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;
23464: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED
fs_info->uino_base = (vol->tot_secs << vol->sec_mul) << 4;
fs_info->index = 0;
23468: e5845070 str r5, [r4, #112] ; 0x70 <== NOT EXECUTED
fs_info->uino = (char *)calloc(fs_info->uino_pool_size, sizeof(char));
2346c: e3a01001 mov r1, #1 <== NOT EXECUTED
23470: ebff8f1f bl 70f4 <calloc> <== NOT EXECUTED
if ( fs_info->uino == NULL )
23474: 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));
23478: e584006c str r0, [r4, #108] ; 0x6c <== NOT EXECUTED
if ( fs_info->uino == NULL )
2347c: 1a00000a bne 234ac <fat_init_volume_info+0x584> <== NOT EXECUTED
23480: ea000003 b 23494 <fat_init_volume_info+0x56c> <== 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);
23484: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
23488: ebff8bff bl 648c <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
2348c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
23490: ea000013 b 234e4 <fat_init_volume_info+0x5bc> <== 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);
23494: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
23498: ebff8bfb bl 648c <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
2349c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
234a0: ebff9083 bl 76b4 <free> <== NOT EXECUTED
free(fs_info->rhash);
234a4: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
234a8: ea00000d b 234e4 <fat_init_volume_info+0x5bc> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
}
fs_info->sec_buf = (uint8_t *)calloc(vol->bps, sizeof(uint8_t));
234ac: e1d400b0 ldrh r0, [r4] <== NOT EXECUTED
234b0: e3a01001 mov r1, #1 <== NOT EXECUTED
234b4: ebff8f0e bl 70f4 <calloc> <== NOT EXECUTED
if (fs_info->sec_buf == NULL)
234b8: 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));
234bc: e5840088 str r0, [r4, #136] ; 0x88 <== NOT EXECUTED
if (fs_info->sec_buf == NULL)
234c0: 11a07005 movne r7, r5 <== NOT EXECUTED
234c4: 1a00000b bne 234f8 <fat_init_volume_info+0x5d0> <== NOT EXECUTED
{
rtems_disk_release(vol->dd);
234c8: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
234cc: ebff8bee bl 648c <rtems_disk_release> <== NOT EXECUTED
free(fs_info->vhash);
234d0: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
234d4: ebff9076 bl 76b4 <free> <== NOT EXECUTED
free(fs_info->rhash);
234d8: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
234dc: ebff9074 bl 76b4 <free> <== NOT EXECUTED
free(fs_info->uino);
234e0: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
234e4: ebff9072 bl 76b4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOMEM );
234e8: eb006bb6 bl 3e3c8 <__errno> <== NOT EXECUTED
234ec: e3a0300c mov r3, #12 <== NOT EXECUTED
234f0: e5803000 str r3, [r0] <== NOT EXECUTED
234f4: e3e07000 mvn r7, #0 <== NOT EXECUTED
}
return RC_OK;
}
234f8: e1a00007 mov r0, r7 <== NOT EXECUTED
234fc: e28dd0b8 add sp, sp, #184 ; 0xb8 <== NOT EXECUTED
23500: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000227c4 <fat_ino_is_unique>:
inline bool
fat_ino_is_unique(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t ino
)
{
227c4: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
227c8: e5930078 ldr r0, [r3, #120] ; 0x78 <== NOT EXECUTED
fat_fs_info_t *fs_info = mt_entry->fs_info;
return (ino >= fs_info->uino_base);
}
227cc: e1510000 cmp r1, r0 <== NOT EXECUTED
227d0: 33a00000 movcc r0, #0 <== NOT EXECUTED
227d4: 23a00001 movcs r0, #1 <== NOT EXECUTED
227d8: e12fff1e bx lr <== NOT EXECUTED
00039f7c <fat_scan_fat_for_free_clusters>:
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
39f7c: e92d4fff push {r0, r1, r2, r3, 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;
39f80: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
39f84: e1a05000 mov r5, r0 <== 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;
39f88: e5940034 ldr r0, [r4, #52] ; 0x34 <== NOT EXECUTED
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
39f8c: 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;
39f90: e3a09000 mov r9, #0 <== NOT EXECUTED
uint32_t save_cln = 0;
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
39f94: e2800002 add r0, r0, #2 <== 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;
39f98: e58d900c str r9, [sp, #12] <== NOT EXECUTED
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
39f9c: e1a08003 mov r8, r3 <== NOT EXECUTED
uint32_t data_cls_val = fs_info->vol.data_cls + 2;
uint32_t i = 2;
*cls_added = 0;
if (count == 0)
39fa0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
uint32_t *chain,
uint32_t count,
uint32_t *cls_added,
uint32_t *last_cl
)
{
39fa4: e1a0a001 mov sl, r1 <== 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;
39fa8: e58d0000 str r0, [sp] <== NOT EXECUTED
uint32_t i = 2;
*cls_added = 0;
39fac: e5839000 str r9, [r3] <== NOT EXECUTED
if (count == 0)
39fb0: 01a07002 moveq r7, r2 <== NOT EXECUTED
39fb4: 0a000058 beq 3a11c <fat_scan_fat_for_free_clusters+0x1a0> <== NOT EXECUTED
return rc;
if (fs_info->vol.next_cl != FAT_UNDEFINED_VALUE)
39fb8: e5946044 ldr r6, [r4, #68] ; 0x44 <== NOT EXECUTED
39fbc: e3760001 cmn r6, #1 <== NOT EXECUTED
39fc0: 03a06002 moveq r6, #2 <== NOT EXECUTED
39fc4: e3a0b002 mov fp, #2 <== NOT EXECUTED
39fc8: ea000042 b 3a0d8 <fat_scan_fat_for_free_clusters+0x15c> <== NOT EXECUTED
* starting at cluster 2, so the maximum valid cluster number is
* (fs_info->vol.data_cls + 1)
*/
while (i < data_cls_val)
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
39fcc: ebffff61 bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
39fd0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
39fd4: 0a000004 beq 39fec <fat_scan_fat_for_free_clusters+0x70> <== NOT EXECUTED
{
if (*cls_added != 0)
39fd8: e5983000 ldr r3, [r8] <== NOT EXECUTED
39fdc: e3530000 cmp r3, #0 <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
39fe0: 11a00005 movne r0, r5 <== 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)
39fe4: 0a00004c beq 3a11c <fat_scan_fat_for_free_clusters+0x1a0> <== NOT EXECUTED
39fe8: ea000015 b 3a044 <fat_scan_fat_for_free_clusters+0xc8> <== NOT EXECUTED
fat_free_fat_clusters_chain(mt_entry, (*chain));
return rc;
}
if (next_cln == FAT_GENFAT_FREE)
39fec: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
39ff0: e3520000 cmp r2, #0 <== NOT EXECUTED
39ff4: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
39ff8: 1a000031 bne 3a0c4 <fat_scan_fat_for_free_clusters+0x148> <== 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)
39ffc: e5983000 ldr r3, [r8] <== NOT EXECUTED
3a000: 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);
3a004: e1a01006 mov r1, r6 <== NOT EXECUTED
3a008: 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);
3a00c: e1a00005 mov r0, r5 <== 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)
3a010: 1a000004 bne 3a028 <fat_scan_fat_for_free_clusters+0xac> <== NOT EXECUTED
{
*chain = cl4find;
3a014: e58a6000 str r6, [sl] <== NOT EXECUTED
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
3a018: ebfffeb6 bl 39af8 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
3a01c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3a020: 0a000017 beq 3a084 <fat_scan_fat_for_free_clusters+0x108> <== NOT EXECUTED
3a024: ea00003c b 3a11c <fat_scan_fat_for_free_clusters+0x1a0> <== NOT EXECUTED
}
}
else
{
/* set EOC value to new allocated cluster */
rc = fat_set_fat_cluster(mt_entry, cl4find, FAT_GENFAT_EOC);
3a028: e1a00005 mov r0, r5 <== NOT EXECUTED
3a02c: ebfffeb1 bl 39af8 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
3a030: e2507000 subs r7, 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);
3a034: e1a01009 mov r1, r9 <== NOT EXECUTED
3a038: e1a02006 mov r2, r6 <== NOT EXECUTED
3a03c: e1a00005 mov r0, r5 <== 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 )
3a040: 0a000002 beq 3a050 <fat_scan_fat_for_free_clusters+0xd4> <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
3a044: e59a1000 ldr r1, [sl] <== NOT EXECUTED
3a048: ebffff9c bl 39ec0 <fat_free_fat_clusters_chain> <== NOT EXECUTED
return rc;
3a04c: ea000032 b 3a11c <fat_scan_fat_for_free_clusters+0x1a0> <== NOT EXECUTED
}
rc = fat_set_fat_cluster(mt_entry, save_cln, cl4find);
3a050: ebfffea8 bl 39af8 <fat_set_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
3a054: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3a058: 0a000009 beq 3a084 <fat_scan_fat_for_free_clusters+0x108> <== NOT EXECUTED
{
/* cleanup activity */
fat_free_fat_clusters_chain(mt_entry, (*chain));
3a05c: e59a1000 ldr r1, [sl] <== NOT EXECUTED
3a060: e1a00005 mov r0, r5 <== NOT EXECUTED
3a064: ebffff95 bl 39ec0 <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);
3a068: e1a00005 mov r0, r5 <== NOT EXECUTED
3a06c: e1a01006 mov r1, r6 <== NOT EXECUTED
3a070: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
3a074: ebfffe9f bl 39af8 <fat_set_fat_cluster> <== NOT EXECUTED
fat_buf_release(fs_info);
3a078: e1a00004 mov r0, r4 <== NOT EXECUTED
3a07c: ebffa204 bl 22894 <fat_buf_release> <== NOT EXECUTED
return rc;
3a080: ea000025 b 3a11c <fat_scan_fat_for_free_clusters+0x1a0> <== NOT EXECUTED
}
}
save_cln = cl4find;
(*cls_added)++;
3a084: e5983000 ldr r3, [r8] <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
3a088: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
3a08c: e2833001 add r3, r3, #1 <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
3a090: e1530002 cmp r3, r2 <== NOT EXECUTED
return rc;
}
}
save_cln = cl4find;
(*cls_added)++;
3a094: e5883000 str r3, [r8] <== NOT EXECUTED
/* have we satisfied request ? */
if (*cls_added == count)
3a098: 1a000008 bne 3a0c0 <fat_scan_fat_for_free_clusters+0x144> <== NOT EXECUTED
{
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3a09c: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
(*cls_added)++;
/* have we satisfied request ? */
if (*cls_added == count)
{
fs_info->vol.next_cl = save_cln;
3a0a0: e5846044 str r6, [r4, #68] ; 0x44 <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3a0a4: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
3a0a8: 15982000 ldrne r2, [r8] <== NOT EXECUTED
3a0ac: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED
3a0b0: 15843040 strne r3, [r4, #64] ; 0x40 <== NOT EXECUTED
*last_cl = save_cln;
3a0b4: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
3a0b8: e5836000 str r6, [r3] <== NOT EXECUTED
3a0bc: ea000013 b 3a110 <fat_scan_fat_for_free_clusters+0x194> <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
3a0c0: e1a09006 mov r9, r6 <== NOT EXECUTED
}
}
i++;
cl4find++;
if (cl4find >= data_cls_val)
3a0c4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
fat_buf_release(fs_info);
return rc;
}
}
i++;
cl4find++;
3a0c8: e2866001 add r6, r6, #1 <== NOT EXECUTED
if (cl4find >= data_cls_val)
3a0cc: e1560002 cmp r6, r2 <== NOT EXECUTED
3a0d0: 23a06002 movcs r6, #2 <== NOT EXECUTED
*last_cl = save_cln;
fat_buf_release(fs_info);
return rc;
}
}
i++;
3a0d4: e28bb001 add fp, fp, #1 <== 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)
3a0d8: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3a0dc: e15b0003 cmp fp, r3 <== NOT EXECUTED
{
rc = fat_get_fat_cluster(mt_entry, cl4find, &next_cln);
3a0e0: e1a01006 mov r1, r6 <== NOT EXECUTED
3a0e4: e28d200c add r2, sp, #12 <== NOT EXECUTED
3a0e8: e1a00005 mov r0, r5 <== 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)
3a0ec: 3affffb6 bcc 39fcc <fat_scan_fat_for_free_clusters+0x50> <== NOT EXECUTED
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3a0f0: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
cl4find++;
if (cl4find >= data_cls_val)
cl4find = 2;
}
fs_info->vol.next_cl = save_cln;
3a0f4: e5849044 str r9, [r4, #68] ; 0x44 <== NOT EXECUTED
if (fs_info->vol.free_cls != 0xFFFFFFFF)
3a0f8: e3730001 cmn r3, #1 <== NOT EXECUTED
fs_info->vol.free_cls -= (*cls_added);
3a0fc: 15982000 ldrne r2, [r8] <== NOT EXECUTED
3a100: 10623003 rsbne r3, r2, r3 <== NOT EXECUTED
*last_cl = save_cln;
3a104: 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);
3a108: 15843040 strne r3, [r4, #64] ; 0x40 <== NOT EXECUTED
*last_cl = save_cln;
3a10c: e5829000 str r9, [r2] <== NOT EXECUTED
fat_buf_release(fs_info);
3a110: e1a00004 mov r0, r4 <== NOT EXECUTED
3a114: ebffa1de bl 22894 <fat_buf_release> <== NOT EXECUTED
3a118: e3a07000 mov r7, #0 <== NOT EXECUTED
return RC_OK;
}
3a11c: e1a00007 mov r0, r7 <== NOT EXECUTED
3a120: e28dd010 add sp, sp, #16 <== NOT EXECUTED
3a124: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00039af8 <fat_set_fat_cluster>:
fat_set_fat_cluster(
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
uint32_t in_val
)
{
39af8: e92d4ff1 push {r0, 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;
39afc: e3a03000 mov r3, #0 <== NOT EXECUTED
/* sanity check */
if ( (cln < 2) || (cln > (fs_info->vol.data_cls + 1)) )
39b00: 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
)
{
39b04: 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;
39b08: 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
)
{
39b0c: e1a07002 mov r7, r2 <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
39b10: 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)) )
39b14: 9a00008a bls 39d44 <fat_set_fat_cluster+0x24c> <== NOT EXECUTED
39b18: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
39b1c: e2833001 add r3, r3, #1 <== NOT EXECUTED
39b20: e1510003 cmp r1, r3 <== NOT EXECUTED
39b24: 8a000086 bhi 39d44 <fat_set_fat_cluster+0x24c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
sec = (FAT_FAT_OFFSET(fs_info->vol.type, cln) >> fs_info->vol.sec_log2) +
39b28: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
39b2c: e2130001 ands r0, r3, #1 <== NOT EXECUTED
39b30: 108120a1 addne r2, r1, r1, lsr #1 <== NOT EXECUTED
39b34: 1a000002 bne 39b44 <fat_set_fat_cluster+0x4c> <== NOT EXECUTED
39b38: e3130002 tst r3, #2 <== NOT EXECUTED
39b3c: 11a02081 lslne r2, r1, #1 <== NOT EXECUTED
39b40: 01a02101 lsleq r2, r1, #2 <== NOT EXECUTED
39b44: e5d4a002 ldrb sl, [r4, #2] <== NOT EXECUTED
39b48: e594104c ldr r1, [r4, #76] ; 0x4c <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
39b4c: e3500000 cmp r0, #0 <== 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) +
39b50: e081aa32 add sl, r1, r2, lsr sl <== NOT EXECUTED
fs_info->vol.afat_loc;
ofs = FAT_FAT_OFFSET(fs_info->vol.type, cln) & (fs_info->vol.bps - 1);
39b54: 108580a5 addne r8, r5, r5, lsr #1 <== NOT EXECUTED
39b58: 1a000002 bne 39b68 <fat_set_fat_cluster+0x70> <== NOT EXECUTED
39b5c: e3130002 tst r3, #2 <== NOT EXECUTED
39b60: 11a08085 lslne r8, r5, #1 <== NOT EXECUTED
39b64: 01a08105 lsleq r8, r5, #2 <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
39b68: e1a00004 mov r0, r4 <== NOT EXECUTED
39b6c: e1a0100a mov r1, sl <== NOT EXECUTED
39b70: e3a02001 mov r2, #1 <== NOT EXECUTED
39b74: 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);
39b78: e1d4b0b0 ldrh fp, [r4] <== NOT EXECUTED
rc = fat_buf_access(fs_info, sec, FAT_OP_TYPE_READ, &block0);
39b7c: ebffa394 bl 229d4 <fat_buf_access> <== NOT EXECUTED
if (rc != RC_OK)
39b80: 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);
39b84: e1a0900d mov r9, sp <== NOT EXECUTED
if (rc != RC_OK)
39b88: 1a000071 bne 39d54 <fat_set_fat_cluster+0x25c> <== NOT EXECUTED
return rc;
switch ( fs_info->vol.type )
39b8c: e5d4600a ldrb r6, [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);
39b90: e24bb001 sub fp, fp, #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 )
39b94: e3560002 cmp r6, #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);
39b98: e008800b and r8, r8, fp <== 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 )
39b9c: 0a00005a beq 39d0c <fat_set_fat_cluster+0x214> <== NOT EXECUTED
39ba0: e3560004 cmp r6, #4 <== NOT EXECUTED
39ba4: 0a00005c beq 39d1c <fat_set_fat_cluster+0x224> <== NOT EXECUTED
39ba8: e3560001 cmp r6, #1 <== NOT EXECUTED
39bac: 1a000064 bne 39d44 <fat_set_fat_cluster+0x24c> <== NOT EXECUTED
{
case FAT_FAT12:
if ( FAT_CLUSTER_IS_ODD(cln) )
39bb0: e3150001 tst r5, #1 <== NOT EXECUTED
39bb4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39bb8: 0a000026 beq 39c58 <fat_set_fat_cluster+0x160> <== NOT EXECUTED
{
fat16_clv = ((uint16_t )in_val) << FAT_FAT12_SHIFT;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
39bbc: 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)) =
39bc0: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED
39bc4: e202200f and r2, r2, #15 <== NOT EXECUTED
39bc8: e7c32008 strb r2, [r3, r8] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
39bcc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39bd0: 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)) =
39bd4: e7d32008 ldrb r2, [r3, r8] <== 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;
39bd8: e1a07a07 lsl r7, r7, #20 <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) & 0x0F;
*((uint8_t *)(block0->buffer + ofs)) =
39bdc: e1822827 orr r2, r2, r7, lsr #16 <== NOT EXECUTED
39be0: e7c32008 strb r2, [r3, r8] <== 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) )
39be4: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED
39be8: e2433001 sub r3, r3, #1 <== NOT EXECUTED
39bec: e1580003 cmp r8, r3 <== NOT EXECUTED
}
static inline void
fat_buf_mark_modified(fat_fs_info_t *fs_info)
{
fs_info->c.modified = true;
39bf0: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED
39bf4: 1a00000e bne 39c34 <fat_set_fat_cluster+0x13c> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
39bf8: e28a1001 add r1, sl, #1 <== NOT EXECUTED
39bfc: e1a0300d mov r3, sp <== NOT EXECUTED
39c00: e1a00004 mov r0, r4 <== NOT EXECUTED
39c04: e1a02006 mov r2, r6 <== NOT EXECUTED
39c08: ebffa371 bl 229d4 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
39c0c: e3500000 cmp r0, #0 <== NOT EXECUTED
39c10: 1a00004f bne 39d54 <fat_set_fat_cluster+0x25c> <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
39c14: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39c18: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39c1c: e5c30000 strb r0, [r3] <== NOT EXECUTED
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
39c20: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39c24: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
if (rc != RC_OK)
return rc;
*((uint8_t *)(block0->buffer)) &= 0x00;
*((uint8_t *)(block0->buffer)) =
39c28: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
39c2c: e1827c27 orr r7, r2, r7, lsr #24 <== NOT EXECUTED
39c30: ea000026 b 39cd0 <fat_set_fat_cluster+0x1d8> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
39c34: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39c38: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39c3c: e2888001 add r8, r8, #1 <== NOT EXECUTED
39c40: e7c30008 strb r0, [r3, r8] <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) |
39c44: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39c48: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs + 1)) =
39c4c: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED
39c50: e1827c27 orr r7, r2, r7, lsr #24 <== NOT EXECUTED
39c54: ea00002a b 39d04 <fat_set_fat_cluster+0x20c> <== NOT EXECUTED
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
39c58: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39c5c: e7c30008 strb r0, [r3, r8] <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) =
(*((uint8_t *)(block0->buffer + ofs))) |
39c60: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39c64: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
39c68: e1a07a07 lsl r7, r7, #20 <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
39c6c: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED
(uint8_t )((fat16_clv & 0xFF00)>>8);
}
}
else
{
fat16_clv = ((uint16_t )in_val) & FAT_FAT12_MASK;
39c70: e1a07a27 lsr r7, r7, #20 <== NOT EXECUTED
*((uint8_t *)(block0->buffer + ofs)) &= 0x00;
*((uint8_t *)(block0->buffer + ofs)) =
39c74: e1822007 orr r2, r2, r7 <== NOT EXECUTED
39c78: e7c32008 strb r2, [r3, r8] <== 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) )
39c7c: e1d430b0 ldrh r3, [r4] <== NOT EXECUTED
39c80: e2433001 sub r3, r3, #1 <== NOT EXECUTED
39c84: e1580003 cmp r8, r3 <== NOT EXECUTED
39c88: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED
39c8c: 1a000012 bne 39cdc <fat_set_fat_cluster+0x1e4> <== NOT EXECUTED
{
rc = fat_buf_access(fs_info, sec + 1, FAT_OP_TYPE_READ,
39c90: e28a1001 add r1, sl, #1 <== NOT EXECUTED
39c94: e1a0300d mov r3, sp <== NOT EXECUTED
39c98: e1a00004 mov r0, r4 <== NOT EXECUTED
39c9c: e1a02006 mov r2, r6 <== NOT EXECUTED
39ca0: ebffa34b bl 229d4 <fat_buf_access> <== NOT EXECUTED
&block0);
if (rc != RC_OK)
39ca4: e3500000 cmp r0, #0 <== NOT EXECUTED
39ca8: 1a000029 bne 39d54 <fat_set_fat_cluster+0x25c> <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
39cac: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39cb0: 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)) =
39cb4: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
39cb8: e3c2200f bic r2, r2, #15 <== NOT EXECUTED
39cbc: e5c32000 strb r2, [r3] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) |
39cc0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39cc4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
return rc;
*((uint8_t *)(block0->buffer)) =
(*((uint8_t *)(block0->buffer))) & 0xF0;
*((uint8_t *)(block0->buffer)) =
39cc8: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
39ccc: e1827427 orr r7, r2, r7, lsr #8 <== NOT EXECUTED
39cd0: e5c37000 strb r7, [r3] <== NOT EXECUTED
39cd4: e5c46080 strb r6, [r4, #128] ; 0x80 <== NOT EXECUTED
39cd8: ea00001d b 39d54 <fat_set_fat_cluster+0x25c> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
39cdc: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39ce0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39ce4: e2888001 add r8, r8, #1 <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
}
else
{
*((uint8_t *)(block0->buffer + ofs + 1)) =
39ce8: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED
39cec: e3c2200f bic r2, r2, #15 <== NOT EXECUTED
39cf0: e7c32008 strb r2, [r3, r8] <== NOT EXECUTED
(*((uint8_t *)(block0->buffer + ofs + 1))) & 0xF0;
*((uint8_t *)(block0->buffer + ofs+1)) =
(*((uint8_t *)(block0->buffer + ofs+1))) |
39cf4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39cf8: 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)) =
39cfc: e7d32008 ldrb r2, [r3, r8] <== NOT EXECUTED
39d00: e1827427 orr r7, r2, r7, lsr #8 <== NOT EXECUTED
39d04: e7c37008 strb r7, [r3, r8] <== NOT EXECUTED
39d08: ea000011 b 39d54 <fat_set_fat_cluster+0x25c> <== NOT EXECUTED
}
}
break;
case FAT_FAT16:
*((uint16_t *)(block0->buffer + ofs)) =
39d0c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39d10: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
39d14: e18370b8 strh r7, [r3, r8] <== NOT EXECUTED
39d18: ea000006 b 39d38 <fat_set_fat_cluster+0x240> <== 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));
39d1c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39d20: 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)) =
39d24: e7932008 ldr r2, [r3, r8] <== NOT EXECUTED
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
39d28: e3c7720f bic r7, r7, #-268435456 ; 0xf0000000 <== NOT EXECUTED
break;
case FAT_FAT32:
fat32_clv = CT_LE_L((in_val & FAT_FAT32_MASK));
*((uint32_t *)(block0->buffer + ofs)) =
39d2c: e202220f and r2, r2, #-268435456 ; 0xf0000000 <== NOT EXECUTED
(*((uint32_t *)(block0->buffer + ofs))) & (CT_LE_L(0xF0000000));
*((uint32_t *)(block0->buffer + ofs)) =
39d30: e1827007 orr r7, r2, r7 <== NOT EXECUTED
39d34: e7837008 str r7, [r3, r8] <== NOT EXECUTED
39d38: e3a03001 mov r3, #1 <== NOT EXECUTED
39d3c: e5c43080 strb r3, [r4, #128] ; 0x80 <== NOT EXECUTED
39d40: ea000003 b 39d54 <fat_set_fat_cluster+0x25c> <== NOT EXECUTED
fat_buf_mark_modified(fs_info);
break;
default:
rtems_set_errno_and_return_minus_one(EIO);
39d44: eb00119f bl 3e3c8 <__errno> <== NOT EXECUTED
39d48: e3a03005 mov r3, #5 <== NOT EXECUTED
39d4c: e5803000 str r3, [r0] <== NOT EXECUTED
39d50: e3e00000 mvn r0, #0 <== NOT EXECUTED
break;
}
return RC_OK;
}
39d54: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00022cbc <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)
{
22cbc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
int rc = RC_OK;
fat_fs_info_t *fs_info = mt_entry->fs_info;
22cc0: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
int i = 0;
if (fs_info->vol.type & FAT_FAT32)
22cc4: e5d4500a ldrb r5, [r4, #10] <== NOT EXECUTED
22cc8: e2155004 ands r5, r5, #4 <== NOT EXECUTED
22ccc: 0a000004 beq 22ce4 <fat_shutdown_drive+0x28> <== NOT EXECUTED
{
rc = fat_fat32_update_fsinfo_sector(mt_entry, fs_info->vol.free_cls,
22cd0: e2841040 add r1, r4, #64 ; 0x40 <== NOT EXECUTED
22cd4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
22cd8: ebffffdf bl 22c5c <fat_fat32_update_fsinfo_sector> <== NOT EXECUTED
fs_info->vol.next_cl);
if ( rc != RC_OK )
22cdc: e2505000 subs r5, r0, #0 <== NOT EXECUTED
22ce0: 13e05000 mvnne r5, #0 <== NOT EXECUTED
rc = -1;
}
fat_buf_release(fs_info);
22ce4: e1a00004 mov r0, r4 <== NOT EXECUTED
22ce8: ebfffee9 bl 22894 <fat_buf_release> <== NOT EXECUTED
if (rtems_bdbuf_syncdev(fs_info->vol.dev) != RTEMS_SUCCESSFUL)
22cec: e2841054 add r1, r4, #84 ; 0x54 <== NOT EXECUTED
22cf0: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
22cf4: ebff8299 bl 3760 <rtems_bdbuf_syncdev> <== NOT EXECUTED
22cf8: e3500000 cmp r0, #0 <== NOT EXECUTED
22cfc: 13e05000 mvnne r5, #0 <== NOT EXECUTED
22d00: e3a07000 mov r7, #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;
22d04: e5948064 ldr r8, [r4, #100] ; 0x64 <== NOT EXECUTED
22d08: e0888007 add r8, r8, r7 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
22d0c: ea000000 b 22d14 <fat_shutdown_drive+0x58> <== NOT EXECUTED
free(node);
22d10: ebff9267 bl 76b4 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
22d14: e1a00008 mov r0, r8 <== NOT EXECUTED
22d18: ebffa5e4 bl c4b0 <_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 )
22d1c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
22d20: 1afffffa bne 22d10 <fat_shutdown_drive+0x54> <== NOT EXECUTED
22d24: e287700c add r7, r7, #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++)
22d28: e3570018 cmp r7, #24 <== NOT EXECUTED
22d2c: 1afffff4 bne 22d04 <fat_shutdown_drive+0x48> <== NOT EXECUTED
}
for (i = 0; i < FAT_HASH_SIZE; i++)
{
rtems_chain_node *node = NULL;
rtems_chain_control *the_chain = fs_info->rhash + i;
22d30: e5947068 ldr r7, [r4, #104] ; 0x68 <== NOT EXECUTED
22d34: e0877006 add r7, r7, r6 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
22d38: ea000000 b 22d40 <fat_shutdown_drive+0x84> <== NOT EXECUTED
free(node);
22d3c: ebff925c bl 76b4 <free> <== NOT EXECUTED
22d40: e1a00007 mov r0, r7 <== NOT EXECUTED
22d44: ebffa5d9 bl c4b0 <_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 )
22d48: e3500000 cmp r0, #0 <== NOT EXECUTED
22d4c: 1afffffa bne 22d3c <fat_shutdown_drive+0x80> <== NOT EXECUTED
22d50: e286600c add r6, r6, #12 <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
for (i = 0; i < FAT_HASH_SIZE; i++)
22d54: e3560018 cmp r6, #24 <== NOT EXECUTED
22d58: 1afffff4 bne 22d30 <fat_shutdown_drive+0x74> <== NOT EXECUTED
while ( (node = rtems_chain_get(the_chain)) != NULL )
free(node);
}
free(fs_info->vhash);
22d5c: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
22d60: ebff9253 bl 76b4 <free> <== NOT EXECUTED
free(fs_info->rhash);
22d64: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
22d68: ebff9251 bl 76b4 <free> <== NOT EXECUTED
free(fs_info->uino);
22d6c: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
22d70: ebff924f bl 76b4 <free> <== NOT EXECUTED
free(fs_info->sec_buf);
22d74: e5940088 ldr r0, [r4, #136] ; 0x88 <== NOT EXECUTED
22d78: ebff924d bl 76b4 <free> <== NOT EXECUTED
rtems_disk_release(fs_info->vol.dd);
22d7c: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
22d80: ebff8dc1 bl 648c <rtems_disk_release> <== NOT EXECUTED
if (rc)
22d84: e3550000 cmp r5, #0 <== NOT EXECUTED
22d88: 0a000002 beq 22d98 <fat_shutdown_drive+0xdc> <== NOT EXECUTED
errno = EIO;
22d8c: eb006d8d bl 3e3c8 <__errno> <== NOT EXECUTED
22d90: e3a03005 mov r3, #5 <== NOT EXECUTED
22d94: e5803000 str r3, [r0] <== NOT EXECUTED
return rc;
}
22d98: e1a00005 mov r0, r5 <== NOT EXECUTED
22d9c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0003a4f4 <fchdir>:
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
3a4f4: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
3a4f8: e59f3148 ldr r3, [pc, #328] ; 3a648 <fchdir+0x154> <== NOT EXECUTED
3a4fc: e5933000 ldr r3, [r3] <== NOT EXECUTED
3a500: e1500003 cmp r0, r3 <== NOT EXECUTED
#include <rtems/seterr.h>
int fchdir(
int fd
)
{
3a504: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc, saved;
rtems_libio_check_fd( fd );
3a508: 2a000005 bcs 3a524 <fchdir+0x30> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
3a50c: e59f3138 ldr r3, [pc, #312] ; 3a64c <fchdir+0x158> <== NOT EXECUTED
3a510: e5934000 ldr r4, [r3] <== NOT EXECUTED
3a514: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
3a518: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
3a51c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
3a520: 1a000002 bne 3a530 <fchdir+0x3c> <== NOT EXECUTED
3a524: eb000fa7 bl 3e3c8 <__errno> <== NOT EXECUTED
3a528: e3a03009 mov r3, #9 <== NOT EXECUTED
3a52c: ea000011 b 3a578 <fchdir+0x84> <== NOT EXECUTED
/*
* Verify you can change directory into this node.
*/
if ( !iop->pathinfo.ops ) {
3a530: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
3a534: e3530000 cmp r3, #0 <== NOT EXECUTED
3a538: 0a000002 beq 3a548 <fchdir+0x54> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( !iop->pathinfo.ops->node_type_h ) {
3a53c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
3a540: e3530000 cmp r3, #0 <== NOT EXECUTED
3a544: 1a000002 bne 3a554 <fchdir+0x60> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3a548: eb000f9e bl 3e3c8 <__errno> <== NOT EXECUTED
3a54c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3a550: ea000008 b 3a578 <fchdir+0x84> <== NOT EXECUTED
}
if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) !=
3a554: e2844018 add r4, r4, #24 <== NOT EXECUTED
3a558: e1a00004 mov r0, r4 <== NOT EXECUTED
3a55c: e1a0e00f mov lr, pc <== NOT EXECUTED
3a560: e12fff13 bx r3 <== NOT EXECUTED
3a564: e3500001 cmp r0, #1 <== NOT EXECUTED
3a568: e1a06000 mov r6, r0 <== NOT EXECUTED
3a56c: 0a000003 beq 3a580 <fchdir+0x8c> <== NOT EXECUTED
RTEMS_FILESYSTEM_DIRECTORY ) {
rtems_set_errno_and_return_minus_one( ENOTDIR );
3a570: eb000f94 bl 3e3c8 <__errno> <== NOT EXECUTED
3a574: e3a03014 mov r3, #20 <== NOT EXECUTED
3a578: e5803000 str r3, [r0] <== NOT EXECUTED
3a57c: ea00001c b 3a5f4 <fchdir+0x100> <== NOT EXECUTED
* but note the race condition. Threads who
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
3a580: e59f50c8 ldr r5, [pc, #200] ; 3a650 <fchdir+0x15c> <== NOT EXECUTED
3a584: e5957000 ldr r7, [r5] <== NOT EXECUTED
3a588: e287c004 add ip, r7, #4 <== NOT EXECUTED
3a58c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
3a590: e28de004 add lr, sp, #4 <== NOT EXECUTED
3a594: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
3a598: e59c3000 ldr r3, [ip] <== NOT EXECUTED
3a59c: e58e3000 str r3, [lr] <== NOT EXECUTED
rtems_filesystem_current = iop->pathinfo;
3a5a0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
3a5a4: e287e004 add lr, r7, #4 <== NOT EXECUTED
3a5a8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
3a5ac: e5943000 ldr r3, [r4] <== NOT EXECUTED
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
3a5b0: e3a0e000 mov lr, #0 <== NOT EXECUTED
* share their rtems_filesystem_current better
* be synchronized!
*/
saved = rtems_filesystem_current;
rtems_filesystem_current = iop->pathinfo;
3a5b4: e58c3000 str r3, [ip] <== NOT EXECUTED
/* clone the current node */
if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
3a5b8: e1a01006 mov r1, r6 <== NOT EXECUTED
3a5bc: e1a0200e mov r2, lr <== NOT EXECUTED
3a5c0: e59f008c ldr r0, [pc, #140] ; 3a654 <fchdir+0x160> <== NOT EXECUTED
3a5c4: e28d3018 add r3, sp, #24 <== NOT EXECUTED
3a5c8: e58de000 str lr, [sp] <== NOT EXECUTED
3a5cc: ebff341a bl 763c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
3a5d0: e3500000 cmp r0, #0 <== NOT EXECUTED
3a5d4: 0a000008 beq 3a5fc <fchdir+0x108> <== NOT EXECUTED
/* cloning failed; restore original and bail out */
rtems_filesystem_current = saved;
3a5d8: e595c000 ldr ip, [r5] <== NOT EXECUTED
3a5dc: e28d4004 add r4, sp, #4 <== NOT EXECUTED
3a5e0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
3a5e4: e28cc004 add ip, ip, #4 <== NOT EXECUTED
3a5e8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
3a5ec: e5943000 ldr r3, [r4] <== NOT EXECUTED
3a5f0: e58c3000 str r3, [ip] <== NOT EXECUTED
3a5f4: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
3a5f8: ea000010 b 3a640 <fchdir+0x14c> <== NOT EXECUTED
}
/* release the old one */
rtems_filesystem_freenode( &saved );
3a5fc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
3a600: e3530000 cmp r3, #0 <== NOT EXECUTED
3a604: 0a000004 beq 3a61c <fchdir+0x128> <== NOT EXECUTED
3a608: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
3a60c: e3530000 cmp r3, #0 <== NOT EXECUTED
3a610: 128d0004 addne r0, sp, #4 <== NOT EXECUTED
3a614: 11a0e00f movne lr, pc <== NOT EXECUTED
3a618: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_current = loc;
3a61c: e59f302c ldr r3, [pc, #44] ; 3a650 <fchdir+0x15c> <== NOT EXECUTED
3a620: e28d4018 add r4, sp, #24 <== NOT EXECUTED
3a624: e593c000 ldr ip, [r3] <== NOT EXECUTED
3a628: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED
3a62c: e28cc004 add ip, ip, #4 <== NOT EXECUTED
3a630: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
3a634: e5943000 ldr r3, [r4] <== NOT EXECUTED
3a638: e58c3000 str r3, [ip] <== NOT EXECUTED
3a63c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
3a640: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
3a644: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0002533c <fchmod>:
mode_t mode
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2533c: e59f3068 ldr r3, [pc, #104] ; 253ac <fchmod+0x70> <== NOT EXECUTED
25340: e5932000 ldr r2, [r3] <== NOT EXECUTED
25344: e1500002 cmp r0, r2 <== NOT EXECUTED
int fchmod(
int fd,
mode_t mode
)
{
25348: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2534c: 2a000005 bcs 25368 <fchmod+0x2c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
25350: e59f3058 ldr r3, [pc, #88] ; 253b0 <fchmod+0x74> <== NOT EXECUTED
25354: e5933000 ldr r3, [r3] <== NOT EXECUTED
25358: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
2535c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED
25360: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED
25364: 1a000002 bne 25374 <fchmod+0x38> <== NOT EXECUTED
25368: eb006416 bl 3e3c8 <__errno> <== NOT EXECUTED
2536c: e3a03009 mov r3, #9 <== NOT EXECUTED
25370: ea000005 b 2538c <fchmod+0x50> <== NOT EXECUTED
/*
* Now process the fchmod().
*/
if ( !iop->handlers->fchmod_h )
25374: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED
25378: e592201c ldr r2, [r2, #28] <== NOT EXECUTED
2537c: e3520000 cmp r2, #0 <== NOT EXECUTED
25380: 1a000004 bne 25398 <fchmod+0x5c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
25384: eb00640f bl 3e3c8 <__errno> <== NOT EXECUTED
25388: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2538c: e5803000 str r3, [r0] <== NOT EXECUTED
25390: e3e00000 mvn r0, #0 <== NOT EXECUTED
25394: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode );
25398: e2830018 add r0, r3, #24 <== NOT EXECUTED
2539c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
253a0: e1a0e00f mov lr, pc <== NOT EXECUTED
253a4: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED
}
253a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000253b4 <fchown>:
gid_t group
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
253b4: e59f3088 ldr r3, [pc, #136] ; 25444 <fchown+0x90> <== NOT EXECUTED
253b8: e5933000 ldr r3, [r3] <== NOT EXECUTED
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
253bc: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
253c0: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
253c4: e1500003 cmp r0, r3 <== NOT EXECUTED
int fchown(
int fd,
uid_t owner,
gid_t group
)
{
253c8: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
253cc: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
253d0: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
253d4: 2a000005 bcs 253f0 <fchown+0x3c> <== NOT EXECUTED
iop = rtems_libio_iop( fd );
253d8: e59f3068 ldr r3, [pc, #104] ; 25448 <fchown+0x94> <== NOT EXECUTED
253dc: e5933000 ldr r3, [r3] <== NOT EXECUTED
253e0: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED
rtems_libio_check_is_open(iop);
253e4: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
253e8: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
253ec: 1a000002 bne 253fc <fchown+0x48> <== NOT EXECUTED
253f0: eb0063f4 bl 3e3c8 <__errno> <== NOT EXECUTED
253f4: e3a03009 mov r3, #9 <== NOT EXECUTED
253f8: ea00000a b 25428 <fchown+0x74> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
253fc: e3130004 tst r3, #4 <== NOT EXECUTED
25400: 1a000002 bne 25410 <fchown+0x5c> <== NOT EXECUTED
25404: eb0063ef bl 3e3c8 <__errno> <== NOT EXECUTED
25408: e3a03016 mov r3, #22 <== NOT EXECUTED
2540c: ea000005 b 25428 <fchown+0x74> <== NOT EXECUTED
if ( !iop->pathinfo.ops->chown_h )
25410: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
25414: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
25418: e3530000 cmp r3, #0 <== NOT EXECUTED
2541c: 1a000004 bne 25434 <fchown+0x80> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
25420: eb0063e8 bl 3e3c8 <__errno> <== NOT EXECUTED
25424: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
25428: e5803000 str r3, [r0] <== NOT EXECUTED
2542c: e3e00000 mvn r0, #0 <== NOT EXECUTED
25430: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group );
25434: e2800018 add r0, r0, #24 <== NOT EXECUTED
25438: e1a0e00f mov lr, pc <== NOT EXECUTED
2543c: e12fff13 bx r3 <== NOT EXECUTED
}
25440: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0003a658 <fcntl>:
int fcntl(
int fd,
int cmd,
...
)
{
3a658: e92d000e push {r1, r2, r3}
3a65c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
3a660: e59f31a4 ldr r3, [pc, #420] ; 3a80c <fcntl+0x1b4>
3a664: e5933000 ldr r3, [r3]
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
3a668: e28d201c add r2, sp, #28
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
3a66c: e1500003 cmp r0, r3
...
)
{
int ret;
va_list ap;
va_start( ap, cmd );
3a670: e58d2000 str r2, [sp]
int fcntl(
int fd,
int cmd,
...
)
{
3a674: e59d7018 ldr r7, [sp, #24]
int fd2;
int flags;
int mask;
int ret = 0;
rtems_libio_check_fd( fd );
3a678: 2a000005 bcs 3a694 <fcntl+0x3c>
iop = rtems_libio_iop( fd );
3a67c: e59f118c ldr r1, [pc, #396] ; 3a810 <fcntl+0x1b8>
3a680: e591c000 ldr ip, [r1]
3a684: e08c4300 add r4, ip, r0, lsl #6
rtems_libio_check_is_open(iop);
3a688: e5940014 ldr r0, [r4, #20]
3a68c: e3100c01 tst r0, #256 ; 0x100
3a690: 1a000002 bne 3a6a0 <fcntl+0x48>
3a694: eb000f4b bl 3e3c8 <__errno> <== NOT EXECUTED
3a698: e3a03009 mov r3, #9 <== NOT EXECUTED
3a69c: ea000045 b 3a7b8 <fcntl+0x160> <== NOT EXECUTED
/*
* This switch should contain all the cases from POSIX.
*/
switch ( cmd ) {
3a6a0: e3570009 cmp r7, #9
3a6a4: 979ff107 ldrls pc, [pc, r7, lsl #2]
3a6a8: ea000040 b 3a7b0 <fcntl+0x158>
3a6ac: 0003a6d4 .word 0x0003a6d4
3a6b0: 0003a740 .word 0x0003a740
3a6b4: 0003a74c .word 0x0003a74c
3a6b8: 0003a76c .word 0x0003a76c
3a6bc: 0003a778 .word 0x0003a778
3a6c0: 0003a7a4 .word 0x0003a7a4
3a6c4: 0003a7a4 .word 0x0003a7a4
3a6c8: 0003a7a4 .word 0x0003a7a4
3a6cc: 0003a7a4 .word 0x0003a7a4
3a6d0: 0003a7a4 .word 0x0003a7a4
case F_DUPFD: /* dup */
fd2 = va_arg( ap, int );
3a6d4: e5922000 ldr r2, [r2]
if ( fd2 )
3a6d8: e3520000 cmp r2, #0
3a6dc: 0a000003 beq 3a6f0 <fcntl+0x98>
diop = rtems_libio_iop( fd2 );
3a6e0: e1520003 cmp r2, r3 <== NOT EXECUTED
3a6e4: 23a0c000 movcs ip, #0 <== NOT EXECUTED
3a6e8: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED
3a6ec: ea000002 b 3a6fc <fcntl+0xa4> <== NOT EXECUTED
else {
/* allocate a file control block */
diop = rtems_libio_allocate();
3a6f0: ebff34fa bl 7ae0 <rtems_libio_allocate>
if ( diop == 0 ) {
3a6f4: e250c000 subs ip, r0, #0
3a6f8: 0a00003e beq 3a7f8 <fcntl+0x1a0>
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
3a6fc: e2846018 add r6, r4, #24
3a700: e8b6000f ldm r6!, {r0, r1, r2, r3}
3a704: e28c5018 add r5, ip, #24
3a708: e8a5000f stmia r5!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
3a70c: e59f30fc ldr r3, [pc, #252] ; 3a810 <fcntl+0x1b8>
3a710: e5933000 ldr r3, [r3]
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
3a714: e5966000 ldr r6, [r6]
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
3a718: e594003c ldr r0, [r4, #60] ; 0x3c
diop->file_info = iop->file_info;
3a71c: e5941038 ldr r1, [r4, #56] ; 0x38
diop->flags = iop->flags;
3a720: e5942014 ldr r2, [r4, #20]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
3a724: e063300c rsb r3, r3, ip
}
diop->handlers = iop->handlers;
diop->file_info = iop->file_info;
diop->flags = iop->flags;
diop->pathinfo = iop->pathinfo;
3a728: e5856000 str r6, [r5]
ret = -1;
break;
}
}
diop->handlers = iop->handlers;
3a72c: e58c003c str r0, [ip, #60] ; 0x3c
diop->file_info = iop->file_info;
3a730: e58c1038 str r1, [ip, #56] ; 0x38
diop->flags = iop->flags;
3a734: e58c2014 str r2, [ip, #20]
diop->pathinfo = iop->pathinfo;
ret = (int) (diop - rtems_libio_iops);
3a738: e1a05343 asr r5, r3, #6
3a73c: ea00001f b 3a7c0 <fcntl+0x168>
break;
case F_GETFD: /* get f_flags */
ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
3a740: e1a055a0 lsr r5, r0, #11
3a744: e2055001 and r5, r5, #1
3a748: ea00001e b 3a7c8 <fcntl+0x170>
* 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 ) )
3a74c: e5925000 ldr r5, [r2]
3a750: e3550000 cmp r5, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
3a754: 13800b02 orrne r0, r0, #2048 ; 0x800
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
3a758: 03c00b02 biceq r0, r0, #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;
3a75c: 15840014 strne r0, [r4, #20]
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
3a760: 05840014 streq r0, [r4, #20]
* 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 ) )
3a764: 0a000017 beq 3a7c8 <fcntl+0x170>
3a768: ea00000b b 3a79c <fcntl+0x144>
else
iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
break;
case F_GETFL: /* more flags (cloexec) */
ret = rtems_libio_to_fcntl_flags( iop->flags );
3a76c: ebff3472 bl 793c <rtems_libio_to_fcntl_flags>
3a770: e1a05000 mov r5, r0
3a774: ea000011 b 3a7c0 <fcntl+0x168>
break;
case F_SETFL:
flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
3a778: e5920000 ldr r0, [r2]
3a77c: ebff3504 bl 7b94 <rtems_libio_fcntl_flags>
/*
* XXX If we are turning on append, should we seek to the end?
*/
iop->flags = (iop->flags & ~mask) | (flags & mask);
3a780: e5943014 ldr r3, [r4, #20]
3a784: e59f2088 ldr r2, [pc, #136] ; 3a814 <fcntl+0x1bc>
3a788: e3c33c02 bic r3, r3, #512 ; 0x200
3a78c: e0002002 and r2, r0, r2
3a790: e3c33001 bic r3, r3, #1
3a794: e1823003 orr r3, r2, r3
3a798: e5843014 str r3, [r4, #20]
3a79c: e3a05000 mov r5, #0
3a7a0: ea000008 b 3a7c8 <fcntl+0x170>
errno = ENOTSUP;
ret = -1;
break;
case F_GETOWN: /* for sockets. */
errno = ENOTSUP;
3a7a4: eb000f07 bl 3e3c8 <__errno>
3a7a8: e3a03086 mov r3, #134 ; 0x86
3a7ac: ea000001 b 3a7b8 <fcntl+0x160>
ret = -1;
break;
default:
errno = EINVAL;
3a7b0: eb000f04 bl 3e3c8 <__errno>
3a7b4: e3a03016 mov r3, #22
3a7b8: e5803000 str r3, [r0]
3a7bc: ea00000d b 3a7f8 <fcntl+0x1a0>
/*
* If we got this far successfully, then we give the optional
* filesystem specific handler a chance to process this.
*/
if (ret >= 0) {
3a7c0: e3550000 cmp r5, #0
3a7c4: ba00000c blt 3a7fc <fcntl+0x1a4>
if (iop->handlers->fcntl_h) {
3a7c8: e594303c ldr r3, [r4, #60] ; 0x3c
3a7cc: e5933030 ldr r3, [r3, #48] ; 0x30
3a7d0: e3530000 cmp r3, #0
3a7d4: 0a000008 beq 3a7fc <fcntl+0x1a4>
int err = (*iop->handlers->fcntl_h)( cmd, iop );
3a7d8: e1a01004 mov r1, r4
3a7dc: e1a00007 mov r0, r7
3a7e0: e1a0e00f mov lr, pc
3a7e4: e12fff13 bx r3
if (err) {
3a7e8: e2504000 subs r4, r0, #0
3a7ec: 0a000002 beq 3a7fc <fcntl+0x1a4>
errno = err;
3a7f0: eb000ef4 bl 3e3c8 <__errno> <== NOT EXECUTED
3a7f4: e5804000 str r4, [r0] <== NOT EXECUTED
3a7f8: e3e05000 mvn r5, #0
va_list ap;
va_start( ap, cmd );
ret = vfcntl(fd,cmd,ap);
va_end(ap);
return ret;
}
3a7fc: e1a00005 mov r0, r5
3a800: e8bd40f8 pop {r3, r4, r5, r6, r7, lr}
3a804: e28dd00c add sp, sp, #12
3a808: e12fff1e bx lr
00002970 <fdatasync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2970: e59f3068 ldr r3, [pc, #104] ; 29e0 <fdatasync+0x70>
2974: e5933000 ldr r3, [r3]
2978: e1500003 cmp r0, r3
#include <rtems/seterr.h>
int fdatasync(
int fd
)
{
297c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
2980: 2a000007 bcs 29a4 <fdatasync+0x34>
iop = rtems_libio_iop( fd );
2984: e59f3058 ldr r3, [pc, #88] ; 29e4 <fdatasync+0x74>
2988: e5933000 ldr r3, [r3]
298c: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2990: e5903014 ldr r3, [r0, #20]
2994: e3130c01 tst r3, #256 ; 0x100
2998: 0a000001 beq 29a4 <fdatasync+0x34>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
299c: e3130004 tst r3, #4
29a0: 1a000002 bne 29b0 <fdatasync+0x40>
29a4: eb0033d0 bl f8ec <__errno>
29a8: e3a03009 mov r3, #9
29ac: ea000005 b 29c8 <fdatasync+0x58>
/*
* Now process the fdatasync().
*/
if ( !iop->handlers->fdatasync_h )
29b0: e590303c ldr r3, [r0, #60] ; 0x3c
29b4: e593302c ldr r3, [r3, #44] ; 0x2c
29b8: e3530000 cmp r3, #0
29bc: 1a000004 bne 29d4 <fdatasync+0x64>
rtems_set_errno_and_return_minus_one( ENOTSUP );
29c0: eb0033c9 bl f8ec <__errno>
29c4: e3a03086 mov r3, #134 ; 0x86
29c8: e5803000 str r3, [r0]
29cc: e3e00000 mvn r0, #0
29d0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
return (*iop->handlers->fdatasync_h)( iop );
29d4: e1a0e00f mov lr, pc <== NOT EXECUTED
29d8: e12fff13 bx r3 <== NOT EXECUTED
}
29dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00008da8 <fifo_open>:
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
8da8: e59f3360 ldr r3, [pc, #864] ; 9110 <fifo_open+0x368>
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8dac: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr}
8db0: e1a07001 mov r7, r1
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
8db4: e3a01000 mov r1, #0
*/
int fifo_open(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8db8: e1a06000 mov r6, r0
)
{
pipe_control_t *pipe;
int err = 0;
if (rtems_semaphore_obtain(rtems_pipe_semaphore,
8dbc: e1a02001 mov r2, r1
8dc0: e5930000 ldr r0, [r3]
8dc4: ebfff0f4 bl 519c <rtems_semaphore_obtain>
8dc8: e250a000 subs sl, r0, #0
8dcc: 13e05003 mvnne r5, #3
8dd0: 1a0000cc bne 9108 <fifo_open+0x360>
RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL)
return -EINTR;
pipe = *pipep;
8dd4: e5964000 ldr r4, [r6] <== NOT EXECUTED
if (pipe == NULL) {
8dd8: e3540000 cmp r4, #0 <== NOT EXECUTED
8ddc: 1a00004c bne 8f14 <fifo_open+0x16c> <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
8de0: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED
8de4: ebffe505 bl 2200 <malloc> <== NOT EXECUTED
if (pipe == NULL)
8de8: e3500000 cmp r0, #0 <== NOT EXECUTED
{
static char c = 'a';
pipe_control_t *pipe;
int err = -ENOMEM;
pipe = malloc(sizeof(pipe_control_t));
8dec: e1a04000 mov r4, r0 <== NOT EXECUTED
8df0: e1a08000 mov r8, r0 <== NOT EXECUTED
if (pipe == NULL)
8df4: 0a000044 beq 8f0c <fifo_open+0x164> <== NOT EXECUTED
return err;
memset(pipe, 0, sizeof(pipe_control_t));
8df8: e1a0100a mov r1, sl <== NOT EXECUTED
8dfc: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED
8e00: eb001881 bl f00c <memset> <== NOT EXECUTED
pipe->Size = PIPE_BUF;
8e04: e3a00c02 mov r0, #512 ; 0x200 <== NOT EXECUTED
8e08: e5840004 str r0, [r4, #4] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
8e0c: ebffe4fb bl 2200 <malloc> <== NOT EXECUTED
if (! pipe->Buffer)
8e10: 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);
8e14: e5840000 str r0, [r4] <== NOT EXECUTED
if (! pipe->Buffer)
8e18: 0a000039 beq 8f04 <fifo_open+0x15c> <== NOT EXECUTED
goto err_buf;
err = -ENOMEM;
if (rtems_barrier_create(
8e1c: e59f52f0 ldr r5, [pc, #752] ; 9114 <fifo_open+0x36c> <== NOT EXECUTED
8e20: e59f02f0 ldr r0, [pc, #752] ; 9118 <fifo_open+0x370> <== NOT EXECUTED
8e24: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
8e28: e1a0100a mov r1, sl <== NOT EXECUTED
8e2c: e1830000 orr r0, r3, r0 <== NOT EXECUTED
8e30: e1a0200a mov r2, sl <== NOT EXECUTED
8e34: e284302c add r3, r4, #44 ; 0x2c <== NOT EXECUTED
8e38: eb000886 bl b058 <rtems_barrier_create> <== NOT EXECUTED
8e3c: e2501000 subs r1, r0, #0 <== NOT EXECUTED
8e40: 1a00002d bne 8efc <fifo_open+0x154> <== 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(
8e44: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
8e48: e59f02cc ldr r0, [pc, #716] ; 911c <fifo_open+0x374> <== NOT EXECUTED
8e4c: e1a02001 mov r2, r1 <== NOT EXECUTED
8e50: e1830000 orr r0, r3, r0 <== NOT EXECUTED
8e54: e2843030 add r3, r4, #48 ; 0x30 <== NOT EXECUTED
8e58: eb00087e bl b058 <rtems_barrier_create> <== NOT EXECUTED
8e5c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
8e60: 1a000023 bne 8ef4 <fifo_open+0x14c> <== 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(
8e64: e5d52000 ldrb r2, [r5] <== NOT EXECUTED
8e68: e59f02b0 ldr r0, [pc, #688] ; 9120 <fifo_open+0x378> <== NOT EXECUTED
8e6c: e284c028 add ip, r4, #40 ; 0x28 <== NOT EXECUTED
8e70: e1820000 orr r0, r2, r0 <== NOT EXECUTED
8e74: e3a01001 mov r1, #1 <== NOT EXECUTED
8e78: e3a02010 mov r2, #16 <== NOT EXECUTED
8e7c: e58dc000 str ip, [sp] <== NOT EXECUTED
8e80: ebfff033 bl 4f54 <rtems_semaphore_create> <== NOT EXECUTED
8e84: e3500000 cmp r0, #0 <== NOT EXECUTED
8e88: 1a000017 bne 8eec <fifo_open+0x144> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get (
Objects_Id id,
Objects_Locations *location
)
{
return (Barrier_Control *)
8e8c: e28d8004 add r8, sp, #4 <== NOT EXECUTED
8e90: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED
8e94: e1a02008 mov r2, r8 <== NOT EXECUTED
8e98: e59f0284 ldr r0, [pc, #644] ; 9124 <fifo_open+0x37c> <== NOT EXECUTED
8e9c: ebfff664 bl 6834 <_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
8ea0: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED
8ea4: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED
8ea8: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
8eac: ebfff89e bl 712c <_Thread_Enable_dispatch> <== NOT EXECUTED
8eb0: e1a02008 mov r2, r8 <== NOT EXECUTED
8eb4: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED
8eb8: e59f0264 ldr r0, [pc, #612] ; 9124 <fifo_open+0x37c> <== NOT EXECUTED
8ebc: ebfff65c bl 6834 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
8ec0: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED
8ec4: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED
8ec8: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL;
_Thread_Enable_dispatch();
8ecc: ebfff896 bl 712c <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API
pipe_interruptible(pipe);
#endif
*pipep = pipe;
if (c ++ == 'z')
8ed0: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
8ed4: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED
8ed8: e2833001 add r3, r3, #1 <== NOT EXECUTED
8edc: e5c53000 strb r3, [r5] <== NOT EXECUTED
c = 'a';
8ee0: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED
8ee4: 05c53000 strbeq r3, [r5] <== NOT EXECUTED
8ee8: ea000009 b 8f14 <fifo_open+0x16c> <== NOT EXECUTED
return 0;
err_sem:
rtems_barrier_delete(pipe->writeBarrier);
8eec: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8ef0: eb000886 bl b110 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar:
rtems_barrier_delete(pipe->readBarrier);
8ef4: e598002c ldr r0, [r8, #44] ; 0x2c <== NOT EXECUTED
8ef8: eb000884 bl b110 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar:
free(pipe->Buffer);
8efc: e5980000 ldr r0, [r8] <== NOT EXECUTED
8f00: ebffe3f2 bl 1ed0 <free> <== NOT EXECUTED
err_buf:
free(pipe);
8f04: e1a00008 mov r0, r8 <== NOT EXECUTED
8f08: ebffe3f0 bl 1ed0 <free> <== NOT EXECUTED
8f0c: e3e0500b mvn r5, #11 <== NOT EXECUTED
8f10: ea00000d b 8f4c <fifo_open+0x1a4> <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
8f14: e3a01000 mov r1, #0 <== NOT EXECUTED
8f18: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8f1c: e1a02001 mov r2, r1 <== NOT EXECUTED
8f20: ebfff09d bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
8f24: e5963000 ldr r3, [r6] <== NOT EXECUTED
err = pipe_alloc(&pipe);
if (err)
goto out;
}
if (! PIPE_LOCK(pipe))
8f28: e3500000 cmp r0, #0 <== NOT EXECUTED
8f2c: 01a05000 moveq r5, r0 <== NOT EXECUTED
8f30: 13e05003 mvnne r5, #3 <== NOT EXECUTED
err = -EINTR;
if (*pipep == NULL) {
8f34: e3530000 cmp r3, #0 <== NOT EXECUTED
8f38: 1a000003 bne 8f4c <fifo_open+0x1a4> <== NOT EXECUTED
if (err)
8f3c: e3550000 cmp r5, #0 <== NOT EXECUTED
pipe_free(pipe);
else
*pipep = pipe;
8f40: 05864000 streq r4, [r6] <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
err = -EINTR;
if (*pipep == NULL) {
if (err)
pipe_free(pipe);
8f44: 11a00004 movne r0, r4 <== NOT EXECUTED
8f48: 1bffff4a blne 8c78 <pipe_free> <== NOT EXECUTED
else
*pipep = pipe;
}
out:
rtems_semaphore_release(rtems_pipe_semaphore);
8f4c: e59f31bc ldr r3, [pc, #444] ; 9110 <fifo_open+0x368> <== NOT EXECUTED
8f50: e5930000 ldr r0, [r3] <== NOT EXECUTED
8f54: ebfff0d6 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe;
unsigned int prevCounter;
int err;
err = pipe_new(pipep);
if (err)
8f58: e3550000 cmp r5, #0 <== NOT EXECUTED
8f5c: 1a000069 bne 9108 <fifo_open+0x360> <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
8f60: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
8f64: e2033006 and r3, r3, #6 <== NOT EXECUTED
8f68: e3530004 cmp r3, #4 <== NOT EXECUTED
int err;
err = pipe_new(pipep);
if (err)
return err;
pipe = *pipep;
8f6c: e5964000 ldr r4, [r6] <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
8f70: 0a000024 beq 9008 <fifo_open+0x260> <== NOT EXECUTED
8f74: e3530006 cmp r3, #6 <== NOT EXECUTED
8f78: 0a000047 beq 909c <fifo_open+0x2f4> <== NOT EXECUTED
8f7c: e3530002 cmp r3, #2 <== NOT EXECUTED
8f80: 1a000059 bne 90ec <fifo_open+0x344> <== NOT EXECUTED
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
8f84: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8f88: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8f8c: e3530000 cmp r3, #0 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8f90: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8f94: e2833001 add r3, r3, #1 <== NOT EXECUTED
return err;
pipe = *pipep;
switch (LIBIO_ACCMODE(iop)) {
case LIBIO_FLAGS_READ:
pipe->readerCounter ++;
8f98: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
8f9c: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
8fa0: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8fa4: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
8fa8: 0b000870 bleq b170 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Writers == 0) {
8fac: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
8fb0: e3530000 cmp r3, #0 <== NOT EXECUTED
8fb4: 1a00004c bne 90ec <fifo_open+0x344> <== NOT EXECUTED
/* Not an error */
if (LIBIO_NODELAY(iop))
8fb8: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
8fbc: e3130001 tst r3, #1 <== NOT EXECUTED
8fc0: 1a000049 bne 90ec <fifo_open+0x344> <== NOT EXECUTED
break;
prevCounter = pipe->writerCounter;
8fc4: e5948024 ldr r8, [r4, #36] ; 0x24 <== NOT EXECUTED
err = -EINTR;
/* Wait until a writer opens the pipe */
do {
PIPE_UNLOCK(pipe);
8fc8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8fcc: ebfff0b8 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
8fd0: e3a01000 mov r1, #0 <== NOT EXECUTED
8fd4: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8fd8: eb00087a bl b1c8 <rtems_barrier_wait> <== NOT EXECUTED
8fdc: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8fe0: 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))
8fe4: 1a000043 bne 90f8 <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
8fe8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8fec: ebfff06a bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
8ff0: e3500000 cmp r0, #0 <== NOT EXECUTED
8ff4: 1a00003f bne 90f8 <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->writerCounter);
8ff8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
8ffc: e1580003 cmp r8, r3 <== NOT EXECUTED
9000: 0afffff0 beq 8fc8 <fifo_open+0x220> <== NOT EXECUTED
9004: ea000038 b 90ec <fifo_open+0x344> <== NOT EXECUTED
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
9008: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
900c: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9010: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
9014: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9018: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->writerCounter);
}
break;
case LIBIO_FLAGS_WRITE:
pipe->writerCounter ++;
901c: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
9020: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
9024: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED
9028: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
902c: 0b00084f bleq b170 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
9030: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
9034: e3530000 cmp r3, #0 <== NOT EXECUTED
9038: 1a00002b bne 90ec <fifo_open+0x344> <== NOT EXECUTED
903c: e5973014 ldr r3, [r7, #20] <== NOT EXECUTED
9040: e3130001 tst r3, #1 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
}
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
9044: 05948020 ldreq r8, [r4, #32] <== NOT EXECUTED
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
PIPE_WAKEUPREADERS(pipe);
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
9048: 0a000003 beq 905c <fifo_open+0x2b4> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
904c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9050: ebfff097 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
9054: e3e05005 mvn r5, #5 <== NOT EXECUTED
err = -ENXIO;
goto out_error;
9058: ea000027 b 90fc <fifo_open+0x354> <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
905c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9060: ebfff093 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
9064: e3a01000 mov r1, #0 <== NOT EXECUTED
9068: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
906c: eb000855 bl b1c8 <rtems_barrier_wait> <== NOT EXECUTED
9070: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
9074: e1a02001 mov r2, r1 <== NOT EXECUTED
if (pipe->Readers == 0) {
prevCounter = pipe->readerCounter;
err = -EINTR;
do {
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
9078: 1a00001e bne 90f8 <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
if (! PIPE_LOCK(pipe))
907c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
9080: ebfff045 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
9084: e3500000 cmp r0, #0 <== NOT EXECUTED
9088: 1a00001a bne 90f8 <fifo_open+0x350> <== NOT EXECUTED
goto out_error;
} while (prevCounter == pipe->readerCounter);
908c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
9090: e1580003 cmp r8, r3 <== NOT EXECUTED
9094: 0afffff0 beq 905c <fifo_open+0x2b4> <== NOT EXECUTED
9098: ea000013 b 90ec <fifo_open+0x344> <== NOT EXECUTED
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
909c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
90a0: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
90a4: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
90a8: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
90ac: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter);
}
break;
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
90b0: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
90b4: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
90b8: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED
90bc: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
90c0: 0b00082a bleq b170 <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++;
if (pipe->Writers ++ == 0)
90c4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
90c8: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
90cc: e3530000 cmp r3, #0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
90d0: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
90d4: e2833001 add r3, r3, #1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE:
pipe->readerCounter ++;
if (pipe->Readers ++ == 0)
PIPE_WAKEUPWRITERS(pipe);
pipe->writerCounter ++;
90d8: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
90dc: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
90e0: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED
90e4: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED
90e8: 0b000820 bleq b170 <rtems_barrier_release> <== NOT EXECUTED
break;
}
PIPE_UNLOCK(pipe);
90ec: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
90f0: ebfff06f bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
90f4: ea000003 b 9108 <fifo_open+0x360> <== NOT EXECUTED
90f8: e3e05003 mvn r5, #3 <== NOT EXECUTED
out_error:
pipe_release(pipep, iop);
90fc: e1a00006 mov r0, r6 <== NOT EXECUTED
9100: e1a01007 mov r1, r7 <== NOT EXECUTED
9104: ebfffee8 bl 8cac <pipe_release> <== NOT EXECUTED
return err;
}
9108: e1a00005 mov r0, r5
910c: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc}
000029e8 <fpathconf>:
{
long return_value;
rtems_libio_t *iop;
rtems_filesystem_limits_and_options_t *the_limits;
rtems_libio_check_fd(fd);
29e8: e59f30ec ldr r3, [pc, #236] ; 2adc <fpathconf+0xf4>
29ec: e5933000 ldr r3, [r3]
29f0: e1500003 cmp r0, r3
long fpathconf(
int fd,
int name
)
{
29f4: 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);
29f8: 2a000005 bcs 2a14 <fpathconf+0x2c>
iop = rtems_libio_iop(fd);
29fc: e59f30dc ldr r3, [pc, #220] ; 2ae0 <fpathconf+0xf8>
2a00: e5933000 ldr r3, [r3]
2a04: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2a08: e5903014 ldr r3, [r0, #20]
2a0c: e3130c01 tst r3, #256 ; 0x100
2a10: 1a000004 bne 2a28 <fpathconf+0x40>
2a14: eb0033b4 bl f8ec <__errno>
2a18: e3a03009 mov r3, #9
2a1c: e5803000 str r3, [r0]
2a20: e3e00000 mvn r0, #0
2a24: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/*
* Now process the information request.
*/
the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2a28: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
2a2c: e351000b cmp r1, #11
2a30: 979ff101 ldrls pc, [pc, r1, lsl #2]
2a34: ea000023 b 2ac8 <fpathconf+0xe0>
2a38: 00002a68 .word 0x00002a68
2a3c: 00002a70 .word 0x00002a70
2a40: 00002a78 .word 0x00002a78
2a44: 00002a80 .word 0x00002a80
2a48: 00002a88 .word 0x00002a88
2a4c: 00002a90 .word 0x00002a90
2a50: 00002a98 .word 0x00002a98
2a54: 00002aa0 .word 0x00002aa0
2a58: 00002aa8 .word 0x00002aa8
2a5c: 00002ab0 .word 0x00002ab0
2a60: 00002ab8 .word 0x00002ab8
2a64: 00002ac0 .word 0x00002ac0
case _PC_LINK_MAX:
return_value = the_limits->link_max;
2a68: e5930038 ldr r0, [r3, #56] ; 0x38
break;
2a6c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON:
return_value = the_limits->max_canon;
2a70: e593003c ldr r0, [r3, #60] ; 0x3c
break;
2a74: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT:
return_value = the_limits->max_input;
2a78: e5930040 ldr r0, [r3, #64] ; 0x40
break;
2a7c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX:
return_value = the_limits->name_max;
2a80: e5930044 ldr r0, [r3, #68] ; 0x44
break;
2a84: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX:
return_value = the_limits->path_max;
2a88: e5930048 ldr r0, [r3, #72] ; 0x48
break;
2a8c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF:
return_value = the_limits->pipe_buf;
2a90: e593004c ldr r0, [r3, #76] ; 0x4c
break;
2a94: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED:
return_value = the_limits->posix_chown_restrictions;
2a98: e5930054 ldr r0, [r3, #84] ; 0x54
break;
2a9c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC:
return_value = the_limits->posix_no_trunc;
2aa0: e5930058 ldr r0, [r3, #88] ; 0x58
break;
2aa4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE:
return_value = the_limits->posix_vdisable;
2aa8: e5930064 ldr r0, [r3, #100] ; 0x64
break;
2aac: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO:
return_value = the_limits->posix_async_io;
2ab0: e5930050 ldr r0, [r3, #80] ; 0x50
break;
2ab4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO:
return_value = the_limits->posix_prio_io;
2ab8: e593005c ldr r0, [r3, #92] ; 0x5c
break;
2abc: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO:
return_value = the_limits->posix_sync_io;
2ac0: e5930060 ldr r0, [r3, #96] ; 0x60
break;
2ac4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2ac8: eb003387 bl f8ec <__errno>
2acc: e3a03016 mov r3, #22
2ad0: e5803000 str r3, [r0]
2ad4: e3e00000 mvn r0, #0
break;
}
return return_value;
}
2ad8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001ed0 <free>:
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
1ed0: e59f3088 ldr r3, [pc, #136] ; 1f60 <free+0x90>
1ed4: e593200c ldr r2, [r3, #12]
1ed8: e92d4030 push {r4, r5, lr}
1edc: e2822001 add r2, r2, #1
if ( !ptr )
1ee0: e2504000 subs r4, r0, #0
void free(
void *ptr
)
{
MSBUMP(free_calls, 1);
1ee4: e583200c str r2, [r3, #12]
if ( !ptr )
1ee8: 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()) &&
1eec: e59f3070 ldr r3, [pc, #112] ; 1f64 <free+0x94>
1ef0: e5933000 ldr r3, [r3]
1ef4: e3530003 cmp r3, #3
1ef8: 1a000005 bne 1f14 <free+0x44>
1efc: eb000065 bl 2098 <malloc_is_system_state_OK>
1f00: e3500000 cmp r0, #0
1f04: 1a000002 bne 1f14 <free+0x44>
!malloc_is_system_state_OK() ) {
malloc_deferred_free(ptr);
1f08: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1f0c: 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);
1f10: ea000073 b 20e4 <malloc_deferred_free> <== NOT EXECUTED
#endif
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
1f14: e59f304c ldr r3, [pc, #76] ; 1f68 <free+0x98>
1f18: e5933000 ldr r3, [r3]
1f1c: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1f20: 11a00004 movne r0, r4
1f24: 11a0e00f movne lr, pc
1f28: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
1f2c: e59f5038 ldr r5, [pc, #56] ; 1f6c <free+0x9c>
1f30: e1a01004 mov r1, r4
1f34: e5950000 ldr r0, [r5]
1f38: eb0012f6 bl 6b18 <_Protected_heap_Free>
1f3c: e3500000 cmp r0, #0
1f40: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n",
ptr,
RTEMS_Malloc_Heap->area_begin,
1f44: 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",
1f48: e59f0020 ldr r0, [pc, #32] ; 1f70 <free+0xa0> <== NOT EXECUTED
1f4c: e2822018 add r2, r2, #24 <== NOT EXECUTED
1f50: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
1f54: e1a01004 mov r1, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin,
RTEMS_Malloc_Heap->area_end
);
}
}
1f58: 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",
1f5c: ea00036f b 2d20 <printk> <== NOT EXECUTED
000267b0 <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
267b0: e59f3058 ldr r3, [pc, #88] ; 26810 <free_user_env+0x60> <== NOT EXECUTED
267b4: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with
* thread dispatching disabled!
*/
static void
free_user_env(void *venv)
{
267b8: e92d4010 push {r4, lr} <== NOT EXECUTED
267bc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ;
if (env != &rtems_global_user_env
267c0: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
267c4: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
267c8: e3530000 cmp r3, #0 <== NOT EXECUTED
267cc: 0a000004 beq 267e4 <free_user_env+0x34> <== NOT EXECUTED
267d0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
267d4: e3530000 cmp r3, #0 <== NOT EXECUTED
267d8: 12800004 addne r0, r0, #4 <== NOT EXECUTED
267dc: 11a0e00f movne lr, pc <== NOT EXECUTED
267e0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
267e4: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
267e8: e3530000 cmp r3, #0 <== NOT EXECUTED
267ec: 0a000004 beq 26804 <free_user_env+0x54> <== NOT EXECUTED
267f0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
267f4: e3530000 cmp r3, #0 <== NOT EXECUTED
267f8: 12840018 addne r0, r4, #24 <== NOT EXECUTED
267fc: 11a0e00f movne lr, pc <== NOT EXECUTED
26800: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
26804: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
26808: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0
#endif
) {
rtems_filesystem_freenode( &env->current_directory);
rtems_filesystem_freenode( &env->root_directory);
free(env);
2680c: eaff83a8 b 76b4 <free> <== NOT EXECUTED
00019ffc <fstat>:
int fstat(
int fd,
struct stat *sbuf
)
{
19ffc: e92d4030 push {r4, r5, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !sbuf )
1a000: e2515000 subs r5, r1, #0
1a004: 1a000002 bne 1a014 <fstat+0x18>
rtems_set_errno_and_return_minus_one( EFAULT );
1a008: ebffd1b5 bl e6e4 <__errno>
1a00c: e3a0300e mov r3, #14
1a010: ea000014 b 1a068 <fstat+0x6c>
/*
* Now process the stat() request.
*/
iop = rtems_libio_iop( fd );
1a014: e59f3080 ldr r3, [pc, #128] ; 1a09c <fstat+0xa0>
1a018: e5933000 ldr r3, [r3]
1a01c: e1500003 cmp r0, r3
1a020: 2a000008 bcs 1a048 <fstat+0x4c>
1a024: e59f3074 ldr r3, [pc, #116] ; 1a0a0 <fstat+0xa4>
1a028: e5934000 ldr r4, [r3]
1a02c: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_fd( fd );
rtems_libio_check_is_open(iop);
1a030: e5943014 ldr r3, [r4, #20]
1a034: e3130c01 tst r3, #256 ; 0x100
1a038: 0a000002 beq 1a048 <fstat+0x4c>
if ( !iop->handlers )
1a03c: e594303c ldr r3, [r4, #60] ; 0x3c
1a040: e3530000 cmp r3, #0
1a044: 1a000002 bne 1a054 <fstat+0x58>
rtems_set_errno_and_return_minus_one( EBADF );
1a048: ebffd1a5 bl e6e4 <__errno>
1a04c: e3a03009 mov r3, #9
1a050: ea000004 b 1a068 <fstat+0x6c>
if ( !iop->handlers->fstat_h )
1a054: e5933018 ldr r3, [r3, #24]
1a058: e3530000 cmp r3, #0
1a05c: 1a000004 bne 1a074 <fstat+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a060: ebffd19f bl e6e4 <__errno> <== NOT EXECUTED
1a064: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a068: e5803000 str r3, [r0]
1a06c: e3e00000 mvn r0, #0
1a070: e8bd8030 pop {r4, r5, pc}
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( sbuf, 0, sizeof(struct stat) );
1a074: e3a01000 mov r1, #0
1a078: e3a02048 mov r2, #72 ; 0x48
1a07c: e1a00005 mov r0, r5
1a080: ebffd3e1 bl f00c <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
1a084: e2840018 add r0, r4, #24
1a088: e1a01005 mov r1, r5
1a08c: e594303c ldr r3, [r4, #60] ; 0x3c
1a090: e1a0e00f mov lr, pc
1a094: e593f018 ldr pc, [r3, #24]
}
1a098: e8bd8030 pop {r4, r5, pc}
00025500 <fsync>:
int fd
)
{
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
25500: e59f3068 ldr r3, [pc, #104] ; 25570 <fsync+0x70>
25504: e5933000 ldr r3, [r3]
25508: e1500003 cmp r0, r3
#include <rtems/seterr.h>
int fsync(
int fd
)
{
2550c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
25510: 2a000008 bcs 25538 <fsync+0x38>
iop = rtems_libio_iop( fd );
25514: e59f3058 ldr r3, [pc, #88] ; 25574 <fsync+0x74>
25518: e5933000 ldr r3, [r3]
2551c: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
25520: e5903014 ldr r3, [r0, #20]
25524: e3130c01 tst r3, #256 ; 0x100
25528: 0a000002 beq 25538 <fsync+0x38>
/*
* Now process the fsync().
*/
if ( !iop->handlers )
2552c: e590303c ldr r3, [r0, #60] ; 0x3c
25530: e3530000 cmp r3, #0
25534: 1a000002 bne 25544 <fsync+0x44>
rtems_set_errno_and_return_minus_one( EBADF );
25538: eb0063a2 bl 3e3c8 <__errno> <== NOT EXECUTED
2553c: e3a03009 mov r3, #9 <== NOT EXECUTED
25540: ea000004 b 25558 <fsync+0x58> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
25544: e5933028 ldr r3, [r3, #40] ; 0x28
25548: e3530000 cmp r3, #0
2554c: 1a000004 bne 25564 <fsync+0x64>
rtems_set_errno_and_return_minus_one( ENOTSUP );
25550: eb00639c bl 3e3c8 <__errno>
25554: e3a03086 mov r3, #134 ; 0x86
25558: e5803000 str r3, [r0]
2555c: e3e00000 mvn r0, #0
25560: e49df004 pop {pc} ; (ldr pc, [sp], #4)
return (*iop->handlers->fsync_h)( iop );
25564: e1a0e00f mov lr, pc
25568: e12fff13 bx r3
}
2556c: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000a29c <ftruncate>:
int ftruncate(
int fd,
off_t length
)
{
a29c: e92d4070 push {r4, r5, r6, lr}
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a2a0: e59f30dc ldr r3, [pc, #220] ; a384 <ftruncate+0xe8>
a2a4: e5933000 ldr r3, [r3]
a2a8: e1500003 cmp r0, r3
int ftruncate(
int fd,
off_t length
)
{
a2ac: e24dd014 sub sp, sp, #20
a2b0: e1a05001 mov r5, r1
a2b4: e1a06002 mov r6, r2
rtems_libio_t *iop;
rtems_filesystem_location_info_t loc;
rtems_libio_check_fd( fd );
a2b8: 2a000005 bcs a2d4 <ftruncate+0x38>
iop = rtems_libio_iop( fd );
a2bc: e59f30c4 ldr r3, [pc, #196] ; a388 <ftruncate+0xec>
a2c0: e5934000 ldr r4, [r3]
a2c4: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
a2c8: e5943014 ldr r3, [r4, #20]
a2cc: e3130c01 tst r3, #256 ; 0x100
a2d0: 1a000002 bne a2e0 <ftruncate+0x44>
a2d4: eb001102 bl e6e4 <__errno> <== NOT EXECUTED
a2d8: e3a03009 mov r3, #9 <== NOT EXECUTED
a2dc: ea00001e b a35c <ftruncate+0xc0> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a2e0: e3130004 tst r3, #4
a2e4: 0a000013 beq a338 <ftruncate+0x9c>
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a2e8: e284e018 add lr, r4, #24
a2ec: e8be000f ldm lr!, {r0, r1, r2, r3}
a2f0: e1a0c00d mov ip, sp
a2f4: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
a2f8: e5933010 ldr r3, [r3, #16]
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a2fc: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
a300: e3530000 cmp r3, #0
/*
* Make sure we are not working on a directory
*/
loc = iop->pathinfo;
a304: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h )
a308: 0a000011 beq a354 <ftruncate+0xb8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
a30c: e1a0000d mov r0, sp
a310: e1a0e00f mov lr, pc
a314: e12fff13 bx r3
a318: e3500001 cmp r0, #1
a31c: 1a000002 bne a32c <ftruncate+0x90>
rtems_set_errno_and_return_minus_one( EISDIR );
a320: eb0010ef bl e6e4 <__errno>
a324: e3a03015 mov r3, #21
a328: ea00000b b a35c <ftruncate+0xc0>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
a32c: e5943014 ldr r3, [r4, #20]
a330: e3130004 tst r3, #4
a334: 1a000002 bne a344 <ftruncate+0xa8>
a338: eb0010e9 bl e6e4 <__errno> <== NOT EXECUTED
a33c: e3a03016 mov r3, #22 <== NOT EXECUTED
a340: ea000005 b a35c <ftruncate+0xc0> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
a344: e594303c ldr r3, [r4, #60] ; 0x3c
a348: e5933020 ldr r3, [r3, #32]
a34c: e3530000 cmp r3, #0
a350: 1a000004 bne a368 <ftruncate+0xcc>
rtems_set_errno_and_return_minus_one( ENOTSUP );
a354: eb0010e2 bl e6e4 <__errno> <== NOT EXECUTED
a358: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
a35c: e5803000 str r3, [r0]
a360: e3e00000 mvn r0, #0
a364: ea000004 b a37c <ftruncate+0xe0>
return (*iop->handlers->ftruncate_h)( iop, length );
a368: e1a00004 mov r0, r4
a36c: e1a01005 mov r1, r5
a370: e1a02006 mov r2, r6
a374: e1a0e00f mov lr, pc
a378: e12fff13 bx r3
}
a37c: e28dd014 add sp, sp, #20
a380: e8bd8070 pop {r4, r5, r6, pc}
00057fa8 <getdents>:
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
57fa8: e59f30a8 ldr r3, [pc, #168] ; 58058 <getdents+0xb0>
57fac: e5933000 ldr r3, [r3]
57fb0: e1500003 cmp r0, r3
57fb4: 359f30a0 ldrcc r3, [pc, #160] ; 5805c <getdents+0xb4>
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
57fb8: e92d4070 push {r4, r5, r6, lr}
/*
* Get the file control block structure associated with the file descriptor
*/
iop = rtems_libio_iop( dd_fd );
57fbc: 35934000 ldrcc r4, [r3]
57fc0: 23a04000 movcs r4, #0
57fc4: 30844300 addcc r4, r4, r0, lsl #6
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
57fc8: e284e018 add lr, r4, #24
int getdents(
int dd_fd,
char *dd_buf,
int dd_len
)
{
57fcc: e24dd014 sub sp, sp, #20
57fd0: e1a06001 mov r6, r1
57fd4: e1a05002 mov r5, r2
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
57fd8: e8be000f ldm lr!, {r0, r1, r2, r3}
57fdc: e1a0c00d mov ip, sp
57fe0: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
57fe4: e5933010 ldr r3, [r3, #16]
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
57fe8: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
57fec: e3530000 cmp r3, #0
iop = rtems_libio_iop( dd_fd );
/*
* Make sure we are working on a directory
*/
loc = iop->pathinfo;
57ff0: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h )
57ff4: 0a00000d beq 58030 <getdents+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
57ff8: e1a0000d mov r0, sp
57ffc: e1a0e00f mov lr, pc
58000: e12fff13 bx r3
58004: e3500001 cmp r0, #1
58008: 0a000004 beq 58020 <getdents+0x78>
rtems_set_errno_and_return_minus_one( ENOTDIR );
5800c: ebff98ed bl 3e3c8 <__errno>
58010: e3a03014 mov r3, #20
58014: e5803000 str r3, [r0]
58018: e3e00000 mvn r0, #0
5801c: ea00000b b 58050 <getdents+0xa8>
/*
* Return the number of bytes that were actually transfered as a result
* of the read attempt.
*/
if ( !iop->handlers->read_h )
58020: e594303c ldr r3, [r4, #60] ; 0x3c
58024: e5933008 ldr r3, [r3, #8]
58028: e3530000 cmp r3, #0
5802c: 1a000002 bne 5803c <getdents+0x94>
rtems_set_errno_and_return_minus_one( ENOTSUP );
58030: ebff98e4 bl 3e3c8 <__errno> <== NOT EXECUTED
58034: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
58038: eafffff5 b 58014 <getdents+0x6c> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
5803c: e1a00004 mov r0, r4
58040: e1a01006 mov r1, r6
58044: e1a02005 mov r2, r5
58048: e1a0e00f mov lr, pc
5804c: e12fff13 bx r3
}
58050: e28dd014 add sp, sp, #20
58054: e8bd8070 pop {r4, r5, r6, pc}
00025690 <getgid>:
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
gid_t getgid( void )
{
25690: e59f3008 ldr r3, [pc, #8] ; 256a0 <getgid+0x10> <== NOT EXECUTED
25694: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Gid;
}
25698: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED
2569c: e12fff1e bx lr <== NOT EXECUTED
00025ca8 <getgr_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
25ca8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
25cac: e59da01c ldr sl, [sp, #28]
25cb0: e1a06000 mov r6, r0
25cb4: e1a07001 mov r7, r1
25cb8: e1a04002 mov r4, r2
25cbc: e1a08003 mov r8, r3
FILE *fp;
int match;
init_etc_passwd_group();
25cc0: ebffffb7 bl 25ba4 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
25cc4: e59f00a4 ldr r0, [pc, #164] ; 25d70 <getgr_r+0xc8>
25cc8: e59f10a4 ldr r1, [pc, #164] ; 25d74 <getgr_r+0xcc>
25ccc: eb00642d bl 3ed88 <fopen>
25cd0: e2505000 subs r5, r0, #0
25cd4: 1a000003 bne 25ce8 <getgr_r+0x40>
errno = EINVAL;
25cd8: eb0061ba bl 3e3c8 <__errno> <== NOT EXECUTED
25cdc: e3a03016 mov r3, #22 <== NOT EXECUTED
25ce0: e5803000 str r3, [r0] <== NOT EXECUTED
25ce4: ea00000c b 25d1c <getgr_r+0x74> <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
25ce8: e1a01004 mov r1, r4
25cec: e1a02008 mov r2, r8
25cf0: e1a0300a mov r3, sl
25cf4: e1a00005 mov r0, r5
25cf8: ebfffef2 bl 258c8 <scangr>
25cfc: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(grp->gr_name, name) == 0);
25d00: e1a01006 mov r1, r6
if ((fp = fopen("/etc/group", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scangr(fp, grp, buffer, bufsize)) {
25d04: 1a000006 bne 25d24 <getgr_r+0x7c>
errno = EINVAL;
25d08: eb0061ae bl 3e3c8 <__errno> <== NOT EXECUTED
25d0c: e3a03016 mov r3, #22 <== NOT EXECUTED
25d10: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
25d14: e1a00005 mov r0, r5 <== NOT EXECUTED
25d18: eb0061f7 bl 3e4fc <fclose> <== NOT EXECUTED
25d1c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
25d20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
if (name) {
25d24: e3560000 cmp r6, #0
25d28: 0a000004 beq 25d40 <getgr_r+0x98>
match = (strcmp(grp->gr_name, name) == 0);
25d2c: e5940000 ldr r0, [r4]
25d30: eb007a4a bl 44660 <strcmp>
25d34: e2700001 rsbs r0, r0, #1
25d38: 33a00000 movcc r0, #0
25d3c: ea000003 b 25d50 <getgr_r+0xa8>
}
else {
match = (grp->gr_gid == gid);
25d40: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
25d44: e1500007 cmp r0, r7 <== NOT EXECUTED
25d48: 13a00000 movne r0, #0 <== NOT EXECUTED
25d4c: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
25d50: e3500000 cmp r0, #0
25d54: 0affffe3 beq 25ce8 <getgr_r+0x40>
fclose(fp);
25d58: e1a00005 mov r0, r5
25d5c: eb0061e6 bl 3e4fc <fclose>
*result = grp;
25d60: e59d3020 ldr r3, [sp, #32]
25d64: e3a00000 mov r0, #0
25d68: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
25d6c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00025a00 <getgrent>:
return NULL;
return p;
}
struct group *getgrent(void)
{
25a00: e92d4010 push {r4, lr} <== NOT EXECUTED
if (group_fp == NULL)
25a04: e59f402c ldr r4, [pc, #44] ; 25a38 <getgrent+0x38> <== NOT EXECUTED
25a08: e5940000 ldr r0, [r4] <== NOT EXECUTED
25a0c: e3500000 cmp r0, #0 <== NOT EXECUTED
25a10: 0a000006 beq 25a30 <getgrent+0x30> <== NOT EXECUTED
return NULL;
if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
25a14: e2841008 add r1, r4, #8 <== NOT EXECUTED
25a18: e2842018 add r2, r4, #24 <== NOT EXECUTED
25a1c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
25a20: ebffffa8 bl 258c8 <scangr> <== NOT EXECUTED
25a24: e3500000 cmp r0, #0 <== NOT EXECUTED
25a28: 12840008 addne r0, r4, #8 <== NOT EXECUTED
25a2c: 18bd8010 popne {r4, pc} <== NOT EXECUTED
25a30: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &grent;
}
25a34: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00025dac <getgrgid>:
struct group *getgrgid(
gid_t gid
)
{
25dac: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
25db0: e59f1028 ldr r1, [pc, #40] ; 25de0 <getgrgid+0x34> <== NOT EXECUTED
}
struct group *getgrgid(
gid_t gid
)
{
25db4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p;
if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
25db8: e28dc004 add ip, sp, #4 <== NOT EXECUTED
25dbc: e2812010 add r2, r1, #16 <== NOT EXECUTED
25dc0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
25dc4: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
25dc8: e58dc000 str ip, [sp] <== NOT EXECUTED
25dcc: ebffffe9 bl 25d78 <getgrgid_r> <== NOT EXECUTED
25dd0: e3500000 cmp r0, #0 <== NOT EXECUTED
25dd4: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
25dd8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
25ddc: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00025d78 <getgrgid_r>:
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
25d78: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
25d7c: e1a0c002 mov ip, r2 <== NOT EXECUTED
25d80: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
25d84: e58d3000 str r3, [sp] <== NOT EXECUTED
struct group *grp,
char *buffer,
size_t bufsize,
struct group **result
)
{
25d88: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
25d8c: e1a0300c mov r3, ip <== NOT EXECUTED
25d90: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
25d94: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
25d98: e1a0200e mov r2, lr <== NOT EXECUTED
25d9c: e3a00000 mov r0, #0 <== NOT EXECUTED
25da0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
25da4: ebffffbf bl 25ca8 <getgr_r> <== NOT EXECUTED
}
25da8: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00025e78 <getpw_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
25e78: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
25e7c: e59da01c ldr sl, [sp, #28]
25e80: e1a06000 mov r6, r0
25e84: e1a07001 mov r7, r1
25e88: e1a04002 mov r4, r2
25e8c: e1a08003 mov r8, r3
FILE *fp;
int match;
init_etc_passwd_group();
25e90: ebffff43 bl 25ba4 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
25e94: e59f00a4 ldr r0, [pc, #164] ; 25f40 <getpw_r+0xc8>
25e98: e59f10a4 ldr r1, [pc, #164] ; 25f44 <getpw_r+0xcc>
25e9c: eb0063b9 bl 3ed88 <fopen>
25ea0: e2505000 subs r5, r0, #0
25ea4: 1a000003 bne 25eb8 <getpw_r+0x40>
errno = EINVAL;
25ea8: eb006146 bl 3e3c8 <__errno> <== NOT EXECUTED
25eac: e3a03016 mov r3, #22 <== NOT EXECUTED
25eb0: e5803000 str r3, [r0] <== NOT EXECUTED
25eb4: ea00000c b 25eec <getpw_r+0x74> <== NOT EXECUTED
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
25eb8: e1a01004 mov r1, r4
25ebc: e1a02008 mov r2, r8
25ec0: e1a0300a mov r3, sl
25ec4: e1a00005 mov r0, r5
25ec8: ebfffedb bl 25a3c <scanpw>
25ecc: e3500000 cmp r0, #0
errno = EINVAL;
fclose(fp);
return -1;
}
if (name) {
match = (strcmp(pwd->pw_name, name) == 0);
25ed0: e1a01006 mov r1, r6
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
errno = EINVAL;
return -1;
}
for(;;) {
if (!scanpw(fp, pwd, buffer, bufsize)) {
25ed4: 1a000006 bne 25ef4 <getpw_r+0x7c>
errno = EINVAL;
25ed8: eb00613a bl 3e3c8 <__errno> <== NOT EXECUTED
25edc: e3a03016 mov r3, #22 <== NOT EXECUTED
25ee0: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
25ee4: e1a00005 mov r0, r5 <== NOT EXECUTED
25ee8: eb006183 bl 3e4fc <fclose> <== NOT EXECUTED
25eec: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
25ef0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
}
if (name) {
25ef4: e3560000 cmp r6, #0
25ef8: 0a000004 beq 25f10 <getpw_r+0x98>
match = (strcmp(pwd->pw_name, name) == 0);
25efc: e5940000 ldr r0, [r4]
25f00: eb0079d6 bl 44660 <strcmp>
25f04: e2700001 rsbs r0, r0, #1
25f08: 33a00000 movcc r0, #0
25f0c: ea000003 b 25f20 <getpw_r+0xa8>
}
else {
match = (pwd->pw_uid == uid);
25f10: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED
25f14: e1500007 cmp r0, r7 <== NOT EXECUTED
25f18: 13a00000 movne r0, #0 <== NOT EXECUTED
25f1c: 03a00001 moveq r0, #1 <== NOT EXECUTED
}
if (match) {
25f20: e3500000 cmp r0, #0
25f24: 0affffe3 beq 25eb8 <getpw_r+0x40>
fclose(fp);
25f28: e1a00005 mov r0, r5
25f2c: eb006172 bl 3e4fc <fclose>
*result = pwd;
25f30: e59d3020 ldr r3, [sp, #32]
25f34: e3a00000 mov r0, #0
25f38: e5834000 str r4, [r3]
}
}
fclose(fp);
errno = EINVAL;
return -1;
}
25f3c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00025b68 <getpwent>:
return NULL;
return p;
}
struct passwd *getpwent(void)
{
25b68: e92d4010 push {r4, lr} <== NOT EXECUTED
if (passwd_fp == NULL)
25b6c: e59f402c ldr r4, [pc, #44] ; 25ba0 <getpwent+0x38> <== NOT EXECUTED
25b70: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
25b74: e3500000 cmp r0, #0 <== NOT EXECUTED
25b78: 0a000006 beq 25b98 <getpwent+0x30> <== NOT EXECUTED
return NULL;
if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
25b7c: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED
25b80: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED
25b84: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
25b88: ebffffab bl 25a3c <scanpw> <== NOT EXECUTED
25b8c: e3500000 cmp r0, #0 <== NOT EXECUTED
25b90: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED
25b94: 18bd8010 popne {r4, pc} <== NOT EXECUTED
25b98: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
return &pwent;
}
25b9c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00025f7c <getpwuid>:
struct passwd *getpwuid(
uid_t uid
)
{
25f7c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
25f80: e59f1028 ldr r1, [pc, #40] ; 25fb0 <getpwuid+0x34> <== NOT EXECUTED
}
struct passwd *getpwuid(
uid_t uid
)
{
25f84: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p;
if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
25f88: e28dc004 add ip, sp, #4 <== NOT EXECUTED
25f8c: e281201c add r2, r1, #28 <== NOT EXECUTED
25f90: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED
25f94: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
25f98: e58dc000 str ip, [sp] <== NOT EXECUTED
25f9c: ebffffe9 bl 25f48 <getpwuid_r> <== NOT EXECUTED
25fa0: e3500000 cmp r0, #0 <== NOT EXECUTED
25fa4: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL;
return p;
25fa8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
25fac: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00025f48 <getpwuid_r>:
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
25f48: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
25f4c: e1a0c002 mov ip, r2 <== NOT EXECUTED
25f50: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
25f54: e58d3000 str r3, [sp] <== NOT EXECUTED
struct passwd *pwd,
char *buffer,
size_t bufsize,
struct passwd **result
)
{
25f58: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
25f5c: e1a0300c mov r3, ip <== NOT EXECUTED
25f60: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
25f64: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
25f68: e1a0200e mov r2, lr <== NOT EXECUTED
25f6c: e3a00000 mov r0, #0 <== NOT EXECUTED
25f70: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
25f74: ebffffbf bl 25e78 <getpw_r> <== NOT EXECUTED
}
25f78: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00001f74 <gettimeofday>:
*/
int gettimeofday(
struct timeval *tp,
void * __tz __attribute__((unused))
)
{
1f74: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */
if ( !tp ) {
1f78: e2504000 subs r4, r0, #0
1f7c: 1a000004 bne 1f94 <gettimeofday+0x20>
errno = EFAULT;
1f80: eb0031d7 bl e6e4 <__errno> <== NOT EXECUTED
1f84: e3a0300e mov r3, #14 <== NOT EXECUTED
1f88: e5803000 str r3, [r0] <== NOT EXECUTED
1f8c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
1f90: ea00000c b 1fc8 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
1f94: e10f5000 mrs r5, CPSR
1f98: e3853080 orr r3, r5, #128 ; 0x80
1f9c: e129f003 msr CPSR_fc, r3
ISR_Level level;
struct timespec now;
suseconds_t useconds;
_ISR_Disable(level);
_TOD_Get( &now );
1fa0: e1a0000d mov r0, sp
1fa4: eb000fc1 bl 5eb0 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
1fa8: e129f005 msr CPSR_fc, r5
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
1fac: e59d3000 ldr r3, [sp]
_ISR_Disable(level);
_TOD_Get( &now );
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
1fb0: e59d0004 ldr r0, [sp, #4]
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
time->tv_usec = useconds;
1fb4: e3a01ffa mov r1, #1000 ; 0x3e8
_ISR_Enable(level);
useconds = (suseconds_t)now.tv_nsec;
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND;
time->tv_sec = now.tv_sec;
1fb8: e5843000 str r3, [r4]
time->tv_usec = useconds;
1fbc: eb005796 bl 17e1c <__aeabi_idiv>
1fc0: e5840004 str r0, [r4, #4]
1fc4: 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;
}
1fc8: e8bd803c pop {r2, r3, r4, r5, pc}
000077c0 <getuid>:
* 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs,
* P1003.1b-1993, p. 84
*/
uid_t getuid( void )
{
77c0: e59f3008 ldr r3, [pc, #8] ; 77d0 <getuid+0x10> <== NOT EXECUTED
77c4: e5933000 ldr r3, [r3] <== NOT EXECUTED
return _POSIX_types_Uid;
}
77c8: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED
77cc: e12fff1e bx lr <== NOT EXECUTED
000052d0 <ioctl>:
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
52d0: e92d000e push {r1, r2, r3}
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
52d4: e59f3080 ldr r3, [pc, #128] ; 535c <ioctl+0x8c>
52d8: e5933000 ldr r3, [r3]
52dc: e1500003 cmp r0, r3
int ioctl(
int fd,
ioctl_command_t command,
...
)
{
52e0: e92d4001 push {r0, lr}
va_list ap;
rtems_status_code rc;
rtems_libio_t *iop;
void *buffer;
rtems_libio_check_fd( fd );
52e4: 2a00000b bcs 5318 <ioctl+0x48>
iop = rtems_libio_iop( fd );
52e8: e59f3070 ldr r3, [pc, #112] ; 5360 <ioctl+0x90>
52ec: e5933000 ldr r3, [r3]
52f0: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
52f4: e5903014 ldr r3, [r0, #20]
52f8: e3130c01 tst r3, #256 ; 0x100
52fc: 0a000005 beq 5318 <ioctl+0x48>
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
5300: 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 *);
5304: e28d2010 add r2, sp, #16
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
5308: e3530000 cmp r3, #0
iop = rtems_libio_iop( fd );
rtems_libio_check_is_open(iop);
va_start(ap, command);
buffer = va_arg(ap, void *);
530c: e58d2000 str r2, [sp]
5310: e59d200c ldr r2, [sp, #12]
/*
* Now process the ioctl().
*/
if ( !iop->handlers )
5314: 1a000002 bne 5324 <ioctl+0x54>
rtems_set_errno_and_return_minus_one( EBADF );
5318: eb0034be bl 12618 <__errno>
531c: e3a03009 mov r3, #9
5320: ea000004 b 5338 <ioctl+0x68>
if ( !iop->handlers->ioctl_h )
5324: e5933010 ldr r3, [r3, #16]
5328: e3530000 cmp r3, #0
532c: 1a000004 bne 5344 <ioctl+0x74>
rtems_set_errno_and_return_minus_one( ENOTSUP );
5330: eb0034b8 bl 12618 <__errno> <== NOT EXECUTED
5334: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5338: e5803000 str r3, [r0]
533c: e3e00000 mvn r0, #0
5340: ea000002 b 5350 <ioctl+0x80>
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
5344: e59d1008 ldr r1, [sp, #8]
5348: e1a0e00f mov lr, pc
534c: e12fff13 bx r3
return rc;
}
5350: e8bd4008 pop {r3, lr}
5354: e28dd00c add sp, sp, #12
5358: e12fff1e bx lr
000037ec <iproc>:
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
if (tty->termios.c_iflag & ISTRIP)
37ec: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED
37f0: e3130020 tst r3, #32 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
37f4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
37f8: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
37fc: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
3800: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/*
* Process a single input character
*/
static int
iproc (unsigned char c, struct rtems_termios_tty *tty)
{
3804: e1a04001 mov r4, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP)
c &= 0x7f;
if (tty->termios.c_iflag & IUCLC)
3808: 0a000007 beq 382c <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
380c: e59f2164 ldr r2, [pc, #356] ; 3978 <iproc+0x18c> <== NOT EXECUTED
3810: e5922000 ldr r2, [r2] <== NOT EXECUTED
3814: e0822005 add r2, r2, r5 <== NOT EXECUTED
3818: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
381c: e2022003 and r2, r2, #3 <== NOT EXECUTED
3820: e3520001 cmp r2, #1 <== NOT EXECUTED
3824: 02855020 addeq r5, r5, #32 <== NOT EXECUTED
3828: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
382c: e355000d cmp r5, #13 <== NOT EXECUTED
3830: 1a000005 bne 384c <iproc+0x60> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
3834: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED
3838: 1a00004c bne 3970 <iproc+0x184> <== NOT EXECUTED
return 0;
if (tty->termios.c_iflag & ICRNL)
383c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
3840: 03a0500d moveq r5, #13 <== NOT EXECUTED
3844: 13a0500a movne r5, #10 <== NOT EXECUTED
3848: ea000007 b 386c <iproc+0x80> <== NOT EXECUTED
c = '\n';
}
else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
384c: e355000a cmp r5, #10 <== NOT EXECUTED
3850: 1a000003 bne 3864 <iproc+0x78> <== NOT EXECUTED
3854: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
3858: 03a0500a moveq r5, #10 <== NOT EXECUTED
385c: 13a0500d movne r5, #13 <== NOT EXECUTED
3860: ea000001 b 386c <iproc+0x80> <== NOT EXECUTED
c = '\r';
}
if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
3864: e3550000 cmp r5, #0 <== NOT EXECUTED
3868: 0a00002e beq 3928 <iproc+0x13c> <== NOT EXECUTED
386c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3870: e3130002 tst r3, #2 <== NOT EXECUTED
3874: 0a00002b beq 3928 <iproc+0x13c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
3878: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED
387c: e1520005 cmp r2, r5 <== NOT EXECUTED
erase (tty, 0);
3880: 01a00004 moveq r0, r4 <== NOT EXECUTED
3884: 03a01000 moveq r1, #0 <== 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]) {
3888: 0a000004 beq 38a0 <iproc+0xb4> <== NOT EXECUTED
erase (tty, 0);
return 0;
}
else if (c == tty->termios.c_cc[VKILL]) {
388c: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED
3890: e1520005 cmp r2, r5 <== NOT EXECUTED
3894: 1a000003 bne 38a8 <iproc+0xbc> <== NOT EXECUTED
erase (tty, 1);
3898: e1a00004 mov r0, r4 <== NOT EXECUTED
389c: e3a01001 mov r1, #1 <== NOT EXECUTED
38a0: ebffff5e bl 3620 <erase> <== NOT EXECUTED
38a4: ea00002f b 3968 <iproc+0x17c> <== NOT EXECUTED
return 0;
}
else if (c == tty->termios.c_cc[VEOF]) {
38a8: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED
38ac: e1520005 cmp r2, r5 <== NOT EXECUTED
38b0: 0a00001a beq 3920 <iproc+0x134> <== NOT EXECUTED
return 1;
}
else if (c == '\n') {
38b4: e355000a cmp r5, #10 <== NOT EXECUTED
38b8: 1a000009 bne 38e4 <iproc+0xf8> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
38bc: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
38c0: 11a00005 movne r0, r5 <== NOT EXECUTED
38c4: 11a01004 movne r1, r4 <== NOT EXECUTED
38c8: 1bffff34 blne 35a0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
38cc: e284101c add r1, r4, #28 <== NOT EXECUTED
38d0: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
38d4: e3a0000a mov r0, #10 <== NOT EXECUTED
38d8: e2832001 add r2, r3, #1 <== NOT EXECUTED
38dc: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED
38e0: ea00000d b 391c <iproc+0x130> <== NOT EXECUTED
return 1;
}
else if ((c == tty->termios.c_cc[VEOL])
38e4: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED
38e8: e1520005 cmp r2, r5 <== NOT EXECUTED
38ec: 0a000002 beq 38fc <iproc+0x110> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
38f0: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED
38f4: e1520005 cmp r2, r5 <== NOT EXECUTED
38f8: 1a00000a bne 3928 <iproc+0x13c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
38fc: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
3900: 11a00005 movne r0, r5 <== NOT EXECUTED
3904: 11a01004 movne r1, r4 <== NOT EXECUTED
3908: 1bffff24 blne 35a0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
390c: e284101c add r1, r4, #28 <== NOT EXECUTED
3910: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
3914: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED
3918: e2832001 add r2, r3, #1 <== NOT EXECUTED
391c: e5842020 str r2, [r4, #32] <== NOT EXECUTED
3920: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
3924: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
}
/*
* FIXME: Should do IMAXBEL handling somehow
*/
if (tty->ccount < (CBUFSIZE-1)) {
3928: e59f304c ldr r3, [pc, #76] ; 397c <iproc+0x190> <== NOT EXECUTED
392c: e5933000 ldr r3, [r3] <== NOT EXECUTED
3930: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3934: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3938: e1520003 cmp r2, r3 <== NOT EXECUTED
393c: aa00000b bge 3970 <iproc+0x184> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
3940: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3944: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
3948: 11a00005 movne r0, r5 <== NOT EXECUTED
394c: 11a01004 movne r1, r4 <== NOT EXECUTED
3950: 1bffff12 blne 35a0 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3954: e284101c add r1, r4, #28 <== NOT EXECUTED
3958: e891000a ldm r1, {r1, r3} <== NOT EXECUTED
395c: e2832001 add r2, r3, #1 <== NOT EXECUTED
3960: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED
3964: e5842020 str r2, [r4, #32] <== NOT EXECUTED
3968: e3a00000 mov r0, #0 <== NOT EXECUTED
396c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
3970: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return 0;
}
3974: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000d9b8 <killinfo>:
int killinfo(
pid_t pid,
int sig,
const union sigval *value
)
{
d9b8: e92d47f7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, lr}
d9bc: e1a05000 mov r5, r0
d9c0: e1a04001 mov r4, r1
d9c4: e1a06002 mov r6, r2
POSIX_signals_Siginfo_node *psiginfo;
/*
* Only supported for the "calling process" (i.e. this node).
*/
if ( pid != getpid() )
d9c8: ebfff279 bl a3b4 <getpid>
d9cc: e1550000 cmp r5, r0
d9d0: 0a000002 beq d9e0 <killinfo+0x28>
rtems_set_errno_and_return_minus_one( ESRCH );
d9d4: eb000342 bl e6e4 <__errno> <== NOT EXECUTED
d9d8: e3a03003 mov r3, #3 <== NOT EXECUTED
d9dc: ea000003 b d9f0 <killinfo+0x38> <== NOT EXECUTED
/*
* Validate the signal passed.
*/
if ( !sig )
d9e0: e3540000 cmp r4, #0
d9e4: 1a000004 bne d9fc <killinfo+0x44>
rtems_set_errno_and_return_minus_one( EINVAL );
d9e8: eb00033d bl e6e4 <__errno> <== NOT EXECUTED
d9ec: e3a03016 mov r3, #22 <== NOT EXECUTED
d9f0: e5803000 str r3, [r0]
d9f4: e3e00000 mvn r0, #0
d9f8: ea000081 b dc04 <killinfo+0x24c>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
d9fc: e2443001 sub r3, r4, #1
if ( !is_valid_signo(sig) )
da00: e353001f cmp r3, #31
da04: 8afffff7 bhi d9e8 <killinfo+0x30>
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 )
da08: e59f11f8 ldr r1, [pc, #504] ; dc08 <killinfo+0x250>
da0c: e3a0000c mov r0, #12
da10: e0221490 mla r2, r0, r4, r1
da14: e5922008 ldr r2, [r2, #8]
da18: e3520001 cmp r2, #1
da1c: 0a000077 beq dc00 <killinfo+0x248>
/*
* 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 ) )
da20: e3540008 cmp r4, #8
da24: 13540004 cmpne r4, #4
da28: 0a000001 beq da34 <killinfo+0x7c>
da2c: e354000b cmp r4, #11
da30: 1a000003 bne da44 <killinfo+0x8c>
return pthread_kill( pthread_self(), sig );
da34: eb0001bf bl e138 <pthread_self>
da38: e1a01004 mov r1, r4
da3c: eb000187 bl e060 <pthread_kill>
da40: ea00006f b dc04 <killinfo+0x24c>
static inline sigset_t signo_to_mask(
uint32_t sig
)
{
return 1u << (sig - 1);
da44: e3a05001 mov r5, #1
/*
* Build up a siginfo structure
*/
siginfo = &siginfo_struct;
siginfo->si_signo = sig;
siginfo->si_code = SI_USER;
da48: e88d0030 stm sp, {r4, r5}
if ( !value ) {
da4c: e3560000 cmp r6, #0
da50: e1a05315 lsl r5, r5, r3
siginfo->si_value.sival_int = 0;
} else {
siginfo->si_value = *value;
da54: 15963000 ldrne r3, [r6]
da58: 158d3008 strne r3, [sp, #8]
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
da5c: e59f31a8 ldr r3, [pc, #424] ; dc0c <killinfo+0x254>
da60: e5932000 ldr r2, [r3]
da64: 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;
da68: 058d6008 streq r6, [sp, #8]
da6c: 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;
da70: e59f3198 ldr r3, [pc, #408] ; dc10 <killinfo+0x258>
da74: e5930000 ldr r0, [r3]
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
da78: e5903108 ldr r3, [r0, #264] ; 0x108
da7c: e59330cc ldr r3, [r3, #204] ; 0xcc
da80: e1d53003 bics r3, r5, 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 ;
da84: 059f2188 ldreq r2, [pc, #392] ; dc14 <killinfo+0x25c>
da88: 04923004 ldreq r3, [r2], #4
* 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;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
da8c: 0a000009 beq dab8 <killinfo+0x100>
da90: ea00003a b db80 <killinfo+0x1c8>
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
da94: e5931030 ldr r1, [r3, #48] ; 0x30
da98: e1150001 tst r5, r1
for ( the_node = the_chain->first ;
!_Chain_Is_tail( the_chain, the_node ) ;
the_node = the_node->next ) {
the_thread = (Thread_Control *)the_node;
da9c: e1a00003 mov r0, r3
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
daa0: e5931108 ldr r1, [r3, #264] ; 0x108
#endif
/*
* Is this thread is actually blocked waiting for the signal?
*/
if (the_thread->Wait.option & mask)
daa4: 1a000035 bne db80 <killinfo+0x1c8>
/*
* Is this thread is blocked waiting for another signal but has
* not blocked this one?
*/
if (~api->signals_blocked & mask)
daa8: e59110cc ldr r1, [r1, #204] ; 0xcc
daac: e1d51001 bics r1, r5, r1
dab0: 1a000032 bne db80 <killinfo+0x1c8>
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 ) {
dab4: e5933000 ldr r3, [r3]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
dab8: e1530002 cmp r3, r2
dabc: 1afffff4 bne da94 <killinfo+0xdc>
* NOTES:
*
* + rtems internal threads do not receive signals.
*/
interested = NULL;
interested_priority = PRIORITY_MAXIMUM + 1;
dac0: e59f3150 ldr r3, [pc, #336] ; dc18 <killinfo+0x260>
dac4: e5d31000 ldrb r1, [r3]
dac8: e59f314c ldr r3, [pc, #332] ; dc1c <killinfo+0x264>
dacc: e2811001 add r1, r1, #1
*/
#define _POSIX_signals_Is_interested( _api, _mask ) \
( ~(_api)->signals_blocked & (_mask) )
int killinfo(
dad0: e283800c add r8, r3, #12
dad4: e3a00000 mov r0, #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 ] )
dad8: e5932008 ldr r2, [r3, #8]
dadc: e3520000 cmp r2, #0
dae0: 0a000021 beq db6c <killinfo+0x1b4>
continue;
the_info = _Objects_Information_table[ the_api ][ 1 ];
dae4: e5922004 ldr r2, [r2, #4]
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
dae8: e3a0c001 mov ip, #1
daec: e592901c ldr r9, [r2, #28]
*/
if ( !the_info )
continue;
#endif
maximum = the_info->maximum;
daf0: e1d2a1b0 ldrh sl, [r2, #16]
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
daf4: ea00001a b db64 <killinfo+0x1ac>
the_thread = (Thread_Control *) object_table[ index ];
daf8: e799210c ldr r2, [r9, ip, lsl #2]
if ( !the_thread )
dafc: e3520000 cmp r2, #0
db00: 0a000012 beq db50 <killinfo+0x198>
/*
* If this thread is of lower priority than the interested thread,
* go on to the next thread.
*/
if ( the_thread->current_priority > interested_priority )
db04: e592e014 ldr lr, [r2, #20]
db08: e15e0001 cmp lr, r1
db0c: 8a00000f bhi db50 <killinfo+0x198>
DEBUG_STEP("2");
/*
* If this thread is not interested, then go on to the next thread.
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
db10: e5926108 ldr r6, [r2, #264] ; 0x108
db14: e59660cc ldr r6, [r6, #204] ; 0xcc
db18: e1d56006 bics r6, r5, r6
db1c: 0a00000b beq db50 <killinfo+0x198>
*
* 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 ) {
db20: e15e0001 cmp lr, r1
db24: 3a00000b bcc db58 <killinfo+0x1a0>
* and blocking interruptibutable by signal.
*
* If the interested thread is ready, don't think about changing.
*/
if ( !_States_Is_ready( interested->current_state ) ) {
db28: e5907010 ldr r7, [r0, #16]
db2c: e3570000 cmp r7, #0
db30: 0a000006 beq db50 <killinfo+0x198>
/* preferred ready over blocked */
DEBUG_STEP("5");
if ( _States_Is_ready( the_thread->current_state ) ) {
db34: e5926010 ldr r6, [r2, #16]
db38: e3560000 cmp r6, #0
db3c: 0a000005 beq db58 <killinfo+0x1a0>
continue;
}
DEBUG_STEP("6");
/* prefer blocked/interruptible over blocked/not interruptible */
if ( !_States_Is_interruptible_by_signal(interested->current_state) ) {
db40: e3170201 tst r7, #268435456 ; 0x10000000
db44: 1a000001 bne db50 <killinfo+0x198>
DEBUG_STEP("7");
if ( _States_Is_interruptible_by_signal(the_thread->current_state) ) {
db48: e3160201 tst r6, #268435456 ; 0x10000000
db4c: 1a000001 bne db58 <killinfo+0x1a0>
db50: e1a0e001 mov lr, r1
db54: ea000000 b db5c <killinfo+0x1a4>
db58: e1a00002 mov r0, r2
#endif
maximum = the_info->maximum;
object_table = the_info->local_table;
for ( index = 1 ; index <= maximum ; index++ ) {
db5c: e28cc001 add ip, ip, #1
db60: e1a0100e mov r1, lr
db64: e15c000a cmp ip, sl
db68: 9affffe2 bls daf8 <killinfo+0x140>
db6c: e2833004 add r3, r3, #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++) {
db70: e1530008 cmp r3, r8
db74: 1affffd7 bne dad8 <killinfo+0x120>
}
}
}
}
if ( interested ) {
db78: e3500000 cmp r0, #0
db7c: 0a000006 beq db9c <killinfo+0x1e4>
* 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;
db80: e3a03001 mov r3, #1
db84: 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 ) ) {
db88: e1a01004 mov r1, r4
db8c: e1a0200d mov r2, sp
db90: eb0000a7 bl de34 <_POSIX_signals_Unblock_thread>
db94: e3500000 cmp r0, #0
db98: 1a000017 bne dbfc <killinfo+0x244>
/*
* 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 );
db9c: e1a00005 mov r0, r5
dba0: eb000092 bl ddf0 <_POSIX_signals_Set_process_signals>
if ( _POSIX_signals_Vectors[ sig ].sa_flags == SA_SIGINFO ) {
dba4: e3a0300c mov r3, #12
dba8: e0050493 mul r5, r3, r4
dbac: e59f3054 ldr r3, [pc, #84] ; dc08 <killinfo+0x250>
dbb0: e7933005 ldr r3, [r3, r5]
dbb4: e3530002 cmp r3, #2
dbb8: 1a00000f bne dbfc <killinfo+0x244>
psiginfo = (POSIX_signals_Siginfo_node *)
dbbc: e59f005c ldr r0, [pc, #92] ; dc20 <killinfo+0x268>
dbc0: ebffdfc7 bl 5ae4 <_Chain_Get>
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
if ( !psiginfo ) {
dbc4: e250c000 subs ip, r0, #0
dbc8: 1a000003 bne dbdc <killinfo+0x224>
_Thread_Enable_dispatch();
dbcc: ebffe556 bl 712c <_Thread_Enable_dispatch>
rtems_set_errno_and_return_minus_one( EAGAIN );
dbd0: eb0002c3 bl e6e4 <__errno>
dbd4: e3a0300b mov r3, #11
dbd8: eaffff84 b d9f0 <killinfo+0x38>
}
psiginfo->Info = *siginfo;
dbdc: e1a0300d mov r3, sp
dbe0: e8930007 ldm r3, {r0, r1, r2}
dbe4: e28c3008 add r3, ip, #8
dbe8: e8830007 stm r3, {r0, r1, r2}
_Chain_Append( &_POSIX_signals_Siginfo[ sig ], &psiginfo->Node );
dbec: e59f0030 ldr r0, [pc, #48] ; dc24 <killinfo+0x26c>
dbf0: e1a0100c mov r1, ip
dbf4: e0800005 add r0, r0, r5
dbf8: ebffdfa5 bl 5a94 <_Chain_Append>
}
DEBUG_STEP("\n");
_Thread_Enable_dispatch();
dbfc: ebffe54a bl 712c <_Thread_Enable_dispatch>
dc00: e3a00000 mov r0, #0
return 0;
}
dc04: e8bd87fe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}
0002600c <link>:
int link(
const char *existing,
const char *new
)
{
2600c: e92d4070 push {r4, r5, r6, lr}
26010: e24dd034 sub sp, sp, #52 ; 0x34
26014: e1a05001 mov r5, r1
26018: e1a06000 mov r6, r0
/*
* Get the node we are linking to.
*/
result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
2601c: eb007bf7 bl 45000 <strlen>
26020: e28d4018 add r4, sp, #24
26024: e1a01000 mov r1, r0
26028: e3a0c001 mov ip, #1
2602c: e1a00006 mov r0, r6
26030: e3a02000 mov r2, #0
26034: e1a03004 mov r3, r4
26038: e58dc000 str ip, [sp]
2603c: ebff857e bl 763c <rtems_filesystem_evaluate_path>
0, &existing_loc, true );
if ( result != 0 )
26040: e3500000 cmp r0, #0
26044: 1a000014 bne 2609c <link+0x90>
/*
* Get the parent of the node we are creating.
*/
rtems_filesystem_get_start_loc( new, &i, &parent_loc );
26048: e28d6004 add r6, sp, #4
2604c: e1a00005 mov r0, r5
26050: e28d1030 add r1, sp, #48 ; 0x30
26054: e1a02006 mov r2, r6
26058: ebff8bb0 bl 8f20 <rtems_filesystem_get_start_loc>
if ( !parent_loc.ops->evalformake_h ) {
2605c: e59d3010 ldr r3, [sp, #16]
26060: e5933004 ldr r3, [r3, #4]
26064: e3530000 cmp r3, #0
26068: 1a00000d bne 260a4 <link+0x98>
rtems_filesystem_freenode( &existing_loc );
2606c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
26070: e3530000 cmp r3, #0 <== NOT EXECUTED
26074: 0a000005 beq 26090 <link+0x84> <== NOT EXECUTED
26078: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2607c: e3530000 cmp r3, #0 <== NOT EXECUTED
26080: 0a000002 beq 26090 <link+0x84> <== NOT EXECUTED
26084: e1a00004 mov r0, r4 <== NOT EXECUTED
26088: e1a0e00f mov lr, pc <== NOT EXECUTED
2608c: e12fff13 bx r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26090: eb0060cc bl 3e3c8 <__errno> <== NOT EXECUTED
26094: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
26098: e5803000 str r3, [r0]
2609c: e3e05000 mvn r5, #0
260a0: ea000053 b 261f4 <link+0x1e8>
}
result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
260a4: e59d0030 ldr r0, [sp, #48] ; 0x30
260a8: e1a01006 mov r1, r6
260ac: e0850000 add r0, r5, r0
260b0: e28d202c add r2, sp, #44 ; 0x2c
260b4: e1a0e00f mov lr, pc
260b8: e12fff13 bx r3
if ( result != 0 ) {
260bc: e2505000 subs r5, r0, #0
260c0: 0a00000a beq 260f0 <link+0xe4>
rtems_filesystem_freenode( &existing_loc );
260c4: e59d3024 ldr r3, [sp, #36] ; 0x24
260c8: e3530000 cmp r3, #0
260cc: 0a000004 beq 260e4 <link+0xd8>
260d0: e593301c ldr r3, [r3, #28]
260d4: e3530000 cmp r3, #0
260d8: 11a00004 movne r0, r4
260dc: 11a0e00f movne lr, pc
260e0: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
260e4: eb0060b7 bl 3e3c8 <__errno>
260e8: e5805000 str r5, [r0]
260ec: eaffffea b 2609c <link+0x90>
/*
* Check to see if the caller is trying to link across file system
* boundaries.
*/
if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
260f0: e59d3028 ldr r3, [sp, #40] ; 0x28
260f4: e59d2014 ldr r2, [sp, #20]
260f8: e1520003 cmp r2, r3
260fc: 0a000012 beq 2614c <link+0x140>
rtems_filesystem_freenode( &existing_loc );
26100: e59d3024 ldr r3, [sp, #36] ; 0x24
26104: e3530000 cmp r3, #0
26108: 0a000004 beq 26120 <link+0x114>
2610c: e593301c ldr r3, [r3, #28]
26110: e3530000 cmp r3, #0
26114: 11a00004 movne r0, r4
26118: 11a0e00f movne lr, pc
2611c: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
26120: e59d3010 ldr r3, [sp, #16]
26124: e3530000 cmp r3, #0
26128: 0a000004 beq 26140 <link+0x134>
2612c: e593301c ldr r3, [r3, #28]
26130: e3530000 cmp r3, #0
26134: 128d0004 addne r0, sp, #4
26138: 11a0e00f movne lr, pc
2613c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
26140: eb0060a0 bl 3e3c8 <__errno>
26144: e3a03012 mov r3, #18
26148: eaffffd2 b 26098 <link+0x8c>
}
if ( !parent_loc.ops->link_h ) {
2614c: e59d3010 ldr r3, [sp, #16]
26150: e5933008 ldr r3, [r3, #8]
26154: e3530000 cmp r3, #0
26158: 1a00000f bne 2619c <link+0x190>
rtems_filesystem_freenode( &existing_loc );
2615c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
26160: e3530000 cmp r3, #0 <== NOT EXECUTED
26164: 0a000004 beq 2617c <link+0x170> <== NOT EXECUTED
26168: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2616c: e3530000 cmp r3, #0 <== NOT EXECUTED
26170: 11a00004 movne r0, r4 <== NOT EXECUTED
26174: 11a0e00f movne lr, pc <== NOT EXECUTED
26178: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
2617c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
26180: e3530000 cmp r3, #0 <== NOT EXECUTED
26184: 0affffc1 beq 26090 <link+0x84> <== NOT EXECUTED
26188: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
2618c: e3530000 cmp r3, #0 <== NOT EXECUTED
26190: 128d0004 addne r0, sp, #4 <== NOT EXECUTED
26194: 1affffbb bne 26088 <link+0x7c> <== NOT EXECUTED
26198: eaffffbc b 26090 <link+0x84> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
2619c: e1a01006 mov r1, r6
261a0: e1a00004 mov r0, r4
261a4: e59d202c ldr r2, [sp, #44] ; 0x2c
261a8: e1a0e00f mov lr, pc
261ac: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
261b0: e59d3024 ldr r3, [sp, #36] ; 0x24
261b4: 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 );
261b8: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc );
261bc: 0a000004 beq 261d4 <link+0x1c8>
261c0: e593301c ldr r3, [r3, #28]
261c4: e3530000 cmp r3, #0
261c8: 11a00004 movne r0, r4
261cc: 11a0e00f movne lr, pc
261d0: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
261d4: e59d3010 ldr r3, [sp, #16]
261d8: e3530000 cmp r3, #0
261dc: 0a000004 beq 261f4 <link+0x1e8>
261e0: e593301c ldr r3, [r3, #28]
261e4: e3530000 cmp r3, #0
261e8: 128d0004 addne r0, sp, #4
261ec: 11a0e00f movne lr, pc
261f0: 112fff13 bxne r3
return result;
}
261f4: e1a00005 mov r0, r5
261f8: e28dd034 add sp, sp, #52 ; 0x34
261fc: e8bd8070 pop {r4, r5, r6, pc}
0001a0b8 <lseek>:
{
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
1a0b8: e59fc0ec ldr ip, [pc, #236] ; 1a1ac <lseek+0xf4>
1a0bc: e59cc000 ldr ip, [ip]
1a0c0: e150000c cmp r0, ip
off_t lseek(
int fd,
off_t offset,
int whence
)
{
1a0c4: e92d4870 push {r4, r5, r6, fp, lr}
rtems_libio_t *iop;
off_t old_offset;
off_t status;
rtems_libio_check_fd( fd );
1a0c8: 2a000005 bcs 1a0e4 <lseek+0x2c>
iop = rtems_libio_iop( fd );
1a0cc: e59fc0dc ldr ip, [pc, #220] ; 1a1b0 <lseek+0xf8>
1a0d0: e59c4000 ldr r4, [ip]
1a0d4: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
1a0d8: e5940014 ldr r0, [r4, #20]
1a0dc: e3100c01 tst r0, #256 ; 0x100
1a0e0: 1a000002 bne 1a0f0 <lseek+0x38>
1a0e4: ebffd17e bl e6e4 <__errno> <== NOT EXECUTED
1a0e8: e3a03009 mov r3, #9 <== NOT EXECUTED
1a0ec: ea00001c b 1a164 <lseek+0xac> <== NOT EXECUTED
/*
* Check as many errors as possible before touching iop->offset.
*/
if ( !iop->handlers->lseek_h )
1a0f0: e594003c ldr r0, [r4, #60] ; 0x3c
1a0f4: e5900014 ldr r0, [r0, #20]
1a0f8: e3500000 cmp r0, #0
1a0fc: 1a000002 bne 1a10c <lseek+0x54>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a100: ebffd177 bl e6e4 <__errno> <== NOT EXECUTED
1a104: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a108: ea000015 b 1a164 <lseek+0xac> <== NOT EXECUTED
/*
* Now process the lseek().
*/
old_offset = iop->offset;
switch ( whence ) {
1a10c: e3530001 cmp r3, #1
/*
* Now process the lseek().
*/
old_offset = iop->offset;
1a110: e284600c add r6, r4, #12
1a114: e8960060 ldm r6, {r5, r6}
switch ( whence ) {
1a118: 0a000006 beq 1a138 <lseek+0x80>
1a11c: e3530002 cmp r3, #2
1a120: 0a000007 beq 1a144 <lseek+0x8c>
1a124: e3530000 cmp r3, #0
1a128: 1a00000b bne 1a15c <lseek+0xa4>
case SEEK_SET:
iop->offset = offset;
1a12c: e584100c str r1, [r4, #12]
1a130: e5842010 str r2, [r4, #16]
break;
1a134: ea00000e b 1a174 <lseek+0xbc>
case SEEK_CUR:
iop->offset += offset;
1a138: e091b005 adds fp, r1, r5
1a13c: e0a2c006 adc ip, r2, r6
1a140: ea000002 b 1a150 <lseek+0x98>
break;
case SEEK_END:
iop->offset = iop->size + offset;
1a144: e9941800 ldmib r4, {fp, ip}
1a148: e09bb001 adds fp, fp, r1
1a14c: e0acc002 adc ip, ip, r2
1a150: e584b00c str fp, [r4, #12]
1a154: e584c010 str ip, [r4, #16]
break;
1a158: ea000005 b 1a174 <lseek+0xbc>
default:
rtems_set_errno_and_return_minus_one( EINVAL );
1a15c: ebffd160 bl e6e4 <__errno>
1a160: e3a03016 mov r3, #22
1a164: e5803000 str r3, [r0]
1a168: e3e02000 mvn r2, #0
1a16c: e3e03000 mvn r3, #0
1a170: ea00000a b 1a1a0 <lseek+0xe8>
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1a174: e594c03c ldr ip, [r4, #60] ; 0x3c
1a178: e1a00004 mov r0, r4
1a17c: e1a0e00f mov lr, pc
1a180: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
1a184: e3700001 cmn r0, #1
/*
* At this time, handlers assume iop->offset has the desired
* new offset.
*/
status = (*iop->handlers->lseek_h)( iop, offset, whence );
1a188: e1a02000 mov r2, r0
1a18c: e1a03001 mov r3, r1
if ( status == (off_t) -1 )
1a190: 1a000002 bne 1a1a0 <lseek+0xe8>
1a194: e3710001 cmn r1, #1
iop->offset = old_offset;
1a198: 0584500c streq r5, [r4, #12]
1a19c: 05846010 streq r6, [r4, #16]
/*
* So if the operation failed, we have to restore iop->offset.
*/
return status;
}
1a1a0: e1a01003 mov r1, r3
1a1a4: e1a00002 mov r0, r2
1a1a8: e8bd8870 pop {r4, r5, r6, fp, pc}
0002631c <lstat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
2631c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
26320: e2515000 subs r5, r1, #0 <== NOT EXECUTED
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
26324: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
26328: e1a06000 mov r6, r0 <== NOT EXECUTED
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
2632c: 1a000002 bne 2633c <lstat+0x20> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EFAULT );
26330: eb006024 bl 3e3c8 <__errno> <== NOT EXECUTED
26334: e3a0300e mov r3, #14 <== NOT EXECUTED
26338: ea000018 b 263a0 <lstat+0x84> <== NOT EXECUTED
status = rtems_filesystem_evaluate_path( path, strlen( path ),
2633c: eb007b2f bl 45000 <strlen> <== NOT EXECUTED
26340: e28d4004 add r4, sp, #4 <== NOT EXECUTED
26344: e3a0c000 mov ip, #0 <== NOT EXECUTED
26348: e1a01000 mov r1, r0 <== NOT EXECUTED
2634c: e1a0200c mov r2, ip <== NOT EXECUTED
26350: e1a00006 mov r0, r6 <== NOT EXECUTED
26354: e1a03004 mov r3, r4 <== NOT EXECUTED
26358: e58dc000 str ip, [sp] <== NOT EXECUTED
2635c: ebff84b6 bl 763c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
26360: e2501000 subs r1, r0, #0 <== NOT EXECUTED
26364: 1a00000e bne 263a4 <lstat+0x88> <== NOT EXECUTED
return -1;
if ( !loc.handlers->fstat_h ){
26368: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
2636c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
26370: e3530000 cmp r3, #0 <== NOT EXECUTED
26374: 1a00000c bne 263ac <lstat+0x90> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
26378: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2637c: e3530000 cmp r3, #0 <== NOT EXECUTED
26380: 0a000004 beq 26398 <lstat+0x7c> <== NOT EXECUTED
26384: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
26388: e3530000 cmp r3, #0 <== NOT EXECUTED
2638c: 11a00004 movne r0, r4 <== NOT EXECUTED
26390: 11a0e00f movne lr, pc <== NOT EXECUTED
26394: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26398: eb00600a bl 3e3c8 <__errno> <== NOT EXECUTED
2639c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
263a0: e5803000 str r3, [r0] <== NOT EXECUTED
263a4: e3e05000 mvn r5, #0 <== NOT EXECUTED
263a8: ea000010 b 263f0 <lstat+0xd4> <== NOT EXECUTED
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
263ac: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED
263b0: e1a00005 mov r0, r5 <== NOT EXECUTED
263b4: eb006d3a bl 418a4 <memset> <== NOT EXECUTED
status = (*loc.handlers->fstat_h)( &loc, buf );
263b8: e1a01005 mov r1, r5 <== NOT EXECUTED
263bc: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
263c0: e1a00004 mov r0, r4 <== NOT EXECUTED
263c4: e1a0e00f mov lr, pc <== NOT EXECUTED
263c8: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
263cc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
263d0: 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 );
263d4: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
263d8: 0a000004 beq 263f0 <lstat+0xd4> <== NOT EXECUTED
263dc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
263e0: e3530000 cmp r3, #0 <== NOT EXECUTED
263e4: 11a00004 movne r0, r4 <== NOT EXECUTED
263e8: 11a0e00f movne lr, pc <== NOT EXECUTED
263ec: 112fff13 bxne r3 <== NOT EXECUTED
return status;
}
263f0: e1a00005 mov r0, r5 <== NOT EXECUTED
263f4: e28dd018 add sp, sp, #24 <== NOT EXECUTED
263f8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00002200 <malloc>:
size_t size
)
{
void *return_this;
MSBUMP(malloc_calls, 1);
2200: e59f30d8 ldr r3, [pc, #216] ; 22e0 <malloc+0xe0>
2204: e5932004 ldr r2, [r3, #4]
2208: e2822001 add r2, r2, #1
220c: e92d4070 push {r4, r5, r6, lr}
2210: e5832004 str r2, [r3, #4]
2214: e1a04000 mov r4, r0
/*
* If some free's have been deferred, then do them now.
*/
malloc_deferred_frees_process();
2218: ebffffb5 bl 20f4 <malloc_deferred_frees_process>
/*
* Validate the parameters
*/
if ( !size )
221c: e3540000 cmp r4, #0
2220: 0a00002b beq 22d4 <malloc+0xd4>
return (void *) 0;
/*
* Do not attempt to allocate memory if not in correct system state.
*/
if ( _System_state_Is_up(_System_state_Get()) &&
2224: e59f30b8 ldr r3, [pc, #184] ; 22e4 <malloc+0xe4>
2228: e5933000 ldr r3, [r3]
222c: e3530003 cmp r3, #3
2230: 1a000002 bne 2240 <malloc+0x40>
2234: ebffff97 bl 2098 <malloc_is_system_state_OK>
2238: e3500000 cmp r0, #0
223c: 0a000024 beq 22d4 <malloc+0xd4>
RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate(
Heap_Control *heap,
uintptr_t size
)
{
return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 );
2240: e59f30a0 ldr r3, [pc, #160] ; 22e8 <malloc+0xe8>
2244: e3a02000 mov r2, #0
2248: e5930000 ldr r0, [r3]
224c: e1a01004 mov r1, r4
2250: e1a03002 mov r3, r2
2254: eb00121c bl 6acc <_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 ) {
2258: 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;
225c: 11a05006 movne r5, r6
* If this fails then return a NULL pointer.
*/
return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size );
if ( !return_this ) {
2260: 1a00000c bne 2298 <malloc+0x98>
if (rtems_malloc_sbrk_helpers)
2264: e59f3080 ldr r3, [pc, #128] ; 22ec <malloc+0xec>
2268: e5933000 ldr r3, [r3]
226c: e3530000 cmp r3, #0
2270: 0a000004 beq 2288 <malloc+0x88>
return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
2274: e1a00004 mov r0, r4 <== NOT EXECUTED
2278: e1a0e00f mov lr, pc <== NOT EXECUTED
227c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
2280: e2505000 subs r5, r0, #0 <== NOT EXECUTED
2284: 1a000003 bne 2298 <malloc+0x98> <== NOT EXECUTED
errno = ENOMEM;
2288: eb003115 bl e6e4 <__errno>
228c: e3a0300c mov r3, #12
2290: e5803000 str r3, [r0]
return (void *) 0;
2294: ea00000f b 22d8 <malloc+0xd8>
}
/*
* If the user wants us to dirty the allocated memory, then do it.
*/
if ( rtems_malloc_dirty_helper )
2298: e59f3050 ldr r3, [pc, #80] ; 22f0 <malloc+0xf0>
229c: e5933000 ldr r3, [r3]
22a0: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
22a4: 11a01004 movne r1, r4
22a8: 11a00005 movne r0, r5
22ac: 11a0e00f movne lr, pc
22b0: 112fff13 bxne r3
/*
* If configured, update the statistics
*/
if ( rtems_malloc_statistics_helpers )
22b4: e59f3038 ldr r3, [pc, #56] ; 22f4 <malloc+0xf4>
22b8: e5933000 ldr r3, [r3]
22bc: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
22c0: 11a00005 movne r0, r5
22c4: 11a0e00f movne lr, pc
22c8: 1593f004 ldrne pc, [r3, #4]
22cc: e1a06005 mov r6, r5
22d0: ea000000 b 22d8 <malloc+0xd8>
22d4: e3a06000 mov r6, #0 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers)
(*rtems_malloc_boundary_helpers->at_malloc)(return_this, size);
#endif
return return_this;
}
22d8: e1a00006 mov r0, r6
22dc: e8bd8070 pop {r4, r5, r6, pc}
000020e4 <malloc_deferred_free>:
}
void malloc_deferred_free(
void *pointer
)
{
20e4: 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 );
20e8: e59f0000 ldr r0, [pc, #0] ; 20f0 <malloc_deferred_free+0xc><== NOT EXECUTED
20ec: ea000e68 b 5a94 <_Chain_Append> <== NOT EXECUTED
000020f4 <malloc_deferred_frees_process>:
{
rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list);
}
void malloc_deferred_frees_process(void)
{
20f4: 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)
20f8: ea000000 b 2100 <malloc_deferred_frees_process+0xc>
free(to_be_freed);
20fc: ebffff73 bl 1ed0 <free> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
2100: e59f000c ldr r0, [pc, #12] ; 2114 <malloc_deferred_frees_process+0x20>
2104: eb000e76 bl 5ae4 <_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)
2108: e3500000 cmp r0, #0
210c: 1afffffa bne 20fc <malloc_deferred_frees_process+0x8>
free(to_be_freed);
}
2110: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000c844 <memfile_ftruncate>:
int memfile_ftruncate(
rtems_libio_t *iop,
rtems_off64_t length
)
{
c844: e92d4013 push {r0, r1, r4, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
c848: 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 )
c84c: e5943054 ldr r3, [r4, #84] ; 0x54
c850: e1530002 cmp r3, r2
c854: ba000003 blt c868 <memfile_ftruncate+0x24>
c858: 1a000005 bne c874 <memfile_ftruncate+0x30>
c85c: e5943050 ldr r3, [r4, #80] ; 0x50
c860: e1530001 cmp r3, r1
c864: 2a000002 bcs c874 <memfile_ftruncate+0x30>
return IMFS_memfile_extend( the_jnode, length );
c868: e1a00004 mov r0, r4 <== NOT EXECUTED
c86c: ebffff9a bl c6dc <IMFS_memfile_extend> <== NOT EXECUTED
c870: ea000008 b c898 <memfile_ftruncate+0x54> <== NOT EXECUTED
* 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;
c874: e5841050 str r1, [r4, #80] ; 0x50
c878: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
c87c: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
c880: e3a01000 mov r1, #0
c884: e1a0000d mov r0, sp
c888: ebffd5b9 bl 1f74 <gettimeofday>
c88c: e59d3000 ldr r3, [sp]
c890: e5843040 str r3, [r4, #64] ; 0x40
c894: e3a00000 mov r0, #0
return 0;
}
c898: e8bd801c pop {r2, r3, r4, pc}
0000c89c <memfile_lseek>:
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
c89c: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
c8a0: e5905038 ldr r5, [r0, #56] ; 0x38
if (the_jnode->type == IMFS_LINEAR_FILE) {
c8a4: e595304c ldr r3, [r5, #76] ; 0x4c
c8a8: e3530006 cmp r3, #6
rtems_off64_t memfile_lseek(
rtems_libio_t *iop,
rtems_off64_t offset,
int whence
)
{
c8ac: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
if (the_jnode->type == IMFS_LINEAR_FILE) {
c8b0: 1a00000b bne c8e4 <memfile_lseek+0x48>
if (iop->offset > the_jnode->info.linearfile.size)
c8b4: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED
c8b8: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED
c8bc: e1520003 cmp r2, r3 <== NOT EXECUTED
c8c0: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED
c8c4: ca000003 bgt c8d8 <memfile_lseek+0x3c> <== NOT EXECUTED
c8c8: 1a000014 bne c920 <memfile_lseek+0x84> <== NOT EXECUTED
c8cc: e590100c ldr r1, [r0, #12] <== NOT EXECUTED
c8d0: e1510002 cmp r1, r2 <== NOT EXECUTED
c8d4: 9a000011 bls c920 <memfile_lseek+0x84> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
c8d8: e584200c str r2, [r4, #12] <== NOT EXECUTED
c8dc: e5843010 str r3, [r4, #16] <== NOT EXECUTED
c8e0: ea00000e b c920 <memfile_lseek+0x84> <== NOT EXECUTED
}
else { /* Must be a block file (IMFS_MEMORY_FILE). */
if (IMFS_memfile_extend( the_jnode, iop->offset ))
c8e4: e1a00005 mov r0, r5
c8e8: e284200c add r2, r4, #12
c8ec: e8920006 ldm r2, {r1, r2}
c8f0: ebffff79 bl c6dc <IMFS_memfile_extend>
c8f4: e3500000 cmp r0, #0
c8f8: 0a000005 beq c914 <memfile_lseek+0x78>
rtems_set_errno_and_return_minus_one( ENOSPC );
c8fc: eb000778 bl e6e4 <__errno> <== NOT EXECUTED
c900: e3a0301c mov r3, #28 <== NOT EXECUTED
c904: e5803000 str r3, [r0] <== NOT EXECUTED
c908: e3e04000 mvn r4, #0 <== NOT EXECUTED
c90c: e3e03000 mvn r3, #0 <== NOT EXECUTED
c910: ea000004 b c928 <memfile_lseek+0x8c> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
c914: e2853050 add r3, r5, #80 ; 0x50
c918: e893000c ldm r3, {r2, r3}
c91c: e984000c stmib r4, {r2, r3}
}
return iop->offset;
c920: e284400c add r4, r4, #12
c924: e8940018 ldm r4, {r3, r4}
}
c928: e1a01004 mov r1, r4
c92c: e1a00003 mov r0, r3
c930: e8bd8030 pop {r4, r5, pc}
0000cbc0 <memfile_open>:
the_jnode = iop->file_info;
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
cbc0: e5903014 ldr r3, [r0, #20]
cbc4: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode
)
{
cbc8: e92d4031 push {r0, r4, r5, lr}
cbcc: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode;
the_jnode = iop->file_info;
cbd0: e5904038 ldr r4, [r0, #56] ; 0x38
/*
* Perform 'copy on write' for linear files
*/
if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
cbd4: 0a000017 beq cc38 <memfile_open+0x78>
&& (the_jnode->type == IMFS_LINEAR_FILE)) {
cbd8: e594304c ldr r3, [r4, #76] ; 0x4c
cbdc: e3530006 cmp r3, #6
cbe0: 1a000014 bne cc38 <memfile_open+0x78>
uint32_t count = the_jnode->info.linearfile.size;
cbe4: e594c050 ldr ip, [r4, #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;
cbe8: e3a02000 mov r2, #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;
cbec: e3a03005 mov r3, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
cbf0: e3a00000 mov r0, #0 <== NOT EXECUTED
cbf4: e3a01000 mov r1, #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)
cbf8: 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;
cbfc: e584304c str r3, [r4, #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;
cc00: e5842060 str r2, [r4, #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;
cc04: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE;
the_jnode->info.file.size = 0;
cc08: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED
cc0c: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0;
the_jnode->info.file.doubly_indirect = 0;
cc10: e584205c str r2, [r4, #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;
cc14: e5842058 str r2, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->info.file.doubly_indirect = 0;
the_jnode->info.file.triply_indirect = 0;
if ((count != 0)
cc18: 0a000006 beq cc38 <memfile_open+0x78> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
cc1c: e1a02001 mov r2, r1 <== NOT EXECUTED
cc20: e1a01000 mov r1, r0 <== NOT EXECUTED
cc24: e1a00004 mov r0, r4 <== NOT EXECUTED
cc28: e58dc000 str ip, [sp] <== NOT EXECUTED
cc2c: ebffff40 bl c934 <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)
cc30: e3700001 cmn r0, #1 <== NOT EXECUTED
cc34: 0a000009 beq cc60 <memfile_open+0xa0> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
return -1;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
cc38: e5953014 ldr r3, [r5, #20]
cc3c: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
cc40: 12843050 addne r3, r4, #80 ; 0x50
cc44: 1893000c ldmne r3, {r2, r3}
cc48: 1585200c strne r2, [r5, #12]
cc4c: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
cc50: e2844050 add r4, r4, #80 ; 0x50
cc54: e8940018 ldm r4, {r3, r4}
cc58: e9850018 stmib r5, {r3, r4}
cc5c: e3a00000 mov r0, #0
return 0;
}
cc60: e8bd8038 pop {r3, r4, r5, pc}
00002308 <mknod>:
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2308: e92d41f0 push {r4, r5, r6, r7, r8, lr}
230c: e1a05001 mov r5, r1
int result;
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & S_IFMT)
2310: e2011a0f and r1, r1, #61440 ; 0xf000
2314: e3510901 cmp r1, #16384 ; 0x4000
int mknod(
const char *pathname,
mode_t mode,
dev_t dev
)
{
2318: e24dd020 sub sp, sp, #32
231c: e1a06000 mov r6, r0
2320: e1a07002 mov r7, r2
2324: 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)
2328: 0a00000b beq 235c <mknod+0x54>
232c: 8a000003 bhi 2340 <mknod+0x38>
2330: e3510a01 cmp r1, #4096 ; 0x1000
2334: 0a000008 beq 235c <mknod+0x54>
2338: e3510a02 cmp r1, #8192 ; 0x2000
233c: ea000002 b 234c <mknod+0x44>
2340: e3510a06 cmp r1, #24576 ; 0x6000
2344: 0a000004 beq 235c <mknod+0x54>
2348: e3510902 cmp r1, #32768 ; 0x8000
234c: 0a000002 beq 235c <mknod+0x54>
case S_IFBLK:
case S_IFREG:
case S_IFIFO:
break;
default:
rtems_set_errno_and_return_minus_one( EINVAL );
2350: eb0030e3 bl e6e4 <__errno> <== NOT EXECUTED
2354: e3a03016 mov r3, #22 <== NOT EXECUTED
2358: ea00000a b 2388 <mknod+0x80> <== NOT EXECUTED
}
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
235c: e28d4004 add r4, sp, #4
2360: e1a00006 mov r0, r6
2364: e28d101c add r1, sp, #28
2368: e1a02004 mov r2, r4
236c: eb000275 bl 2d48 <rtems_filesystem_get_start_loc>
if ( !temp_loc.ops->evalformake_h ) {
2370: e59d3010 ldr r3, [sp, #16]
2374: e5933004 ldr r3, [r3, #4]
2378: e3530000 cmp r3, #0
237c: 1a000004 bne 2394 <mknod+0x8c>
rtems_set_errno_and_return_minus_one( ENOTSUP );
2380: eb0030d7 bl e6e4 <__errno> <== NOT EXECUTED
2384: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2388: e5803000 str r3, [r0] <== NOT EXECUTED
238c: e3e05000 mvn r5, #0
2390: ea000022 b 2420 <mknod+0x118>
}
result = (*temp_loc.ops->evalformake_h)(
2394: e59d001c ldr r0, [sp, #28]
2398: e1a01004 mov r1, r4
239c: e0860000 add r0, r6, r0
23a0: e28d2018 add r2, sp, #24
23a4: e1a0e00f mov lr, pc
23a8: e12fff13 bx r3
&pathname[i],
&temp_loc,
&name_start
);
if ( result != 0 )
23ac: e3500000 cmp r0, #0
23b0: 1afffff5 bne 238c <mknod+0x84>
return -1;
if ( !temp_loc.ops->mknod_h ) {
23b4: e59d3010 ldr r3, [sp, #16]
23b8: e593c014 ldr ip, [r3, #20]
23bc: e35c0000 cmp ip, #0
23c0: 1a000006 bne 23e0 <mknod+0xd8>
rtems_filesystem_freenode( &temp_loc );
23c4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
23c8: e3530000 cmp r3, #0 <== NOT EXECUTED
23cc: 0affffeb beq 2380 <mknod+0x78> <== NOT EXECUTED
23d0: e1a00004 mov r0, r4 <== NOT EXECUTED
23d4: e1a0e00f mov lr, pc <== NOT EXECUTED
23d8: e12fff13 bx r3 <== NOT EXECUTED
23dc: eaffffe7 b 2380 <mknod+0x78> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
23e0: e1a01005 mov r1, r5
23e4: e1a03008 mov r3, r8
23e8: e58d4000 str r4, [sp]
23ec: e1a02007 mov r2, r7
23f0: e59d0018 ldr r0, [sp, #24]
23f4: e1a0e00f mov lr, pc
23f8: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
23fc: e59d3010 ldr r3, [sp, #16]
2400: 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 );
2404: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
2408: 0a000004 beq 2420 <mknod+0x118>
240c: e593301c ldr r3, [r3, #28]
2410: e3530000 cmp r3, #0
2414: 11a00004 movne r0, r4
2418: 11a0e00f movne lr, pc
241c: 112fff13 bxne r3
return result;
}
2420: e1a00005 mov r0, r5
2424: e28dd020 add sp, sp, #32
2428: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000024b4 <mount>:
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
24b4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
24b8: e3530001 cmp r3, #1
const char *target,
const char *filesystemtype,
rtems_filesystem_options_t options,
const void *data
)
{
24bc: e24dd028 sub sp, sp, #40 ; 0x28
24c0: e58d300c str r3, [sp, #12]
24c4: e1a08000 mov r8, r0
24c8: e1a07001 mov r7, r1
24cc: e1a0b002 mov fp, r2
/*
* Are the file system options valid?
*/
if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
24d0: 8a000004 bhi 24e8 <mount+0x34>
rtems_set_errno_and_return_minus_one( EINVAL );
/*
* Get mount handler
*/
mount_h = rtems_filesystem_get_mount_handler( filesystemtype );
24d4: e1a00002 mov r0, r2
24d8: eb0020c0 bl a7e0 <rtems_filesystem_get_mount_handler>
if ( !mount_h )
24dc: e3500000 cmp r0, #0
24e0: e58d0010 str r0, [sp, #16]
24e4: 1a000002 bne 24f4 <mount+0x40>
rtems_set_errno_and_return_minus_one( EINVAL );
24e8: eb00307d bl e6e4 <__errno>
24ec: e3a03016 mov r3, #22
24f0: ea000039 b 25dc <mount+0x128>
{
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;
24f4: e2575000 subs r5, r7, #0
24f8: 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 : "/";
24fc: e59f32ac ldr r3, [pc, #684] ; 27b0 <mount+0x2fc>
2500: e3550000 cmp r5, #0
2504: 11a03007 movne r3, r7
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
2508: e1a0000b mov r0, fp
const char *target_or_null,
const char *filesystemtype,
size_t *target_length_ptr
)
{
const char *target = target_or_null != NULL ? target_or_null : "/";
250c: e58d3004 str r3, [sp, #4]
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
2510: eb003478 bl f6f8 <strlen>
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
2514: 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;
2518: e2806001 add r6, r0, #1
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
251c: 01a0a008 moveq sl, r8
2520: 0a000002 beq 2530 <mount+0x7c>
2524: e1a00008 mov r0, r8
2528: eb003472 bl f6f8 <strlen>
252c: e280a001 add sl, r0, #1
size_t target_length = strlen( target );
2530: e59d0004 ldr r0, [sp, #4]
2534: eb00346f bl f6f8 <strlen>
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 );
2538: e2861075 add r1, r6, #117 ; 0x75
253c: e0811000 add r1, r1, r0
{
const char *target = target_or_null != NULL ? target_or_null : "/";
size_t filesystemtype_size = strlen( filesystemtype ) + 1;
size_t source_size = source_or_null != NULL ?
strlen( source_or_null ) + 1 : 0;
size_t target_length = strlen( target );
2540: e58d0008 str r0, [sp, #8]
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 );
2544: e081100a add r1, r1, sl
2548: e3a00001 mov r0, #1
254c: ebfffdd7 bl 1cb0 <calloc>
if ( mt_entry != NULL ) {
2550: e2504000 subs r4, r0, #0
2554: 0a00001e beq 25d4 <mount+0x120>
char *str = (char *) mt_entry + sizeof( *mt_entry );
2558: e2849074 add r9, r4, #116 ; 0x74
strcpy( str, filesystemtype );
255c: e1a0100b mov r1, fp
2560: e1a00009 mov r0, r9
2564: eb003413 bl f5b8 <strcpy>
mt_entry->type = str;
str += filesystemtype_size;
if ( source_or_null != NULL ) {
2568: 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;
256c: e0896006 add r6, r9, r6
if ( mt_entry != NULL ) {
char *str = (char *) mt_entry + sizeof( *mt_entry );
strcpy( str, filesystemtype );
mt_entry->type = str;
2570: e584906c str r9, [r4, #108] ; 0x6c
str += filesystemtype_size;
if ( source_or_null != NULL ) {
2574: 0a000004 beq 258c <mount+0xd8>
strcpy( str, source_or_null );
2578: e1a00006 mov r0, r6
257c: e1a01008 mov r1, r8
2580: eb00340c bl f5b8 <strcpy>
mt_entry->dev = str;
2584: e5846070 str r6, [r4, #112] ; 0x70
str += source_size;
2588: e086600a add r6, r6, sl
}
strcpy( str, target );
258c: e59d1004 ldr r1, [sp, #4]
2590: e1a00006 mov r0, r6
2594: eb003407 bl f5b8 <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;
2598: e59fe214 ldr lr, [pc, #532] ; 27b4 <mount+0x300>
259c: e8be000f ldm lr!, {r0, r1, r2, r3}
25a0: e284c038 add ip, r4, #56 ; 0x38
25a4: e8ac000f stmia ip!, {r0, r1, r2, r3}
25a8: e8be000f ldm lr!, {r0, r1, r2, r3}
25ac: e8ac000f stmia ip!, {r0, r1, r2, r3}
25b0: e89e000f ldm lr, {r0, r1, r2, r3}
25b4: 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;
25b8: e59d300c ldr r3, [sp, #12]
/*
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
25bc: e3550000 cmp r5, #0
mt_entry->dev = str;
str += source_size;
}
strcpy( str, target );
mt_entry->target = str;
25c0: 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;
25c4: 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;
25c8: 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 ) {
25cc: 0a000037 beq 26b0 <mount+0x1fc>
25d0: ea000003 b 25e4 <mount+0x130>
target,
filesystemtype,
&target_length
);
if ( !mt_entry )
rtems_set_errno_and_return_minus_one( ENOMEM );
25d4: eb003042 bl e6e4 <__errno> <== NOT EXECUTED
25d8: e3a0300c mov r3, #12 <== NOT EXECUTED
25dc: e5803000 str r3, [r0]
25e0: ea00006f b 27a4 <mount+0x2f0>
* The mount_point should be a directory with read/write/execute
* permissions in the existing tree.
*/
if ( has_target ) {
if ( rtems_filesystem_evaluate_path(
25e4: e28d6014 add r6, sp, #20
25e8: e3a0c001 mov ip, #1
25ec: e1a00007 mov r0, r7
25f0: e59d1008 ldr r1, [sp, #8]
25f4: e3a02007 mov r2, #7
25f8: e1a03006 mov r3, r6
25fc: e58dc000 str ip, [sp]
2600: ebfffe14 bl 1e58 <rtems_filesystem_evaluate_path>
2604: e3700001 cmn r0, #1
2608: 0a000058 beq 2770 <mount+0x2bc>
/*
* Test for node_type_h
*/
if (!loc.ops->node_type_h) {
260c: e59d3020 ldr r3, [sp, #32]
2610: e5933010 ldr r3, [r3, #16]
2614: e3530000 cmp r3, #0
2618: 0a00001b beq 268c <mount+0x1d8>
/*
* Test to see if it is a directory
*/
if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
261c: e1a00006 mov r0, r6
2620: e1a0e00f mov lr, pc
2624: e12fff13 bx r3
2628: e3500001 cmp r0, #1
262c: 0a000003 beq 2640 <mount+0x18c>
errno = ENOTDIR;
2630: eb00302b bl e6e4 <__errno>
2634: e3a03014 mov r3, #20
2638: e5803000 str r3, [r0]
goto cleanup_and_bail;
263c: ea00004c b 2774 <mount+0x2c0>
/*
* You can only mount one file system onto a single mount point.
*/
if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) {
2640: e59f0170 ldr r0, [pc, #368] ; 27b8 <mount+0x304>
2644: e59d1014 ldr r1, [sp, #20]
2648: ebffff7c bl 2440 <rtems_filesystem_mount_iterate>
264c: e3500000 cmp r0, #0
2650: 0a000002 beq 2660 <mount+0x1ac>
errno = EBUSY;
2654: eb003022 bl e6e4 <__errno>
2658: e3a03010 mov r3, #16
265c: eafffff5 b 2638 <mount+0x184>
* 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;
2660: e59d1014 ldr r1, [sp, #20]
mt_entry->mt_point_node.handlers = loc.handlers;
mt_entry->mt_point_node.ops = loc.ops;
2664: 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;
2668: e5841008 str r1, [r4, #8]
mt_entry->mt_point_node.handlers = loc.handlers;
266c: 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 ){
2670: 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;
2674: e5841010 str r1, [r4, #16]
mt_entry->mt_point_node.ops = loc.ops;
mt_entry->mt_point_node.mt_entry = loc.mt_entry;
2678: 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 ){
267c: 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;
2680: 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;
2684: 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 ){
2688: 1a000002 bne 2698 <mount+0x1e4>
errno = ENOTSUP;
268c: eb003014 bl e6e4 <__errno> <== NOT EXECUTED
2690: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
2694: eaffffe7 b 2638 <mount+0x184> <== NOT EXECUTED
goto cleanup_and_bail;
}
if ( loc.ops->mount_h( mt_entry ) ) {
2698: e1a00004 mov r0, r4
269c: e1a0e00f mov lr, pc
26a0: e12fff13 bx r3
26a4: e3500000 cmp r0, #0
26a8: 0a00000b beq 26dc <mount+0x228>
26ac: ea000030 b 2774 <mount+0x2c0> <== NOT EXECUTED
}
} else {
/*
* Do we already have a base file system ?
*/
if ( !rtems_chain_is_empty( &mount_chain ) ) {
26b0: e59f3104 ldr r3, [pc, #260] ; 27bc <mount+0x308>
26b4: e5932000 ldr r2, [r3]
26b8: e2833004 add r3, r3, #4
26bc: e1520003 cmp r2, r3
26c0: 01a06005 moveq r6, r5
26c4: 0a000004 beq 26dc <mount+0x228>
errno = EINVAL;
26c8: eb003005 bl e6e4 <__errno> <== NOT EXECUTED
26cc: e3a03016 mov r3, #22 <== NOT EXECUTED
26d0: e5803000 str r3, [r0] <== NOT EXECUTED
26d4: e1a06005 mov r6, r5 <== NOT EXECUTED
goto cleanup_and_bail;
26d8: ea000025 b 2774 <mount+0x2c0> <== NOT EXECUTED
* 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 ) ) {
26dc: e59d104c ldr r1, [sp, #76] ; 0x4c
26e0: e1a00004 mov r0, r4
26e4: e59d3010 ldr r3, [sp, #16]
26e8: e1a0e00f mov lr, pc
26ec: e12fff13 bx r3
26f0: e2507000 subs r7, r0, #0
26f4: 0a000007 beq 2718 <mount+0x264>
/*
* Try to undo the mount operation
*/
if ( loc.ops->unmount_h ) {
26f8: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
26fc: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED
2700: e3530000 cmp r3, #0 <== NOT EXECUTED
2704: 0a00001a beq 2774 <mount+0x2c0> <== NOT EXECUTED
loc.ops->unmount_h( mt_entry );
2708: e1a00004 mov r0, r4 <== NOT EXECUTED
270c: e1a0e00f mov lr, pc <== NOT EXECUTED
2710: e12fff13 bx r3 <== NOT EXECUTED
2714: ea000016 b 2774 <mount+0x2c0> <== 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 );
2718: e59f60a0 ldr r6, [pc, #160] ; 27c0 <mount+0x30c>
271c: e1a02007 mov r2, r7
2720: e1a01007 mov r1, r7
2724: e5960000 ldr r0, [r6]
2728: eb000a9b bl 519c <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 );
272c: e1a01004 mov r1, r4
2730: e59f0084 ldr r0, [pc, #132] ; 27bc <mount+0x308>
2734: eb000cd6 bl 5a94 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
2738: e5960000 ldr r0, [r6]
273c: eb000adc bl 52b4 <rtems_semaphore_release>
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
2740: e3550000 cmp r5, #0
rtems_filesystem_root = mt_entry->mt_fs_root;
2744: 059f3078 ldreq r3, [pc, #120] ; 27c4 <mount+0x310>
2748: 0284401c addeq r4, r4, #28
274c: 0593c000 ldreq ip, [r3]
2750: 08b4000f ldmeq r4!, {r0, r1, r2, r3}
2754: 028cc018 addeq ip, ip, #24
2758: 08ac000f stmiaeq ip!, {r0, r1, r2, r3}
275c: 05943000 ldreq r3, [r4]
*/
rtems_libio_lock();
rtems_chain_append( &mount_chain, &mt_entry->Node );
rtems_libio_unlock();
if ( !has_target )
2760: 11a00007 movne r0, r7
rtems_filesystem_root = mt_entry->mt_fs_root;
2764: 058c3000 streq r3, [ip]
2768: 01a00005 moveq r0, r5
276c: ea00000d b 27a8 <mount+0x2f4>
2770: e3a06000 mov r6, #0 <== NOT EXECUTED
return 0;
cleanup_and_bail:
free( mt_entry );
2774: e1a00004 mov r0, r4
2778: ebfffdd4 bl 1ed0 <free>
if ( loc_to_free )
277c: e3560000 cmp r6, #0
2780: 0a000007 beq 27a4 <mount+0x2f0>
rtems_filesystem_freenode( loc_to_free );
2784: e596300c ldr r3, [r6, #12]
2788: e3530000 cmp r3, #0
278c: 0a000004 beq 27a4 <mount+0x2f0>
2790: e593301c ldr r3, [r3, #28]
2794: e3530000 cmp r3, #0
2798: 11a00006 movne r0, r6
279c: 11a0e00f movne lr, pc
27a0: 112fff13 bxne r3
27a4: e3e00000 mvn r0, #0
return -1;
}
27a8: e28dd028 add sp, sp, #40 ; 0x28
27ac: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00031944 <msdos_creat_node>:
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
31944: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
31948: e24dd0a8 sub sp, sp, #168 ; 0xa8 <== NOT EXECUTED
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;
fat_file_fd_t *fat_fd = NULL;
3194c: e3a05000 mov r5, #0 <== 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;
31950: e590e010 ldr lr, [r0, #16] <== 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);
31954: e28da070 add sl, sp, #112 ; 0x70 <== 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;
31958: e3e0c000 mvn ip, #0 <== NOT EXECUTED
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
3195c: e1a04000 mov r4, r0 <== NOT EXECUTED
31960: e1a09002 mov r9, r2 <== NOT EXECUTED
31964: e1a06001 mov r6, r1 <== 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);
31968: e3a02020 mov r2, #32 <== NOT EXECUTED
3196c: e1a01005 mov r1, r5 <== NOT EXECUTED
31970: e1a0000a mov r0, sl <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
31974: e58dc09c str ip, [sp, #156] ; 0x9c <== NOT EXECUTED
msdos_node_type_t type,
const char *name,
int name_len,
mode_t mode,
const fat_file_fd_t *link_fd)
{
31978: e1a0b003 mov fp, r3 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
3197c: e59e8034 ldr r8, [lr, #52] ; 0x34 <== 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;
31980: e58dc098 str ip, [sp, #152] ; 0x98 <== NOT EXECUTED
fat_file_fd_t *parent_fat_fd = parent_loc->node_access;
fat_file_fd_t *fat_fd = NULL;
31984: e58d50a0 str r5, [sp, #160] ; 0xa0 <== NOT EXECUTED
time_t time_ret = 0;
uint16_t time_val = 0;
31988: e1cd5ab6 strh r5, [sp, #166] ; 0xa6 <== NOT EXECUTED
uint16_t date = 0;
3198c: e1cd5ab4 strh r5, [sp, #164] ; 0xa4 <== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
31990: e58d5090 str r5, [sp, #144] ; 0x90 <== NOT EXECUTED
dir_pos->sname.ofs = 0;
31994: e58d5094 str r5, [sp, #148] ; 0x94 <== 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;
31998: e5947000 ldr r7, [r4] <== 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);
3199c: eb003fc0 bl 418a4 <memset> <== NOT EXECUTED
memset(dot_dotdot, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2);
319a0: e1a01005 mov r1, r5 <== NOT EXECUTED
319a4: e3a02040 mov r2, #64 ; 0x40 <== NOT EXECUTED
319a8: e28d0010 add r0, sp, #16 <== NOT EXECUTED
319ac: eb003fbc bl 418a4 <memset> <== NOT EXECUTED
name_type = msdos_long_to_short (name, name_len,
319b0: e1a0100b mov r1, fp <== NOT EXECUTED
319b4: e1a0200a mov r2, sl <== NOT EXECUTED
319b8: e3a0300b mov r3, #11 <== NOT EXECUTED
319bc: e1a00009 mov r0, r9 <== NOT EXECUTED
319c0: eb000786 bl 337e0 <msdos_long_to_short> <== NOT EXECUTED
319c4: e58d000c str r0, [sp, #12] <== 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);
319c8: e1a00005 mov r0, r5 <== 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;
319cc: e5cd507c strb r5, [sp, #124] ; 0x7c <== NOT EXECUTED
/* set up last write date and time */
time_ret = time(NULL);
319d0: eb0061ff bl 4a1d4 <time> <== NOT EXECUTED
if ( time_ret == -1 )
319d4: e3700001 cmn r0, #1 <== NOT EXECUTED
319d8: 0a0000a9 beq 31c84 <msdos_creat_node+0x340> <== NOT EXECUTED
return -1;
msdos_date_unix2dos(time_ret, &date, &time_val);
319dc: e28d10a4 add r1, sp, #164 ; 0xa4 <== NOT EXECUTED
319e0: e28d20a6 add r2, sp, #166 ; 0xa6 <== NOT EXECUTED
319e4: eb002c2b bl 3ca98 <msdos_date_unix2dos> <== NOT EXECUTED
*MSDOS_DIR_WRITE_TIME(short_node) = CT_LE_W(time_val);
319e8: e1dd3ab6 ldrh r3, [sp, #166] ; 0xa6 <== NOT EXECUTED
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
319ec: e3560001 cmp r6, #1 <== 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);
319f0: e1cd38b6 strh r3, [sp, #134] ; 0x86 <== NOT EXECUTED
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
319f4: e1ddcab4 ldrh ip, [sp, #164] ; 0xa4 <== 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;
319f8: 05dd307b ldrbeq r3, [sp, #123] ; 0x7b <== 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;
319fc: e58d508c str r5, [sp, #140] ; 0x8c <== NOT EXECUTED
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);
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
31a00: e1cdc8b8 strh ip, [sp, #136] ; 0x88 <== 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;
31a04: 03833010 orreq r3, r3, #16 <== NOT EXECUTED
*MSDOS_DIR_WRITE_DATE(short_node) = CT_LE_W(date);
/* initialize directory/file size */
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
31a08: 0a000032 beq 31ad8 <msdos_creat_node+0x194> <== NOT EXECUTED
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
31a0c: e3560003 cmp r6, #3 <== 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;
31a10: 15dd307b ldrbne r3, [sp, #123] ; 0x7b <== NOT EXECUTED
31a14: 13833020 orrne r3, r3, #32 <== NOT EXECUTED
*MSDOS_DIR_FILE_SIZE(short_node) = MSDOS_INIT_DIR_SIZE;
if (type == MSDOS_DIRECTORY) {
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_DIRECTORY;
}
else if (type == MSDOS_HARD_LINK) {
31a18: 1a00002e bne 31ad8 <msdos_creat_node+0x194> <== NOT EXECUTED
* node to the newly created
*/
/*
* read the original directory entry
*/
sec = fat_cluster_num_to_sector_num(parent_loc->mt_entry,
31a1c: e59d30d0 ldr r3, [sp, #208] ; 0xd0 <== NOT EXECUTED
31a20: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
31a24: e5940010 ldr r0, [r4, #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)) )
31a28: 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;
31a2c: e5903034 ldr r3, [r0, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
31a30: 1a000003 bne 31a44 <msdos_creat_node+0x100> <== NOT EXECUTED
31a34: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
31a38: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
31a3c: 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)) )
31a40: 1a000003 bne 31a54 <msdos_creat_node+0x110> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
31a44: e593c030 ldr ip, [r3, #48] ; 0x30 <== NOT EXECUTED
31a48: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
31a4c: e2421002 sub r1, r2, #2 <== NOT EXECUTED
31a50: e08c1311 add r1, ip, r1, lsl r3 <== NOT EXECUTED
link_fd->dir_pos.sname.cln);
sec += (link_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
31a54: e59dc0d0 ldr ip, [sp, #208] ; 0xd0 <== NOT EXECUTED
byte = (link_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
ret = _fat_block_read(parent_loc->mt_entry,
31a58: e1d820b0 ldrh r2, [r8] <== 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);
31a5c: e59c3024 ldr r3, [ip, #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,
31a60: e5d8c002 ldrb ip, [r8, #2] <== NOT EXECUTED
31a64: e2422001 sub r2, r2, #1 <== NOT EXECUTED
31a68: e0811c33 add r1, r1, r3, lsr ip <== NOT EXECUTED
31a6c: e0022003 and r2, r2, r3 <== NOT EXECUTED
31a70: e28dc050 add ip, sp, #80 ; 0x50 <== NOT EXECUTED
31a74: e3a03020 mov r3, #32 <== NOT EXECUTED
31a78: e58dc000 str ip, [sp] <== NOT EXECUTED
31a7c: ebffc505 bl 22e98 <_fat_block_read> <== NOT EXECUTED
sec, byte, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
link_node);
if (ret < 0) {
31a80: e3500000 cmp r0, #0 <== NOT EXECUTED
31a84: ba00007e blt 31c84 <msdos_creat_node+0x340> <== NOT EXECUTED
return -1;
}
/*
* copy various attributes
*/
*MSDOS_DIR_ATTR(short_node) =*MSDOS_DIR_ATTR(link_node);
31a88: e5dd305b ldrb r3, [sp, #91] ; 0x5b <== NOT EXECUTED
31a8c: e5cd307b strb r3, [sp, #123] ; 0x7b <== 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;
31a90: e5dd307b ldrb r3, [sp, #123] ; 0x7b <== 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);
31a94: e59d106c ldr r1, [sp, #108] ; 0x6c <== 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;
31a98: e3833020 orr r3, r3, #32 <== 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);
31a9c: e5dd205d ldrb r2, [sp, #93] ; 0x5d <== 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);
31aa0: e58a101c str r1, [sl, #28] <== 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;
31aa4: e5cd307b strb r3, [sp, #123] ; 0x7b <== 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);
31aa8: e1dd35be ldrh r3, [sp, #94] ; 0x5e <== NOT EXECUTED
*MSDOS_DIR_CRT_DATE(short_node) =*MSDOS_DIR_CRT_DATE(link_node);
31aac: e1ddc6b0 ldrh ip, [sp, #96] ; 0x60 <== 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);
31ab0: e1cd37be strh r3, [sp, #126] ; 0x7e <== 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) =
31ab4: e1dd36ba ldrh r3, [sp, #106] ; 0x6a <== 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);
31ab8: e1cdc8b0 strh ip, [sp, #128] ; 0x80 <== 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) =
31abc: e1cd38ba strh r3, [sp, #138] ; 0x8a <== NOT EXECUTED
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
31ac0: e1ddc6b4 ldrh ip, [sp, #100] ; 0x64 <== 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);
31ac4: e1dd3ab4 ldrh r3, [sp, #164] ; 0xa4 <== 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);
31ac8: e5cd207d strb r2, [sp, #125] ; 0x7d <== NOT EXECUTED
*/
*MSDOS_DIR_FILE_SIZE(short_node) =*MSDOS_DIR_FILE_SIZE(link_node);
*MSDOS_DIR_FIRST_CLUSTER_LOW(short_node) =
*MSDOS_DIR_FIRST_CLUSTER_LOW(link_node);
*MSDOS_DIR_FIRST_CLUSTER_HI(short_node) =
31acc: e1cdc8b4 strh ip, [sp, #132] ; 0x84 <== 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);
31ad0: e1cd38b2 strh r3, [sp, #130] ; 0x82 <== NOT EXECUTED
31ad4: ea000000 b 31adc <msdos_creat_node+0x198> <== NOT EXECUTED
}
else { /* regular file... */
*MSDOS_DIR_ATTR(short_node) |= MSDOS_ATTR_ARCHIVE;
31ad8: e5cd307b strb r3, [sp, #123] ; 0x7b <== 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,
31adc: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
31ae0: e1a02009 mov r2, r9 <== NOT EXECUTED
31ae4: e1a0300b mov r3, fp <== NOT EXECUTED
31ae8: e28d9090 add r9, sp, #144 ; 0x90 <== NOT EXECUTED
31aec: e28da070 add sl, sp, #112 ; 0x70 <== NOT EXECUTED
31af0: e1a00004 mov r0, r4 <== NOT EXECUTED
31af4: e3a01001 mov r1, #1 <== NOT EXECUTED
31af8: e58dc000 str ip, [sp] <== NOT EXECUTED
31afc: e98d0600 stmib sp, {r9, sl} <== NOT EXECUTED
31b00: eb000820 bl 33b88 <msdos_get_name_node> <== NOT EXECUTED
name_type, &dir_pos, short_node);
if ( rc != RC_OK )
31b04: e2505000 subs r5, r0, #0 <== NOT EXECUTED
31b08: 1a00005e bne 31c88 <msdos_creat_node+0x344> <== NOT EXECUTED
/*
* if we create a new file we are done, if directory there are more steps
* to do
*/
if (type == MSDOS_DIRECTORY)
31b0c: e3560001 cmp r6, #1 <== NOT EXECUTED
31b10: 1a00005c bne 31c88 <msdos_creat_node+0x344> <== NOT EXECUTED
{
/* open new directory as fat-file */
rc = fat_file_open(parent_loc->mt_entry, &dir_pos, &fat_fd);
31b14: e1a01009 mov r1, r9 <== NOT EXECUTED
31b18: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31b1c: e28d20a0 add r2, sp, #160 ; 0xa0 <== NOT EXECUTED
31b20: ebffc289 bl 2254c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
31b24: e2505000 subs r5, r0, #0 <== NOT EXECUTED
31b28: 1a000050 bne 31c70 <msdos_creat_node+0x32c> <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
31b2c: e59d30a0 ldr r3, [sp, #160] ; 0xa0 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
31b30: e3a02602 mov r2, #2097152 ; 0x200000 <== NOT EXECUTED
/*
* we opened fat-file for node we just created, so initialize fat-file
* descritor
*/
fat_fd->fat_file_size = 0;
31b34: e5835018 str r5, [r3, #24] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
31b38: e5836010 str r6, [r3, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
31b3c: e5832014 str r2, [r3, #20] <== NOT EXECUTED
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
31b40: e1a0e00a mov lr, sl <== NOT EXECUTED
31b44: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
31b48: e28d5010 add r5, sp, #16 <== NOT EXECUTED
31b4c: e1a0c005 mov ip, r5 <== NOT EXECUTED
31b50: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
31b54: e89e000f ldm lr, {r0, r1, r2, r3} <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
31b58: e2856020 add r6, r5, #32 <== NOT EXECUTED
/*
* dot and dotdot entries are identical to new node except the
* names
*/
memcpy(DOT_NODE_P(dot_dotdot), short_node,
31b5c: e88c000f stm ip, {r0, r1, r2, r3} <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
memcpy(DOTDOT_NODE_P(dot_dotdot), short_node,
31b60: e8ba000f ldm sl!, {r0, r1, r2, r3} <== NOT EXECUTED
31b64: e1a0c006 mov ip, r6 <== NOT EXECUTED
31b68: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
31b6c: e89e000f ldm lr, {r0, r1, r2, r3} <== NOT EXECUTED
31b70: 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,
31b74: e59f3118 ldr r3, [pc, #280] ; 31c94 <msdos_creat_node+0x350><== NOT EXECUTED
31b78: e3a0200b mov r2, #11 <== NOT EXECUTED
31b7c: e5931000 ldr r1, [r3] <== NOT EXECUTED
31b80: e1a00005 mov r0, r5 <== NOT EXECUTED
31b84: eb003ebf bl 41688 <memcpy> <== NOT EXECUTED
MSDOS_NAME_MAX);
memcpy(MSDOS_DIR_NAME(DOTDOT_NODE_P(dot_dotdot)), MSDOS_DOTDOT_NAME,
31b88: e59f3108 ldr r3, [pc, #264] ; 31c98 <msdos_creat_node+0x354><== NOT EXECUTED
31b8c: e1a00006 mov r0, r6 <== NOT EXECUTED
31b90: e5931000 ldr r1, [r3] <== NOT EXECUTED
31b94: e3a0200b mov r2, #11 <== NOT EXECUTED
31b98: eb003eba bl 41688 <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)) &&
31b9c: e5973020 ldr r3, [r7, #32] <== NOT EXECUTED
31ba0: e3530001 cmp r3, #1 <== NOT EXECUTED
31ba4: 1a000007 bne 31bc8 <msdos_creat_node+0x284> <== NOT EXECUTED
31ba8: e5973024 ldr r3, [r7, #36] ; 0x24 <== NOT EXECUTED
31bac: e3530000 cmp r3, #0 <== NOT EXECUTED
31bb0: 1a000004 bne 31bc8 <msdos_creat_node+0x284> <== NOT EXECUTED
(fs_info->fat.vol.type & FAT_FAT32))
31bb4: e5d8200a ldrb r2, [r8, #10] <== NOT EXECUTED
31bb8: 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;
31bbc: 11c533b4 strhne r3, [r5, #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;
31bc0: 11c533ba strhne r3, [r5, #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))
31bc4: 1a000003 bne 31bd8 <msdos_creat_node+0x294> <== 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)) =
31bc8: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
CT_LE_W((uint16_t )((parent_fat_fd->cln) & 0x0000FFFF));
*MSDOS_DIR_FIRST_CLUSTER_HI(DOTDOT_NODE_P(dot_dotdot)) =
31bcc: e1a02823 lsr r2, r3, #16 <== NOT EXECUTED
31bd0: e1cd24b4 strh r2, [sp, #68] ; 0x44 <== 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)) =
31bd4: e1cd34ba strh r3, [sp, #74] ; 0x4a <== 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,
31bd8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31bdc: e28d5010 add r5, sp, #16 <== NOT EXECUTED
31be0: e59d10a0 ldr r1, [sp, #160] ; 0xa0 <== NOT EXECUTED
31be4: e3a02000 mov r2, #0 <== NOT EXECUTED
31be8: e3a03040 mov r3, #64 ; 0x40 <== NOT EXECUTED
31bec: e58d5000 str r5, [sp] <== NOT EXECUTED
31bf0: ebffc125 bl 2208c <fat_file_write> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE * 2,
(uint8_t *)dot_dotdot);
if (ret < 0)
31bf4: e3500000 cmp r0, #0 <== NOT EXECUTED
31bf8: ba000018 blt 31c60 <msdos_creat_node+0x31c> <== NOT EXECUTED
rc = -1;
goto error;
}
/* increment fat-file size by cluster size */
fat_fd->fat_file_size += fs_info->fat.vol.bpc;
31bfc: e59d10a0 ldr r1, [sp, #160] ; 0xa0 <== NOT EXECUTED
31c00: e1d830b6 ldrh r3, [r8, #6] <== NOT EXECUTED
31c04: e2812018 add r2, r1, #24 <== NOT EXECUTED
31c08: e8921004 ldm r2, {r2, ip} <== NOT EXECUTED
31c0c: e0823003 add r3, r2, r3 <== NOT EXECUTED
31c10: e5813018 str r3, [r1, #24] <== NOT EXECUTED
/* 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)) =
31c14: 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,
31c18: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31c1c: e3a02000 mov r2, #0 <== NOT EXECUTED
31c20: 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)) =
31c24: e1cde2b4 strh lr, [sp, #36] ; 0x24 <== 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,
31c28: e58d5000 str r5, [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)) =
31c2c: e1cdc2ba strh ip, [sp, #42] ; 0x2a <== 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,
31c30: ebffc115 bl 2208c <fat_file_write> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE,
(uint8_t *)DOT_NODE_P(dot_dotdot));
if (ret < 0)
31c34: e3500000 cmp r0, #0 <== NOT EXECUTED
31c38: ba000008 blt 31c60 <msdos_creat_node+0x31c> <== 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);
31c3c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31c40: e59d10a0 ldr r1, [sp, #160] ; 0xa0 <== NOT EXECUTED
31c44: eb0005e9 bl 333f0 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
31c48: e2505000 subs r5, r0, #0 <== NOT EXECUTED
31c4c: 1a000004 bne 31c64 <msdos_creat_node+0x320> <== NOT EXECUTED
goto error;
fat_file_close(parent_loc->mt_entry, fat_fd);
31c50: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31c54: e59d10a0 ldr r1, [sp, #160] ; 0xa0 <== NOT EXECUTED
31c58: ebffc212 bl 224a8 <fat_file_close> <== NOT EXECUTED
31c5c: ea000009 b 31c88 <msdos_creat_node+0x344> <== NOT EXECUTED
31c60: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
return RC_OK;
error:
fat_file_close(parent_loc->mt_entry, fat_fd);
31c64: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31c68: e59d10a0 ldr r1, [sp, #160] ; 0xa0 <== NOT EXECUTED
31c6c: ebffc20d bl 224a8 <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);
31c70: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31c74: e28d1090 add r1, sp, #144 ; 0x90 <== NOT EXECUTED
31c78: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
31c7c: eb000608 bl 334a4 <msdos_set_first_char4file_name> <== NOT EXECUTED
return rc;
31c80: ea000000 b 31c88 <msdos_creat_node+0x344> <== NOT EXECUTED
31c84: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
31c88: e1a00005 mov r0, r5 <== NOT EXECUTED
31c8c: e28dd0a8 add sp, sp, #168 ; 0xa8 <== NOT EXECUTED
31c90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0003cbe0 <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) {
3cbe0: e59f30e4 ldr r3, [pc, #228] ; 3cccc <msdos_date_dos2unix+0xec><== NOT EXECUTED
3cbe4: e1d320be ldrh r2, [r3, #14] <== NOT EXECUTED
3cbe8: 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)
{
3cbec: e92d4070 push {r4, r5, r6, lr} <== 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) {
3cbf0: 0a000028 beq 3cc98 <msdos_date_dos2unix+0xb8> <== NOT EXECUTED
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
3cbf4: e200ccfe and ip, r0, #65024 ; 0xfe00 <== NOT EXECUTED
3cbf8: e3a02000 mov r2, #0 <== 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;
3cbfc: e1c300be strh r0, [r3, #14] <== NOT EXECUTED
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
3cc00: e1a0c4ac lsr ip, ip, #9 <== NOT EXECUTED
3cc04: e1a03002 mov r3, r2 <== NOT EXECUTED
for (y = 0; y < year; y++)
days += y & 0x03 ? 365 : 366;
3cc08: e59f50c0 ldr r5, [pc, #192] ; 3ccd0 <msdos_date_dos2unix+0xf0><== NOT EXECUTED
3cc0c: e59f40c0 ldr r4, [pc, #192] ; 3ccd4 <msdos_date_dos2unix+0xf4><== 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++)
3cc10: ea000004 b 3cc28 <msdos_date_dos2unix+0x48> <== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
3cc14: e3130003 tst r3, #3 <== NOT EXECUTED
3cc18: 11a06005 movne r6, r5 <== NOT EXECUTED
3cc1c: 01a06004 moveq r6, r4 <== NOT EXECUTED
3cc20: e0822006 add r2, r2, r6 <== 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++)
3cc24: e2833001 add r3, r3, #1 <== NOT EXECUTED
3cc28: e153000c cmp r3, ip <== NOT EXECUTED
3cc2c: 3afffff8 bcc 3cc14 <msdos_date_dos2unix+0x34> <== NOT EXECUTED
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
3cc30: e31c0003 tst ip, #3 <== NOT EXECUTED
3cc34: e59f409c ldr r4, [pc, #156] ; 3ccd8 <msdos_date_dos2unix+0xf8><== NOT EXECUTED
3cc38: e59fc09c ldr ip, [pc, #156] ; 3ccdc <msdos_date_dos2unix+0xfc><== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
3cc3c: e2003e1e and r3, r0, #480 ; 0x1e0 <== NOT EXECUTED
lastdosdate = dd;
days = 0;
year = (dd & MSDOS_DD_YEAR_MASK) >> MSDOS_DD_YEAR_SHIFT;
for (y = 0; y < year; y++)
days += y & 0x03 ? 365 : 366;
months = year & 0x03 ? regyear : leapyear;
3cc40: 01a0400c moveq r4, ip <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
3cc44: e3530000 cmp r3, #0 <== NOT EXECUTED
3cc48: 11a032a3 lsrne r3, r3, #5 <== NOT EXECUTED
3cc4c: 03a03001 moveq r3, #1 <== NOT EXECUTED
month = 1;
}
for (m = 0; m < month - 1; m++)
3cc50: e243c001 sub ip, r3, #1 <== NOT EXECUTED
/*
* Prevent going from 0 to 0xffffffff in the following
* loop.
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
3cc54: e3a03000 mov r3, #0 <== NOT EXECUTED
month = 1;
}
for (m = 0; m < month - 1; m++)
3cc58: ea000003 b 3cc6c <msdos_date_dos2unix+0x8c> <== NOT EXECUTED
days += months[m];
3cc5c: e1a05083 lsl r5, r3, #1 <== NOT EXECUTED
3cc60: e19450b5 ldrh r5, [r4, r5] <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
3cc64: e2833001 add r3, r3, #1 <== NOT EXECUTED
days += months[m];
3cc68: e0822005 add r2, r2, r5 <== NOT EXECUTED
*/
month = (dd & MSDOS_DD_MONTH_MASK) >> MSDOS_DD_MONTH_SHIFT;
if (month == 0) {
month = 1;
}
for (m = 0; m < month - 1; m++)
3cc6c: e153000c cmp r3, ip <== NOT EXECUTED
3cc70: 3afffff9 bcc 3cc5c <msdos_date_dos2unix+0x7c> <== NOT EXECUTED
days += months[m];
days += ((dd & MSDOS_DD_DAY_MASK) >> MSDOS_DD_DAY_SHIFT) - 1;
lastseconds = (days + DAYSTO1980) * SECONDSPERDAY;
3cc74: e200001f and r0, r0, #31 <== NOT EXECUTED
3cc78: e59f3060 ldr r3, [pc, #96] ; 3cce0 <msdos_date_dos2unix+0x100><== NOT EXECUTED
3cc7c: e2400001 sub r0, r0, #1 <== NOT EXECUTED
3cc80: e0802002 add r2, r0, r2 <== NOT EXECUTED
3cc84: e00c0293 mul ip, r3, r2 <== NOT EXECUTED
3cc88: e59f3054 ldr r3, [pc, #84] ; 3cce4 <msdos_date_dos2unix+0x104><== NOT EXECUTED
3cc8c: e59f2038 ldr r2, [pc, #56] ; 3cccc <msdos_date_dos2unix+0xec><== NOT EXECUTED
3cc90: e08c3003 add r3, ip, r3 <== NOT EXECUTED
3cc94: e5823010 str r3, [r2, #16] <== NOT EXECUTED
3cc98: e59f302c ldr r3, [pc, #44] ; 3cccc <msdos_date_dos2unix+0xec><== NOT EXECUTED
3cc9c: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
3cca0: e201201f and r2, r1, #31 <== NOT EXECUTED
3cca4: e2010b3e and r0, r1, #63488 ; 0xf800 <== NOT EXECUTED
3cca8: e0822003 add r2, r2, r3 <== NOT EXECUTED
3ccac: e1a005a0 lsr r0, r0, #11 <== NOT EXECUTED
3ccb0: e3a0cee1 mov ip, #3600 ; 0xe10 <== NOT EXECUTED
3ccb4: e023209c mla r3, ip, r0, r2 <== NOT EXECUTED
3ccb8: e2011e7e and r1, r1, #2016 ; 0x7e0 <== NOT EXECUTED
3ccbc: e1a012a1 lsr r1, r1, #5 <== NOT EXECUTED
3ccc0: e3a0003c mov r0, #60 ; 0x3c <== NOT EXECUTED
}
return seconds + lastseconds;
}
3ccc4: e0203091 mla r0, r1, r0, r3 <== NOT EXECUTED
3ccc8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0003ca98 <msdos_date_unix2dos>:
* 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)
{
3ca98: e92d41f0 push {r4, r5, r6, r7, r8, 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) {
3ca9c: e59f411c ldr r4, [pc, #284] ; 3cbc0 <msdos_date_unix2dos+0x128><== NOT EXECUTED
3caa0: e5943000 ldr r3, [r4] <== NOT EXECUTED
3caa4: e1530000 cmp r3, 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)
{
3caa8: e1a05000 mov r5, r0 <== NOT EXECUTED
3caac: e1a06001 mov r6, r1 <== NOT EXECUTED
3cab0: e1a07002 mov r7, r2 <== 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) {
3cab4: 0a00003b beq 3cba8 <msdos_date_unix2dos+0x110> <== NOT EXECUTED
lasttime = t;
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
3cab8: e3a0103c mov r1, #60 ; 0x3c <== 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;
3cabc: e5840000 str r0, [r4] <== NOT EXECUTED
lastdtime = (((t % 60) >> 1) << MSDOS_DT_2SECONDS_SHIFT)
3cac0: eb00660f bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
3cac4: e3a0103c mov r1, #60 ; 0x3c <== NOT EXECUTED
3cac8: eb0066a1 bl 56554 <__umodsi3> <== NOT EXECUTED
3cacc: e3a01ee1 mov r1, #3600 ; 0xe10 <== NOT EXECUTED
3cad0: e1a08280 lsl r8, r0, #5 <== NOT EXECUTED
3cad4: e1a00005 mov r0, r5 <== NOT EXECUTED
3cad8: eb006609 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
3cadc: e3a01018 mov r1, #24 <== NOT EXECUTED
3cae0: eb00669b bl 56554 <__umodsi3> <== NOT EXECUTED
3cae4: e3a0103c mov r1, #60 ; 0x3c <== NOT EXECUTED
3cae8: e0888580 add r8, r8, r0, lsl #11 <== NOT EXECUTED
3caec: e1a00005 mov r0, r5 <== NOT EXECUTED
3caf0: eb006697 bl 56554 <__umodsi3> <== NOT EXECUTED
3caf4: e08880a0 add r8, r8, r0, 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);
3caf8: e59f10c4 ldr r1, [pc, #196] ; 3cbc4 <msdos_date_unix2dos+0x12c><== NOT EXECUTED
3cafc: e1a00005 mov r0, 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)
3cb00: e1c480b4 strh r8, [r4, #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);
3cb04: eb0065fe bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
if (days != lastday) {
3cb08: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
3cb0c: e1500003 cmp r0, r3 <== NOT EXECUTED
3cb10: 0a000024 beq 3cba8 <msdos_date_unix2dos+0x110> <== NOT EXECUTED
lastday = days;
3cb14: e5840008 str r0, [r4, #8] <== NOT EXECUTED
3cb18: e59f30a8 ldr r3, [pc, #168] ; 3cbc8 <msdos_date_unix2dos+0x130><== NOT EXECUTED
for (year = 1970;; year++) {
inc = year & 0x03 ? 365 : 366;
3cb1c: e59f40a8 ldr r4, [pc, #168] ; 3cbcc <msdos_date_unix2dos+0x134><== NOT EXECUTED
3cb20: e59f10a8 ldr r1, [pc, #168] ; 3cbd0 <msdos_date_unix2dos+0x138><== NOT EXECUTED
3cb24: e213c003 ands ip, r3, #3 <== NOT EXECUTED
3cb28: 11a02004 movne r2, r4 <== NOT EXECUTED
3cb2c: 01a02001 moveq r2, r1 <== NOT EXECUTED
if (days < inc)
3cb30: e1500002 cmp r0, r2 <== NOT EXECUTED
break;
days -= inc;
3cb34: 20620000 rsbcs r0, r2, r0 <== NOT EXECUTED
* and month stuff.
*/
days = t / (SECONDSPERDAY);
if (days != lastday) {
lastday = days;
for (year = 1970;; year++) {
3cb38: 22833001 addcs r3, r3, #1 <== NOT EXECUTED
inc = year & 0x03 ? 365 : 366;
if (days < inc)
break;
days -= inc;
}
3cb3c: 2afffff8 bcs 3cb24 <msdos_date_unix2dos+0x8c> <== NOT EXECUTED
months = year & 0x03 ? regyear : leapyear;
3cb40: e59f208c ldr r2, [pc, #140] ; 3cbd4 <msdos_date_unix2dos+0x13c><== NOT EXECUTED
3cb44: e59f108c ldr r1, [pc, #140] ; 3cbd8 <msdos_date_unix2dos+0x140><== NOT EXECUTED
3cb48: e35c0000 cmp ip, #0 <== NOT EXECUTED
3cb4c: 01a0c002 moveq ip, r2 <== NOT EXECUTED
3cb50: 11a0c001 movne ip, r1 <== NOT EXECUTED
3cb54: e3a02000 mov r2, #0 <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
3cb58: e1a01082 lsl r1, r2, #1 <== NOT EXECUTED
3cb5c: e19c10b1 ldrh r1, [ip, r1] <== NOT EXECUTED
3cb60: e1500001 cmp r0, r1 <== NOT EXECUTED
3cb64: 3a000003 bcc 3cb78 <msdos_date_unix2dos+0xe0> <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
3cb68: e2822001 add r2, r2, #1 <== NOT EXECUTED
3cb6c: e352000c cmp r2, #12 <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
3cb70: e0610000 rsb r0, r1, r0 <== NOT EXECUTED
if (days < inc)
break;
days -= inc;
}
months = year & 0x03 ? regyear : leapyear;
for (month = 0; month < 12; month++) {
3cb74: 1afffff7 bne 3cb58 <msdos_date_unix2dos+0xc0> <== NOT EXECUTED
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
3cb78: e0802282 add r2, r0, r2, lsl #5 <== 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)
3cb7c: e59f0058 ldr r0, [pc, #88] ; 3cbdc <msdos_date_unix2dos+0x144><== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
3cb80: e2822021 add r2, r2, #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)
3cb84: e1530000 cmp r3, r0 <== NOT EXECUTED
lastddate += (year - 1980) <<
3cb88: 82433e7b subhi r3, r3, #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)
3cb8c: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
3cb90: e59f1028 ldr r1, [pc, #40] ; 3cbc0 <msdos_date_unix2dos+0x128><== NOT EXECUTED
3cb94: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
lastddate += (year - 1980) <<
3cb98: 8243300c subhi r3, r3, #12 <== NOT EXECUTED
3cb9c: 80823483 addhi r3, r2, r3, lsl #9 <== NOT EXECUTED
for (month = 0; month < 12; month++) {
if (days < months[month])
break;
days -= months[month];
}
lastddate = ((days + 1) << MSDOS_DD_DAY_SHIFT)
3cba0: e1c120bc strh r2, [r1, #12] <== NOT EXECUTED
* unix's is relative to 1970. If somehow we get a
* time before 1980 then don't give totally crazy
* results.
*/
if (year > 1980)
lastddate += (year - 1980) <<
3cba4: 81c130bc strhhi r3, [r1, #12] <== NOT EXECUTED
MSDOS_DD_YEAR_SHIFT;
}
}
*dtp = lastdtime;
3cba8: e59f3010 ldr r3, [pc, #16] ; 3cbc0 <msdos_date_unix2dos+0x128><== NOT EXECUTED
3cbac: e1d320b4 ldrh r2, [r3, #4] <== NOT EXECUTED
3cbb0: e1c720b0 strh r2, [r7] <== NOT EXECUTED
*ddp = lastddate;
3cbb4: e1d330bc ldrh r3, [r3, #12] <== NOT EXECUTED
3cbb8: e1c630b0 strh r3, [r6] <== NOT EXECUTED
}
3cbbc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0003ce44 <msdos_dir_chmod>:
int
msdos_dir_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
3ce44: e3a00000 mov r0, #0 <== NOT EXECUTED
3ce48: e12fff1e bx lr <== NOT EXECUTED
0003d560 <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;
3d560: 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)
{
3d564: 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;
3d568: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3d56c: 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)
{
3d570: e1a05000 mov r5, 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,
3d574: e1a02001 mov r2, r1 <== NOT EXECUTED
3d578: e5940094 ldr r0, [r4, #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;
3d57c: e5956038 ldr r6, [r5, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3d580: ebff38ce bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3d584: e3500000 cmp r0, #0 <== NOT EXECUTED
3d588: 0a000004 beq 3d5a0 <msdos_dir_close+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
3d58c: eb00038d bl 3e3c8 <__errno> <== NOT EXECUTED
3d590: e3a03005 mov r3, #5 <== NOT EXECUTED
3d594: e5803000 str r3, [r0] <== NOT EXECUTED
3d598: e3e05000 mvn r5, #0 <== NOT EXECUTED
3d59c: ea000005 b 3d5b8 <msdos_dir_close+0x58> <== NOT EXECUTED
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
3d5a0: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
3d5a4: e1a01006 mov r1, r6 <== NOT EXECUTED
3d5a8: ebff93be bl 224a8 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
3d5ac: e2505000 subs r5, r0, #0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rtems_semaphore_release(fs_info->vol_sema);
3d5b0: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
3d5b4: ebff3907 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
3d5b8: e1a00005 mov r0, r5 <== NOT EXECUTED
3d5bc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00033258 <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
)
{
33258: e92d4ff3 push {r0, r1, 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;
uint32_t j = 0, i = 0;
/* dir is not empty */
*ret_val = false;
3325c: e3a06000 mov r6, #0 <== NOT EXECUTED
msdos_dir_is_empty(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
33260: e1a0b000 mov fp, r0 <== NOT EXECUTED
33264: e1a05002 mov r5, r2 <== NOT EXECUTED
33268: e58d1004 str r1, [sp, #4] <== 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;
3326c: e5c26000 strb r6, [r2] <== NOT EXECUTED
fat_file_fd_t *fat_fd,
bool *ret_val
)
{
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
33270: e5904034 ldr r4, [r0, #52] ; 0x34 <== 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,
33274: ea00002d b 33330 <msdos_dir_is_empty+0xd8> <== NOT EXECUTED
fs_info->fat.vol.bps,
fs_info->cl_buf)) != FAT_EOF)
{
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
33278: e350001f cmp r0, #31 <== NOT EXECUTED
3327c: d3e00000 mvnle r0, #0 <== NOT EXECUTED
33280: da000036 ble 33360 <msdos_dir_is_empty+0x108> <== NOT EXECUTED
return -1;
assert(ret == fs_info->fat.vol.bps);
33284: e1d490b0 ldrh r9, [r4] <== NOT EXECUTED
33288: e1500009 cmp r0, r9 <== NOT EXECUTED
3328c: 0a000023 beq 33320 <msdos_dir_is_empty+0xc8> <== NOT EXECUTED
33290: e59f00cc ldr r0, [pc, #204] ; 33364 <msdos_dir_is_empty+0x10c><== NOT EXECUTED
33294: e59f10cc ldr r1, [pc, #204] ; 33368 <msdos_dir_is_empty+0x110><== NOT EXECUTED
33298: e59f20cc ldr r2, [pc, #204] ; 3336c <msdos_dir_is_empty+0x114><== NOT EXECUTED
3329c: e59f30cc ldr r3, [pc, #204] ; 33370 <msdos_dir_is_empty+0x118><== NOT EXECUTED
332a0: ebffc711 bl 24eec <__assert_func> <== NOT EXECUTED
/* 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)
{
char* entry = (char*) fs_info->cl_buf + i;
332a4: e594a098 ldr sl, [r4, #152] ; 0x98 <== 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)) ==
332a8: e7da8007 ldrb r8, [sl, r7] <== NOT EXECUTED
332ac: e35800e5 cmp r8, #229 ; 0xe5 <== NOT EXECUTED
/* 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)
{
char* entry = (char*) fs_info->cl_buf + i;
332b0: e08aa007 add sl, sl, r7 <== 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)) ==
332b4: 0a000011 beq 33300 <msdos_dir_is_empty+0xa8> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY) ||
((*MSDOS_DIR_ATTR(entry) & MSDOS_ATTR_LFN_MASK) ==
332b8: e5da300b ldrb r3, [sl, #11] <== NOT EXECUTED
332bc: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
332c0: e353000f cmp r3, #15 <== NOT EXECUTED
332c4: 0a00000d beq 33300 <msdos_dir_is_empty+0xa8> <== NOT EXECUTED
MSDOS_ATTR_LFN) ||
(strncmp(MSDOS_DIR_NAME((entry)), MSDOS_DOT_NAME,
332c8: e59f30a4 ldr r3, [pc, #164] ; 33374 <msdos_dir_is_empty+0x11c><== NOT EXECUTED
332cc: e1a0000a mov r0, sl <== NOT EXECUTED
332d0: e5931000 ldr r1, [r3] <== NOT EXECUTED
332d4: e3a0200b mov r2, #11 <== NOT EXECUTED
332d8: eb004792 bl 45128 <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)) ==
332dc: e3500000 cmp r0, #0 <== NOT EXECUTED
332e0: 0a000006 beq 33300 <msdos_dir_is_empty+0xa8> <== 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)),
332e4: e59f3088 ldr r3, [pc, #136] ; 33374 <msdos_dir_is_empty+0x11c><== NOT EXECUTED
332e8: e1a0000a mov r0, sl <== NOT EXECUTED
332ec: e5931004 ldr r1, [r3, #4] <== NOT EXECUTED
332f0: e3a0200b mov r2, #11 <== NOT EXECUTED
332f4: eb00478b bl 45128 <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)) ==
332f8: e3500000 cmp r0, #0 <== NOT EXECUTED
332fc: 1a000001 bne 33308 <msdos_dir_is_empty+0xb0> <== 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)
33300: e2877020 add r7, r7, #32 <== NOT EXECUTED
33304: ea000006 b 33324 <msdos_dir_is_empty+0xcc> <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
33308: e3580000 cmp r8, #0 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
3330c: 03a03001 moveq r3, #1 <== NOT EXECUTED
continue;
/*
* Nothing more to look at.
*/
if ((*MSDOS_DIR_NAME(entry)) ==
33310: 13a00000 movne r0, #0 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
*ret_val = true;
33314: 05c53000 strbeq r3, [r5] <== NOT EXECUTED
33318: 01a00008 moveq r0, r8 <== NOT EXECUTED
return RC_OK;
3331c: ea00000f b 33360 <msdos_dir_is_empty+0x108> <== NOT EXECUTED
33320: e3a07000 mov r7, #0 <== 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;
33324: e1570009 cmp r7, r9 <== NOT EXECUTED
33328: 3affffdd bcc 332a4 <msdos_dir_is_empty+0x4c> <== NOT EXECUTED
/*
* Short file name entries mean not empty.
*/
return RC_OK;
}
j++;
3332c: e2866001 add r6, r6, #1 <== 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,
33330: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
33334: e594c098 ldr ip, [r4, #152] ; 0x98 <== NOT EXECUTED
33338: e1a03002 mov r3, r2 <== NOT EXECUTED
3333c: e1a0000b mov r0, fp <== NOT EXECUTED
33340: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
33344: e0020296 mul r2, r6, r2 <== NOT EXECUTED
33348: e58dc000 str ip, [sp] <== NOT EXECUTED
3334c: ebffbbdb bl 222c0 <fat_file_read> <== NOT EXECUTED
33350: e3500000 cmp r0, #0 <== NOT EXECUTED
33354: 1affffc7 bne 33278 <msdos_dir_is_empty+0x20> <== NOT EXECUTED
*/
return RC_OK;
}
j++;
}
*ret_val = true;
33358: e3a03001 mov r3, #1 <== NOT EXECUTED
3335c: e5c53000 strb r3, [r5] <== NOT EXECUTED
return RC_OK;
}
33360: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0003ce4c <msdos_dir_lseek>:
* set apropriately).
*/
rtems_off64_t
msdos_dir_lseek(rtems_libio_t *iop, rtems_off64_t offset, int whence)
{
switch (whence)
3ce4c: 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)
{
3ce50: e92d4010 push {r4, lr} <== NOT EXECUTED
switch (whence)
3ce54: 93a03000 movls r3, #0 <== NOT EXECUTED
3ce58: 93a04000 movls r4, #0 <== NOT EXECUTED
3ce5c: 9a000004 bls 3ce74 <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 );
3ce60: eb000558 bl 3e3c8 <__errno> <== NOT EXECUTED
3ce64: e3a03016 mov r3, #22 <== NOT EXECUTED
3ce68: e5803000 str r3, [r0] <== NOT EXECUTED
3ce6c: e3e04000 mvn r4, #0 <== NOT EXECUTED
3ce70: e3e03000 mvn r3, #0 <== NOT EXECUTED
break;
}
return RC_OK;
}
3ce74: e1a01004 mov r1, r4 <== NOT EXECUTED
3ce78: e1a00003 mov r0, r3 <== NOT EXECUTED
3ce7c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0003d5c0 <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;
3d5c0: 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)
{
3d5c4: 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;
3d5c8: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3d5cc: 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)
{
3d5d0: e1a05000 mov r5, 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,
3d5d4: e1a02001 mov r2, r1 <== NOT EXECUTED
3d5d8: e5940094 ldr r0, [r4, #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;
3d5dc: e5956038 ldr r6, [r5, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3d5e0: ebff38b6 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3d5e4: e3500000 cmp r0, #0 <== NOT EXECUTED
3d5e8: 0a000004 beq 3d600 <msdos_dir_open+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
3d5ec: eb000375 bl 3e3c8 <__errno> <== NOT EXECUTED
3d5f0: e3a03005 mov r3, #5 <== NOT EXECUTED
3d5f4: e5803000 str r3, [r0] <== NOT EXECUTED
3d5f8: e3e06000 mvn r6, #0 <== NOT EXECUTED
3d5fc: ea000008 b 3d624 <msdos_dir_open+0x64> <== NOT EXECUTED
rc = fat_file_reopen(fat_fd);
3d600: e1a00006 mov r0, r6 <== NOT EXECUTED
3d604: ebff911a bl 21a74 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
3d608: e2506000 subs r6, r0, #0 <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
iop->offset = 0;
3d60c: 03a02000 moveq r2, #0 <== NOT EXECUTED
3d610: 03a03000 moveq r3, #0 <== NOT EXECUTED
3d614: 0585200c streq r2, [r5, #12] <== NOT EXECUTED
3d618: 05853010 streq r3, [r5, #16] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
3d61c: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
3d620: ebff38ec bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
3d624: e1a00006 mov r0, r6 <== NOT EXECUTED
3d628: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0003d068 <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)
{
3d068: 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;
3d06c: e590a038 ldr sl, [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)
{
3d070: e1a07000 mov r7, r0 <== 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) &&
3d074: e59a0020 ldr r0, [sl, #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;
3d078: e5973028 ldr r3, [r7, #40] ; 0x28 <== 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)
{
3d07c: e24dde15 sub sp, sp, #336 ; 0x150 <== 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) &&
3d080: 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)
{
3d084: e58d1024 str r1, [sp, #36] ; 0x24 <== NOT EXECUTED
3d088: 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;
3d08c: e5935034 ldr r5, [r3, #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);
3d090: e287900c add r9, r7, #12 <== NOT EXECUTED
3d094: e8990300 ldm r9, {r8, r9} <== 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) &&
3d098: 1a000007 bne 3d0bc <msdos_dir_read+0x54> <== NOT EXECUTED
3d09c: e59a3024 ldr r3, [sl, #36] ; 0x24 <== NOT EXECUTED
3d0a0: e3530000 cmp r3, #0 <== NOT EXECUTED
3d0a4: 1a000004 bne 3d0bc <msdos_dir_read+0x54> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
3d0a8: e5d5300a ldrb r3, [r5, #10] <== NOT EXECUTED
3d0ac: e3130003 tst r3, #3 <== 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) &&
3d0b0: 159a0018 ldrne r0, [sl, #24] <== NOT EXECUTED
3d0b4: 158d001c strne r0, [sp, #28] <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16))) ?
3d0b8: 1a000001 bne 3d0c4 <msdos_dir_read+0x5c> <== 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) &&
3d0bc: e1d510b6 ldrh r1, [r5, #6] <== NOT EXECUTED
3d0c0: e58d101c str r1, [sp, #28] <== 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;
3d0c4: 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,
3d0c8: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
3d0cc: e1a01003 mov r1, r3 <== NOT EXECUTED
3d0d0: 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;
3d0d4: e58d3148 str r3, [sp, #328] ; 0x148 <== 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;
3d0d8: e58d314c str r3, [sp, #332] ; 0x14c <== 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,
3d0dc: ebff39f7 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3d0e0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3d0e4: 1a000020 bne 3d16c <msdos_dir_read+0x104> <== 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);
3d0e8: e3a02e11 mov r2, #272 ; 0x110 <== NOT EXECUTED
3d0ec: e3a03000 mov r3, #0 <== NOT EXECUTED
3d0f0: e1a00008 mov r0, r8 <== NOT EXECUTED
3d0f4: e1a01009 mov r1, r9 <== NOT EXECUTED
3d0f8: eb00662f bl 569bc <__divdi3> <== NOT EXECUTED
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
3d0fc: e3a01e11 mov r1, #272 ; 0x110 <== 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);
3d100: e1a09000 mov r9, r0 <== NOT EXECUTED
count = (count / sizeof(struct dirent)) * sizeof(struct dirent);
3d104: e1a00004 mov r0, r4 <== NOT EXECUTED
3d108: eb00647d bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
3d10c: e3a03e11 mov r3, #272 ; 0x110 <== NOT EXECUTED
3d110: e0000093 mul r0, r3, r0 <== NOT EXECUTED
3d114: e3e02000 mvn r2, #0 <== NOT EXECUTED
3d118: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
3d11c: e1a0b006 mov fp, r6 <== NOT EXECUTED
3d120: e58d6018 str r6, [sp, #24] <== NOT EXECUTED
3d124: e58d200c str r2, [sp, #12] <== NOT EXECUTED
3d128: e58d6010 str r6, [sp, #16] <== NOT EXECUTED
3d12c: e1a08005 mov r8, r5 <== NOT EXECUTED
3d130: ea0000f3 b 3d504 <msdos_dir_read+0x49c> <== 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),
3d134: e598c098 ldr ip, [r8, #152] ; 0x98 <== NOT EXECUTED
3d138: e5970028 ldr r0, [r7, #40] ; 0x28 <== NOT EXECUTED
3d13c: e1a0100a mov r1, sl <== NOT EXECUTED
3d140: e1a02006 mov r2, r6 <== NOT EXECUTED
3d144: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
3d148: e58dc000 str ip, [sp] <== NOT EXECUTED
3d14c: ebff945b bl 222c0 <fat_file_read> <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
3d150: 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),
3d154: e58d0020 str r0, [sp, #32] <== NOT EXECUTED
bts2rd, fs_info->cl_buf);
if (ret < MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
3d158: c3a05000 movgt r5, #0 <== NOT EXECUTED
3d15c: ca0000e3 bgt 3d4f0 <msdos_dir_read+0x488> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
3d160: e5980094 ldr r0, [r8, #148] ; 0x94 <== NOT EXECUTED
3d164: e1a05008 mov r5, r8 <== NOT EXECUTED
3d168: ebff3a1a bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
3d16c: eb000495 bl 3e3c8 <__errno> <== NOT EXECUTED
3d170: e3a03005 mov r3, #5 <== NOT EXECUTED
3d174: e5803000 str r3, [r0] <== NOT EXECUTED
3d178: e3e03000 mvn r3, #0 <== NOT EXECUTED
3d17c: ea0000e7 b 3d520 <msdos_dir_read+0x4b8> <== NOT EXECUTED
}
for (i = 0; i < ret; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
3d180: e5984098 ldr r4, [r8, #152] ; 0x98 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
3d184: e7d43005 ldrb r3, [r4, r5] <== NOT EXECUTED
3d188: 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;
3d18c: e0844005 add r4, r4, r5 <== NOT EXECUTED
/*
* Is this directory from here on empty ?
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
3d190: 01a05008 moveq r5, r8 <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_AND_REST_EMPTY)
{
rtems_semaphore_release(fs_info->vol_sema);
3d194: 05980094 ldreq r0, [r8, #148] ; 0x94 <== NOT EXECUTED
return cmpltd;
3d198: 059d3010 ldreq r3, [sp, #16] <== NOT EXECUTED
3d19c: 0a0000c4 beq 3d4b4 <msdos_dir_read+0x44c> <== NOT EXECUTED
}
/* Is the directory entry empty */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) == MSDOS_THIS_DIR_ENTRY_EMPTY)
3d1a0: e35300e5 cmp r3, #229 ; 0xe5 <== NOT EXECUTED
3d1a4: 0a0000d0 beq 3d4ec <msdos_dir_read+0x484> <== NOT EXECUTED
continue;
/* Is the directory entry empty a volume label */
if (((*MSDOS_DIR_ATTR(entry)) & MSDOS_ATTR_VOLUME_ID) &&
3d1a8: e5d4200b ldrb r2, [r4, #11] <== NOT EXECUTED
3d1ac: e3120008 tst r2, #8 <== NOT EXECUTED
3d1b0: 0a000002 beq 3d1c0 <msdos_dir_read+0x158> <== NOT EXECUTED
3d1b4: e202103f and r1, r2, #63 ; 0x3f <== NOT EXECUTED
3d1b8: e351000f cmp r1, #15 <== NOT EXECUTED
3d1bc: 1a0000ca bne 3d4ec <msdos_dir_read+0x484> <== 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) ==
3d1c0: e202203f and r2, r2, #63 ; 0x3f <== NOT EXECUTED
3d1c4: e352000f cmp r2, #15 <== NOT EXECUTED
3d1c8: 1a000031 bne 3d294 <msdos_dir_read+0x22c> <== NOT EXECUTED
int q;
/*
* Is this is the first entry of a LFN ?
*/
if (lfn_start == FAT_FILE_SHORT_NAME)
3d1cc: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
3d1d0: e37c0001 cmn ip, #1 <== NOT EXECUTED
3d1d4: 1a00000b bne 3d208 <msdos_dir_read+0x1a0> <== NOT EXECUTED
{
/*
* The first entry must have the last long entry flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
3d1d8: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
3d1dc: 0a0000c2 beq 3d4ec <msdos_dir_read+0x484> <== NOT EXECUTED
continue;
/*
* Remember the start location of the long file name.
*/
lfn_start =
3d1e0: e085c006 add ip, r5, r6 <== NOT EXECUTED
3d1e4: e1a0c2ac lsr ip, ip, #5 <== NOT EXECUTED
3d1e8: e58dc00c str ip, [sp, #12] <== 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);
3d1ec: e5d4e00d ldrb lr, [r4, #13] <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
3d1f0: e28d0038 add r0, sp, #56 ; 0x38 <== NOT EXECUTED
3d1f4: e3a01000 mov r1, #0 <== NOT EXECUTED
3d1f8: e28220f1 add r2, r2, #241 ; 0xf1 <== 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) &
3d1fc: e203b03f and fp, r3, #63 ; 0x3f <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK);
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
3d200: e58de018 str lr, [sp, #24] <== NOT EXECUTED
memset (tmp_dirent.d_name, 0, sizeof(tmp_dirent.d_name));
3d204: eb0011a6 bl 418a4 <memset> <== 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) &
3d208: e5d43000 ldrb r3, [r4] <== NOT EXECUTED
3d20c: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
3d210: e15b0003 cmp fp, r3 <== NOT EXECUTED
3d214: 1a0000b2 bne 3d4e4 <msdos_dir_read+0x47c> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
3d218: e5d4300d ldrb r3, [r4, #13] <== NOT EXECUTED
3d21c: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
3d220: e1530000 cmp r3, r0 <== NOT EXECUTED
3d224: 1a0000ae bne 3d4e4 <msdos_dir_read+0x47c> <== NOT EXECUTED
* fit in the directory entry name field.
*/
lfn_entries--;
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
3d228: e3a0300d mov r3, #13 <== 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--;
3d22c: e24bb001 sub fp, fp, #1 <== NOT EXECUTED
p = entry + 1;
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
3d230: e0020b93 mul r2, r3, fp <== NOT EXECUTED
3d234: e28d3e15 add r3, sp, #336 ; 0x150 <== NOT EXECUTED
3d238: e0831002 add r1, r3, r2 <== 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;
3d23c: e2844001 add r4, r4, #1 <== NOT EXECUTED
o = lfn_entries * MSDOS_LFN_LEN_PER_ENTRY;
3d240: e2411f46 sub r1, r1, #280 ; 0x118 <== NOT EXECUTED
3d244: e3a03000 mov r3, #0 <== NOT EXECUTED
for (q = 0; q < MSDOS_LFN_LEN_PER_ENTRY; q++)
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
3d248: e35200fe cmp r2, #254 ; 0xfe <== NOT EXECUTED
3d24c: 8a0000a6 bhi 3d4ec <msdos_dir_read+0x484> <== NOT EXECUTED
break;
tmp_dirent.d_name[o++] = *p;
3d250: e5d40000 ldrb r0, [r4] <== NOT EXECUTED
3d254: e5c10000 strb r0, [r1] <== NOT EXECUTED
if (*p == '\0')
3d258: e5d40000 ldrb r0, [r4] <== NOT EXECUTED
3d25c: e3500000 cmp r0, #0 <== NOT EXECUTED
3d260: 0a0000a1 beq 3d4ec <msdos_dir_read+0x484> <== NOT EXECUTED
break;
switch (q)
3d264: e3530004 cmp r3, #4 <== NOT EXECUTED
{
case 4:
p += 5;
3d268: 02844005 addeq r4, r4, #5 <== NOT EXECUTED
tmp_dirent.d_name[o++] = *p;
if (*p == '\0')
break;
switch (q)
3d26c: 0a000002 beq 3d27c <msdos_dir_read+0x214> <== NOT EXECUTED
3d270: e353000a cmp r3, #10 <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
3d274: 12844002 addne r4, r4, #2 <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
3d278: 02844004 addeq r4, r4, #4 <== 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++)
3d27c: e2833001 add r3, r3, #1 <== NOT EXECUTED
3d280: e353000d cmp r3, #13 <== NOT EXECUTED
3d284: e2811001 add r1, r1, #1 <== NOT EXECUTED
3d288: 0a000097 beq 3d4ec <msdos_dir_read+0x484> <== NOT EXECUTED
{
if (o >= (sizeof(tmp_dirent.d_name) - 1))
break;
tmp_dirent.d_name[o++] = *p;
3d28c: e2822001 add r2, r2, #1 <== NOT EXECUTED
3d290: eaffffec b 3d248 <msdos_dir_read+0x1e0> <== NOT EXECUTED
fat_dir_pos_t dir_pos;
/*
* Skip active entries until get the entry to start from.
*/
if (start)
3d294: e3590000 cmp r9, #0 <== NOT EXECUTED
{
lfn_start = FAT_FILE_SHORT_NAME;
start--;
3d298: 13e0c000 mvnne ip, #0 <== NOT EXECUTED
3d29c: 12499001 subne r9, r9, #1 <== NOT EXECUTED
3d2a0: 158dc00c strne ip, [sp, #12] <== NOT EXECUTED
continue;
3d2a4: 1a000090 bne 3d4ec <msdos_dir_read+0x484> <== 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,
3d2a8: e5970028 ldr r0, [r7, #40] ; 0x28 <== NOT EXECUTED
3d2ac: e1a03006 mov r3, r6 <== NOT EXECUTED
3d2b0: e28def52 add lr, sp, #328 ; 0x148 <== NOT EXECUTED
3d2b4: e1a0100a mov r1, sl <== NOT EXECUTED
3d2b8: e3a02001 mov r2, #1 <== NOT EXECUTED
3d2bc: e58de000 str lr, [sp] <== NOT EXECUTED
3d2c0: ebff9291 bl 21d0c <fat_file_ioctl> <== NOT EXECUTED
j * bts2rd, &cur_cln);
if (rc != RC_OK)
3d2c4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3d2c8: 1a000077 bne 3d4ac <msdos_dir_read+0x444> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
3d2cc: e59d3148 ldr r3, [sp, #328] ; 0x148 <== NOT EXECUTED
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
3d2d0: e5970028 ldr r0, [r7, #40] ; 0x28 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
3d2d4: e58d3138 str r3, [sp, #312] ; 0x138 <== NOT EXECUTED
dir_pos.sname.ofs = i;
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
3d2d8: e28d1f4e add r1, sp, #312 ; 0x138 <== 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;
3d2dc: e3e03000 mvn r3, #0 <== NOT EXECUTED
3d2e0: e28d2f53 add r2, sp, #332 ; 0x14c <== NOT EXECUTED
3d2e4: e58d3140 str r3, [sp, #320] ; 0x140 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
3d2e8: e58d3144 str r3, [sp, #324] ; 0x144 <== NOT EXECUTED
return rc;
}
fat_dir_pos_init(&dir_pos);
dir_pos.sname.cln = cur_cln;
dir_pos.sname.ofs = i;
3d2ec: e58d513c str r5, [sp, #316] ; 0x13c <== NOT EXECUTED
rc = fat_file_open(iop->pathinfo.mt_entry, &dir_pos, &tmp_fat_fd);
3d2f0: ebff9495 bl 2254c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
3d2f4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3d2f8: 1a00006b bne 3d4ac <msdos_dir_read+0x444> <== 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;
3d2fc: e59d314c ldr r3, [sp, #332] ; 0x14c <== 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)
3d300: e59dc00c ldr ip, [sp, #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);
tmp_dirent.d_ino = tmp_fat_fd->ino;
3d304: 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);
3d308: e59f2248 ldr r2, [pc, #584] ; 3d558 <msdos_dir_read+0x4f0> <== 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;
3d30c: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
tmp_dirent.d_reclen = sizeof(struct dirent);
3d310: e3a0ee11 mov lr, #272 ; 0x110 <== NOT EXECUTED
3d314: e28d0e15 add r0, sp, #336 ; 0x150 <== 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)
3d318: e37c0001 cmn ip, #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);
3d31c: e180e0b2 strh lr, [r0, r2] <== NOT EXECUTED
tmp_dirent.d_ino = tmp_fat_fd->ino;
3d320: e58d3028 str r3, [sp, #40] ; 0x28 <== 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;
3d324: e58d102c str r1, [sp, #44] ; 0x2c <== NOT EXECUTED
3d328: e58d9030 str r9, [sp, #48] ; 0x30 <== 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)
3d32c: 0a000016 beq 3d38c <msdos_dir_read+0x324> <== NOT EXECUTED
3d330: e1a02009 mov r2, r9 <== NOT EXECUTED
3d334: e1a03009 mov r3, r9 <== 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;
3d338: e7d40002 ldrb r0, [r4, r2] <== NOT EXECUTED
3d33c: e2131001 ands r1, r3, #1 <== NOT EXECUTED
3d340: 13a01080 movne r1, #128 ; 0x80 <== NOT EXECUTED
3d344: e08030a3 add r3, r0, r3, lsr #1 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
3d348: e2822001 add r2, r2, #1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
3d34c: e0833001 add r3, r3, r1 <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
3d350: e352000b cmp r2, #11 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
3d354: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
{
uint8_t cs = 0;
uint8_t* p = (uint8_t*) entry;
int i;
for (i = 0; i < 11; i++, p++)
3d358: 1afffff6 bne 3d338 <msdos_dir_read+0x2d0> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entries || (lfn_checksum != cs))
3d35c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
3d360: e35b0000 cmp fp, #0 <== NOT EXECUTED
3d364: 01520003 cmpeq r2, r3 <== NOT EXECUTED
3d368: 1a000007 bne 3d38c <msdos_dir_read+0x324> <== NOT EXECUTED
3d36c: ea00006e b 3d52c <msdos_dir_read+0x4c4> <== NOT EXECUTED
3d370: e1a01003 mov r1, r3 <== NOT EXECUTED
const char *src_tmp;
/*
* find last non-blank character of base name
*/
for ((i = MSDOS_SHORT_BASE_LEN ,
3d374: e2533001 subs r3, r3, #1 <== NOT EXECUTED
3d378: 2a000004 bcs 3d390 <msdos_dir_read+0x328> <== NOT EXECUTED
3d37c: e3a00000 mov r0, #0 <== NOT EXECUTED
3d380: e28d3038 add r3, sp, #56 ; 0x38 <== NOT EXECUTED
3d384: e58d100c str r1, [sp, #12] <== NOT EXECUTED
3d388: ea000010 b 3d3d0 <msdos_dir_read+0x368> <== NOT EXECUTED
3d38c: e3a03007 mov r3, #7 <== NOT EXECUTED
3d390: e7d42003 ldrb r2, [r4, r3] <== NOT EXECUTED
3d394: e3520020 cmp r2, #32 <== NOT EXECUTED
3d398: e2831001 add r1, r3, #1 <== NOT EXECUTED
3d39c: 0afffff3 beq 3d370 <msdos_dir_read+0x308> <== NOT EXECUTED
3d3a0: eafffff5 b 3d37c <msdos_dir_read+0x314> <== NOT EXECUTED
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
3d3a4: e59fe1b0 ldr lr, [pc, #432] ; 3d55c <msdos_dir_read+0x4f4> <== NOT EXECUTED
3d3a8: e59ee000 ldr lr, [lr] <== NOT EXECUTED
3d3ac: e7d4c000 ldrb ip, [r4, r0] <== NOT EXECUTED
3d3b0: e58de004 str lr, [sp, #4] <== NOT EXECUTED
3d3b4: e08ee00c add lr, lr, ip <== NOT EXECUTED
3d3b8: e5dee001 ldrb lr, [lr, #1] <== NOT EXECUTED
3d3bc: e20ee003 and lr, lr, #3 <== NOT EXECUTED
3d3c0: e35e0001 cmp lr, #1 <== NOT EXECUTED
3d3c4: 028cc020 addeq ip, ip, #32 <== NOT EXECUTED
3d3c8: e4c3c001 strb ip, [r3], #1 <== NOT EXECUTED
3d3cc: e2800001 add r0, r0, #1 <== 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)
3d3d0: e060c001 rsb ip, r0, r1 <== NOT EXECUTED
/*
* copy base name to destination
*/
src_tmp = src;
len = i;
while (i-- > 0) {
3d3d4: e35c0000 cmp ip, #0 <== NOT EXECUTED
3d3d8: cafffff1 bgt 3d3a4 <msdos_dir_read+0x33c> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
3d3dc: e5d4000a ldrb r0, [r4, #10] <== NOT EXECUTED
3d3e0: e3500020 cmp r0, #32 <== NOT EXECUTED
3d3e4: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
3d3e8: 13a00003 movne r0, #3 <== NOT EXECUTED
3d3ec: 1a000053 bne 3d540 <msdos_dir_read+0x4d8> <== NOT EXECUTED
3d3f0: e5d40009 ldrb r0, [r4, #9] <== NOT EXECUTED
3d3f4: e3500020 cmp r0, #32 <== NOT EXECUTED
src_tmp = src + MSDOS_SHORT_BASE_LEN+MSDOS_SHORT_EXT_LEN-1);
((i > 0) &&
(*src_tmp == ' '));
i--,src_tmp--)
3d3f8: e2840009 add r0, r4, #9 <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
}
/*
* find last non-blank character of extension
*/
for ((i = MSDOS_SHORT_EXT_LEN ,
3d3fc: 13a00002 movne r0, #2 <== NOT EXECUTED
3d400: 1a00004e bne 3d540 <msdos_dir_read+0x4d8> <== NOT EXECUTED
3d404: e5500001 ldrb r0, [r0, #-1] <== NOT EXECUTED
3d408: e3500020 cmp r0, #32 <== NOT EXECUTED
3d40c: 0a00000e beq 3d44c <msdos_dir_read+0x3e4> <== NOT EXECUTED
3d410: ea000049 b 3d53c <msdos_dir_read+0x4d4> <== 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++));
3d414: e59fe140 ldr lr, [pc, #320] ; 3d55c <msdos_dir_read+0x4f4> <== NOT EXECUTED
3d418: e5d40008 ldrb r0, [r4, #8] <== NOT EXECUTED
3d41c: e59ec000 ldr ip, [lr] <== NOT EXECUTED
3d420: e08cc000 add ip, ip, r0 <== NOT EXECUTED
3d424: e5dcc001 ldrb ip, [ip, #1] <== NOT EXECUTED
3d428: e20cc003 and ip, ip, #3 <== NOT EXECUTED
3d42c: e35c0001 cmp ip, #1 <== NOT EXECUTED
3d430: 02800020 addeq r0, r0, #32 <== NOT EXECUTED
3d434: e4c30001 strb r0, [r3], #1 <== NOT EXECUTED
len++;
3d438: e2822001 add r2, r2, #1 <== NOT EXECUTED
3d43c: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3d440: e2844001 add r4, r4, #1 <== NOT EXECUTED
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
src_tmp = src + MSDOS_SHORT_BASE_LEN;
while (i-- > 0) {
3d444: e3510000 cmp r1, #0 <== NOT EXECUTED
3d448: cafffff1 bgt 3d414 <msdos_dir_read+0x3ac> <== NOT EXECUTED
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
3d44c: e3a00000 mov r0, #0 <== 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(
3d450: e3e01000 mvn r1, #0 <== NOT EXECUTED
while (i-- > 0) {
*dst++ = tolower((unsigned char)(*src_tmp++));
len++;
}
}
*dst = '\0'; /* terminate string */
3d454: e5c30000 strb r0, [r3] <== 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(
3d458: e1cd23b6 strh r2, [sp, #54] ; 0x36 <== NOT EXECUTED
3d45c: e58d100c str r1, [sp, #12] <== NOT EXECUTED
else
{
tmp_dirent.d_namlen = strlen(tmp_dirent.d_name);
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
3d460: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
3d464: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
3d468: e28d1028 add r1, sp, #40 ; 0x28 <== NOT EXECUTED
3d46c: e083000c add r0, r3, ip <== NOT EXECUTED
3d470: e3a02e11 mov r2, #272 ; 0x110 <== NOT EXECUTED
3d474: eb001083 bl 41688 <memcpy> <== NOT EXECUTED
iop->offset = iop->offset + sizeof(struct dirent);
3d478: e287400c add r4, r7, #12 <== NOT EXECUTED
3d47c: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
3d480: e3a01e11 mov r1, #272 ; 0x110 <== NOT EXECUTED
3d484: e0933001 adds r3, r3, r1 <== NOT EXECUTED
3d488: e3a02000 mov r2, #0 <== NOT EXECUTED
3d48c: e0a44002 adc r4, r4, r2 <== NOT EXECUTED
3d490: e587300c str r3, [r7, #12] <== NOT EXECUTED
3d494: e5874010 str r4, [r7, #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);
3d498: e5970028 ldr r0, [r7, #40] ; 0x28 <== NOT EXECUTED
3d49c: e59d114c ldr r1, [sp, #332] ; 0x14c <== NOT EXECUTED
3d4a0: ebff9400 bl 224a8 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
3d4a4: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3d4a8: 0a000005 beq 3d4c4 <msdos_dir_read+0x45c> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
3d4ac: e5980094 ldr r0, [r8, #148] ; 0x94 <== NOT EXECUTED
3d4b0: e1a05008 mov r5, r8 <== NOT EXECUTED
3d4b4: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
3d4b8: ebff3946 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
3d4bc: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3d4c0: ea000016 b 3d520 <msdos_dir_read+0x4b8> <== NOT EXECUTED
}
}
if (count <= 0)
3d4c4: e28d0010 add r0, sp, #16 <== NOT EXECUTED
3d4c8: e8904001 ldm r0, {r0, lr} <== NOT EXECUTED
3d4cc: e25eee11 subs lr, lr, #272 ; 0x110 <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
3d4d0: e2800e11 add r0, r0, #272 ; 0x110 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
3d4d4: e58de014 str lr, [sp, #20] <== NOT EXECUTED
}
memcpy(buffer + cmpltd, &tmp_dirent, sizeof(struct dirent));
iop->offset = iop->offset + sizeof(struct dirent);
cmpltd += (sizeof(struct dirent));
3d4d8: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
if (count <= 0)
3d4dc: 1a000002 bne 3d4ec <msdos_dir_read+0x484> <== NOT EXECUTED
3d4e0: ea000005 b 3d4fc <msdos_dir_read+0x494> <== NOT EXECUTED
3d4e4: e3e01000 mvn r1, #0 <== NOT EXECUTED
3d4e8: e58d100c str 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)
3d4ec: e2855020 add r5, r5, #32 <== NOT EXECUTED
3d4f0: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
3d4f4: e1550002 cmp r5, r2 <== NOT EXECUTED
3d4f8: 3affff20 bcc 3d180 <msdos_dir_read+0x118> <== NOT EXECUTED
3d4fc: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
3d500: e0866003 add r6, r6, r3 <== 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)
3d504: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
3d508: e35c0000 cmp ip, #0 <== NOT EXECUTED
3d50c: 1affff08 bne 3d134 <msdos_dir_read+0xcc> <== NOT EXECUTED
break;
}
j++;
}
rtems_semaphore_release(fs_info->vol_sema);
3d510: e5980094 ldr r0, [r8, #148] ; 0x94 <== NOT EXECUTED
3d514: ebff392f bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return cmpltd;
3d518: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
3d51c: e1a05008 mov r5, r8 <== NOT EXECUTED
}
3d520: e1a00003 mov r0, r3 <== NOT EXECUTED
3d524: e28dde15 add sp, sp, #336 ; 0x150 <== NOT EXECUTED
3d528: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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);
3d52c: e28d0038 add r0, sp, #56 ; 0x38 <== NOT EXECUTED
3d530: eb001eb2 bl 45000 <strlen> <== NOT EXECUTED
3d534: e1cd03b6 strh r0, [sp, #54] ; 0x36 <== NOT EXECUTED
3d538: eaffffc8 b 3d460 <msdos_dir_read+0x3f8> <== NOT EXECUTED
3d53c: e3a00001 mov r0, #1 <== NOT EXECUTED
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
len += i + 1; /* extension + dot */
3d540: e2812001 add r2, r1, #1 <== NOT EXECUTED
{};
/*
* extension is not empty
*/
if (i > 0) {
*dst++ = '.'; /* append dot */
3d544: e3a0102e mov r1, #46 ; 0x2e <== NOT EXECUTED
3d548: e4c31001 strb r1, [r3], #1 <== NOT EXECUTED
len += i + 1; /* extension + dot */
3d54c: e0822000 add r2, r2, r0 <== NOT EXECUTED
3d550: e1a01000 mov r1, r0 <== NOT EXECUTED
3d554: eaffffba b 3d444 <msdos_dir_read+0x3dc> <== NOT EXECUTED
0003cf28 <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)
{
3cf28: e92d40f1 push {r0, 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;
3cf2c: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
3cf30: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = pathloc->node_access;
bool is_empty = false;
3cf34: 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)
{
3cf38: e1a05001 mov r5, 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,
3cf3c: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
3cf40: e1a01003 mov r1, r3 <== NOT EXECUTED
3cf44: 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;
3cf48: 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;
3cf4c: e5956000 ldr r6, [r5] <== NOT EXECUTED
bool is_empty = false;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3cf50: ebff3a5a bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3cf54: e3500000 cmp r0, #0 <== NOT EXECUTED
3cf58: 0a000002 beq 3cf68 <msdos_dir_rmnod+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
3cf5c: eb000519 bl 3e3c8 <__errno> <== NOT EXECUTED
3cf60: e3a03005 mov r3, #5 <== NOT EXECUTED
3cf64: ea000006 b 3cf84 <msdos_dir_rmnod+0x5c> <== 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)
3cf68: e5963008 ldr r3, [r6, #8] <== NOT EXECUTED
3cf6c: e3530001 cmp r3, #1 <== NOT EXECUTED
3cf70: 9a000006 bls 3cf90 <msdos_dir_rmnod+0x68> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
3cf74: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
3cf78: ebff3a96 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EBUSY);
3cf7c: eb000511 bl 3e3c8 <__errno> <== NOT EXECUTED
3cf80: e3a03010 mov r3, #16 <== NOT EXECUTED
3cf84: e5803000 str r3, [r0] <== NOT EXECUTED
3cf88: e3e07000 mvn r7, #0 <== NOT EXECUTED
3cf8c: ea00001b b 3d000 <msdos_dir_rmnod+0xd8> <== NOT EXECUTED
}
/*
* You cannot remove a node that still has children
*/
rc = msdos_dir_is_empty(pathloc->mt_entry, fat_fd, &is_empty);
3cf90: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
3cf94: e1a01006 mov r1, r6 <== NOT EXECUTED
3cf98: e28d2003 add r2, sp, #3 <== NOT EXECUTED
3cf9c: ebffd8ad bl 33258 <msdos_dir_is_empty> <== NOT EXECUTED
if (rc != RC_OK)
3cfa0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3cfa4: 1a000013 bne 3cff8 <msdos_dir_rmnod+0xd0> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (!is_empty)
3cfa8: e5dd3003 ldrb r3, [sp, #3] <== NOT EXECUTED
3cfac: e3530000 cmp r3, #0 <== NOT EXECUTED
3cfb0: 1a000004 bne 3cfc8 <msdos_dir_rmnod+0xa0> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
3cfb4: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
3cfb8: ebff3a86 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOTEMPTY);
3cfbc: eb000501 bl 3e3c8 <__errno> <== NOT EXECUTED
3cfc0: e3a0305a mov r3, #90 ; 0x5a <== NOT EXECUTED
3cfc4: eaffffee b 3cf84 <msdos_dir_rmnod+0x5c> <== NOT EXECUTED
}
/*
* You cannot remove the file system root node.
*/
if (pathloc->mt_entry->mt_fs_root.node_access == pathloc->node_access)
3cfc8: e5950010 ldr r0, [r5, #16] <== NOT EXECUTED
3cfcc: e5953000 ldr r3, [r5] <== NOT EXECUTED
3cfd0: e590201c ldr r2, [r0, #28] <== NOT EXECUTED
3cfd4: e1520003 cmp r2, r3 <== NOT EXECUTED
3cfd8: 0affffe5 beq 3cf74 <msdos_dir_rmnod+0x4c> <== 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,
3cfdc: e2861020 add r1, r6, #32 <== NOT EXECUTED
3cfe0: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
3cfe4: ebffd92e bl 334a4 <msdos_set_first_char4file_name> <== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
3cfe8: 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);
3cfec: 05950010 ldreq r0, [r5, #16] <== NOT EXECUTED
3cff0: 01a01006 moveq r1, r6 <== NOT EXECUTED
3cff4: 0bff9331 bleq 21cc0 <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
3cff8: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
3cffc: ebff3a75 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
3d000: e1a00007 mov r0, r7 <== NOT EXECUTED
3d004: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0003ce80 <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;
3ce80: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3ce84: 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;
3ce88: e5925034 ldr r5, [r2, #52] ; 0x34 <== NOT EXECUTED
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3ce8c: 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,
3ce90: e3a01000 mov r1, #0 <== NOT EXECUTED
int
msdos_dir_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3ce94: 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,
3ce98: e1a02001 mov r2, r1 <== NOT EXECUTED
3ce9c: 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;
3cea0: e5936000 ldr r6, [r3] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3cea4: ebff3a85 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3cea8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3ceac: 0a000004 beq 3cec4 <msdos_dir_stat+0x44> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
3ceb0: eb000544 bl 3e3c8 <__errno> <== NOT EXECUTED
3ceb4: e3a03005 mov r3, #5 <== NOT EXECUTED
3ceb8: e5803000 str r3, [r0] <== NOT EXECUTED
3cebc: e3e00000 mvn r0, #0 <== NOT EXECUTED
3cec0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
3cec4: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
3cec8: e5843008 str r3, [r4, #8] <== NOT EXECUTED
buf->st_mode = S_IFDIR | S_IRWXU | S_IRWXG | S_IRWXO;
3cecc: e59f3050 ldr r3, [pc, #80] ; 3cf24 <msdos_dir_stat+0xa4> <== NOT EXECUTED
3ced0: e584300c str r3, [r4, #12] <== NOT EXECUTED
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
3ced4: 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;
3ced8: 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;
3cedc: e1a014a3 lsr r1, r3, #9 <== NOT EXECUTED
3cee0: e5841044 str r1, [r4, #68] ; 0x44 <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
3cee4: e5842040 str r2, [r4, #64] ; 0x40 <== NOT EXECUTED
buf->st_mtime = fat_fd->mtime;
3cee8: e5962040 ldr r2, [r6, #64] ; 0x40 <== NOT EXECUTED
3ceec: 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;
3cef0: e2852054 add r2, r5, #84 ; 0x54 <== NOT EXECUTED
3cef4: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
3cef8: 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;
3cefc: e3a01000 mov r1, #0 <== NOT EXECUTED
3cf00: e3a02000 mov r2, #0 <== NOT EXECUTED
3cf04: e5841018 str r1, [r4, #24] <== NOT EXECUTED
3cf08: e584201c str r2, [r4, #28] <== NOT EXECUTED
buf->st_size = fat_fd->fat_file_size;
3cf0c: e5843020 str r3, [r4, #32] <== NOT EXECUTED
3cf10: 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);
3cf14: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
3cf18: ebff3aae bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
3cf1c: e1a00007 mov r0, r7 <== NOT EXECUTED
return RC_OK;
}
3cf20: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0003d008 <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;
3d008: 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)
{
3d00c: 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;
3d010: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3d014: 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)
{
3d018: 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,
3d01c: e1a02001 mov r2, r1 <== NOT EXECUTED
3d020: 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;
3d024: 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,
3d028: ebff3a24 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
3d02c: e3500000 cmp r0, #0 <== NOT EXECUTED
3d030: 0a000004 beq 3d048 <msdos_dir_sync+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
3d034: eb0004e3 bl 3e3c8 <__errno> <== NOT EXECUTED
3d038: e3a03005 mov r3, #5 <== NOT EXECUTED
3d03c: e5803000 str r3, [r0] <== NOT EXECUTED
3d040: e3e04000 mvn r4, #0 <== NOT EXECUTED
3d044: ea000005 b 3d060 <msdos_dir_sync+0x58> <== NOT EXECUTED
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
3d048: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
3d04c: e1a01006 mov r1, r6 <== NOT EXECUTED
3d050: ebff92da bl 21bc0 <fat_file_datasync> <== NOT EXECUTED
3d054: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
3d058: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
3d05c: ebff3a5d bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
3d060: e1a00004 mov r0, r4 <== NOT EXECUTED
3d064: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00031ef0 <msdos_eval4make>:
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
31ef0: 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;
31ef4: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
31ef8: e593a034 ldr sl, [r3, #52] ; 0x34 <== NOT EXECUTED
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
31efc: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
31f00: 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,
31f04: e3a01000 mov r1, #0 <== NOT EXECUTED
msdos_eval4make(
const char *path,
rtems_filesystem_location_info_t *pathloc,
const char **name
)
{
31f08: e58d2000 str r2, [sp] <== NOT EXECUTED
31f0c: e1a07000 mov r7, 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,
31f10: e1a02001 mov r2, r1 <== NOT EXECUTED
31f14: e59a0094 ldr r0, [sl, #148] ; 0x94 <== NOT EXECUTED
31f18: ebff6668 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
31f1c: e3500000 cmp r0, #0 <== NOT EXECUTED
31f20: 0a000004 beq 31f38 <msdos_eval4make+0x48> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
31f24: eb003127 bl 3e3c8 <__errno> <== NOT EXECUTED
31f28: e3a03005 mov r3, #5 <== NOT EXECUTED
31f2c: e5803000 str r3, [r0] <== NOT EXECUTED
31f30: e3e05000 mvn r5, #0 <== NOT EXECUTED
31f34: ea000086 b 32154 <msdos_eval4make+0x264> <== NOT EXECUTED
if (!pathloc->node_access)
31f38: e5940000 ldr r0, [r4] <== NOT EXECUTED
31f3c: e3500000 cmp r0, #0 <== NOT EXECUTED
31f40: 1a000004 bne 31f58 <msdos_eval4make+0x68> <== NOT EXECUTED
{
errno = ENOENT;
31f44: eb00311f bl 3e3c8 <__errno> <== NOT EXECUTED
31f48: e3a03002 mov r3, #2 <== NOT EXECUTED
31f4c: e5803000 str r3, [r0] <== NOT EXECUTED
31f50: e3e05000 mvn r5, #0 <== NOT EXECUTED
rc = -1;
goto err;
31f54: ea00007c b 3214c <msdos_eval4make+0x25c> <== NOT EXECUTED
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
31f58: ebffbec5 bl 21a74 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
31f5c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
31f60: 1a000079 bne 3214c <msdos_eval4make+0x25c> <== 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)
31f64: e59f91f4 ldr r9, [pc, #500] ; 32160 <msdos_eval4make+0x270><== NOT EXECUTED
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
31f68: e1a06005 mov r6, r5 <== NOT EXECUTED
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
31f6c: e0878006 add r8, r7, r6 <== NOT EXECUTED
31f70: e1a00008 mov r0, r8 <== NOT EXECUTED
31f74: eb004c21 bl 45000 <strlen> <== NOT EXECUTED
31f78: e28d2018 add r2, sp, #24 <== NOT EXECUTED
31f7c: e1a01000 mov r1, r0 <== NOT EXECUTED
31f80: e28d301c add r3, sp, #28 <== NOT EXECUTED
31f84: e1a00008 mov r0, r8 <== NOT EXECUTED
31f88: eb0005dc bl 33700 <msdos_get_token> <== NOT EXECUTED
i += token_len;
fat_fd = pathloc->node_access;
31f8c: e594e000 ldr lr, [r4] <== NOT EXECUTED
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
31f90: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
fat_fd = pathloc->node_access;
31f94: e1a0800e mov r8, lr <== NOT EXECUTED
goto err;
while (!done)
{
type = msdos_get_token(&path[i], strlen(&path[i]), &token, &token_len);
i += token_len;
31f98: e0866002 add r6, r6, r2 <== NOT EXECUTED
fat_fd = pathloc->node_access;
switch (type)
31f9c: e3500004 cmp r0, #4 <== NOT EXECUTED
31fa0: 979ff100 ldrls pc, [pc, r0, lsl #2] <== NOT EXECUTED
31fa4: eafffff0 b 31f6c <msdos_eval4make+0x7c> <== NOT EXECUTED
31fa8: 000320bc .word 0x000320bc <== NOT EXECUTED
31fac: 00031f6c .word 0x00031f6c <== NOT EXECUTED
31fb0: 00031fbc .word 0x00031fbc <== NOT EXECUTED
31fb4: 0003208c .word 0x0003208c <== NOT EXECUTED
31fb8: 000320c8 .word 0x000320c8 <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
31fbc: e59e3010 ldr r3, [lr, #16] <== NOT EXECUTED
31fc0: e3530001 cmp r3, #1 <== NOT EXECUTED
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
31fc4: 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)
31fc8: 1a000053 bne 3211c <msdos_eval4make+0x22c> <== NOT EXECUTED
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access)
31fcc: e594c010 ldr ip, [r4, #16] <== NOT EXECUTED
}
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
31fd0: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
31fd4: e15e0003 cmp lr, r3 <== NOT EXECUTED
31fd8: 1a00001f bne 3205c <msdos_eval4make+0x16c> <== 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)
31fdc: e5993000 ldr r3, [r9] <== NOT EXECUTED
31fe0: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
31fe4: e15e0003 cmp lr, r3 <== NOT EXECUTED
31fe8: 0affffdf beq 31f6c <msdos_eval4make+0x7c> <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
31fec: e28cc008 add ip, ip, #8 <== NOT EXECUTED
31ff0: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
31ff4: e28d8004 add r8, sp, #4 <== NOT EXECUTED
31ff8: e8a8000f stmia r8!, {r0, r1, r2, r3} <== NOT EXECUTED
*pathloc = newloc;
31ffc: e28d5004 add r5, sp, #4 <== NOT EXECUTED
32000: e8b5000f ldm r5!, {r0, r1, r2, r3} <== NOT EXECUTED
32004: e1a05004 mov r5, r4 <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
32008: e59cc000 ldr ip, [ip] <== NOT EXECUTED
*pathloc = newloc;
3200c: e8a5000f stmia r5!, {r0, r1, r2, r3} <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
32010: e1a0000c mov r0, ip <== NOT EXECUTED
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
32014: e585c000 str ip, [r5] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
32018: e1a0100e mov r1, lr <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
3201c: e588c000 str ip, [r8] <== NOT EXECUTED
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
32020: ebffc120 bl 224a8 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
32024: e2505000 subs r5, r0, #0 <== NOT EXECUTED
32028: 1a000047 bne 3214c <msdos_eval4make+0x25c> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
3202c: e59a0094 ldr r0, [sl, #148] ; 0x94 <== NOT EXECUTED
32030: ebff6668 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(&path[i-token_len],
32034: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
32038: e0636006 rsb r6, r3, r6 <== NOT EXECUTED
3203c: e0870006 add r0, r7, r6 <== NOT EXECUTED
32040: e1a01004 mov r1, r4 <== NOT EXECUTED
32044: e59d2000 ldr r2, [sp] <== NOT EXECUTED
32048: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3204c: e1a0e00f mov lr, pc <== NOT EXECUTED
32050: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
32054: e1a05000 mov r5, r0 <== NOT EXECUTED
32058: ea00003d b 32154 <msdos_eval4make+0x264> <== NOT EXECUTED
pathloc, name);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
3205c: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
32060: eb0006ff bl 33c64 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
32064: e250b000 subs fp, r0, #0 <== NOT EXECUTED
32068: 0affffbf beq 31f6c <msdos_eval4make+0x7c> <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
3206c: e59f30f0 ldr r3, [pc, #240] ; 32164 <msdos_eval4make+0x274><== NOT EXECUTED
32070: e15b0003 cmp fp, r3 <== NOT EXECUTED
32074: 1a000030 bne 3213c <msdos_eval4make+0x24c> <== NOT EXECUTED
{
errno = ENOENT;
32078: eb0030d2 bl 3e3c8 <__errno> <== NOT EXECUTED
3207c: e3a03002 mov r3, #2 <== NOT EXECUTED
32080: e5803000 str r3, [r0] <== NOT EXECUTED
32084: e3e0b000 mvn fp, #0 <== NOT EXECUTED
32088: ea00002b b 3213c <msdos_eval4make+0x24c> <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
3208c: e59e3010 ldr r3, [lr, #16] <== NOT EXECUTED
32090: 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);
32094: e1a00004 mov r0, r4 <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
32098: 1a00001f bne 3211c <msdos_eval4make+0x22c> <== 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);
3209c: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
320a0: eb0006ef bl 33c64 <msdos_find_name> <== NOT EXECUTED
if (rc)
320a4: e3500000 cmp r0, #0 <== NOT EXECUTED
320a8: 0affffaf beq 31f6c <msdos_eval4make+0x7c> <== NOT EXECUTED
{
if (rc != MSDOS_NAME_NOT_FOUND_ERR)
320ac: e59f30b0 ldr r3, [pc, #176] ; 32164 <msdos_eval4make+0x274><== NOT EXECUTED
320b0: e1500003 cmp r0, r3 <== NOT EXECUTED
320b4: 0a000006 beq 320d4 <msdos_eval4make+0x1e4> <== NOT EXECUTED
320b8: eaffffee b 32078 <msdos_eval4make+0x188> <== NOT EXECUTED
done = true;
}
break;
case MSDOS_NO_MORE_PATH:
errno = EEXIST;
320bc: eb0030c1 bl 3e3c8 <__errno> <== NOT EXECUTED
320c0: e3a03011 mov r3, #17 <== NOT EXECUTED
320c4: eaffffed b 32080 <msdos_eval4make+0x190> <== NOT EXECUTED
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
320c8: eb0030be bl 3e3c8 <__errno> <== NOT EXECUTED
320cc: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
320d0: eaffffea b 32080 <msdos_eval4make+0x190> <== NOT EXECUTED
break;
}
}
*name = &path[i - token_len];
320d4: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
320d8: e59d2000 ldr r2, [sp] <== NOT EXECUTED
320dc: e0633006 rsb r3, r3, r6 <== NOT EXECUTED
320e0: e0873003 add r3, r7, r3 <== NOT EXECUTED
320e4: e5823000 str r3, [r2] <== NOT EXECUTED
320e8: e0876006 add r6, r7, r6 <== 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++)
320ec: ea000003 b 32100 <msdos_eval4make+0x210> <== NOT EXECUTED
{
if (!msdos_is_separator(path[i]))
320f0: ebff5ba4 bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
320f4: e3500000 cmp r0, #0 <== NOT EXECUTED
320f8: e2866001 add r6, r6, #1 <== NOT EXECUTED
320fc: 0affffdd beq 32078 <msdos_eval4make+0x188> <== 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++)
32100: e5d63000 ldrb r3, [r6] <== NOT EXECUTED
32104: e2530000 subs r0, r3, #0 <== NOT EXECUTED
32108: 1afffff8 bne 320f0 <msdos_eval4make+0x200> <== NOT EXECUTED
rc = -1;
goto error;
}
}
fat_fd = pathloc->node_access;
3210c: e5948000 ldr r8, [r4] <== NOT EXECUTED
if (fat_fd->fat_file_type != FAT_DIRECTORY)
32110: e5983010 ldr r3, [r8, #16] <== NOT EXECUTED
32114: e3530001 cmp r3, #1 <== NOT EXECUTED
32118: 0a000002 beq 32128 <msdos_eval4make+0x238> <== NOT EXECUTED
{
errno = ENOTDIR;
3211c: eb0030a9 bl 3e3c8 <__errno> <== NOT EXECUTED
32120: e3a03014 mov r3, #20 <== NOT EXECUTED
32124: eaffffd5 b 32080 <msdos_eval4make+0x190> <== 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;
32128: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
3212c: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
32130: e593308c ldr r3, [r3, #140] ; 0x8c <== NOT EXECUTED
32134: e5843008 str r3, [r4, #8] <== NOT EXECUTED
32138: ea000003 b 3214c <msdos_eval4make+0x25c> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
3213c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
32140: e1a01008 mov r1, r8 <== NOT EXECUTED
32144: ebffc0d7 bl 224a8 <fat_file_close> <== NOT EXECUTED
32148: e1a0500b mov r5, fp <== NOT EXECUTED
err:
rtems_semaphore_release(fs_info->vol_sema);
3214c: e59a0094 ldr r0, [sl, #148] ; 0x94 <== NOT EXECUTED
32150: ebff6620 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
32154: e1a00005 mov r0, r5 <== NOT EXECUTED
32158: e28dd020 add sp, sp, #32 <== NOT EXECUTED
3215c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00031c9c <msdos_eval_path>:
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
31c9c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
31ca0: 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;
31ca4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
31ca8: e5939034 ldr r9, [r3, #52] ; 0x34 <== NOT EXECUTED
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
31cac: 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;
31cb0: e3a03000 mov r3, #0 <== NOT EXECUTED
const char *pathname,
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc
)
{
31cb4: e88d0005 stm sp, {r0, r2} <== NOT EXECUTED
31cb8: e1a0a001 mov sl, 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,
31cbc: e5990094 ldr r0, [r9, #148] ; 0x94 <== NOT EXECUTED
31cc0: e1a01003 mov r1, r3 <== NOT EXECUTED
31cc4: 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;
31cc8: 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,
31ccc: ebff66fb bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
31cd0: e3500000 cmp r0, #0 <== NOT EXECUTED
31cd4: 0a000004 beq 31cec <msdos_eval_path+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
31cd8: eb0031ba bl 3e3c8 <__errno> <== NOT EXECUTED
31cdc: e3a03005 mov r3, #5 <== NOT EXECUTED
31ce0: e5803000 str r3, [r0] <== NOT EXECUTED
31ce4: e3e05000 mvn r5, #0 <== NOT EXECUTED
31ce8: ea00007b b 31edc <msdos_eval_path+0x240> <== NOT EXECUTED
if (!pathloc->node_access)
31cec: e5940000 ldr r0, [r4] <== NOT EXECUTED
31cf0: e3500000 cmp r0, #0 <== NOT EXECUTED
31cf4: 1a000004 bne 31d0c <msdos_eval_path+0x70> <== NOT EXECUTED
{
errno = ENOENT;
31cf8: eb0031b2 bl 3e3c8 <__errno> <== NOT EXECUTED
31cfc: e3a03002 mov r3, #2 <== NOT EXECUTED
31d00: e5803000 str r3, [r0] <== NOT EXECUTED
31d04: e3e05000 mvn r5, #0 <== NOT EXECUTED
rc = -1;
goto err;
31d08: ea000071 b 31ed4 <msdos_eval_path+0x238> <== NOT EXECUTED
}
fat_fd = pathloc->node_access;
rc = fat_file_reopen(fat_fd);
31d0c: ebffbf58 bl 21a74 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
31d10: e2505000 subs r5, r0, #0 <== NOT EXECUTED
31d14: 03a06001 moveq r6, #1 <== NOT EXECUTED
31d18: 01a08005 moveq r8, r5 <== NOT EXECUTED
31d1c: 0a000057 beq 31e80 <msdos_eval_path+0x1e4> <== NOT EXECUTED
31d20: ea00006b b 31ed4 <msdos_eval_path+0x238> <== NOT EXECUTED
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
31d24: eb000675 bl 33700 <msdos_get_token> <== NOT EXECUTED
pathnamelen -= token_len;
31d28: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
i += token_len;
fat_fd = pathloc->node_access;
switch (type)
31d2c: 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);
31d30: e1a06000 mov r6, r0 <== NOT EXECUTED
pathnamelen -= token_len;
31d34: e062a00a rsb sl, r2, sl <== NOT EXECUTED
i += token_len;
31d38: e0888002 add r8, r8, r2 <== NOT EXECUTED
fat_fd = pathloc->node_access;
31d3c: e5947000 ldr r7, [r4] <== NOT EXECUTED
switch (type)
31d40: 0a000039 beq 31e2c <msdos_eval_path+0x190> <== NOT EXECUTED
31d44: e3500004 cmp r0, #4 <== NOT EXECUTED
31d48: 0a000048 beq 31e70 <msdos_eval_path+0x1d4> <== NOT EXECUTED
31d4c: e3500002 cmp r0, #2 <== NOT EXECUTED
31d50: 1a00004a bne 31e80 <msdos_eval_path+0x1e4> <== NOT EXECUTED
{
case MSDOS_UP_DIR:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
31d54: e5973010 ldr r3, [r7, #16] <== NOT EXECUTED
31d58: e3530001 cmp r3, #1 <== NOT EXECUTED
flags, pathloc);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
31d5c: 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)
31d60: 1a000035 bne 31e3c <msdos_eval_path+0x1a0> <== NOT EXECUTED
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
pathloc->mt_entry->mt_fs_root.node_access)
31d64: e594c010 ldr ip, [r4, #16] <== NOT EXECUTED
}
/*
* Am I at the root of this mounted filesystem?
*/
if (pathloc->node_access ==
31d68: e59c301c ldr r3, [ip, #28] <== NOT EXECUTED
31d6c: e1570003 cmp r7, r3 <== NOT EXECUTED
31d70: 1a000022 bne 31e00 <msdos_eval_path+0x164> <== 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)
31d74: e59f216c ldr r2, [pc, #364] ; 31ee8 <msdos_eval_path+0x24c><== NOT EXECUTED
31d78: e5923000 ldr r3, [r2] <== NOT EXECUTED
31d7c: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
31d80: e1570003 cmp r7, r3 <== NOT EXECUTED
31d84: 0a00003d beq 31e80 <msdos_eval_path+0x1e4> <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
31d88: e28cc008 add ip, ip, #8 <== NOT EXECUTED
31d8c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
31d90: e28d5008 add r5, sp, #8 <== NOT EXECUTED
31d94: e8a5000f stmia r5!, {r0, r1, r2, r3} <== NOT EXECUTED
*pathloc = newloc;
31d98: e28de008 add lr, sp, #8 <== NOT EXECUTED
31d9c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
31da0: e1a0e004 mov lr, r4 <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
31da4: e59cc000 ldr ip, [ip] <== NOT EXECUTED
*pathloc = newloc;
31da8: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
31dac: e1a0000c mov r0, ip <== NOT EXECUTED
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
*pathloc = newloc;
31db0: e58ec000 str ip, [lr] <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, fat_fd);
31db4: e1a01007 mov r1, r7 <== NOT EXECUTED
{
break; /* Throw out the .. in this case */
}
else
{
newloc = pathloc->mt_entry->mt_point_node;
31db8: e585c000 str ip, [r5] <== NOT EXECUTED
*pathloc = newloc;
rc = fat_file_close(pathloc->mt_entry, fat_fd);
31dbc: ebffc1b9 bl 224a8 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
31dc0: e2505000 subs r5, r0, #0 <== NOT EXECUTED
31dc4: 1a000042 bne 31ed4 <msdos_eval_path+0x238> <== NOT EXECUTED
goto err;
rtems_semaphore_release(fs_info->vol_sema);
31dc8: e5990094 ldr r0, [r9, #148] ; 0x94 <== NOT EXECUTED
31dcc: ebff6701 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(&(pathname[i-token_len]),
31dd0: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
31dd4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
31dd8: e0610008 rsb r0, r1, r8 <== NOT EXECUTED
31ddc: e0820000 add r0, r2, r0 <== NOT EXECUTED
31de0: e08a1001 add r1, sl, r1 <== NOT EXECUTED
31de4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
31de8: e1a03004 mov r3, r4 <== NOT EXECUTED
31dec: e594c00c ldr ip, [r4, #12] <== NOT EXECUTED
31df0: e1a0e00f mov lr, pc <== NOT EXECUTED
31df4: e59cf000 ldr pc, [ip] <== NOT EXECUTED
31df8: e1a05000 mov r5, r0 <== NOT EXECUTED
31dfc: ea000036 b 31edc <msdos_eval_path+0x240> <== NOT EXECUTED
flags, pathloc);
}
}
else
{
rc = msdos_find_name(pathloc, token, token_len);
31e00: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
31e04: eb000796 bl 33c64 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
31e08: e250b000 subs fp, r0, #0 <== NOT EXECUTED
31e0c: 0a00001b beq 31e80 <msdos_eval_path+0x1e4> <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
31e10: e59f30d4 ldr r3, [pc, #212] ; 31eec <msdos_eval_path+0x250><== NOT EXECUTED
31e14: e15b0003 cmp fp, r3 <== NOT EXECUTED
31e18: 1a000029 bne 31ec4 <msdos_eval_path+0x228> <== NOT EXECUTED
{
errno = ENOENT;
31e1c: eb003169 bl 3e3c8 <__errno> <== NOT EXECUTED
31e20: e5806000 str r6, [r0] <== NOT EXECUTED
31e24: e3e0b000 mvn fp, #0 <== NOT EXECUTED
31e28: ea000025 b 31ec4 <msdos_eval_path+0x228> <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
31e2c: e5973010 ldr r3, [r7, #16] <== NOT EXECUTED
31e30: 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);
31e34: e1a00004 mov r0, r4 <== NOT EXECUTED
case MSDOS_NAME:
/*
* Only a directory can be decended into.
*/
if (fat_fd->fat_file_type != FAT_DIRECTORY)
31e38: 0a000002 beq 31e48 <msdos_eval_path+0x1ac> <== NOT EXECUTED
{
errno = ENOTSUP;
31e3c: eb003161 bl 3e3c8 <__errno> <== NOT EXECUTED
31e40: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
31e44: ea00000b b 31e78 <msdos_eval_path+0x1dc> <== 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);
31e48: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
31e4c: eb000784 bl 33c64 <msdos_find_name> <== NOT EXECUTED
if (rc != RC_OK)
31e50: e250b000 subs fp, r0, #0 <== NOT EXECUTED
31e54: 0a000009 beq 31e80 <msdos_eval_path+0x1e4> <== NOT EXECUTED
{
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
31e58: e59f308c ldr r3, [pc, #140] ; 31eec <msdos_eval_path+0x250><== NOT EXECUTED
31e5c: e15b0003 cmp fp, r3 <== NOT EXECUTED
31e60: 1a000017 bne 31ec4 <msdos_eval_path+0x228> <== NOT EXECUTED
{
errno = ENOENT;
31e64: eb003157 bl 3e3c8 <__errno> <== NOT EXECUTED
31e68: e3a03002 mov r3, #2 <== NOT EXECUTED
31e6c: ea000001 b 31e78 <msdos_eval_path+0x1dc> <== NOT EXECUTED
case MSDOS_NO_MORE_PATH:
case MSDOS_CURRENT_DIR:
break;
case MSDOS_INVALID_TOKEN:
errno = ENAMETOOLONG;
31e70: eb003154 bl 3e3c8 <__errno> <== NOT EXECUTED
31e74: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
31e78: e5803000 str r3, [r0] <== NOT EXECUTED
31e7c: eaffffe8 b 31e24 <msdos_eval_path+0x188> <== 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);
31e80: e59dc000 ldr ip, [sp] <== NOT EXECUTED
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
31e84: e3560004 cmp r6, #4 <== NOT EXECUTED
31e88: 13560000 cmpne r6, #0 <== NOT EXECUTED
{
type = msdos_get_token(&pathname[i], pathnamelen, &token, &token_len);
31e8c: e1a0100a mov r1, sl <== NOT EXECUTED
31e90: e28d201c add r2, sp, #28 <== NOT EXECUTED
31e94: e28d3020 add r3, sp, #32 <== NOT EXECUTED
31e98: e08c0008 add r0, ip, r8 <== NOT EXECUTED
rc = fat_file_reopen(fat_fd);
if (rc != RC_OK)
goto err;
while ((type != MSDOS_NO_MORE_PATH) && (type != MSDOS_INVALID_TOKEN))
31e9c: 1affffa0 bne 31d24 <msdos_eval_path+0x88> <== NOT EXECUTED
*/
static void
msdos_set_handlers(rtems_filesystem_location_info_t *loc)
{
msdos_fs_info_t *fs_info = loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = loc->node_access;
31ea0: e5943000 ldr r3, [r4] <== NOT EXECUTED
31ea4: e5932010 ldr r2, [r3, #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;
31ea8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
31eac: e5933034 ldr r3, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = loc->node_access;
31eb0: e3520001 cmp r2, #1 <== NOT EXECUTED
if (fat_fd->fat_file_type == FAT_DIRECTORY)
loc->handlers = fs_info->directory_handlers;
31eb4: 0593308c ldreq r3, [r3, #140] ; 0x8c <== NOT EXECUTED
else
loc->handlers = fs_info->file_handlers;
31eb8: 15933090 ldrne r3, [r3, #144] ; 0x90 <== NOT EXECUTED
31ebc: e5843008 str r3, [r4, #8] <== NOT EXECUTED
31ec0: ea000003 b 31ed4 <msdos_eval_path+0x238> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return RC_OK;
error:
fat_file_close(pathloc->mt_entry, fat_fd);
31ec4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31ec8: e1a01007 mov r1, r7 <== NOT EXECUTED
31ecc: ebffc175 bl 224a8 <fat_file_close> <== NOT EXECUTED
31ed0: e1a0500b mov r5, fp <== NOT EXECUTED
err:
rtems_semaphore_release(fs_info->vol_sema);
31ed4: e5990094 ldr r0, [r9, #148] ; 0x94 <== NOT EXECUTED
31ed8: ebff66be bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
31edc: e1a00005 mov r0, r5 <== NOT EXECUTED
31ee0: e28dd024 add sp, sp, #36 ; 0x24 <== NOT EXECUTED
31ee4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00032170 <msdos_file_chmod>:
int
msdos_file_chmod(rtems_filesystem_location_info_t *pathloc,
mode_t mode)
{
return RC_OK;
}
32170: e3a00000 mov r0, #0 <== NOT EXECUTED
32174: e12fff1e bx lr <== NOT EXECUTED
0003265c <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;
3265c: 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)
{
32660: 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;
32664: 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,
32668: 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)
{
3266c: 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,
32670: e1a02001 mov r2, r1 <== NOT EXECUTED
32674: e5950094 ldr r0, [r5, #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;
32678: e5946038 ldr r6, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3267c: ebff648f bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
32680: e3500000 cmp r0, #0 <== NOT EXECUTED
32684: 0a000004 beq 3269c <msdos_file_close+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
32688: eb002f4e bl 3e3c8 <__errno> <== NOT EXECUTED
3268c: e3a03005 mov r3, #5 <== NOT EXECUTED
32690: e5803000 str r3, [r0] <== NOT EXECUTED
32694: e3e07000 mvn r7, #0 <== NOT EXECUTED
32698: ea000017 b 326fc <msdos_file_close+0xa0> <== 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))
3269c: e5d63030 ldrb r3, [r6, #48] ; 0x30 <== NOT EXECUTED
326a0: e3130001 tst r3, #1 <== NOT EXECUTED
326a4: 1a00000e bne 326e4 <msdos_file_close+0x88> <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
326a8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
326ac: e1a01006 mov r1, r6 <== NOT EXECUTED
326b0: eb00034e bl 333f0 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
326b4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
326b8: 1a00000d bne 326f4 <msdos_file_close+0x98> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
rc = msdos_set_file_size(iop->pathinfo.mt_entry, fat_fd);
326bc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
326c0: e1a01006 mov r1, r6 <== NOT EXECUTED
326c4: eb00032b bl 33378 <msdos_set_file_size> <== NOT EXECUTED
if (rc != RC_OK)
326c8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
326cc: 1a000008 bne 326f4 <msdos_file_close+0x98> <== 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);
326d0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
326d4: e1a01006 mov r1, r6 <== NOT EXECUTED
326d8: eb0003c0 bl 335e0 <msdos_set_dir_wrt_time_and_date> <== NOT EXECUTED
if (rc != RC_OK)
326dc: e2507000 subs r7, r0, #0 <== NOT EXECUTED
326e0: 1a000003 bne 326f4 <msdos_file_close+0x98> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
}
rc = fat_file_close(iop->pathinfo.mt_entry, fat_fd);
326e4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
326e8: e1a01006 mov r1, r6 <== NOT EXECUTED
326ec: ebffbf6d bl 224a8 <fat_file_close> <== NOT EXECUTED
326f0: e1a07000 mov r7, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
326f4: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
326f8: ebff64b6 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
326fc: e1a00007 mov r0, r7 <== NOT EXECUTED
32700: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00032290 <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;
32290: 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)
{
32294: 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;
32298: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3229c: 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)
{
322a0: 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,
322a4: e1a02001 mov r2, r1 <== NOT EXECUTED
322a8: 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;
322ac: 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,
322b0: ebff6582 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
322b4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
322b8: 0a000004 beq 322d0 <msdos_file_datasync+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
322bc: eb003041 bl 3e3c8 <__errno> <== NOT EXECUTED
322c0: e3a03005 mov r3, #5 <== NOT EXECUTED
322c4: e5803000 str r3, [r0] <== NOT EXECUTED
322c8: e3e00000 mvn r0, #0 <== NOT EXECUTED
322cc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
322d0: e1a01006 mov r1, r6 <== NOT EXECUTED
322d4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
322d8: ebffbe38 bl 21bc0 <fat_file_datasync> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
322dc: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
322e0: ebff65bc bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
322e4: e1a00007 mov r0, r7 <== NOT EXECUTED
return RC_OK;
}
322e8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000323a8 <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)
{
323a8: 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;
323ac: 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)
{
323b0: e1a08002 mov r8, 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;
323b4: e5906038 ldr r6, [r0, #56] ; 0x38 <== NOT EXECUTED
if (length >= fat_fd->fat_file_size)
323b8: e3a02000 mov r2, #0 <== NOT EXECUTED
323bc: e1520008 cmp r2, r8 <== 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;
323c0: e5937034 ldr r7, [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)
{
323c4: e1a04000 mov r4, r0 <== NOT EXECUTED
323c8: e1a05001 mov r5, 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)
323cc: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED
323d0: ca000004 bgt 323e8 <msdos_file_ftruncate+0x40> <== NOT EXECUTED
323d4: 1a000001 bne 323e0 <msdos_file_ftruncate+0x38> <== NOT EXECUTED
323d8: e1530001 cmp r3, r1 <== NOT EXECUTED
323dc: 8a000001 bhi 323e8 <msdos_file_ftruncate+0x40> <== NOT EXECUTED
323e0: e3a0a000 mov sl, #0 <== NOT EXECUTED
323e4: ea00001c b 3245c <msdos_file_ftruncate+0xb4> <== NOT EXECUTED
return RC_OK;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
323e8: e3a01000 mov r1, #0 <== NOT EXECUTED
323ec: e5970094 ldr r0, [r7, #148] ; 0x94 <== NOT EXECUTED
323f0: e1a02001 mov r2, r1 <== NOT EXECUTED
323f4: ebff6531 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
323f8: e3500000 cmp r0, #0 <== NOT EXECUTED
323fc: 0a000004 beq 32414 <msdos_file_ftruncate+0x6c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
32400: eb002ff0 bl 3e3c8 <__errno> <== NOT EXECUTED
32404: e3a03005 mov r3, #5 <== NOT EXECUTED
32408: e5803000 str r3, [r0] <== NOT EXECUTED
3240c: e3e0a000 mvn sl, #0 <== NOT EXECUTED
32410: ea000011 b 3245c <msdos_file_ftruncate+0xb4> <== NOT EXECUTED
rc = fat_file_truncate(iop->pathinfo.mt_entry, fat_fd, length);
32414: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
32418: e1a01006 mov r1, r6 <== NOT EXECUTED
3241c: e1a02005 mov r2, r5 <== NOT EXECUTED
32420: ebffbe67 bl 21dc4 <fat_file_truncate> <== NOT EXECUTED
if (rc != RC_OK)
32424: e250a000 subs sl, r0, #0 <== NOT EXECUTED
32428: 1a000009 bne 32454 <msdos_file_ftruncate+0xac> <== 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)
3242c: e15a0008 cmp sl, r8 <== NOT EXECUTED
32430: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED
32434: ca000002 bgt 32444 <msdos_file_ftruncate+0x9c> <== NOT EXECUTED
32438: 1a000005 bne 32454 <msdos_file_ftruncate+0xac> <== NOT EXECUTED
3243c: e1530005 cmp r3, r5 <== NOT EXECUTED
32440: 9a000003 bls 32454 <msdos_file_ftruncate+0xac> <== NOT EXECUTED
iop->size = fat_fd->fat_file_size = length;
32444: e3a03000 mov r3, #0 <== NOT EXECUTED
32448: e5843008 str r3, [r4, #8] <== NOT EXECUTED
3244c: e5865018 str r5, [r6, #24] <== NOT EXECUTED
32450: e5845004 str r5, [r4, #4] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
32454: e5970094 ldr r0, [r7, #148] ; 0x94 <== NOT EXECUTED
32458: ebff655e bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
3245c: e1a0000a mov r0, sl <== NOT EXECUTED
32460: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00032168 <msdos_file_ioctl>:
msdos_file_ioctl(rtems_libio_t *iop,uint32_t command, void *buffer)
{
int rc = RC_OK;
return rc;
}
32168: e3a00000 mov r0, #0 <== NOT EXECUTED
3216c: e12fff1e bx lr <== NOT EXECUTED
00032464 <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)
{
32464: e92d40f1 push {r0, 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;
32468: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
3246c: e5936034 ldr r6, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = iop->file_info;
uint32_t real_size = 0;
32470: 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)
{
32474: 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,
32478: e1a01003 mov r1, r3 <== NOT EXECUTED
3247c: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
32480: 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;
32484: 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;
32488: e5945038 ldr r5, [r4, #56] ; 0x38 <== NOT EXECUTED
uint32_t real_size = 0;
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3248c: ebff650b bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
32490: e3500000 cmp r0, #0 <== NOT EXECUTED
32494: 0a000005 beq 324b0 <msdos_file_lseek+0x4c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
32498: eb002fca bl 3e3c8 <__errno> <== NOT EXECUTED
3249c: e3a03005 mov r3, #5 <== NOT EXECUTED
324a0: e5803000 str r3, [r0] <== NOT EXECUTED
324a4: e3e04000 mvn r4, #0 <== NOT EXECUTED
324a8: e3e03000 mvn r3, #0 <== NOT EXECUTED
324ac: ea000019 b 32518 <msdos_file_lseek+0xb4> <== NOT EXECUTED
rc = fat_file_extend(iop->pathinfo.mt_entry, fat_fd, iop->offset,
324b0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
324b4: e1a01005 mov r1, r5 <== NOT EXECUTED
324b8: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
324bc: e1a0300d mov r3, sp <== NOT EXECUTED
324c0: ebffbe7d bl 21ebc <fat_file_extend> <== NOT EXECUTED
&real_size);
if (rc != RC_OK)
324c4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
324c8: 0a000004 beq 324e0 <msdos_file_lseek+0x7c> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
324cc: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
324d0: ebff6540 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
324d4: e1a03007 mov r3, r7 <== NOT EXECUTED
324d8: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
324dc: ea00000d b 32518 <msdos_file_lseek+0xb4> <== NOT EXECUTED
}
if (real_size > fat_fd->fat_file_size)
324e0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
324e4: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED
324e8: e1530002 cmp r3, r2 <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset = real_size;
324ec: 85853018 strhi r3, [r5, #24] <== NOT EXECUTED
324f0: 8584300c strhi r3, [r4, #12] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
324f4: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
324f8: e5843004 str r3, [r4, #4] <== NOT EXECUTED
324fc: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (real_size > fat_fd->fat_file_size)
fat_fd->fat_file_size = iop->offset = real_size;
32500: 85847010 strhi r7, [r4, #16] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
32504: e5843008 str r3, [r4, #8] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
32508: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
3250c: ebff6531 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return iop->offset;
32510: e284400c add r4, r4, #12 <== NOT EXECUTED
32514: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
}
32518: e1a01004 mov r1, r4 <== NOT EXECUTED
3251c: e1a00003 mov r0, r3 <== NOT EXECUTED
32520: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
00032704 <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;
32704: 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)
{
32708: 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;
3270c: 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,
32710: 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)
{
32714: 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,
32718: e1a02001 mov r2, r1 <== NOT EXECUTED
3271c: 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;
32720: e5946038 ldr r6, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
32724: ebff6465 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
32728: e3500000 cmp r0, #0 <== NOT EXECUTED
3272c: 0a000004 beq 32744 <msdos_file_open+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
32730: eb002f24 bl 3e3c8 <__errno> <== NOT EXECUTED
32734: e3a03005 mov r3, #5 <== NOT EXECUTED
32738: e5803000 str r3, [r0] <== NOT EXECUTED
3273c: e3e07000 mvn r7, #0 <== NOT EXECUTED
32740: ea00000e b 32780 <msdos_file_open+0x7c> <== NOT EXECUTED
rc = fat_file_reopen(fat_fd);
32744: e1a00006 mov r0, r6 <== NOT EXECUTED
32748: ebffbcc9 bl 21a74 <fat_file_reopen> <== NOT EXECUTED
if (rc != RC_OK)
3274c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
32750: 1a000008 bne 32778 <msdos_file_open+0x74> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
32754: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
32758: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
iop->offset = fat_fd->fat_file_size;
3275c: 15963018 ldrne r3, [r6, #24] <== NOT EXECUTED
32760: 1584300c strne r3, [r4, #12] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
32764: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED
32768: e3a02000 mov r2, #0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
return rc;
}
if (iop->flags & LIBIO_FLAGS_APPEND)
iop->offset = fat_fd->fat_file_size;
3276c: 15847010 strne r7, [r4, #16] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
32770: e5842008 str r2, [r4, #8] <== NOT EXECUTED
32774: e5843004 str r3, [r4, #4] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
32778: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
3277c: ebff6495 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
32780: e1a00007 mov r0, r7 <== NOT EXECUTED
32784: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000325e8 <msdos_file_read>:
ssize_t
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;
325e8: e5903028 ldr r3, [r0, #40] ; 0x28 <== 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)
{
325ec: e92d41f1 push {r0, 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;
325f0: e5935034 ldr r5, [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)
{
325f4: e1a06001 mov r6, 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,
325f8: 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)
{
325fc: e1a04000 mov r4, r0 <== NOT EXECUTED
32600: 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,
32604: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
32608: 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;
3260c: e5948038 ldr r8, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
32610: ebff64aa bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
32614: e3500000 cmp r0, #0 <== NOT EXECUTED
32618: 0a000004 beq 32630 <msdos_file_read+0x48> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
3261c: eb002f69 bl 3e3c8 <__errno> <== NOT EXECUTED
32620: e3a03005 mov r3, #5 <== NOT EXECUTED
32624: e5803000 str r3, [r0] <== NOT EXECUTED
32628: e3e04000 mvn r4, #0 <== NOT EXECUTED
3262c: ea000008 b 32654 <msdos_file_read+0x6c> <== NOT EXECUTED
ret = fat_file_read(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
32630: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
32634: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
32638: e1a01008 mov r1, r8 <== NOT EXECUTED
3263c: e1a03007 mov r3, r7 <== NOT EXECUTED
32640: e58d6000 str r6, [sp] <== NOT EXECUTED
32644: ebffbf1d bl 222c0 <fat_file_read> <== NOT EXECUTED
32648: e1a04000 mov r4, r0 <== NOT EXECUTED
buffer);
rtems_semaphore_release(fs_info->vol_sema);
3264c: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
32650: ebff64e0 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return ret;
}
32654: e1a00004 mov r0, r4 <== NOT EXECUTED
32658: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00032220 <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;
32220: 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)
{
32224: 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;
32228: 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)
{
3222c: 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,
32230: e3a01000 mov r1, #0 <== NOT EXECUTED
32234: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
32238: 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;
3223c: e5946000 ldr r6, [r4] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
32240: ebff659e bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
32244: e3500000 cmp r0, #0 <== NOT EXECUTED
32248: 0a000004 beq 32260 <msdos_file_rmnod+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
3224c: eb00305d bl 3e3c8 <__errno> <== NOT EXECUTED
32250: e3a03005 mov r3, #5 <== NOT EXECUTED
32254: e5803000 str r3, [r0] <== NOT EXECUTED
32258: e3e07000 mvn r7, #0 <== NOT EXECUTED
3225c: ea000009 b 32288 <msdos_file_rmnod+0x68> <== NOT EXECUTED
/* mark file removed */
rc = msdos_set_first_char4file_name(pathloc->mt_entry,
32260: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
32264: e2861020 add r1, r6, #32 <== NOT EXECUTED
32268: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
3226c: eb00048c bl 334a4 <msdos_set_first_char4file_name> <== NOT EXECUTED
&fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
if (rc != RC_OK)
32270: 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);
32274: 05940010 ldreq r0, [r4, #16] <== NOT EXECUTED
32278: 01a01006 moveq r1, r6 <== NOT EXECUTED
3227c: 0bffbe8f bleq 21cc0 <fat_file_mark_removed> <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
32280: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
32284: ebff65d3 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return RC_OK;
}
32288: e1a00007 mov r0, r7 <== NOT EXECUTED
3228c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00032178 <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;
32178: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3217c: 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;
32180: e5925034 ldr r5, [r2, #52] ; 0x34 <== NOT EXECUTED
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
32184: 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,
32188: e3a01000 mov r1, #0 <== NOT EXECUTED
int
msdos_file_stat(
rtems_filesystem_location_info_t *loc,
struct stat *buf
)
{
3218c: 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,
32190: e1a02001 mov r2, r1 <== NOT EXECUTED
32194: 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;
32198: e5936000 ldr r6, [r3] <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3219c: ebff65c7 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
321a0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
321a4: 0a000004 beq 321bc <msdos_file_stat+0x44> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
321a8: eb003086 bl 3e3c8 <__errno> <== NOT EXECUTED
321ac: e3a03005 mov r3, #5 <== NOT EXECUTED
321b0: e5803000 str r3, [r0] <== NOT EXECUTED
321b4: e3e00000 mvn r0, #0 <== NOT EXECUTED
321b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
buf->st_dev = fs_info->fat.vol.dev;
buf->st_ino = fat_fd->ino;
321bc: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
321c0: e5843008 str r3, [r4, #8] <== NOT EXECUTED
buf->st_mode = S_IFREG | S_IRWXU | S_IRWXG | S_IRWXO;
321c4: e59f3050 ldr r3, [pc, #80] ; 3221c <msdos_file_stat+0xa4> <== NOT EXECUTED
321c8: e584300c str r3, [r4, #12] <== NOT EXECUTED
buf->st_rdev = 0ll;
buf->st_size = fat_fd->fat_file_size;
321cc: 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;
321d0: 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;
321d4: e1a014a3 lsr r1, r3, #9 <== NOT EXECUTED
321d8: e5841044 str r1, [r4, #68] ; 0x44 <== NOT EXECUTED
buf->st_blksize = fs_info->fat.vol.bps;
321dc: e5842040 str r2, [r4, #64] ; 0x40 <== NOT EXECUTED
buf->st_mtime = fat_fd->mtime;
321e0: e5962040 ldr r2, [r6, #64] ; 0x40 <== NOT EXECUTED
321e4: 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;
321e8: e2852054 add r2, r5, #84 ; 0x54 <== NOT EXECUTED
321ec: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
321f0: 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;
321f4: e3a01000 mov r1, #0 <== NOT EXECUTED
321f8: e3a02000 mov r2, #0 <== NOT EXECUTED
321fc: e5841018 str r1, [r4, #24] <== NOT EXECUTED
32200: e584201c str r2, [r4, #28] <== NOT EXECUTED
buf->st_size = fat_fd->fat_file_size;
32204: e5843020 str r3, [r4, #32] <== NOT EXECUTED
32208: 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);
3220c: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
32210: ebff65f0 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
32214: e1a00007 mov r0, r7 <== NOT EXECUTED
return RC_OK;
}
32218: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000322ec <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;
322ec: 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)
{
322f0: 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;
322f4: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
322f8: 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)
{
322fc: e1a05000 mov r5, 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,
32300: e1a02001 mov r2, r1 <== NOT EXECUTED
32304: e5940094 ldr r0, [r4, #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;
32308: e5956038 ldr r6, [r5, #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,
3230c: ebff656b bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
32310: e3500000 cmp r0, #0 <== NOT EXECUTED
32314: 0a000004 beq 3232c <msdos_file_sync+0x40> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
32318: eb00302a bl 3e3c8 <__errno> <== NOT EXECUTED
3231c: e3a03005 mov r3, #5 <== NOT EXECUTED
32320: e5803000 str r3, [r0] <== NOT EXECUTED
32324: e3e07000 mvn r7, #0 <== NOT EXECUTED
32328: ea00001c b 323a0 <msdos_file_sync+0xb4> <== NOT EXECUTED
/* synchronize file data */
rc = fat_file_datasync(iop->pathinfo.mt_entry, fat_fd);
3232c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
32330: e1a01006 mov r1, r6 <== NOT EXECUTED
32334: ebffbe21 bl 21bc0 <fat_file_datasync> <== NOT EXECUTED
if (rc != RC_OK)
32338: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3233c: 1a000011 bne 32388 <msdos_file_sync+0x9c> <== NOT EXECUTED
/*
* if fat-file descriptor is not marked "removed" - synchronize file
* metadata
*/
if (!FAT_FILE_IS_REMOVED(fat_fd))
32340: e5d63030 ldrb r3, [r6, #48] ; 0x30 <== NOT EXECUTED
32344: e3130001 tst r3, #1 <== NOT EXECUTED
32348: 1a000011 bne 32394 <msdos_file_sync+0xa8> <== NOT EXECUTED
{
rc = msdos_set_first_cluster_num(iop->pathinfo.mt_entry, fat_fd);
3234c: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
32350: e1a01006 mov r1, r6 <== NOT EXECUTED
32354: eb000425 bl 333f0 <msdos_set_first_cluster_num> <== NOT EXECUTED
if (rc != RC_OK)
32358: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3235c: 1a000009 bne 32388 <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);
32360: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
32364: e1a01006 mov r1, r6 <== NOT EXECUTED
32368: eb000402 bl 33378 <msdos_set_file_size> <== NOT EXECUTED
if (rc != RC_OK)
3236c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
32370: 1a000004 bne 32388 <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);
32374: e5950028 ldr r0, [r5, #40] ; 0x28 <== NOT EXECUTED
32378: e1a01006 mov r1, r6 <== NOT EXECUTED
3237c: eb000497 bl 335e0 <msdos_set_dir_wrt_time_and_date> <== NOT EXECUTED
if (rc != RC_OK)
32380: e2507000 subs r7, r0, #0 <== NOT EXECUTED
32384: 0a000002 beq 32394 <msdos_file_sync+0xa8> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
32388: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
3238c: ebff6591 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
32390: ea000002 b 323a0 <msdos_file_sync+0xb4> <== NOT EXECUTED
}
}
rtems_semaphore_release(fs_info->vol_sema);
32394: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
32398: ebff658e bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
3239c: e3a07000 mov r7, #0 <== NOT EXECUTED
return RC_OK;
}
323a0: e1a00007 mov r0, r7 <== NOT EXECUTED
323a4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00032524 <msdos_file_write>:
ssize_t
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;
32524: e5903028 ldr r3, [r0, #40] ; 0x28 <== 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)
{
32528: e92d41f1 push {r0, 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;
3252c: 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)
{
32530: 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,
32534: 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)
{
32538: e1a04000 mov r4, r0 <== NOT EXECUTED
3253c: e1a08002 mov r8, 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,
32540: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
32544: 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;
32548: e5945038 ldr r5, [r4, #56] ; 0x38 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
3254c: ebff64db bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
32550: e3500000 cmp r0, #0 <== NOT EXECUTED
32554: 0a000003 beq 32568 <msdos_file_write+0x44> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
32558: eb002f9a bl 3e3c8 <__errno> <== NOT EXECUTED
3255c: e3a03005 mov r3, #5 <== NOT EXECUTED
32560: e5803000 str r3, [r0] <== NOT EXECUTED
32564: ea000009 b 32590 <msdos_file_write+0x6c> <== NOT EXECUTED
ret = fat_file_write(iop->pathinfo.mt_entry, fat_fd, iop->offset, count,
32568: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
3256c: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
32570: e1a03008 mov r3, r8 <== NOT EXECUTED
32574: e1a01005 mov r1, r5 <== NOT EXECUTED
32578: e58d7000 str r7, [sp] <== NOT EXECUTED
3257c: ebffbec2 bl 2208c <fat_file_write> <== NOT EXECUTED
buffer);
if (ret < 0)
32580: e2507000 subs r7, r0, #0 <== NOT EXECUTED
32584: aa000003 bge 32598 <msdos_file_write+0x74> <== NOT EXECUTED
{
rtems_semaphore_release(fs_info->vol_sema);
32588: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
3258c: ebff6511 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
32590: e3e07000 mvn r7, #0 <== NOT EXECUTED
return -1;
32594: ea000011 b 325e0 <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)
32598: e284300c add r3, r4, #12 <== NOT EXECUTED
3259c: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
325a0: e0920007 adds r0, r2, r7 <== NOT EXECUTED
325a4: e0a31fc7 adc r1, r3, r7, asr #31 <== NOT EXECUTED
325a8: e3510000 cmp r1, #0 <== NOT EXECUTED
325ac: e595c018 ldr ip, [r5, #24] <== NOT EXECUTED
325b0: ca000002 bgt 325c0 <msdos_file_write+0x9c> <== NOT EXECUTED
325b4: 1a000003 bne 325c8 <msdos_file_write+0xa4> <== NOT EXECUTED
325b8: e150000c cmp r0, ip <== NOT EXECUTED
325bc: 9a000001 bls 325c8 <msdos_file_write+0xa4> <== NOT EXECUTED
fat_fd->fat_file_size = iop->offset + ret;
325c0: e0872002 add r2, r7, r2 <== NOT EXECUTED
325c4: e5852018 str r2, [r5, #24] <== NOT EXECUTED
iop->size = fat_fd->fat_file_size;
325c8: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
325cc: e3a02000 mov r2, #0 <== NOT EXECUTED
325d0: e5842008 str r2, [r4, #8] <== NOT EXECUTED
325d4: e5843004 str r3, [r4, #4] <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
325d8: e5960094 ldr r0, [r6, #148] ; 0x94 <== NOT EXECUTED
325dc: ebff64fd bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return ret;
}
325e0: e1a00007 mov r0, r7 <== NOT EXECUTED
325e4: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0003cce8 <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)
{
3cce8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3ccec: 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] = ' ';
3ccf0: e3a0c020 mov ip, #32 <== NOT EXECUTED
3ccf4: 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++)
3ccf8: e2833001 add r3, r3, #1 <== NOT EXECUTED
3ccfc: e353000b cmp r3, #11 <== NOT EXECUTED
3cd00: 1afffffb bne 3ccf4 <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) {
3cd04: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
3cd08: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
3cd0c: 13a0c000 movne ip, #0 <== NOT EXECUTED
3cd10: 03a0c001 moveq ip, #1 <== NOT EXECUTED
3cd14: e3510001 cmp r1, #1 <== NOT EXECUTED
3cd18: 0353002e cmpeq r3, #46 ; 0x2e <== NOT EXECUTED
dn[0] = '.';
3cd1c: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED
/*
* The filenames "." and ".." are handled specially, since they
* don't follow dos filename rules.
*/
if (un[0] == '.' && unlen == 1) {
3cd20: 0a000007 beq 3cd44 <msdos_filename_unix2dos+0x5c> <== NOT EXECUTED
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
3cd24: e35c0000 cmp ip, #0 <== NOT EXECUTED
3cd28: 0a000009 beq 3cd54 <msdos_filename_unix2dos+0x6c> <== NOT EXECUTED
3cd2c: e5d03001 ldrb r3, [r0, #1] <== NOT EXECUTED
3cd30: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
3cd34: 03510002 cmpeq r1, #2 <== NOT EXECUTED
3cd38: 1a000005 bne 3cd54 <msdos_filename_unix2dos+0x6c> <== NOT EXECUTED
dn[0] = '.';
3cd3c: e3a0302e mov r3, #46 ; 0x2e <== NOT EXECUTED
dn[1] = '.';
3cd40: e5c23001 strb r3, [r2, #1] <== NOT EXECUTED
if (un[0] == '.' && unlen == 1) {
dn[0] = '.';
return 0;
}
if (un[0] == '.' && un[1] == '.' && unlen == 2) {
dn[0] = '.';
3cd44: e5c23000 strb r3, [r2] <== NOT EXECUTED
dn[1] = '.';
return 0;
3cd48: ea00003a b 3ce38 <msdos_filename_unix2dos+0x150> <== NOT EXECUTED
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
un++;
3cd4c: e2800001 add r0, r0, #1 <== NOT EXECUTED
unlen--;
3cd50: e2411001 sub r1, r1, #1 <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
3cd54: e3510000 cmp r1, #0 <== NOT EXECUTED
3cd58: 1a000002 bne 3cd68 <msdos_filename_unix2dos+0x80> <== NOT EXECUTED
3cd5c: e3a03000 mov r3, #0 <== NOT EXECUTED
* 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++) {
if (msdos_map[c] == 0)
3cd60: e59f50d8 ldr r5, [pc, #216] ; 3ce40 <msdos_filename_unix2dos+0x158><== NOT EXECUTED
3cd64: ea000009 b 3cd90 <msdos_filename_unix2dos+0xa8> <== NOT EXECUTED
}
/*
* Remove any dots from the start of a file name.
*/
while (unlen && (*un == '.')) {
3cd68: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
3cd6c: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
3cd70: 0afffff5 beq 3cd4c <msdos_filename_unix2dos+0x64> <== NOT EXECUTED
3cd74: eafffff8 b 3cd5c <msdos_filename_unix2dos+0x74> <== NOT EXECUTED
* 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++) {
if (msdos_map[c] == 0)
3cd78: e7d54004 ldrb r4, [r5, r4] <== NOT EXECUTED
3cd7c: e3540000 cmp r4, #0 <== NOT EXECUTED
3cd80: 0a000013 beq 3cdd4 <msdos_filename_unix2dos+0xec> <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
3cd84: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED
un++;
unlen--;
3cd88: e2411001 sub r1, r1, #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++) {
3cd8c: e2833001 add r3, r3, #1 <== NOT EXECUTED
3cd90: e251c000 subs ip, r1, #0 <== NOT EXECUTED
3cd94: 13a0c001 movne ip, #1 <== NOT EXECUTED
3cd98: e3530007 cmp r3, #7 <== NOT EXECUTED
3cd9c: c3a0c000 movgt ip, #0 <== NOT EXECUTED
3cda0: e35c0000 cmp ip, #0 <== NOT EXECUTED
/*
* 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)
3cda4: e080c003 add ip, r0, 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++) {
3cda8: 0a000009 beq 3cdd4 <msdos_filename_unix2dos+0xec> <== NOT EXECUTED
3cdac: e7d04003 ldrb r4, [r0, r3] <== NOT EXECUTED
3cdb0: e3540000 cmp r4, #0 <== NOT EXECUTED
3cdb4: 0a000006 beq 3cdd4 <msdos_filename_unix2dos+0xec> <== NOT EXECUTED
3cdb8: e354002e cmp r4, #46 ; 0x2e <== NOT EXECUTED
3cdbc: 1affffed bne 3cd78 <msdos_filename_unix2dos+0x90> <== NOT EXECUTED
3cdc0: ea000003 b 3cdd4 <msdos_filename_unix2dos+0xec> <== NOT EXECUTED
*/
while (unlen && (c = *un)) {
un++;
unlen--;
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
3cdc4: 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++;
3cdc8: e28cc001 add ip, ip, #1 <== NOT EXECUTED
unlen--;
3cdcc: e2411001 sub r1, r1, #1 <== NOT EXECUTED
/* Make sure we've skipped over the dot before stopping. */
if (c == '.')
3cdd0: 0a000004 beq 3cde8 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
/*
* Strip any further characters up to a '.' or the end of the
* string.
*/
while (unlen && (c = *un)) {
3cdd4: e3510000 cmp r1, #0 <== NOT EXECUTED
3cdd8: 0a000002 beq 3cde8 <msdos_filename_unix2dos+0x100> <== NOT EXECUTED
3cddc: e5dc3000 ldrb r3, [ip] <== NOT EXECUTED
3cde0: e3530000 cmp r3, #0 <== NOT EXECUTED
3cde4: 1afffff6 bne 3cdc4 <msdos_filename_unix2dos+0xdc> <== NOT EXECUTED
3cde8: e3a00000 mov r0, #0 <== NOT EXECUTED
3cdec: e3a03008 mov r3, #8 <== 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++) {
if (msdos_map[c] == 0)
3cdf0: e59f5048 ldr r5, [pc, #72] ; 3ce40 <msdos_filename_unix2dos+0x158><== NOT EXECUTED
3cdf4: ea000006 b 3ce14 <msdos_filename_unix2dos+0x12c> <== NOT EXECUTED
3cdf8: e7d54004 ldrb r4, [r5, r4] <== NOT EXECUTED
3cdfc: e3540000 cmp r4, #0 <== NOT EXECUTED
3ce00: e2800001 add r0, r0, #1 <== NOT EXECUTED
3ce04: 0a00000b beq 3ce38 <msdos_filename_unix2dos+0x150> <== NOT EXECUTED
break;
dn[i] = msdos_map[c];
3ce08: e7c24003 strb r4, [r2, r3] <== NOT EXECUTED
un++;
unlen--;
3ce0c: e2411001 sub r1, r1, #1 <== 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++) {
3ce10: e2833001 add r3, r3, #1 <== NOT EXECUTED
3ce14: e2514000 subs r4, r1, #0 <== NOT EXECUTED
3ce18: 13a04001 movne r4, #1 <== NOT EXECUTED
3ce1c: e353000a cmp r3, #10 <== NOT EXECUTED
3ce20: c3a04000 movgt r4, #0 <== NOT EXECUTED
3ce24: e3540000 cmp r4, #0 <== NOT EXECUTED
3ce28: 0a000002 beq 3ce38 <msdos_filename_unix2dos+0x150> <== NOT EXECUTED
3ce2c: e7dc4000 ldrb r4, [ip, r0] <== NOT EXECUTED
3ce30: e3540000 cmp r4, #0 <== NOT EXECUTED
3ce34: 1affffef bne 3cdf8 <msdos_filename_unix2dos+0x110> <== NOT EXECUTED
dn[i] = msdos_map[c];
un++;
unlen--;
}
return 0;
}
3ce38: e3a00000 mov r0, #0 <== NOT EXECUTED
3ce3c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00033c64 <msdos_find_name>:
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
33c64: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
33c68: e24dd040 sub sp, sp, #64 ; 0x40 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
fat_file_fd_t *fat_fd = NULL;
33c6c: e3a06000 mov r6, #0 <== NOT EXECUTED
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
33c70: 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);
33c74: e28d500c add r5, sp, #12 <== NOT EXECUTED
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
33c78: e1a07001 mov r7, r1 <== NOT EXECUTED
33c7c: e1a08002 mov r8, r2 <== 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);
33c80: e1a01006 mov r1, r6 <== NOT EXECUTED
msdos_find_name(
rtems_filesystem_location_info_t *parent_loc,
const char *name,
int name_len
)
{
33c84: e1a04000 mov r4, r0 <== 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);
33c88: e3a02020 mov r2, #32 <== NOT EXECUTED
33c8c: e1a00005 mov r0, r5 <== NOT EXECUTED
const char *name,
int name_len
)
{
int rc = RC_OK;
msdos_fs_info_t *fs_info = parent_loc->mt_entry->fs_info;
33c90: e593a034 ldr sl, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_file_fd_t *fat_fd = NULL;
33c94: e58d603c str r6, [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);
33c98: eb003701 bl 418a4 <memset> <== NOT EXECUTED
name_type = msdos_long_to_short (name,
33c9c: e1a00007 mov r0, r7 <== NOT EXECUTED
33ca0: e1a01008 mov r1, r8 <== NOT EXECUTED
33ca4: e1a02005 mov r2, r5 <== NOT EXECUTED
33ca8: e3a0300b mov r3, #11 <== NOT EXECUTED
33cac: ebfffecb bl 337e0 <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,
33cb0: e1a01006 mov r1, r6 <== NOT EXECUTED
33cb4: e58d0000 str r0, [sp] <== NOT EXECUTED
33cb8: e1a02007 mov r2, r7 <== NOT EXECUTED
33cbc: e1a03008 mov r3, r8 <== NOT EXECUTED
33cc0: e28d602c add r6, sp, #44 ; 0x2c <== NOT EXECUTED
33cc4: e1a00004 mov r0, r4 <== NOT EXECUTED
33cc8: e58d6004 str r6, [sp, #4] <== NOT EXECUTED
33ccc: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
33cd0: ebffffac bl 33b88 <msdos_get_name_node> <== NOT EXECUTED
&dir_pos, node_entry);
if (rc != RC_OK)
33cd4: e2507000 subs r7, r0, #0 <== NOT EXECUTED
33cd8: 1a000045 bne 33df4 <msdos_find_name+0x190> <== NOT EXECUTED
return rc;
if (((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_VOLUME_ID) ||
33cdc: e5dd3017 ldrb r3, [sp, #23] <== NOT EXECUTED
33ce0: e3130008 tst r3, #8 <== NOT EXECUTED
33ce4: 1a000041 bne 33df0 <msdos_find_name+0x18c> <== NOT EXECUTED
33ce8: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
33cec: e353000f cmp r3, #15 <== NOT EXECUTED
33cf0: 0a00003e beq 33df0 <msdos_find_name+0x18c> <== 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);
33cf4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
33cf8: e1a01006 mov r1, r6 <== NOT EXECUTED
33cfc: e28d203c add r2, sp, #60 ; 0x3c <== NOT EXECUTED
33d00: ebffba11 bl 2254c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
33d04: e2507000 subs r7, r0, #0 <== NOT EXECUTED
33d08: 1a000039 bne 33df4 <msdos_find_name+0x190> <== NOT EXECUTED
return rc;
fat_fd->dir_pos = dir_pos;
33d0c: 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)
33d10: 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;
33d14: e896000f ldm r6, {r0, r1, r2, r3} <== NOT EXECUTED
33d18: 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)
33d1c: 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;
33d20: 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)
33d24: 1a000026 bne 33dc4 <msdos_find_name+0x160> <== NOT EXECUTED
{
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(node_entry);
33d28: e1d521b4 ldrh r2, [r5, #20] <== NOT EXECUTED
33d2c: e1d531ba ldrh r3, [r5, #26] <== NOT EXECUTED
33d30: e1833802 orr r3, r3, r2, lsl #16 <== NOT EXECUTED
33d34: 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));
33d38: e1d511b6 ldrh r1, [r5, #22] <== NOT EXECUTED
33d3c: e1d501b8 ldrh r0, [r5, #24] <== NOT EXECUTED
33d40: eb0023a6 bl 3cbe0 <msdos_date_dos2unix> <== NOT EXECUTED
33d44: e5870040 str r0, [r7, #64] ; 0x40 <== NOT EXECUTED
if ((*MSDOS_DIR_ATTR(node_entry)) & MSDOS_ATTR_DIRECTORY)
33d48: e5dd3017 ldrb r3, [sp, #23] <== NOT EXECUTED
33d4c: e3130010 tst r3, #16 <== NOT EXECUTED
33d50: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
33d54: 0a000007 beq 33d78 <msdos_find_name+0x114> <== NOT EXECUTED
{
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
33d58: e3a03602 mov r3, #2097152 ; 0x200000 <== 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;
33d5c: e5818010 str r8, [r1, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
33d60: e5813014 str r3, [r1, #20] <== NOT EXECUTED
rc = fat_file_size(parent_loc->mt_entry, fat_fd);
33d64: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
33d68: ebffb746 bl 21a88 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
33d6c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
33d70: 0a000006 beq 33d90 <msdos_find_name+0x12c> <== NOT EXECUTED
33d74: ea000019 b 33de0 <msdos_find_name+0x17c> <== NOT EXECUTED
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
33d78: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_FILE;
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
33d7c: e3e02000 mvn r2, #0 <== NOT EXECUTED
return rc;
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
33d80: e5813018 str r3, [r1, #24] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_FILE;
33d84: e3a03005 mov r3, #5 <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_FILE_SIZE;
33d88: e5812014 str r2, [r1, #20] <== NOT EXECUTED
}
}
else
{
fat_fd->fat_file_size = CF_LE_L(*MSDOS_DIR_FILE_SIZE(node_entry));
fat_fd->fat_file_type = FAT_FILE;
33d8c: e5813010 str r3, [r1, #16] <== 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;
33d90: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
33d94: e2831018 add r1, r3, #24 <== NOT EXECUTED
33d98: e8910006 ldm r1, {r1, r2} <== 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;
33d9c: e3a00000 mov r0, #0 <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
if ((fat_fd->fat_file_size != 0) &&
33da0: e3510000 cmp r1, #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;
33da4: e5830034 str r0, [r3, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
33da8: e5832038 str r2, [r3, #56] ; 0x38 <== NOT EXECUTED
if ((fat_fd->fat_file_size != 0) &&
33dac: 0a000002 beq 33dbc <msdos_find_name+0x158> <== NOT EXECUTED
(fat_fd->fat_file_size <= fs_info->fat.vol.bpc))
33db0: e1da00b6 ldrh r0, [sl, #6] <== NOT EXECUTED
33db4: e1510000 cmp r1, r0 <== NOT EXECUTED
33db8: 9a000000 bls 33dc0 <msdos_find_name+0x15c> <== NOT EXECUTED
{
fat_fd->map.last_cln = fat_fd->cln;
}
else
{
fat_fd->map.last_cln = FAT_UNDEFINED_VALUE;
33dbc: e3e02000 mvn r2, #0 <== NOT EXECUTED
33dc0: e583203c str r2, [r3, #60] ; 0x3c <== NOT EXECUTED
}
}
/* close fat-file corresponded to the node we searched in */
rc = fat_file_close(parent_loc->mt_entry, parent_loc->node_access);
33dc4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
33dc8: e5941000 ldr r1, [r4] <== NOT EXECUTED
33dcc: ebffb9b5 bl 224a8 <fat_file_close> <== NOT EXECUTED
if (rc != RC_OK)
33dd0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
fat_file_close(parent_loc->mt_entry, fat_fd);
return rc;
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
33dd4: 059d303c ldreq r3, [sp, #60] ; 0x3c <== NOT EXECUTED
33dd8: 05843000 streq r3, [r4] <== 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)
33ddc: 0a000004 beq 33df4 <msdos_find_name+0x190> <== NOT EXECUTED
{
fat_file_close(parent_loc->mt_entry, fat_fd);
33de0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
33de4: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
33de8: ebffb9ae bl 224a8 <fat_file_close> <== NOT EXECUTED
return rc;
33dec: ea000000 b 33df4 <msdos_find_name+0x190> <== NOT EXECUTED
}
/* update node_info_ptr field */
parent_loc->node_access = fat_fd;
return rc;
33df0: e59f7008 ldr r7, [pc, #8] ; 33e00 <msdos_find_name+0x19c> <== NOT EXECUTED
}
33df4: e1a00007 mov r0, r7 <== NOT EXECUTED
33df8: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED
33dfc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0003298c <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
)
{
3298c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
32990: e24dd050 sub sp, sp, #80 ; 0x50 <== NOT EXECUTED
32994: e58d001c str r0, [sp, #28] <== 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);
32998: e59d0074 ldr r0, [sp, #116] ; 0x74 <== NOT EXECUTED
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
3299c: e1a05001 mov r5, r1 <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
329a0: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
329a4: 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);
329a8: 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
)
{
329ac: e58d3038 str r3, [sp, #56] ; 0x38 <== NOT EXECUTED
329b0: e58d2024 str r2, [sp, #36] ; 0x24 <== NOT EXECUTED
329b4: e59d807c ldr r8, [sp, #124] ; 0x7c <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
329b8: e5917034 ldr r7, [r1, #52] ; 0x34 <== 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);
329bc: d59f0874 ldrle r0, [pc, #2164] ; 33238 <msdos_find_name_in_fat_file+0x8ac><== NOT EXECUTED
329c0: d59f1874 ldrle r1, [pc, #2164] ; 3323c <msdos_find_name_in_fat_file+0x8b0><== NOT EXECUTED
329c4: d59f2874 ldrle r2, [pc, #2164] ; 33240 <msdos_find_name_in_fat_file+0x8b4><== NOT EXECUTED
329c8: d59f3874 ldrle r3, [pc, #2164] ; 33244 <msdos_find_name_in_fat_file+0x8b8><== NOT EXECUTED
329cc: da000034 ble 32aa4 <msdos_find_name_in_fat_file+0x118> <== 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))
329d0: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
329d4: e3a0a000 mov sl, #0 <== NOT EXECUTED
dir_pos->sname.ofs = 0;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
329d8: e3e03000 mvn r3, #0 <== NOT EXECUTED
329dc: e3520000 cmp r2, #0 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
329e0: e588300c str r3, [r8, #12] <== NOT EXECUTED
static inline void
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
329e4: e588a000 str sl, [r8] <== NOT EXECUTED
dir_pos->sname.ofs = 0;
329e8: e588a004 str sl, [r8, #4] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
329ec: e5883008 str r3, [r8, #8] <== NOT EXECUTED
329f0: 0a000002 beq 32a00 <msdos_find_name_in_fat_file+0x74> <== NOT EXECUTED
329f4: e59d3078 ldr r3, [sp, #120] ; 0x78 <== NOT EXECUTED
329f8: e3530001 cmp r3, #1 <== NOT EXECUTED
329fc: 0a000004 beq 32a14 <msdos_find_name_in_fat_file+0x88> <== NOT EXECUTED
lfn_entries = 0;
else
lfn_entries =
32a00: e59dc074 ldr ip, [sp, #116] ; 0x74 <== NOT EXECUTED
32a04: e3a0100d mov r1, #13 <== NOT EXECUTED
32a08: e28c000c add r0, ip, #12 <== NOT EXECUTED
32a0c: eb008e80 bl 56414 <__aeabi_idiv> <== NOT EXECUTED
32a10: e1a0a000 mov sl, r0 <== NOT EXECUTED
((name_len - 1) + MSDOS_LFN_LEN_PER_ENTRY) / MSDOS_LFN_LEN_PER_ENTRY;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
32a14: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED
32a18: e3530001 cmp r3, #1 <== NOT EXECUTED
32a1c: 1a000006 bne 32a3c <msdos_find_name_in_fat_file+0xb0> <== NOT EXECUTED
32a20: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED
32a24: e3530000 cmp r3, #0 <== NOT EXECUTED
32a28: 1a000003 bne 32a3c <msdos_find_name_in_fat_file+0xb0> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
32a2c: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED
32a30: e3130003 tst r3, #3 <== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
32a34: 15954018 ldrne r4, [r5, #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)))
32a38: 1a000000 bne 32a40 <msdos_find_name_in_fat_file+0xb4> <== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
32a3c: e1d740b6 ldrh r4, [r7, #6] <== NOT EXECUTED
assert(name_len > 0);
fat_dir_pos_init(dir_pos);
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
32a40: e3a06000 mov r6, #0 <== NOT EXECUTED
32a44: e3e03000 mvn r3, #0 <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
32a48: e28a0001 add r0, sl, #1 <== NOT EXECUTED
32a4c: e58d8034 str r8, [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;
32a50: e58d3048 str r3, [sp, #72] ; 0x48 <== NOT EXECUTED
32a54: e58d3044 str r3, [sp, #68] ; 0x44 <== NOT EXECUTED
32a58: e58d6010 str r6, [sp, #16] <== NOT EXECUTED
32a5c: e1a09006 mov r9, r6 <== NOT EXECUTED
32a60: e1a0b006 mov fp, r6 <== NOT EXECUTED
32a64: e58d6020 str r6, [sp, #32] <== NOT EXECUTED
32a68: e58d6014 str r6, [sp, #20] <== NOT EXECUTED
32a6c: e58d602c str r6, [sp, #44] ; 0x2c <== NOT EXECUTED
32a70: e58d6030 str r6, [sp, #48] ; 0x30 <== NOT EXECUTED
32a74: e58d6018 str r6, [sp, #24] <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
32a78: e58d0040 str r0, [sp, #64] ; 0x40 <== NOT EXECUTED
32a7c: e1a08005 mov r8, r5 <== 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),
32a80: ea0000de b 32e00 <msdos_find_name_in_fat_file+0x474> <== 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)
32a84: e350001f cmp r0, #31 <== NOT EXECUTED
32a88: da0001d6 ble 331e8 <msdos_find_name_in_fat_file+0x85c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
assert(ret == bts2rd);
32a8c: e1500004 cmp r0, r4 <== NOT EXECUTED
32a90: 0a000004 beq 32aa8 <msdos_find_name_in_fat_file+0x11c> <== NOT EXECUTED
32a94: e59f079c ldr r0, [pc, #1948] ; 33238 <msdos_find_name_in_fat_file+0x8ac><== NOT EXECUTED
32a98: e59f17a8 ldr r1, [pc, #1960] ; 33248 <msdos_find_name_in_fat_file+0x8bc><== NOT EXECUTED
32a9c: e59f279c ldr r2, [pc, #1948] ; 33240 <msdos_find_name_in_fat_file+0x8b4><== NOT EXECUTED
32aa0: e59f37a4 ldr r3, [pc, #1956] ; 3324c <msdos_find_name_in_fat_file+0x8c0><== NOT EXECUTED
32aa4: ebffc910 bl 24eec <__assert_func> <== NOT EXECUTED
32aa8: e59d1030 ldr r1, [sp, #48] ; 0x30 <== NOT EXECUTED
32aac: e1a0c006 mov ip, r6 <== NOT EXECUTED
32ab0: e3a05000 mov r5, #0 <== NOT EXECUTED
32ab4: e1a06004 mov r6, r4 <== NOT EXECUTED
/* 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)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
32ab8: e5974098 ldr r4, [r7, #152] ; 0x98 <== 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)
32abc: e59d2020 ldr r2, [sp, #32] <== 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) ==
32ac0: e7d43005 ldrb r3, [r4, 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)
32ac4: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
32ac8: e3590000 cmp r9, #0 <== NOT EXECUTED
32acc: 01a02000 moveq r2, r0 <== NOT EXECUTED
32ad0: 01a0b005 moveq fp, r5 <== NOT EXECUTED
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
32ad4: e3530000 cmp r3, #0 <== 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)
32ad8: e58d2020 str r2, [sp, #32] <== NOT EXECUTED
/* 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)
{
char* entry = (char*) fs_info->cl_buf + dir_entry;
32adc: e0844005 add r4, r4, r5 <== NOT EXECUTED
{
empty_space_entry = dir_entry;
empty_space_offset = dir_offset;
}
if (remainder_empty)
32ae0: 1a00000b bne 32b14 <msdos_find_name_in_fat_file+0x188> <== NOT EXECUTED
#endif
/*
* If just looking and there is no more entries in the
* directory - return name-not-found
*/
if (!create_node)
32ae4: e59d1024 ldr r1, [sp, #36] ; 0x24 <== NOT EXECUTED
32ae8: e3510000 cmp r1, #0 <== NOT EXECUTED
32aec: e1a0c005 mov ip, r5 <== NOT EXECUTED
32af0: e1a04006 mov r4, r6 <== NOT EXECUTED
32af4: e1a05008 mov r5, r8 <== NOT EXECUTED
32af8: e59d8034 ldr r8, [sp, #52] ; 0x34 <== NOT EXECUTED
32afc: 0a0001c8 beq 33224 <msdos_find_name_in_fat_file+0x898> <== 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)
32b00: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
32b04: e3520000 cmp r2, #0 <== NOT EXECUTED
{
empty_space_count +=
entries_per_block - (dir_entry / MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
32b08: 008992a6 addeq r9, r9, r6, 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 +=
32b0c: 004992ac subeq r9, r9, ip, lsr #5 <== NOT EXECUTED
32b10: ea0000c8 b 32e38 <msdos_find_name_in_fat_file+0x4ac> <== NOT EXECUTED
printf ("MSFS:[3.2] esf:%i esc%i\n", empty_space_found, empty_space_count);
#endif
}
break;
}
else if (entry_empty)
32b14: e35300e5 cmp r3, #229 ; 0xe5 <== NOT EXECUTED
32b18: 1a000009 bne 32b44 <msdos_find_name_in_fat_file+0x1b8> <== NOT EXECUTED
{
if (create_node)
32b1c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
32b20: e3530000 cmp r3, #0 <== NOT EXECUTED
32b24: 0a0000ac beq 32ddc <msdos_find_name_in_fat_file+0x450> <== NOT EXECUTED
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
if (empty_space_count == (lfn_entries + 1))
32b28: e59d2040 ldr r2, [sp, #64] ; 0x40 <== NOT EXECUTED
if (create_node)
{
/*
* Remainder is not empty so is this entry empty ?
*/
empty_space_count++;
32b2c: e2899001 add r9, r9, #1 <== NOT EXECUTED
if (empty_space_count == (lfn_entries + 1))
32b30: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
32b34: e1590002 cmp r9, r2 <== NOT EXECUTED
32b38: 03a00001 moveq r0, #1 <== NOT EXECUTED
32b3c: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
32b40: ea0000a5 b 32ddc <msdos_find_name_in_fat_file+0x450> <== 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)
32b44: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
32b48: e3500000 cmp r0, #0 <== NOT EXECUTED
32b4c: 0a000003 beq 32b60 <msdos_find_name_in_fat_file+0x1d4> <== NOT EXECUTED
32b50: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
32b54: e3520000 cmp r2, #0 <== NOT EXECUTED
32b58: 01a0b002 moveq fp, r2 <== NOT EXECUTED
32b5c: 01a09002 moveq r9, r2 <== 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) ==
32b60: e5d4200b ldrb r2, [r4, #11] <== NOT EXECUTED
32b64: e202203f and r2, r2, #63 ; 0x3f <== NOT EXECUTED
32b68: e352000f cmp r2, #15 <== NOT EXECUTED
32b6c: 1a000051 bne 32cb8 <msdos_find_name_in_fat_file+0x32c> <== 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)
32b70: e59d2044 ldr r2, [sp, #68] ; 0x44 <== NOT EXECUTED
32b74: e3720001 cmn r2, #1 <== NOT EXECUTED
32b78: 1a00000b bne 32bac <msdos_find_name_in_fat_file+0x220> <== NOT EXECUTED
/*
* The first entry must have the last long entry
* flag set.
*/
if ((*MSDOS_DIR_ENTRY_TYPE(entry) &
32b7c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED
32b80: 0a000094 beq 32dd8 <msdos_find_name_in_fat_file+0x44c> <== 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) &
32b84: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
32b88: e15a0003 cmp sl, r3 <== NOT EXECUTED
32b8c: 1a000091 bne 32dd8 <msdos_find_name_in_fat_file+0x44c> <== NOT EXECUTED
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
32b90: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
lfn_start.ofs = dir_entry;
32b94: e58d5048 str r5, [sp, #72] ; 0x48 <== NOT EXECUTED
continue;
/*
* Get the checksum of the short entry.
*/
lfn_start.cln = dir_offset;
32b98: e58d3044 str r3, [sp, #68] ; 0x44 <== NOT EXECUTED
lfn_start.ofs = dir_entry;
lfn_entry = lfn_entries;
lfn_checksum = *MSDOS_DIR_LFN_CHECKSUM(entry);
32b9c: e5d4000d ldrb r0, [r4, #13] <== NOT EXECUTED
32ba0: e58da014 str sl, [sp, #20] <== NOT EXECUTED
32ba4: e58d002c str r0, [sp, #44] ; 0x2c <== NOT EXECUTED
32ba8: e3a01000 mov r1, #0 <== 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) &
32bac: e5d43000 ldrb r3, [r4] <== NOT EXECUTED
32bb0: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
32bb4: e203303f and r3, r3, #63 ; 0x3f <== NOT EXECUTED
32bb8: e1520003 cmp r2, r3 <== NOT EXECUTED
32bbc: 1a000003 bne 32bd0 <msdos_find_name_in_fat_file+0x244> <== NOT EXECUTED
MSDOS_LAST_LONG_ENTRY_MASK)) ||
(lfn_checksum != *MSDOS_DIR_LFN_CHECKSUM(entry)))
32bc0: e5d4300d ldrb r3, [r4, #13] <== NOT EXECUTED
32bc4: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
32bc8: e1530000 cmp r3, r0 <== NOT EXECUTED
32bcc: 0a000002 beq 32bdc <msdos_find_name_in_fat_file+0x250> <== NOT EXECUTED
{
#if MSDOS_FIND_PRINT
printf ("MSFS:[4.4] no match\n");
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
32bd0: e3e02000 mvn r2, #0 <== NOT EXECUTED
32bd4: e58d2044 str r2, [sp, #68] ; 0x44 <== NOT EXECUTED
continue;
32bd8: ea00007f b 32ddc <msdos_find_name_in_fat_file+0x450> <== NOT EXECUTED
}
lfn_entry--;
32bdc: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
32be0: e3a0100d mov r1, #13 <== NOT EXECUTED
#endif
lfn_start.cln = FAT_FILE_SHORT_NAME;
continue;
}
lfn_entry--;
32be4: e2432001 sub r2, r3, #1 <== NOT EXECUTED
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
32be8: e0010192 mul r1, r2, r1 <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
32bec: e59d0038 ldr r0, [sp, #56] ; 0x38 <== NOT EXECUTED
32bf0: e0800001 add r0, r0, r1 <== NOT EXECUTED
32bf4: e58d003c str r0, [sp, #60] ; 0x3c <== NOT EXECUTED
32bf8: e58d1004 str r1, [sp, #4] <== NOT EXECUTED
continue;
}
lfn_entry--;
o = lfn_entry * MSDOS_LFN_LEN_PER_ENTRY;
p = entry + 1;
32bfc: e2844001 add r4, r4, #1 <== NOT EXECUTED
32c00: e3a03000 mov r3, #0 <== 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')
32c04: e5d41000 ldrb r1, [r4] <== NOT EXECUTED
32c08: e3510000 cmp r1, #0 <== NOT EXECUTED
32c0c: e58d1030 str r1, [sp, #48] ; 0x30 <== NOT EXECUTED
32c10: 1a000008 bne 32c38 <msdos_find_name_in_fat_file+0x2ac> <== 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) &&
32c14: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
32c18: e150000a cmp r0, sl <== NOT EXECUTED
32c1c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
32c20: 1a00001b bne 32c94 <msdos_find_name_in_fat_file+0x308> <== NOT EXECUTED
32c24: e0833001 add r3, r3, r1 <== NOT EXECUTED
32c28: e59d1074 ldr r1, [sp, #116] ; 0x74 <== NOT EXECUTED
32c2c: e1530001 cmp r3, r1 <== NOT EXECUTED
32c30: 1a00000b bne 32c64 <msdos_find_name_in_fat_file+0x2d8> <== NOT EXECUTED
32c34: ea000016 b 32c94 <msdos_find_name_in_fat_file+0x308> <== NOT EXECUTED
((o + i) != name_len))
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
if (((o + i) >= name_len) || (*p != name[o + i]))
32c38: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
32c3c: e59d1074 ldr r1, [sp, #116] ; 0x74 <== NOT EXECUTED
32c40: e0830000 add r0, r3, r0 <== NOT EXECUTED
32c44: e1500001 cmp r0, r1 <== NOT EXECUTED
32c48: e58d0028 str r0, [sp, #40] ; 0x28 <== NOT EXECUTED
32c4c: aa000004 bge 32c64 <msdos_find_name_in_fat_file+0x2d8> <== NOT EXECUTED
32c50: e59d003c ldr r0, [sp, #60] ; 0x3c <== NOT EXECUTED
32c54: e59d1030 ldr r1, [sp, #48] ; 0x30 <== NOT EXECUTED
32c58: e7d00003 ldrb r0, [r0, r3] <== NOT EXECUTED
32c5c: e1500001 cmp r0, r1 <== NOT EXECUTED
32c60: 0a000002 beq 32c70 <msdos_find_name_in_fat_file+0x2e4> <== NOT EXECUTED
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
32c64: e3e03000 mvn r3, #0 <== NOT EXECUTED
32c68: e58d3044 str r3, [sp, #68] ; 0x44 <== NOT EXECUTED
break;
32c6c: ea000008 b 32c94 <msdos_find_name_in_fat_file+0x308> <== NOT EXECUTED
}
switch (i)
32c70: e3530004 cmp r3, #4 <== NOT EXECUTED
{
case 4:
p += 5;
32c74: 02844005 addeq r4, r4, #5 <== NOT EXECUTED
{
lfn_start.cln = FAT_FILE_SHORT_NAME;
break;
}
switch (i)
32c78: 0a000002 beq 32c88 <msdos_find_name_in_fat_file+0x2fc> <== NOT EXECUTED
32c7c: e353000a cmp r3, #10 <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
32c80: 12844002 addne r4, r4, #2 <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
32c84: 02844004 addeq r4, r4, #4 <== 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++)
32c88: e2833001 add r3, r3, #1 <== NOT EXECUTED
32c8c: e353000d cmp r3, #13 <== NOT EXECUTED
32c90: 1affffdb bne 32c04 <msdos_find_name_in_fat_file+0x278> <== NOT EXECUTED
p += 2;
break;
}
}
lfn_matched = ((lfn_entry == 0) &&
32c94: e3520000 cmp r2, #0 <== NOT EXECUTED
32c98: 13a01000 movne r1, #0 <== NOT EXECUTED
32c9c: 1a000002 bne 32cac <msdos_find_name_in_fat_file+0x320> <== NOT EXECUTED
32ca0: e59d1044 ldr r1, [sp, #68] ; 0x44 <== NOT EXECUTED
32ca4: e2911001 adds r1, r1, #1 <== NOT EXECUTED
32ca8: 13a01001 movne r1, #1 <== NOT EXECUTED
32cac: e20110ff and r1, r1, #255 ; 0xff <== NOT EXECUTED
32cb0: e58d2014 str r2, [sp, #20] <== NOT EXECUTED
32cb4: ea000048 b 32ddc <msdos_find_name_in_fat_file+0x450> <== 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)
32cb8: e3510000 cmp r1, #0 <== NOT EXECUTED
32cbc: 0a00000f beq 32d00 <msdos_find_name_in_fat_file+0x374> <== NOT EXECUTED
32cc0: e3a02000 mov r2, #0 <== NOT EXECUTED
32cc4: e1a03002 mov r3, r2 <== 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;
32cc8: e7d40002 ldrb r0, [r4, r2] <== NOT EXECUTED
32ccc: e2131001 ands r1, r3, #1 <== NOT EXECUTED
32cd0: 13a01080 movne r1, #128 ; 0x80 <== NOT EXECUTED
32cd4: e08030a3 add r3, r0, r3, 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++)
32cd8: e2822001 add r2, r2, #1 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
32cdc: e0833001 add r3, r3, r1 <== 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++)
32ce0: e352000b cmp r2, #11 <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
32ce4: e20330ff and r3, r3, #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++)
32ce8: 1afffff6 bne 32cc8 <msdos_find_name_in_fat_file+0x33c> <== NOT EXECUTED
cs = ((cs & 1) ? 0x80 : 0) + (cs >> 1) + *p;
if (lfn_entry || (lfn_checksum != cs))
32cec: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
32cf0: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
32cf4: e3510000 cmp r1, #0 <== NOT EXECUTED
32cf8: 01500003 cmpeq r0, r3 <== NOT EXECUTED
32cfc: 0a00000d beq 32d38 <msdos_find_name_in_fat_file+0x3ac> <== 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 ||
32d00: e59d2078 ldr r2, [sp, #120] ; 0x78 <== NOT EXECUTED
32d04: e3520001 cmp r2, #1 <== NOT EXECUTED
32d08: 1a000030 bne 32dd0 <msdos_find_name_in_fat_file+0x444> <== NOT EXECUTED
32d0c: e59d3044 ldr r3, [sp, #68] ; 0x44 <== NOT EXECUTED
32d10: e3730001 cmn r3, #1 <== NOT EXECUTED
32d14: 1a00002d bne 32dd0 <msdos_find_name_in_fat_file+0x444> <== NOT EXECUTED
((name_type == MSDOS_NAME_SHORT) &&
(lfn_start.cln == FAT_FILE_SHORT_NAME) &&
(memcmp(MSDOS_DIR_NAME(entry),
32d18: e1a00004 mov r0, r4 <== NOT EXECUTED
32d1c: e59d1080 ldr r1, [sp, #128] ; 0x80 <== NOT EXECUTED
32d20: e282200a add r2, r2, #10 <== NOT EXECUTED
32d24: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
32d28: eb003a2c bl 415e0 <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 ||
32d2c: e3500000 cmp r0, #0 <== NOT EXECUTED
32d30: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
32d34: 1a000025 bne 32dd0 <msdos_find_name_in_fat_file+0x444> <== NOT EXECUTED
32d38: e1a07004 mov r7, r4 <== NOT EXECUTED
32d3c: e1a04006 mov r4, r6 <== NOT EXECUTED
32d40: e1a0600c mov r6, ip <== NOT EXECUTED
32d44: e1a0c005 mov ip, r5 <== NOT EXECUTED
32d48: e1a05008 mov r5, r8 <== NOT EXECUTED
32d4c: e59d8034 ldr r8, [sp, #52] ; 0x34 <== 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,
32d50: e1a03006 mov r3, r6 <== NOT EXECUTED
32d54: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
32d58: e1a01005 mov r1, r5 <== NOT EXECUTED
32d5c: e3a02001 mov r2, #1 <== NOT EXECUTED
32d60: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
32d64: e58d8000 str r8, [sp] <== NOT EXECUTED
32d68: ebffbbe7 bl 21d0c <fat_file_ioctl> <== NOT EXECUTED
dir_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
32d6c: e3500000 cmp r0, #0 <== NOT EXECUTED
32d70: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
32d74: 1a00012d bne 33230 <msdos_find_name_in_fat_file+0x8a4> <== NOT EXECUTED
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
32d78: e59d3044 ldr r3, [sp, #68] ; 0x44 <== NOT EXECUTED
32d7c: 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;
32d80: e588c004 str ip, [r8, #4] <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
32d84: 0a000008 beq 32dac <msdos_find_name_in_fat_file+0x420> <== NOT EXECUTED
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
32d88: e28dc044 add ip, sp, #68 ; 0x44 <== NOT EXECUTED
32d8c: e0030394 mul r3, r4, r3 <== NOT EXECUTED
32d90: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
32d94: e1a01005 mov r1, r5 <== NOT EXECUTED
32d98: e3a02001 mov r2, #1 <== NOT EXECUTED
32d9c: e58dc000 str ip, [sp] <== NOT EXECUTED
32da0: ebffbbd9 bl 21d0c <fat_file_ioctl> <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
32da4: e3500000 cmp r0, #0 <== NOT EXECUTED
32da8: 1a000120 bne 33230 <msdos_find_name_in_fat_file+0x8a4> <== NOT EXECUTED
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
32dac: e59d3048 ldr r3, [sp, #72] ; 0x48 <== NOT EXECUTED
32db0: e588300c str r3, [r8, #12] <== NOT EXECUTED
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
32db4: e59d3044 ldr r3, [sp, #68] ; 0x44 <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
32db8: e59d0080 ldr r0, [sp, #128] ; 0x80 <== NOT EXECUTED
&lfn_start.cln);
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
32dbc: e5883008 str r3, [r8, #8] <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
memcpy(name_dir_entry, entry,
32dc0: e1a01007 mov r1, r7 <== NOT EXECUTED
32dc4: e3a02020 mov r2, #32 <== NOT EXECUTED
32dc8: eb003a2e bl 41688 <memcpy> <== NOT EXECUTED
32dcc: ea000112 b 3321c <msdos_find_name_in_fat_file+0x890> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
}
lfn_start.cln = FAT_FILE_SHORT_NAME;
32dd0: e3e03000 mvn r3, #0 <== NOT EXECUTED
32dd4: e58d3044 str r3, [sp, #68] ; 0x44 <== NOT EXECUTED
32dd8: 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)
32ddc: 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;
32de0: e1550006 cmp r5, r6 <== NOT EXECUTED
32de4: 3affff33 bcc 32ab8 <msdos_find_name_in_fat_file+0x12c> <== NOT EXECUTED
32de8: e1a04006 mov r4, r6 <== NOT EXECUTED
32dec: e08c6004 add r6, ip, r4 <== NOT EXECUTED
}
if (remainder_empty)
break;
dir_offset++;
32df0: e59dc018 ldr ip, [sp, #24] <== NOT EXECUTED
32df4: e28cc001 add ip, ip, #1 <== NOT EXECUTED
32df8: e58d1030 str r1, [sp, #48] ; 0x30 <== NOT EXECUTED
32dfc: e58dc018 str ip, [sp, #24] <== 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),
32e00: e597c098 ldr ip, [r7, #152] ; 0x98 <== NOT EXECUTED
32e04: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
32e08: e1a01008 mov r1, r8 <== NOT EXECUTED
32e0c: e1a02006 mov r2, r6 <== NOT EXECUTED
32e10: e1a03004 mov r3, r4 <== NOT EXECUTED
32e14: e58dc000 str ip, [sp] <== NOT EXECUTED
32e18: ebffbd28 bl 222c0 <fat_file_read> <== NOT EXECUTED
32e1c: e3500000 cmp r0, #0 <== NOT EXECUTED
32e20: 1affff17 bne 32a84 <msdos_find_name_in_fat_file+0xf8> <== NOT EXECUTED
}
/*
* If we are not to create the entry return a not found error.
*/
if (!create_node)
32e24: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
32e28: e3500000 cmp r0, #0 <== NOT EXECUTED
32e2c: e1a05008 mov r5, r8 <== NOT EXECUTED
32e30: e59d8034 ldr r8, [sp, #52] ; 0x34 <== NOT EXECUTED
32e34: 0a0000fa beq 33224 <msdos_find_name_in_fat_file+0x898> <== 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)
32e38: e59d1078 ldr r1, [sp, #120] ; 0x78 <== NOT EXECUTED
32e3c: e3510002 cmp r1, #2 <== NOT EXECUTED
32e40: 1a00001c bne 32eb8 <msdos_find_name_in_fat_file+0x52c> <== NOT EXECUTED
{
int slot = (((empty_space_offset * bts2rd) + empty_space_entry) /
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE) + lfn_entries + 1;
32e44: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
32e48: e020b094 mla r0, r4, r0, fp <== NOT EXECUTED
32e4c: e28a3001 add r3, sl, #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 = '~';
32e50: e59dc080 ldr ip, [sp, #128] ; 0x80 <== 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;
32e54: e08302a0 add r0, r3, r0, 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 = '~';
32e58: 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;
32e5c: 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 == '.'))
32e60: e7dc2003 ldrb r2, [ip, r3] <== NOT EXECUTED
32e64: e3520020 cmp r2, #32 <== NOT EXECUTED
32e68: 1352002e cmpne r2, #46 ; 0x2e <== NOT EXECUTED
*c = '~';
32e6c: 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++)
32e70: e2833001 add r3, r3, #1 <== NOT EXECUTED
32e74: e3530003 cmp r3, #3 <== NOT EXECUTED
32e78: 1afffff8 bne 32e60 <msdos_find_name_in_fat_file+0x4d4> <== NOT EXECUTED
if ((*c == ' ') || (*c == '.'))
*c = '~';
*c++ = '~';
32e7c: e59d2080 ldr r2, [sp, #128] ; 0x80 <== NOT EXECUTED
32e80: e283307b add r3, r3, #123 ; 0x7b <== NOT EXECUTED
32e84: e5c23003 strb r3, [r2, #3] <== NOT EXECUTED
for (i = 0; i < 4; i++, c++)
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
32e88: e59f33c0 ldr r3, [pc, #960] ; 33250 <msdos_find_name_in_fat_file+0x8c4><== NOT EXECUTED
32e8c: e59d2080 ldr r2, [sp, #128] ; 0x80 <== NOT EXECUTED
32e90: e593c048 ldr ip, [r3, #72] ; 0x48 <== NOT EXECUTED
32e94: e3a0300c mov r3, #12 <== NOT EXECUTED
32e98: e1a01350 asr r1, r0, r3 <== NOT EXECUTED
32e9c: e201100f and r1, r1, #15 <== NOT EXECUTED
32ea0: e7dc1001 ldrb r1, [ip, r1] <== NOT EXECUTED
32ea4: 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++)
32ea8: e3730004 cmn r3, #4 <== NOT EXECUTED
*c = hex[(num >> ((3 - i) * 4)) & 0xf];
32eac: e5c21004 strb r1, [r2, #4] <== NOT EXECUTED
32eb0: e2822001 add r2, r2, #1 <== NOT EXECUTED
int i;
for (i = 0; i < 3; i++, c++)
if ((*c == ' ') || (*c == '.'))
*c = '~';
*c++ = '~';
for (i = 0; i < 4; i++, c++)
32eb4: 1afffff7 bne 32e98 <msdos_find_name_in_fat_file+0x50c> <== 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)
32eb8: e35a0000 cmp sl, #0 <== NOT EXECUTED
32ebc: 058da014 streq sl, [sp, #20] <== NOT EXECUTED
32ec0: 0a00000d beq 32efc <msdos_find_name_in_fat_file+0x570> <== NOT EXECUTED
32ec4: e3a03000 mov r3, #0 <== NOT EXECUTED
32ec8: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
32ecc: e1a02003 mov r2, r3 <== NOT EXECUTED
{
uint8_t* p = (uint8_t*) MSDOS_DIR_NAME(name_dir_entry);
int i;
for (i = 0; i < 11; i++, p++)
lfn_checksum =
32ed0: e59dc080 ldr ip, [sp, #128] ; 0x80 <== NOT EXECUTED
32ed4: e7dc0003 ldrb r0, [ip, r3] <== NOT EXECUTED
32ed8: e2121001 ands r1, r2, #1 <== NOT EXECUTED
32edc: 13a01080 movne r1, #128 ; 0x80 <== NOT EXECUTED
32ee0: e08020a2 add r2, r0, r2, lsr #1 <== 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++)
32ee4: e2833001 add r3, r3, #1 <== NOT EXECUTED
lfn_checksum =
32ee8: e0822001 add r2, r2, r1 <== 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++)
32eec: e353000b cmp r3, #11 <== NOT EXECUTED
lfn_checksum =
32ef0: e20220ff and r2, r2, #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++)
32ef4: 1afffff5 bne 32ed0 <msdos_find_name_in_fat_file+0x544> <== NOT EXECUTED
32ef8: e58d2014 str r2, [sp, #20] <== 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)
32efc: e3590000 cmp r9, #0 <== NOT EXECUTED
32f00: 01a0b009 moveq fp, r9 <== NOT EXECUTED
32f04: 03a03001 moveq r3, #1 <== NOT EXECUTED
32f08: 0a000005 beq 32f24 <msdos_find_name_in_fat_file+0x598> <== NOT EXECUTED
}
/*
* Have we read past the empty block ? If so go back and read it again.
*/
if (dir_offset != empty_space_offset)
32f0c: e59d0018 ldr r0, [sp, #24] <== NOT EXECUTED
32f10: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
32f14: e1500001 cmp r0, r1 <== NOT EXECUTED
32f18: 13a03001 movne r3, #1 <== NOT EXECUTED
32f1c: 1a000002 bne 32f2c <msdos_find_name_in_fat_file+0x5a0> <== NOT EXECUTED
32f20: e3a03000 mov r3, #0 <== NOT EXECUTED
32f24: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
32f28: e58d2020 str r2, [sp, #32] <== 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,
32f2c: e59d9020 ldr r9, [sp, #32] <== NOT EXECUTED
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
32f30: e3e02000 mvn r2, #0 <== 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,
32f34: e3a0c000 mov ip, #0 <== 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)
32f38: e28a0001 add r0, sl, #1 <== NOT EXECUTED
read_cluster = true;
/*
* Handle the entry writes.
*/
lfn_start.cln = lfn_start.ofs = FAT_FILE_SHORT_NAME;
32f3c: e58d2044 str r2, [sp, #68] ; 0x44 <== NOT EXECUTED
32f40: e58d2048 str r2, [sp, #72] ; 0x48 <== 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,
32f44: e0090994 mul r9, r4, r9 <== NOT EXECUTED
32f48: e58dc010 str ip, [sp, #16] <== 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)
32f4c: e58d0028 str r0, [sp, #40] ; 0x28 <== NOT EXECUTED
32f50: e58da02c str sl, [sp, #44] ; 0x2c <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
32f54: ea0000ac b 3320c <msdos_find_name_in_fat_file+0x880> <== NOT EXECUTED
{
int length = 0;
if (read_cluster)
32f58: e3530000 cmp r3, #0 <== NOT EXECUTED
32f5c: 0a000023 beq 32ff0 <msdos_find_name_in_fat_file+0x664> <== 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,
32f60: e597c098 ldr ip, [r7, #152] ; 0x98 <== NOT EXECUTED
32f64: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
32f68: e1a01005 mov r1, r5 <== NOT EXECUTED
32f6c: e1a02009 mov r2, r9 <== NOT EXECUTED
32f70: e1a03004 mov r3, r4 <== NOT EXECUTED
32f74: e58dc000 str ip, [sp] <== NOT EXECUTED
32f78: ebffbcd0 bl 222c0 <fat_file_read> <== NOT EXECUTED
(empty_space_offset * bts2rd), bts2rd,
fs_info->cl_buf);
if (ret != bts2rd)
32f7c: e1500004 cmp r0, r4 <== NOT EXECUTED
32f80: 0a00001a beq 32ff0 <msdos_find_name_in_fat_file+0x664> <== NOT EXECUTED
{
if (ret != FAT_EOF)
32f84: e3500000 cmp r0, #0 <== NOT EXECUTED
32f88: 1a000096 bne 331e8 <msdos_find_name_in_fat_file+0x85c> <== 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,
32f8c: e1a01005 mov r1, r5 <== NOT EXECUTED
32f90: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
32f94: e1a02009 mov r2, r9 <== NOT EXECUTED
32f98: e28d304c add r3, sp, #76 ; 0x4c <== NOT EXECUTED
32f9c: ebffbbc6 bl 21ebc <fat_file_extend> <== NOT EXECUTED
&new_length);
if (ret != RC_OK)
32fa0: e2501000 subs r1, r0, #0 <== NOT EXECUTED
32fa4: 11a00001 movne r0, r1 <== NOT EXECUTED
32fa8: 1a0000a0 bne 33230 <msdos_find_name_in_fat_file+0x8a4> <== 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))
32fac: e59d304c ldr r3, [sp, #76] ; 0x4c <== NOT EXECUTED
32fb0: e1530009 cmp r3, r9 <== NOT EXECUTED
32fb4: 1a00008b bne 331e8 <msdos_find_name_in_fat_file+0x85c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
memset(fs_info->cl_buf, 0, bts2rd);
32fb8: e1a02004 mov r2, r4 <== NOT EXECUTED
32fbc: e5970098 ldr r0, [r7, #152] ; 0x98 <== NOT EXECUTED
32fc0: eb003a37 bl 418a4 <memset> <== NOT EXECUTED
ret = fat_file_write(mt_entry, fat_fd,
32fc4: e597c098 ldr ip, [r7, #152] ; 0x98 <== NOT EXECUTED
32fc8: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
32fcc: e1a01005 mov r1, r5 <== NOT EXECUTED
32fd0: e1a02009 mov r2, r9 <== NOT EXECUTED
32fd4: e1a03004 mov r3, r4 <== NOT EXECUTED
32fd8: e58dc000 str ip, [sp] <== NOT EXECUTED
32fdc: ebffbc2a bl 2208c <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)
32fe0: e3700001 cmn r0, #1 <== NOT EXECUTED
32fe4: 0a000090 beq 3322c <msdos_find_name_in_fat_file+0x8a0> <== NOT EXECUTED
return ret;
else if (ret != bts2rd)
32fe8: e1500004 cmp r0, r4 <== NOT EXECUTED
32fec: 1a00007d bne 331e8 <msdos_find_name_in_fat_file+0x85c> <== NOT EXECUTED
32ff0: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
32ff4: e59dc028 ldr ip, [sp, #40] ; 0x28 <== NOT EXECUTED
32ff8: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
32ffc: e2813001 add r3, r1, #1 <== NOT EXECUTED
33000: e1e02001 mvn r2, r1 <== NOT EXECUTED
33004: e59d1038 ldr r1, [sp, #56] ; 0x38 <== NOT EXECUTED
33008: e0822000 add r2, r2, r0 <== NOT EXECUTED
3300c: e063300c rsb r3, r3, ip <== NOT EXECUTED
33010: e3a0c00d mov ip, #13 <== NOT EXECUTED
33014: e021129c mla r1, ip, r2, r1 <== NOT EXECUTED
33018: e20330ff and r3, r3, #255 ; 0xff <== NOT EXECUTED
3301c: e1a02005 mov r2, r5 <== NOT EXECUTED
33020: e3a00000 mov r0, #0 <== NOT EXECUTED
33024: e1a05003 mov r5, r3 <== NOT EXECUTED
33028: e58d1024 str r1, [sp, #36] ; 0x24 <== NOT EXECUTED
3302c: e1a03009 mov r3, r9 <== NOT EXECUTED
33030: e1a0a00b mov sl, fp <== NOT EXECUTED
33034: e58d0018 str r0, [sp, #24] <== NOT EXECUTED
33038: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
3303c: e1a09002 mov r9, r2 <== NOT EXECUTED
33040: ea000055 b 3319c <msdos_find_name_in_fat_file+0x810> <== NOT EXECUTED
char* entry = (char*) fs_info->cl_buf + dir_entry;
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
33044: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
33048: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
lfn_entry++;
3304c: e28cc001 add ip, ip, #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;
33050: e5976098 ldr r6, [r7, #152] ; 0x98 <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
33054: e2822020 add r2, r2, #32 <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
33058: e15c0001 cmp ip, r1 <== 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;
3305c: e086600a add r6, r6, sl <== NOT EXECUTED
char* p;
const char* n;
int i;
length += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
33060: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
length, lfn_entry);
#endif
/*
* Time to write the short file name entry.
*/
if (lfn_entry == (lfn_entries + 1))
33064: 1a00001f bne 330e8 <msdos_find_name_in_fat_file+0x75c> <== NOT EXECUTED
33068: e1a05009 mov r5, r9 <== NOT EXECUTED
{
/* get current cluster number */
int rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
3306c: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
33070: e1a01005 mov r1, r5 <== NOT EXECUTED
33074: e3a02001 mov r2, #1 <== NOT EXECUTED
33078: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
3307c: e1a09003 mov r9, r3 <== NOT EXECUTED
33080: e58d8000 str r8, [sp] <== NOT EXECUTED
33084: ebffbb20 bl 21d0c <fat_file_ioctl> <== NOT EXECUTED
empty_space_offset * bts2rd,
&dir_pos->sname.cln);
if (rc != RC_OK)
33088: e3500000 cmp r0, #0 <== NOT EXECUTED
3308c: 1a000067 bne 33230 <msdos_find_name_in_fat_file+0x8a4> <== NOT EXECUTED
return rc;
dir_pos->sname.ofs = dir_entry;
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
33090: e59d3044 ldr r3, [sp, #68] ; 0x44 <== NOT EXECUTED
33094: 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;
33098: e588a004 str sl, [r8, #4] <== NOT EXECUTED
if (lfn_start.cln != FAT_FILE_SHORT_NAME)
3309c: 0a000008 beq 330c4 <msdos_find_name_in_fat_file+0x738> <== NOT EXECUTED
{
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM,
330a0: e28dc044 add ip, sp, #68 ; 0x44 <== NOT EXECUTED
330a4: e0030394 mul r3, r4, r3 <== NOT EXECUTED
330a8: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
330ac: e1a01005 mov r1, r5 <== NOT EXECUTED
330b0: e3a02001 mov r2, #1 <== NOT EXECUTED
330b4: e58dc000 str ip, [sp] <== NOT EXECUTED
330b8: ebffbb13 bl 21d0c <fat_file_ioctl> <== NOT EXECUTED
lfn_start.cln * bts2rd,
&lfn_start.cln);
if (rc != RC_OK)
330bc: e3500000 cmp r0, #0 <== NOT EXECUTED
330c0: 1a00005a bne 33230 <msdos_find_name_in_fat_file+0x8a4> <== NOT EXECUTED
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
330c4: e59d3044 ldr r3, [sp, #68] ; 0x44 <== NOT EXECUTED
330c8: e5883008 str r3, [r8, #8] <== NOT EXECUTED
dir_pos->lname.ofs = lfn_start.ofs;
330cc: e59d3048 ldr r3, [sp, #72] ; 0x48 <== NOT EXECUTED
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
330d0: e1a00006 mov r0, r6 <== NOT EXECUTED
if (rc != RC_OK)
return rc;
}
dir_pos->lname.cln = lfn_start.cln;
dir_pos->lname.ofs = lfn_start.ofs;
330d4: e588300c str r3, [r8, #12] <== NOT EXECUTED
/* write new node entry */
memcpy (entry, (uint8_t *) name_dir_entry,
330d8: e59d1080 ldr r1, [sp, #128] ; 0x80 <== NOT EXECUTED
330dc: e3a02020 mov r2, #32 <== NOT EXECUTED
330e0: eb003968 bl 41688 <memcpy> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
break;
330e4: ea000031 b 331b0 <msdos_find_name_in_fat_file+0x824> <== 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)
330e8: e59d2044 ldr r2, [sp, #68] ; 0x44 <== NOT EXECUTED
330ec: e3720001 cmn r2, #1 <== NOT EXECUTED
{
lfn_start.cln = empty_space_offset;
330f0: 059d0020 ldreq r0, [sp, #32] <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
330f4: e3a01000 mov r1, #0 <== 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;
330f8: 058d0044 streq r0, [sp, #68] ; 0x44 <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
330fc: e3a02020 mov r2, #32 <== NOT EXECUTED
33100: e1a00006 mov r0, r6 <== NOT EXECUTED
33104: e58d300c str r3, [sp, #12] <== NOT EXECUTED
33108: e58dc008 str ip, [sp, #8] <== 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;
3310c: 058da048 streq sl, [sp, #72] ; 0x48 <== NOT EXECUTED
}
/*
* Clear the entry before loading the data.
*/
memset (entry, 0, MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
33110: eb0039e3 bl 418a4 <memset> <== NOT EXECUTED
*MSDOS_DIR_LFN_CHECKSUM(entry) = lfn_checksum;
33114: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
33118: e5c6100d strb r1, [r6, #13] <== NOT EXECUTED
p = entry + 1;
3311c: e59d0024 ldr r0, [sp, #36] ; 0x24 <== NOT EXECUTED
33120: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
33124: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
33128: e2862001 add r2, r6, #1 <== NOT EXECUTED
3312c: e3a01000 mov r1, #0 <== 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;
33130: e5d0e000 ldrb lr, [r0] <== NOT EXECUTED
33134: e5c2e000 strb lr, [r2] <== NOT EXECUTED
if (*n != 0)
33138: e5d0e000 ldrb lr, [r0] <== NOT EXECUTED
3313c: e35e0000 cmp lr, #0 <== NOT EXECUTED
n++;
33140: 12800001 addne r0, r0, #1 <== NOT EXECUTED
switch (i)
33144: e3510004 cmp r1, #4 <== NOT EXECUTED
{
case 4:
p += 5;
33148: 02822005 addeq r2, r2, #5 <== NOT EXECUTED
{
*p = *n;
if (*n != 0)
n++;
switch (i)
3314c: 0a000002 beq 3315c <msdos_find_name_in_fat_file+0x7d0> <== NOT EXECUTED
33150: e351000a cmp r1, #10 <== NOT EXECUTED
break;
case 10:
p += 4;
break;
default:
p += 2;
33154: 12822002 addne r2, r2, #2 <== NOT EXECUTED
{
case 4:
p += 5;
break;
case 10:
p += 4;
33158: 02822004 addeq r2, r2, #4 <== 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++)
3315c: e2811001 add r1, r1, #1 <== NOT EXECUTED
33160: e351000d cmp r1, #13 <== NOT EXECUTED
33164: 1afffff1 bne 33130 <msdos_find_name_in_fat_file+0x7a4> <== NOT EXECUTED
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
if (lfn_entry == 1)
33168: e35c0001 cmp ip, #1 <== NOT EXECUTED
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
3316c: 03852040 orreq r2, r5, #64 ; 0x40 <== NOT EXECUTED
p += 2;
break;
}
}
*MSDOS_DIR_ENTRY_TYPE(entry) = (lfn_entries - lfn_entry) + 1;
33170: e5c65000 strb r5, [r6] <== NOT EXECUTED
if (lfn_entry == 1)
*MSDOS_DIR_ENTRY_TYPE(entry) |= MSDOS_LAST_LONG_ENTRY;
33174: 05c62000 strbeq r2, [r6] <== NOT EXECUTED
*MSDOS_DIR_ATTR(entry) |= MSDOS_ATTR_LFN;
33178: e5d6200b ldrb r2, [r6, #11] <== NOT EXECUTED
3317c: e382200f orr r2, r2, #15 <== NOT EXECUTED
33180: e5c6200b strb r2, [r6, #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)
33184: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
33188: e242200d sub r2, r2, #13 <== NOT EXECUTED
3318c: e2455001 sub r5, r5, #1 <== NOT EXECUTED
33190: e58d2024 str r2, [sp, #36] ; 0x24 <== NOT EXECUTED
33194: e28aa020 add sl, sl, #32 <== NOT EXECUTED
33198: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
#if MSDOS_FIND_PRINT
printf ("MSFS:[10] eso:%li\n", empty_space_offset);
#endif
for (dir_entry = empty_space_entry;
3319c: e15a0004 cmp sl, r4 <== NOT EXECUTED
331a0: 3affffa7 bcc 33044 <msdos_find_name_in_fat_file+0x6b8> <== NOT EXECUTED
331a4: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
331a8: e1a05009 mov r5, r9 <== NOT EXECUTED
331ac: e1a09003 mov r9, r3 <== 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,
331b0: e5973098 ldr r3, [r7, #152] ; 0x98 <== NOT EXECUTED
331b4: e089200b add r2, r9, fp <== NOT EXECUTED
331b8: e59d001c ldr r0, [sp, #28] <== NOT EXECUTED
331bc: e083b00b add fp, r3, fp <== NOT EXECUTED
331c0: e1a01005 mov r1, r5 <== NOT EXECUTED
331c4: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
331c8: e58db000 str fp, [sp] <== NOT EXECUTED
331cc: ebffbbae bl 2208c <fat_file_write> <== NOT EXECUTED
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
331d0: e3700001 cmn r0, #1 <== NOT EXECUTED
331d4: 0a000014 beq 3322c <msdos_find_name_in_fat_file+0x8a0> <== NOT EXECUTED
return ret;
else if (ret != length)
331d8: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
331dc: e1500003 cmp r0, r3 <== NOT EXECUTED
}
ret = fat_file_write(mt_entry, fat_fd,
(empty_space_offset * bts2rd) + empty_space_entry,
length, fs_info->cl_buf + empty_space_entry);
if (ret == -1)
331e0: e0899004 add r9, r9, r4 <== NOT EXECUTED
return ret;
else if (ret != length)
331e4: 0a000003 beq 331f8 <msdos_find_name_in_fat_file+0x86c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
331e8: eb002c76 bl 3e3c8 <__errno> <== NOT EXECUTED
331ec: e3a03005 mov r3, #5 <== NOT EXECUTED
331f0: e5803000 str r3, [r0] <== NOT EXECUTED
331f4: ea00000c b 3322c <msdos_find_name_in_fat_file+0x8a0> <== NOT EXECUTED
empty_space_offset++;
331f8: e59dc020 ldr ip, [sp, #32] <== NOT EXECUTED
331fc: e28cc001 add ip, ip, #1 <== NOT EXECUTED
33200: e58dc020 str ip, [sp, #32] <== NOT EXECUTED
33204: e3a0b000 mov fp, #0 <== NOT EXECUTED
33208: e3a03001 mov r3, #1 <== NOT EXECUTED
#endif
/*
* The one more is the short entry.
*/
while (lfn_entry < (lfn_entries + 1))
3320c: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
33210: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
33214: e1500001 cmp r0, r1 <== NOT EXECUTED
33218: aaffff4e bge 32f58 <msdos_find_name_in_fat_file+0x5cc> <== NOT EXECUTED
3321c: e3a00000 mov r0, #0 <== NOT EXECUTED
33220: ea000002 b 33230 <msdos_find_name_in_fat_file+0x8a4> <== NOT EXECUTED
33224: e59f0028 ldr r0, [pc, #40] ; 33254 <msdos_find_name_in_fat_file+0x8c8><== NOT EXECUTED
33228: ea000000 b 33230 <msdos_find_name_in_fat_file+0x8a4> <== NOT EXECUTED
3322c: e3e00000 mvn r0, #0 <== NOT EXECUTED
empty_space_entry = 0;
read_cluster = true;
}
return 0;
}
33230: e28dd050 add sp, sp, #80 ; 0x50 <== NOT EXECUTED
33234: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00032830 <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
)
{
32830: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
32834: e1a05001 mov r5, 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) &&
32838: e5911020 ldr r1, [r1, #32] <== NOT EXECUTED
3283c: e3510001 cmp r1, #1 <== NOT EXECUTED
fat_file_fd_t *fat_fd,
uint32_t cl4find,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
32840: e1a0b000 mov fp, r0 <== NOT EXECUTED
32844: e1a0c002 mov ip, r2 <== NOT EXECUTED
32848: e1a09003 mov r9, r3 <== NOT EXECUTED
int rc = RC_OK;
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
3284c: e5907034 ldr r7, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t bts2rd = 0;
uint32_t i = 0, j = 0;
if (FAT_FD_OF_ROOT_DIR(fat_fd) &&
32850: 1a000008 bne 32878 <msdos_find_node_by_cluster_num_in_fat_file+0x48><== NOT EXECUTED
32854: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED
32858: e3530000 cmp r3, #0 <== NOT EXECUTED
3285c: 1a000005 bne 32878 <msdos_find_node_by_cluster_num_in_fat_file+0x48><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
32860: e5d7300a ldrb r3, [r7, #10] <== NOT EXECUTED
32864: e3130003 tst r3, #3 <== NOT EXECUTED
32868: 0a000002 beq 32878 <msdos_find_node_by_cluster_num_in_fat_file+0x48><== NOT EXECUTED
bts2rd = fat_fd->fat_file_size;
3286c: e5956018 ldr r6, [r5, #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) &&
32870: e3a0a000 mov sl, #0 <== NOT EXECUTED
32874: ea000031 b 32940 <msdos_find_node_by_cluster_num_in_fat_file+0x110><== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
bts2rd = fat_fd->fat_file_size;
else
bts2rd = fs_info->fat.vol.bpc;
32878: e1d760b6 ldrh r6, [r7, #6] <== NOT EXECUTED
3287c: eafffffb b 32870 <msdos_find_node_by_cluster_num_in_fat_file+0x40><== 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 )
32880: e350001f cmp r0, #31 <== NOT EXECUTED
32884: ca000004 bgt 3289c <msdos_find_node_by_cluster_num_in_fat_file+0x6c><== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
32888: eb002ece bl 3e3c8 <__errno> <== NOT EXECUTED
3288c: e3a03005 mov r3, #5 <== NOT EXECUTED
32890: e5803000 str r3, [r0] <== NOT EXECUTED
32894: e3e05000 mvn r5, #0 <== NOT EXECUTED
32898: ea000034 b 32970 <msdos_find_node_by_cluster_num_in_fat_file+0x140><== NOT EXECUTED
assert(ret == bts2rd);
3289c: e1500006 cmp r0, r6 <== NOT EXECUTED
328a0: 159f00d0 ldrne r0, [pc, #208] ; 32978 <msdos_find_node_by_cluster_num_in_fat_file+0x148><== NOT EXECUTED
328a4: 159f10d0 ldrne r1, [pc, #208] ; 3297c <msdos_find_node_by_cluster_num_in_fat_file+0x14c><== NOT EXECUTED
328a8: 159f20d0 ldrne r2, [pc, #208] ; 32980 <msdos_find_node_by_cluster_num_in_fat_file+0x150><== NOT EXECUTED
328ac: 159f30d0 ldrne r3, [pc, #208] ; 32984 <msdos_find_node_by_cluster_num_in_fat_file+0x154><== NOT EXECUTED
328b0: 1bffc98d blne 24eec <__assert_func> <== NOT EXECUTED
for (i = 0; i < bts2rd; i += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE)
{
char* entry = (char*) fs_info->cl_buf + i;
328b4: e5973098 ldr r3, [r7, #152] ; 0x98 <== NOT EXECUTED
328b8: e3a04000 mov r4, #0 <== NOT EXECUTED
328bc: e1a08003 mov r8, r3 <== NOT EXECUTED
/* if this and all rest entries are empty - return not-found */
if ((*MSDOS_DIR_ENTRY_TYPE(entry)) ==
328c0: e7d32004 ldrb r2, [r3, r4] <== NOT EXECUTED
328c4: e3520000 cmp r2, #0 <== NOT EXECUTED
328c8: 0a000027 beq 3296c <msdos_find_node_by_cluster_num_in_fat_file+0x13c><== 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)) ==
328cc: e35200e5 cmp r2, #229 ; 0xe5 <== NOT EXECUTED
328d0: 0a000015 beq 3292c <msdos_find_node_by_cluster_num_in_fat_file+0xfc><== NOT EXECUTED
MSDOS_THIS_DIR_ENTRY_EMPTY)
continue;
/* if get a non-empty entry - compare clusters num */
if (MSDOS_EXTRACT_CLUSTER_NUM(entry) == cl4find)
328d4: e1d811b4 ldrh r1, [r8, #20] <== NOT EXECUTED
328d8: e1d821ba ldrh r2, [r8, #26] <== NOT EXECUTED
328dc: e1822801 orr r2, r2, r1, lsl #16 <== NOT EXECUTED
328e0: e152000c cmp r2, ip <== NOT EXECUTED
328e4: 1a000010 bne 3292c <msdos_find_node_by_cluster_num_in_fat_file+0xfc><== NOT EXECUTED
{
/* on success fill aux structure and copy all 32 bytes */
rc = fat_file_ioctl(mt_entry, fat_fd, F_CLU_NUM, j * bts2rd,
328e8: e1a01005 mov r1, r5 <== NOT EXECUTED
328ec: e1a0000b mov r0, fp <== NOT EXECUTED
328f0: e1a0300a mov r3, sl <== NOT EXECUTED
328f4: e3a02001 mov r2, #1 <== NOT EXECUTED
328f8: e58d9000 str r9, [sp] <== NOT EXECUTED
328fc: ebffbd02 bl 21d0c <fat_file_ioctl> <== NOT EXECUTED
&dir_pos->sname.cln);
if (rc != RC_OK)
32900: e2505000 subs r5, r0, #0 <== NOT EXECUTED
32904: 1a000019 bne 32970 <msdos_find_node_by_cluster_num_in_fat_file+0x140><== NOT EXECUTED
return rc;
dir_pos->sname.ofs = i;
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
32908: e3e03000 mvn r3, #0 <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
3290c: e589300c str r3, [r9, #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;
32910: e5894004 str r4, [r9, #4] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
32914: e5893008 str r3, [r9, #8] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
memcpy(dir_entry, entry,
32918: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
3291c: e1a01008 mov r1, r8 <== NOT EXECUTED
32920: e3a02020 mov r2, #32 <== NOT EXECUTED
32924: eb003b57 bl 41688 <memcpy> <== NOT EXECUTED
MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE);
return RC_OK;
32928: ea000010 b 32970 <msdos_find_node_by_cluster_num_in_fat_file+0x140><== 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)
3292c: e2844020 add r4, r4, #32 <== NOT EXECUTED
32930: e1540006 cmp r4, r6 <== NOT EXECUTED
32934: e2888020 add r8, r8, #32 <== NOT EXECUTED
32938: 3affffe0 bcc 328c0 <msdos_find_node_by_cluster_num_in_fat_file+0x90><== NOT EXECUTED
3293c: e08aa006 add sl, sl, r6 <== 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,
32940: e597e098 ldr lr, [r7, #152] ; 0x98 <== NOT EXECUTED
32944: e1a0000b mov r0, fp <== NOT EXECUTED
32948: e1a01005 mov r1, r5 <== NOT EXECUTED
3294c: e1a0200a mov r2, sl <== NOT EXECUTED
32950: e1a03006 mov r3, r6 <== NOT EXECUTED
32954: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
32958: e58de000 str lr, [sp] <== NOT EXECUTED
3295c: ebffbe57 bl 222c0 <fat_file_read> <== NOT EXECUTED
32960: e3500000 cmp r0, #0 <== NOT EXECUTED
32964: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
32968: 1affffc4 bne 32880 <msdos_find_node_by_cluster_num_in_fat_file+0x50><== NOT EXECUTED
3296c: e59f5014 ldr r5, [pc, #20] ; 32988 <msdos_find_node_by_cluster_num_in_fat_file+0x158><== NOT EXECUTED
}
}
j++;
}
return MSDOS_NAME_NOT_FOUND_ERR;
}
32970: e1a00005 mov r0, r5 <== NOT EXECUTED
32974: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001c644 <msdos_format>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1c644: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1c648: e1a04001 mov r4, r1 <== NOT EXECUTED
1c64c: e24ddfb1 sub sp, sp, #708 ; 0x2c4 <== NOT EXECUTED
1c650: e1a05000 mov r5, 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,
1c654: e1a03000 mov r3, r0 <== NOT EXECUTED
1c658: e59f2c2c ldr r2, [pc, #3116] ; 1d28c <msdos_format+0xc48> <== NOT EXECUTED
1c65c: e3a01001 mov r1, #1 <== NOT EXECUTED
1c660: e1a00004 mov r0, r4 <== NOT EXECUTED
1c664: ebffff81 bl 1c470 <msdos_format_printf> <== NOT EXECUTED
"formating: %s\n", devname);
/*
* sanity check on device
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1c668: e1a00004 mov r0, r4 <== NOT EXECUTED
1c66c: e3a01002 mov r1, #2 <== NOT EXECUTED
1c670: e59f2c18 ldr r2, [pc, #3096] ; 1d290 <msdos_format+0xc4c> <== NOT EXECUTED
1c674: e1a03005 mov r3, r5 <== NOT EXECUTED
1c678: ebffff7c bl 1c470 <msdos_format_printf> <== NOT EXECUTED
"stat check: %s\n", devname);
if (ret_val == 0) {
rc = stat(devname, &stat_buf);
1c67c: e1a00005 mov r0, r5 <== NOT EXECUTED
1c680: e28d1e27 add r1, sp, #624 ; 0x270 <== NOT EXECUTED
1c684: ebffb1ea bl 8e34 <stat> <== NOT EXECUTED
ret_val = rc;
}
/* rtems feature: no block devices, all are character devices */
if ((ret_val == 0) &&
1c688: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1c68c: 1a000007 bne 1c6b0 <msdos_format+0x6c> <== NOT EXECUTED
(!S_ISBLK(stat_buf.st_mode))) {
1c690: e59d327c ldr r3, [sp, #636] ; 0x27c <== NOT EXECUTED
1c694: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
1c698: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
1c69c: 0a0002c7 beq 1d1c0 <msdos_format+0xb7c> <== NOT EXECUTED
errno = ENOTTY;
1c6a0: eb008748 bl 3e3c8 <__errno> <== NOT EXECUTED
1c6a4: e3a03019 mov r3, #25 <== NOT EXECUTED
1c6a8: e5803000 str r3, [r0] <== NOT EXECUTED
1c6ac: e3e07000 mvn r7, #0 <== NOT EXECUTED
1c6b0: e3a06000 mov r6, #0 <== NOT EXECUTED
1c6b4: ea000003 b 1c6c8 <msdos_format+0x84> <== 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;
1c6b8: eb008742 bl 3e3c8 <__errno> <== NOT EXECUTED
1c6bc: e3a03019 mov r3, #25 <== NOT EXECUTED
1c6c0: e5803000 str r3, [r0] <== NOT EXECUTED
1c6c4: e3e07000 mvn r7, #0 <== NOT EXECUTED
1c6c8: e3e05000 mvn r5, #0 <== NOT EXECUTED
1c6cc: ea000136 b 1cbac <msdos_format+0x568> <== NOT EXECUTED
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
(rqdata->fat_num == 0)) {
1c6d0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
1c6d4: e3530000 cmp r3, #0 <== NOT EXECUTED
1c6d8: 1a000001 bne 1c6e4 <msdos_format+0xa0> <== NOT EXECUTED
(rqdata->fat_num == 0)) {
fmt_params->fat_num = 2;
1c6dc: e3a03002 mov r3, #2 <== NOT EXECUTED
1c6e0: ea000002 b 1c6f0 <msdos_format+0xac> <== NOT EXECUTED
}
else if (rqdata->fat_num <= 6) {
1c6e4: e3530006 cmp r3, #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) {
1c6e8: 83a07016 movhi r7, #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) {
1c6ec: 8a0000e2 bhi 1ca7c <msdos_format+0x438> <== NOT EXECUTED
fmt_params->fat_num = rqdata->fat_num;
1c6f0: e5cd3250 strb r3, [sp, #592] ; 0x250 <== NOT EXECUTED
ret_val = EINVAL;
}
}
if (ret_val == 0)
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1c6f4: e1a00004 mov r0, r4 <== NOT EXECUTED
1c6f8: e5dd3250 ldrb r3, [sp, #592] ; 0x250 <== NOT EXECUTED
1c6fc: e3a01002 mov r1, #2 <== NOT EXECUTED
1c700: e59f2b8c ldr r2, [pc, #2956] ; 1d294 <msdos_format+0xc50> <== NOT EXECUTED
1c704: ebffff59 bl 1c470 <msdos_format_printf> <== NOT EXECUTED
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
1c708: e3a03001 mov r3, #1 <== NOT EXECUTED
if ((rqdata != NULL) &&
1c70c: e3540000 cmp r4, #0 <== NOT EXECUTED
/*
* determine FAT type and sectors per cluster
* depends on
*/
if (ret_val == 0) {
fmt_params->sectors_per_cluster = 1;
1c710: e58d322c str r3, [sp, #556] ; 0x22c <== NOT EXECUTED
if ((rqdata != NULL) &&
1c714: 0a000010 beq 1c75c <msdos_format+0x118> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT12)) {
1c718: e5d43014 ldrb r3, [r4, #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) &&
1c71c: e3530001 cmp r3, #1 <== NOT EXECUTED
1c720: 0a000004 beq 1c738 <msdos_format+0xf4> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT12)) {
fmt_params->fattype = FAT_FAT12;
}
else if ((rqdata != NULL) &&
1c724: e3530002 cmp r3, #2 <== NOT EXECUTED
1c728: 0a000002 beq 1c738 <msdos_format+0xf4> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT16)) {
fmt_params->fattype = FAT_FAT16;
}
else if ((rqdata != NULL) &&
1c72c: e3530003 cmp r3, #3 <== NOT EXECUTED
1c730: 1a000002 bne 1c740 <msdos_format+0xfc> <== NOT EXECUTED
(rqdata->fattype == MSDOS_FMT_FAT32)) {
fmt_params->fattype = FAT_FAT32;
1c734: e2833001 add r3, r3, #1 <== NOT EXECUTED
1c738: e5cd3252 strb r3, [sp, #594] ; 0x252 <== NOT EXECUTED
1c73c: ea000027 b 1c7e0 <msdos_format+0x19c> <== NOT EXECUTED
}
else if ((rqdata != NULL) &&
1c740: e3530000 cmp r3, #0 <== NOT EXECUTED
1c744: 0a000004 beq 1c75c <msdos_format+0x118> <== NOT EXECUTED
(rqdata->fattype != MSDOS_FMT_FATANY)) {
ret_val = -1;
errno = EINVAL;
1c748: eb00871e bl 3e3c8 <__errno> <== NOT EXECUTED
1c74c: e3a03016 mov r3, #22 <== NOT EXECUTED
1c750: e5803000 str r3, [r0] <== NOT EXECUTED
1c754: e3e07000 mvn r7, #0 <== NOT EXECUTED
1c758: ea000021 b 1c7e4 <msdos_format+0x1a0> <== 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
1c75c: e59d3224 ldr r3, [sp, #548] ; 0x224 <== NOT EXECUTED
1c760: e59f2b30 ldr r2, [pc, #2864] ; 1d298 <msdos_format+0xc54> <== NOT EXECUTED
1c764: e1530002 cmp r3, r2 <== NOT EXECUTED
< ((uint32_t)FAT_FAT12_MAX_CLN)*8) {
fmt_params->fattype = FAT_FAT12;
1c768: 93a03001 movls r3, #1 <== NOT EXECUTED
1c76c: 95cd3252 strbls r3, [sp, #594] ; 0x252 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
1c770: 90833003 addls r3, r3, r3 <== 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
1c774: 9a000015 bls 1c7d0 <msdos_format+0x18c> <== 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
1c778: e59f2b1c ldr r2, [pc, #2844] ; 1d29c <msdos_format+0xc58> <== NOT EXECUTED
1c77c: e1530002 cmp r3, r2 <== NOT EXECUTED
< ((uint32_t)FAT_FAT16_MAX_CLN)*32) {
fmt_params->fattype = FAT_FAT16;
1c780: 93a03002 movls r3, #2 <== NOT EXECUTED
/* start trying with small clusters */
fmt_params->sectors_per_cluster = 2;
1c784: 958d322c strls r3, [sp, #556] ; 0x22c <== 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;
1c788: 95cd3252 strbls r3, [sp, #594] ; 0x252 <== 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
1c78c: 9a000010 bls 1c7d4 <msdos_format+0x190> <== 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;
1c790: e3a02101 mov r2, #1073741824 ; 0x40000000 <== NOT EXECUTED
1c794: e0922007 adds r2, r2, r7 <== NOT EXECUTED
1c798: e3a03000 mov r3, #0 <== NOT EXECUTED
1c79c: e0a33008 adc r3, r3, r8 <== NOT EXECUTED
1c7a0: e1a01f22 lsr r1, r2, #30 <== NOT EXECUTED
1c7a4: e1811103 orr r1, r1, r3, lsl #2 <== 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)
1c7a8: e3a02001 mov r2, #1 <== 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;
1c7ac: 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)
1c7b0: e0110312 ands r0, r1, r2, lsl r3 <== NOT EXECUTED
1c7b4: 1a000001 bne 1c7c0 <msdos_format+0x17c> <== 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--)
1c7b8: e2533001 subs r3, r3, #1 <== NOT EXECUTED
1c7bc: 1afffffb bne 1c7b0 <msdos_format+0x16c> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fmt_params->sectors_per_cluster = 1 << b;
1c7c0: e3a02001 mov r2, #1 <== NOT EXECUTED
1c7c4: e1a03312 lsl r3, r2, r3 <== 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;
1c7c8: e2822003 add r2, r2, #3 <== NOT EXECUTED
1c7cc: e5cd2252 strb r2, [sp, #594] ; 0x252 <== 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;
1c7d0: e58d322c str r3, [sp, #556] ; 0x22c <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
1c7d4: e3540000 cmp r4, #0 <== NOT EXECUTED
1c7d8: 01a07004 moveq r7, r4 <== NOT EXECUTED
1c7dc: 0a000003 beq 1c7f0 <msdos_format+0x1ac> <== NOT EXECUTED
1c7e0: e3a07000 mov r7, #0 <== NOT EXECUTED
(rqdata->sectors_per_cluster > 0)) {
1c7e4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
}
}
/*
* try to use user requested cluster size
*/
if ((rqdata != NULL) &&
1c7e8: e3530000 cmp r3, #0 <== NOT EXECUTED
(rqdata->sectors_per_cluster > 0)) {
fmt_params->sectors_per_cluster =
1c7ec: 158d322c strne r3, [sp, #556] ; 0x22c <== 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) {
1c7f0: e59da220 ldr sl, [sp, #544] ; 0x220 <== NOT EXECUTED
1c7f4: e59d322c ldr r3, [sp, #556] ; 0x22c <== NOT EXECUTED
1c7f8: e3a08080 mov r8, #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) {
1c7fc: e1530008 cmp r3, r8 <== NOT EXECUTED
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
1c800: e1a0100a mov r1, sl <== NOT EXECUTED
1c804: 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) {
1c808: 3a000004 bcc 1c820 <msdos_format+0x1dc> <== NOT EXECUTED
fmt_params->sectors_per_cluster = onebit;
if (fmt_params->sectors_per_cluster
1c80c: eb00e6bc bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
1c810: e1580000 cmp r8, r0 <== NOT EXECUTED
1c814: 91a03008 movls r3, r8 <== NOT EXECUTED
1c818: 81a03008 movhi r3, r8 <== NOT EXECUTED
1c81c: 93a08001 movls r8, #1 <== 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) {
1c820: e1b080a8 lsrs r8, r8, #1 <== NOT EXECUTED
1c824: 1afffff4 bne 1c7fc <msdos_format+0x1b8> <== NOT EXECUTED
}
}
}
}
if (ret_val == 0) {
1c828: e3570000 cmp r7, #0 <== 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) {
1c82c: e58d322c str r3, [sp, #556] ; 0x22c <== NOT EXECUTED
}
}
}
}
if (ret_val == 0) {
1c830: 1a000091 bne 1ca7c <msdos_format+0x438> <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1c834: e1a00004 mov r0, r4 <== NOT EXECUTED
1c838: e3a01002 mov r1, #2 <== NOT EXECUTED
1c83c: e59f2a5c ldr r2, [pc, #2652] ; 1d2a0 <msdos_format+0xc5c> <== NOT EXECUTED
1c840: ebffff0a bl 1c470 <msdos_format_printf> <== NOT EXECUTED
"sectors per cluster: %d\n", fmt_params->sectors_per_cluster);
if (fmt_params->fattype == FAT_FAT32) {
1c844: e5dd3252 ldrb r3, [sp, #594] ; 0x252 <== NOT EXECUTED
1c848: e3530004 cmp r3, #4 <== NOT EXECUTED
1c84c: 1a000007 bne 1c870 <msdos_format+0x22c> <== NOT EXECUTED
/* recommended: for FAT32, always set reserved sector count to 32 */
fmt_params->rsvd_sector_cnt = 32;
1c850: e283301c add r3, r3, #28 <== NOT EXECUTED
1c854: e58d3228 str r3, [sp, #552] ; 0x228 <== 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;
1c858: e3a03006 mov r3, #6 <== NOT EXECUTED
1c85c: e58d3248 str r3, [sp, #584] ; 0x248 <== NOT EXECUTED
/* location of fsinfo sector */
fmt_params->fsinfo_sec = 1;
1c860: e3a03001 mov r3, #1 <== NOT EXECUTED
1c864: e58d324c str r3, [sp, #588] ; 0x24c <== 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;
1c868: e58d7238 str r7, [sp, #568] ; 0x238 <== NOT EXECUTED
1c86c: ea000015 b 1c8c8 <msdos_format+0x284> <== 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;
1c870: 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) &&
1c874: e3540000 cmp r4, #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;
1c878: e58d3228 str r3, [sp, #552] ; 0x228 <== 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) &&
1c87c: 0a000002 beq 1c88c <msdos_format+0x248> <== NOT EXECUTED
(rqdata->files_per_root_dir > 0)) {
1c880: e5943010 ldr r3, [r4, #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) &&
1c884: e3530000 cmp r3, #0 <== NOT EXECUTED
1c888: 1a000003 bne 1c89c <msdos_format+0x258> <== 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) {
1c88c: e5dd3252 ldrb r3, [sp, #594] ; 0x252 <== NOT EXECUTED
1c890: e3530002 cmp r3, #2 <== NOT EXECUTED
fmt_params->files_per_root_dir = 512;
1c894: 03a03c02 moveq r3, #512 ; 0x200 <== NOT EXECUTED
}
else {
fmt_params->files_per_root_dir = 64;
1c898: 13a03040 movne r3, #64 ; 0x40 <== NOT EXECUTED
1c89c: e58d3238 str r3, [sp, #568] ; 0x238 <== NOT EXECUTED
}
}
fmt_params->files_per_root_dir = (fmt_params->files_per_root_dir +
1c8a0: e59d1220 ldr r1, [sp, #544] ; 0x220 <== NOT EXECUTED
1c8a4: e59d8238 ldr r8, [sp, #568] ; 0x238 <== NOT EXECUTED
1c8a8: e1a01081 lsl r1, r1, #1 <== NOT EXECUTED
1c8ac: e1a012a1 lsr r1, r1, #5 <== NOT EXECUTED
1c8b0: e2488001 sub r8, r8, #1 <== NOT EXECUTED
1c8b4: e0888001 add r8, r8, 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 %
1c8b8: e1a00008 mov r0, r8 <== NOT EXECUTED
1c8bc: eb00e724 bl 56554 <__umodsi3> <== NOT EXECUTED
1c8c0: e0600008 rsb r0, r0, r8 <== NOT EXECUTED
1c8c4: e58d0238 str r0, [sp, #568] ; 0x238 <== 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)
+ fmt_params->bytes_per_sector - 1)
1c8c8: e59da220 ldr sl, [sp, #544] ; 0x220 <== 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)
1c8cc: e59d0238 ldr r0, [sp, #568] ; 0x238 <== NOT EXECUTED
1c8d0: e24a3001 sub r3, sl, #1 <== NOT EXECUTED
1c8d4: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED
1c8d8: e1a0100a mov r1, sl <== NOT EXECUTED
1c8dc: eb00e688 bl 56304 <__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 -
1c8e0: e28d1f89 add r1, sp, #548 ; 0x224 <== NOT EXECUTED
1c8e4: e8910006 ldm r1, {r1, r2} <== 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)
1c8e8: 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 -
1c8ec: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
1c8f0: 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) {
1c8f4: e3a00902 mov r0, #32768 ; 0x8000 <== NOT EXECUTED
1c8f8: e1a0100a mov r1, sl <== 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 -
1c8fc: e58d2010 str r2, [sp, #16] <== 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 =
1c900: e58d323c str r3, [sp, #572] ; 0x23c <== 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) {
1c904: eb00e67e bl 56304 <__aeabi_uidiv> <== 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,
1c908: e5dd2250 ldrb r2, [sp, #592] ; 0x250 <== NOT EXECUTED
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
1c90c: e5dd9252 ldrb r9, [sp, #594] ; 0x252 <== NOT EXECUTED
(fmt_params->fattype,
fmt_params->bytes_per_sector,
fatdata_sect_cnt,
fmt_params->fat_num,
1c910: e58d200c str r2, [sp, #12] <== NOT EXECUTED
/*
* check values to get legal arrangement of FAT type and cluster count
*/
ret_val = msdos_format_eval_sectors_per_cluster
1c914: e59d822c ldr r8, [sp, #556] ; 0x22c <== NOT EXECUTED
1c918: ea000000 b 1c920 <msdos_format+0x2dc> <== NOT EXECUTED
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) {
sectors_per_cluster /= 2;
1c91c: e1a080a8 lsr r8, r8, #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) {
1c920: e1500008 cmp r0, r8 <== NOT EXECUTED
1c924: 3afffffc bcc 1c91c <msdos_format+0x2d8> <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1c928: e24a3001 sub r3, sl, #1 <== NOT EXECUTED
1c92c: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
1c930: e58d7018 str r7, [sp, #24] <== 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;
1c934: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
1c938: e1a01008 mov r1, r8 <== NOT EXECUTED
1c93c: eb00e670 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
if (fattype == FAT_FAT12) {
1c940: e3590001 cmp r9, #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;
1c944: e1a07000 mov r7, r0 <== NOT EXECUTED
if (fattype == FAT_FAT12) {
fat_capacity = fatdata_cluster_cnt * 3 / 2;
1c948: 03a00003 moveq r0, #3 <== NOT EXECUTED
1c94c: 00000097 muleq r0, r7, r0 <== NOT EXECUTED
1c950: 01a000a0 lsreq r0, r0, #1 <== NOT EXECUTED
* - 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;
if (fattype == FAT_FAT12) {
1c954: 0a000002 beq 1c964 <msdos_format+0x320> <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 3 / 2;
}
else if (fattype == FAT_FAT16) {
1c958: e3590002 cmp r9, #2 <== NOT EXECUTED
fat_capacity = fatdata_cluster_cnt * 2;
1c95c: 01a00087 lsleq r0, r7, #1 <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
1c960: 11a00107 lslne r0, r7, #2 <== NOT EXECUTED
}
sectors_per_fat = ((fat_capacity
1c964: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
1c968: e1a0100a mov r1, sl <== NOT EXECUTED
1c96c: e08c0000 add r0, ip, r0 <== NOT EXECUTED
1c970: eb00e663 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
1c974: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
}
else { /* FAT32 */
fat_capacity = fatdata_cluster_cnt * 4;
}
sectors_per_fat = ((fat_capacity
1c978: e1a0b000 mov fp, r0 <== NOT EXECUTED
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
1c97c: e2480001 sub r0, r8, #1 <== NOT EXECUTED
1c980: e0200b92 mla r0, r2, fp, r0 <== NOT EXECUTED
1c984: e1a01008 mov r1, r8 <== NOT EXECUTED
1c988: eb00e65d bl 56304 <__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)) ||
1c98c: e59fc910 ldr ip, [pc, #2320] ; 1d2a4 <msdos_format+0xc60> <== NOT EXECUTED
sectors_per_fat = ((fat_capacity
+ (bytes_per_sector - 1))
/ bytes_per_sector);
data_cluster_cnt = (fatdata_cluster_cnt -
1c990: e0600007 rsb r0, r0, r7 <== 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)) ||
1c994: e150000c cmp r0, ip <== NOT EXECUTED
1c998: 93a03000 movls r3, #0 <== NOT EXECUTED
1c99c: 83a03001 movhi r3, #1 <== NOT EXECUTED
1c9a0: e3590001 cmp r9, #1 <== NOT EXECUTED
1c9a4: 13a03000 movne r3, #0 <== NOT EXECUTED
1c9a8: e3530000 cmp r3, #0 <== NOT EXECUTED
1c9ac: 1a000008 bne 1c9d4 <msdos_format+0x390> <== NOT EXECUTED
1c9b0: e59f28f0 ldr r2, [pc, #2288] ; 1d2a8 <msdos_format+0xc64> <== NOT EXECUTED
1c9b4: e1500002 cmp r0, r2 <== NOT EXECUTED
1c9b8: 93a03000 movls r3, #0 <== NOT EXECUTED
1c9bc: 83a03001 movhi r3, #1 <== NOT EXECUTED
1c9c0: e3590002 cmp r9, #2 <== NOT EXECUTED
1c9c4: 13a03000 movne r3, #0 <== NOT EXECUTED
1c9c8: e3530000 cmp r3, #0 <== NOT EXECUTED
1c9cc: 02833001 addeq r3, r3, #1 <== NOT EXECUTED
1c9d0: 0a000001 beq 1c9dc <msdos_format+0x398> <== NOT EXECUTED
((fattype == FAT_FAT16) && (data_cluster_cnt > FAT_FAT16_MAX_CLN))) {
sectors_per_cluster *= 2;
1c9d4: e1a08088 lsl r8, r8, #1 <== NOT EXECUTED
1c9d8: e3a03000 mov r3, #0 <== NOT EXECUTED
finished = true;
}
/*
* when maximum cluster size is exceeded, we have invalid data, abort...
*/
if ((sectors_per_cluster * bytes_per_sector)
1c9dc: e002089a mul r2, sl, r8 <== NOT EXECUTED
1c9e0: e3520902 cmp r2, #32768 ; 0x8000 <== NOT EXECUTED
1c9e4: 8a000004 bhi 1c9fc <msdos_format+0x3b8> <== NOT EXECUTED
> MS_BYTES_PER_CLUSTER_LIMIT) {
ret_val = EINVAL;
finished = true;
}
} while (!finished);
1c9e8: e3530000 cmp r3, #0 <== NOT EXECUTED
1c9ec: 0affffd0 beq 1c934 <msdos_format+0x2f0> <== NOT EXECUTED
1c9f0: e59d7018 ldr r7, [sp, #24] <== 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;
1c9f4: e58db230 str fp, [sp, #560] ; 0x230 <== NOT EXECUTED
1c9f8: ea000004 b 1ca10 <msdos_format+0x3cc> <== NOT EXECUTED
finished = true;
}
} while (!finished);
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
1c9fc: eb008671 bl 3e3c8 <__errno> <== NOT EXECUTED
1ca00: e3a03016 mov r3, #22 <== NOT EXECUTED
1ca04: e5803000 str r3, [r0] <== NOT EXECUTED
1ca08: e3a08000 mov r8, #0 <== NOT EXECUTED
1ca0c: e3e07000 mvn r7, #0 <== NOT EXECUTED
}
/*
* determine media code
*/
if (ret_val == 0) {
1ca10: e3570000 cmp r7, #0 <== 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;
1ca14: e58d822c str r8, [sp, #556] ; 0x22c <== NOT EXECUTED
}
/*
* determine media code
*/
if (ret_val == 0) {
1ca18: 1a000013 bne 1ca6c <msdos_format+0x428> <== NOT EXECUTED
if ((rqdata != NULL) &&
1ca1c: e3540000 cmp r4, #0 <== NOT EXECUTED
1ca20: 0a000013 beq 1ca74 <msdos_format+0x430> <== NOT EXECUTED
1ca24: e5d48015 ldrb r8, [r4, #21] <== NOT EXECUTED
1ca28: e3580000 cmp r8, #0 <== NOT EXECUTED
1ca2c: 0a000010 beq 1ca74 <msdos_format+0x430> <== NOT EXECUTED
(rqdata->media != 0)) {
const char valid_media_codes[] =
{0xF0,0xF8,0xF9,0xFA,0xFB,0xFC,0xFD,0xFE,0xFF};
1ca30: e59f3874 ldr r3, [pc, #2164] ; 1d2ac <msdos_format+0xc68> <== NOT EXECUTED
1ca34: e8930007 ldm r3, {r0, r1, r2} <== NOT EXECUTED
1ca38: e28d3fae add r3, sp, #696 ; 0x2b8 <== NOT EXECUTED
1ca3c: e8a30003 stmia r3!, {r0, r1} <== NOT EXECUTED
if (NULL==memchr(valid_media_codes,
1ca40: e28d0fae add r0, sp, #696 ; 0x2b8 <== 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};
1ca44: e5c32000 strb r2, [r3] <== NOT EXECUTED
if (NULL==memchr(valid_media_codes,
1ca48: e1a01008 mov r1, r8 <== NOT EXECUTED
1ca4c: e3a02009 mov r2, #9 <== NOT EXECUTED
1ca50: eb0092ad bl 4150c <memchr> <== NOT EXECUTED
1ca54: e3500000 cmp r0, #0 <== NOT EXECUTED
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
}
else {
fmt_params->media_code = rqdata->media;
1ca58: 15cd8251 strbne r8, [sp, #593] ; 0x251 <== 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,
1ca5c: 1a000006 bne 1ca7c <msdos_format+0x438> <== NOT EXECUTED
rqdata->media,
sizeof(valid_media_codes))) {
ret_val = -1;
errno = EINVAL;
1ca60: eb008658 bl 3e3c8 <__errno> <== NOT EXECUTED
1ca64: e3a03016 mov r3, #22 <== NOT EXECUTED
1ca68: e5803000 str r3, [r0] <== NOT EXECUTED
1ca6c: e3e07000 mvn r7, #0 <== NOT EXECUTED
1ca70: ea000001 b 1ca7c <msdos_format+0x438> <== NOT EXECUTED
else {
fmt_params->media_code = rqdata->media;
}
}
else {
fmt_params->media_code = FAT_BR_MEDIA_FIXED;
1ca74: e3e03007 mvn r3, #7 <== NOT EXECUTED
1ca78: e5cd3251 strb r3, [sp, #593] ; 0x251 <== NOT EXECUTED
}
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
1ca7c: e59d023c ldr r0, [sp, #572] ; 0x23c <== NOT EXECUTED
1ca80: e59d3230 ldr r3, [sp, #560] ; 0x230 <== NOT EXECUTED
1ca84: e5dd1250 ldrb r1, [sp, #592] ; 0x250 <== NOT EXECUTED
1ca88: e59d2228 ldr r2, [sp, #552] ; 0x228 <== NOT EXECUTED
1ca8c: e3500000 cmp r0, #0 <== NOT EXECUTED
}
else {
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
1ca90: 00202193 mlaeq r0, r3, r1, r2 <== NOT EXECUTED
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
1ca94: 102c2193 mlane ip, r3, r1, r2 <== NOT EXECUTED
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
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;
1ca98: 059d322c ldreq r3, [sp, #556] ; 0x22c <== NOT EXECUTED
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
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;
1ca9c: 158d0244 strne r0, [sp, #580] ; 0x244 <== NOT EXECUTED
/*
* determine location and size of root directory
* for formatting
*/
if (fmt_params->root_dir_sectors > 0) {
fmt_params->root_dir_start_sec =
1caa0: 158dc240 strne ip, [sp, #576] ; 0x240 <== NOT EXECUTED
}
else {
/*
* for FAT32: root directory is in cluster 2
*/
fmt_params->root_dir_start_sec =
1caa4: 058d0240 streq r0, [sp, #576] ; 0x240 <== 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;
1caa8: 058d3244 streq r3, [sp, #580] ; 0x244 <== NOT EXECUTED
}
/*
* determine usable OEMName
*/
if (ret_val == 0) {
1caac: e3570000 cmp r7, #0 <== NOT EXECUTED
1cab0: 1a00003a bne 1cba0 <msdos_format+0x55c> <== NOT EXECUTED
const char *from;
char *to = fmt_params->OEMName;
int cnt;
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
1cab4: e3540000 cmp r4, #0 <== NOT EXECUTED
1cab8: 059f37f0 ldreq r3, [pc, #2032] ; 1d2b0 <msdos_format+0xc6c><== NOT EXECUTED
1cabc: 0a000003 beq 1cad0 <msdos_format+0x48c> <== NOT EXECUTED
(rqdata->OEMName != NULL)) {
1cac0: e5943000 ldr r3, [r4] <== 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) &&
1cac4: e59f27e4 ldr r2, [pc, #2020] ; 1d2b0 <msdos_format+0xc6c> <== NOT EXECUTED
1cac8: e3530000 cmp r3, #0 <== NOT EXECUTED
1cacc: 01a03002 moveq r3, r2 <== NOT EXECUTED
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
1cad0: e59f27dc ldr r2, [pc, #2012] ; 1d2b4 <msdos_format+0xc70> <== NOT EXECUTED
1cad4: e28d1e22 add r1, sp, #544 ; 0x220 <== NOT EXECUTED
1cad8: e5920000 ldr r0, [r2] <== NOT EXECUTED
}
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
int msdos_format
1cadc: e281803c add r8, r1, #60 ; 0x3c <== NOT EXECUTED
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
1cae0: e2812034 add r2, r1, #52 ; 0x34 <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1cae4: e3a07020 mov r7, #32 <== NOT EXECUTED
}
*to = '\0';
1cae8: e3a0e000 mov lr, #0 <== NOT EXECUTED
1caec: ea000007 b 1cb10 <msdos_format+0x4cc> <== NOT EXECUTED
from = rqdata->OEMName;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
1caf0: e5d3c000 ldrb ip, [r3] <== NOT EXECUTED
1caf4: e080a00c add sl, r0, ip <== NOT EXECUTED
1caf8: e5daa001 ldrb sl, [sl, #1] <== NOT EXECUTED
1cafc: e31a0097 tst sl, #151 ; 0x97 <== NOT EXECUTED
*to++ = *from++;
1cb00: 1542c001 strbne ip, [r2, #-1] <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1cb04: 05427001 strbeq r7, [r2, #-1] <== NOT EXECUTED
}
*to = '\0';
1cb08: e4c2e001 strb lr, [r2], #1 <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->OEMName)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
1cb0c: 12833001 addne r3, r3, #1 <== NOT EXECUTED
from = "RTEMS"; /* default: make "from" point to OS Name */
if ((rqdata != NULL) &&
(rqdata->OEMName != NULL)) {
from = rqdata->OEMName;
}
for (cnt = 0;
1cb10: e1520008 cmp r2, r8 <== NOT EXECUTED
1cb14: 1afffff5 bne 1caf0 <msdos_format+0x4ac> <== 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) &&
1cb18: e3540000 cmp r4, #0 <== NOT EXECUTED
1cb1c: 0a000004 beq 1cb34 <msdos_format+0x4f0> <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
1cb20: e5943004 ldr r3, [r4, #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) &&
1cb24: e3530000 cmp r3, #0 <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
1cb28: 13a02001 movne r2, #1 <== NOT EXECUTED
1cb2c: 15cd2268 strbne r2, [sp, #616] ; 0x268 <== 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) &&
1cb30: 1a000000 bne 1cb38 <msdos_format+0x4f4> <== NOT EXECUTED
1cb34: e59f377c ldr r3, [pc, #1916] ; 1d2b8 <msdos_format+0xc74> <== NOT EXECUTED
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
1cb38: e28d2f97 add r2, sp, #604 ; 0x25c <== NOT EXECUTED
}
/*=========================================================================*\
| Function: |
\*-------------------------------------------------------------------------*/
int msdos_format
1cb3c: e2811048 add r1, r1, #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;
1cb40: e2822001 add r2, r2, #1 <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1cb44: e3a07020 mov r7, #32 <== NOT EXECUTED
}
*to = '\0';
1cb48: e3a0e000 mov lr, #0 <== NOT EXECUTED
1cb4c: ea000007 b 1cb70 <msdos_format+0x52c> <== NOT EXECUTED
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
1cb50: e5d3c000 ldrb ip, [r3] <== NOT EXECUTED
1cb54: e080800c add r8, r0, ip <== NOT EXECUTED
1cb58: e5d88001 ldrb r8, [r8, #1] <== NOT EXECUTED
1cb5c: e3180097 tst r8, #151 ; 0x97 <== NOT EXECUTED
*to++ = *from++;
1cb60: 1542c001 strbne ip, [r2, #-1] <== NOT EXECUTED
/*
* non-printable character in given name, so keep stuck
* at that character and replace all following characters
* with a ' '
*/
*to++=' ';
1cb64: 05427001 strbeq r7, [r2, #-1] <== NOT EXECUTED
}
*to = '\0';
1cb68: e4c2e001 strb lr, [r2], #1 <== NOT EXECUTED
}
for (cnt = 0;
cnt < (sizeof(fmt_params->VolLabel)-1);
cnt++) {
if (isprint((unsigned char)*from)) {
*to++ = *from++;
1cb6c: 12833001 addne r3, r3, #1 <== NOT EXECUTED
if ((rqdata != NULL) &&
(rqdata->VolLabel != NULL)) {
from = rqdata->VolLabel;
fmt_params->VolLabel_present = true;
}
for (cnt = 0;
1cb70: e1520001 cmp r2, r1 <== NOT EXECUTED
1cb74: 1afffff5 bne 1cb50 <msdos_format+0x50c> <== NOT EXECUTED
{
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
1cb78: e28d0fae add r0, sp, #696 ; 0x2b8 <== NOT EXECUTED
1cb7c: ebffb997 bl b1e0 <rtems_clock_get_tod_timeval> <== NOT EXECUTED
if (rc == RTEMS_SUCCESSFUL) {
1cb80: e3500000 cmp r0, #0 <== NOT EXECUTED
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
1cb84: 059d32b8 ldreq r3, [sp, #696] ; 0x2b8 <== NOT EXECUTED
1cb88: 01a03083 lsleq r3, r3, #1 <== NOT EXECUTED
1cb8c: 058d326c streq r3, [sp, #620] ; 0x26c <== NOT EXECUTED
int ret_val = 0;
int rc;
struct timeval time_value;
rc = rtems_clock_get_tod_timeval(&time_value);
if (rc == RTEMS_SUCCESSFUL) {
1cb90: 0a0001ad beq 1d24c <msdos_format+0xc08> <== NOT EXECUTED
*volid_ptr = time_value.tv_sec + time_value.tv_sec;
}
else {
*volid_ptr = rand();
1cb94: eb009a6d bl 43550 <rand> <== NOT EXECUTED
1cb98: e58d026c str r0, [sp, #620] ; 0x26c <== NOT EXECUTED
1cb9c: ea0001aa b 1d24c <msdos_format+0xc08> <== NOT EXECUTED
}
/*
* Phuuu.... That's it.
*/
if (ret_val != 0) {
rtems_set_errno_and_return_minus_one(ret_val);
1cba0: eb008608 bl 3e3c8 <__errno> <== NOT EXECUTED
1cba4: e5807000 str r7, [r0] <== NOT EXECUTED
1cba8: e3e07000 mvn r7, #0 <== 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) &&
1cbac: e2773001 rsbs r3, r7, #1 <== NOT EXECUTED
1cbb0: 33a03000 movcc r3, #0 <== NOT EXECUTED
1cbb4: e3540000 cmp r4, #0 <== NOT EXECUTED
1cbb8: 03a03000 moveq r3, #0 <== NOT EXECUTED
1cbbc: e3530000 cmp r3, #0 <== NOT EXECUTED
1cbc0: 0a00000b beq 1cbf4 <msdos_format+0x5b0> <== NOT EXECUTED
(rqdata != NULL) &&
!(rqdata->quick_format)) {
1cbc4: e5d42016 ldrb r2, [r4, #22] <== NOT EXECUTED
1cbc8: e3520000 cmp r2, #0 <== NOT EXECUTED
1cbcc: 1a00000a bne 1cbfc <msdos_format+0x5b8> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
1cbd0: e59dc220 ldr ip, [sp, #544] ; 0x220 <== NOT EXECUTED
1cbd4: e1a00004 mov r0, r4 <== NOT EXECUTED
1cbd8: e58dc000 str ip, [sp] <== NOT EXECUTED
1cbdc: e1a01005 mov r1, r5 <== NOT EXECUTED
1cbe0: e3a0c0e5 mov ip, #229 ; 0xe5 <== NOT EXECUTED
1cbe4: e59d3224 ldr r3, [sp, #548] ; 0x224 <== NOT EXECUTED
1cbe8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
1cbec: ebfffe48 bl 1c514 <msdos_format_fill_sectors> <== NOT EXECUTED
1cbf0: e1a07000 mov r7, r0 <== NOT EXECUTED
0xe5);
}
/*
* create master boot record
*/
if (ret_val == 0) {
1cbf4: e3570000 cmp r7, #0 <== NOT EXECUTED
1cbf8: 1a000167 bne 1d19c <msdos_format+0xb58> <== NOT EXECUTED
/*
* Read the current MBR to obtain the partition table.
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1cbfc: e1a00004 mov r0, r4 <== NOT EXECUTED
1cc00: e3a01002 mov r1, #2 <== NOT EXECUTED
1cc04: e59f26b0 ldr r2, [pc, #1712] ; 1d2bc <msdos_format+0xc78> <== NOT EXECUTED
1cc08: ebfffe18 bl 1c470 <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)) {
1cc0c: e1a00005 mov r0, r5 <== NOT EXECUTED
1cc10: e3a01000 mov r1, #0 <== NOT EXECUTED
1cc14: e3a02000 mov r2, #0 <== NOT EXECUTED
1cc18: 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,
1cc1c: e59d7220 ldr r7, [sp, #544] ; 0x220 <== 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)) {
1cc20: eb002579 bl 2620c <lseek> <== NOT EXECUTED
1cc24: e3510000 cmp r1, #0 <== NOT EXECUTED
1cc28: ba000005 blt 1cc44 <msdos_format+0x600> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > read(fd,buffer,sector_size)) {
1cc2c: e1a02007 mov r2, r7 <== NOT EXECUTED
1cc30: e1a00005 mov r0, r5 <== NOT EXECUTED
1cc34: e28d1020 add r1, sp, #32 <== NOT EXECUTED
1cc38: ebffaf75 bl 8a14 <read> <== NOT EXECUTED
1cc3c: e3500000 cmp r0, #0 <== NOT EXECUTED
1cc40: aa000183 bge 1d254 <msdos_format+0xc10> <== NOT EXECUTED
1cc44: e3e07000 mvn r7, #0 <== NOT EXECUTED
1cc48: ea000153 b 1d19c <msdos_format+0xb58> <== NOT EXECUTED
1cc4c: e3a0b000 mov fp, #0 <== 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);
1cc50: e28da020 add sl, sp, #32 <== NOT EXECUTED
1cc54: e3a01000 mov r1, #0 <== NOT EXECUTED
1cc58: e59f2660 ldr r2, [pc, #1632] ; 1d2c0 <msdos_format+0xc7c> <== NOT EXECUTED
1cc5c: e1a0000a mov r0, sl <== NOT EXECUTED
1cc60: eb00930f bl 418a4 <memset> <== NOT EXECUTED
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
1cc64: e28d3e22 add r3, sp, #544 ; 0x220 <== NOT EXECUTED
1cc68: e2831033 add r1, r3, #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,
1cc6c: e59f3650 ldr r3, [pc, #1616] ; 1d2c4 <msdos_format+0xc80> <== NOT EXECUTED
1cc70: e3a09000 mov r9, #0 <== NOT EXECUTED
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
1cc74: e3a02008 mov r2, #8 <== 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,
1cc78: e18a90b3 strh r9, [sl, r3] <== NOT EXECUTED
* with 0xEB,....
*/
/*
* fill OEMName
*/
memcpy(FAT_GET_ADDR_BR_OEMNAME(mbr),
1cc7c: e28a0003 add r0, sl, #3 <== NOT EXECUTED
1cc80: eb009280 bl 41688 <memcpy> <== NOT EXECUTED
/* 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);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
1cc84: e5ddc251 ldrb ip, [sp, #593] ; 0x251 <== 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);
1cc88: e59d2228 ldr r2, [sp, #552] ; 0x228 <== 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) {
1cc8c: e5dd3252 ldrb r3, [sp, #594] ; 0x252 <== NOT EXECUTED
/* 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);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
1cc90: e58dc00c str ip, [sp, #12] <== 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);
1cc94: e1a0c422 lsr ip, r2, #8 <== 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);
1cc98: e1a02c28 lsr r2, r8, #24 <== NOT EXECUTED
1cc9c: e58d201c str r2, [sp, #28] <== NOT EXECUTED
1cca0: e1a02828 lsr r2, r8, #16 <== 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);
1cca4: e59d0220 ldr r0, [sp, #544] ; 0x220 <== 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);
1cca8: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
if (fmt_params->fattype != FAT_FAT32) {
1ccac: e3530004 cmp r3, #4 <== 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... */
1ccb0: e3e02000 mvn r2, #0 <== 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);
1ccb4: e59d3238 ldr r3, [sp, #568] ; 0x238 <== 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... */
1ccb8: e5cd2038 strb r2, [sp, #56] ; 0x38 <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
1ccbc: e2822007 add r2, r2, #7 <== 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);
1ccc0: e1a0e420 lsr lr, r0, #8 <== 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);
1ccc4: e5cdc02f strb ip, [sp, #47] ; 0x2f <== NOT EXECUTED
/* 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);
1ccc8: e1a00423 lsr r0, r3, #8 <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
1cccc: 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);
1ccd0: e1a03428 lsr r3, r8, #8 <== NOT EXECUTED
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... */
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
1ccd4: e5cd203a strb r2, [sp, #58] ; 0x3a <== NOT EXECUTED
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
1ccd8: e59d201c ldr r2, [sp, #28] <== 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);
1ccdc: e5cd0032 strb r0, [sp, #50] ; 0x32 <== 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);
1cce0: e5cd3041 strb r3, [sp, #65] ; 0x41 <== NOT EXECUTED
1cce4: e59d0018 ldr r0, [sp, #24] <== 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);
1cce8: e59d3220 ldr r3, [sp, #544] ; 0x220 <== NOT EXECUTED
1ccec: e5cde02c strb lr, [sp, #44] ; 0x2c <== NOT EXECUTED
/* 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);
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
1ccf0: e5cdc035 strb ip, [sp, #53] ; 0x35 <== 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);
1ccf4: e59de22c ldr lr, [sp, #556] ; 0x22c <== 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);
1ccf8: e5cd2043 strb r2, [sp, #67] ; 0x43 <== 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);
1ccfc: e59dc228 ldr ip, [sp, #552] ; 0x228 <== NOT EXECUTED
/* 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);
1cd00: e59d2238 ldr r2, [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);
1cd04: e5cd0042 strb r0, [sp, #66] ; 0x42 <== 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);
1cd08: e5cd302b strb r3, [sp, #43] ; 0x2b <== 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);
1cd0c: e1a0142b lsr r1, fp, #8 <== 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... */
FAT_SET_BR_HIDDEN_SECTORS(mbr , 1); /* only needed for INT13... */
1cd10: e3a03001 mov r3, #1 <== 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 */
1cd14: e3a00002 mov r0, #2 <== 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);
1cd18: e5cde02d strb lr, [sp, #45] ; 0x2d <== 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);
1cd1c: e5cd1034 strb r1, [sp, #52] ; 0x34 <== 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);
1cd20: e5cdc02e strb ip, [sp, #46] ; 0x2e <== NOT EXECUTED
/* number of FATs on medium */
FAT_SET_BR_FAT_NUM(mbr , 2); /* standard/recommended value */
1cd24: e5cd0030 strb r0, [sp, #48] ; 0x30 <== NOT EXECUTED
FAT_SET_BR_FILES_PER_ROOT_DIR(mbr , fmt_params->files_per_root_dir);
1cd28: e5cd2031 strb r2, [sp, #49] ; 0x31 <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM16(mbr , total_sectors_num16);
1cd2c: e5cdb033 strb fp, [sp, #51] ; 0x33 <== NOT EXECUTED
FAT_SET_BR_MEDIA(mbr , fmt_params->media_code);
FAT_SET_BR_SECTORS_PER_TRACK(mbr , 255); /* only needed for INT13... */
1cd30: e5cd9039 strb r9, [sp, #57] ; 0x39 <== NOT EXECUTED
FAT_SET_BR_NUMBER_OF_HEADS(mbr , 6); /* only needed for INT13... */
1cd34: e5cd903b strb r9, [sp, #59] ; 0x3b <== 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,
1cd38: e1a07009 mov r7, r9 <== 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... */
1cd3c: e5cd303c strb r3, [sp, #60] ; 0x3c <== NOT EXECUTED
1cd40: e5cd903d strb r9, [sp, #61] ; 0x3d <== NOT EXECUTED
1cd44: e5cd903e strb r9, [sp, #62] ; 0x3e <== NOT EXECUTED
1cd48: e5cd903f strb r9, [sp, #63] ; 0x3f <== NOT EXECUTED
FAT_SET_BR_TOTAL_SECTORS_NUM32(mbr , total_sectors_num32);
1cd4c: e5cd8040 strb r8, [sp, #64] ; 0x40 <== NOT EXECUTED
1cd50: e59d3230 ldr r3, [sp, #560] ; 0x230 <== NOT EXECUTED
if (fmt_params->fattype != FAT_FAT32) {
1cd54: 0a00001b beq 1cdc8 <msdos_format+0x784> <== NOT EXECUTED
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 */
1cd58: e59dc26c ldr ip, [sp, #620] ; 0x26c <== 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);
1cd5c: e1a0e423 lsr lr, r3, #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),
1cd60: e28d0e22 add r0, sp, #544 ; 0x220 <== NOT EXECUTED
1cd64: 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 */
1cd68: e1a0bc2c lsr fp, ip, #24 <== NOT EXECUTED
1cd6c: e1a0842c lsr r8, ip, #8 <== NOT EXECUTED
1cd70: e1a0982c lsr r9, ip, #16 <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1cd74: 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);
1cd78: e5cde037 strb lr, [sp, #55] ; 0x37 <== 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),
1cd7c: e28a002b add r0, sl, #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);
1cd80: e3a0e029 mov lr, #41 ; 0x29 <== 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);
1cd84: e5cd3036 strb r3, [sp, #54] ; 0x36 <== NOT EXECUTED
FAT_SET_BR_DRVNUM(mbr , 0); /* only needed for INT13... */
FAT_SET_BR_RSVD1(mbr , 0); /* fill with zero */
1cd88: e5cd7045 strb r7, [sp, #69] ; 0x45 <== NOT EXECUTED
FAT_SET_BR_BOOTSIG(mbr , FAT_BR_BOOTSIG_VAL);
1cd8c: e5cde046 strb lr, [sp, #70] ; 0x46 <== NOT EXECUTED
FAT_SET_BR_VOLID(mbr , fmt_params->vol_id); /* volume id */
1cd90: e5cd8048 strb r8, [sp, #72] ; 0x48 <== NOT EXECUTED
1cd94: e5cd9049 strb r9, [sp, #73] ; 0x49 <== NOT EXECUTED
1cd98: e5cdb04a strb fp, [sp, #74] ; 0x4a <== 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... */
1cd9c: e5cd7044 strb r7, [sp, #68] ; 0x44 <== NOT EXECUTED
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 */
1cda0: e5cdc047 strb ip, [sp, #71] ; 0x47 <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_VOLLAB(mbr),
1cda4: eb009237 bl 41688 <memcpy> <== NOT EXECUTED
fmt_params->VolLabel,
FAT_BR_VOLLAB_SIZE);
memcpy(FAT_GET_ADDR_BR_FILSYSTYPE(mbr),
1cda8: e5dd1252 ldrb r1, [sp, #594] ; 0x252 <== NOT EXECUTED
1cdac: e59f3514 ldr r3, [pc, #1300] ; 1d2c8 <msdos_format+0xc84> <== NOT EXECUTED
1cdb0: e59f2514 ldr r2, [pc, #1300] ; 1d2cc <msdos_format+0xc88> <== NOT EXECUTED
1cdb4: e3510001 cmp r1, #1 <== NOT EXECUTED
1cdb8: 01a01002 moveq r1, r2 <== NOT EXECUTED
1cdbc: 11a01003 movne r1, r3 <== NOT EXECUTED
1cdc0: e28a0036 add r0, sl, #54 ; 0x36 <== NOT EXECUTED
1cdc4: ea000029 b 1ce70 <msdos_format+0x82c> <== 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 */
1cdc8: e59d2248 ldr r2, [sp, #584] ; 0x248 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
1cdcc: e1a0c823 lsr ip, r3, #16 <== NOT EXECUTED
1cdd0: e1a0e423 lsr lr, r3, #8 <== NOT EXECUTED
1cdd4: e1a08c23 lsr r8, r3, #24 <== NOT EXECUTED
1cdd8: e5cdc046 strb ip, [sp, #70] ; 0x46 <== NOT EXECUTED
1cddc: e5cd3044 strb r3, [sp, #68] ; 0x44 <== 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 */
1cde0: e3a0c002 mov ip, #2 <== NOT EXECUTED
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 */
1cde4: e59d3248 ldr r3, [sp, #584] ; 0x248 <== NOT EXECUTED
1cde8: e1a0b422 lsr fp, r2, #8 <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
1cdec: e1a01009 mov r1, r9 <== NOT EXECUTED
1cdf0: e3a0200c mov r2, #12 <== 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 */
1cdf4: e5cdc04c strb ip, [sp, #76] ; 0x4c <== NOT EXECUTED
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 */
memset(FAT_GET_ADDR_BR_FAT32_RESERVED(mbr),0,FAT_BR_FAT32_RESERVED_SIZE);
1cdf8: e28d0054 add r0, sp, #84 ; 0x54 <== 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*/
1cdfc: e3a0c001 mov ip, #1 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
1ce00: e5cde045 strb lr, [sp, #69] ; 0x45 <== 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*/
1ce04: e5cdc050 strb ip, [sp, #80] ; 0x50 <== NOT EXECUTED
FAT_SET_BR_FAT32_BK_BOOT_SECTOR(mbr, fmt_params->mbr_copy_sec ); /* Put MBR copy to rsrvd sec */
1ce08: e5cd3052 strb r3, [sp, #82] ; 0x52 <== NOT EXECUTED
? "FAT12 "
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
1ce0c: e5cd8047 strb r8, [sp, #71] ; 0x47 <== 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 */
1ce10: e5cdb053 strb fp, [sp, #83] ; 0x53 <== NOT EXECUTED
: "FAT16 ",
FAT_BR_FILSYSTYPE_SIZE);
}
else {
FAT_SET_BR_SECTORS_PER_FAT32(mbr ,fmt_params->sectors_per_fat);
FAT_SET_BR_EXT_FLAGS(mbr , 0);
1ce14: e5cd9048 strb r9, [sp, #72] ; 0x48 <== NOT EXECUTED
1ce18: e5cd9049 strb r9, [sp, #73] ; 0x49 <== NOT EXECUTED
FAT_SET_BR_FSVER(mbr , 0); /* FAT32 Version:0.0 */
1ce1c: e5cd904a strb r9, [sp, #74] ; 0x4a <== NOT EXECUTED
1ce20: e5cd904b strb r9, [sp, #75] ; 0x4b <== NOT EXECUTED
FAT_SET_BR_FAT32_ROOT_CLUSTER(mbr , 2); /* put root dir to cluster 2 */
1ce24: e5cd904d strb r9, [sp, #77] ; 0x4d <== NOT EXECUTED
1ce28: e5cd904e strb r9, [sp, #78] ; 0x4e <== NOT EXECUTED
1ce2c: e5cd904f strb r9, [sp, #79] ; 0x4f <== NOT EXECUTED
FAT_SET_BR_FAT32_FS_INFO_SECTOR(mbr, 1); /* Put fsinfo to rsrvd sec 1*/
1ce30: e5cd9051 strb r9, [sp, #81] ; 0x51 <== 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);
1ce34: eb00929a bl 418a4 <memset> <== 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);
1ce38: e1a01009 mov r1, r9 <== 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);
1ce3c: e3a03029 mov r3, #41 ; 0x29 <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
1ce40: e3a0200b mov r2, #11 <== NOT EXECUTED
1ce44: e28a0047 add r0, sl, #71 ; 0x47 <== 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);
1ce48: e5cd3062 strb r3, [sp, #98] ; 0x62 <== NOT EXECUTED
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
1ce4c: e5cd9066 strb r9, [sp, #102] ; 0x66 <== NOT EXECUTED
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 */
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... */
1ce50: e5cd9060 strb r9, [sp, #96] ; 0x60 <== NOT EXECUTED
FAT_SET_BR_FAT32_RSVD1(mbr , 0); /* fill with zero */
1ce54: e5cd9061 strb r9, [sp, #97] ; 0x61 <== NOT EXECUTED
FAT_SET_BR_FAT32_BOOTSIG(mbr ,FAT_BR_FAT32_BOOTSIG_VAL);
FAT_SET_BR_FAT32_VOLID(mbr , 0); /* not set */
1ce58: e5cd9063 strb r9, [sp, #99] ; 0x63 <== NOT EXECUTED
1ce5c: e5cd9064 strb r9, [sp, #100] ; 0x64 <== NOT EXECUTED
1ce60: e5cd9065 strb r9, [sp, #101] ; 0x65 <== NOT EXECUTED
memset(FAT_GET_ADDR_BR_FAT32_VOLLAB(mbr) ,0,FAT_BR_VOLLAB_SIZE);
1ce64: eb00928e bl 418a4 <memset> <== NOT EXECUTED
memcpy(FAT_GET_ADDR_BR_FAT32_FILSYSTYPE(mbr),
1ce68: e59f1460 ldr r1, [pc, #1120] ; 1d2d0 <msdos_format+0xc8c> <== NOT EXECUTED
1ce6c: e28a0052 add r0, sl, #82 ; 0x52 <== NOT EXECUTED
1ce70: e3a02008 mov r2, #8 <== NOT EXECUTED
1ce74: eb009203 bl 41688 <memcpy> <== NOT EXECUTED
FAT_BR_FILSYSTYPE_SIZE);
}
/*
* add boot record signature
*/
FAT_SET_BR_SIGNATURE(mbr, FAT_BR_SIGNATURE_VAL);
1ce78: e3a03055 mov r3, #85 ; 0x55 <== NOT EXECUTED
1ce7c: e5cd321e strb r3, [sp, #542] ; 0x21e <== NOT EXECUTED
1ce80: e3e03055 mvn r3, #85 ; 0x55 <== NOT EXECUTED
1ce84: e5cd321f strb r3, [sp, #543] ; 0x21f <== NOT EXECUTED
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
1ce88: e2833041 add r3, r3, #65 ; 0x41 <== NOT EXECUTED
1ce8c: e5cd3020 strb r3, [sp, #32] <== NOT EXECUTED
FAT_SET_VAL8(mbr,1,0x3c);
1ce90: e2833051 add r3, r3, #81 ; 0x51 <== 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,
1ce94: e1a00004 mov r0, r4 <== NOT EXECUTED
1ce98: e3a01002 mov r1, #2 <== NOT EXECUTED
1ce9c: e59f2430 ldr r2, [pc, #1072] ; 1d2d4 <msdos_format+0xc90> <== NOT EXECUTED
/*
* add jump to boot loader at start of sector
*/
FAT_SET_VAL8(mbr,0,0xeb);
FAT_SET_VAL8(mbr,1,0x3c);
1cea0: e5cd3021 strb r3, [sp, #33] ; 0x21 <== 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,
1cea4: e28d8020 add r8, sp, #32 <== 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);
1cea8: e3e0306f mvn r3, #111 ; 0x6f <== NOT EXECUTED
1ceac: e5cd3022 strb r3, [sp, #34] ; 0x22 <== 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,
1ceb0: ebfffd6e bl 1c470 <msdos_format_printf> <== NOT EXECUTED
"write MRB sector\n");
ret_val = msdos_format_write_sec(fd,
1ceb4: e1a00005 mov r0, r5 <== NOT EXECUTED
1ceb8: e3a01000 mov r1, #0 <== NOT EXECUTED
1cebc: e59d2220 ldr r2, [sp, #544] ; 0x220 <== NOT EXECUTED
1cec0: e1a03008 mov r3, r8 <== NOT EXECUTED
1cec4: ebfffd7e bl 1c4c4 <msdos_format_write_sec> <== NOT EXECUTED
0,
fmt_params.bytes_per_sector,
tmp_sec);
}
if ((ret_val == 0) &&
1cec8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1cecc: 1a0000b2 bne 1d19c <msdos_format+0xb58> <== NOT EXECUTED
1ced0: e59d3248 ldr r3, [sp, #584] ; 0x248 <== NOT EXECUTED
1ced4: e3530000 cmp r3, #0 <== NOT EXECUTED
1ced8: 0a00000a beq 1cf08 <msdos_format+0x8c4> <== NOT EXECUTED
(fmt_params.mbr_copy_sec != 0)) {
/*
* write copy of MBR
*/
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1cedc: e3a01002 mov r1, #2 <== NOT EXECUTED
1cee0: e59f23f0 ldr r2, [pc, #1008] ; 1d2d8 <msdos_format+0xc94> <== NOT EXECUTED
1cee4: e1a00004 mov r0, r4 <== NOT EXECUTED
1cee8: ebfffd60 bl 1c470 <msdos_format_printf> <== NOT EXECUTED
"write back up MRB sector\n");
ret_val = msdos_format_write_sec(fd,
1ceec: e1a00005 mov r0, r5 <== NOT EXECUTED
1cef0: e1a03008 mov r3, r8 <== NOT EXECUTED
1cef4: e59d1248 ldr r1, [sp, #584] ; 0x248 <== NOT EXECUTED
1cef8: e59d2220 ldr r2, [sp, #544] ; 0x220 <== NOT EXECUTED
1cefc: ebfffd70 bl 1c4c4 <msdos_format_write_sec> <== NOT EXECUTED
}
}
/*
* for FAT32: initialize info sector on disk
*/
if ((ret_val == 0) &&
1cf00: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1cf04: 1a0000a4 bne 1d19c <msdos_format+0xb58> <== NOT EXECUTED
1cf08: e59d324c ldr r3, [sp, #588] ; 0x24c <== NOT EXECUTED
1cf0c: e3530000 cmp r3, #0 <== NOT EXECUTED
1cf10: 0a0000d9 beq 1d27c <msdos_format+0xc38> <== NOT EXECUTED
\*=========================================================================*/
{
/*
* clear fsinfo sector data
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
1cf14: e3a01000 mov r1, #0 <== NOT EXECUTED
1cf18: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
1cf1c: e28d0020 add r0, sp, #32 <== NOT EXECUTED
1cf20: eb00925f bl 418a4 <memset> <== 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);
1cf24: e3a0e055 mov lr, #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,
1cf28: 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 );
1cf2c: e3a0c052 mov ip, #82 ; 0x52 <== NOT EXECUTED
1cf30: e3a00061 mov r0, #97 ; 0x61 <== NOT EXECUTED
1cf34: e3a01041 mov r1, #65 ; 0x41 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
1cf38: e3a02072 mov r2, #114 ; 0x72 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
1cf3c: e5cde21e strb lr, [sp, #542] ; 0x21e <== NOT EXECUTED
1cf40: e3e0e055 mvn lr, #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 );
1cf44: e5cdc021 strb ip, [sp, #33] ; 0x21 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
1cf48: e5cd2205 strb r2, [sp, #517] ; 0x205 <== NOT EXECUTED
1cf4c: e5cd1206 strb r1, [sp, #518] ; 0x206 <== NOT EXECUTED
1cf50: e5cd0207 strb r0, [sp, #519] ; 0x207 <== NOT EXECUTED
FAT_SET_FSINFO_TRAIL_SIGNATURE(fsinfo,FAT_FSINFO_TRAIL_SIGNATURE_VALUE);
1cf54: e5cde21f strb lr, [sp, #543] ; 0x21f <== 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,
1cf58: e5cd320f strb r3, [sp, #527] ; 0x20f <== NOT EXECUTED
*/
memset(fsinfo,0,FAT_TOTAL_FSINFO_SIZE);
/*
* write LEADSIG, STRUCTSIG, TRAILSIG
*/
FAT_SET_FSINFO_LEAD_SIGNATURE (fsinfo,FAT_FSINFO_LEAD_SIGNATURE_VALUE );
1cf5c: e5cdc020 strb ip, [sp, #32] <== NOT EXECUTED
1cf60: e5cd0022 strb r0, [sp, #34] ; 0x22 <== NOT EXECUTED
1cf64: e5cd1023 strb r1, [sp, #35] ; 0x23 <== NOT EXECUTED
FAT_SET_FSINFO_STRUC_SIGNATURE(fsinfo,FAT_FSINFO_STRUC_SIGNATURE_VALUE);
1cf68: e5cd2204 strb r2, [sp, #516] ; 0x204 <== 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,
1cf6c: e5cd3208 strb r3, [sp, #520] ; 0x208 <== NOT EXECUTED
1cf70: e5cd3209 strb r3, [sp, #521] ; 0x209 <== NOT EXECUTED
1cf74: e5cd320a strb r3, [sp, #522] ; 0x20a <== NOT EXECUTED
1cf78: e5cd320b strb r3, [sp, #523] ; 0x20b <== NOT EXECUTED
0xffffffff);
FAT_SET_FSINFO_NEXT_FREE_CLUSTER (fsinfo+FAT_FSI_INFO,
1cf7c: e5cd320c strb r3, [sp, #524] ; 0x20c <== NOT EXECUTED
1cf80: e5cd320d strb r3, [sp, #525] ; 0x20d <== NOT EXECUTED
1cf84: e5cd320e strb r3, [sp, #526] ; 0x20e <== NOT EXECUTED
1cf88: ea0000bb b 1d27c <msdos_format+0xc38> <== NOT EXECUTED
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
ret_val = msdos_format_write_sec(fd,
1cf8c: e1a00005 mov r0, r5 <== NOT EXECUTED
1cf90: e59d2220 ldr r2, [sp, #544] ; 0x220 <== NOT EXECUTED
1cf94: e28d3020 add r3, sp, #32 <== NOT EXECUTED
1cf98: ebfffd49 bl 1c4c4 <msdos_format_write_sec> <== NOT EXECUTED
}
/*
* write FAT as all empty
* -> write all FAT sectors as zero
*/
if (ret_val == 0) {
1cf9c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1cfa0: 1a00007d bne 1d19c <msdos_format+0xb58> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
1cfa4: e59d2230 ldr r2, [sp, #560] ; 0x230 <== NOT EXECUTED
1cfa8: e59dc220 ldr ip, [sp, #544] ; 0x220 <== NOT EXECUTED
1cfac: e5dd3250 ldrb r3, [sp, #592] ; 0x250 <== NOT EXECUTED
1cfb0: e58dc000 str ip, [sp] <== NOT EXECUTED
1cfb4: e0030392 mul r3, r2, r3 <== NOT EXECUTED
1cfb8: e3a0c000 mov ip, #0 <== NOT EXECUTED
1cfbc: e1a00004 mov r0, r4 <== NOT EXECUTED
1cfc0: e1a01005 mov r1, r5 <== NOT EXECUTED
1cfc4: e59d2228 ldr r2, [sp, #552] ; 0x228 <== NOT EXECUTED
1cfc8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
1cfcc: ebfffd50 bl 1c514 <msdos_format_fill_sectors> <== NOT EXECUTED
}
/*
* clear/init root directory
* -> write all directory sectors as 0x00
*/
if (ret_val == 0) {
1cfd0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1cfd4: 1a000070 bne 1d19c <msdos_format+0xb58> <== NOT EXECUTED
ret_val = msdos_format_fill_sectors
1cfd8: e59dc220 ldr ip, [sp, #544] ; 0x220 <== NOT EXECUTED
1cfdc: e1a00004 mov r0, r4 <== NOT EXECUTED
1cfe0: e1a01005 mov r1, r5 <== NOT EXECUTED
1cfe4: e28d2d09 add r2, sp, #576 ; 0x240 <== NOT EXECUTED
1cfe8: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
1cfec: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
1cff0: e58dc000 str ip, [sp] <== NOT EXECUTED
1cff4: ebfffd46 bl 1c514 <msdos_format_fill_sectors> <== NOT EXECUTED
0x00);
}
/*
* write volume label to first entry of directory
*/
if ((ret_val == 0) && fmt_params.VolLabel_present) {
1cff8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1cffc: 1a000066 bne 1d19c <msdos_format+0xb58> <== NOT EXECUTED
1d000: e5dd3268 ldrb r3, [sp, #616] ; 0x268 <== NOT EXECUTED
1d004: e3530000 cmp r3, #0 <== NOT EXECUTED
1d008: 0a000014 beq 1d060 <msdos_format+0xa1c> <== NOT EXECUTED
memset(tmp_sec,0,sizeof(tmp_sec));
1d00c: e28d4020 add r4, sp, #32 <== NOT EXECUTED
1d010: e1a01007 mov r1, r7 <== NOT EXECUTED
1d014: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
1d018: e1a00004 mov r0, r4 <== NOT EXECUTED
1d01c: eb009220 bl 418a4 <memset> <== NOT EXECUTED
memcpy(MSDOS_DIR_NAME(tmp_sec),fmt_params.VolLabel,MSDOS_SHORT_NAME_LEN);
1d020: e28d3f97 add r3, sp, #604 ; 0x25c <== NOT EXECUTED
1d024: e8930007 ldm r3, {r0, r1, r2} <== NOT EXECUTED
1d028: e1a0c004 mov ip, r4 <== NOT EXECUTED
1d02c: e8ac0003 stmia ip!, {r0, r1} <== NOT EXECUTED
1d030: e1cc20b0 strh r2, [ip] <== NOT EXECUTED
1d034: e1a0c822 lsr ip, r2, #16 <== NOT EXECUTED
1d038: e5cdc02a strb ip, [sp, #42] ; 0x2a <== NOT EXECUTED
*MSDOS_DIR_ATTR(tmp_sec) = MSDOS_ATTR_VOLUME_ID;
ret_val = msdos_format_write_sec
1d03c: e1a03004 mov r3, r4 <== 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;
1d040: e3a0c008 mov ip, #8 <== NOT EXECUTED
ret_val = msdos_format_write_sec
1d044: e1a00005 mov r0, r5 <== NOT EXECUTED
1d048: e59d1240 ldr r1, [sp, #576] ; 0x240 <== NOT EXECUTED
1d04c: e59d2220 ldr r2, [sp, #544] ; 0x220 <== 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;
1d050: e5cdc02b strb ip, [sp, #43] ; 0x2b <== NOT EXECUTED
ret_val = msdos_format_write_sec
1d054: ebfffd1a bl 1c4c4 <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){
1d058: e3500000 cmp r0, #0 <== NOT EXECUTED
1d05c: 1a00004d bne 1d198 <msdos_format+0xb54> <== NOT EXECUTED
1d060: e5dd3268 ldrb r3, [sp, #616] ; 0x268 <== NOT EXECUTED
1d064: e3530000 cmp r3, #0 <== NOT EXECUTED
1d068: 0a00004b beq 1d19c <msdos_format+0xb58> <== NOT EXECUTED
/*
* empty sector: all clusters are free/do not link further on
*/
memset(tmp_sec,0,sizeof(tmp_sec));
1d06c: e28d0020 add r0, sp, #32 <== NOT EXECUTED
1d070: e3a01000 mov r1, #0 <== NOT EXECUTED
1d074: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
1d078: eb009209 bl 418a4 <memset> <== NOT EXECUTED
switch(fmt_params.fattype) {
1d07c: e5dd3252 ldrb r3, [sp, #594] ; 0x252 <== NOT EXECUTED
1d080: e3530002 cmp r3, #2 <== NOT EXECUTED
1d084: 0a00000a beq 1d0b4 <msdos_format+0xa70> <== NOT EXECUTED
1d088: e3530004 cmp r3, #4 <== NOT EXECUTED
1d08c: 0a000010 beq 1d0d4 <msdos_format+0xa90> <== NOT EXECUTED
1d090: e3530001 cmp r3, #1 <== NOT EXECUTED
1d094: 1a00001e bne 1d114 <msdos_format+0xad0> <== NOT EXECUTED
case FAT_FAT12:
/* LSBits of FAT entry 0: media_type */
FAT_SET_VAL8(tmp_sec,0,(fmt_params.media_code));
1d098: e5dd3251 ldrb r3, [sp, #593] ; 0x251 <== NOT EXECUTED
1d09c: e5cd3020 strb r3, [sp, #32] <== 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)));
1d0a0: e3e03070 mvn r3, #112 ; 0x70 <== NOT EXECUTED
1d0a4: e5cd3021 strb r3, [sp, #33] ; 0x21 <== NOT EXECUTED
/* MSBits of FAT entry 1: MSBits of EOC */
FAT_SET_VAL8(tmp_sec,2,(FAT_FAT12_EOC >> 4));
1d0a8: e2833070 add r3, r3, #112 ; 0x70 <== NOT EXECUTED
1d0ac: e5cd3022 strb r3, [sp, #34] ; 0x22 <== NOT EXECUTED
break;
1d0b0: ea00001b b 1d124 <msdos_format+0xae0> <== NOT EXECUTED
case FAT_FAT16:
/* FAT entry 0: 0xff00|media_type */
FAT_SET_VAL16(tmp_sec,0,0xff00|fmt_params.media_code);
1d0b4: e5dd2251 ldrb r2, [sp, #593] ; 0x251 <== NOT EXECUTED
1d0b8: e3e03000 mvn r3, #0 <== NOT EXECUTED
1d0bc: e5cd2020 strb r2, [sp, #32] <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
1d0c0: e3e02007 mvn r2, #7 <== NOT EXECUTED
1d0c4: e5cd2022 strb r2, [sp, #34] ; 0x22 <== NOT EXECUTED
1d0c8: e5cd3023 strb r3, [sp, #35] ; 0x23 <== 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);
1d0cc: e5cd3021 strb r3, [sp, #33] ; 0x21 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL16(tmp_sec,2,FAT_FAT16_EOC);
break;
1d0d0: ea000013 b 1d124 <msdos_format+0xae0> <== NOT EXECUTED
case FAT_FAT32:
/* FAT entry 0: 0xffffff00|media_type */
FAT_SET_VAL32(tmp_sec,0,0xffffff00|fmt_params.media_code);
1d0d4: e5dd2251 ldrb r2, [sp, #593] ; 0x251 <== NOT EXECUTED
1d0d8: e1e02c02 mvn r2, r2, lsl #24 <== NOT EXECUTED
1d0dc: e1e02c22 mvn r2, r2, lsr #24 <== NOT EXECUTED
1d0e0: e1a01c22 lsr r1, r2, #24 <== NOT EXECUTED
1d0e4: e5cd1021 strb r1, [sp, #33] ; 0x21 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
1d0e8: 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);
1d0ec: e3e03000 mvn r3, #0 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
1d0f0: e5cd1024 strb r1, [sp, #36] ; 0x24 <== NOT EXECUTED
1d0f4: e2811017 add r1, r1, #23 <== NOT EXECUTED
1d0f8: e5cd3026 strb r3, [sp, #38] ; 0x26 <== NOT EXECUTED
1d0fc: e5cd1027 strb r1, [sp, #39] ; 0x27 <== 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);
1d100: e5cd2020 strb r2, [sp, #32] <== NOT EXECUTED
1d104: e5cd3022 strb r3, [sp, #34] ; 0x22 <== NOT EXECUTED
1d108: e5cd3023 strb r3, [sp, #35] ; 0x23 <== NOT EXECUTED
/* FAT entry 1: EOC */
FAT_SET_VAL32(tmp_sec,4,FAT_FAT32_EOC);
1d10c: e5cd3025 strb r3, [sp, #37] ; 0x25 <== NOT EXECUTED
break;
1d110: ea000003 b 1d124 <msdos_format+0xae0> <== NOT EXECUTED
default:
ret_val = -1;
errno = EINVAL;
1d114: eb0084ab bl 3e3c8 <__errno> <== NOT EXECUTED
1d118: e3a03016 mov r3, #22 <== NOT EXECUTED
1d11c: e5803000 str r3, [r0] <== NOT EXECUTED
1d120: e3e07000 mvn r7, #0 <== NOT EXECUTED
}
if (fmt_params.fattype == FAT_FAT32) {
1d124: e5dd3252 ldrb r3, [sp, #594] ; 0x252 <== NOT EXECUTED
1d128: e3530004 cmp r3, #4 <== NOT EXECUTED
1d12c: 1a000006 bne 1d14c <msdos_format+0xb08> <== 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);
1d130: e3e02007 mvn r2, #7 <== NOT EXECUTED
1d134: e3e03000 mvn r3, #0 <== NOT EXECUTED
1d138: e5cd2028 strb r2, [sp, #40] ; 0x28 <== NOT EXECUTED
1d13c: e2822017 add r2, r2, #23 <== NOT EXECUTED
1d140: e5cd302a strb r3, [sp, #42] ; 0x2a <== NOT EXECUTED
1d144: e5cd202b strb r2, [sp, #43] ; 0x2b <== NOT EXECUTED
1d148: e5cd3029 strb r3, [sp, #41] ; 0x29 <== NOT EXECUTED
1d14c: e3a04000 mov r4, #0 <== NOT EXECUTED
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
ret_val = msdos_format_write_sec
1d150: e28d8020 add r8, sp, #32 <== NOT EXECUTED
1d154: e1a00007 mov r0, r7 <== NOT EXECUTED
1d158: ea000007 b 1d17c <msdos_format+0xb38> <== NOT EXECUTED
1d15c: e59d3228 ldr r3, [sp, #552] ; 0x228 <== NOT EXECUTED
1d160: e59d1230 ldr r1, [sp, #560] ; 0x230 <== NOT EXECUTED
1d164: e1a00005 mov r0, r5 <== NOT EXECUTED
1d168: e0213194 mla r1, r4, r1, r3 <== NOT EXECUTED
1d16c: e59d2220 ldr r2, [sp, #544] ; 0x220 <== NOT EXECUTED
1d170: e1a03008 mov r3, r8 <== NOT EXECUTED
1d174: ebfffcd2 bl 1c4c4 <msdos_format_write_sec> <== NOT EXECUTED
*/
FAT_SET_VAL32(tmp_sec,8,FAT_FAT32_EOC);
}
for (i = 0;
(i < fmt_params.fat_num) && (ret_val == 0);
i++) {
1d178: e2844001 add r4, r4, #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;
1d17c: e5dd2250 ldrb r2, [sp, #592] ; 0x250 <== NOT EXECUTED
1d180: e2703001 rsbs r3, r0, #1 <== NOT EXECUTED
1d184: 33a03000 movcc r3, #0 <== NOT EXECUTED
1d188: e1540002 cmp r4, r2 <== NOT EXECUTED
1d18c: a3a03000 movge r3, #0 <== NOT EXECUTED
1d190: e3530000 cmp r3, #0 <== NOT EXECUTED
1d194: 1afffff0 bne 1d15c <msdos_format+0xb18> <== NOT EXECUTED
1d198: e1a07000 mov r7, r0 <== NOT EXECUTED
/*
* cleanup:
* sync and unlock disk
* free any data structures (not needed now)
*/
if (fd != -1) {
1d19c: e3750001 cmn r5, #1 <== NOT EXECUTED
close(fd);
1d1a0: 11a00005 movne r0, r5 <== NOT EXECUTED
1d1a4: 1bffa822 blne 7234 <close> <== NOT EXECUTED
}
if (dd != NULL) {
1d1a8: e3560000 cmp r6, #0 <== NOT EXECUTED
rtems_disk_release(dd);
1d1ac: 11a00006 movne r0, r6 <== NOT EXECUTED
1d1b0: 1bffa4b5 blne 648c <rtems_disk_release> <== NOT EXECUTED
}
return ret_val;
}
1d1b4: e1a00007 mov r0, r7 <== NOT EXECUTED
1d1b8: e28ddfb1 add sp, sp, #708 ; 0x2c4 <== NOT EXECUTED
1d1bc: 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);
1d1c0: e28d1fa2 add r1, sp, #648 ; 0x288 <== NOT EXECUTED
1d1c4: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
1d1c8: ebffa433 bl 629c <rtems_disk_obtain> <== NOT EXECUTED
if (dd == NULL) {
1d1cc: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1d1d0: 0afffd38 beq 1c6b8 <msdos_format+0x74> <== NOT EXECUTED
/*
* open device for writing
*/
if (ret_val == 0) {
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1d1d4: e3a01002 mov r1, #2 <== NOT EXECUTED
1d1d8: e59f20fc ldr r2, [pc, #252] ; 1d2dc <msdos_format+0xc98> <== NOT EXECUTED
1d1dc: e1a00004 mov r0, r4 <== NOT EXECUTED
1d1e0: ebfffca2 bl 1c470 <msdos_format_printf> <== NOT EXECUTED
"open device\n");
fd = open(devname, O_RDWR);
1d1e4: e1a00005 mov r0, r5 <== NOT EXECUTED
1d1e8: e3a01002 mov r1, #2 <== NOT EXECUTED
1d1ec: ebffad56 bl 874c <open> <== NOT EXECUTED
if (fd == -1)
1d1f0: 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);
1d1f4: e1a05000 mov r5, r0 <== NOT EXECUTED
if (fd == -1)
1d1f8: 01a07000 moveq r7, r0 <== NOT EXECUTED
1d1fc: 0afffd31 beq 1c6c8 <msdos_format+0x84> <== 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));
1d200: e1a01007 mov r1, r7 <== NOT EXECUTED
1d204: e3a02050 mov r2, #80 ; 0x50 <== NOT EXECUTED
1d208: e28d0e22 add r0, sp, #544 ; 0x220 <== NOT EXECUTED
1d20c: eb0091a4 bl 418a4 <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;
1d210: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
1d214: e58d3220 str r3, [sp, #544] ; 0x220 <== NOT EXECUTED
fmt_params->totl_sector_cnt = dd->size;
1d218: e596c01c ldr ip, [r6, #28] <== NOT EXECUTED
total_size = dd->block_size * dd->size;
1d21c: e0070c93 mul r7, r3, ip <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1d220: e1a00004 mov r0, r4 <== 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;
1d224: e3a08000 mov r8, #0 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1d228: e3a01002 mov r1, #2 <== NOT EXECUTED
1d22c: e59f20ac ldr r2, [pc, #172] ; 1d2e0 <msdos_format+0xc9c> <== NOT EXECUTED
1d230: 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;
1d234: e58dc224 str ip, [sp, #548] ; 0x224 <== NOT EXECUTED
total_size = dd->block_size * dd->size;
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1d238: e98d0180 stmib sp, {r7, r8} <== NOT EXECUTED
1d23c: ebfffc8b bl 1c470 <msdos_format_printf> <== NOT EXECUTED
}
/*
* determine number of FATs
*/
if (ret_val == 0) {
if ((rqdata == NULL) ||
1d240: e3540000 cmp r4, #0 <== NOT EXECUTED
1d244: 1afffd21 bne 1c6d0 <msdos_format+0x8c> <== NOT EXECUTED
1d248: eafffd23 b 1c6dc <msdos_format+0x98> <== NOT EXECUTED
1d24c: e3a07000 mov r7, #0 <== NOT EXECUTED
1d250: eafffe55 b 1cbac <msdos_format+0x568> <== 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,
1d254: e1a00004 mov r0, r4 <== NOT EXECUTED
1d258: e3a01002 mov r1, #2 <== NOT EXECUTED
1d25c: e59f2080 ldr r2, [pc, #128] ; 1d2e4 <msdos_format+0xca0> <== NOT EXECUTED
1d260: ebfffc82 bl 1c470 <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) {
1d264: e59d8224 ldr r8, [sp, #548] ; 0x224 <== NOT EXECUTED
1d268: e3580801 cmp r8, #65536 ; 0x10000 <== NOT EXECUTED
1d26c: 31a0b008 movcc fp, r8 <== NOT EXECUTED
1d270: 33a08000 movcc r8, #0 <== NOT EXECUTED
1d274: 3afffe75 bcc 1cc50 <msdos_format+0x60c> <== NOT EXECUTED
1d278: eafffe73 b 1cc4c <msdos_format+0x608> <== NOT EXECUTED
}
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
(fmt_params.fsinfo_sec != 0)) {
1d27c: e59d124c ldr r1, [sp, #588] ; 0x24c <== NOT EXECUTED
ret_val = msdos_format_gen_fsinfo(tmp_sec);
}
/*
* write fsinfo sector
*/
if ((ret_val == 0) &&
1d280: e3510000 cmp r1, #0 <== NOT EXECUTED
1d284: 0affff46 beq 1cfa4 <msdos_format+0x960> <== NOT EXECUTED
1d288: eaffff3f b 1cf8c <msdos_format+0x948> <== NOT EXECUTED
0001c514 <msdos_format_fill_sectors>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1c514: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1c518: e1a06000 mov r6, r0 <== NOT EXECUTED
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
1c51c: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1c520: e58d1004 str r1, [sp, #4] <== NOT EXECUTED
1c524: e1a05002 mov r5, r2 <== NOT EXECUTED
1c528: e1a0a003 mov sl, r3 <== NOT EXECUTED
1c52c: e5dd4030 ldrb r4, [sp, #48] ; 0x30 <== NOT EXECUTED
/*
* allocate and fill buffer
*/
if (ret_val == 0) {
fill_buffer = malloc(sector_size);
1c530: ebffae06 bl 7d50 <malloc> <== NOT EXECUTED
if (fill_buffer == NULL) {
1c534: e250b000 subs fp, r0, #0 <== NOT EXECUTED
1c538: 1a000004 bne 1c550 <msdos_format_fill_sectors+0x3c> <== NOT EXECUTED
errno = ENOMEM;
1c53c: eb0087a1 bl 3e3c8 <__errno> <== NOT EXECUTED
1c540: e3a0300c mov r3, #12 <== NOT EXECUTED
1c544: e5803000 str r3, [r0] <== NOT EXECUTED
1c548: e3e04000 mvn r4, #0 <== NOT EXECUTED
1c54c: ea000003 b 1c560 <msdos_format_fill_sectors+0x4c> <== NOT EXECUTED
ret_val = -1;
}
else {
memset(fill_buffer,fill_byte,sector_size);
1c550: e1a01004 mov r1, r4 <== NOT EXECUTED
1c554: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
1c558: eb0094d1 bl 418a4 <memset> <== NOT EXECUTED
1c55c: e3a04000 mov r4, #0 <== NOT EXECUTED
}
}
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
1c560: e1a00006 mov r0, r6 <== NOT EXECUTED
1c564: e3a01002 mov r1, #2 <== NOT EXECUTED
1c568: e59f20c4 ldr r2, [pc, #196] ; 1c634 <msdos_format_fill_sectors+0x120><== NOT EXECUTED
1c56c: ebffffbf bl 1c470 <msdos_format_printf> <== NOT EXECUTED
1c570: e3a03064 mov r3, #100 ; 0x64 <== NOT EXECUTED
1c574: e0080a93 mul r8, r3, sl <== NOT EXECUTED
1c578: e1a0900a mov r9, sl <== NOT EXECUTED
1c57c: e3e03000 mvn r3, #0 <== NOT EXECUTED
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
1c580: ea000014 b 1c5d8 <msdos_format_fill_sectors+0xc4> <== NOT EXECUTED
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
1c584: e58d3000 str r3, [sp] <== NOT EXECUTED
1c588: eb00e75d bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
if (percent != last_percent) {
1c58c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
1c590: e1500003 cmp r0, r3 <== NOT EXECUTED
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
1c594: e1a07000 mov r7, r0 <== NOT EXECUTED
if (percent != last_percent) {
1c598: 0a000004 beq 1c5b0 <msdos_format_fill_sectors+0x9c> <== NOT EXECUTED
if ((percent & 1) == 0)
1c59c: e3100001 tst r0, #1 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL, ".");
1c5a0: 01a00006 moveq r0, r6 <== NOT EXECUTED
1c5a4: 03a01002 moveq r1, #2 <== NOT EXECUTED
1c5a8: 059f2088 ldreq r2, [pc, #136] ; 1c638 <msdos_format_fill_sectors+0x124><== NOT EXECUTED
1c5ac: 0bffffaf bleq 1c470 <msdos_format_printf> <== NOT EXECUTED
last_percent = percent;
}
ret_val = msdos_format_write_sec(fd,start_sector,sector_size,fill_buffer);
1c5b0: e1a01005 mov r1, r5 <== NOT EXECUTED
1c5b4: e1a0300b mov r3, fp <== NOT EXECUTED
1c5b8: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
1c5bc: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
1c5c0: ebffffbf bl 1c4c4 <msdos_format_write_sec> <== NOT EXECUTED
start_sector++;
1c5c4: e2855001 add r5, r5, #1 <== 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);
1c5c8: e1a04000 mov r4, r0 <== NOT EXECUTED
start_sector++;
sector_cnt--;
1c5cc: e2499001 sub r9, r9, #1 <== NOT EXECUTED
1c5d0: e2488064 sub r8, r8, #100 ; 0x64 <== NOT EXECUTED
1c5d4: e1a03007 mov r3, r7 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
1c5d8: e2592000 subs r2, r9, #0 <== NOT EXECUTED
1c5dc: 13a02001 movne r2, #1 <== NOT EXECUTED
1c5e0: e3540000 cmp r4, #0 <== NOT EXECUTED
1c5e4: 13a02000 movne r2, #0 <== NOT EXECUTED
1c5e8: e3520000 cmp r2, #0 <== NOT EXECUTED
(sector_cnt > 0)) {
int percent = (sector_cnt * 100) / total_sectors;
1c5ec: e1a0100a mov r1, sl <== NOT EXECUTED
1c5f0: e1a00008 mov r0, r8 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_DETAIL,
"Filling : ");
/*
* write to consecutive sectors
*/
while ((ret_val == 0) &&
1c5f4: 1affffe2 bne 1c584 <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");
1c5f8: e1a00006 mov r0, r6 <== NOT EXECUTED
1c5fc: e3a01002 mov r1, #2 <== NOT EXECUTED
1c600: e59f2034 ldr r2, [pc, #52] ; 1c63c <msdos_format_fill_sectors+0x128><== NOT EXECUTED
1c604: ebffff99 bl 1c470 <msdos_format_printf> <== NOT EXECUTED
if (ret_val)
1c608: e3540000 cmp r4, #0 <== NOT EXECUTED
msdos_format_printf (rqdata, MSDOS_FMT_INFO_LEVEL_INFO,
1c60c: 11a00006 movne r0, r6 <== NOT EXECUTED
1c610: 11a03005 movne r3, r5 <== NOT EXECUTED
1c614: 13a01001 movne r1, #1 <== NOT EXECUTED
1c618: 159f2020 ldrne r2, [pc, #32] ; 1c640 <msdos_format_fill_sectors+0x12c><== NOT EXECUTED
1c61c: 1bffff93 blne 1c470 <msdos_format_printf> <== NOT EXECUTED
"filling error on sector: %d\n", start_sector);
/*
* cleanup
*/
if (fill_buffer != NULL) {
1c620: e35b0000 cmp fp, #0 <== NOT EXECUTED
free(fill_buffer);
1c624: 11a0000b movne r0, fp <== NOT EXECUTED
1c628: 1bffac21 blne 76b4 <free> <== NOT EXECUTED
fill_buffer = NULL;
}
return ret_val;
}
1c62c: e1a00004 mov r0, r4 <== NOT EXECUTED
1c630: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001c470 <msdos_format_printf>:
*/
static void
msdos_format_printf (const msdos_format_request_param_t *rqdata,
int info_level,
const char *format, ...)
{
1c470: e92d000c push {r2, r3} <== NOT EXECUTED
1c474: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
va_list args;
va_start (args, format);
if (rqdata != NULL && rqdata->info_level >= info_level)
1c478: 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);
1c47c: e28d2010 add r2, sp, #16 <== NOT EXECUTED
1c480: e58d2000 str r2, [sp] <== NOT EXECUTED
if (rqdata != NULL && rqdata->info_level >= info_level)
1c484: 0a00000a beq 1c4b4 <msdos_format_printf+0x44> <== NOT EXECUTED
1c488: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
1c48c: e1530001 cmp r3, r1 <== NOT EXECUTED
1c490: ba000007 blt 1c4b4 <msdos_format_printf+0x44> <== NOT EXECUTED
{
vfprintf (stdout, format, args);
1c494: e59f4024 ldr r4, [pc, #36] ; 1c4c0 <msdos_format_printf+0x50><== NOT EXECUTED
1c498: e5943000 ldr r3, [r4] <== NOT EXECUTED
1c49c: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
1c4a0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
1c4a4: eb00c2f5 bl 4d080 <vfprintf> <== NOT EXECUTED
fflush (stdout);
1c4a8: e5943000 ldr r3, [r4] <== NOT EXECUTED
1c4ac: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
1c4b0: eb0088b7 bl 3e794 <fflush> <== NOT EXECUTED
}
va_end (args);
}
1c4b4: e8bd4018 pop {r3, r4, lr} <== NOT EXECUTED
1c4b8: e28dd008 add sp, sp, #8 <== NOT EXECUTED
1c4bc: e12fff1e bx lr <== NOT EXECUTED
0001c4c4 <msdos_format_write_sec>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1c4c4: 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)) {
1c4c8: e0876192 umull r6, r7, r2, r1 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1c4cc: e1a04002 mov r4, r2 <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1c4d0: e1a01006 mov r1, r6 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1c4d4: e1a05003 mov r5, r3 <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1c4d8: e1a02007 mov r2, r7 <== NOT EXECUTED
1c4dc: e3a03000 mov r3, #0 <== NOT EXECUTED
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
1c4e0: e1a06000 mov r6, r0 <== NOT EXECUTED
int ret_val = 0;
if (0 > lseek(fd,((off_t)start_sector)*sector_size,SEEK_SET)) {
1c4e4: eb002748 bl 2620c <lseek> <== NOT EXECUTED
1c4e8: e3510000 cmp r1, #0 <== NOT EXECUTED
1c4ec: ba000006 blt 1c50c <msdos_format_write_sec+0x48> <== NOT EXECUTED
ret_val = -1;
}
if (ret_val == 0) {
if (0 > write(fd,buffer,sector_size)) {
1c4f0: e1a00006 mov r0, r6 <== NOT EXECUTED
1c4f4: e1a01005 mov r1, r5 <== NOT EXECUTED
1c4f8: e1a02004 mov r2, r4 <== NOT EXECUTED
1c4fc: ebffba9d bl af78 <write> <== NOT EXECUTED
1c500: e3500000 cmp r0, #0 <== NOT EXECUTED
1c504: a3a00000 movge r0, #0 <== NOT EXECUTED
1c508: a8bd80f0 popge {r4, r5, r6, r7, pc} <== NOT EXECUTED
1c50c: e3e00000 mvn r0, #0 <== NOT EXECUTED
ret_val = -1;
}
}
return ret_val;
}
1c510: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00032788 <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;
32788: 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)
{
3278c: 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;
32790: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
32794: 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)
{
32798: 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,
3279c: e1a02001 mov r2, r1 <== NOT EXECUTED
327a0: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
327a4: ebff6445 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
327a8: e3500000 cmp r0, #0 <== NOT EXECUTED
327ac: 0a000004 beq 327c4 <msdos_free_node_info+0x3c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
327b0: eb002f04 bl 3e3c8 <__errno> <== NOT EXECUTED
327b4: e3a03005 mov r3, #5 <== NOT EXECUTED
327b8: e5803000 str r3, [r0] <== NOT EXECUTED
327bc: e3e04000 mvn r4, #0 <== NOT EXECUTED
327c0: ea000005 b 327dc <msdos_free_node_info+0x54> <== NOT EXECUTED
rc = fat_file_close(pathloc->mt_entry, pathloc->node_access);
327c4: e5941000 ldr r1, [r4] <== NOT EXECUTED
327c8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
327cc: ebffbf35 bl 224a8 <fat_file_close> <== NOT EXECUTED
327d0: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
327d4: e5950094 ldr r0, [r5, #148] ; 0x94 <== NOT EXECUTED
327d8: ebff647e bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
327dc: e1a00004 mov r0, r4 <== NOT EXECUTED
327e0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00033978 <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
)
{
33978: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3397c: 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;
33980: e28dc058 add ip, sp, #88 ; 0x58 <== NOT EXECUTED
33984: e3a0e000 mov lr, #0 <== NOT EXECUTED
33988: e52ce004 str lr, [ip, #-4]! <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
3398c: e1a06002 mov r6, r2 <== NOT EXECUTED
33990: e1a07001 mov r7, r1 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
33994: e1a0200c mov r2, ip <== NOT EXECUTED
33998: e1a01006 mov r1, r6 <== NOT EXECUTED
rtems_filesystem_mount_table_entry_t *mt_entry,
uint32_t cln,
fat_dir_pos_t *dir_pos,
char *dir_entry
)
{
3399c: e1a05000 mov r5, r0 <== NOT EXECUTED
339a0: e58d3010 str r3, [sp, #16] <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
339a4: e5909034 ldr r9, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t cl4find = 0;
/*
* open fat-file corresponded to ".."
*/
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
339a8: ebffbae7 bl 2254c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
339ac: e2504000 subs r4, r0, #0 <== NOT EXECUTED
339b0: 1a00006f bne 33b74 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1fc><== NOT EXECUTED
return rc;
fat_fd->cln = cln;
339b4: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
339b8: 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;
339bc: e3a08001 mov r8, #1 <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
fat_fd->map.file_cln = 0;
339c0: 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;
339c4: e5813014 str r3, [r1, #20] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
339c8: e5817038 str r7, [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;
339cc: e581701c str r7, [r1, #28] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
339d0: e5818010 str r8, [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);
339d4: e1a00005 mov r0, r5 <== NOT EXECUTED
339d8: ebffb82a bl 21a88 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
339dc: e2504000 subs r4, r0, #0 <== NOT EXECUTED
339e0: 1a00005b bne 33b54 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1dc><== 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);
339e4: e28da034 add sl, sp, #52 ; 0x34 <== NOT EXECUTED
339e8: e1a01004 mov r1, r4 <== NOT EXECUTED
339ec: e3a02020 mov r2, #32 <== NOT EXECUTED
339f0: e1a0000a mov r0, sl <== NOT EXECUTED
339f4: eb0037aa bl 418a4 <memset> <== NOT EXECUTED
msdos_long_to_short(".", 1, dot_node, MSDOS_SHORT_NAME_LEN);
339f8: e1a01008 mov r1, r8 <== NOT EXECUTED
339fc: e1a0200a mov r2, sl <== NOT EXECUTED
33a00: e3a0300b mov r3, #11 <== NOT EXECUTED
33a04: e59f0174 ldr r0, [pc, #372] ; 33b80 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x208><== NOT EXECUTED
33a08: ebffff74 bl 337e0 <msdos_long_to_short> <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, ".", 1,
33a0c: e1a02004 mov r2, r4 <== NOT EXECUTED
33a10: e1a00005 mov r0, r5 <== NOT EXECUTED
33a14: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
33a18: e59f3160 ldr r3, [pc, #352] ; 33b80 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x208><== NOT EXECUTED
33a1c: e58d8000 str r8, [sp] <== NOT EXECUTED
33a20: e58d8004 str r8, [sp, #4] <== NOT EXECUTED
33a24: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
33a28: e58da00c str sl, [sp, #12] <== NOT EXECUTED
33a2c: ebfffbd6 bl 3298c <msdos_find_name_in_fat_file> <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos, dot_node);
if (rc != RC_OK)
33a30: e2504000 subs r4, r0, #0 <== NOT EXECUTED
33a34: 1a000046 bne 33b54 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1dc><== 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);
33a38: e28d7014 add r7, sp, #20 <== NOT EXECUTED
33a3c: e1a01004 mov r1, r4 <== NOT EXECUTED
33a40: e3a02020 mov r2, #32 <== NOT EXECUTED
33a44: e1a00007 mov r0, r7 <== NOT EXECUTED
33a48: eb003795 bl 418a4 <memset> <== NOT EXECUTED
msdos_long_to_short("..", 2, dotdot_node, MSDOS_SHORT_NAME_LEN);
33a4c: e3a01002 mov r1, #2 <== NOT EXECUTED
33a50: e1a02007 mov r2, r7 <== NOT EXECUTED
33a54: e3a0300b mov r3, #11 <== NOT EXECUTED
33a58: e59f0124 ldr r0, [pc, #292] ; 33b84 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x20c><== NOT EXECUTED
33a5c: ebffff5f bl 337e0 <msdos_long_to_short> <== NOT EXECUTED
rc = msdos_find_name_in_fat_file(mt_entry, fat_fd, false, "..", 2,
33a60: e1a02004 mov r2, r4 <== NOT EXECUTED
33a64: e3a0c002 mov ip, #2 <== NOT EXECUTED
33a68: e1a00005 mov r0, r5 <== NOT EXECUTED
33a6c: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
33a70: e59f310c ldr r3, [pc, #268] ; 33b84 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x20c><== NOT EXECUTED
33a74: e58dc000 str ip, [sp] <== NOT EXECUTED
33a78: e58d8004 str r8, [sp, #4] <== NOT EXECUTED
33a7c: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
33a80: e58d700c str r7, [sp, #12] <== NOT EXECUTED
33a84: ebfffbc0 bl 3298c <msdos_find_name_in_fat_file> <== NOT EXECUTED
MSDOS_NAME_SHORT, dir_pos,
dotdot_node);
if (rc != RC_OK)
33a88: e2504000 subs r4, r0, #0 <== NOT EXECUTED
33a8c: 1a000030 bne 33b54 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1dc><== NOT EXECUTED
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
33a90: e1a00005 mov r0, r5 <== NOT EXECUTED
33a94: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
return rc;
}
cl4find = MSDOS_EXTRACT_CLUSTER_NUM(dot_node);
33a98: e1dab1b4 ldrh fp, [sl, #20] <== NOT EXECUTED
33a9c: e1daa1ba ldrh sl, [sl, #26] <== NOT EXECUTED
/* close fat-file corresponded to ".." directory */
rc = fat_file_close(mt_entry, fat_fd);
33aa0: ebffba80 bl 224a8 <fat_file_close> <== NOT EXECUTED
if ( rc != RC_OK )
33aa4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
33aa8: 1a000031 bne 33b74 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1fc><== NOT EXECUTED
return rc;
if ( (MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
33aac: e1d731ba ldrh r3, [r7, #26] <== NOT EXECUTED
33ab0: e1d721b4 ldrh r2, [r7, #20] <== NOT EXECUTED
33ab4: e1932802 orrs r2, 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;
33ab8: 03e03000 mvneq r3, #0 <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
33abc: 05862004 streq r2, [r6, #4] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
33ac0: 0586300c streq r3, [r6, #12] <== 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;
33ac4: 05868000 streq r8, [r6] <== 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;
33ac8: 05863008 streq r3, [r6, #8] <== NOT EXECUTED
}
/* open fat-file corresponded to second ".." */
rc = fat_file_open(mt_entry, dir_pos, &fat_fd);
33acc: e1a00005 mov r0, r5 <== NOT EXECUTED
33ad0: e1a01006 mov r1, r6 <== NOT EXECUTED
33ad4: e28d2054 add r2, sp, #84 ; 0x54 <== NOT EXECUTED
33ad8: ebffba9b bl 2254c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
33adc: e2504000 subs r4, r0, #0 <== NOT EXECUTED
33ae0: 1a000023 bne 33b74 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1fc><== NOT EXECUTED
return rc;
if ((MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node)) == 0)
33ae4: e1d731ba ldrh r3, [r7, #26] <== NOT EXECUTED
33ae8: e1d721b4 ldrh r2, [r7, #20] <== NOT EXECUTED
33aec: e1932802 orrs r2, r3, r2, lsl #16 <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
33af0: 05992038 ldreq r2, [r9, #56] ; 0x38 <== NOT EXECUTED
33af4: e59d3054 ldr r3, [sp, #84] ; 0x54 <== NOT EXECUTED
else
fat_fd->cln = MSDOS_EXTRACT_CLUSTER_NUM(dotdot_node);
fat_fd->fat_file_type = FAT_DIRECTORY;
33af8: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
return rc;
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);
33afc: e583201c str r2, [r3, #28] <== NOT EXECUTED
fat_fd->fat_file_type = FAT_DIRECTORY;
33b00: 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;
33b04: 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;
33b08: e5812010 str r2, [r1, #16] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
33b0c: e3a02602 mov r2, #2097152 ; 0x200000 <== NOT EXECUTED
33b10: e5812014 str r2, [r1, #20] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
33b14: e2422602 sub r2, r2, #2097152 ; 0x200000 <== NOT EXECUTED
33b18: e5812034 str r2, [r1, #52] ; 0x34 <== NOT EXECUTED
fat_fd->map.disk_cln = fat_fd->cln;
33b1c: e5813038 str r3, [r1, #56] ; 0x38 <== NOT EXECUTED
rc = fat_file_size(mt_entry, fat_fd);
33b20: e1a00005 mov r0, r5 <== NOT EXECUTED
33b24: ebffb7d7 bl 21a88 <fat_file_size> <== NOT EXECUTED
if (rc != RC_OK)
33b28: e2504000 subs r4, r0, #0 <== NOT EXECUTED
33b2c: 1a000008 bne 33b54 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1dc><== 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,
33b30: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
33b34: e18a280b orr r2, sl, fp, lsl #16 <== NOT EXECUTED
33b38: e1a03006 mov r3, r6 <== NOT EXECUTED
33b3c: e1a00005 mov r0, r5 <== NOT EXECUTED
33b40: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
33b44: e58dc000 str ip, [sp] <== NOT EXECUTED
33b48: ebfffb38 bl 32830 <msdos_find_node_by_cluster_num_in_fat_file><== NOT EXECUTED
dir_pos, dir_entry);
if (rc != RC_OK)
33b4c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
33b50: 0a000003 beq 33b64 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1ec><== NOT EXECUTED
{
fat_file_close(mt_entry, fat_fd);
33b54: e1a00005 mov r0, r5 <== NOT EXECUTED
33b58: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
33b5c: ebffba51 bl 224a8 <fat_file_close> <== NOT EXECUTED
return rc;
33b60: ea000003 b 33b74 <msdos_get_dotdot_dir_info_cluster_num_and_offset+0x1fc><== NOT EXECUTED
}
rc = fat_file_close(mt_entry, fat_fd);
33b64: e1a00005 mov r0, r5 <== NOT EXECUTED
33b68: e59d1054 ldr r1, [sp, #84] ; 0x54 <== NOT EXECUTED
33b6c: ebffba4d bl 224a8 <fat_file_close> <== NOT EXECUTED
33b70: e1a04000 mov r4, r0 <== NOT EXECUTED
return rc;
}
33b74: e1a00004 mov r0, r4 <== NOT EXECUTED
33b78: e28dd058 add sp, sp, #88 ; 0x58 <== NOT EXECUTED
33b7c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00033b88 <msdos_get_name_node>:
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
33b88: e92d45ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, sl, lr} <== 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,
33b8c: e58d3000 str r3, [sp] <== NOT EXECUTED
int name_len,
msdos_name_type_t name_type,
fat_dir_pos_t *dir_pos,
char *name_dir_entry
)
{
33b90: e1a06000 mov r6, r0 <== NOT EXECUTED
33b94: e1a08002 mov r8, r2 <== NOT EXECUTED
33b98: e20170ff and r7, r1, #255 ; 0xff <== NOT EXECUTED
33b9c: e28d4030 add r4, sp, #48 ; 0x30 <== NOT EXECUTED
33ba0: e8940030 ldm r4, {r4, r5} <== 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,
33ba4: e59dc02c ldr ip, [sp, #44] ; 0x2c <== NOT EXECUTED
33ba8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
33bac: e5961000 ldr r1, [r6] <== NOT EXECUTED
33bb0: e1a03008 mov r3, r8 <== NOT EXECUTED
33bb4: e1a02007 mov r2, r7 <== NOT EXECUTED
33bb8: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
33bbc: e58d4008 str r4, [sp, #8] <== NOT EXECUTED
33bc0: e58d500c str r5, [sp, #12] <== NOT EXECUTED
33bc4: ebfffb70 bl 3298c <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))
33bc8: e59f308c ldr r3, [pc, #140] ; 33c5c <msdos_get_name_node+0xd4><== NOT EXECUTED
33bcc: e1500003 cmp r0, r3 <== NOT EXECUTED
33bd0: 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,
33bd4: 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))
33bd8: 1a00001c bne 33c50 <msdos_get_name_node+0xc8> <== NOT EXECUTED
return rc;
if (!create_node)
33bdc: e3570000 cmp r7, #0 <== NOT EXECUTED
33be0: 1a00001a bne 33c50 <msdos_get_name_node+0xc8> <== NOT EXECUTED
{
/* if we search for valid name and name not found -> return */
if (rc == MSDOS_NAME_NOT_FOUND_ERR)
33be4: e1500003 cmp r0, r3 <== NOT EXECUTED
33be8: 0a000018 beq 33c50 <msdos_get_name_node+0xc8> <== 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)
33bec: e3500000 cmp r0, #0 <== NOT EXECUTED
33bf0: 1a000016 bne 33c50 <msdos_get_name_node+0xc8> <== NOT EXECUTED
{
if (strncmp(name, "..", 2) == 0)
33bf4: e1a00008 mov r0, r8 <== NOT EXECUTED
33bf8: e59f1060 ldr r1, [pc, #96] ; 33c60 <msdos_get_name_node+0xd8><== NOT EXECUTED
33bfc: e3a02002 mov r2, #2 <== NOT EXECUTED
33c00: eb004548 bl 45128 <strncmp> <== NOT EXECUTED
33c04: e3500000 cmp r0, #0 <== NOT EXECUTED
33c08: 1a000010 bne 33c50 <msdos_get_name_node+0xc8> <== NOT EXECUTED
{
dotdot_cln = MSDOS_EXTRACT_CLUSTER_NUM((name_dir_entry));
33c0c: e1d511b4 ldrh r1, [r5, #20] <== NOT EXECUTED
33c10: e1d531ba ldrh r3, [r5, #26] <== NOT EXECUTED
/* are we right under root dir ? */
if (dotdot_cln == 0)
33c14: e1931801 orrs r1, r3, r1, lsl #16 <== NOT EXECUTED
33c18: 1a000006 bne 33c38 <msdos_get_name_node+0xb0> <== NOT EXECUTED
33c1c: 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;
33c20: e3a02001 mov r2, #1 <== NOT EXECUTED
33c24: e5842000 str r2, [r4] <== NOT EXECUTED
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
33c28: e584300c str r3, [r4, #12] <== NOT EXECUTED
fat_dir_pos_init(
fat_dir_pos_t *dir_pos
)
{
dir_pos->sname.cln = 0;
dir_pos->sname.ofs = 0;
33c2c: e584a004 str sl, [r4, #4] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
33c30: e5843008 str r3, [r4, #8] <== NOT EXECUTED
33c34: ea000005 b 33c50 <msdos_get_name_node+0xc8> <== NOT EXECUTED
}
else
{
rc =
msdos_get_dotdot_dir_info_cluster_num_and_offset(parent_loc->mt_entry,
33c38: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
33c3c: e1a02004 mov r2, r4 <== NOT EXECUTED
33c40: e1a03005 mov r3, r5 <== NOT EXECUTED
}
}
}
}
return rc;
}
33c44: e28dd010 add sp, sp, #16 <== NOT EXECUTED
33c48: 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,
33c4c: eaffff49 b 33978 <msdos_get_dotdot_dir_info_cluster_num_and_offset><== NOT EXECUTED
}
}
}
}
return rc;
}
33c50: e1a0000a mov r0, sl <== NOT EXECUTED
33c54: e28dd010 add sp, sp, #16 <== NOT EXECUTED
33c58: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00033700 <msdos_get_token>:
msdos_token_types_t
msdos_get_token(const char *path,
int pathlen,
const char **ret_token,
int *ret_token_len)
{
33700: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
33704: e3a06000 mov r6, #0 <== NOT EXECUTED
*ret_token_len = 0;
if (pathlen == 0)
33708: 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)
{
3370c: e1a07000 mov r7, r0 <== NOT EXECUTED
33710: e1a04002 mov r4, r2 <== NOT EXECUTED
33714: e1a05003 mov r5, r3 <== NOT EXECUTED
msdos_token_types_t type = MSDOS_NAME;
int i = 0;
*ret_token = NULL;
33718: e5826000 str r6, [r2] <== NOT EXECUTED
*ret_token_len = 0;
3371c: e5836000 str r6, [r3] <== NOT EXECUTED
if (pathlen == 0)
33720: 01a00008 moveq r0, r8 <== NOT EXECUTED
33724: 1a000007 bne 33748 <msdos_get_token+0x48> <== NOT EXECUTED
33728: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
{
if ( !msdos_is_valid_name_char(path[i]) )
3372c: e7d70006 ldrb r0, [r7, r6] <== NOT EXECUTED
33730: ebffffd7 bl 33694 <msdos_is_valid_name_char> <== NOT EXECUTED
33734: e3500000 cmp r0, #0 <== NOT EXECUTED
return MSDOS_INVALID_TOKEN;
++i;
33738: 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]) )
3373c: 0a000025 beq 337d8 <msdos_get_token+0xd8> <== NOT EXECUTED
return MSDOS_INVALID_TOKEN;
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
33740: e3560f41 cmp r6, #260 ; 0x104 <== NOT EXECUTED
33744: 0a000023 beq 337d8 <msdos_get_token+0xd8> <== NOT EXECUTED
return MSDOS_NO_MORE_PATH;
/*
* Check for a separator.
*/
while (!msdos_is_separator(path[i]) && (i < pathlen))
33748: e7d70006 ldrb r0, [r7, r6] <== NOT EXECUTED
3374c: ebff560d bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
33750: e3500000 cmp r0, #0 <== NOT EXECUTED
33754: 1a000001 bne 33760 <msdos_get_token+0x60> <== NOT EXECUTED
33758: e1560008 cmp r6, r8 <== NOT EXECUTED
3375c: bafffff2 blt 3372c <msdos_get_token+0x2c> <== NOT EXECUTED
*ret_token = path;
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
33760: e3560000 cmp r6, #0 <== NOT EXECUTED
++i;
if ( i == MSDOS_NAME_MAX_LFN_WITH_DOT )
return MSDOS_INVALID_TOKEN;
}
*ret_token = path;
33764: e5847000 str r7, [r4] <== NOT EXECUTED
/*
* If it is just a separator then it is the current dir.
*/
if ( i == 0 )
33768: 13a00003 movne r0, #3 <== NOT EXECUTED
3376c: 1a000003 bne 33780 <msdos_get_token+0x80> <== NOT EXECUTED
{
if ( (*path != '\0') && pathlen )
33770: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
33774: e3530000 cmp r3, #0 <== NOT EXECUTED
33778: 13a06001 movne r6, #1 <== NOT EXECUTED
3377c: e1a00006 mov r0, r6 <== NOT EXECUTED
/*
* If we copied something that was not a seperator see if
* it was a special name.
*/
if ( type == MSDOS_NAME )
33780: e3500003 cmp r0, #3 <== NOT EXECUTED
}
/*
* Set the token and token_len to the token start and length.
*/
*ret_token_len = i;
33784: 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 )
33788: 18bd81f0 popne {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
{
if ((i == 2) && ((*ret_token)[0] == '.') && ((*ret_token)[1] == '.'))
3378c: e3560002 cmp r6, #2 <== NOT EXECUTED
33790: 1a000008 bne 337b8 <msdos_get_token+0xb8> <== NOT EXECUTED
33794: e5943000 ldr r3, [r4] <== NOT EXECUTED
33798: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
3379c: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
337a0: 18bd81f0 popne {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
337a4: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
337a8: e350002e cmp r0, #46 ; 0x2e <== NOT EXECUTED
337ac: 13a00003 movne r0, #3 <== NOT EXECUTED
337b0: 03a00002 moveq r0, #2 <== NOT EXECUTED
337b4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
{
type = MSDOS_UP_DIR;
return type;
}
if ((i == 1) && ((*ret_token)[0] == '.'))
337b8: e3560001 cmp r6, #1 <== NOT EXECUTED
337bc: 18bd81f0 popne {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
337c0: e5943000 ldr r3, [r4] <== NOT EXECUTED
337c4: e5d30000 ldrb r0, [r3] <== NOT EXECUTED
337c8: e350002e cmp r0, #46 ; 0x2e <== NOT EXECUTED
337cc: 13a00003 movne r0, #3 <== NOT EXECUTED
337d0: 03a00001 moveq r0, #1 <== NOT EXECUTED
337d4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
337d8: e3a00004 mov r0, #4 <== NOT EXECUTED
return type;
}
}
return type;
}
337dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0001d304 <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
)
{
1d304: 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;
1d308: 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
)
{
1d30c: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
1d310: e1a05000 mov r5, r0 <== NOT EXECUTED
1d314: 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));
1d318: e3a00001 mov r0, #1 <== NOT EXECUTED
1d31c: 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;
1d320: 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
)
{
1d324: e1a0a002 mov sl, r2 <== NOT EXECUTED
1d328: 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));
1d32c: ebffa770 bl 70f4 <calloc> <== NOT EXECUTED
if (!fs_info)
1d330: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1d334: 0a00003d beq 1d430 <msdos_initialize_support+0x12c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
temp_mt_entry->fs_info = fs_info;
1d338: e5854034 str r4, [r5, #52] ; 0x34 <== NOT EXECUTED
rc = fat_init_volume_info(temp_mt_entry);
1d33c: e1a00005 mov r0, r5 <== NOT EXECUTED
1d340: eb0016f8 bl 22f28 <fat_init_volume_info> <== NOT EXECUTED
if (rc != RC_OK)
1d344: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1d348: 1a00000f bne 1d38c <msdos_initialize_support+0x88> <== 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;
1d34c: e28d1018 add r1, sp, #24 <== NOT EXECUTED
1d350: 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;
1d354: e3e03000 mvn r3, #0 <== NOT EXECUTED
1d358: e5218014 str r8, [r1, #-20]! <== NOT EXECUTED
{
free(fs_info);
return rc;
}
fs_info->file_handlers = file_handlers;
1d35c: e584a090 str sl, [r4, #144] ; 0x90 <== NOT EXECUTED
fs_info->directory_handlers = directory_handlers;
1d360: 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);
1d364: e1a00005 mov r0, r5 <== NOT EXECUTED
1d368: 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;
1d36c: e58d7008 str r7, [sp, #8] <== NOT EXECUTED
dir_pos->lname.cln = FAT_FILE_SHORT_NAME;
dir_pos->lname.ofs = FAT_FILE_SHORT_NAME;
1d370: 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;
1d374: e58d300c str r3, [sp, #12] <== NOT EXECUTED
1d378: eb001473 bl 2254c <fat_file_open> <== NOT EXECUTED
if (rc != RC_OK)
1d37c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1d380: 0a000004 beq 1d398 <msdos_initialize_support+0x94> <== NOT EXECUTED
{
fat_shutdown_drive(temp_mt_entry);
1d384: e1a00005 mov r0, r5 <== NOT EXECUTED
1d388: eb00164b bl 22cbc <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
1d38c: e1a00004 mov r0, r4 <== NOT EXECUTED
1d390: ebffa8c7 bl 76b4 <free> <== NOT EXECUTED
return rc;
1d394: ea000043 b 1d4a8 <msdos_initialize_support+0x1a4> <== NOT EXECUTED
}
/* again: unfortunately "fat-file" is just almost fat file :( */
fat_fd->fat_file_type = FAT_DIRECTORY;
1d398: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
fat_fd->size_limit = MSDOS_MAX_DIR_LENGHT;
1d39c: e3a03602 mov r3, #2097152 ; 0x200000 <== NOT EXECUTED
1d3a0: e5813014 str r3, [r1, #20] <== NOT EXECUTED
fat_fd->cln = fs_info->fat.vol.rdir_cl;
1d3a4: 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 )
1d3a8: 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;
1d3ac: 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;
1d3b0: 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;
1d3b4: e581301c str r3, [r1, #28] <== NOT EXECUTED
fat_fd->map.file_cln = 0;
fat_fd->map.disk_cln = fat_fd->cln;
1d3b8: e5813038 str r3, [r1, #56] ; 0x38 <== NOT EXECUTED
/* if we have FAT12/16 */
if ( fat_fd->cln == 0 )
1d3bc: 1a000006 bne 1d3dc <msdos_initialize_support+0xd8> <== NOT EXECUTED
{
fat_fd->fat_file_size = fs_info->fat.vol.rdir_size;
1d3c0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
1d3c4: e5813018 str r3, [r1, #24] <== NOT EXECUTED
cl_buf_size = (fs_info->fat.vol.bpc > fs_info->fat.vol.rdir_size) ?
1d3c8: e1d400b6 ldrh r0, [r4, #6] <== NOT EXECUTED
1d3cc: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
1d3d0: e1500003 cmp r0, r3 <== NOT EXECUTED
1d3d4: 31a00003 movcc r0, r3 <== NOT EXECUTED
1d3d8: ea000008 b 1d400 <msdos_initialize_support+0xfc> <== NOT EXECUTED
fs_info->fat.vol.bpc :
fs_info->fat.vol.rdir_size;
}
else
{
rc = fat_file_size(temp_mt_entry, fat_fd);
1d3dc: e1a00005 mov r0, r5 <== NOT EXECUTED
1d3e0: eb0011a8 bl 21a88 <fat_file_size> <== NOT EXECUTED
if ( rc != RC_OK )
1d3e4: 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;
1d3e8: 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 )
1d3ec: 0a000003 beq 1d400 <msdos_initialize_support+0xfc> <== NOT EXECUTED
{
fat_file_close(temp_mt_entry, fat_fd);
1d3f0: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
1d3f4: e1a00005 mov r0, r5 <== NOT EXECUTED
1d3f8: eb00142a bl 224a8 <fat_file_close> <== NOT EXECUTED
1d3fc: eaffffe0 b 1d384 <msdos_initialize_support+0x80> <== NOT EXECUTED
return rc;
}
cl_buf_size = fs_info->fat.vol.bpc;
}
fs_info->cl_buf = (uint8_t *)calloc(cl_buf_size, sizeof(char));
1d400: e3a01001 mov r1, #1 <== NOT EXECUTED
1d404: ebffa73a bl 70f4 <calloc> <== NOT EXECUTED
if (fs_info->cl_buf == NULL)
1d408: 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));
1d40c: e5840098 str r0, [r4, #152] ; 0x98 <== NOT EXECUTED
if (fs_info->cl_buf == NULL)
1d410: 1a00000b bne 1d444 <msdos_initialize_support+0x140> <== NOT EXECUTED
{
fat_file_close(temp_mt_entry, fat_fd);
1d414: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
1d418: e1a00005 mov r0, r5 <== NOT EXECUTED
1d41c: eb001421 bl 224a8 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
1d420: e1a00005 mov r0, r5 <== NOT EXECUTED
1d424: eb001624 bl 22cbc <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info);
1d428: e1a00004 mov r0, r4 <== NOT EXECUTED
1d42c: ebffa8a0 bl 76b4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
1d430: eb0083e4 bl 3e3c8 <__errno> <== NOT EXECUTED
1d434: e3a0300c mov r3, #12 <== NOT EXECUTED
1d438: e5803000 str r3, [r0] <== NOT EXECUTED
1d43c: e3e07000 mvn r7, #0 <== NOT EXECUTED
1d440: ea000018 b 1d4a8 <msdos_initialize_support+0x1a4> <== NOT EXECUTED
}
sc = rtems_semaphore_create(3,
1d444: e284c094 add ip, r4, #148 ; 0x94 <== NOT EXECUTED
1d448: e3a00003 mov r0, #3 <== NOT EXECUTED
1d44c: e3a01001 mov r1, #1 <== NOT EXECUTED
1d450: e3a02010 mov r2, #16 <== NOT EXECUTED
1d454: e3a03000 mov r3, #0 <== NOT EXECUTED
1d458: e58dc000 str ip, [sp] <== NOT EXECUTED
1d45c: ebffb86e bl b61c <rtems_semaphore_create> <== NOT EXECUTED
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_FIFO,
0,
&fs_info->vol_sema);
if (sc != RTEMS_SUCCESSFUL)
1d460: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1d464: 0a00000b beq 1d498 <msdos_initialize_support+0x194> <== NOT EXECUTED
{
fat_file_close(temp_mt_entry, fat_fd);
1d468: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
1d46c: e1a00005 mov r0, r5 <== NOT EXECUTED
1d470: eb00140c bl 224a8 <fat_file_close> <== NOT EXECUTED
fat_shutdown_drive(temp_mt_entry);
1d474: e1a00005 mov r0, r5 <== NOT EXECUTED
1d478: eb00160f bl 22cbc <fat_shutdown_drive> <== NOT EXECUTED
free(fs_info->cl_buf);
1d47c: e5940098 ldr r0, [r4, #152] ; 0x98 <== NOT EXECUTED
1d480: ebffa88b bl 76b4 <free> <== NOT EXECUTED
free(fs_info);
1d484: e1a00004 mov r0, r4 <== NOT EXECUTED
1d488: ebffa889 bl 76b4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EIO );
1d48c: eb0083cd bl 3e3c8 <__errno> <== NOT EXECUTED
1d490: e3a03005 mov r3, #5 <== NOT EXECUTED
1d494: eaffffe7 b 1d438 <msdos_initialize_support+0x134> <== NOT EXECUTED
}
temp_mt_entry->mt_fs_root.node_access = fat_fd;
1d498: 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;
1d49c: 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;
1d4a0: e585301c str r3, [r5, #28] <== NOT EXECUTED
temp_mt_entry->mt_fs_root.handlers = directory_handlers;
1d4a4: e5856024 str r6, [r5, #36] ; 0x24 <== NOT EXECUTED
temp_mt_entry->mt_fs_root.ops = op_table;
return rc;
}
1d4a8: e1a00007 mov r0, r7 <== NOT EXECUTED
1d4ac: e28dd018 add sp, sp, #24 <== NOT EXECUTED
1d4b0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00033694 <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)
{
33694: e92d4010 push {r4, lr} <== NOT EXECUTED
33698: e20040ff and r4, r0, #255 ; 0xff <== NOT EXECUTED
if (strchr(" +,;=[]", ch) != NULL)
3369c: e1a01004 mov r1, r4 <== NOT EXECUTED
336a0: e59f004c ldr r0, [pc, #76] ; 336f4 <msdos_is_valid_name_char+0x60><== NOT EXECUTED
336a4: eb004386 bl 444c4 <strchr> <== NOT EXECUTED
336a8: e3500000 cmp r0, #0 <== NOT EXECUTED
336ac: 13a00002 movne r0, #2 <== NOT EXECUTED
336b0: 18bd8010 popne {r4, pc} <== NOT EXECUTED
return MSDOS_NAME_LONG;
if ((ch == '.') || isalnum((unsigned char)ch) ||
336b4: e354002e cmp r4, #46 ; 0x2e <== NOT EXECUTED
336b8: 0a00000b beq 336ec <msdos_is_valid_name_char+0x58> <== NOT EXECUTED
336bc: e59f3034 ldr r3, [pc, #52] ; 336f8 <msdos_is_valid_name_char+0x64><== NOT EXECUTED
336c0: e5933000 ldr r3, [r3] <== NOT EXECUTED
336c4: e0833004 add r3, r3, r4 <== NOT EXECUTED
336c8: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
336cc: e3130007 tst r3, #7 <== NOT EXECUTED
336d0: 1a000005 bne 336ec <msdos_is_valid_name_char+0x58> <== NOT EXECUTED
(strchr("$%'-_@~`!(){}^#&", ch) != NULL))
336d4: e1a01004 mov r1, r4 <== NOT EXECUTED
336d8: e59f001c ldr r0, [pc, #28] ; 336fc <msdos_is_valid_name_char+0x68><== NOT EXECUTED
336dc: eb004378 bl 444c4 <strchr> <== NOT EXECUTED
336e0: e2500000 subs r0, r0, #0 <== NOT EXECUTED
336e4: 13a00001 movne r0, #1 <== NOT EXECUTED
336e8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
336ec: e3a00001 mov r0, #1 <== NOT EXECUTED
return MSDOS_NAME_SHORT;
return MSDOS_NAME_INVALID;
}
336f0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000337e0 <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)
{
337e0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
337e4: e1a06002 mov r6, r2 <== NOT EXECUTED
337e8: e1a04000 mov r4, r0 <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
337ec: 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)
{
337f0: e1a05001 mov r5, r1 <== NOT EXECUTED
int i;
/*
* Fill with spaces. This is how a short directory entry is padded.
*/
memset (sfn, ' ', sfn_len);
337f4: e1a00006 mov r0, r6 <== NOT EXECUTED
337f8: e3a01020 mov r1, #32 <== NOT EXECUTED
337fc: eb003828 bl 418a4 <memset> <== NOT EXECUTED
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
33800: e5d43000 ldrb r3, [r4] <== NOT EXECUTED
33804: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
33808: 13a02000 movne r2, #0 <== NOT EXECUTED
3380c: 03a02001 moveq r2, #1 <== NOT EXECUTED
33810: e3550001 cmp r5, #1 <== NOT EXECUTED
33814: 0353002e cmpeq r3, #46 ; 0x2e <== NOT EXECUTED
{
sfn[0] = '.';
33818: 03a0302e moveq r3, #46 ; 0x2e <== NOT EXECUTED
3381c: 05c63000 strbeq r3, [r6] <== NOT EXECUTED
memset (sfn, ' ', sfn_len);
/*
* Handle '.' and '..' specially.
*/
if ((lfn[0] == '.') && (lfn_len == 1))
33820: 0a000008 beq 33848 <msdos_long_to_short+0x68> <== 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))
33824: e3520000 cmp r2, #0 <== NOT EXECUTED
33828: 0a00000e beq 33868 <msdos_long_to_short+0x88> <== NOT EXECUTED
3382c: e5d43001 ldrb r3, [r4, #1] <== NOT EXECUTED
33830: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
33834: 03550002 cmpeq r5, #2 <== NOT EXECUTED
33838: 1a00000a bne 33868 <msdos_long_to_short+0x88> <== NOT EXECUTED
{
sfn[0] = sfn[1] = '.';
3383c: e3a0302e mov r3, #46 ; 0x2e <== NOT EXECUTED
33840: e5c63000 strb r3, [r6] <== NOT EXECUTED
33844: e5c63001 strb r3, [r6, #1] <== NOT EXECUTED
33848: e3a00001 mov r0, #1 <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: SHORT[2]: lfn:'%s' SFN:'%s'\n", lfn, sfn);
#endif
return MSDOS_NAME_SHORT;
3384c: ea000044 b 33964 <msdos_long_to_short+0x184> <== NOT EXECUTED
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
if ((lfn[i] != ' ') && (lfn[i] != '.'))
33850: e7d42003 ldrb r2, [r4, r3] <== NOT EXECUTED
33854: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
33858: 13520020 cmpne r2, #32 <== NOT EXECUTED
3385c: 1a00002c bne 33914 <msdos_long_to_short+0x134> <== NOT EXECUTED
}
/*
* Filenames with only blanks and dots are not allowed!
*/
for (i = 0; i < lfn_len; i++)
33860: e2833001 add r3, r3, #1 <== NOT EXECUTED
33864: ea000000 b 3386c <msdos_long_to_short+0x8c> <== NOT EXECUTED
33868: e3a03000 mov r3, #0 <== NOT EXECUTED
3386c: e1530005 cmp r3, r5 <== NOT EXECUTED
33870: bafffff6 blt 33850 <msdos_long_to_short+0x70> <== NOT EXECUTED
if ((lfn[i] != ' ') && (lfn[i] != '.'))
break;
if (i == lfn_len)
33874: 03a00000 moveq r0, #0 <== NOT EXECUTED
33878: 1a000025 bne 33914 <msdos_long_to_short+0x134> <== NOT EXECUTED
3387c: ea000038 b 33964 <msdos_long_to_short+0x184> <== 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);
33880: e1a0000a mov r0, sl <== NOT EXECUTED
33884: e58d3000 str r3, [sp] <== NOT EXECUTED
33888: ebffff81 bl 33694 <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))
3388c: e3500000 cmp r0, #0 <== NOT EXECUTED
33890: 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);
33894: 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))
33898: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3389c: 0a000029 beq 33948 <msdos_long_to_short+0x168> <== NOT EXECUTED
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
{
bool is_dot = *name == '.';
338a0: e35a002e cmp sl, #46 ; 0x2e <== NOT EXECUTED
338a4: 13a02000 movne r2, #0 <== NOT EXECUTED
338a8: 03a02001 moveq r2, #1 <== NOT EXECUTED
#endif
if ((type == MSDOS_NAME_INVALID) || (type == MSDOS_NAME_LONG))
return type;
if (dot_at >= 0)
338ac: e37b0001 cmn fp, #1 <== NOT EXECUTED
338b0: 0a000005 beq 338cc <msdos_long_to_short+0xec> <== NOT EXECUTED
{
if (is_dot || ((count - dot_at) > 3))
338b4: e3520000 cmp r2, #0 <== NOT EXECUTED
338b8: 1a00002c bne 33970 <msdos_long_to_short+0x190> <== NOT EXECUTED
338bc: e06b2008 rsb r2, fp, r8 <== NOT EXECUTED
338c0: e3520003 cmp r2, #3 <== NOT EXECUTED
338c4: da000007 ble 338e8 <msdos_long_to_short+0x108> <== NOT EXECUTED
338c8: ea000028 b 33970 <msdos_long_to_short+0x190> <== NOT EXECUTED
return MSDOS_NAME_LONG;
}
}
else
{
if (count == 8 && !is_dot)
338cc: e3580008 cmp r8, #8 <== NOT EXECUTED
338d0: 1a000002 bne 338e0 <msdos_long_to_short+0x100> <== NOT EXECUTED
338d4: e3520000 cmp r2, #0 <== NOT EXECUTED
338d8: 1a00000a bne 33908 <msdos_long_to_short+0x128> <== NOT EXECUTED
338dc: ea000023 b 33970 <msdos_long_to_short+0x190> <== NOT EXECUTED
#endif
return MSDOS_NAME_LONG;
}
}
if (is_dot)
338e0: e3520000 cmp r2, #0 <== NOT EXECUTED
338e4: 1a000007 bne 33908 <msdos_long_to_short+0x128> <== NOT EXECUTED
dot_at = count;
else if ((*name >= 'A') && (*name <= 'Z'))
338e8: e24a2041 sub r2, sl, #65 ; 0x41 <== NOT EXECUTED
338ec: e3520019 cmp r2, #25 <== NOT EXECUTED
338f0: 93a03001 movls r3, #1 <== NOT EXECUTED
338f4: 9a000004 bls 3390c <msdos_long_to_short+0x12c> <== NOT EXECUTED
uppercase = true;
else if ((*name >= 'a') && (*name <= 'z'))
338f8: e24aa061 sub sl, sl, #97 ; 0x61 <== NOT EXECUTED
338fc: e35a0019 cmp sl, #25 <== NOT EXECUTED
33900: 93a09001 movls r9, #1 <== NOT EXECUTED
33904: ea000000 b 3390c <msdos_long_to_short+0x12c> <== NOT EXECUTED
33908: e1a0b008 mov fp, r8 <== NOT EXECUTED
lowercase = true;
count++;
3390c: e2888001 add r8, r8, #1 <== NOT EXECUTED
33910: ea000003 b 33924 <msdos_long_to_short+0x144> <== NOT EXECUTED
33914: e3a08000 mov r8, #0 <== NOT EXECUTED
33918: e3e0b000 mvn fp, #0 <== NOT EXECUTED
3391c: e1a03008 mov r3, r8 <== NOT EXECUTED
33920: e1a09008 mov r9, r8 <== NOT EXECUTED
bool lowercase = false;
bool uppercase = false;
int dot_at = -1;
int count = 0;
while (*name && (count < name_len))
33924: e7d4a008 ldrb sl, [r4, r8] <== NOT EXECUTED
33928: e35a0000 cmp sl, #0 <== NOT EXECUTED
3392c: 11580005 cmpne r8, r5 <== NOT EXECUTED
33930: baffffd2 blt 33880 <msdos_long_to_short+0xa0> <== NOT EXECUTED
count++;
name++;
}
if (lowercase && uppercase)
33934: e3590000 cmp r9, #0 <== NOT EXECUTED
33938: 0a00000a beq 33968 <msdos_long_to_short+0x188> <== NOT EXECUTED
3393c: e3530000 cmp r3, #0 <== NOT EXECUTED
33940: 1a00000a bne 33970 <msdos_long_to_short+0x190> <== NOT EXECUTED
33944: ea000007 b 33968 <msdos_long_to_short+0x188> <== NOT EXECUTED
* Is this a short name ?
*/
type = msdos_name_type (lfn, lfn_len);
if (type == MSDOS_NAME_INVALID)
33948: e3500000 cmp r0, #0 <== NOT EXECUTED
3394c: 0a000004 beq 33964 <msdos_long_to_short+0x184> <== 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);
33950: e1a00004 mov r0, r4 <== NOT EXECUTED
33954: e1a01005 mov r1, r5 <== NOT EXECUTED
33958: e1a02006 mov r2, r6 <== NOT EXECUTED
3395c: eb0024e1 bl 3cce8 <msdos_filename_unix2dos> <== NOT EXECUTED
33960: e1a00007 mov r0, r7 <== NOT EXECUTED
#if MSDOS_L2S_PRINT
printf ("MSDOS_L2S: TYPE:%d lfn:'%s' SFN:'%s'\n", type, lfn, sfn);
#endif
return type;
}
33964: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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;
33968: e3a07001 mov r7, #1 <== NOT EXECUTED
3396c: eafffff7 b 33950 <msdos_long_to_short+0x170> <== NOT EXECUTED
33970: e3a07002 mov r7, #2 <== NOT EXECUTED
33974: eafffff5 b 33950 <msdos_long_to_short+0x170> <== NOT EXECUTED
0001d4b4 <msdos_mknod>:
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
1d4b4: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
1d4b8: e59d8024 ldr r8, [sp, #36] ; 0x24 <== NOT EXECUTED
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
1d4bc: 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;
1d4c0: e5982010 ldr r2, [r8, #16] <== NOT EXECUTED
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
1d4c4: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc
)
{
1d4c8: e1a05001 mov r5, r1 <== NOT EXECUTED
1d4cc: e1a07000 mov r7, r0 <== NOT EXECUTED
int rc = RC_OK;
rtems_status_code sc = RTEMS_SUCCESSFUL;
msdos_fs_info_t *fs_info = pathloc->mt_entry->fs_info;
1d4d0: e5924034 ldr r4, [r2, #52] ; 0x34 <== NOT EXECUTED
msdos_token_types_t type = 0;
/*
* Figure out what type of msdos node this is.
*/
if (S_ISDIR(mode))
1d4d4: 0a000005 beq 1d4f0 <msdos_mknod+0x3c> <== NOT EXECUTED
{
type = MSDOS_DIRECTORY;
}
else if (S_ISREG(mode))
1d4d8: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
1d4dc: 03a0a005 moveq sl, #5 <== NOT EXECUTED
1d4e0: 0a000003 beq 1d4f4 <msdos_mknod+0x40> <== NOT EXECUTED
{
type = MSDOS_REGULAR_FILE;
}
else
rtems_set_errno_and_return_minus_one(EINVAL);
1d4e4: eb0083b7 bl 3e3c8 <__errno> <== NOT EXECUTED
1d4e8: e3a03016 mov r3, #22 <== NOT EXECUTED
1d4ec: ea000008 b 1d514 <msdos_mknod+0x60> <== NOT EXECUTED
1d4f0: e3a0a001 mov sl, #1 <== NOT EXECUTED
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
1d4f4: e3a01000 mov r1, #0 <== NOT EXECUTED
1d4f8: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
1d4fc: e1a02001 mov r2, r1 <== NOT EXECUTED
1d500: ebffb8ee bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1d504: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1d508: 0a000004 beq 1d520 <msdos_mknod+0x6c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
1d50c: eb0083ad bl 3e3c8 <__errno> <== NOT EXECUTED
1d510: e3a03005 mov r3, #5 <== NOT EXECUTED
1d514: e5803000 str r3, [r0] <== NOT EXECUTED
1d518: e3e05000 mvn r5, #0 <== NOT EXECUTED
1d51c: ea00000a b 1d54c <msdos_mknod+0x98> <== NOT EXECUTED
/* Create an MSDOS node */
rc = msdos_creat_node(pathloc, type, name, strlen(name), mode, NULL);
1d520: e1a00007 mov r0, r7 <== NOT EXECUTED
1d524: eb009eb5 bl 45000 <strlen> <== NOT EXECUTED
1d528: e1a0100a mov r1, sl <== NOT EXECUTED
1d52c: e1a03000 mov r3, r0 <== NOT EXECUTED
1d530: e1a02007 mov r2, r7 <== NOT EXECUTED
1d534: e1a00008 mov r0, r8 <== NOT EXECUTED
1d538: e88d0060 stm sp, {r5, r6} <== NOT EXECUTED
1d53c: eb005100 bl 31944 <msdos_creat_node> <== NOT EXECUTED
1d540: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release(fs_info->vol_sema);
1d544: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
1d548: ebffb922 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
1d54c: e1a00005 mov r0, r5 <== NOT EXECUTED
1d550: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0001d554 <msdos_node_type>:
* node type
*
*/
rtems_filesystem_node_types_t
msdos_node_type(rtems_filesystem_location_info_t *pathloc)
{
1d554: e5903000 ldr r3, [r0] <== NOT EXECUTED
* call
*/
fat_fd = pathloc->node_access;
return fat_fd->fat_file_type;
}
1d558: e5930010 ldr r0, [r3, #16] <== NOT EXECUTED
1d55c: e12fff1e bx lr <== NOT EXECUTED
0001d560 <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)
{
1d560: e92d45ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
1d564: e1a05003 mov r5, 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;
1d568: e5923010 ldr r3, [r2, #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)) {
1d56c: e1a00005 mov r0, r5 <== 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)
{
1d570: e1a06001 mov r6, 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;
1d574: e5934034 ldr r4, [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)
{
1d578: e1a07002 mov r7, 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)) {
1d57c: eb009e9f bl 45000 <strlen> <== NOT EXECUTED
1d580: e28d200c add r2, sp, #12 <== NOT EXECUTED
1d584: e1a01000 mov r1, r0 <== NOT EXECUTED
1d588: e28d3008 add r3, sp, #8 <== NOT EXECUTED
1d58c: e1a00005 mov r0, r5 <== 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;
1d590: e5968000 ldr r8, [r6] <== NOT EXECUTED
int len;
/*
* check spelling and format new node name
*/
if (MSDOS_NAME != msdos_get_token(new_name, strlen(new_name), &token, &len)) {
1d594: eb005859 bl 33700 <msdos_get_token> <== NOT EXECUTED
1d598: e3500003 cmp r0, #3 <== NOT EXECUTED
1d59c: e1a0a000 mov sl, r0 <== NOT EXECUTED
1d5a0: 0a000002 beq 1d5b0 <msdos_rename+0x50> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENAMETOOLONG);
1d5a4: eb008387 bl 3e3c8 <__errno> <== NOT EXECUTED
1d5a8: e3a0305b mov r3, #91 ; 0x5b <== NOT EXECUTED
1d5ac: ea000007 b 1d5d0 <msdos_rename+0x70> <== NOT EXECUTED
}
/*
* lock volume
*/
sc = rtems_semaphore_obtain(fs_info->vol_sema, RTEMS_WAIT,
1d5b0: e3a01000 mov r1, #0 <== NOT EXECUTED
1d5b4: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
1d5b8: e1a02001 mov r2, r1 <== NOT EXECUTED
1d5bc: ebffb8bf bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
MSDOS_VOLUME_SEMAPHORE_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
1d5c0: e3500000 cmp r0, #0 <== NOT EXECUTED
1d5c4: 0a000004 beq 1d5dc <msdos_rename+0x7c> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(EIO);
1d5c8: eb00837e bl 3e3c8 <__errno> <== NOT EXECUTED
1d5cc: e3a03005 mov r3, #5 <== NOT EXECUTED
1d5d0: e5803000 str r3, [r0] <== NOT EXECUTED
1d5d4: e3e05000 mvn r5, #0 <== NOT EXECUTED
1d5d8: ea000010 b 1d620 <msdos_rename+0xc0> <== NOT EXECUTED
/*
* create new directory entry as "hard link", copying relevant info from
* existing file
*/
rc = msdos_creat_node(new_parent_loc,
1d5dc: e1a02005 mov r2, r5 <== NOT EXECUTED
1d5e0: e3a0c902 mov ip, #32768 ; 0x8000 <== NOT EXECUTED
1d5e4: e1a00007 mov r0, r7 <== NOT EXECUTED
1d5e8: e1a0100a mov r1, sl <== NOT EXECUTED
1d5ec: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
1d5f0: e58dc000 str ip, [sp] <== NOT EXECUTED
1d5f4: e58d8004 str r8, [sp, #4] <== NOT EXECUTED
1d5f8: eb0050d1 bl 31944 <msdos_creat_node> <== NOT EXECUTED
MSDOS_HARD_LINK,new_name,len,S_IFREG,
old_fat_fd);
if (rc != RC_OK)
1d5fc: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1d600: 1a000004 bne 1d618 <msdos_rename+0xb8> <== NOT EXECUTED
}
/*
* mark file removed
*/
rc = msdos_set_first_char4file_name(old_loc->mt_entry,
1d604: e5960010 ldr r0, [r6, #16] <== NOT EXECUTED
1d608: e2881020 add r1, r8, #32 <== NOT EXECUTED
1d60c: e3a020e5 mov r2, #229 ; 0xe5 <== NOT EXECUTED
1d610: eb0057a3 bl 334a4 <msdos_set_first_char4file_name> <== NOT EXECUTED
1d614: e1a05000 mov r5, r0 <== NOT EXECUTED
&old_fat_fd->dir_pos,
MSDOS_THIS_DIR_ENTRY_EMPTY);
rtems_semaphore_release(fs_info->vol_sema);
1d618: e5940094 ldr r0, [r4, #148] ; 0x94 <== NOT EXECUTED
1d61c: ebffb8ed bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
return rc;
}
1d620: e1a00005 mov r0, r5 <== NOT EXECUTED
1d624: e28dd010 add sp, sp, #16 <== NOT EXECUTED
1d628: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
000335e0 <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
)
{
335e0: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
335e4: e1a05001 mov r5, r1 <== NOT EXECUTED
335e8: 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);
335ec: e28d2006 add r2, sp, #6 <== NOT EXECUTED
335f0: e28d1004 add r1, sp, #4 <== NOT EXECUTED
335f4: 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;
335f8: e5947034 ldr r7, [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);
335fc: eb002525 bl 3ca98 <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);
33600: 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)) )
33604: 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;
33608: e5943034 ldr r3, [r4, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
3360c: 1a000003 bne 33620 <msdos_set_dir_wrt_time_and_date+0x40> <== NOT EXECUTED
33610: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
33614: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
33618: 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)) )
3361c: 1a000003 bne 33630 <msdos_set_dir_wrt_time_and_date+0x50> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
33620: e5931030 ldr r1, [r3, #48] ; 0x30 <== NOT EXECUTED
33624: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
33628: e2426002 sub r6, r2, #2 <== NOT EXECUTED
3362c: e0816316 add r6, r1, r6, lsl r3 <== NOT EXECUTED
sec += (fat_fd->dir_pos.sname.ofs >> fs_info->fat.vol.sec_log2);
33630: e5953024 ldr r3, [r5, #36] ; 0x24 <== NOT EXECUTED
33634: e5d72002 ldrb r2, [r7, #2] <== NOT EXECUTED
33638: e0866233 add r6, r6, r3, lsr r2 <== NOT EXECUTED
/* byte points to start of 32bytes structure */
byte = fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1);
3363c: e1d750b0 ldrh r5, [r7] <== NOT EXECUTED
33640: e2455001 sub r5, r5, #1 <== NOT EXECUTED
33644: 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,
33648: e28dc006 add ip, sp, #6 <== NOT EXECUTED
3364c: e1a01006 mov r1, r6 <== NOT EXECUTED
33650: e2852016 add r2, r5, #22 <== NOT EXECUTED
33654: e3a03002 mov r3, #2 <== NOT EXECUTED
33658: e1a00004 mov r0, r4 <== NOT EXECUTED
3365c: e58dc000 str ip, [sp] <== NOT EXECUTED
33660: ebffbd51 bl 22bac <_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,
33664: e28dc004 add ip, sp, #4 <== 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,
33668: 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,
3366c: e1a01006 mov r1, r6 <== NOT EXECUTED
33670: e1a00004 mov r0, r4 <== NOT EXECUTED
33674: e2852018 add r2, r5, #24 <== NOT EXECUTED
33678: e3a03002 mov r3, #2 <== NOT EXECUTED
3367c: e58dc000 str ip, [sp] <== NOT EXECUTED
33680: ebffbd49 bl 22bac <_fat_block_write> <== NOT EXECUTED
2, (char *)(&date));
if ( (ret1 < 0) || (ret2 < 0) )
33684: e1a07fa7 lsr r7, r7, #31 <== NOT EXECUTED
33688: e1970fa0 orrs r0, r7, r0, lsr #31 <== NOT EXECUTED
return -1;
return RC_OK;
}
3368c: 13e00000 mvnne r0, #0 <== NOT EXECUTED
33690: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
00033378 <msdos_set_file_size>:
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);
33378: 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)) )
3337c: 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
)
{
33380: e92d4013 push {r0, r1, r4, lr} <== NOT EXECUTED
ssize_t ret = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
33384: e590c034 ldr ip, [r0, #52] ; 0x34 <== NOT EXECUTED
33388: 1a000003 bne 3339c <msdos_set_file_size+0x24> <== NOT EXECUTED
3338c: e5dc200a ldrb r2, [ip, #10] <== NOT EXECUTED
33390: e3120003 tst r2, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
33394: 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)) )
33398: 1a000003 bne 333ac <msdos_set_file_size+0x34> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
3339c: e5dce005 ldrb lr, [ip, #5] <== NOT EXECUTED
333a0: e59c2030 ldr r2, [ip, #48] ; 0x30 <== NOT EXECUTED
333a4: e2433002 sub r3, r3, #2 <== NOT EXECUTED
333a8: 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));
333ac: e1dc20b0 ldrh r2, [ip] <== NOT EXECUTED
le_new_length = CT_LE_L((fat_fd->fat_file_size));
333b0: e5914018 ldr r4, [r1, #24] <== 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);
333b4: e5911024 ldr r1, [r1, #36] ; 0x24 <== NOT EXECUTED
333b8: e5dce002 ldrb lr, [ip, #2] <== NOT EXECUTED
byte = (fat_fd->dir_pos.sname.ofs & (fs_info->fat.vol.bps - 1));
333bc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
le_new_length = CT_LE_L((fat_fd->fat_file_size));
333c0: e28dc008 add ip, sp, #8 <== NOT EXECUTED
333c4: 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));
333c8: e0022001 and r2, r2, r1 <== 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,
333cc: e282201c add r2, r2, #28 <== NOT EXECUTED
333d0: e0831e31 add r1, r3, r1, lsr lr <== NOT EXECUTED
333d4: e3a03004 mov r3, #4 <== NOT EXECUTED
333d8: e58dc000 str ip, [sp] <== NOT EXECUTED
333dc: ebffbdf2 bl 22bac <_fat_block_write> <== NOT EXECUTED
(char *)(&le_new_length));
if ( ret < 0 )
333e0: e3500000 cmp r0, #0 <== NOT EXECUTED
return -1;
return RC_OK;
}
333e4: b3e00000 mvnlt r0, #0 <== NOT EXECUTED
333e8: a3a00000 movge r0, #0 <== NOT EXECUTED
333ec: e8bd801c pop {r2, r3, r4, pc} <== NOT EXECUTED
000334a4 <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
)
{
334a4: e92d47ff push {r0, r1, r2, r3, 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;
334a8: e2814008 add r4, r1, #8 <== NOT EXECUTED
334ac: 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
)
{
334b0: 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;
334b4: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
334b8: 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;
334bc: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
uint32_t dir_block_size;
fat_pos_t start = dir_pos->lname;
fat_pos_t end = dir_pos->sname;
334c0: e5916000 ldr r6, [r1] <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
334c4: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
334c8: e1560003 cmp r6, r3 <== NOT EXECUTED
msdos_set_first_char4file_name(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_dir_pos_t *dir_pos,
unsigned char fchar
)
{
334cc: e1a05000 mov r5, r0 <== 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;
fat_pos_t end = dir_pos->sname;
334d0: e5918004 ldr r8, [r1, #4] <== NOT EXECUTED
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
334d4: 1a000003 bne 334e8 <msdos_set_first_char4file_name+0x44> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
334d8: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
334dc: e3130003 tst r3, #3 <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
334e0: 15947028 ldrne r7, [r4, #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)))
334e4: 1a000000 bne 334ec <msdos_set_first_char4file_name+0x48> <== NOT EXECUTED
dir_block_size = fs_info->fat.vol.rdir_size;
else
dir_block_size = fs_info->fat.vol.bpc;
334e8: e1d470b6 ldrh r7, [r4, #6] <== NOT EXECUTED
if (dir_pos->lname.cln == FAT_FILE_SHORT_NAME)
334ec: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
334f0: e3730001 cmn r3, #1 <== NOT EXECUTED
start = dir_pos->sname;
334f4: 0891000c ldmeq r1, {r2, r3} <== NOT EXECUTED
334f8: 058d2008 streq r2, [sp, #8] <== NOT EXECUTED
334fc: 058d300c streq r3, [sp, #12] <== 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,
33500: e28da004 add sl, 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);
33504: e28d9008 add r9, sp, #8 <== NOT EXECUTED
* name code was written rather than use the fat_file_write
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
33508: e59d2008 ldr r2, [sp, #8] <== 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)) )
3350c: 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;
33510: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED
if ( (cln == 0) && (fs_info->vol.type & (FAT_FAT12 | FAT_FAT16)) )
33514: 1a000003 bne 33528 <msdos_set_first_char4file_name+0x84> <== NOT EXECUTED
33518: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
3351c: e3110003 tst r1, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
33520: 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)) )
33524: 1a000003 bne 33538 <msdos_set_first_char4file_name+0x94> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
33528: e5930030 ldr r0, [r3, #48] ; 0x30 <== NOT EXECUTED
3352c: e5d33005 ldrb r3, [r3, #5] <== NOT EXECUTED
33530: e2421002 sub r1, r2, #2 <== NOT EXECUTED
33534: e0801311 add r1, r0, r1, lsl r3 <== NOT EXECUTED
(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,
33538: e1d420b0 ldrh r2, [r4] <== NOT EXECUTED
* interface.
*/
while (true)
{
uint32_t sec = (fat_cluster_num_to_sector_num(mt_entry, start.cln) +
(start.ofs >> fs_info->fat.vol.sec_log2));
3353c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
uint32_t byte = (start.ofs & (fs_info->fat.vol.bps - 1));;
ret = _fat_block_write(mt_entry, sec, byte + MSDOS_FILE_NAME_OFFSET, 1,
33540: e5d40002 ldrb r0, [r4, #2] <== NOT EXECUTED
33544: e2422001 sub r2, r2, #1 <== NOT EXECUTED
33548: e0811033 add r1, r1, r3, lsr r0 <== NOT EXECUTED
3354c: e0022003 and r2, r2, r3 <== NOT EXECUTED
33550: e1a00005 mov r0, r5 <== NOT EXECUTED
33554: e3a03001 mov r3, #1 <== NOT EXECUTED
33558: e58da000 str sl, [sp] <== NOT EXECUTED
3355c: ebffbd92 bl 22bac <_fat_block_write> <== NOT EXECUTED
&fchar);
if (ret < 0)
33560: e3500000 cmp r0, #0 <== NOT EXECUTED
33564: ba000018 blt 335cc <msdos_set_first_char4file_name+0x128> <== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
33568: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
3356c: e1530006 cmp r3, r6 <== NOT EXECUTED
33570: 1a000002 bne 33580 <msdos_set_first_char4file_name+0xdc> <== NOT EXECUTED
33574: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
33578: e1530008 cmp r3, r8 <== NOT EXECUTED
3357c: 0a000014 beq 335d4 <msdos_set_first_char4file_name+0x130> <== NOT EXECUTED
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
33580: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
33584: e2833020 add r3, r3, #32 <== NOT EXECUTED
if (start.ofs >= dir_block_size)
33588: e1530007 cmp r3, r7 <== NOT EXECUTED
return -1;
if ((start.cln == end.cln) && (start.ofs == end.ofs))
break;
start.ofs += MSDOS_DIRECTORY_ENTRY_STRUCT_SIZE;
3358c: e58d300c str r3, [sp, #12] <== NOT EXECUTED
if (start.ofs >= dir_block_size)
33590: 3affffdc bcc 33508 <msdos_set_first_char4file_name+0x64> <== NOT EXECUTED
{
int rc;
if ((end.cln == fs_info->fat.vol.rdir_cl) &&
33594: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
33598: e1560003 cmp r6, r3 <== NOT EXECUTED
3359c: 1a000002 bne 335ac <msdos_set_first_char4file_name+0x108> <== NOT EXECUTED
(fs_info->fat.vol.type & (FAT_FAT12 | FAT_FAT16)))
335a0: e5d4300a ldrb r3, [r4, #10] <== NOT EXECUTED
335a4: e3130003 tst r3, #3 <== NOT EXECUTED
335a8: 1a000009 bne 335d4 <msdos_set_first_char4file_name+0x130> <== NOT EXECUTED
break;
rc = fat_get_fat_cluster(mt_entry, start.cln, &start.cln);
335ac: e1a00005 mov r0, r5 <== NOT EXECUTED
335b0: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
335b4: e1a02009 mov r2, r9 <== NOT EXECUTED
335b8: eb0019e6 bl 39d58 <fat_get_fat_cluster> <== NOT EXECUTED
if ( rc != RC_OK )
335bc: e3500000 cmp r0, #0 <== NOT EXECUTED
335c0: 1a000004 bne 335d8 <msdos_set_first_char4file_name+0x134> <== NOT EXECUTED
return rc;
start.ofs = 0;
335c4: e58d000c str r0, [sp, #12] <== NOT EXECUTED
335c8: eaffffce b 33508 <msdos_set_first_char4file_name+0x64> <== NOT EXECUTED
335cc: e3e00000 mvn r0, #0 <== NOT EXECUTED
335d0: ea000000 b 335d8 <msdos_set_first_char4file_name+0x134> <== NOT EXECUTED
335d4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return RC_OK;
}
335d8: e28dd010 add sp, sp, #16 <== NOT EXECUTED
335dc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
000333f0 <msdos_set_first_cluster_num>:
/*
* 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);
333f0: 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)) )
333f4: 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
)
{
333f8: e92d41f3 push {r0, r1, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
ssize_t ret1 = 0, ret2 = 0;
msdos_fs_info_t *fs_info = mt_entry->fs_info;
333fc: e5902034 ldr r2, [r0, #52] ; 0x34 <== NOT EXECUTED
int
msdos_set_first_cluster_num(
rtems_filesystem_mount_table_entry_t *mt_entry,
fat_file_fd_t *fat_fd
)
{
33400: e1a04000 mov r4, r0 <== 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;
33404: e591701c ldr r7, [r1, #28] <== NOT EXECUTED
33408: 1a000003 bne 3341c <msdos_set_first_cluster_num+0x2c> <== NOT EXECUTED
3340c: e5d2000a ldrb r0, [r2, #10] <== NOT EXECUTED
33410: e3100003 tst r0, #3 <== NOT EXECUTED
return fs_info->vol.rdir_loc;
33414: 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)) )
33418: 1a000003 bne 3342c <msdos_set_first_cluster_num+0x3c> <== NOT EXECUTED
return fs_info->vol.rdir_loc;
return (((cln - FAT_RSRVD_CLN) << fs_info->vol.spc_log2) +
3341c: e5d2c005 ldrb ip, [r2, #5] <== NOT EXECUTED
33420: e5920030 ldr r0, [r2, #48] ; 0x30 <== NOT EXECUTED
33424: e2433002 sub r3, r3, #2 <== NOT EXECUTED
33428: 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);
3342c: e5d26002 ldrb r6, [r2, #2] <== NOT EXECUTED
33430: e5911024 ldr r1, [r1, #36] ; 0x24 <== NOT EXECUTED
33434: 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);
33438: e1d250b0 ldrh r5, [r2] <== NOT EXECUTED
3343c: e2455001 sub r5, r5, #1 <== NOT EXECUTED
33440: 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,
33444: e28dc006 add ip, sp, #6 <== NOT EXECUTED
33448: e1a01006 mov r1, r6 <== NOT EXECUTED
3344c: e285201a add r2, r5, #26 <== NOT EXECUTED
33450: e58dc000 str ip, [sp] <== NOT EXECUTED
33454: 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;
33458: 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,
3345c: 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));
33460: 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;
33464: 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,
33468: ebffbdcf bl 22bac <_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));
3346c: e1a07827 lsr r7, r7, #16 <== NOT EXECUTED
33470: e28dc008 add ip, sp, #8 <== NOT EXECUTED
33474: 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,
33478: 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,
3347c: e1a01006 mov r1, r6 <== NOT EXECUTED
33480: e1a00004 mov r0, r4 <== NOT EXECUTED
33484: e2852014 add r2, r5, #20 <== NOT EXECUTED
33488: e3a03002 mov r3, #2 <== NOT EXECUTED
3348c: e58dc000 str ip, [sp] <== NOT EXECUTED
33490: ebffbdc5 bl 22bac <_fat_block_write> <== NOT EXECUTED
byte + MSDOS_FIRST_CLUSTER_HI_OFFSET, 2,
(char *)(&le_cl_hi));
if ( (ret1 < 0) || (ret2 < 0) )
33494: e1a08fa8 lsr r8, r8, #31 <== NOT EXECUTED
33498: e1980fa0 orrs r0, r8, r0, lsr #31 <== NOT EXECUTED
return -1;
return RC_OK;
}
3349c: 13e00000 mvnne r0, #0 <== NOT EXECUTED
334a0: e8bd81fc pop {r2, r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000327e4 <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)
{
327e4: 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)
327e8: 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)
{
327ec: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = RC_OK;
msdos_fs_info_t *fs_info = temp_mt_entry->fs_info;
327f0: 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)
327f4: ebffbf2b bl 224a8 <fat_file_close> <== NOT EXECUTED
327f8: 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)
327fc: 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)
32800: 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)
32804: ebffc12c bl 22cbc <fat_shutdown_drive> <== NOT EXECUTED
32808: e3500000 cmp r0, #0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
3280c: 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)
32810: 13e06000 mvnne r6, #0 <== NOT EXECUTED
{
/* no return - try to free as much as possible */
rc = -1;
}
rtems_semaphore_delete(fs_info->vol_sema);
32814: ebff63eb bl b7c8 <rtems_semaphore_delete> <== NOT EXECUTED
free(fs_info->cl_buf);
32818: e5950098 ldr r0, [r5, #152] ; 0x98 <== NOT EXECUTED
3281c: ebff53a4 bl 76b4 <free> <== NOT EXECUTED
free(temp_mt_entry->fs_info);
32820: e5940034 ldr r0, [r4, #52] ; 0x34 <== NOT EXECUTED
32824: ebff53a2 bl 76b4 <free> <== NOT EXECUTED
return rc;
}
32828: e1a00006 mov r0, r6 <== NOT EXECUTED
3282c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00002838 <newlib_free_buffers>:
*/
int newlib_free_buffers(
FILE *fp
)
{
2838: e92d4010 push {r4, lr}
283c: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
2840: eb0030a6 bl eae0 <fileno>
2844: e3500002 cmp r0, #2
2848: 8a00000b bhi 287c <newlib_free_buffers+0x44>
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
284c: e1d430bc ldrh r3, [r4, #12]
2850: e3130080 tst r3, #128 ; 0x80
2854: 0a00000a beq 2884 <newlib_free_buffers+0x4c>
free( fp->_bf._base );
2858: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
285c: ebfffd9b bl 1ed0 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
2860: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2864: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2868: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
286c: e5843010 str r3, [r4, #16] <== NOT EXECUTED
case 0:
case 1:
case 2:
if (fp->_flags & __SMBF) {
free( fp->_bf._base );
fp->_flags &= ~__SMBF;
2870: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
2874: e5843000 str r3, [r4] <== NOT EXECUTED
2878: ea000001 b 2884 <newlib_free_buffers+0x4c> <== NOT EXECUTED
}
break;
default:
fclose(fp);
287c: e1a00004 mov r0, r4 <== NOT EXECUTED
2880: eb002fe4 bl e818 <fclose> <== NOT EXECUTED
}
return 0;
}
2884: e3a00000 mov r0, #0
2888: e8bd8010 pop {r4, pc}
00002aac <open>:
int open(
const char *pathname,
int flags,
...
)
{
2aac: e92d000e push {r1, r2, r3}
2ab0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
2ab4: e24dd01c sub sp, sp, #28
2ab8: e59d503c ldr r5, [sp, #60] ; 0x3c
/*
* Set the Evaluation flags
*/
eval_flags = 0;
status = flags + 1;
2abc: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
2ac0: e2138001 ands r8, r3, #1
2ac4: 13a08004 movne r8, #4
eval_flags |= RTEMS_LIBIO_PERMS_READ;
if ( ( status & _FWRITE ) == _FWRITE )
2ac8: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
2acc: e28d3044 add r3, sp, #68 ; 0x44
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;
2ad0: 13888002 orrne r8, r8, #2
int open(
const char *pathname,
int flags,
...
)
{
2ad4: e1a06000 mov r6, r0
eval_flags |= RTEMS_LIBIO_PERMS_WRITE;
va_start(ap, flags);
mode = va_arg( ap, int );
2ad8: e58d3018 str r3, [sp, #24]
2adc: e59d9040 ldr r9, [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();
2ae0: eb001ea0 bl a568 <rtems_libio_allocate>
if ( iop == 0 ) {
2ae4: e2504000 subs r4, r0, #0
2ae8: 03a05017 moveq r5, #23
2aec: 0a000077 beq 2cd0 <open+0x224>
/*
* See if the file exists.
*/
status = rtems_filesystem_evaluate_path(
2af0: e1a00006 mov r0, r6
2af4: eb0032ff bl f6f8 <strlen>
2af8: e28d7004 add r7, sp, #4
2afc: e1a01000 mov r1, r0
2b00: e1a02008 mov r2, r8
2b04: e1a00006 mov r0, r6
2b08: e3a08001 mov r8, #1
2b0c: e1a03007 mov r3, r7
2b10: e58d8000 str r8, [sp]
2b14: ebfffccf bl 1e58 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true );
if ( status == -1 ) {
2b18: e3700001 cmn r0, #1
2b1c: 1a00001f bne 2ba0 <open+0xf4>
if ( errno != ENOENT ) {
2b20: eb002eef bl e6e4 <__errno>
2b24: e5903000 ldr r3, [r0]
2b28: e3530002 cmp r3, #2
2b2c: 1a00000a bne 2b5c <open+0xb0>
rc = errno;
goto done;
}
/* If the file does not exist and we are not trying to create it--> error */
if ( !(flags & O_CREAT) ) {
2b30: e215ac02 ands sl, r5, #512 ; 0x200
2b34: 01a0700a moveq r7, sl
2b38: 01a05003 moveq r5, r3
2b3c: 0a000056 beq 2c9c <open+0x1f0>
rc = ENOENT;
goto done;
}
/* Create the node for the new regular file */
rc = mknod( pathname, S_IFREG | mode, 0LL );
2b40: e1a00006 mov r0, r6
2b44: e3891902 orr r1, r9, #32768 ; 0x8000
2b48: e3a02000 mov r2, #0
2b4c: e3a03000 mov r3, #0
2b50: ebfffdec bl 2308 <mknod>
if ( rc ) {
2b54: e250a000 subs sl, r0, #0
2b58: 0a000003 beq 2b6c <open+0xc0>
rc = errno;
2b5c: eb002ee0 bl e6e4 <__errno>
2b60: e3a07000 mov r7, #0
2b64: e5905000 ldr r5, [r0]
goto done;
2b68: ea000049 b 2c94 <open+0x1e8>
}
/* Sanity check to see if the file name exists after the mknod() */
status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true );
2b6c: e1a00006 mov r0, r6
2b70: eb0032e0 bl f6f8 <strlen>
2b74: e1a03007 mov r3, r7
2b78: e1a01000 mov r1, r0
2b7c: e1a0200a mov r2, sl
2b80: e1a00006 mov r0, r6
2b84: e58d8000 str r8, [sp]
2b88: ebfffcb2 bl 1e58 <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
2b8c: e3500000 cmp r0, #0
2b90: 11a0700a movne r7, sl
2b94: 13a0500d movne r5, #13
2b98: 1a00003f bne 2c9c <open+0x1f0>
2b9c: ea000003 b 2bb0 <open+0x104>
rc = EACCES;
goto done;
}
} else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
2ba0: e2053c0a and r3, r5, #2560 ; 0xa00
2ba4: e3530c0a cmp r3, #2560 ; 0xa00
2ba8: 03a05011 moveq r5, #17
2bac: 0a00003a beq 2c9c <open+0x1f0>
* 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;
2bb0: e28d701c add r7, sp, #28
2bb4: e5373018 ldr r3, [r7, #-24]!
2bb8: e5843038 str r3, [r4, #56] ; 0x38
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2bbc: e59d300c ldr r3, [sp, #12]
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
2bc0: e1a00005 mov r0, r5
/*
* Fill in the file control block based on the loc structure
* returned by successful path evaluation.
*/
iop->handlers = loc.handlers;
2bc4: e584303c str r3, [r4, #60] ; 0x3c
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
2bc8: e5948014 ldr r8, [r4, #20]
2bcc: eb001e92 bl a61c <rtems_libio_fcntl_flags>
2bd0: e180e008 orr lr, r0, r8
iop->pathinfo = loc;
2bd4: e8b7000f ldm r7!, {r0, r1, r2, r3}
2bd8: e284c018 add ip, r4, #24
2bdc: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !iop->handlers || !iop->handlers->open_h ) {
2be0: 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;
2be4: e5972000 ldr r2, [r7]
if ( !iop->handlers || !iop->handlers->open_h ) {
2be8: e3530000 cmp r3, #0
*/
iop->handlers = loc.handlers;
iop->file_info = loc.node_access;
iop->flags |= rtems_libio_fcntl_flags( flags );
iop->pathinfo = loc;
2bec: 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 );
2bf0: e584e014 str lr, [r4, #20]
iop->pathinfo = loc;
if ( !iop->handlers || !iop->handlers->open_h ) {
2bf4: 0a000041 beq 2d00 <open+0x254>
2bf8: e593c000 ldr ip, [r3]
2bfc: e35c0000 cmp ip, #0
2c00: 0a00003e beq 2d00 <open+0x254>
rc = ENOTSUP;
goto done;
}
rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
2c04: e1a01006 mov r1, r6
2c08: e1a03009 mov r3, r9
2c0c: e1a00004 mov r0, r4
2c10: e1a02005 mov r2, r5
2c14: e1a0e00f mov lr, pc
2c18: e12fff1c bx ip
if ( rc ) {
2c1c: e3500000 cmp r0, #0
2c20: 0a000003 beq 2c34 <open+0x188>
rc = errno;
2c24: eb002eae bl e6e4 <__errno>
2c28: e28d7004 add r7, sp, #4
2c2c: e5905000 ldr r5, [r0]
goto done;
2c30: ea000017 b 2c94 <open+0x1e8>
/*
* Optionally truncate the file.
*/
if ( (flags & O_TRUNC) == O_TRUNC ) {
2c34: e3150b01 tst r5, #1024 ; 0x400
2c38: 0a000028 beq 2ce0 <open+0x234>
rc = ftruncate( iop - rtems_libio_iops, 0 );
2c3c: e59f30c8 ldr r3, [pc, #200] ; 2d0c <open+0x260>
2c40: e5930000 ldr r0, [r3]
2c44: e0600004 rsb r0, r0, r4
2c48: e1a00340 asr r0, r0, #6
2c4c: e3a01000 mov r1, #0
2c50: e3a02000 mov r2, #0
2c54: eb001d90 bl a29c <ftruncate>
if ( rc ) {
2c58: e2505000 subs r5, r0, #0
2c5c: 0a00001f beq 2ce0 <open+0x234>
if(errno) rc = errno;
2c60: eb002e9f bl e6e4 <__errno> <== NOT EXECUTED
2c64: e5903000 ldr r3, [r0] <== NOT EXECUTED
2c68: e3530000 cmp r3, #0 <== NOT EXECUTED
2c6c: 0a000001 beq 2c78 <open+0x1cc> <== NOT EXECUTED
2c70: eb002e9b bl e6e4 <__errno> <== NOT EXECUTED
2c74: e5905000 ldr r5, [r0] <== NOT EXECUTED
close( iop - rtems_libio_iops );
2c78: e59f308c ldr r3, [pc, #140] ; 2d0c <open+0x260> <== NOT EXECUTED
2c7c: e5933000 ldr r3, [r3] <== NOT EXECUTED
2c80: e0634004 rsb r4, r3, r4 <== NOT EXECUTED
2c84: e1a00344 asr r0, r4, #6 <== NOT EXECUTED
2c88: eb001d5a bl a1f8 <close> <== NOT EXECUTED
2c8c: e3a04000 mov r4, #0 <== NOT EXECUTED
2c90: e1a07004 mov r7, r4 <== NOT EXECUTED
*/
done:
va_end(ap);
if ( rc ) {
2c94: e3550000 cmp r5, #0
2c98: 0a000010 beq 2ce0 <open+0x234>
if ( iop )
2c9c: e3540000 cmp r4, #0
rtems_libio_free( iop );
2ca0: 11a00004 movne r0, r4
2ca4: 1b001e18 blne a50c <rtems_libio_free>
if ( loc_to_free )
2ca8: e3570000 cmp r7, #0
2cac: 0a000007 beq 2cd0 <open+0x224>
rtems_filesystem_freenode( loc_to_free );
2cb0: e597300c ldr r3, [r7, #12]
2cb4: e3530000 cmp r3, #0
2cb8: 0a000004 beq 2cd0 <open+0x224>
2cbc: e593301c ldr r3, [r3, #28]
2cc0: e3530000 cmp r3, #0
2cc4: 11a00007 movne r0, r7
2cc8: 11a0e00f movne lr, pc
2ccc: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
2cd0: eb002e83 bl e6e4 <__errno>
2cd4: e5805000 str r5, [r0]
2cd8: e3e00000 mvn r0, #0
2cdc: ea000003 b 2cf0 <open+0x244>
}
return iop - rtems_libio_iops;
2ce0: e59f3024 ldr r3, [pc, #36] ; 2d0c <open+0x260>
2ce4: e5930000 ldr r0, [r3]
2ce8: e0604004 rsb r4, r0, r4
2cec: e1a00344 asr r0, r4, #6
}
2cf0: e28dd01c add sp, sp, #28
2cf4: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
2cf8: e28dd00c add sp, sp, #12
2cfc: e12fff1e bx lr
if ( loc_to_free )
rtems_filesystem_freenode( loc_to_free );
rtems_set_errno_and_return_minus_one( rc );
}
return iop - rtems_libio_iops;
2d00: e28d7004 add r7, sp, #4 <== NOT EXECUTED
2d04: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED
2d08: eaffffe3 b 2c9c <open+0x1f0> <== NOT EXECUTED
00002a48 <open_dev_console>:
int stderr_fd;
/*
* Attempt to open /dev/console.
*/
if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
2a48: e3a01000 mov r1, #0
/*
* This is a replaceable stub which opens the console, if present.
*/
void open_dev_console(void)
{
2a4c: 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) {
2a50: e59f0048 ldr r0, [pc, #72] ; 2aa0 <open_dev_console+0x58>
2a54: e1a02001 mov r2, r1
2a58: eb000013 bl 2aac <open>
2a5c: e3700001 cmn r0, #1
2a60: 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)
2a64: e59f0034 ldr r0, [pc, #52] ; 2aa0 <open_dev_console+0x58>
2a68: e3a01001 mov r1, #1
2a6c: e3a02000 mov r2, #0
2a70: eb00000d bl 2aac <open>
2a74: e3700001 cmn r0, #1
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
2a78: 059f0024 ldreq r0, [pc, #36] ; 2aa4 <open_dev_console+0x5c>
/*
* 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)
2a7c: 0a000006 beq 2a9c <open_dev_console+0x54>
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
2a80: e59f0018 ldr r0, [pc, #24] ; 2aa0 <open_dev_console+0x58>
2a84: e3a01001 mov r1, #1
2a88: e3a02000 mov r2, #0
2a8c: eb000006 bl 2aac <open>
2a90: e3700001 cmn r0, #1
2a94: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
2a98: e59f0008 ldr r0, [pc, #8] ; 2aa8 <open_dev_console+0x60> <== NOT EXECUTED
2a9c: eb000b42 bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
00003448 <oproc>:
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3448: e92d4011 push {r0, r4, lr}
int i;
if (tty->termios.c_oflag & OPOST) {
344c: e5913034 ldr r3, [r1, #52] ; 0x34
3450: e3130001 tst r3, #1
/*
* Handle output processing
*/
static void
oproc (unsigned char c, struct rtems_termios_tty *tty)
{
3454: e1a04001 mov r4, r1
3458: e5cd0000 strb r0, [sp]
int i;
if (tty->termios.c_oflag & OPOST) {
345c: 0a000047 beq 3580 <oproc+0x138>
switch (c) {
3460: e5dd2000 ldrb r2, [sp]
3464: e2421008 sub r1, r2, #8
3468: e3510005 cmp r1, #5
346c: 979ff101 ldrls pc, [pc, r1, lsl #2]
3470: ea00002e b 3530 <oproc+0xe8>
3474: 0000351c .word 0x0000351c
3478: 000034f0 .word 0x000034f0
347c: 0000348c .word 0x0000348c
3480: 00003530 .word 0x00003530
3484: 00003530 .word 0x00003530
3488: 000034b8 .word 0x000034b8
case '\n':
if (tty->termios.c_oflag & ONLRET)
348c: e3130020 tst r3, #32
tty->column = 0;
3490: 13a03000 movne r3, #0
3494: 15843028 strne r3, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
3498: e5943034 ldr r3, [r4, #52] ; 0x34
349c: e3130004 tst r3, #4
34a0: 0a000036 beq 3580 <oproc+0x138>
rtems_termios_puts ("\r", 1, tty);
34a4: e59f00e8 ldr r0, [pc, #232] ; 3594 <oproc+0x14c>
34a8: e3a01001 mov r1, #1
34ac: e1a02004 mov r2, r4
34b0: ebffffa3 bl 3344 <rtems_termios_puts>
34b4: ea00000b b 34e8 <oproc+0xa0>
tty->column = 0;
}
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
34b8: e3130010 tst r3, #16 <== NOT EXECUTED
34bc: 0a000002 beq 34cc <oproc+0x84> <== NOT EXECUTED
34c0: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED
34c4: e3520000 cmp r2, #0 <== NOT EXECUTED
34c8: 0a000030 beq 3590 <oproc+0x148> <== NOT EXECUTED
return;
if (tty->termios.c_oflag & OCRNL) {
34cc: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
tty->column = 0;
break;
}
tty->column = 0;
34d0: 05842028 streq r2, [r4, #40] ; 0x28 <== NOT EXECUTED
break;
case '\r':
if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
return;
if (tty->termios.c_oflag & OCRNL) {
34d4: 0a000029 beq 3580 <oproc+0x138> <== NOT EXECUTED
c = '\n';
if (tty->termios.c_oflag & ONLRET)
34d8: 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';
34dc: e3a0300a mov r3, #10 <== NOT EXECUTED
34e0: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
34e4: 0a000025 beq 3580 <oproc+0x138> <== NOT EXECUTED
tty->column = 0;
34e8: e3a03000 mov r3, #0
34ec: ea000022 b 357c <oproc+0x134>
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
34f0: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
34f4: e2033b06 and r3, r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
34f8: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
34fc: e3530b06 cmp r3, #6144 ; 0x1800
}
tty->column = 0;
break;
case '\t':
i = 8 - (tty->column & 7);
3500: e2611008 rsb r1, r1, #8
3504: e0813002 add r3, r1, r2
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
3508: 1a00001b bne 357c <oproc+0x134>
tty->column += i;
350c: e5843028 str r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
3510: e1a02004 mov r2, r4
3514: e59f007c ldr r0, [pc, #124] ; 3598 <oproc+0x150>
3518: ea00001b b 358c <oproc+0x144>
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
351c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
3520: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3524: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
}
tty->column += i;
break;
case '\b':
if (tty->column > 0)
3528: ca000013 bgt 357c <oproc+0x134> <== NOT EXECUTED
352c: ea000013 b 3580 <oproc+0x138> <== NOT EXECUTED
tty->column--;
break;
default:
if (tty->termios.c_oflag & OLCUC)
3530: e3130002 tst r3, #2
3534: 0a000007 beq 3558 <oproc+0x110>
c = toupper(c);
3538: e59f305c ldr r3, [pc, #92] ; 359c <oproc+0x154> <== NOT EXECUTED
353c: e5933000 ldr r3, [r3] <== NOT EXECUTED
3540: e0833002 add r3, r3, r2 <== NOT EXECUTED
3544: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED
3548: e2033003 and r3, r3, #3 <== NOT EXECUTED
354c: e3530002 cmp r3, #2 <== NOT EXECUTED
3550: 02422020 subeq r2, r2, #32 <== NOT EXECUTED
3554: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
3558: e59f303c ldr r3, [pc, #60] ; 359c <oproc+0x154>
355c: e5932000 ldr r2, [r3]
3560: e5dd3000 ldrb r3, [sp]
3564: e0823003 add r3, r2, r3
3568: e5d33001 ldrb r3, [r3, #1]
356c: e3130020 tst r3, #32
3570: 1a000002 bne 3580 <oproc+0x138>
tty->column++;
3574: e5943028 ldr r3, [r4, #40] ; 0x28
3578: e2833001 add r3, r3, #1
357c: e5843028 str r3, [r4, #40] ; 0x28
break;
}
}
rtems_termios_puts (&c, 1, tty);
3580: e1a02004 mov r2, r4
3584: e1a0000d mov r0, sp
3588: e3a01001 mov r1, #1
358c: ebffff6c bl 3344 <rtems_termios_puts>
}
3590: e8bd8018 pop {r3, r4, pc}
0000cf48 <pipe_create>:
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
cf48: e92d4070 push {r4, r5, r6, lr}
cf4c: 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)
cf50: e28d5004 add r5, sp, #4
cf54: e3a0c001 mov ip, #1
* Called by pipe() to create an anonymous pipe.
*/
int pipe_create(
int filsdes[2]
)
{
cf58: e1a04000 mov r4, 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)
cf5c: e3a01003 mov r1, #3
cf60: e59f0140 ldr r0, [pc, #320] ; d0a8 <pipe_create+0x160>
cf64: e3a02007 mov r2, #7
cf68: e1a03005 mov r3, r5
cf6c: e58dc000 str ip, [sp]
cf70: ebffd3b8 bl 1e58 <rtems_filesystem_evaluate_path>
cf74: e3500000 cmp r0, #0
cf78: 0a000009 beq cfa4 <pipe_create+0x5c>
!= 0) {
if (errno != ENOENT)
cf7c: eb0005d8 bl e6e4 <__errno>
cf80: e5903000 ldr r3, [r0]
cf84: e3530002 cmp r3, #2
cf88: 1a000043 bne d09c <pipe_create+0x154>
return -1;
if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
cf8c: e59f0114 ldr r0, [pc, #276] ; d0a8 <pipe_create+0x160>
cf90: e59f1114 ldr r1, [pc, #276] ; d0ac <pipe_create+0x164>
cf94: ebffd4d7 bl 22f8 <mkdir>
cf98: e3500000 cmp r0, #0
cf9c: 0a000008 beq cfc4 <pipe_create+0x7c>
cfa0: ea00003d b d09c <pipe_create+0x154> <== NOT EXECUTED
return -1;
}
else
rtems_filesystem_freenode(&loc);
cfa4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
cfa8: e3530000 cmp r3, #0 <== NOT EXECUTED
cfac: 0a000004 beq cfc4 <pipe_create+0x7c> <== NOT EXECUTED
cfb0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
cfb4: e3530000 cmp r3, #0 <== NOT EXECUTED
cfb8: 11a00005 movne r0, r5 <== NOT EXECUTED
cfbc: 11a0e00f movne lr, pc <== NOT EXECUTED
cfc0: 112fff13 bxne r3 <== NOT EXECUTED
/* /tmp/.fifoXXXX */
char fifopath[15];
memcpy(fifopath, "/tmp/.fifo", 10);
cfc4: e28d5018 add r5, sp, #24
cfc8: e59f10e0 ldr r1, [pc, #224] ; d0b0 <pipe_create+0x168>
cfcc: e3a0200a mov r2, #10
cfd0: e1a00005 mov r0, r5
cfd4: eb0007d0 bl ef1c <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
cfd8: e59f30d4 ldr r3, [pc, #212] ; d0b4 <pipe_create+0x16c>
cfdc: e1d3c0b0 ldrh ip, [r3]
cfe0: e1a0200c mov r2, ip
cfe4: e28cc001 add ip, ip, #1
cfe8: e59f10c8 ldr r1, [pc, #200] ; d0b8 <pipe_create+0x170>
cfec: e1c3c0b0 strh ip, [r3]
cff0: e285000a add r0, r5, #10
cff4: eb00086e bl f1b4 <sprintf>
/* Try creating FIFO file until find an available file name */
while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
cff8: e1a00005 mov r0, r5
cffc: e3a01d06 mov r1, #384 ; 0x180
d000: eb00019d bl d67c <mkfifo>
d004: e2506000 subs r6, r0, #0
d008: 0a000001 beq d014 <pipe_create+0xcc>
if (errno != EEXIST){
d00c: eb0005b4 bl e6e4 <__errno> <== NOT EXECUTED
d010: ea000021 b d09c <pipe_create+0x154> <== NOT EXECUTED
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);
d014: e1a00005 mov r0, r5
d018: e3a01901 mov r1, #16384 ; 0x4000
d01c: ebffd6a2 bl 2aac <open>
if (filsdes[0] < 0) {
d020: 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);
d024: e5840000 str r0, [r4]
if (filsdes[0] < 0) {
d028: aa000003 bge d03c <pipe_create+0xf4>
err = errno;
d02c: eb0005ac bl e6e4 <__errno>
d030: 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);
d034: e1a00005 mov r0, r5
d038: ea000014 b d090 <pipe_create+0x148>
}
else {
/* Reset open file to blocking mode */
iop = rtems_libio_iop(filsdes[0]);
d03c: e59f3078 ldr r3, [pc, #120] ; d0bc <pipe_create+0x174> <== NOT EXECUTED
d040: e5933000 ldr r3, [r3] <== NOT EXECUTED
d044: e1500003 cmp r0, r3 <== NOT EXECUTED
d048: 359f3070 ldrcc r3, [pc, #112] ; d0c0 <pipe_create+0x178> <== NOT EXECUTED
d04c: 35936000 ldrcc r6, [r3] <== NOT EXECUTED
d050: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
d054: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED
d058: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
d05c: e5863014 str r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
d060: e28d0018 add r0, sp, #24 <== NOT EXECUTED
d064: e3a01001 mov r1, #1 <== NOT EXECUTED
d068: ebffd68f bl 2aac <open> <== NOT EXECUTED
if (filsdes[1] < 0) {
d06c: 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);
d070: e5840004 str r0, [r4, #4] <== NOT EXECUTED
if (filsdes[1] < 0) {
d074: a3a06000 movge r6, #0 <== NOT EXECUTED
d078: aa000003 bge d08c <pipe_create+0x144> <== NOT EXECUTED
err = errno;
d07c: eb000598 bl e6e4 <__errno> <== NOT EXECUTED
d080: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
d084: e5940000 ldr r0, [r4] <== NOT EXECUTED
d088: ebfff45a bl a1f8 <close> <== NOT EXECUTED
}
unlink(fifopath);
d08c: e28d0018 add r0, sp, #24 <== NOT EXECUTED
d090: eb00017d bl d68c <unlink>
}
rtems_set_errno_and_return_minus_one(err);
d094: eb000592 bl e6e4 <__errno>
d098: e5806000 str r6, [r0]
}
d09c: e3e00000 mvn r0, #0
d0a0: e28dd028 add sp, sp, #40 ; 0x28
d0a4: e8bd8070 pop {r4, r5, r6, pc}
00008c78 <pipe_free>:
/* Called with rtems_pipe_semaphore held. */
static inline void pipe_free(
pipe_control_t *pipe
)
{
8c78: e92d4010 push {r4, lr} <== NOT EXECUTED
8c7c: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
8c80: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED
8c84: eb000921 bl b110 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
8c88: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8c8c: eb00091f bl b110 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
8c90: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8c94: ebfff119 bl 5100 <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
8c98: e5940000 ldr r0, [r4] <== NOT EXECUTED
8c9c: ebffe48b bl 1ed0 <free> <== NOT EXECUTED
free(pipe);
8ca0: e1a00004 mov r0, r4 <== NOT EXECUTED
}
8ca4: e8bd4010 pop {r4, lr} <== NOT EXECUTED
{
rtems_barrier_delete(pipe->readBarrier);
rtems_barrier_delete(pipe->writeBarrier);
rtems_semaphore_delete(pipe->Semaphore);
free(pipe->Buffer);
free(pipe);
8ca8: eaffe488 b 1ed0 <free> <== NOT EXECUTED
00008904 <pipe_ioctl>:
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
if (cmd == FIONREAD) {
8904: e59f3054 ldr r3, [pc, #84] ; 8960 <pipe_ioctl+0x5c> <== NOT EXECUTED
8908: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe,
uint32_t cmd,
void *buffer,
rtems_libio_t *iop
)
{
890c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
8910: e1a04000 mov r4, r0 <== NOT EXECUTED
8914: e1a05002 mov r5, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
8918: 13e00015 mvnne r0, #21 <== NOT EXECUTED
891c: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
if (buffer == NULL)
8920: e3520000 cmp r2, #0 <== NOT EXECUTED
8924: 03e0000d mvneq r0, #13 <== NOT EXECUTED
8928: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return -EFAULT;
if (! PIPE_LOCK(pipe))
892c: e3a01000 mov r1, #0 <== NOT EXECUTED
8930: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8934: e1a02001 mov r2, r1 <== NOT EXECUTED
8938: ebfff217 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
893c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
8940: 13e00003 mvnne r0, #3 <== NOT EXECUTED
8944: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
8948: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
894c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
/* Return length of pipe */
*(unsigned int *)buffer = pipe->Length;
8950: e5853000 str r3, [r5] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8954: ebfff256 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
8958: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
}
return -EINVAL;
}
895c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000889c <pipe_lseek>:
rtems_libio_t *iop
)
{
/* Seek on pipe is not supported */
return -ESPIPE;
}
889c: e3e0001c mvn r0, #28 <== NOT EXECUTED
88a0: e12fff1e bx lr <== NOT EXECUTED
00008964 <pipe_read>:
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8964: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
8968: e1a09001 mov r9, r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
896c: e3a01000 mov r1, #0 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8970: e1a04000 mov r4, r0 <== NOT EXECUTED
8974: e1a05002 mov r5, r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
8978: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
897c: e1a02001 mov r2, r1 <== NOT EXECUTED
pipe_control_t *pipe,
void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8980: e1a0a003 mov sl, r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
8984: ebfff204 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
8988: e2506000 subs r6, r0, #0 <== NOT EXECUTED
898c: 13e06003 mvnne r6, #3 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
if (pipe->waitingWriters > 0)
PIPE_WAKEUPWRITERS(pipe);
8990: 01a0b00d moveq fp, sp <== NOT EXECUTED
rtems_libio_t *iop
)
{
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
8994: 0a000045 beq 8ab0 <pipe_read+0x14c> <== NOT EXECUTED
8998: ea00004b b 8acc <pipe_read+0x168> <== NOT EXECUTED
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
/* Not an error */
if (pipe->Writers == 0)
899c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
89a0: e3530000 cmp r3, #0 <== NOT EXECUTED
89a4: 0a000043 beq 8ab8 <pipe_read+0x154> <== NOT EXECUTED
goto out_locked;
if (LIBIO_NODELAY(iop)) {
89a8: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED
89ac: e2177001 ands r7, r7, #1 <== NOT EXECUTED
89b0: 13e0700a mvnne r7, #10 <== NOT EXECUTED
89b4: 1a000040 bne 8abc <pipe_read+0x158> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until pipe is no more empty or no writer exists */
pipe->waitingReaders ++;
89b8: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
89bc: e2833001 add r3, r3, #1 <== NOT EXECUTED
89c0: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
89c4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
89c8: ebfff239 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
89cc: e1a01007 mov r1, r7 <== NOT EXECUTED
89d0: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
89d4: eb0009fb bl b1c8 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
89d8: e1a01007 mov r1, r7 <== NOT EXECUTED
89dc: 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))
89e0: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
89e4: 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))
89e8: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
89ec: ebfff1ea bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
89f0: e3500000 cmp r0, #0 <== NOT EXECUTED
89f4: 13e07003 mvnne r7, #3 <== NOT EXECUTED
89f8: 1a000031 bne 8ac4 <pipe_read+0x160> <== NOT EXECUTED
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
89fc: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
8a00: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingReaders not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingReaders --;
8a04: e2433001 sub r3, r3, #1 <== NOT EXECUTED
8a08: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
8a0c: 1a00002a bne 8abc <pipe_read+0x158> <== NOT EXECUTED
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
while (PIPE_EMPTY(pipe)) {
8a10: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
8a14: e3520000 cmp r2, #0 <== NOT EXECUTED
8a18: 0affffdf beq 899c <pipe_read+0x38> <== NOT EXECUTED
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
8a1c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
8a20: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED
if (ret != 0)
goto out_locked;
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
8a24: e0667005 rsb r7, r6, r5 <== NOT EXECUTED
8a28: e1520007 cmp r2, r7 <== NOT EXECUTED
8a2c: 31a07002 movcc r7, r2 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
8a30: e0638008 rsb r8, r3, r8 <== NOT EXECUTED
8a34: e5941000 ldr r1, [r4] <== NOT EXECUTED
if (chunk > chunk1) {
8a38: e1570008 cmp r7, r8 <== NOT EXECUTED
8a3c: e0890006 add r0, r9, r6 <== 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);
8a40: d0811003 addle r1, r1, r3 <== NOT EXECUTED
8a44: d1a02007 movle r2, r7 <== NOT EXECUTED
}
/* Read chunk bytes */
chunk = MIN(count - read, pipe->Length);
chunk1 = pipe->Size - pipe->Start;
if (chunk > chunk1) {
8a48: da000006 ble 8a68 <pipe_read+0x104> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
8a4c: e0811003 add r1, r1, r3 <== NOT EXECUTED
8a50: e1a02008 mov r2, r8 <== NOT EXECUTED
8a54: eb001930 bl ef1c <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
8a58: e0860008 add r0, r6, r8 <== NOT EXECUTED
8a5c: e5941000 ldr r1, [r4] <== NOT EXECUTED
8a60: e0890000 add r0, r9, r0 <== NOT EXECUTED
8a64: e0682007 rsb r2, r8, r7 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
8a68: eb00192b bl ef1c <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
8a6c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
8a70: e0870000 add r0, r7, r0 <== NOT EXECUTED
8a74: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
8a78: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
8a7c: eb003d36 bl 17f5c <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
8a80: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
8a84: e0673003 rsb r3, r7, r3 <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
8a88: e3530000 cmp r3, #0 <== NOT EXECUTED
}
else
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
pipe->Start += chunk;
pipe->Start %= pipe->Size;
8a8c: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
8a90: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */
if (PIPE_EMPTY(pipe))
pipe->Start = 0;
8a94: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
if (pipe->waitingWriters > 0)
8a98: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
8a9c: e3530000 cmp r3, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
8aa0: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8aa4: 11a0100d movne r1, sp <== NOT EXECUTED
8aa8: 1b0009b0 blne b170 <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
8aac: e0866007 add r6, r6, r7 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0;
if (! PIPE_LOCK(pipe))
return -EINTR;
while (read < count) {
8ab0: e1560005 cmp r6, r5 <== NOT EXECUTED
8ab4: 3affffd5 bcc 8a10 <pipe_read+0xac> <== NOT EXECUTED
8ab8: e3a07000 mov r7, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
read += chunk;
}
out_locked:
PIPE_UNLOCK(pipe);
8abc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8ac0: ebfff1fb bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
if (read > 0)
8ac4: e3560000 cmp r6, #0 <== NOT EXECUTED
8ac8: d1a06007 movle r6, r7 <== NOT EXECUTED
return read;
return ret;
}
8acc: e1a00006 mov r0, r6 <== NOT EXECUTED
8ad0: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00008cac <pipe_release>:
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8cac: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
8cb0: e5904000 ldr r4, [r0] <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8cb4: e1a05001 mov r5, r1 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
8cb8: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
int pipe_release(
pipe_control_t **pipep,
rtems_libio_t *iop
)
{
8cbc: e1a06000 mov r6, r0 <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
uint32_t mode;
rtems_status_code sc;
sc = rtems_semaphore_obtain(pipe->Semaphore,
8cc0: e1a02001 mov r2, r1 <== NOT EXECUTED
8cc4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8cc8: ebfff133 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not released! */
if(sc != RTEMS_SUCCESSFUL)
8ccc: e3500000 cmp r0, #0 <== NOT EXECUTED
8cd0: 1a000010 bne 8d18 <pipe_release+0x6c> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
mode = LIBIO_ACCMODE(iop);
8cd4: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
8cd8: e3150002 tst r5, #2 <== NOT EXECUTED
pipe->Readers --;
8cdc: 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);
8ce0: e2055006 and r5, r5, #6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
pipe->Readers --;
8ce4: 12433001 subne r3, r3, #1 <== NOT EXECUTED
8ce8: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
8cec: e3150004 tst r5, #4 <== NOT EXECUTED
pipe->Writers --;
8cf0: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED
8cf4: 12433001 subne r3, r3, #1 <== NOT EXECUTED
8cf8: 15843014 strne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
8cfc: e59f30a0 ldr r3, [pc, #160] ; 8da4 <pipe_release+0xf8> <== NOT EXECUTED
8d00: e3a01000 mov r1, #0 <== NOT EXECUTED
8d04: e5930000 ldr r0, [r3] <== NOT EXECUTED
8d08: e1a02001 mov r2, r1 <== NOT EXECUTED
8d0c: ebfff122 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
/* WARN pipe not freed and pipep not set to NULL! */
if(sc != RTEMS_SUCCESSFUL)
8d10: e3500000 cmp r0, #0 <== NOT EXECUTED
8d14: 0a000000 beq 8d1c <pipe_release+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
8d18: ebfff2a3 bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8d1c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8d20: ebfff163 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
8d24: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
8d28: e3530000 cmp r3, #0 <== NOT EXECUTED
8d2c: 1a000006 bne 8d4c <pipe_release+0xa0> <== NOT EXECUTED
8d30: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED
8d34: e3570000 cmp r7, #0 <== NOT EXECUTED
8d38: 1a000003 bne 8d4c <pipe_release+0xa0> <== NOT EXECUTED
#if 0
/* To delete an anonymous pipe file when all users closed it */
if (pipe->Anonymous)
delfile = TRUE;
#endif
pipe_free(pipe);
8d3c: e1a00004 mov r0, r4 <== NOT EXECUTED
8d40: ebffffcc bl 8c78 <pipe_free> <== NOT EXECUTED
*pipep = NULL;
8d44: e5867000 str r7, [r6] <== NOT EXECUTED
if(sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred(sc);
PIPE_UNLOCK(pipe);
if (pipe->Readers == 0 && pipe->Writers == 0) {
8d48: ea000010 b 8d90 <pipe_release+0xe4> <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
8d4c: e2552004 subs r2, r5, #4 <== NOT EXECUTED
8d50: 13a02001 movne r2, #1 <== NOT EXECUTED
8d54: e3530000 cmp r3, #0 <== NOT EXECUTED
8d58: 13a02000 movne r2, #0 <== NOT EXECUTED
8d5c: e3520000 cmp r2, #0 <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
8d60: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED
delfile = TRUE;
#endif
pipe_free(pipe);
*pipep = NULL;
}
else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
8d64: 1a000007 bne 8d88 <pipe_release+0xdc> <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */
PIPE_WAKEUPWRITERS(pipe);
else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ)
8d68: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED
8d6c: e2553002 subs r3, r5, #2 <== NOT EXECUTED
8d70: 13a03001 movne r3, #1 <== NOT EXECUTED
8d74: e3520000 cmp r2, #0 <== NOT EXECUTED
8d78: 13a03000 movne r3, #0 <== NOT EXECUTED
8d7c: e3530000 cmp r3, #0 <== NOT EXECUTED
8d80: 0a000002 beq 8d90 <pipe_release+0xe4> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
8d84: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8d88: e1a0100d mov r1, sp <== NOT EXECUTED
8d8c: eb0008f7 bl b170 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
8d90: e59f300c ldr r3, [pc, #12] ; 8da4 <pipe_release+0xf8> <== NOT EXECUTED
8d94: e5930000 ldr r0, [r3] <== NOT EXECUTED
8d98: ebfff145 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo))
return -errno;
#endif
return 0;
}
8d9c: e3a00000 mov r0, #0 <== NOT EXECUTED
8da0: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
00008ad4 <pipe_write>:
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8ad4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
8ad8: e2525000 subs r5, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe,
const void *buffer,
size_t count,
rtems_libio_t *iop
)
{
8adc: e1a04000 mov r4, r0 <== NOT EXECUTED
8ae0: e1a0b001 mov fp, r1 <== NOT EXECUTED
8ae4: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0;
/* Write nothing */
if (count == 0)
8ae8: 01a06005 moveq r6, r5 <== NOT EXECUTED
8aec: 0a00005f beq 8c70 <pipe_write+0x19c> <== NOT EXECUTED
return 0;
if (! PIPE_LOCK(pipe))
8af0: e3a01000 mov r1, #0 <== NOT EXECUTED
8af4: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
8af8: e1a02001 mov r2, r1 <== NOT EXECUTED
8afc: ebfff1a6 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
8b00: e3500000 cmp r0, #0 <== NOT EXECUTED
8b04: 13e06003 mvnne r6, #3 <== NOT EXECUTED
8b08: 1a000058 bne 8c70 <pipe_write+0x19c> <== NOT EXECUTED
return -EINTR;
if (pipe->Readers == 0) {
8b0c: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED
8b10: e3560000 cmp r6, #0 <== NOT EXECUTED
8b14: 0a000022 beq 8ba4 <pipe_write+0xd0> <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
8b18: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED
8b1c: e1550009 cmp r5, r9 <== NOT EXECUTED
8b20: 91a09005 movls r9, r5 <== NOT EXECUTED
8b24: 83a09001 movhi r9, #1 <== NOT EXECUTED
8b28: e1a06000 mov r6, r0 <== NOT EXECUTED
8b2c: ea000043 b 8c40 <pipe_write+0x16c> <== NOT EXECUTED
while (written < count) {
while (PIPE_SPACE(pipe) < chunk) {
if (LIBIO_NODELAY(iop)) {
8b30: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED
8b34: e2177001 ands r7, r7, #1 <== NOT EXECUTED
8b38: 13e0700a mvnne r7, #10 <== NOT EXECUTED
8b3c: 1a000042 bne 8c4c <pipe_write+0x178> <== NOT EXECUTED
ret = -EAGAIN;
goto out_locked;
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
8b40: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
8b44: e2833001 add r3, r3, #1 <== NOT EXECUTED
8b48: e584301c str r3, [r4, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
8b4c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8b50: ebfff1d7 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
8b54: e1a01007 mov r1, r7 <== NOT EXECUTED
8b58: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED
8b5c: eb000999 bl b1c8 <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8b60: e1a01007 mov r1, r7 <== NOT EXECUTED
8b64: 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))
8b68: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8b6c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
}
/* Wait until there is chunk bytes space or no reader exists */
pipe->waitingWriters ++;
PIPE_UNLOCK(pipe);
if (! PIPE_WRITEWAIT(pipe))
8b70: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR;
if (! PIPE_LOCK(pipe)) {
8b74: ebfff188 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
8b78: e3500000 cmp r0, #0 <== NOT EXECUTED
8b7c: 13e07003 mvnne r7, #3 <== NOT EXECUTED
8b80: 1a000038 bne 8c68 <pipe_write+0x194> <== NOT EXECUTED
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
8b84: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
8b88: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) {
/* WARN waitingWriters not restored! */
ret = -EINTR;
goto out_nolock;
}
pipe->waitingWriters --;
8b8c: e2433001 sub r3, r3, #1 <== NOT EXECUTED
8b90: e584301c str r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
8b94: 1a00002c bne 8c4c <pipe_write+0x178> <== NOT EXECUTED
goto out_locked;
if (pipe->Readers == 0) {
8b98: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
8b9c: e3530000 cmp r3, #0 <== NOT EXECUTED
8ba0: 1a000001 bne 8bac <pipe_write+0xd8> <== NOT EXECUTED
8ba4: e3e0701f mvn r7, #31 <== NOT EXECUTED
8ba8: ea000027 b 8c4c <pipe_write+0x178> <== 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) {
8bac: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED
8bb0: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
8bb4: e062300a rsb r3, r2, sl <== NOT EXECUTED
8bb8: e1530009 cmp r3, r9 <== NOT EXECUTED
8bbc: 3affffdb bcc 8b30 <pipe_write+0x5c> <== NOT EXECUTED
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
8bc0: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
8bc4: e1a0100a mov r1, sl <== NOT EXECUTED
8bc8: e0820000 add r0, r2, r0 <== NOT EXECUTED
ret = -EPIPE;
goto out_locked;
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
8bcc: e0667005 rsb r7, r6, r5 <== NOT EXECUTED
8bd0: e1530007 cmp r3, r7 <== NOT EXECUTED
8bd4: 31a07003 movcc r7, r3 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
8bd8: eb003cdf bl 17f5c <__umodsi3> <== NOT EXECUTED
8bdc: e5943000 ldr r3, [r4] <== NOT EXECUTED
8be0: e060a00a rsb sl, r0, sl <== NOT EXECUTED
if (chunk > chunk1) {
8be4: e157000a cmp r7, sl <== NOT EXECUTED
8be8: e08b1006 add r1, fp, r6 <== NOT EXECUTED
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);
8bec: d0830000 addle r0, r3, r0 <== NOT EXECUTED
8bf0: d1a02007 movle r2, r7 <== NOT EXECUTED
}
}
chunk = MIN(count - written, PIPE_SPACE(pipe));
chunk1 = pipe->Size - PIPE_WSTART(pipe);
if (chunk > chunk1) {
8bf4: da000006 ble 8c14 <pipe_write+0x140> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
8bf8: e1a0200a mov r2, sl <== NOT EXECUTED
8bfc: e0830000 add r0, r3, r0 <== NOT EXECUTED
8c00: eb0018c5 bl ef1c <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
8c04: e08a1006 add r1, sl, r6 <== NOT EXECUTED
8c08: e5940000 ldr r0, [r4] <== NOT EXECUTED
8c0c: e08b1001 add r1, fp, r1 <== NOT EXECUTED
8c10: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
8c14: eb0018c0 bl ef1c <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
8c18: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
8c1c: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
8c20: e0833007 add r3, r3, r7 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
8c24: e3520000 cmp r2, #0 <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
}
else
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
pipe->Length += chunk;
8c28: e584300c str r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
PIPE_WAKEUPREADERS(pipe);
8c2c: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED
8c30: 11a0100d movne r1, sp <== NOT EXECUTED
8c34: 1b00094d blne b170 <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
8c38: e0866007 add r6, r6, r7 <== NOT EXECUTED
8c3c: e3a09001 mov r9, #1 <== NOT EXECUTED
}
/* Write of PIPE_BUF bytes or less shall not be interleaved */
chunk = count <= pipe->Size ? count : 1;
while (written < count) {
8c40: e1560005 cmp r6, r5 <== NOT EXECUTED
8c44: 3affffd8 bcc 8bac <pipe_write+0xd8> <== NOT EXECUTED
8c48: e3a07000 mov r7, #0 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */
chunk = 1;
}
out_locked:
PIPE_UNLOCK(pipe);
8c4c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
8c50: ebfff197 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock:
#ifdef RTEMS_POSIX_API
/* Signal SIGPIPE */
if (ret == -EPIPE)
8c54: e3770020 cmn r7, #32 <== NOT EXECUTED
8c58: 1a000002 bne 8c68 <pipe_write+0x194> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
8c5c: eb0005d4 bl a3b4 <getpid> <== NOT EXECUTED
8c60: e3a0100d mov r1, #13 <== NOT EXECUTED
8c64: eb000748 bl a98c <kill> <== NOT EXECUTED
#endif
if (written > 0)
8c68: e3560000 cmp r6, #0 <== NOT EXECUTED
8c6c: d1a06007 movle r6, r7 <== NOT EXECUTED
return written;
return ret;
}
8c70: e1a00006 mov r0, r6 <== NOT EXECUTED
8c74: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000e060 <pthread_kill>:
int pthread_kill(
pthread_t thread,
int sig
)
{
e060: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr}
POSIX_API_Control *api;
Thread_Control *the_thread;
Objects_Locations location;
if ( !sig )
e064: e2517000 subs r7, r1, #0
e068: 0a000002 beq e078 <pthread_kill+0x18>
static inline bool is_valid_signo(
int signo
)
{
return ((signo) >= 1 && (signo) <= 32 );
e06c: e2478001 sub r8, r7, #1
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !is_valid_signo(sig) )
e070: e358001f cmp r8, #31
e074: 9a000002 bls e084 <pthread_kill+0x24>
rtems_set_errno_and_return_minus_one( EINVAL );
e078: eb000199 bl e6e4 <__errno>
e07c: e3a03016 mov r3, #22
e080: ea000025 b e11c <pthread_kill+0xbc>
the_thread = _Thread_Get( thread, &location );
e084: e1a0100d mov r1, sp
e088: ebffe430 bl 7150 <_Thread_Get>
switch ( location ) {
e08c: e59d6000 ldr r6, [sp]
e090: e3560000 cmp r6, #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 );
e094: e1a05000 mov r5, r0
switch ( location ) {
e098: 1a00001d bne e114 <pthread_kill+0xb4>
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
e09c: e59f2084 ldr r2, [pc, #132] ; e128 <pthread_kill+0xc8>
e0a0: e3a0100c mov r1, #12
e0a4: e0232791 mla r3, r1, r7, r2
e0a8: e5933008 ldr r3, [r3, #8]
e0ac: e3530001 cmp r3, #1
case OBJECTS_LOCAL:
/*
* If sig == 0 then just validate arguments
*/
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
e0b0: e5903108 ldr r3, [r0, #264] ; 0x108
if ( sig ) {
if ( _POSIX_signals_Vectors[ sig ].sa_handler == SIG_IGN ) {
e0b4: 1a000002 bne e0c4 <pthread_kill+0x64>
_Thread_Enable_dispatch();
e0b8: ebffe41b bl 712c <_Thread_Enable_dispatch> <== NOT EXECUTED
e0bc: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
e0c0: ea000017 b e124 <pthread_kill+0xc4> <== NOT EXECUTED
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
e0c4: e59320d0 ldr r2, [r3, #208] ; 0xd0
e0c8: e3a04001 mov r4, #1
e0cc: e1828814 orr r8, r2, r4, lsl r8
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
e0d0: e1a01007 mov r1, r7
return 0;
}
/* XXX critical section */
api->signals_pending |= signo_to_mask( sig );
e0d4: e58380d0 str r8, [r3, #208] ; 0xd0
(void) _POSIX_signals_Unblock_thread( the_thread, sig, NULL );
e0d8: e1a02006 mov r2, r6
e0dc: ebffff54 bl de34 <_POSIX_signals_Unblock_thread>
the_thread->do_post_task_switch_extension = true;
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
e0e0: e59f3044 ldr r3, [pc, #68] ; e12c <pthread_kill+0xcc>
e0e4: e5933000 ldr r3, [r3]
e0e8: 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;
e0ec: e5c54074 strb r4, [r5, #116] ; 0x74
if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) )
e0f0: 0a000004 beq e108 <pthread_kill+0xa8>
e0f4: e59f3034 ldr r3, [pc, #52] ; e130 <pthread_kill+0xd0>
e0f8: e5933000 ldr r3, [r3]
e0fc: e1550003 cmp r5, r3
_ISR_Signals_to_thread_executing = true;
e100: 059f302c ldreq r3, [pc, #44] ; e134 <pthread_kill+0xd4>
e104: 05c34000 strbeq r4, [r3]
}
_Thread_Enable_dispatch();
e108: ebffe407 bl 712c <_Thread_Enable_dispatch>
e10c: e3a00000 mov r0, #0
return 0;
e110: ea000003 b e124 <pthread_kill+0xc4>
#endif
case OBJECTS_ERROR:
break;
}
rtems_set_errno_and_return_minus_one( ESRCH );
e114: eb000172 bl e6e4 <__errno> <== NOT EXECUTED
e118: e3a03003 mov r3, #3 <== NOT EXECUTED
e11c: e5803000 str r3, [r0]
e120: e3e00000 mvn r0, #0
}
e124: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc}
00009b94 <ramdisk_allocate>:
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
9b94: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
9b98: e1a04000 mov r4, r0
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
9b9c: e3a00010 mov r0, #16
void *area_begin,
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
9ba0: e1a05001 mov r5, r1
9ba4: e1a08002 mov r8, r2
9ba8: e203a0ff and sl, r3, #255 ; 0xff
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
9bac: ebffe54e bl 30ec <malloc>
if (rd == NULL) {
9bb0: e3500000 cmp r0, #0
uint32_t block_size,
rtems_blkdev_bnum block_count,
bool trace
)
{
struct ramdisk *rd = malloc(sizeof(struct ramdisk));
9bb4: e1a07000 mov r7, r0
9bb8: e1a06000 mov r6, r0
if (rd == NULL) {
9bbc: 0a000012 beq 9c0c <ramdisk_allocate+0x78>
return NULL;
}
if (area_begin == NULL) {
9bc0: e3540000 cmp r4, #0
return NULL;
}
rd->malloced = true;
} else {
rd->malloced = false;
9bc4: 13a03000 movne r3, #0
if (rd == NULL) {
return NULL;
}
if (area_begin == NULL) {
9bc8: 1a000009 bne 9bf4 <ramdisk_allocate+0x60>
area_begin = calloc(block_count, block_size);
9bcc: e1a00008 mov r0, r8
9bd0: e1a01005 mov r1, r5
9bd4: ebffe3f0 bl 2b9c <calloc>
if (area_begin == NULL) {
9bd8: e2504000 subs r4, r0, #0
free(rd);
return NULL;
}
rd->malloced = true;
9bdc: 13a03001 movne r3, #1
return NULL;
}
if (area_begin == NULL) {
area_begin = calloc(block_count, block_size);
if (area_begin == NULL) {
9be0: 1a000003 bne 9bf4 <ramdisk_allocate+0x60>
free(rd);
9be4: e1a00007 mov r0, r7 <== NOT EXECUTED
9be8: ebffe473 bl 2dbc <free> <== NOT EXECUTED
9bec: e1a07004 mov r7, r4 <== NOT EXECUTED
return NULL;
9bf0: ea000005 b 9c0c <ramdisk_allocate+0x78> <== NOT EXECUTED
}
rd->malloced = true;
} else {
rd->malloced = false;
9bf4: e5c6300d strb r3, [r6, #13]
}
rd->block_size = block_size;
rd->block_num = block_count;
rd->area = area_begin;
rd->trace = trace;
rd->initialized = true;
9bf8: e3a03001 mov r3, #1
9bfc: e5c6300c strb r3, [r6, #12]
}
rd->malloced = true;
} else {
rd->malloced = false;
}
rd->block_size = block_size;
9c00: e8860120 stm r6, {r5, r8}
rd->block_num = block_count;
rd->area = area_begin;
9c04: e5864008 str r4, [r6, #8]
rd->trace = trace;
9c08: e5c6a00e strb sl, [r6, #14]
rd->initialized = true;
return rd;
}
9c0c: e1a00007 mov r0, r7
9c10: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
0001dfa8 <ramdisk_initialize>:
rtems_device_driver
ramdisk_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor __attribute__((unused)),
void *arg __attribute__((unused)))
{
1dfa8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1dfac: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED
1dfb0: e58d0014 str r0, [sp, #20] <== 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();
1dfb4: ebffa041 bl 60c0 <rtems_disk_io_initialize> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
1dfb8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1dfbc: 1a00003d bne 1e0b8 <ramdisk_initialize+0x110> <== 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));
1dfc0: e59fa0fc ldr sl, [pc, #252] ; 1e0c4 <ramdisk_initialize+0x11c><== NOT EXECUTED
1dfc4: e3a01010 mov r1, #16 <== NOT EXECUTED
1dfc8: e59a0000 ldr r0, [sl] <== NOT EXECUTED
1dfcc: ebffa448 bl 70f4 <calloc> <== NOT EXECUTED
r->trace = false;
1dfd0: e59f50f0 ldr r5, [pc, #240] ; 1e0c8 <ramdisk_initialize+0x120><== 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));
1dfd4: e1a04000 mov r4, r0 <== NOT EXECUTED
r->trace = false;
1dfd8: e5c0700e strb r7, [r0, #14] <== NOT EXECUTED
1dfdc: e1a06007 mov r6, r7 <== 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";
1dfe0: e28d9018 add r9, sp, #24 <== NOT EXECUTED
}
}
else
{
r->malloced = false;
r->initialized = true;
1dfe4: e3a08001 mov r8, #1 <== 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++)
1dfe8: ea00002f b 1e0ac <ramdisk_initialize+0x104> <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
1dfec: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
temp.__overlay.minor = _minor;
1dff0: e58d6028 str r6, [sp, #40] ; 0x28 <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
1dff4: e58d3024 str r3, [sp, #36] ; 0x24 <== NOT EXECUTED
temp.__overlay.minor = _minor;
return temp.device;
1dff8: e28dc024 add ip, sp, #36 ; 0x24 <== NOT EXECUTED
1dffc: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
{
dev_t dev = rtems_filesystem_make_dev_t(major, i);
char name [] = RAMDISK_DEVICE_BASE_NAME "a";
1e000: e59f10c4 ldr r1, [pc, #196] ; 1e0cc <ramdisk_initialize+0x124><== NOT EXECUTED
1e004: e3a02009 mov r2, #9 <== NOT EXECUTED
1e008: e1a00009 mov r0, r9 <== NOT EXECUTED
1e00c: e58db00c str fp, [sp, #12] <== NOT EXECUTED
1e010: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
1e014: eb008d9b bl 41688 <memcpy> <== 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)
1e018: e5953000 ldr r3, [r5] <== 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;
1e01c: e5dd1020 ldrb r1, [sp, #32] <== NOT EXECUTED
r->block_size = c->block_size;
r->block_num = c->block_num;
if (c->location == NULL)
1e020: e3530000 cmp r3, #0 <== 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;
1e024: e9150005 ldmdb r5, {r0, r2} <== 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;
1e028: e0861001 add r1, r6, r1 <== NOT EXECUTED
r->initialized = true;
}
}
else
{
r->malloced = false;
1e02c: 13a0c000 movne ip, #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;
1e030: e5cd1020 strb r1, [sp, #32] <== NOT EXECUTED
r->block_size = c->block_size;
1e034: e8840005 stm r4, {r0, r2} <== NOT EXECUTED
}
else
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
1e038: 15843008 strne r3, [r4, #8] <== NOT EXECUTED
r->initialized = true;
}
}
else
{
r->malloced = false;
1e03c: 15c4c00d strbne ip, [r4, #13] <== NOT EXECUTED
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;
r->block_num = c->block_num;
if (c->location == NULL)
1e040: 1a000006 bne 1e060 <ramdisk_initialize+0xb8> <== NOT EXECUTED
{
r->malloced = true;
r->area = malloc(r->block_size * r->block_num);
1e044: e0000092 mul r0, r2, r0 <== 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;
1e048: e5c4800d strb r8, [r4, #13] <== NOT EXECUTED
r->area = malloc(r->block_size * r->block_num);
1e04c: ebffa73f bl 7d50 <malloc> <== NOT EXECUTED
if (r->area == NULL) /* No enough memory for this disk */
1e050: 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);
1e054: e5840008 str r0, [r4, #8] <== NOT EXECUTED
if (r->area == NULL) /* No enough memory for this disk */
{
r->initialized = false;
1e058: 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 */
1e05c: 0a00000f beq 1e0a0 <ramdisk_initialize+0xf8> <== NOT EXECUTED
{
r->malloced = false;
r->initialized = true;
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
1e060: e59fb068 ldr fp, [pc, #104] ; 1e0d0 <ramdisk_initialize+0x128><== NOT EXECUTED
1e064: e28d100c add r1, sp, #12 <== NOT EXECUTED
1e068: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
1e06c: e915000c ldmdb r5, {r2, r3} <== NOT EXECUTED
}
}
else
{
r->malloced = false;
r->initialized = true;
1e070: e5c4800c strb r8, [r4, #12] <== NOT EXECUTED
r->area = c->location;
}
rc = rtems_disk_create_phys(dev, c->block_size, c->block_num,
1e074: e58db000 str fp, [sp] <== NOT EXECUTED
1e078: e98d0210 stmib sp, {r4, r9} <== NOT EXECUTED
1e07c: ebffa1bc bl 6774 <rtems_disk_create_phys> <== NOT EXECUTED
ramdisk_ioctl, r, name);
if (rc != RTEMS_SUCCESSFUL)
1e080: e3500000 cmp r0, #0 <== NOT EXECUTED
1e084: 0a000005 beq 1e0a0 <ramdisk_initialize+0xf8> <== NOT EXECUTED
{
if (r->malloced)
1e088: e5d4300d ldrb r3, [r4, #13] <== NOT EXECUTED
1e08c: e3530000 cmp r3, #0 <== NOT EXECUTED
{
free(r->area);
1e090: 15940008 ldrne r0, [r4, #8] <== NOT EXECUTED
1e094: 1bffa586 blne 76b4 <free> <== NOT EXECUTED
}
r->initialized = false;
1e098: e3a0c000 mov ip, #0 <== NOT EXECUTED
1e09c: e5c4c00c strb ip, [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++)
1e0a0: e2866001 add r6, r6, #1 <== NOT EXECUTED
1e0a4: e2844010 add r4, r4, #16 <== NOT EXECUTED
1e0a8: e285500c add r5, r5, #12 <== NOT EXECUTED
1e0ac: e59a3000 ldr r3, [sl] <== NOT EXECUTED
1e0b0: e1560003 cmp r6, r3 <== NOT EXECUTED
1e0b4: 3affffcc bcc 1dfec <ramdisk_initialize+0x44> <== NOT EXECUTED
}
r->initialized = false;
}
}
return RTEMS_SUCCESSFUL;
}
1e0b8: e1a00007 mov r0, r7 <== NOT EXECUTED
1e0bc: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
1e0c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00009a84 <ramdisk_ioctl>:
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
switch (req)
9a84: e59f30dc ldr r3, [pc, #220] ; 9b68 <ramdisk_ioctl+0xe4>
9a88: e1510003 cmp r1, r3
return 0;
}
int
ramdisk_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
9a8c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
9a90: e1a04002 mov r4, r2
switch (req)
9a94: 1a00002f bne 9b58 <ramdisk_ioctl+0xd4>
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
9a98: e5927000 ldr r7, [r2]
switch (req)
{
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
9a9c: e590602c ldr r6, [r0, #44] ; 0x2c
switch (r->req)
9aa0: e3570000 cmp r7, #0
#endif
static int
ramdisk_read(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *from = rd->area;
9aa4: 05968008 ldreq r8, [r6, #8]
9aa8: 02825018 addeq r5, r2, #24
case RTEMS_BLKIO_REQUEST:
{
rtems_blkdev_request *r = argp;
struct ramdisk *rd = rtems_disk_get_driver_data(dd);
switch (r->req)
9aac: 0a000009 beq 9ad8 <ramdisk_ioctl+0x54>
9ab0: e3570001 cmp r7, #1
9ab4: 1a000022 bne 9b44 <ramdisk_ioctl+0xc0>
9ab8: ea00000b b 9aec <ramdisk_ioctl+0x68>
#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);
9abc: e5963000 ldr r3, [r6] <== NOT EXECUTED
9ac0: e5151010 ldr r1, [r5, #-16] <== NOT EXECUTED
9ac4: e5150008 ldr r0, [r5, #-8] <== NOT EXECUTED
9ac8: e0218193 mla r1, r3, r1, r8 <== NOT EXECUTED
9acc: e515200c ldr r2, [r5, #-12] <== NOT EXECUTED
9ad0: eb0023e6 bl 12a70 <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++)
9ad4: e2877001 add r7, r7, #1 <== NOT EXECUTED
9ad8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
9adc: e1570003 cmp r7, r3 <== NOT EXECUTED
9ae0: e2855010 add r5, r5, #16 <== NOT EXECUTED
9ae4: 3afffff4 bcc 9abc <ramdisk_ioctl+0x38> <== NOT EXECUTED
9ae8: ea00000e b 9b28 <ramdisk_ioctl+0xa4> <== NOT EXECUTED
}
static int
ramdisk_write(struct ramdisk *rd, rtems_blkdev_request *req)
{
uint8_t *to = rd->area;
9aec: e5968008 ldr r8, [r6, #8]
9af0: e2825018 add r5, r2, #24
9af4: e3a07000 mov r7, #0
9af8: ea000006 b 9b18 <ramdisk_ioctl+0x94>
#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);
9afc: e5963000 ldr r3, [r6]
9b00: e5150010 ldr r0, [r5, #-16]
9b04: e5151008 ldr r1, [r5, #-8]
9b08: e0208093 mla r0, r3, r0, r8
9b0c: e515200c ldr r2, [r5, #-12]
9b10: eb0023d6 bl 12a70 <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++)
9b14: e2877001 add r7, r7, #1
9b18: e5943010 ldr r3, [r4, #16]
9b1c: e1570003 cmp r7, r3
9b20: e2855010 add r5, r5, #16
9b24: 3afffff4 bcc 9afc <ramdisk_ioctl+0x78>
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;
9b28: e3a05000 mov r5, #0
9b2c: e584500c str r5, [r4, #12]
req->req_done(req->done_arg, RTEMS_SUCCESSFUL);
9b30: e5940008 ldr r0, [r4, #8]
9b34: e1a01005 mov r1, r5
9b38: e1a0e00f mov lr, pc
9b3c: e594f004 ldr pc, [r4, #4]
{
case RTEMS_BLKDEV_REQ_READ:
return ramdisk_read(rd, r);
case RTEMS_BLKDEV_REQ_WRITE:
return ramdisk_write(rd, r);
9b40: ea000006 b 9b60 <ramdisk_ioctl+0xdc>
default:
errno = EINVAL;
9b44: eb0021bb bl 12238 <__errno> <== NOT EXECUTED
9b48: e3a03016 mov r3, #22 <== NOT EXECUTED
9b4c: e5803000 str r3, [r0] <== NOT EXECUTED
9b50: e3e05000 mvn r5, #0 <== NOT EXECUTED
return -1;
9b54: ea000001 b 9b60 <ramdisk_ioctl+0xdc> <== NOT EXECUTED
break;
}
errno = EINVAL;
return -1;
}
9b58: e8bd41f0 pop {r4, r5, r6, r7, r8, lr}
}
break;
}
default:
return rtems_blkdev_ioctl (dd, req, argp);
9b5c: ea000931 b c028 <rtems_blkdev_ioctl>
break;
}
errno = EINVAL;
return -1;
}
9b60: e1a00005 mov r0, r5
9b64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00009c14 <ramdisk_register>:
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
9c14: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number major = 0;
9c18: e3a0e000 mov lr, #0
9c1c: e28dc010 add ip, sp, #16
9c20: e52ce004 str lr, [ip, #-4]!
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
9c24: e1a04002 mov r4, r2
9c28: e1a07000 mov r7, r0
9c2c: e1a06001 mov r6, 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);
9c30: e1a0000e mov r0, lr
9c34: e1a0200c mov r2, ip
9c38: e59f1084 ldr r1, [pc, #132] ; 9cc4 <ramdisk_register+0xb0>
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
9c3c: e1a0a003 mov sl, r3
9c40: 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);
9c44: ebfff374 bl 6a1c <rtems_io_register_driver>
if (sc != RTEMS_SUCCESSFUL) {
9c48: e2508000 subs r8, r0, #0
rtems_blkdev_bnum block_count,
bool trace,
const char *disk,
dev_t *dev_ptr
)
{
9c4c: e20440ff and r4, r4, #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) {
9c50: 1a000007 bne 9c74 <ramdisk_register+0x60>
return RTEMS_UNSATISFIED;
}
rd = ramdisk_allocate(NULL, block_size, block_count, trace);
9c54: e1a03004 mov r3, r4
9c58: e1a01007 mov r1, r7
9c5c: e1a02006 mov r2, r6
9c60: ebffffcb bl 9b94 <ramdisk_allocate>
if (rd == NULL) {
9c64: e2505000 subs r5, r0, #0
9c68: 1a000003 bne 9c7c <ramdisk_register+0x68>
rtems_io_unregister_driver(major);
9c6c: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
9c70: ebfff3c6 bl 6b90 <rtems_io_unregister_driver> <== NOT EXECUTED
9c74: e3a0000d mov r0, #13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
9c78: ea00000f b 9cbc <ramdisk_register+0xa8> <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
9c7c: e59d400c ldr r4, [sp, #12]
}
dev = rtems_filesystem_make_dev_t(major, 0);
sc = rtems_disk_create_phys(
9c80: e59fc040 ldr ip, [pc, #64] ; 9cc8 <ramdisk_register+0xb4>
9c84: e1a01008 mov r1, r8
9c88: e1a02007 mov r2, r7
9c8c: e1a03006 mov r3, r6
9c90: e1a00004 mov r0, r4
9c94: e58dc000 str ip, [sp]
9c98: e98d0420 stmib sp, {r5, sl}
9c9c: ebffe1b0 bl 2364 <rtems_disk_create_phys>
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
9ca0: e3500000 cmp r0, #0
rtems_io_unregister_driver(major);
return RTEMS_UNSATISFIED;
}
*dev_ptr = dev;
9ca4: 05894000 streq r4, [r9]
9ca8: 05890004 streq r0, [r9, #4]
block_count,
ramdisk_ioctl,
rd,
disk
);
if (sc != RTEMS_SUCCESSFUL) {
9cac: 0a000002 beq 9cbc <ramdisk_register+0xa8>
ramdisk_free(rd);
9cb0: e1a00005 mov r0, r5 <== NOT EXECUTED
9cb4: ebffffac bl 9b6c <ramdisk_free> <== NOT EXECUTED
9cb8: eaffffeb b 9c6c <ramdisk_register+0x58> <== NOT EXECUTED
}
*dev_ptr = dev;
return RTEMS_SUCCESSFUL;
}
9cbc: e28dd010 add sp, sp, #16
9cc0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0001a258 <read>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a258: e59f30b0 ldr r3, [pc, #176] ; 1a310 <read+0xb8>
1a25c: e5933000 ldr r3, [r3]
1a260: e1500003 cmp r0, r3
ssize_t read(
int fd,
void *buffer,
size_t count
)
{
1a264: e92d4070 push {r4, r5, r6, lr}
1a268: e1a05001 mov r5, r1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a26c: 2a00000f bcs 1a2b0 <read+0x58>
iop = rtems_libio_iop( fd );
1a270: e59f309c ldr r3, [pc, #156] ; 1a314 <read+0xbc>
1a274: e5934000 ldr r4, [r3]
1a278: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
1a27c: e5943014 ldr r3, [r4, #20]
1a280: e3130c01 tst r3, #256 ; 0x100
1a284: 0a000009 beq 1a2b0 <read+0x58>
rtems_libio_check_buffer( buffer );
1a288: e3510000 cmp r1, #0
1a28c: 1a000002 bne 1a29c <read+0x44>
1a290: ebffd113 bl e6e4 <__errno> <== NOT EXECUTED
1a294: e3a03016 mov r3, #22 <== NOT EXECUTED
1a298: ea00000d b 1a2d4 <read+0x7c> <== NOT EXECUTED
rtems_libio_check_count( count );
1a29c: e3520000 cmp r2, #0
1a2a0: 01a00002 moveq r0, r2
1a2a4: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
1a2a8: e3130002 tst r3, #2
1a2ac: 1a000002 bne 1a2bc <read+0x64>
1a2b0: ebffd10b bl e6e4 <__errno>
1a2b4: e3a03009 mov r3, #9
1a2b8: ea000005 b 1a2d4 <read+0x7c>
/*
* Now process the read().
*/
if ( !iop->handlers->read_h )
1a2bc: e594303c ldr r3, [r4, #60] ; 0x3c
1a2c0: e5933008 ldr r3, [r3, #8]
1a2c4: e3530000 cmp r3, #0
1a2c8: 1a000004 bne 1a2e0 <read+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a2cc: ebffd104 bl e6e4 <__errno> <== NOT EXECUTED
1a2d0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a2d4: e5803000 str r3, [r0]
1a2d8: e3e00000 mvn r0, #0
1a2dc: e8bd8070 pop {r4, r5, r6, pc}
rc = (*iop->handlers->read_h)( iop, buffer, count );
1a2e0: e1a00004 mov r0, r4
1a2e4: e1a0e00f mov lr, pc
1a2e8: e12fff13 bx r3
if ( rc > 0 )
1a2ec: e3500000 cmp r0, #0
1a2f0: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
1a2f4: e284600c add r6, r4, #12
1a2f8: e8960060 ldm r6, {r5, r6}
1a2fc: e0952000 adds r2, r5, r0
1a300: e0a63fc0 adc r3, r6, r0, asr #31
1a304: e584200c str r2, [r4, #12]
1a308: e5843010 str r3, [r4, #16]
return rc;
}
1a30c: e8bd8070 pop {r4, r5, r6, pc}
000269d4 <readlink>:
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
269d4: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
269d8: e2516000 subs r6, r1, #0
ssize_t readlink(
const char *pathname,
char *buf,
size_t bufsize
)
{
269dc: e24dd018 sub sp, sp, #24
269e0: e1a05002 mov r5, r2
269e4: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc;
int result;
if (!buf)
269e8: 1a000002 bne 269f8 <readlink+0x24>
rtems_set_errno_and_return_minus_one( EFAULT );
269ec: eb005e75 bl 3e3c8 <__errno> <== NOT EXECUTED
269f0: e3a0300e mov r3, #14 <== NOT EXECUTED
269f4: ea000028 b 26a9c <readlink+0xc8> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
269f8: eb007980 bl 45000 <strlen>
269fc: e28d4004 add r4, sp, #4
26a00: e3a0c000 mov ip, #0
26a04: e1a01000 mov r1, r0
26a08: e1a0200c mov r2, ip
26a0c: e1a00007 mov r0, r7
26a10: e1a03004 mov r3, r4
26a14: e58dc000 str ip, [sp]
26a18: ebff8307 bl 763c <rtems_filesystem_evaluate_path>
0, &loc, false );
if ( result != 0 )
26a1c: e3500000 cmp r0, #0
26a20: 1a00001e bne 26aa0 <readlink+0xcc>
return -1;
if ( !loc.ops->node_type_h ){
26a24: e59d2010 ldr r2, [sp, #16]
26a28: e5923010 ldr r3, [r2, #16]
26a2c: e3530000 cmp r3, #0
26a30: 0a000012 beq 26a80 <readlink+0xac>
rtems_filesystem_freenode( &loc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){
26a34: e1a00004 mov r0, r4
26a38: e1a0e00f mov lr, pc
26a3c: e12fff13 bx r3
26a40: e3500004 cmp r0, #4
26a44: e59d2010 ldr r2, [sp, #16]
26a48: 0a000009 beq 26a74 <readlink+0xa0>
rtems_filesystem_freenode( &loc );
26a4c: e3520000 cmp r2, #0
26a50: 0a000004 beq 26a68 <readlink+0x94>
26a54: e592301c ldr r3, [r2, #28]
26a58: e3530000 cmp r3, #0
26a5c: 11a00004 movne r0, r4
26a60: 11a0e00f movne lr, pc
26a64: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
26a68: eb005e56 bl 3e3c8 <__errno>
26a6c: e3a03016 mov r3, #22
26a70: ea000009 b 26a9c <readlink+0xc8>
}
if ( !loc.ops->readlink_h ){
26a74: e592303c ldr r3, [r2, #60] ; 0x3c
26a78: e3530000 cmp r3, #0
26a7c: 1a000009 bne 26aa8 <readlink+0xd4>
rtems_filesystem_freenode( &loc );
26a80: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
26a84: e3530000 cmp r3, #0 <== NOT EXECUTED
26a88: 11a00004 movne r0, r4 <== NOT EXECUTED
26a8c: 11a0e00f movne lr, pc <== NOT EXECUTED
26a90: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26a94: eb005e4b bl 3e3c8 <__errno> <== NOT EXECUTED
26a98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
26a9c: e5803000 str r3, [r0]
26aa0: e3e05000 mvn r5, #0
26aa4: ea00000d b 26ae0 <readlink+0x10c>
}
result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
26aa8: e1a02005 mov r2, r5
26aac: e1a01006 mov r1, r6
26ab0: e1a00004 mov r0, r4
26ab4: e1a0e00f mov lr, pc
26ab8: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
26abc: e59d3010 ldr r3, [sp, #16]
26ac0: 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 );
26ac4: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
26ac8: 0a000004 beq 26ae0 <readlink+0x10c>
26acc: e593301c ldr r3, [r3, #28]
26ad0: e3530000 cmp r3, #0
26ad4: 11a00004 movne r0, r4
26ad8: 11a0e00f movne lr, pc
26adc: 112fff13 bxne r3
return result;
}
26ae0: e1a00005 mov r0, r5
26ae4: e28dd018 add sp, sp, #24
26ae8: e8bd80f0 pop {r4, r5, r6, r7, pc}
000039dc <readv>:
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
39dc: e59f3144 ldr r3, [pc, #324] ; 3b28 <readv+0x14c>
39e0: e5933000 ldr r3, [r3]
39e4: e1500003 cmp r0, r3
ssize_t readv(
int fd,
const struct iovec *iov,
int iovcnt
)
{
39e8: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
39ec: e1a08002 mov r8, r2
int v;
int bytes;
rtems_libio_t *iop;
bool all_zeros;
rtems_libio_check_fd( fd );
39f0: 2a000007 bcs 3a14 <readv+0x38>
iop = rtems_libio_iop( fd );
39f4: e59f3130 ldr r3, [pc, #304] ; 3b2c <readv+0x150>
39f8: e5936000 ldr r6, [r3]
39fc: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
3a00: e5963014 ldr r3, [r6, #20]
3a04: e3130c01 tst r3, #256 ; 0x100
3a08: 0a000001 beq 3a14 <readv+0x38>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_READ, EBADF );
3a0c: e3130002 tst r3, #2
3a10: 1a000002 bne 3a20 <readv+0x44>
3a14: eb002f58 bl f77c <__errno> <== NOT EXECUTED
3a18: e3a03009 mov r3, #9 <== NOT EXECUTED
3a1c: ea00001b b 3a90 <readv+0xb4> <== NOT EXECUTED
/*
* Argument validation on IO vector
*/
if ( !iov )
3a20: e3510000 cmp r1, #0
3a24: 0a000017 beq 3a88 <readv+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
3a28: e3520000 cmp r2, #0
3a2c: da000015 ble 3a88 <readv+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
3a30: e3520b01 cmp r2, #1024 ; 0x400
3a34: ca000013 bgt 3a88 <readv+0xac>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->read_h )
3a38: e596303c ldr r3, [r6, #60] ; 0x3c
3a3c: e5933008 ldr r3, [r3, #8]
3a40: e3530000 cmp r3, #0
3a44: 1a000002 bne 3a54 <readv+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
3a48: eb002f4b bl f77c <__errno> <== NOT EXECUTED
3a4c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3a50: ea00000e b 3a90 <readv+0xb4> <== NOT EXECUTED
3a54: e3a03000 mov r3, #0
3a58: e1a05001 mov r5, r1
3a5c: e1a02001 mov r2, r1
3a60: e3a07001 mov r7, #1
3a64: e1a01003 mov r1, r3
all_zeros = true;
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
ssize_t old;
if ( !iov[v].iov_base )
3a68: e5920000 ldr r0, [r2]
3a6c: e3500000 cmp r0, #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++ ) {
3a70: e2833001 add r3, r3, #1
ssize_t old;
if ( !iov[v].iov_base )
3a74: 0a000003 beq 3a88 <readv+0xac>
if ( iov[v].iov_len < 0 )
rtems_set_errno_and_return_minus_one( EINVAL );
/* check for wrap */
old = total;
total += iov[v].iov_len;
3a78: e592c004 ldr ip, [r2, #4]
3a7c: e081000c add r0, r1, ip
if ( total < old )
3a80: e1500001 cmp r0, r1
3a84: aa000003 bge 3a98 <readv+0xbc>
rtems_set_errno_and_return_minus_one( EINVAL );
3a88: eb002f3b bl f77c <__errno>
3a8c: e3a03016 mov r3, #22
3a90: e5803000 str r3, [r0]
3a94: ea000011 b 3ae0 <readv+0x104>
if ( iov[v].iov_len )
3a98: e35c0000 cmp ip, #0
3a9c: 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++ ) {
3aa0: e1530008 cmp r3, r8
3aa4: e2822008 add r2, r2, #8
3aa8: b1a01000 movlt r1, r0
3aac: baffffed blt 3a68 <readv+0x8c>
/*
* 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 ) {
3ab0: e3570000 cmp r7, #0
3ab4: 13a04000 movne r4, #0
3ab8: 1a000018 bne 3b20 <readv+0x144>
3abc: e1a04007 mov r4, r7
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
3ac0: e8950006 ldm r5, {r1, r2}
3ac4: e596303c ldr r3, [r6, #60] ; 0x3c
3ac8: e1a00006 mov r0, r6
3acc: e1a0e00f mov lr, pc
3ad0: e593f008 ldr pc, [r3, #8]
if ( bytes < 0 )
3ad4: e3500000 cmp r0, #0
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3ad8: e2877001 add r7, r7, #1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len );
if ( bytes < 0 )
3adc: aa000001 bge 3ae8 <readv+0x10c>
3ae0: e3e04000 mvn r4, #0
3ae4: ea00000d b 3b20 <readv+0x144>
return -1;
if ( bytes > 0 ) {
3ae8: 0a000006 beq 3b08 <readv+0x12c>
iop->offset += bytes;
3aec: e286c00c add ip, r6, #12
3af0: e89c1800 ldm ip, {fp, ip}
3af4: e09b2000 adds r2, fp, r0
3af8: e0ac3fc0 adc r3, ip, r0, asr #31
3afc: e586200c str r2, [r6, #12]
3b00: e5863010 str r3, [r6, #16]
total += bytes;
3b04: e0844000 add r4, r4, r0
}
if (bytes != iov[ v ].iov_len)
3b08: e5953004 ldr r3, [r5, #4]
3b0c: e1500003 cmp r0, r3
3b10: 1a000002 bne 3b20 <readv+0x144>
}
/*
* Now process the readv().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3b14: e1570008 cmp r7, r8
3b18: e2855008 add r5, r5, #8
3b1c: baffffe7 blt 3ac0 <readv+0xe4>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
3b20: e1a00004 mov r0, r4
3b24: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
0001a370 <realloc>:
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1a370: e59f310c ldr r3, [pc, #268] ; 1a484 <realloc+0x114>
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1a374: e59f210c ldr r2, [pc, #268] ; 1a488 <realloc+0x118>
1a378: e592c000 ldr ip, [r2]
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1a37c: e5932010 ldr r2, [r3, #16]
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1a380: e35c0003 cmp ip, #3
{
uintptr_t old_size;
char *new_area;
uintptr_t resize;
MSBUMP(realloc_calls, 1);
1a384: e2822001 add r2, r2, #1
1a388: e92d40f1 push {r0, r4, r5, r6, r7, lr}
1a38c: e5832010 str r2, [r3, #16]
1a390: e1a04000 mov r4, r0
1a394: e1a05001 mov r5, r1
/*
* Do not attempt to allocate memory if in a critical section or ISR.
*/
if (_System_state_Is_up(_System_state_Get())) {
1a398: 1a000007 bne 1a3bc <realloc+0x4c>
if (_Thread_Dispatch_disable_level > 0)
1a39c: e59f30e8 ldr r3, [pc, #232] ; 1a48c <realloc+0x11c>
1a3a0: e5933000 ldr r3, [r3]
1a3a4: e3530000 cmp r3, #0
1a3a8: 1a000032 bne 1a478 <realloc+0x108>
return (void *) 0;
if (_ISR_Nest_level > 0)
1a3ac: e59f30dc ldr r3, [pc, #220] ; 1a490 <realloc+0x120>
1a3b0: e5933000 ldr r3, [r3]
1a3b4: e3530000 cmp r3, #0
1a3b8: 1a00002e bne 1a478 <realloc+0x108>
}
/*
* Continue with realloc().
*/
if ( !ptr )
1a3bc: e3540000 cmp r4, #0
1a3c0: 1a000003 bne 1a3d4 <realloc+0x64>
return malloc( size );
1a3c4: e1a00005 mov r0, r5
1a3c8: ebff9f8c bl 2200 <malloc>
1a3cc: e1a04000 mov r4, r0
1a3d0: ea000029 b 1a47c <realloc+0x10c>
if ( !size ) {
1a3d4: e3550000 cmp r5, #0
1a3d8: 1a000003 bne 1a3ec <realloc+0x7c>
free( ptr );
1a3dc: e1a00004 mov r0, r4 <== NOT EXECUTED
1a3e0: ebff9eba bl 1ed0 <free> <== NOT EXECUTED
1a3e4: e1a04005 mov r4, r5 <== NOT EXECUTED
return (void *) 0;
1a3e8: ea000023 b 1a47c <realloc+0x10c> <== NOT EXECUTED
}
if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
1a3ec: e59f60a0 ldr r6, [pc, #160] ; 1a494 <realloc+0x124>
1a3f0: e1a01004 mov r1, r4
1a3f4: e5960000 ldr r0, [r6]
1a3f8: e1a0200d mov r2, sp
1a3fc: eb000055 bl 1a558 <_Protected_heap_Get_block_size>
1a400: e2507000 subs r7, r0, #0
1a404: 1a000004 bne 1a41c <realloc+0xac>
errno = EINVAL;
1a408: ebffd0b5 bl e6e4 <__errno>
1a40c: e3a03016 mov r3, #22
1a410: e5803000 str r3, [r0]
1a414: e1a04007 mov r4, r7
return (void *) 0;
1a418: ea000017 b 1a47c <realloc+0x10c>
#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 ) ) {
1a41c: e5960000 ldr r0, [r6]
1a420: e1a01004 mov r1, r4
1a424: e1a02005 mov r2, r5
1a428: eb00005b bl 1a59c <_Protected_heap_Resize_block>
1a42c: e3500000 cmp r0, #0
1a430: 1a000011 bne 1a47c <realloc+0x10c>
* 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 );
1a434: e1a00005 mov r0, r5
1a438: ebff9f70 bl 2200 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1a43c: e59f3040 ldr r3, [pc, #64] ; 1a484 <realloc+0x114>
1a440: e5932004 ldr r2, [r3, #4]
if ( !new_area ) {
1a444: e2506000 subs r6, r0, #0
* and the C Standard.
*/
new_area = malloc( size );
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
1a448: e2422001 sub r2, r2, #1
1a44c: e5832004 str r2, [r3, #4]
if ( !new_area ) {
1a450: 0a000008 beq 1a478 <realloc+0x108>
return (void *) 0;
}
memcpy( new_area, ptr, (size < old_size) ? size : old_size );
1a454: e59d2000 ldr r2, [sp]
1a458: e1a01004 mov r1, r4
1a45c: e1550002 cmp r5, r2
1a460: 31a02005 movcc r2, r5
1a464: ebffd2ac bl ef1c <memcpy>
free( ptr );
1a468: e1a00004 mov r0, r4
1a46c: ebff9e97 bl 1ed0 <free>
1a470: e1a04006 mov r4, r6
return new_area;
1a474: ea000000 b 1a47c <realloc+0x10c>
1a478: e3a04000 mov r4, #0
}
1a47c: e1a00004 mov r0, r4
1a480: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
00026aec <rmdir>:
#include <rtems/seterr.h>
int rmdir(
const char *pathname
)
{
26aec: e92d4070 push {r4, r5, r6, lr}
26af0: e24dd030 sub sp, sp, #48 ; 0x30
26af4: e1a06000 mov r6, r0
/*
* Get the parent node of the node we wish to remove. Find the parent path.
*/
parentpathlen = rtems_filesystem_dirname ( pathname );
26af8: ebff8288 bl 7520 <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
26afc: e2504000 subs r4, r0, #0
26b00: e28d3018 add r3, sp, #24
26b04: 1a000005 bne 26b20 <rmdir+0x34>
rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
26b08: e1a02003 mov r2, r3
26b0c: e1a00006 mov r0, r6
26b10: e28d102c add r1, sp, #44 ; 0x2c
26b14: ebff8901 bl 8f20 <rtems_filesystem_get_start_loc>
26b18: e1a05004 mov r5, r4
26b1c: ea000008 b 26b44 <rmdir+0x58>
else {
result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
26b20: e3a0c000 mov ip, #0
26b24: e1a00006 mov r0, r6
26b28: e1a01004 mov r1, r4
26b2c: e3a02002 mov r2, #2
26b30: e58dc000 str ip, [sp]
26b34: ebff82c0 bl 763c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
26b38: e3500000 cmp r0, #0
26b3c: 1a000077 bne 26d20 <rmdir+0x234>
26b40: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
26b44: e28de018 add lr, sp, #24
26b48: e8be000f ldm lr!, {r0, r1, r2, r3}
26b4c: e28dc004 add ip, sp, #4
26b50: e8ac000f stmia ip!, {r0, r1, r2, r3}
26b54: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
26b58: e0864004 add r4, r6, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
26b5c: e58c3000 str r3, [ip]
name = pathname + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
26b60: e1a00004 mov r0, r4
26b64: eb007925 bl 45000 <strlen>
26b68: e1a01000 mov r1, r0
26b6c: e1a00004 mov r0, r4
26b70: ebff825a bl 74e0 <rtems_filesystem_prefix_separators>
26b74: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
26b78: e1a00006 mov r0, r6
26b7c: eb00791f bl 45000 <strlen>
26b80: e28d4004 add r4, sp, #4
26b84: e3a0c000 mov ip, #0
26b88: e1a01000 mov r1, r0
26b8c: e1a0200c mov r2, ip
26b90: e1a00006 mov r0, r6
26b94: e1a03004 mov r3, r4
26b98: e58dc000 str ip, [sp]
26b9c: ebff826e bl 755c <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
26ba0: e3500000 cmp r0, #0
26ba4: 0a00000b beq 26bd8 <rmdir+0xec>
if ( free_parentloc )
26ba8: e3550000 cmp r5, #0
26bac: 0a00005b beq 26d20 <rmdir+0x234>
rtems_filesystem_freenode( &parentloc );
26bb0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
26bb4: e3530000 cmp r3, #0 <== NOT EXECUTED
26bb8: 0a000058 beq 26d20 <rmdir+0x234> <== NOT EXECUTED
26bbc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
26bc0: e3530000 cmp r3, #0 <== NOT EXECUTED
26bc4: 0a000055 beq 26d20 <rmdir+0x234> <== NOT EXECUTED
26bc8: e28d0018 add r0, sp, #24 <== NOT EXECUTED
26bcc: e1a0e00f mov lr, pc <== NOT EXECUTED
26bd0: e12fff13 bx r3 <== NOT EXECUTED
26bd4: ea000051 b 26d20 <rmdir+0x234> <== NOT EXECUTED
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
26bd8: e59d2010 ldr r2, [sp, #16]
26bdc: e5923010 ldr r3, [r2, #16]
26be0: e3530000 cmp r3, #0
rtems_filesystem_freenode( &loc );
26be4: 0592301c ldreq r3, [r2, #28]
/*
* Verify you can remove this node as a directory.
*/
if ( !loc.ops->node_type_h ){
26be8: 0a000021 beq 26c74 <rmdir+0x188>
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 ){
26bec: e1a00004 mov r0, r4
26bf0: e1a0e00f mov lr, pc
26bf4: e12fff13 bx r3
26bf8: e3500001 cmp r0, #1
26bfc: 0a000014 beq 26c54 <rmdir+0x168>
rtems_filesystem_freenode( &loc );
26c00: e59d3010 ldr r3, [sp, #16]
26c04: e3530000 cmp r3, #0
26c08: 0a000004 beq 26c20 <rmdir+0x134>
26c0c: e593301c ldr r3, [r3, #28]
26c10: e3530000 cmp r3, #0
26c14: 11a00004 movne r0, r4
26c18: 11a0e00f movne lr, pc
26c1c: 112fff13 bxne r3
if ( free_parentloc )
26c20: e3550000 cmp r5, #0
26c24: 0a000007 beq 26c48 <rmdir+0x15c>
rtems_filesystem_freenode( &parentloc );
26c28: e59d3024 ldr r3, [sp, #36] ; 0x24
26c2c: e3530000 cmp r3, #0
26c30: 0a000004 beq 26c48 <rmdir+0x15c>
26c34: e593301c ldr r3, [r3, #28]
26c38: e3530000 cmp r3, #0
26c3c: 128d0018 addne r0, sp, #24
26c40: 11a0e00f movne lr, pc
26c44: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
26c48: eb005dde bl 3e3c8 <__errno>
26c4c: e3a03014 mov r3, #20
26c50: ea000017 b 26cb4 <rmdir+0x1c8>
/*
* Use the filesystems rmnod to remove the node.
*/
if ( !loc.handlers->rmnod_h ){
26c54: e59d300c ldr r3, [sp, #12]
26c58: e5933034 ldr r3, [r3, #52] ; 0x34
26c5c: e3530000 cmp r3, #0
26c60: 1a000015 bne 26cbc <rmdir+0x1d0>
rtems_filesystem_freenode( &loc );
26c64: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
26c68: e3530000 cmp r3, #0 <== NOT EXECUTED
26c6c: 0a000004 beq 26c84 <rmdir+0x198> <== NOT EXECUTED
26c70: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
26c74: e3530000 cmp r3, #0 <== NOT EXECUTED
26c78: 11a00004 movne r0, r4 <== NOT EXECUTED
26c7c: 11a0e00f movne lr, pc <== NOT EXECUTED
26c80: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
26c84: e3550000 cmp r5, #0 <== NOT EXECUTED
26c88: 0a000007 beq 26cac <rmdir+0x1c0> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
26c8c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
26c90: e3530000 cmp r3, #0 <== NOT EXECUTED
26c94: 0a000004 beq 26cac <rmdir+0x1c0> <== NOT EXECUTED
26c98: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
26c9c: e3530000 cmp r3, #0 <== NOT EXECUTED
26ca0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
26ca4: 11a0e00f movne lr, pc <== NOT EXECUTED
26ca8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26cac: eb005dc5 bl 3e3c8 <__errno> <== NOT EXECUTED
26cb0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
26cb4: e5803000 str r3, [r0]
26cb8: ea000018 b 26d20 <rmdir+0x234>
}
result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
26cbc: e28d0018 add r0, sp, #24
26cc0: e1a01004 mov r1, r4
26cc4: e1a0e00f mov lr, pc
26cc8: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
26ccc: e59d3010 ldr r3, [sp, #16]
26cd0: 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 );
26cd4: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc );
26cd8: 0a000004 beq 26cf0 <rmdir+0x204>
26cdc: e593301c ldr r3, [r3, #28]
26ce0: e3530000 cmp r3, #0
26ce4: 11a00004 movne r0, r4
26ce8: 11a0e00f movne lr, pc
26cec: 112fff13 bxne r3
if ( free_parentloc )
26cf0: e3550000 cmp r5, #0
26cf4: 0a00000a beq 26d24 <rmdir+0x238>
rtems_filesystem_freenode( &parentloc );
26cf8: e59d3024 ldr r3, [sp, #36] ; 0x24
26cfc: e3530000 cmp r3, #0
26d00: 0a000007 beq 26d24 <rmdir+0x238>
26d04: e593301c ldr r3, [r3, #28]
26d08: e3530000 cmp r3, #0
26d0c: 0a000004 beq 26d24 <rmdir+0x238>
26d10: e28d0018 add r0, sp, #24
26d14: e1a0e00f mov lr, pc
26d18: e12fff13 bx r3
26d1c: ea000000 b 26d24 <rmdir+0x238>
26d20: e3e06000 mvn r6, #0
return result;
}
26d24: e1a00006 mov r0, r6
26d28: e28dd030 add sp, sp, #48 ; 0x30
26d2c: e8bd8070 pop {r4, r5, r6, pc}
00012b10 <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;
}
12b10: e59f0000 ldr r0, [pc, #0] ; 12b18 <rtems_assoc_name_bad+0x8><== NOT EXECUTED
12b14: e12fff1e bx lr <== NOT EXECUTED
0000f484 <rtems_assoc_name_by_local>:
const char *rtems_assoc_name_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
f484: e92d4010 push {r4, lr}
f488: e1a04001 mov r4, r1
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
f48c: eb000006 bl f4ac <rtems_assoc_ptr_by_local>
if (nap)
f490: e3500000 cmp r0, #0
f494: 0a000001 beq f4a0 <rtems_assoc_name_by_local+0x1c>
return nap->name;
return rtems_assoc_name_bad(local_value);
}
f498: e5900000 ldr r0, [r0]
f49c: 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);
f4a0: e1a00004 mov r0, r4 <== NOT EXECUTED
}
f4a4: 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);
f4a8: ea000d98 b 12b10 <rtems_assoc_name_bad> <== NOT EXECUTED
0000e5dc <rtems_assoc_remote_by_local>:
uint32_t rtems_assoc_remote_by_local(
const rtems_assoc_t *ap,
uint32_t local_value
)
{
e5dc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap;
nap = rtems_assoc_ptr_by_local(ap, local_value);
e5e0: eb000022 bl e670 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
e5e4: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
e5e8: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0;
}
e5ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000a094 <rtems_bdbuf_add_to_modified_list_after_access>:
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
a094: e92d4030 push {r4, r5, lr}
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
a098: e59f50ac ldr r5, [pc, #172] ; a14c <rtems_bdbuf_add_to_modified_list_after_access+0xb8>
a09c: e5d53030 ldrb r3, [r5, #48] ; 0x30
a0a0: e3530000 cmp r3, #0
}
}
static void
rtems_bdbuf_add_to_modified_list_after_access (rtems_bdbuf_buffer *bd)
{
a0a4: e1a04000 mov r4, r0
if (bdbuf_cache.sync_active && bdbuf_cache.sync_device == bd->dev)
a0a8: 0a00000d beq a0e4 <rtems_bdbuf_add_to_modified_list_after_access+0x50>
a0ac: e2853038 add r3, r5, #56 ; 0x38 <== NOT EXECUTED
a0b0: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
a0b4: e5901014 ldr r1, [r0, #20] <== NOT EXECUTED
a0b8: e1510002 cmp r1, r2 <== NOT EXECUTED
a0bc: 1a000008 bne a0e4 <rtems_bdbuf_add_to_modified_list_after_access+0x50><== NOT EXECUTED
a0c0: e5901018 ldr r1, [r0, #24] <== NOT EXECUTED
a0c4: e1510003 cmp r1, r3 <== NOT EXECUTED
a0c8: 1a000005 bne a0e4 <rtems_bdbuf_add_to_modified_list_after_access+0x50><== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
a0cc: ebffff8d bl 9f08 <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);
a0d0: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED
a0d4: e59f1074 ldr r1, [pc, #116] ; a150 <rtems_bdbuf_add_to_modified_list_after_access+0xbc><== NOT EXECUTED
a0d8: ebffff08 bl 9d00 <rtems_bdbuf_lock> <== NOT EXECUTED
/*
* Wait for the sync lock.
*/
rtems_bdbuf_lock_sync ();
rtems_bdbuf_unlock_sync ();
a0dc: ebffff93 bl 9f30 <rtems_bdbuf_unlock_sync> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
a0e0: ebffff0f bl 9d24 <rtems_bdbuf_lock_cache> <== 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)
a0e4: 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
a0e8: e3530003 cmp r3, #3
a0ec: 0a000002 beq a0fc <rtems_bdbuf_add_to_modified_list_after_access+0x68>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
a0f0: 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
a0f4: e3530005 cmp r3, #5
a0f8: 1a000002 bne a108 <rtems_bdbuf_add_to_modified_list_after_access+0x74>
|| bd->state == RTEMS_BDBUF_STATE_ACCESS_EMPTY)
bd->hold_timer = bdbuf_config.swap_block_hold;
a0fc: e59f3050 ldr r3, [pc, #80] ; a154 <rtems_bdbuf_add_to_modified_list_after_access+0xc0>
a100: e5933010 ldr r3, [r3, #16]
a104: e5843030 str r3, [r4, #48] ; 0x30
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
a108: e59f503c ldr r5, [pc, #60] ; a14c <rtems_bdbuf_add_to_modified_list_after_access+0xb8>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
a10c: e3a03007 mov r3, #7
a110: e5843024 str r3, [r4, #36] ; 0x24
a114: e2850050 add r0, r5, #80 ; 0x50
a118: e1a01004 mov r1, r4
a11c: ebfff33a bl 6e0c <_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)
a120: e5943028 ldr r3, [r4, #40] ; 0x28
a124: e3530000 cmp r3, #0
a128: 0a000002 beq a138 <rtems_bdbuf_add_to_modified_list_after_access+0xa4>
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
a12c: e2850068 add r0, r5, #104 ; 0x68
else if (rtems_bdbuf_has_buffer_waiters ())
rtems_bdbuf_wake_swapper ();
}
a130: 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);
a134: eaffff00 b 9d3c <rtems_bdbuf_wake>
}
static bool
rtems_bdbuf_has_buffer_waiters (void)
{
return bdbuf_cache.buffer_waiters.count;
a138: 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 ())
a13c: e3530000 cmp r3, #0
a140: 08bd8030 popeq {r4, r5, pc}
rtems_bdbuf_wake_swapper ();
}
a144: 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 ();
a148: eaffffc6 b a068 <rtems_bdbuf_wake_swapper>
0000a29c <rtems_bdbuf_anonymous_wait>:
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
a29c: e5903000 ldr r3, [r0]
a2a0: 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)
{
a2a4: e92d4030 push {r4, r5, lr}
rtems_mode prev_mode;
/*
* Indicate we are waiting.
*/
++waiters->count;
a2a8: 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)
{
a2ac: 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 ();
a2b0: ebffffdf bl a234 <rtems_bdbuf_disable_preemption>
a2b4: e1a05000 mov r5, r0
/*
* Unlock the cache, wait, and lock the cache when we return.
*/
rtems_bdbuf_unlock_cache ();
a2b8: ebffff12 bl 9f08 <rtems_bdbuf_unlock_cache>
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
a2bc: e3a01000 mov r1, #0
a2c0: e5940004 ldr r0, [r4, #4]
a2c4: e1a02001 mov r2, r1
a2c8: ebfff02d bl 6384 <rtems_semaphore_obtain>
if (sc == RTEMS_TIMEOUT)
a2cc: e3500006 cmp r0, #6
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
a2d0: 059f002c ldreq r0, [pc, #44] ; a304 <rtems_bdbuf_anonymous_wait+0x68>
*/
rtems_bdbuf_unlock_cache ();
sc = rtems_semaphore_obtain (waiters->sema, RTEMS_WAIT, RTEMS_BDBUF_WAIT_TIMEOUT);
if (sc == RTEMS_TIMEOUT)
a2d4: 0a000002 beq a2e4 <rtems_bdbuf_anonymous_wait+0x48>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_TO);
if (sc != RTEMS_UNSATISFIED)
a2d8: e350000d cmp r0, #13
a2dc: 0a000001 beq a2e8 <rtems_bdbuf_anonymous_wait+0x4c>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAIT_2);
a2e0: e59f0020 ldr r0, [pc, #32] ; a308 <rtems_bdbuf_anonymous_wait+0x6c><== NOT EXECUTED
a2e4: ebfff195 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
a2e8: ebfffe8d bl 9d24 <rtems_bdbuf_lock_cache>
rtems_bdbuf_restore_preemption (prev_mode);
a2ec: e1a00005 mov r0, r5
a2f0: ebffffdd bl a26c <rtems_bdbuf_restore_preemption>
--waiters->count;
a2f4: e5943000 ldr r3, [r4]
a2f8: e2433001 sub r3, r3, #1
a2fc: e5843000 str r3, [r4]
}
a300: e8bd8030 pop {r4, r5, pc}
0000bc68 <rtems_bdbuf_get>:
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
bc68: e92d40f0 push {r4, r5, r6, r7, lr}
bc6c: 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);
bc70: 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;
bc74: 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);
bc78: e58de000 str lr, [sp]
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
bc7c: e1a05003 mov r5, 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);
bc80: e28de008 add lr, sp, #8
bc84: 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;
bc88: e58dc008 str ip, [sp, #8]
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
bc8c: 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;
bc90: e58dc010 str ip, [sp, #16]
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
bc94: e58dc00c str ip, [sp, #12]
rtems_status_code
rtems_bdbuf_get (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
bc98: e1a06000 mov r6, r0
bc9c: e1a07001 mov r7, 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);
bca0: ebfff8ac bl 9f58 <rtems_bdbuf_obtain_disk>
if (sc != RTEMS_SUCCESSFUL)
bca4: e2504000 subs r4, r0, #0
bca8: 1a00001e bne bd28 <rtems_bdbuf_get+0xc0>
return sc;
rtems_bdbuf_lock_cache ();
bcac: ebfff81c bl 9d24 <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);
bcb0: e1a00006 mov r0, r6
bcb4: e59d3008 ldr r3, [sp, #8]
bcb8: e1a01007 mov r1, r7
bcbc: e59d200c ldr r2, [sp, #12]
bcc0: ebffff56 bl ba20 <rtems_bdbuf_get_buffer_for_access>
switch (bd->state)
bcc4: e5903024 ldr r3, [r0, #36] ; 0x24
bcc8: 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);
bccc: e1a06000 mov r6, r0
switch (bd->state)
bcd0: 0a000004 beq bce8 <rtems_bdbuf_get+0x80>
bcd4: e3530007 cmp r3, #7
bcd8: 0a000006 beq bcf8 <rtems_bdbuf_get+0x90>
bcdc: e3530001 cmp r3, #1
bce0: 1a00000b bne bd14 <rtems_bdbuf_get+0xac>
bce4: ea000001 b bcf0 <rtems_bdbuf_get+0x88>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
bce8: e3a03003 mov r3, #3
bcec: ea000002 b bcfc <rtems_bdbuf_get+0x94>
bcf0: e3a03005 mov r3, #5
bcf4: ea000000 b bcfc <rtems_bdbuf_get+0x94>
bcf8: e3a03004 mov r3, #4
bcfc: e5863024 str r3, [r6, #36] ; 0x24
{
rtems_bdbuf_show_users ("get", bd);
rtems_bdbuf_show_usage ();
}
rtems_bdbuf_unlock_cache ();
bd00: ebfff880 bl 9f08 <rtems_bdbuf_unlock_cache>
rtems_bdbuf_release_disk (dd);
bd04: e59d0010 ldr r0, [sp, #16]
bd08: ebfff8cf bl a04c <rtems_bdbuf_release_disk>
*bd_ptr = bd;
bd0c: e5856000 str r6, [r5]
return RTEMS_SUCCESSFUL;
bd10: ea000004 b bd28 <rtems_bdbuf_get+0xc0>
* 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);
bd14: 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);
bd18: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
bd1c: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bd20: e380001e orr r0, r0, #30 <== NOT EXECUTED
bd24: ebffeb05 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_bdbuf_release_disk (dd);
*bd_ptr = bd;
return RTEMS_SUCCESSFUL;
}
bd28: e1a00004 mov r0, r4
bd2c: e28dd014 add sp, sp, #20
bd30: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000ba20 <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)
{
ba20: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
static rtems_bdbuf_buffer *
rtems_bdbuf_avl_search (rtems_bdbuf_buffer** root,
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
ba24: e59f4224 ldr r4, [pc, #548] ; bc50 <rtems_bdbuf_get_buffer_for_access+0x230>
static rtems_bdbuf_buffer *
rtems_bdbuf_get_buffer_for_access (dev_t dev,
rtems_blkdev_bnum block,
size_t bds_per_group)
{
ba28: e1a06000 mov r6, r0
ba2c: e1a05001 mov r5, r1
ba30: e1a07002 mov r7, r2
ba34: e1a08003 mov r8, r3
ba38: e284a054 add sl, r4, #84 ; 0x54
static rtems_bdbuf_buffer *
rtems_bdbuf_avl_search (rtems_bdbuf_buffer** root,
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
ba3c: e5949040 ldr r9, [r4, #64] ; 0x40
ba40: ea000009 b ba6c <rtems_bdbuf_get_buffer_for_access+0x4c>
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
ba44: e1550003 cmp r5, r3
ba48: 8a000004 bhi ba60 <rtems_bdbuf_get_buffer_for_access+0x40>
ba4c: 1a000005 bne ba68 <rtems_bdbuf_get_buffer_for_access+0x48>
ba50: e1560002 cmp r6, r2
ba54: 8a000001 bhi ba60 <rtems_bdbuf_get_buffer_for_access+0x40>
ba58: ea000002 b ba68 <rtems_bdbuf_get_buffer_for_access+0x48>
ba5c: 2a000001 bcs ba68 <rtems_bdbuf_get_buffer_for_access+0x48>
{
p = p->avl.right;
ba60: e599900c ldr r9, [r9, #12]
ba64: ea000000 b ba6c <rtems_bdbuf_get_buffer_for_access+0x4c>
}
else
{
p = p->avl.left;
ba68: e5999008 ldr r9, [r9, #8]
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
ba6c: e3590000 cmp r9, #0
ba70: 0a000009 beq ba9c <rtems_bdbuf_get_buffer_for_access+0x7c>
ba74: e5992014 ldr r2, [r9, #20]
ba78: e1520006 cmp r2, r6
ba7c: e5993018 ldr r3, [r9, #24]
ba80: 1affffef bne ba44 <rtems_bdbuf_get_buffer_for_access+0x24>
ba84: e1530005 cmp r3, r5
ba88: 1affffed bne ba44 <rtems_bdbuf_get_buffer_for_access+0x24>
ba8c: e599301c ldr r3, [r9, #28]
ba90: e1530007 cmp r3, r7
ba94: 1afffff0 bne ba5c <rtems_bdbuf_get_buffer_for_access+0x3c>
ba98: ea000067 b bc3c <rtems_bdbuf_get_buffer_for_access+0x21c>
bd = NULL;
}
}
else
{
bd = rtems_bdbuf_get_buffer_from_lru_list (dev, block, bds_per_group);
ba9c: e1a00006 mov r0, r6
baa0: e1a01005 mov r1, r5
baa4: e1a02007 mov r2, r7
baa8: e1a03008 mov r3, r8
baac: ebfffeef bl b670 <rtems_bdbuf_get_buffer_from_lru_list>
if (bd == NULL)
bab0: e2509000 subs r9, r0, #0
bab4: 1a000038 bne bb9c <rtems_bdbuf_get_buffer_for_access+0x17c>
bab8: ea000031 b bb84 <rtems_bdbuf_get_buffer_for_access+0x164>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
babc: e3a0b008 mov fp, #8
static bool
rtems_bdbuf_wait_for_recycle (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
bac0: e5993024 ldr r3, [r9, #36] ; 0x24
bac4: e353000a cmp r3, #10
bac8: 979ff103 ldrls pc, [pc, r3, lsl #2]
bacc: ea00001d b bb48 <rtems_bdbuf_get_buffer_for_access+0x128> <== NOT EXECUTED
bad0: 0000bb5c .word 0x0000bb5c <== NOT EXECUTED
bad4: 0000bb1c .word 0x0000bb1c <== NOT EXECUTED
bad8: 0000bb1c .word 0x0000bb1c <== NOT EXECUTED
badc: 0000bb2c .word 0x0000bb2c <== NOT EXECUTED
bae0: 0000bb2c .word 0x0000bb2c <== NOT EXECUTED
bae4: 0000bb2c .word 0x0000bb2c <== NOT EXECUTED
bae8: 0000bb2c .word 0x0000bb2c <== NOT EXECUTED
baec: 0000bafc .word 0x0000bafc <== NOT EXECUTED
baf0: 0000bb38 .word 0x0000bb38 <== NOT EXECUTED
baf4: 0000bb38 .word 0x0000bb38 <== NOT EXECUTED
baf8: 0000bb38 .word 0x0000bb38 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
bafc: e1a00009 mov r0, r9 <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
bb00: e589b024 str fp, [r9, #36] ; 0x24 <== NOT EXECUTED
bb04: ebffeccb bl 6e38 <_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 );
bb08: e59f0144 ldr r0, [pc, #324] ; bc54 <rtems_bdbuf_get_buffer_for_access+0x234><== NOT EXECUTED
bb0c: e1a01009 mov r1, r9 <== NOT EXECUTED
bb10: ebffecbd bl 6e0c <_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 ();
bb14: ebfff953 bl a068 <rtems_bdbuf_wake_swapper> <== NOT EXECUTED
bb18: eaffffe8 b bac0 <rtems_bdbuf_get_buffer_for_access+0xa0> <== NOT EXECUTED
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)
bb1c: e5993028 ldr r3, [r9, #40] ; 0x28
bb20: e3530000 cmp r3, #0
bb24: 0a00000c beq bb5c <rtems_bdbuf_get_buffer_for_access+0x13c>
bb28: ea000018 b bb90 <rtems_bdbuf_get_buffer_for_access+0x170>
}
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);
bb2c: e1a00009 mov r0, r9
bb30: e59f1120 ldr r1, [pc, #288] ; bc58 <rtems_bdbuf_get_buffer_for_access+0x238>
bb34: ea000001 b bb40 <rtems_bdbuf_get_buffer_for_access+0x120>
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);
bb38: e59f111c ldr r1, [pc, #284] ; bc5c <rtems_bdbuf_get_buffer_for_access+0x23c><== NOT EXECUTED
bb3c: e1a00009 mov r0, r9 <== NOT EXECUTED
bb40: ebfff9f1 bl a30c <rtems_bdbuf_wait>
bb44: eaffffdd b bac0 <rtems_bdbuf_get_buffer_for_access+0xa0>
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_8);
bb48: e5990024 ldr r0, [r9, #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);
bb4c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
bb50: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bb54: e3800006 orr r0, r0, #6 <== NOT EXECUTED
bb58: ea000030 b bc20 <rtems_bdbuf_get_buffer_for_access+0x200> <== NOT EXECUTED
{
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);
bb5c: e1a00009 mov r0, r9 <== NOT EXECUTED
bb60: ebfffbe3 bl aaf4 <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;
bb64: e3a03000 mov r3, #0 <== NOT EXECUTED
bb68: e5893024 str r3, [r9, #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);
bb6c: e1a01009 mov r1, r9 <== NOT EXECUTED
bb70: e59f00e8 ldr r0, [pc, #232] ; bc60 <rtems_bdbuf_get_buffer_for_access+0x240><== NOT EXECUTED
bb74: eb000de6 bl f314 <_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);
bb78: e59f00e4 ldr r0, [pc, #228] ; bc64 <rtems_bdbuf_get_buffer_for_access+0x244><== NOT EXECUTED
bb7c: ebfff86e bl 9d3c <rtems_bdbuf_wake> <== NOT EXECUTED
bb80: eaffffad b ba3c <rtems_bdbuf_get_buffer_for_access+0x1c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
bb84: e5943050 ldr r3, [r4, #80] ; 0x50
bb88: e153000a cmp r3, sl
static void
rtems_bdbuf_wait_for_buffer (void)
{
if (!rtems_chain_is_empty (&bdbuf_cache.modified))
rtems_bdbuf_wake_swapper ();
bb8c: 1bfff935 blne a068 <rtems_bdbuf_wake_swapper>
rtems_bdbuf_anonymous_wait (&bdbuf_cache.buffer_waiters);
bb90: e59f00cc ldr r0, [pc, #204] ; bc64 <rtems_bdbuf_get_buffer_for_access+0x244>
bb94: ebfff9c0 bl a29c <rtems_bdbuf_anonymous_wait>
bb98: eaffffa7 b ba3c <rtems_bdbuf_get_buffer_for_access+0x1c>
static void
rtems_bdbuf_wait_for_access (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
bb9c: e5993024 ldr r3, [r9, #36] ; 0x24
bba0: e2433001 sub r3, r3, #1
bba4: e3530009 cmp r3, #9
bba8: 979ff103 ldrls pc, [pc, r3, lsl #2]
bbac: ea000017 b bc10 <rtems_bdbuf_get_buffer_for_access+0x1f0> <== NOT EXECUTED
bbb0: 0000bc24 .word 0x0000bc24 <== NOT EXECUTED
bbb4: 0000bbe8 .word 0x0000bbe8 <== NOT EXECUTED
bbb8: 0000bbf4 .word 0x0000bbf4 <== NOT EXECUTED
bbbc: 0000bbf4 .word 0x0000bbf4 <== NOT EXECUTED
bbc0: 0000bbf4 .word 0x0000bbf4 <== NOT EXECUTED
bbc4: 0000bbf4 .word 0x0000bbf4 <== NOT EXECUTED
bbc8: 0000bbd8 .word 0x0000bbd8 <== NOT EXECUTED
bbcc: 0000bc00 .word 0x0000bc00 <== NOT EXECUTED
bbd0: 0000bc00 .word 0x0000bc00 <== NOT EXECUTED
bbd4: 0000bc00 .word 0x0000bc00 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
bbd8: e599302c ldr r3, [r9, #44] ; 0x2c
bbdc: e593200c ldr r2, [r3, #12]
bbe0: e2422001 sub r2, r2, #1
bbe4: e583200c str r2, [r3, #12]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
bbe8: e1a00009 mov r0, r9
bbec: ebffec91 bl 6e38 <_Chain_Extract>
bbf0: ea00000b b bc24 <rtems_bdbuf_get_buffer_for_access+0x204>
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);
bbf4: e1a00009 mov r0, r9
bbf8: e59f1058 ldr r1, [pc, #88] ; bc58 <rtems_bdbuf_get_buffer_for_access+0x238>
bbfc: ea000001 b bc08 <rtems_bdbuf_get_buffer_for_access+0x1e8>
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);
bc00: e59f1054 ldr r1, [pc, #84] ; bc5c <rtems_bdbuf_get_buffer_for_access+0x23c>
bc04: e1a00009 mov r0, r9
bc08: ebfff9bf bl a30c <rtems_bdbuf_wait>
bc0c: eaffffe2 b bb9c <rtems_bdbuf_get_buffer_for_access+0x17c>
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_7);
bc10: e5990024 ldr r0, [r9, #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);
bc14: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
bc18: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bc1c: e3800005 orr r0, r0, #5 <== NOT EXECUTED
bc20: ebffeb46 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
bc24: e599302c ldr r3, [r9, #44] ; 0x2c
bc28: e593200c ldr r2, [r3, #12]
bc2c: e2822001 add r2, r2, #1
bc30: e583200c str r2, [r3, #12]
rtems_bdbuf_wait_for_access (bd);
rtems_bdbuf_group_obtain (bd);
return bd;
}
bc34: e1a00009 mov r0, r9
bc38: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
{
bd = rtems_bdbuf_avl_search (&bdbuf_cache.tree, dev, block);
if (bd != NULL)
{
if (bd->group->bds_per_group != bds_per_group)
bc3c: e599302c ldr r3, [r9, #44] ; 0x2c
bc40: e5933008 ldr r3, [r3, #8]
bc44: e1530008 cmp r3, r8
bc48: 0affffd3 beq bb9c <rtems_bdbuf_get_buffer_for_access+0x17c>
bc4c: eaffff9a b babc <rtems_bdbuf_get_buffer_for_access+0x9c>
0000b670 <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)
{
b670: 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;
b674: e59fc390 ldr ip, [pc, #912] ; ba0c <rtems_bdbuf_get_buffer_from_lru_list+0x39c>
b678: e24dd088 sub sp, sp, #136 ; 0x88
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
b67c: e1a0600c mov r6, ip
b680: e1a04000 mov r4, r0
b684: e1a05001 mov r5, r1
b688: e58d2004 str r2, [sp, #4]
b68c: e1a09003 mov r9, r3
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
b690: e59c8044 ldr r8, [ip, #68] ; 0x44
rtems_chain_node *node = rtems_chain_first (&bdbuf_cache.lru);
while (!rtems_chain_is_tail (&bdbuf_cache.lru, node))
b694: ea0000d4 b b9ec <rtems_bdbuf_get_buffer_from_lru_list+0x37c>
bd->group->bds_per_group, bds_per_group);
/*
* If nobody waits for this BD, we may recycle it.
*/
if (bd->waiters == 0)
b698: e5983028 ldr r3, [r8, #40] ; 0x28
b69c: e3530000 cmp r3, #0
b6a0: 1a0000d0 bne b9e8 <rtems_bdbuf_get_buffer_from_lru_list+0x378>
{
if (bd->group->bds_per_group == bds_per_group)
b6a4: e598702c ldr r7, [r8, #44] ; 0x2c
b6a8: e5971008 ldr r1, [r7, #8]
b6ac: e1510009 cmp r1, r9
b6b0: 1a000003 bne b6c4 <rtems_bdbuf_get_buffer_from_lru_list+0x54>
{
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
b6b4: e1a00008 mov r0, r8
b6b8: ebfffd0d bl aaf4 <rtems_bdbuf_remove_from_tree_and_lru_list>
b6bc: e1a00008 mov r0, r8
b6c0: ea000033 b b794 <rtems_bdbuf_get_buffer_from_lru_list+0x124>
empty_bd = bd;
}
else if (bd->group->users == 0)
b6c4: e597a00c ldr sl, [r7, #12]
b6c8: e35a0000 cmp sl, #0
b6cc: 1a0000c5 bne b9e8 <rtems_bdbuf_get_buffer_from_lru_list+0x378>
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
b6d0: e5960020 ldr r0, [r6, #32]
b6d4: eb003ff7 bl 1b6b8 <__aeabi_uidiv>
b6d8: e3a0303c mov r3, #60 ; 0x3c
b6dc: e0030390 mul r3, r0, r3
b6e0: e1a01005 mov r1, r5
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;
b6e4: e597b010 ldr fp, [r7, #16]
b6e8: e1a05004 mov r5, r4
b6ec: e1a04003 mov r4, r3
b6f0: ea000005 b b70c <rtems_bdbuf_get_buffer_from_lru_list+0x9c>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_remove_from_tree_and_lru_list (bd);
b6f4: e1a0000b mov r0, fp
b6f8: e58d1000 str r1, [sp]
b6fc: ebfffcfc bl aaf4 <rtems_bdbuf_remove_from_tree_and_lru_list>
bufs_per_bd = bdbuf_cache.max_bds_per_group / group->bds_per_group;
for (b = 0, bd = group->bdbuf;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
b700: e59d1000 ldr r1, [sp]
b704: e28aa001 add sl, sl, #1
b708: e08bb004 add fp, fp, r4
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;
b70c: e5972008 ldr r2, [r7, #8]
b710: e15a0002 cmp sl, r2
b714: 3afffff6 bcc b6f4 <rtems_bdbuf_get_buffer_from_lru_list+0x84>
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;
b718: e5879008 str r9, [r7, #8]
b71c: e1a04005 mov r4, r5
bufs_per_bd = bdbuf_cache.max_bds_per_group / new_bds_per_group;
for (b = 1, bd = group->bdbuf + bufs_per_bd;
b720: e5960020 ldr r0, [r6, #32]
b724: e1a05001 mov r5, r1
b728: e1a01009 mov r1, r9
b72c: eb003fe1 bl 1b6b8 <__aeabi_uidiv>
b730: e3a0303c mov r3, #60 ; 0x3c
b734: e0030390 mul r3, r0, r3
b738: e597b010 ldr fp, [r7, #16]
b73c: e1a0c008 mov ip, r8
b740: e08bb003 add fp, fp, r3
b744: e3a0a001 mov sl, #1
b748: e1a08003 mov r8, r3
b74c: ea000008 b b774 <rtems_bdbuf_get_buffer_from_lru_list+0x104>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b750: e3a01000 mov r1, #0
b754: e58b1024 str r1, [fp, #36] ; 0x24
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
b758: e59f02b0 ldr r0, [pc, #688] ; ba10 <rtems_bdbuf_get_buffer_from_lru_list+0x3a0>
b75c: e1a0100b mov r1, fp
b760: e58dc000 str ip, [sp]
b764: eb000eea bl f314 <_Chain_Insert>
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;
b < group->bds_per_group;
b++, bd += bufs_per_bd)
b768: e59dc000 ldr ip, [sp]
b76c: e28aa001 add sl, sl, #1
b770: e08bb008 add fp, fp, r8
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;
b774: e5972008 ldr r2, [r7, #8]
b778: e15a0002 cmp sl, r2
b77c: 3afffff3 bcc b750 <rtems_bdbuf_get_buffer_from_lru_list+0xe0>
b < group->bds_per_group;
b++, bd += bufs_per_bd)
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
if (b > 1)
b780: e35a0001 cmp sl, #1
b784: e1a0800c mov r8, ip
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
b788: 859f0284 ldrhi r0, [pc, #644] ; ba14 <rtems_bdbuf_get_buffer_from_lru_list+0x3a4>
b78c: 8bfff96a blhi 9d3c <rtems_bdbuf_wake>
return group->bdbuf;
b790: e5970010 ldr r0, [r7, #16]
}
else if (bd->group->users == 0)
empty_bd = rtems_bdbuf_group_realloc (bd->group, bds_per_group);
}
if (empty_bd != NULL)
b794: e3500000 cmp r0, #0
b798: 0a000092 beq b9e8 <rtems_bdbuf_get_buffer_from_lru_list+0x378>
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
bd->avl.left = NULL;
b79c: e3a02000 mov r2, #0
b7a0: e5802008 str r2, [r0, #8]
bd->avl.right = NULL;
b7a4: e580200c str r2, [r0, #12]
rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
b7a8: e59f125c ldr r1, [pc, #604] ; ba0c <rtems_bdbuf_get_buffer_from_lru_list+0x39c>
b7ac: e5913040 ldr r3, [r1, #64] ; 0x40
{
bd->dev = dev;
bd->block = block;
bd->avl.left = NULL;
bd->avl.right = NULL;
bd->waiters = 0;
b7b0: e5802028 str r2, [r0, #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)
b7b4: e1530002 cmp r3, r2
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
bd->block = block;
b7b8: e59d2004 ldr r2, [sp, #4]
static void
rtems_bdbuf_setup_empty_buffer (rtems_bdbuf_buffer *bd,
dev_t dev,
rtems_blkdev_bnum block)
{
bd->dev = dev;
b7bc: e5804014 str r4, [r0, #20]
b7c0: e5805018 str r5, [r0, #24]
bd->block = block;
b7c4: e580201c str r2, [r0, #28]
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
b7c8: 128dc008 addne ip, sp, #8
break;
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
b7cc: 13e07000 mvnne r7, #0
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
b7d0: 13a06001 movne r6, #1
rtems_bdbuf_buffer* buf_stack[RTEMS_BDBUF_AVL_MAX_HEIGHT];
rtems_bdbuf_buffer** buf_prev = buf_stack;
bool modified = false;
if (p == NULL)
b7d4: 1a000019 bne b840 <rtems_bdbuf_get_buffer_from_lru_list+0x1d0>
{
*root = node;
b7d8: e5810040 str r0, [r1, #64] ; 0x40
node->avl.left = NULL;
node->avl.right = NULL;
node->avl.bal = 0;
b7dc: e5c03011 strb r3, [r0, #17]
bool modified = false;
if (p == NULL)
{
*root = node;
node->avl.left = NULL;
b7e0: e5803008 str r3, [r0, #8]
node->avl.right = NULL;
b7e4: e580300c str r3, [r0, #12]
b7e8: ea00007b b b9dc <rtems_bdbuf_get_buffer_from_lru_list+0x36c>
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b7ec: e1520004 cmp r2, r4
b7f0: 1a00000c bne b828 <rtems_bdbuf_get_buffer_from_lru_list+0x1b8>
b7f4: e1510005 cmp r1, r5
b7f8: 1a00000a bne b828 <rtems_bdbuf_get_buffer_from_lru_list+0x1b8>
b7fc: e593201c ldr r2, [r3, #28]
b800: e59d1004 ldr r1, [sp, #4]
b804: e1520001 cmp r2, r1
b808: 2a000005 bcs b824 <rtems_bdbuf_get_buffer_from_lru_list+0x1b4>
{
p->avl.cache = 1;
q = p->avl.right;
b80c: e593200c ldr r2, [r3, #12]
if (q == NULL)
b810: e3520000 cmp r2, #0
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
b814: e5c36010 strb r6, [r3, #16]
q = p->avl.right;
if (q == NULL)
b818: 1a000007 bne b83c <rtems_bdbuf_get_buffer_from_lru_list+0x1cc>
{
q = node;
p->avl.right = q = node;
b81c: e583000c str r0, [r3, #12]
b820: ea00000f b b864 <rtems_bdbuf_get_buffer_from_lru_list+0x1f4>
break;
}
}
else if ((p->dev != dev) || (p->block != block))
b824: 0a000076 beq ba04 <rtems_bdbuf_get_buffer_from_lru_list+0x394>
{
p->avl.cache = -1;
q = p->avl.left;
b828: e5932008 ldr r2, [r3, #8]
if (q == NULL)
b82c: e3520000 cmp r2, #0
break;
}
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
b830: e5c37010 strb r7, [r3, #16]
q = p->avl.left;
if (q == NULL)
{
q = node;
p->avl.left = q;
b834: 05830008 streq r0, [r3, #8]
b838: 0a000009 beq b864 <rtems_bdbuf_get_buffer_from_lru_list+0x1f4>
b83c: e1a03002 mov r3, r2
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b840: e5931018 ldr r1, [r3, #24]
b844: e1550001 cmp r5, r1
return 0;
}
while (p != NULL)
{
*buf_prev++ = p;
b848: e48c3004 str r3, [ip], #4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
b84c: e5932014 ldr r2, [r3, #20]
b850: 8affffed bhi b80c <rtems_bdbuf_get_buffer_from_lru_list+0x19c>
b854: 1affffe4 bne b7ec <rtems_bdbuf_get_buffer_from_lru_list+0x17c>
b858: e1540002 cmp r4, r2
b85c: 8affffea bhi b80c <rtems_bdbuf_get_buffer_from_lru_list+0x19c>
b860: eaffffe1 b b7ec <rtems_bdbuf_get_buffer_from_lru_list+0x17c>
}
p = q;
}
q->avl.left = q->avl.right = NULL;
b864: e3a01000 mov r1, #0
b868: e580100c str r1, [r0, #12]
b86c: e5801008 str r1, [r0, #8]
q->avl.bal = 0;
b870: e5c01011 strb r1, [r0, #17]
b874: e24c4004 sub r4, ip, #4
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;
b878: e3a05001 mov r5, #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;
b87c: e3e06000 mvn r6, #0
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
b880: e28d7008 add r7, sp, #8
modified = true;
buf_prev--;
while (modified)
{
if (p->avl.cache == -1)
b884: e1d3c1d0 ldrsb ip, [r3, #16]
b888: e37c0001 cmn ip, #1
b88c: e1d321d1 ldrsb r2, [r3, #17]
b890: 1a00001d bne b90c <rtems_bdbuf_get_buffer_from_lru_list+0x29c>
{
switch (p->avl.bal)
b894: e3520000 cmp r2, #0
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = -1;
b898: 05c3c011 strbeq ip, [r3, #17]
while (modified)
{
if (p->avl.cache == -1)
{
switch (p->avl.bal)
b89c: 0a00003f beq b9a0 <rtems_bdbuf_get_buffer_from_lru_list+0x330>
b8a0: e3520001 cmp r2, #1
b8a4: 0a00001f beq b928 <rtems_bdbuf_get_buffer_from_lru_list+0x2b8>
b8a8: e3720001 cmn r2, #1
b8ac: 1a00003b bne b9a0 <rtems_bdbuf_get_buffer_from_lru_list+0x330>
case 0:
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
b8b0: e5932008 ldr r2, [r3, #8]
if (p1->avl.bal == -1) /* simple LL-turn */
b8b4: e1d2c1d1 ldrsb ip, [r2, #17]
b8b8: e37c0001 cmn ip, #1
b8bc: e592c00c ldr ip, [r2, #12]
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
p->avl.bal = 0;
b8c0: 05c31011 strbeq r1, [r3, #17]
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
b8c4: 0583c008 streq ip, [r3, #8]
p1->avl.right = p;
b8c8: 0582300c streq r3, [r2, #12]
p->avl.bal = -1;
break;
case -1:
p1 = p->avl.left;
if (p1->avl.bal == -1) /* simple LL-turn */
b8cc: 0a000030 beq b994 <rtems_bdbuf_get_buffer_from_lru_list+0x324>
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
b8d0: e59c8008 ldr r8, [ip, #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;
b8d4: e1dca1d1 ldrsb sl, [ip, #17]
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
b8d8: e582800c str r8, [r2, #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;
b8dc: e37a0001 cmn sl, #1
b8e0: 05c35011 strbeq r5, [r3, #17]
b8e4: 15c31011 strbne r1, [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;
b8e8: e59c800c ldr r8, [ip, #12]
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
b8ec: e58c2008 str r2, [ip, #8]
p->avl.left = p2->avl.right;
p2->avl.right = p;
b8f0: e58c300c str r3, [ip, #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;
b8f4: e5838008 str r8, [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;
b8f8: e1dc31d1 ldrsb r3, [ip, #17]
b8fc: e3530001 cmp r3, #1
b900: 05c26011 strbeq r6, [r2, #17]
b904: 1a000020 bne b98c <rtems_bdbuf_get_buffer_from_lru_list+0x31c>
b908: ea000020 b b990 <rtems_bdbuf_get_buffer_from_lru_list+0x320><== NOT EXECUTED
break;
}
}
else
{
switch (p->avl.bal)
b90c: e3520000 cmp r2, #0
p->avl.bal = 0;
modified = false;
break;
case 0:
p->avl.bal = 1;
b910: 05c35011 strbeq r5, [r3, #17]
break;
}
}
else
{
switch (p->avl.bal)
b914: 0a000021 beq b9a0 <rtems_bdbuf_get_buffer_from_lru_list+0x330>
b918: e3520001 cmp r2, #1
b91c: 0a000004 beq b934 <rtems_bdbuf_get_buffer_from_lru_list+0x2c4>
b920: e3720001 cmn r2, #1
b924: 1a00001d bne b9a0 <rtems_bdbuf_get_buffer_from_lru_list+0x330>
{
case -1:
p->avl.bal = 0;
b928: e5c31011 strb r1, [r3, #17]
b92c: e1a02003 mov r2, r3
b930: ea000018 b b998 <rtems_bdbuf_get_buffer_from_lru_list+0x328>
case 0:
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
b934: e593200c ldr r2, [r3, #12]
if (p1->avl.bal == 1) /* simple RR-turn */
b938: e1d2c1d1 ldrsb ip, [r2, #17]
b93c: e35c0001 cmp ip, #1
b940: e592c008 ldr ip, [r2, #8]
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
p->avl.bal = 0;
b944: 05c31011 strbeq r1, [r3, #17]
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
b948: 0583c00c streq ip, [r3, #12]
p1->avl.left = p;
b94c: 05823008 streq r3, [r2, #8]
p->avl.bal = 1;
break;
case 1:
p1 = p->avl.right;
if (p1->avl.bal == 1) /* simple RR-turn */
b950: 0a00000f beq b994 <rtems_bdbuf_get_buffer_from_lru_list+0x324>
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
b954: e59c800c ldr r8, [ip, #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;
b958: e1dca1d1 ldrsb sl, [ip, #17] <== NOT EXECUTED
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
b95c: e5828008 str r8, [r2, #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;
b960: e35a0001 cmp sl, #1 <== NOT EXECUTED
b964: 05c36011 strbeq r6, [r3, #17] <== NOT EXECUTED
b968: 15c31011 strbne r1, [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;
b96c: e59c8008 ldr r8, [ip, #8] <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
b970: e58c200c str r2, [ip, #12] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
b974: e58c3008 str r3, [ip, #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;
b978: e583800c str r8, [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;
b97c: e1dc31d1 ldrsb r3, [ip, #17] <== NOT EXECUTED
b980: e3730001 cmn r3, #1 <== NOT EXECUTED
b984: 05c25011 strbeq r5, [r2, #17] <== NOT EXECUTED
b988: 0a000000 beq b990 <rtems_bdbuf_get_buffer_from_lru_list+0x320><== NOT EXECUTED
b98c: e5c21011 strb r1, [r2, #17]
b990: e1a0200c mov r2, ip
p = p2;
}
p->avl.bal = 0;
b994: e5c21011 strb r1, [r2, #17]
b998: e3a0c000 mov ip, #0
b99c: ea000001 b b9a8 <rtems_bdbuf_get_buffer_from_lru_list+0x338>
b9a0: e1a02003 mov r2, r3
b9a4: e3a0c001 mov ip, #1
default:
break;
}
}
q = p;
if (buf_prev > buf_stack)
b9a8: e1540007 cmp r4, r7
b9ac: 9a000008 bls b9d4 <rtems_bdbuf_get_buffer_from_lru_list+0x364>
{
p = *--buf_prev;
b9b0: e5143004 ldr r3, [r4, #-4]
if (p->avl.cache == -1)
b9b4: e1d381d0 ldrsb r8, [r3, #16]
b9b8: e3780001 cmn r8, #1
{
p->avl.left = q;
b9bc: 05832008 streq r2, [r3, #8]
}
else
{
p->avl.right = q;
b9c0: 1583200c strne r2, [r3, #12]
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
b9c4: e35c0000 cmp ip, #0
p->avl.right = q;
}
}
else
{
*root = p;
b9c8: e2444004 sub r4, r4, #4
q->avl.left = q->avl.right = NULL;
q->avl.bal = 0;
modified = true;
buf_prev--;
while (modified)
b9cc: 1affffac bne b884 <rtems_bdbuf_get_buffer_from_lru_list+0x214>
b9d0: ea000001 b b9dc <rtems_bdbuf_get_buffer_from_lru_list+0x36c>
p->avl.right = q;
}
}
else
{
*root = p;
b9d4: e59f3030 ldr r3, [pc, #48] ; ba0c <rtems_bdbuf_get_buffer_from_lru_list+0x39c>
b9d8: e5832040 str r2, [r3, #64] ; 0x40
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b9dc: e3a03001 mov r3, #1
b9e0: e5803024 str r3, [r0, #36] ; 0x24
if (empty_bd != NULL)
{
rtems_bdbuf_setup_empty_buffer (empty_bd, dev, block);
return empty_bd;
b9e4: ea000004 b b9fc <rtems_bdbuf_get_buffer_from_lru_list+0x38c>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
b9e8: e5988000 ldr r8, [r8]
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
b9ec: e59f2024 ldr r2, [pc, #36] ; ba18 <rtems_bdbuf_get_buffer_from_lru_list+0x3a8>
b9f0: e1580002 cmp r8, r2
b9f4: 1affff27 bne b698 <rtems_bdbuf_get_buffer_from_lru_list+0x28>
b9f8: e3a00000 mov r0, #0
node = rtems_chain_next (node);
}
return NULL;
}
b9fc: e28dd088 add sp, sp, #136 ; 0x88
ba00: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
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);
ba04: e59f0010 ldr r0, [pc, #16] ; ba1c <rtems_bdbuf_get_buffer_from_lru_list+0x3ac><== NOT EXECUTED
ba08: ebffebcc bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000a358 <rtems_bdbuf_init>:
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
a358: 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())
a35c: e59f33b0 ldr r3, [pc, #944] ; a714 <rtems_bdbuf_init+0x3bc>
a360: e5933000 ldr r3, [r3]
a364: e3530000 cmp r3, #0
*
* @return rtems_status_code The initialisation status.
*/
rtems_status_code
rtems_bdbuf_init (void)
{
a368: e24dd014 sub sp, sp, #20
rtems_mode prev_mode;
if (rtems_bdbuf_tracer)
printf ("bdbuf:init\n");
if (rtems_interrupt_is_in_progress())
a36c: 13a00012 movne r0, #18
a370: 1a0000e5 bne a70c <rtems_bdbuf_init+0x3b4>
return RTEMS_CALLED_FROM_ISR;
/*
* Check the configuration table values.
*/
if ((bdbuf_config.buffer_max % bdbuf_config.buffer_min) != 0)
a374: e59f739c ldr r7, [pc, #924] ; a718 <rtems_bdbuf_init+0x3c0>
a378: e5973024 ldr r3, [r7, #36] ; 0x24
a37c: e5976020 ldr r6, [r7, #32]
a380: e1a00003 mov r0, r3
a384: e1a01006 mov r1, r6
a388: e58d3010 str r3, [sp, #16]
a38c: eb00455d bl 1b908 <__umodsi3>
a390: e3500000 cmp r0, #0
a394: 13a0000a movne r0, #10
a398: 1a0000db bne a70c <rtems_bdbuf_init+0x3b4>
/*
* 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 ();
a39c: ebffffa4 bl a234 <rtems_bdbuf_disable_preemption>
if (bdbuf_cache.initialised)
a3a0: e59f4374 ldr r4, [pc, #884] ; a71c <rtems_bdbuf_init+0x3c4>
a3a4: e5d45088 ldrb r5, [r4, #136] ; 0x88
a3a8: e3550000 cmp r5, #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 ();
a3ac: e1a08000 mov r8, r0
if (bdbuf_cache.initialised)
a3b0: 0a000002 beq a3c0 <rtems_bdbuf_init+0x68>
{
rtems_bdbuf_restore_preemption (prev_mode);
a3b4: ebffffac bl a26c <rtems_bdbuf_restore_preemption> <== NOT EXECUTED
a3b8: e3a0000c mov r0, #12 <== NOT EXECUTED
return RTEMS_RESOURCE_IN_USE;
a3bc: ea0000d2 b a70c <rtems_bdbuf_init+0x3b4> <== NOT EXECUTED
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
a3c0: e1a01005 mov r1, r5
a3c4: e3a0208c mov r2, #140 ; 0x8c
a3c8: e1a00004 mov r0, r4
a3cc: eb0021e3 bl 12b60 <memset>
bdbuf_cache.initialised = true;
rtems_bdbuf_restore_preemption (prev_mode);
a3d0: e1a00008 mov r0, r8
rtems_bdbuf_restore_preemption (prev_mode);
return RTEMS_RESOURCE_IN_USE;
}
memset(&bdbuf_cache, 0, sizeof(bdbuf_cache));
bdbuf_cache.initialised = true;
a3d4: e3a08001 mov r8, #1
a3d8: e5c48088 strb r8, [r4, #136] ; 0x88
rtems_bdbuf_restore_preemption (prev_mode);
a3dc: ebffffa2 bl a26c <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;
a3e0: e3e0a000 mvn sl, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a3e4: e284c00c add ip, r4, #12
a3e8: e3e0b000 mvn fp, #0
a3ec: e584a038 str sl, [r4, #56] ; 0x38
a3f0: e584b03c str fp, [r4, #60] ; 0x3c
a3f4: e584c008 str ip, [r4, #8]
a3f8: e59fb320 ldr fp, [pc, #800] ; a720 <rtems_bdbuf_init+0x3c8>
a3fc: e59fc320 ldr ip, [pc, #800] ; a724 <rtems_bdbuf_init+0x3cc>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
a400: e59fa320 ldr sl, [pc, #800] ; a728 <rtems_bdbuf_init+0x3d0>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a404: e584b044 str fp, [r4, #68] ; 0x44
a408: e584c050 str ip, [r4, #80] ; 0x50
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
a40c: e584a058 str sl, [r4, #88] ; 0x58
a410: e59fc314 ldr ip, [pc, #788] ; a72c <rtems_bdbuf_init+0x3d4>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a414: e59fb314 ldr fp, [pc, #788] ; a730 <rtems_bdbuf_init+0x3d8>
rtems_chain_initialize_empty (&bdbuf_cache.sync);
/*
* Create the locks for the cache.
*/
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'l'),
a418: e59fa314 ldr sl, [pc, #788] ; a734 <rtems_bdbuf_init+0x3dc>
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
a41c: e284e008 add lr, r4, #8
a420: e2849044 add r9, r4, #68 ; 0x44
a424: e1a03005 mov r3, r5
a428: e584e010 str lr, [r4, #16]
a42c: e584904c str r9, [r4, #76] ; 0x4c
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
a430: e584b05c str fp, [r4, #92] ; 0x5c
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
a434: e584c064 str ip, [r4, #100] ; 0x64
a438: e59f02f8 ldr r0, [pc, #760] ; a738 <rtems_bdbuf_init+0x3e0>
a43c: e58da000 str sl, [sp]
a440: e1a01008 mov r1, r8
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
a444: e584500c str r5, [r4, #12]
a448: e5845048 str r5, [r4, #72] ; 0x48
a44c: e5845054 str r5, [r4, #84] ; 0x54
a450: e5845060 str r5, [r4, #96] ; 0x60
a454: e3a02054 mov r2, #84 ; 0x54
a458: ebffef37 bl 613c <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.lock);
if (sc != RTEMS_SUCCESSFUL)
a45c: e2505000 subs r5, r0, #0
a460: 1a00008c bne a698 <rtems_bdbuf_init+0x340>
goto error;
rtems_bdbuf_lock_cache ();
a464: ebfffe2e bl 9d24 <rtems_bdbuf_lock_cache>
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 's'),
a468: e1a01008 mov r1, r8
a46c: e284c02c add ip, r4, #44 ; 0x2c
a470: e1a03005 mov r3, r5
a474: e59f02c0 ldr r0, [pc, #704] ; a73c <rtems_bdbuf_init+0x3e4>
a478: e3a02054 mov r2, #84 ; 0x54
a47c: e58dc000 str ip, [sp]
a480: ebffef2d bl 613c <rtems_semaphore_create>
1, RTEMS_BDBUF_CACHE_LOCK_ATTRIBS, 0,
&bdbuf_cache.sync_lock);
if (sc != RTEMS_SUCCESSFUL)
a484: e2501000 subs r1, r0, #0
a488: 1a000082 bne a698 <rtems_bdbuf_init+0x340>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'a'),
a48c: e284c06c add ip, r4, #108 ; 0x6c
a490: e1a03001 mov r3, r1
a494: e59f02a4 ldr r0, [pc, #676] ; a740 <rtems_bdbuf_init+0x3e8>
a498: e3a02024 mov r2, #36 ; 0x24
a49c: e58dc000 str ip, [sp]
a4a0: ebffef25 bl 613c <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.access_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
a4a4: e2501000 subs r1, r0, #0
a4a8: 1a00007a bne a698 <rtems_bdbuf_init+0x340>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 't'),
a4ac: e284c074 add ip, r4, #116 ; 0x74
a4b0: e1a03001 mov r3, r1
a4b4: e59f0288 ldr r0, [pc, #648] ; a744 <rtems_bdbuf_init+0x3ec>
a4b8: e3a02024 mov r2, #36 ; 0x24
a4bc: e58dc000 str ip, [sp]
a4c0: ebffef1d bl 613c <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.transfer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
a4c4: e2501000 subs r1, r0, #0
a4c8: 1a000072 bne a698 <rtems_bdbuf_init+0x340>
goto error;
sc = rtems_semaphore_create (rtems_build_name ('B', 'D', 'C', 'b'),
a4cc: e284c07c add ip, r4, #124 ; 0x7c
a4d0: e59f0270 ldr r0, [pc, #624] ; a748 <rtems_bdbuf_init+0x3f0>
a4d4: e3a02024 mov r2, #36 ; 0x24
a4d8: e1a03001 mov r3, r1
a4dc: e58dc000 str ip, [sp]
a4e0: ebffef15 bl 613c <rtems_semaphore_create>
0, RTEMS_BDBUF_CACHE_WAITER_ATTRIBS, 0,
&bdbuf_cache.buffer_waiters.sema);
if (sc != RTEMS_SUCCESSFUL)
a4e4: e3500000 cmp r0, #0
a4e8: 1a00006a bne a698 <rtems_bdbuf_init+0x340>
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
bdbuf_config.size / bdbuf_config.buffer_min;
a4ec: e597001c ldr r0, [r7, #28]
a4f0: e1a01006 mov r1, r6
a4f4: eb00446f bl 1b6b8 <__aeabi_uidiv>
a4f8: e1a05000 mov r5, r0
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
a4fc: e1a01006 mov r1, r6
a500: e59d0010 ldr r0, [sp, #16]
goto error;
/*
* Compute the various number of elements in the cache.
*/
bdbuf_cache.buffer_min_count =
a504: e584501c str r5, [r4, #28]
bdbuf_config.size / bdbuf_config.buffer_min;
bdbuf_cache.max_bds_per_group =
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
a508: eb00446a bl 1b6b8 <__aeabi_uidiv>
a50c: e1a03000 mov r3, r0
bdbuf_cache.group_count =
a510: e1a01000 mov r1, r0
/*
* 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 =
a514: e5843020 str r3, [r4, #32]
bdbuf_config.buffer_max / bdbuf_config.buffer_min;
bdbuf_cache.group_count =
a518: e1a00005 mov r0, r5
a51c: eb004465 bl 1b6b8 <__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),
a520: e1a01005 mov r1, r5
*/
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 =
a524: 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),
a528: e3a0003c mov r0, #60 ; 0x3c
a52c: ebffe19a bl 2b9c <calloc>
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
a530: 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),
a534: e5840014 str r0, [r4, #20]
bdbuf_cache.buffer_min_count);
if (!bdbuf_cache.bds)
a538: 0a000056 beq a698 <rtems_bdbuf_init+0x340>
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
a53c: e3a00014 mov r0, #20
a540: e5941080 ldr r1, [r4, #128] ; 0x80
a544: ebffe194 bl 2b9c <calloc>
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
a548: e3500000 cmp r0, #0
goto error;
/*
* Allocate the memory for the buffer descriptors.
*/
bdbuf_cache.groups = calloc (sizeof (rtems_bdbuf_group),
a54c: e5840084 str r0, [r4, #132] ; 0x84
bdbuf_cache.group_count);
if (!bdbuf_cache.groups)
a550: 0a000050 beq a698 <rtems_bdbuf_init+0x340>
* 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,
a554: e59f71c0 ldr r7, [pc, #448] ; a71c <rtems_bdbuf_init+0x3c4>
a558: e597201c ldr r2, [r7, #28]
a55c: e2870018 add r0, r7, #24
a560: e0020296 mul r2, r6, r2
a564: e3a01020 mov r1, #32
a568: eb000f9c bl e3e0 <rtems_memalign>
a56c: e2505000 subs r5, r0, #0
a570: 1a000048 bne a698 <rtems_bdbuf_init+0x340>
/*
* 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,
a574: e1a0a007 mov sl, r7
a578: e5978084 ldr r8, [r7, #132] ; 0x84
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
a57c: e5974014 ldr r4, [r7, #20]
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
a580: e3e02000 mvn r2, #0
/*
* 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,
bd = bdbuf_cache.bds, buffer = bdbuf_cache.buffers;
a584: e5977018 ldr r7, [r7, #24]
b < bdbuf_cache.buffer_min_count;
b++, bd++, buffer += bdbuf_config.buffer_min)
{
bd->dev = BDBUF_INVALID_DEV;
a588: e3e03000 mvn r3, #0
a58c: e1a09006 mov r9, r6
/*
* 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,
a590: ea000012 b a5e0 <rtems_bdbuf_init+0x288>
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;
a594: e5842014 str r2, [r4, #20]
a598: e5843018 str r3, [r4, #24]
bd->group = group;
a59c: e584802c str r8, [r4, #44] ; 0x2c
bd->buffer = buffer;
a5a0: e5847020 str r7, [r4, #32]
a5a4: e58d200c str r2, [sp, #12]
a5a8: e58d3008 str r3, [sp, #8]
a5ac: ebfff216 bl 6e0c <_Chain_Append>
rtems_chain_append (&bdbuf_cache.lru, &bd->link);
if ((b % bdbuf_cache.max_bds_per_group) ==
a5b0: e59a6020 ldr r6, [sl, #32]
a5b4: e1a00005 mov r0, r5
a5b8: e1a01006 mov r1, r6
a5bc: eb0044d1 bl 1b908 <__umodsi3>
a5c0: e2466001 sub r6, r6, #1
a5c4: e1500006 cmp r0, r6
a5c8: e59d200c ldr r2, [sp, #12]
a5cc: e59d3008 ldr r3, [sp, #8]
(bdbuf_cache.max_bds_per_group - 1))
group++;
a5d0: 02888014 addeq r8, r8, #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)
a5d4: e2855001 add r5, r5, #1
a5d8: e284403c add r4, r4, #60 ; 0x3c
a5dc: e0877009 add r7, r7, r9
/*
* 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,
a5e0: e59a001c ldr r0, [sl, #28]
a5e4: e59fc130 ldr ip, [pc, #304] ; a71c <rtems_bdbuf_init+0x3c4>
a5e8: e1550000 cmp r5, r0
a5ec: e1a01004 mov r1, r4
a5f0: e28c0044 add r0, ip, #68 ; 0x44
a5f4: 3affffe6 bcc a594 <rtems_bdbuf_init+0x23c>
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
a5f8: e59c0020 ldr r0, [ip, #32]
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
a5fc: e3a0303c mov r3, #60 ; 0x3c
a600: e00e0093 mul lr, r3, r0
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
a604: e59c1014 ldr r1, [ip, #20]
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
group = bdbuf_cache.groups,
a608: e59c3084 ldr r3, [ip, #132] ; 0x84
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
a60c: e3a02000 mov r2, #0
}
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
a610: e59cc080 ldr ip, [ip, #128] ; 0x80
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
a614: ea000004 b a62c <rtems_bdbuf_init+0x2d4>
b++,
group++,
bd += bdbuf_cache.max_bds_per_group)
{
group->bds_per_group = bdbuf_cache.max_bds_per_group;
group->bdbuf = bd;
a618: e5831010 str r1, [r3, #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;
a61c: e5830008 str r0, [r3, #8]
for (b = 0,
group = bdbuf_cache.groups,
bd = bdbuf_cache.bds;
b < bdbuf_cache.group_count;
b++,
a620: e2822001 add r2, r2, #1
group++,
a624: e2833014 add r3, r3, #20
bd += bdbuf_cache.max_bds_per_group)
a628: e081100e add r1, r1, lr
if ((b % bdbuf_cache.max_bds_per_group) ==
(bdbuf_cache.max_bds_per_group - 1))
group++;
}
for (b = 0,
a62c: e152000c cmp r2, ip
a630: 3afffff8 bcc a618 <rtems_bdbuf_init+0x2c0>
* threads.
*/
bdbuf_cache.swapout_enabled = true;
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
bdbuf_config.swapout_priority ?
a634: e59f30dc ldr r3, [pc, #220] ; a718 <rtems_bdbuf_init+0x3c0>
a638: e5931008 ldr r1, [r3, #8]
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
a63c: e59f40d8 ldr r4, [pc, #216] ; a71c <rtems_bdbuf_init+0x3c4>
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
a640: e3510000 cmp r1, #0
/*
* Create and start swapout task. This task will create and manage the worker
* threads.
*/
bdbuf_cache.swapout_enabled = true;
a644: e3a0c001 mov ip, #1
a648: e5c4c004 strb ip, [r4, #4]
sc = rtems_task_create (rtems_build_name('B', 'S', 'W', 'P'),
a64c: 03a0100f moveq r1, #15
a650: e3a0c000 mov ip, #0
a654: e59f00f0 ldr r0, [pc, #240] ; a74c <rtems_bdbuf_init+0x3f4>
a658: e3a02a02 mov r2, #8192 ; 0x2000
a65c: e3a03b01 mov r3, #1024 ; 0x400
a660: e58dc000 str ip, [sp]
a664: e58d4004 str r4, [sp, #4]
a668: ebffefb2 bl 6538 <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)
a66c: e3500000 cmp r0, #0
a670: 1a000008 bne a698 <rtems_bdbuf_init+0x340>
goto error;
sc = rtems_task_start (bdbuf_cache.swapout,
a674: e1a02004 mov r2, r4
a678: e5940000 ldr r0, [r4]
a67c: e59f10cc ldr r1, [pc, #204] ; a750 <rtems_bdbuf_init+0x3f8>
a680: ebfff03c bl 6778 <rtems_task_start>
rtems_bdbuf_swapout_task,
(rtems_task_argument) &bdbuf_cache);
if (sc != RTEMS_SUCCESSFUL)
a684: e2504000 subs r4, r0, #0
a688: 1a000002 bne a698 <rtems_bdbuf_init+0x340>
goto error;
rtems_bdbuf_unlock_cache ();
a68c: ebfffe1d bl 9f08 <rtems_bdbuf_unlock_cache>
a690: e1a00004 mov r0, r4
return RTEMS_SUCCESSFUL;
a694: ea00001c b a70c <rtems_bdbuf_init+0x3b4>
error:
if (bdbuf_cache.swapout != 0)
a698: e59f307c ldr r3, [pc, #124] ; a71c <rtems_bdbuf_init+0x3c4><== NOT EXECUTED
a69c: e5930000 ldr r0, [r3] <== NOT EXECUTED
a6a0: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_task_delete (bdbuf_cache.swapout);
a6a4: 1bffeff5 blne 6680 <rtems_task_delete> <== NOT EXECUTED
free (bdbuf_cache.buffers);
a6a8: e59f406c ldr r4, [pc, #108] ; a71c <rtems_bdbuf_init+0x3c4><== NOT EXECUTED
a6ac: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
a6b0: ebffe1c1 bl 2dbc <free> <== NOT EXECUTED
free (bdbuf_cache.groups);
a6b4: e5940084 ldr r0, [r4, #132] ; 0x84 <== NOT EXECUTED
a6b8: ebffe1bf bl 2dbc <free> <== NOT EXECUTED
free (bdbuf_cache.bds);
a6bc: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
a6c0: ebffe1bd bl 2dbc <free> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.buffer_waiters.sema);
a6c4: e594007c ldr r0, [r4, #124] ; 0x7c <== NOT EXECUTED
a6c8: ebffef06 bl 62e8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.access_waiters.sema);
a6cc: e594006c ldr r0, [r4, #108] ; 0x6c <== NOT EXECUTED
a6d0: ebffef04 bl 62e8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.transfer_waiters.sema);
a6d4: e5940074 ldr r0, [r4, #116] ; 0x74 <== NOT EXECUTED
a6d8: ebffef02 bl 62e8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.sync_lock);
a6dc: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED
a6e0: ebffef00 bl 62e8 <rtems_semaphore_delete> <== NOT EXECUTED
if (bdbuf_cache.lock != 0)
a6e4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
a6e8: e3530000 cmp r3, #0 <== NOT EXECUTED
a6ec: 0a000002 beq a6fc <rtems_bdbuf_init+0x3a4> <== NOT EXECUTED
{
rtems_bdbuf_unlock_cache ();
a6f0: ebfffe04 bl 9f08 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
rtems_semaphore_delete (bdbuf_cache.lock);
a6f4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
a6f8: ebffeefa bl 62e8 <rtems_semaphore_delete> <== NOT EXECUTED
}
bdbuf_cache.initialised = false;
a6fc: e59f3018 ldr r3, [pc, #24] ; a71c <rtems_bdbuf_init+0x3c4> <== NOT EXECUTED
a700: e3a02000 mov r2, #0 <== NOT EXECUTED
a704: e5c32088 strb r2, [r3, #136] ; 0x88 <== NOT EXECUTED
a708: e3a0000d mov r0, #13 <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
a70c: e28dd014 add sp, sp, #20
a710: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00009d00 <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)
{
9d00: e92d4010 push {r4, lr}
9d04: e1a04001 mov r4, r1
rtems_status_code sc = rtems_semaphore_obtain (lock,
9d08: e3a01000 mov r1, #0
9d0c: e1a02001 mov r2, r1
9d10: ebfff19b bl 6384 <rtems_semaphore_obtain>
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
9d14: e3500000 cmp r0, #0
9d18: 08bd8010 popeq {r4, pc}
rtems_fatal_error_occurred (fatal_error_code);
9d1c: e1a00004 mov r0, r4 <== NOT EXECUTED
9d20: ebfff306 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
00009f58 <rtems_bdbuf_obtain_disk>:
rtems_blkdev_bnum *media_block_ptr,
size_t *bds_per_group_ptr)
{
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
9f58: e59fc0e4 ldr ip, [pc, #228] ; a044 <rtems_bdbuf_obtain_disk+0xec>
9f5c: e5dcc088 ldrb ip, [ip, #136] ; 0x88
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)
{
9f60: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
9f64: 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)
{
9f68: e1a07002 mov r7, r2
9f6c: e1a08003 mov r8, r3
9f70: e59d6018 ldr r6, [sp, #24]
9f74: e59d501c ldr r5, [sp, #28]
rtems_disk_device *dd = NULL;
if (!bdbuf_cache.initialised)
9f78: 03a00016 moveq r0, #22
9f7c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
return RTEMS_NOT_CONFIGURED;
/*
* Do not hold the cache lock when obtaining the disk table.
*/
dd = rtems_disk_obtain (dev);
9f80: ebffdfc1 bl 1e8c <rtems_disk_obtain>
if (dd == NULL)
9f84: e2504000 subs r4, r0, #0
9f88: 02800004 addeq r0, r0, #4
9f8c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc}
return RTEMS_INVALID_ID;
*dd_ptr = dd;
if (media_block_ptr != NULL)
9f90: e3560000 cmp r6, #0
*/
dd = rtems_disk_obtain (dev);
if (dd == NULL)
return RTEMS_INVALID_ID;
*dd_ptr = dd;
9f94: e5884000 str r4, [r8]
if (media_block_ptr != NULL)
9f98: 0a00000c beq 9fd0 <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)
9f9c: e5940020 ldr r0, [r4, #32]
9fa0: e0832097 umull r2, r3, r7, r0
9fa4: e1a00002 mov r0, r2
9fa8: e1a01003 mov r1, r3
9fac: e5942024 ldr r2, [r4, #36] ; 0x24
9fb0: e3a03000 mov r3, #0
9fb4: eb004b6c bl 1cd6c <__udivdi3>
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
9fb8: e594301c ldr r3, [r4, #28]
9fbc: e1500003 cmp r0, r3
{
rtems_disk_release(dd);
return RTEMS_INVALID_NUMBER;
}
*media_block_ptr = mb + dd->start;
9fc0: 35943018 ldrcc r3, [r4, #24]
9fc4: 30800003 addcc r0, r0, r3
9fc8: 35860000 strcc r0, [r6]
* the user.
*/
rtems_blkdev_bnum mb = rtems_bdbuf_media_block (block,
dd->block_size,
dd->media_block_size);
if (mb >= dd->size)
9fcc: 2a000015 bcs a028 <rtems_bdbuf_obtain_disk+0xd0>
}
*media_block_ptr = mb + dd->start;
}
if (bds_per_group_ptr != NULL)
9fd0: e3550000 cmp r5, #0
9fd4: 01a00005 moveq r0, r5
9fd8: 08bd81f0 popeq {r4, r5, r6, r7, r8, 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)
9fdc: e59f3064 ldr r3, [pc, #100] ; a048 <rtems_bdbuf_obtain_disk+0xf0>
*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);
9fe0: 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)
9fe4: e5932024 ldr r2, [r3, #36] ; 0x24
9fe8: e1500002 cmp r0, r2
9fec: 8a00000d bhi a028 <rtems_bdbuf_obtain_disk+0xd0>
return 0;
bufs_per_size = ((size - 1) / bdbuf_config.buffer_min) + 1;
9ff0: e5931020 ldr r1, [r3, #32]
9ff4: e2400001 sub r0, r0, #1
9ff8: eb0045ae bl 1b6b8 <__aeabi_uidiv>
9ffc: e3a01001 mov r1, #1
a000: e2800001 add r0, r0, #1
a004: ea000000 b a00c <rtems_bdbuf_obtain_disk+0xb4>
for (bds_per_size = 1;
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
a008: 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;
a00c: e1510000 cmp r1, r0
a010: 3afffffc bcc a008 <rtems_bdbuf_obtain_disk+0xb0>
bds_per_size < bufs_per_size;
bds_per_size <<= 1)
;
return bdbuf_cache.max_bds_per_group / bds_per_size;
a014: e59f3028 ldr r3, [pc, #40] ; a044 <rtems_bdbuf_obtain_disk+0xec>
a018: e5930020 ldr r0, [r3, #32]
a01c: eb0045a5 bl 1b6b8 <__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)
a020: e3500000 cmp r0, #0
a024: 1a000003 bne a038 <rtems_bdbuf_obtain_disk+0xe0>
{
rtems_disk_release (dd);
a028: e1a00004 mov r0, r4 <== NOT EXECUTED
a02c: ebffe012 bl 207c <rtems_disk_release> <== NOT EXECUTED
a030: e3a0000a mov r0, #10 <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
a034: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
}
*bds_per_group_ptr = bds_per_group;
a038: e5850000 str r0, [r5]
a03c: e3a00000 mov r0, #0
}
return RTEMS_SUCCESSFUL;
}
a040: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000ad08 <rtems_bdbuf_purge>:
}
}
static void
rtems_bdbuf_purge (rtems_bdbuf_purge_compare compare, dev_t dev)
{
ad08: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
ad0c: e24dd094 sub sp, sp, #148 ; 0x94
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ad10: e28d6088 add r6, sp, #136 ; 0x88
the_chain->permanent_null = NULL;
ad14: e3a04000 mov r4, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
ad18: e2863004 add r3, r6, #4
ad1c: e58d3088 str r3, [sp, #136] ; 0x88
the_chain->permanent_null = NULL;
ad20: e58d408c str r4, [sp, #140] ; 0x8c
ad24: e1a07000 mov r7, r0
the_chain->last = _Chain_Head(the_chain);
ad28: e58d6090 str r6, [sp, #144] ; 0x90
ad2c: e88d0006 stm sp, {r1, r2}
rtems_chain_control purge_list;
rtems_chain_initialize_empty (&purge_list);
rtems_bdbuf_lock_cache ();
ad30: ebfffbfb bl 9d24 <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;
ad34: e59f3158 ldr r3, [pc, #344] ; ae94 <rtems_bdbuf_purge+0x18c>
*prev = NULL;
ad38: e28d5094 add r5, sp, #148 ; 0x94
ad3c: e525408c str r4, [r5, #-140]! ; 0x8c
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ad40: e3a08006 mov r8, #6
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;
ad44: e5934040 ldr r4, [r3, #64] ; 0x40
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ad48: e3a0a00a mov sl, #10
ad4c: ea00003c b ae44 <rtems_bdbuf_purge+0x13c>
*prev = NULL;
while (cur != NULL)
{
if ((*compare) (cur->dev, dev))
ad50: e2841014 add r1, r4, #20
ad54: e8910003 ldm r1, {r0, r1}
ad58: e89d000c ldm sp, {r2, r3}
ad5c: e1a0e00f mov lr, pc
ad60: e12fff17 bx r7
ad64: e3500000 cmp r0, #0
ad68: 0a000020 beq adf0 <rtems_bdbuf_purge+0xe8>
{
switch (cur->state)
ad6c: e5943024 ldr r3, [r4, #36] ; 0x24
ad70: e353000a cmp r3, #10
ad74: 979ff103 ldrls pc, [pc, r3, lsl #2]
ad78: ea00001a b ade8 <rtems_bdbuf_purge+0xe0> <== NOT EXECUTED
ad7c: 0000adf0 .word 0x0000adf0 <== NOT EXECUTED
ad80: 0000adf0 .word 0x0000adf0 <== NOT EXECUTED
ad84: 0000adc0 .word 0x0000adc0 <== NOT EXECUTED
ad88: 0000ade0 .word 0x0000ade0 <== NOT EXECUTED
ad8c: 0000ade0 .word 0x0000ade0 <== NOT EXECUTED
ad90: 0000ade0 .word 0x0000ade0 <== NOT EXECUTED
ad94: 0000adf0 .word 0x0000adf0 <== NOT EXECUTED
ad98: 0000adb0 .word 0x0000adb0 <== NOT EXECUTED
ad9c: 0000ada8 .word 0x0000ada8 <== NOT EXECUTED
ada0: 0000add8 .word 0x0000add8 <== NOT EXECUTED
ada4: 0000adf0 .word 0x0000adf0 <== 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);
ada8: e59f00e8 ldr r0, [pc, #232] ; ae98 <rtems_bdbuf_purge+0x190>
adac: ebfffbe2 bl 9d3c <rtems_bdbuf_wake>
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
adb0: e594302c ldr r3, [r4, #44] ; 0x2c
adb4: e593200c ldr r2, [r3, #12]
adb8: e2422001 sub r2, r2, #1
adbc: e583200c str r2, [r3, #12]
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
adc0: e1a00004 mov r0, r4
adc4: ebfff01b bl 6e38 <_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 );
adc8: e1a00006 mov r0, r6
adcc: e1a01004 mov r1, r4
add0: ebfff00d bl 6e0c <_Chain_Append>
add4: ea000005 b adf0 <rtems_bdbuf_purge+0xe8>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
add8: e584a024 str sl, [r4, #36] ; 0x24
addc: ea000003 b adf0 <rtems_bdbuf_purge+0xe8>
ade0: e5848024 str r8, [r4, #36] ; 0x24
ade4: ea000001 b adf0 <rtems_bdbuf_purge+0xe8>
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);
ade8: e59f00ac ldr r0, [pc, #172] ; ae9c <rtems_bdbuf_purge+0x194><== NOT EXECUTED
adec: ebffeed3 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
if (cur->avl.left != NULL)
adf0: e5943008 ldr r3, [r4, #8]
adf4: e3530000 cmp r3, #0
{
/* Left */
++prev;
*prev = cur;
adf8: 15a54004 strne r4, [r5, #4]!
cur = cur->avl.left;
adfc: 15943008 ldrne r3, [r4, #8]
default:
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_STATE_11);
}
}
if (cur->avl.left != NULL)
ae00: 1a00000e bne ae40 <rtems_bdbuf_purge+0x138>
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
ae04: e594300c ldr r3, [r4, #12]
ae08: e3530000 cmp r3, #0
{
/* Right */
++prev;
*prev = cur;
ae0c: 15a54004 strne r4, [r5, #4]!
cur = cur->avl.right;
ae10: 1594300c ldrne r3, [r4, #12]
/* Left */
++prev;
*prev = cur;
cur = cur->avl.left;
}
else if (cur->avl.right != NULL)
ae14: 1a000009 bne ae40 <rtems_bdbuf_purge+0x138>
ae18: ea000001 b ae24 <rtems_bdbuf_purge+0x11c>
{
while (*prev != NULL && cur == (*prev)->avl.right)
{
/* Up */
cur = *prev;
--prev;
ae1c: e2455004 sub r5, r5, #4 <== NOT EXECUTED
ae20: e1a04003 mov r4, r3 <== NOT EXECUTED
*prev = cur;
cur = cur->avl.right;
}
else
{
while (*prev != NULL && cur == (*prev)->avl.right)
ae24: e5953000 ldr r3, [r5]
ae28: e3530000 cmp r3, #0
ae2c: 0a000003 beq ae40 <rtems_bdbuf_purge+0x138>
ae30: e593200c ldr r2, [r3, #12] <== NOT EXECUTED
ae34: e1540002 cmp r4, r2 <== NOT EXECUTED
ae38: 0afffff7 beq ae1c <rtems_bdbuf_purge+0x114> <== NOT EXECUTED
ae3c: ea000012 b ae8c <rtems_bdbuf_purge+0x184> <== NOT EXECUTED
ae40: e1a04003 mov r4, r3
rtems_bdbuf_buffer **prev = stack;
rtems_bdbuf_buffer *cur = bdbuf_cache.tree;
*prev = NULL;
while (cur != NULL)
ae44: e3540000 cmp r4, #0
ae48: 1affffc0 bne ad50 <rtems_bdbuf_purge+0x48>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
ae4c: e28d5088 add r5, sp, #136 ; 0x88
ae50: ea000003 b ae64 <rtems_bdbuf_purge+0x15c>
while ((node = rtems_chain_get (purge_list)) != NULL)
{
rtems_bdbuf_buffer *bd = (rtems_bdbuf_buffer *) node;
if (bd->waiters == 0)
ae54: e5933028 ldr r3, [r3, #40] ; 0x28
ae58: e3530000 cmp r3, #0
ae5c: 03a04001 moveq r4, #1
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
ae60: ebffff34 bl ab38 <rtems_bdbuf_discard_buffer>
ae64: e1a00005 mov r0, r5
ae68: ebffeffb bl 6e5c <_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)
ae6c: e2503000 subs r3, r0, #0
ae70: 1afffff7 bne ae54 <rtems_bdbuf_purge+0x14c>
wake_buffer_waiters = true;
rtems_bdbuf_discard_buffer (bd);
}
if (wake_buffer_waiters)
ae74: e3540000 cmp r4, #0
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
ae78: 159f0020 ldrne r0, [pc, #32] ; aea0 <rtems_bdbuf_purge+0x198>
ae7c: 1bfffbae blne 9d3c <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 ();
ae80: ebfffc20 bl 9f08 <rtems_bdbuf_unlock_cache>
}
ae84: e28dd094 add sp, sp, #148 ; 0x94
ae88: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
cur = *prev;
--prev;
}
if (*prev != NULL)
/* Right */
cur = (*prev)->avl.right;
ae8c: e1a03002 mov r3, r2 <== NOT EXECUTED
ae90: eaffffea b ae40 <rtems_bdbuf_purge+0x138> <== NOT EXECUTED
00009cf0 <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);
}
9cf0: e1500002 cmp r0, r2 <== NOT EXECUTED
9cf4: 13a00000 movne r0, #0 <== NOT EXECUTED
9cf8: 03a00001 moveq r0, #1 <== NOT EXECUTED
9cfc: e12fff1e bx lr <== NOT EXECUTED
0000aea4 <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)
{
aea4: 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);
aea8: e59f0004 ldr r0, [pc, #4] ; aeb4 <rtems_bdbuf_purge_major+0x10><== NOT EXECUTED
aeac: e3a02000 mov r2, #0 <== NOT EXECUTED
aeb0: eaffff94 b ad08 <rtems_bdbuf_purge> <== NOT EXECUTED
0000bd34 <rtems_bdbuf_read>:
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
bd34: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
bd38: 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);
bd3c: e24be028 sub lr, fp, #40 ; 0x28
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
bd40: e24dd02c sub sp, sp, #44 ; 0x2c
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
bd44: e3a0c000 mov ip, #0
rtems_status_code
rtems_bdbuf_read (dev_t dev,
rtems_blkdev_bnum block,
rtems_bdbuf_buffer **bd_ptr)
{
bd48: e50b303c str r3, [fp, #-60] ; 0x3c
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);
bd4c: e58de000 str lr, [sp]
bd50: e24b3024 sub r3, fp, #36 ; 0x24
bd54: 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;
bd58: e50bc02c str ip, [fp, #-44] ; 0x2c
sc = rtems_bdbuf_obtain_disk (dev, block, &dd, &media_block, &bds_per_group);
bd5c: 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;
bd60: e50bc024 str ip, [fp, #-36] ; 0x24
rtems_blkdev_request *req = NULL;
rtems_bdbuf_buffer *bd = NULL;
rtems_blkdev_bnum media_block = 0;
bd64: 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);
bd68: ebfff87a bl 9f58 <rtems_bdbuf_obtain_disk>
if (sc != RTEMS_SUCCESSFUL)
bd6c: e3500000 cmp r0, #0
bd70: e50b0030 str r0, [fp, #-48] ; 0x30
bd74: 1a0000a0 bne bffc <rtems_bdbuf_read+0x2c8>
/*
* 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) +
bd78: e59f329c ldr r3, [pc, #668] ; c01c <rtems_bdbuf_read+0x2e8>
bd7c: e5937000 ldr r7, [r3]
bd80: e2877001 add r7, r7, #1
bd84: e1a03207 lsl r3, r7, #4
bd88: e283301c add r3, r3, #28
bd8c: 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 ();
bd90: ebfff7e3 bl 9d24 <rtems_bdbuf_lock_cache>
rtems_bdbuf_create_read_request (dd, media_block, bds_per_group, req, &bd);
bd94: e51b5024 ldr r5, [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;
bd98: e5952020 ldr r2, [r5, #32]
bd9c: e5951024 ldr r1, [r5, #36] ; 0x24
bda0: e1a00002 mov r0, r2
bda4: e50b2034 str r2, [fp, #-52] ; 0x34
bda8: eb003e42 bl 1b6b8 <__aeabi_uidiv>
dev_t dev = dd->dev;
bdac: e285301c add r3, r5, #28
bdb0: e8131008 ldmda r3, {r3, ip}
bdb4: e08cc003 add ip, ip, r3
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);
bdb8: e51b6028 ldr r6, [fp, #-40] ; 0x28
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;
bdbc: e59f325c ldr r3, [pc, #604] ; c020 <rtems_bdbuf_read+0x2ec>
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;
bdc0: e51be030 ldr lr, [fp, #-48] ; 0x30
/*
* 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) +
bdc4: e28d4008 add r4, sp, #8
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);
bdc8: e51b202c ldr r2, [fp, #-44] ; 0x2c
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;
bdcc: e066c00c rsb ip, r6, ip
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;
bdd0: e5843004 str r3, [r4, #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;
bdd4: e584e000 str lr, [r4]
req->req_done = rtems_bdbuf_transfer_done;
req->done_arg = req;
bdd8: e5844008 str r4, [r4, #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;
bddc: e595a000 ldr sl, [r5]
bde0: e5958004 ldr r8, [r5, #4]
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 ();
bde4: e50bc044 str ip, [fp, #-68] ; 0x44
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);
bde8: e50b2038 str r2, [fp, #-56] ; 0x38
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;
bdec: e50b0040 str r0, [fp, #-64] ; 0x40
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 ();
bdf0: eb000c79 bl efdc <rtems_task_self>
req->status = RTEMS_RESOURCE_IN_USE;
bdf4: e3a0e00c mov lr, #12
bdf8: e584e00c str lr, [r4, #12]
req->bufnum = 0;
bdfc: e51be030 ldr lr, [fp, #-48] ; 0x30
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 ();
be00: e5840014 str r0, [r4, #20]
req->status = RTEMS_RESOURCE_IN_USE;
req->bufnum = 0;
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
be04: e1a02006 mov r2, r6
be08: e51b3038 ldr r3, [fp, #-56] ; 0x38
be0c: e1a0000a mov r0, sl
be10: e1a01008 mov r1, r8
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;
be14: e584e010 str lr, [r4, #16]
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
be18: ebffff00 bl ba20 <rtems_bdbuf_get_buffer_for_access>
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;
be1c: 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)
be20: e5909024 ldr r9, [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;
be24: e5903020 ldr r3, [r0, #32]
*bd_ptr = bd;
req->bufs [0].user = bd;
req->bufs [0].block = media_block;
req->bufs [0].length = block_size;
be28: e51b2034 ldr r2, [fp, #-52] ; 0x34
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;
be2c: e15c0007 cmp ip, r7
be30: 21a0c007 movcs ip, r7
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
be34: e3590002 cmp r9, #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);
be38: e1a05000 mov r5, 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;
be3c: e5843020 str r3, [r4, #32]
bd = rtems_bdbuf_get_buffer_for_access (dev, media_block, bds_per_group);
*bd_ptr = bd;
req->bufs [0].user = bd;
be40: e5840024 str r0, [r4, #36] ; 0x24
req->bufs [0].block = media_block;
be44: e5846018 str r6, [r4, #24]
req->bufs [0].length = block_size;
be48: e584201c str r2, [r4, #28]
req->bufs [0].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read", bd);
switch (bd->state)
be4c: 0a000046 beq bf6c <rtems_bdbuf_read+0x238>
be50: e3590007 cmp r9, #7
be54: 0a000044 beq bf6c <rtems_bdbuf_read+0x238>
be58: e3590001 cmp r9, #1
be5c: 1a000006 bne be7c <rtems_bdbuf_read+0x148>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
be60: e1a07004 mov r7, r4
be64: e3a03009 mov r3, #9
be68: e1a0400c mov r4, ip
be6c: e5803024 str r3, [r0, #36] ; 0x24
be70: e1a0c000 mov ip, r0
be74: e1a05007 mov r5, r7
be78: ea000036 b bf58 <rtems_bdbuf_read+0x224>
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);
be7c: 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);
be80: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
be84: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
be88: e380001d orr r0, r0, #29 <== NOT EXECUTED
be8c: ea000056 b bfec <rtems_bdbuf_read+0x2b8> <== NOT EXECUTED
break;
}
while (transfer_index < transfer_count)
{
media_block += media_block_count;
be90: e51b3040 ldr r3, [fp, #-64] ; 0x40
static rtems_bdbuf_buffer *
rtems_bdbuf_avl_search (rtems_bdbuf_buffer** root,
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
be94: e59fe188 ldr lr, [pc, #392] ; c024 <rtems_bdbuf_read+0x2f0>
break;
}
while (transfer_index < transfer_count)
{
media_block += media_block_count;
be98: e0866003 add r6, r6, 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;
be9c: e59e3040 ldr r3, [lr, #64] ; 0x40
bea0: ea000009 b becc <rtems_bdbuf_read+0x198>
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
{
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
bea4: e1580002 cmp r8, r2 <== NOT EXECUTED
bea8: 8a000004 bhi bec0 <rtems_bdbuf_read+0x18c> <== NOT EXECUTED
beac: 1a000005 bne bec8 <rtems_bdbuf_read+0x194> <== NOT EXECUTED
beb0: e15a0001 cmp sl, r1 <== NOT EXECUTED
beb4: 8a000001 bhi bec0 <rtems_bdbuf_read+0x18c> <== NOT EXECUTED
beb8: ea000002 b bec8 <rtems_bdbuf_read+0x194> <== NOT EXECUTED
bebc: 2a000001 bcs bec8 <rtems_bdbuf_read+0x194>
{
p = p->avl.right;
bec0: e593300c ldr r3, [r3, #12]
bec4: ea000000 b becc <rtems_bdbuf_read+0x198>
}
else
{
p = p->avl.left;
bec8: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
dev_t dev,
rtems_blkdev_bnum block)
{
rtems_bdbuf_buffer* p = *root;
while ((p != NULL) && ((p->dev != dev) || (p->block != block)))
becc: e3530000 cmp r3, #0
bed0: 0a000009 beq befc <rtems_bdbuf_read+0x1c8>
bed4: e5931014 ldr r1, [r3, #20]
bed8: e151000a cmp r1, sl
bedc: e5932018 ldr r2, [r3, #24]
bee0: 1affffef bne bea4 <rtems_bdbuf_read+0x170>
bee4: e1520008 cmp r2, r8
bee8: 1affffed bne bea4 <rtems_bdbuf_read+0x170>
beec: e593201c ldr r2, [r3, #28]
bef0: e1520006 cmp r2, r6
bef4: 1afffff0 bne bebc <rtems_bdbuf_read+0x188>
bef8: ea000018 b bf60 <rtems_bdbuf_read+0x22c> <== NOT EXECUTED
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);
befc: e1a0000a mov r0, sl
bf00: e1a01008 mov r1, r8
bf04: e1a02006 mov r2, r6
bf08: e51b3038 ldr r3, [fp, #-56] ; 0x38
bf0c: e50bc044 str ip, [fp, #-68] ; 0x44
bf10: ebfffdd6 bl b670 <rtems_bdbuf_get_buffer_from_lru_list>
if (bd != NULL)
bf14: e3500000 cmp r0, #0
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);
bf18: e2877010 add r7, r7, #16
if (bd != NULL)
bf1c: e51bc044 ldr ip, [fp, #-68] ; 0x44
bf20: 0a00000e beq bf60 <rtems_bdbuf_read+0x22c>
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
bf24: e590302c ldr r3, [r0, #44] ; 0x2c <== NOT EXECUTED
bf28: e593100c ldr r1, [r3, #12] <== 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;
bf2c: e5902020 ldr r2, [r0, #32] <== NOT EXECUTED
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
bf30: e2811001 add r1, r1, #1 <== NOT EXECUTED
bf34: e583100c str r1, [r3, #12] <== 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;
bf38: e51b3034 ldr r3, [fp, #-52] ; 0x34 <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
bf3c: e5872020 str r2, [r7, #32] <== NOT EXECUTED
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
bf40: e3a02009 mov r2, #9 <== NOT EXECUTED
bf44: e5802024 str r2, [r0, #36] ; 0x24 <== NOT EXECUTED
if (bd == NULL)
break;
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_TRANSFER);
req->bufs [transfer_index].user = bd;
bf48: e5870024 str r0, [r7, #36] ; 0x24 <== NOT EXECUTED
req->bufs [transfer_index].block = media_block;
bf4c: e5876018 str r6, [r7, #24] <== NOT EXECUTED
req->bufs [transfer_index].length = block_size;
bf50: e587301c str r3, [r7, #28] <== NOT EXECUTED
req->bufs [transfer_index].buffer = bd->buffer;
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
bf54: e2899001 add r9, r9, #1 <== NOT EXECUTED
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_1);
break;
}
while (transfer_index < transfer_count)
bf58: e1590004 cmp r9, r4
bf5c: 3affffcb bcc be90 <rtems_bdbuf_read+0x15c>
bf60: e1a04005 mov r4, r5
rtems_bdbuf_show_users ("read-ahead", bd);
++transfer_index;
}
req->bufnum = transfer_index;
bf64: e5849010 str r9, [r4, #16]
bf68: e1a0500c mov r5, ip
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)
bf6c: e5943010 ldr r3, [r4, #16]
bf70: e3530000 cmp r3, #0
bf74: 0a00000b beq bfa8 <rtems_bdbuf_read+0x274>
{
sc = rtems_bdbuf_execute_transfer_request (dd, req, true);
bf78: e1a01004 mov r1, r4
bf7c: e51b0024 ldr r0, [fp, #-36] ; 0x24
bf80: e3a02001 mov r2, #1
bf84: ebfffbd0 bl aecc <rtems_bdbuf_execute_transfer_request>
if (sc == RTEMS_SUCCESSFUL)
bf88: e3500000 cmp r0, #0
bf8c: 1a00001d bne c008 <rtems_bdbuf_read+0x2d4>
bf90: e1a00005 mov r0, r5
bf94: ebffeba7 bl 6e38 <_Chain_Extract>
}
static void
rtems_bdbuf_group_obtain (rtems_bdbuf_buffer *bd)
{
++bd->group->users;
bf98: e595302c ldr r3, [r5, #44] ; 0x2c
bf9c: e593200c ldr r2, [r3, #12]
bfa0: e2822001 add r2, r2, #1
bfa4: e583200c str r2, [r3, #12]
}
}
if (sc == RTEMS_SUCCESSFUL)
{
switch (bd->state)
bfa8: e5953024 ldr r3, [r5, #36] ; 0x24
bfac: e3530002 cmp r3, #2
bfb0: 0a000002 beq bfc0 <rtems_bdbuf_read+0x28c>
bfb4: e3530007 cmp r3, #7
bfb8: 1a000007 bne bfdc <rtems_bdbuf_read+0x2a8>
bfbc: ea000001 b bfc8 <rtems_bdbuf_read+0x294>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
bfc0: e3a03003 mov r3, #3
bfc4: ea000000 b bfcc <rtems_bdbuf_read+0x298>
bfc8: e3a03004 mov r3, #4
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
bfcc: e51be03c ldr lr, [fp, #-60] ; 0x3c
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
bfd0: e5853024 str r3, [r5, #36] ; 0x24
{
rtems_bdbuf_show_users ("read", bd);
rtems_bdbuf_show_usage ();
}
*bd_ptr = bd;
bfd4: e58e5000 str r5, [lr]
bfd8: ea000004 b bff0 <rtems_bdbuf_read+0x2bc>
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);
bfdc: e5950024 ldr r0, [r5, #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);
bfe0: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
bfe4: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
bfe8: e3800002 orr r0, r0, #2 <== NOT EXECUTED
bfec: ebffea53 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
rtems_bdbuf_unlock_cache ();
bff0: ebfff7c4 bl 9f08 <rtems_bdbuf_unlock_cache>
rtems_bdbuf_release_disk (dd);
bff4: e51b0024 ldr r0, [fp, #-36] ; 0x24
bff8: ebfff813 bl a04c <rtems_bdbuf_release_disk>
return sc;
}
bffc: e51b0030 ldr r0, [fp, #-48] ; 0x30
c000: e24bd020 sub sp, fp, #32
c004: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
}
*bd_ptr = bd;
}
else
*bd_ptr = NULL;
c008: e51b203c ldr r2, [fp, #-60] ; 0x3c
c00c: e3a03000 mov r3, #0
c010: e5823000 str r3, [r2]
c014: e50b0030 str r0, [fp, #-48] ; 0x30
c018: eafffff4 b bff0 <rtems_bdbuf_read+0x2bc>
0000ac34 <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)
ac34: e59f30bc ldr r3, [pc, #188] ; acf8 <rtems_bdbuf_release+0xc4>
ac38: e5d33088 ldrb r3, [r3, #136] ; 0x88
ac3c: e3530000 cmp r3, #0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release (rtems_bdbuf_buffer *bd)
{
ac40: e92d4010 push {r4, lr}
ac44: e1a04000 mov r4, r0
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
ac48: 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)
ac4c: 08bd8010 popeq {r4, pc}
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
ac50: e3540000 cmp r4, #0
ac54: 03a00009 moveq r0, #9
ac58: 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();
ac5c: ebfffc30 bl 9d24 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
ac60: e5943024 ldr r3, [r4, #36] ; 0x24
ac64: e2433003 sub r3, r3, #3
ac68: e3530003 cmp r3, #3
ac6c: 979ff103 ldrls pc, [pc, r3, lsl #2]
ac70: ea000018 b acd8 <rtems_bdbuf_release+0xa4> <== NOT EXECUTED
ac74: 0000ac84 .word 0x0000ac84 <== NOT EXECUTED
ac78: 0000accc .word 0x0000accc <== NOT EXECUTED
ac7c: 0000acc0 .word 0x0000acc0 <== NOT EXECUTED
ac80: 0000acc0 .word 0x0000acc0 <== NOT EXECUTED
}
static void
rtems_bdbuf_group_release (rtems_bdbuf_buffer *bd)
{
--bd->group->users;
ac84: e594302c ldr r3, [r4, #44] ; 0x2c
ac88: e593200c ldr r2, [r3, #12]
ac8c: e2422001 sub r2, r2, #1
ac90: e583200c str r2, [r3, #12]
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
ac94: e3a03002 mov r3, #2
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
ac98: e59f005c ldr r0, [pc, #92] ; acfc <rtems_bdbuf_release+0xc8>
ac9c: e5843024 str r3, [r4, #36] ; 0x24
aca0: e1a01004 mov r1, r4
aca4: ebfff058 bl 6e0c <_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)
aca8: e5943028 ldr r3, [r4, #40] ; 0x28
acac: e3530000 cmp r3, #0
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
acb0: 159f0048 ldrne r0, [pc, #72] ; ad00 <rtems_bdbuf_release+0xcc>
else
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
acb4: 059f0048 ldreq r0, [pc, #72] ; ad04 <rtems_bdbuf_release+0xd0>
acb8: ebfffc1f bl 9d3c <rtems_bdbuf_wake>
acbc: ea00000a b acec <rtems_bdbuf_release+0xb8>
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);
acc0: e1a00004 mov r0, r4
acc4: ebffffa9 bl ab70 <rtems_bdbuf_discard_buffer_after_access>
break;
acc8: ea000007 b acec <rtems_bdbuf_release+0xb8>
case RTEMS_BDBUF_STATE_ACCESS_MODIFIED:
rtems_bdbuf_add_to_modified_list_after_access (bd);
accc: e1a00004 mov r0, r4
acd0: ebfffcef bl a094 <rtems_bdbuf_add_to_modified_list_after_access>
break;
acd4: ea000004 b acec <rtems_bdbuf_release+0xb8>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_0);
acd8: 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);
acdc: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
ace0: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ace4: e380001c orr r0, r0, #28 <== NOT EXECUTED
ace8: ebffef14 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
acec: ebfffc85 bl 9f08 <rtems_bdbuf_unlock_cache>
acf0: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
acf4: e8bd8010 pop {r4, pc}
0000a04c <rtems_bdbuf_release_disk>:
static void
rtems_bdbuf_release_disk (rtems_disk_device *dd)
{
a04c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
sc = rtems_disk_release (dd);
a050: ebffe009 bl 207c <rtems_disk_release>
if (sc != RTEMS_SUCCESSFUL)
a054: e3500000 cmp r0, #0
a058: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_DISK_REL);
a05c: e59f0000 ldr r0, [pc, #0] ; a064 <rtems_bdbuf_release_disk+0x18><== NOT EXECUTED
a060: ebfff236 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000abac <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)
abac: e59f307c ldr r3, [pc, #124] ; ac30 <rtems_bdbuf_release_modified+0x84>
abb0: e5d33088 ldrb r3, [r3, #136] ; 0x88
abb4: e3530000 cmp r3, #0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_release_modified (rtems_bdbuf_buffer *bd)
{
abb8: e92d4010 push {r4, lr}
abbc: e1a04000 mov r4, r0
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
abc0: 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)
abc4: 08bd8010 popeq {r4, pc}
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
abc8: e3540000 cmp r4, #0
abcc: 03a00009 moveq r0, #9
abd0: 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();
abd4: ebfffc52 bl 9d24 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "release modified");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
abd8: e5943024 ldr r3, [r4, #36] ; 0x24
abdc: e3530003 cmp r3, #3
abe0: 3a00000a bcc ac10 <rtems_bdbuf_release_modified+0x64>
abe4: e3530005 cmp r3, #5
abe8: 9a000002 bls abf8 <rtems_bdbuf_release_modified+0x4c>
abec: e3530006 cmp r3, #6
abf0: 1a000006 bne ac10 <rtems_bdbuf_release_modified+0x64>
abf4: ea000002 b ac04 <rtems_bdbuf_release_modified+0x58>
{
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);
abf8: e1a00004 mov r0, r4
abfc: ebfffd24 bl a094 <rtems_bdbuf_add_to_modified_list_after_access>
break;
ac00: ea000007 b ac24 <rtems_bdbuf_release_modified+0x78>
case RTEMS_BDBUF_STATE_ACCESS_PURGED:
rtems_bdbuf_discard_buffer_after_access (bd);
ac04: e1a00004 mov r0, r4
ac08: ebffffd8 bl ab70 <rtems_bdbuf_discard_buffer_after_access>
break;
ac0c: ea000004 b ac24 <rtems_bdbuf_release_modified+0x78>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_6);
ac10: 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);
ac14: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
ac18: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ac1c: e3800004 orr r0, r0, #4 <== NOT EXECUTED
ac20: ebffef46 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
ac24: ebfffcb7 bl 9f08 <rtems_bdbuf_unlock_cache>
ac28: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
ac2c: e8bd8010 pop {r4, pc}
0000a7a4 <rtems_bdbuf_remove_from_tree>:
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
a7a4: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
a7a8: e59f3340 ldr r3, [pc, #832] ; aaf0 <rtems_bdbuf_remove_from_tree+0x34c>
return bdbuf_cache.buffer_waiters.count;
}
static void
rtems_bdbuf_remove_from_tree (rtems_bdbuf_buffer *bd)
{
a7ac: e24dd080 sub sp, sp, #128 ; 0x80
a7b0: e1a05000 mov r5, 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));
a7b4: e3a01000 mov r1, #0
a7b8: e1a0000d mov r0, sp
a7bc: e3a02080 mov r2, #128 ; 0x80
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
rtems_blkdev_bnum block = node->block;
rtems_bdbuf_buffer* p = *root;
a7c0: e5934040 ldr r4, [r3, #64] ; 0x40
*/
static int
rtems_bdbuf_avl_remove(rtems_bdbuf_buffer** root,
const rtems_bdbuf_buffer* node)
{
dev_t dev = node->dev;
a7c4: e5958014 ldr r8, [r5, #20]
a7c8: e2857018 add r7, r5, #24
a7cc: e8970480 ldm r7, {r7, 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));
a7d0: e1a0600d mov r6, sp
a7d4: eb0020e1 bl 12b60 <memset>
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
{
p->avl.cache = 1;
a7d8: e3a00001 mov r0, #1
p = p->avl.right;
}
else if ((p->dev != dev) || (p->block != block))
{
p->avl.cache = -1;
a7dc: e3e01000 mvn r1, #0
a7e0: ea000014 b a838 <rtems_bdbuf_remove_from_tree+0x94>
while (p != NULL)
{
*buf_prev++ = p;
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
a7e4: e5943018 ldr r3, [r4, #24]
a7e8: e1570003 cmp r7, r3
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
{
*buf_prev++ = p;
a7ec: e4864004 str r4, [r6], #4
if ((p->dev < dev) || ((p->dev == dev) && (p->block < block)))
a7f0: e5942014 ldr r2, [r4, #20]
a7f4: 8a000009 bhi a820 <rtems_bdbuf_remove_from_tree+0x7c>
a7f8: 1a000001 bne a804 <rtems_bdbuf_remove_from_tree+0x60>
a7fc: e1580002 cmp r8, r2
a800: 8a000006 bhi a820 <rtems_bdbuf_remove_from_tree+0x7c>
a804: e1520008 cmp r2, r8
a808: 1a000008 bne a830 <rtems_bdbuf_remove_from_tree+0x8c>
a80c: e1530007 cmp r3, r7
a810: 1a000006 bne a830 <rtems_bdbuf_remove_from_tree+0x8c>
a814: e594301c ldr r3, [r4, #28]
a818: e153000a cmp r3, sl
a81c: 2a000002 bcs a82c <rtems_bdbuf_remove_from_tree+0x88>
{
p->avl.cache = 1;
a820: e5c40010 strb r0, [r4, #16]
p = p->avl.right;
a824: e594400c ldr r4, [r4, #12]
a828: ea000002 b a838 <rtems_bdbuf_remove_from_tree+0x94>
}
else if ((p->dev != dev) || (p->block != block))
a82c: 0a000004 beq a844 <rtems_bdbuf_remove_from_tree+0xa0>
{
p->avl.cache = -1;
a830: e5c41010 strb r1, [r4, #16]
p = p->avl.left;
a834: e5944008 ldr r4, [r4, #8]
bool modified = false;
memset (buf_stack, 0, sizeof(buf_stack));
while (p != NULL)
a838: e3540000 cmp r4, #0
a83c: 1affffe8 bne a7e4 <rtems_bdbuf_remove_from_tree+0x40>
a840: ea0000a3 b aad4 <rtems_bdbuf_remove_from_tree+0x330> <== NOT EXECUTED
return -1;
}
q = p;
buf_prev--;
a844: e2462004 sub r2, r6, #4
if (buf_prev > buf_stack)
a848: e1a0300d mov r3, sp
a84c: e1520003 cmp r2, r3
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
a850: e594300c ldr r3, [r4, #12]
}
q = p;
buf_prev--;
if (buf_prev > buf_stack)
a854: 93a01000 movls r1, #0
{
p = *(buf_prev - 1);
a858: 85121004 ldrhi r1, [r2, #-4]
{
p = NULL;
}
/* at this moment q - is a node to delete, p is q's parent */
if (q->avl.right == NULL)
a85c: e3530000 cmp r3, #0
a860: 1a000005 bne a87c <rtems_bdbuf_remove_from_tree+0xd8>
{
r = q->avl.left;
a864: e5943008 ldr r3, [r4, #8]
if (r != NULL)
a868: e3530000 cmp r3, #0
{
r->avl.bal = 0;
a86c: 13a00000 movne r0, #0
a870: 15c30011 strbne r0, [r3, #17]
a874: e1a06002 mov r6, r2
a878: ea00001e b a8f8 <rtems_bdbuf_remove_from_tree+0x154>
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
a87c: e5930008 ldr r0, [r3, #8]
a880: e3500000 cmp r0, #0
{
r->avl.left = q->avl.left;
a884: 0594c008 ldreq ip, [r4, #8]
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
a888: 11a00006 movne r0, r6
a88c: 11a0c003 movne ip, r3
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
a890: 13e05000 mvnne r5, #0
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
r->avl.bal = q->avl.bal;
a894: 05d40011 ldrbeq r0, [r4, #17]
r = q->avl.right;
if (r->avl.left == NULL)
{
r->avl.left = q->avl.left;
a898: 0583c008 streq ip, [r3, #8]
{
rtems_bdbuf_buffer **t;
r = q->avl.right;
if (r->avl.left == NULL)
a89c: 1a000005 bne a8b8 <rtems_bdbuf_remove_from_tree+0x114>
a8a0: ea000010 b a8e8 <rtems_bdbuf_remove_from_tree+0x144>
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
{
*buf_prev++ = r = s;
a8a4: e5003004 str r3, [r0, #-4] <== NOT EXECUTED
s = r->avl.left;
a8a8: e5936008 ldr r6, [r3, #8] <== NOT EXECUTED
r->avl.cache = -1;
a8ac: e5c35010 strb r5, [r3, #16] <== NOT EXECUTED
a8b0: e1a0c003 mov ip, r3 <== NOT EXECUTED
a8b4: e1a03006 mov r3, r6 <== NOT EXECUTED
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
a8b8: e5936008 ldr r6, [r3, #8] <== NOT EXECUTED
a8bc: e3560000 cmp r6, #0 <== NOT EXECUTED
{
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
a8c0: e1a06000 mov r6, r0 <== NOT EXECUTED
a8c4: e2800004 add r0, r0, #4 <== NOT EXECUTED
else
{
t = buf_prev++;
s = r;
while (s->avl.left != NULL)
a8c8: 1afffff5 bne a8a4 <rtems_bdbuf_remove_from_tree+0x100> <== NOT EXECUTED
*buf_prev++ = r = s;
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
a8cc: e5947008 ldr r7, [r4, #8] <== NOT EXECUTED
r->avl.left = s->avl.right;
a8d0: e593500c ldr r5, [r3, #12] <== NOT EXECUTED
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
a8d4: e5d40011 ldrb r0, [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;
a8d8: 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;
a8dc: e5837008 str r7, [r3, #8] <== NOT EXECUTED
r->avl.left = s->avl.right;
s->avl.right = q->avl.right;
a8e0: e583400c str r4, [r3, #12] <== NOT EXECUTED
s = r->avl.left;
r->avl.cache = -1;
}
s->avl.left = q->avl.left;
r->avl.left = s->avl.right;
a8e4: e58c5008 str r5, [ip, #8] <== NOT EXECUTED
s->avl.right = q->avl.right;
s->avl.bal = q->avl.bal;
a8e8: e5c30011 strb r0, [r3, #17]
s->avl.cache = 1;
a8ec: e3a00001 mov r0, #1
a8f0: e5c30010 strb r0, [r3, #16]
*t = q = s;
a8f4: e5823000 str r3, [r2]
}
}
if (p != NULL)
a8f8: e3510000 cmp r1, #0
p->avl.right = q;
}
}
else
{
*root = q;
a8fc: 059f21ec ldreq r2, [pc, #492] ; aaf0 <rtems_bdbuf_remove_from_tree+0x34c>
a900: 05823040 streq r3, [r2, #64] ; 0x40
*t = q = s;
}
}
if (p != NULL)
a904: 0a000003 beq a918 <rtems_bdbuf_remove_from_tree+0x174>
{
if (p->avl.cache == -1)
a908: e1d121d0 ldrsb r2, [r1, #16]
a90c: e3720001 cmn r2, #1
{
p->avl.left = q;
a910: 05813008 streq r3, [r1, #8]
}
else
{
p->avl.right = q;
a914: 1581300c strne r3, [r1, #12]
modified = true;
while (modified)
{
if (buf_prev > buf_stack)
a918: e1a0700d mov r7, sp
a91c: e1560007 cmp r6, r7
a920: 9a000070 bls aae8 <rtems_bdbuf_remove_from_tree+0x344>
default:
break;
}
}
if (buf_prev > buf_stack)
a924: e1a0700d mov r7, sp
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
a928: e3a04001 mov r4, #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;
a92c: e3a01000 mov r1, #0
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
a930: e3e05000 mvn r5, #0
while (modified)
{
if (buf_prev > buf_stack)
{
p = *--buf_prev;
a934: e5363004 ldr r3, [r6, #-4]!
else
{
break;
}
if (p->avl.cache == -1)
a938: e1d3a1d0 ldrsb sl, [r3, #16]
a93c: e37a0001 cmn sl, #1
a940: e1d3c1d1 ldrsb ip, [r3, #17]
a944: 1a000027 bne a9e8 <rtems_bdbuf_remove_from_tree+0x244>
{
/* rebalance left branch */
switch (p->avl.bal)
a948: e35c0000 cmp ip, #0
{
case -1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = 1;
a94c: 05c34011 strbeq r4, [r3, #17]
}
if (p->avl.cache == -1)
{
/* rebalance left branch */
switch (p->avl.bal)
a950: 0a00002d beq aa0c <rtems_bdbuf_remove_from_tree+0x268>
a954: e35c0001 cmp ip, #1
a958: 0a000002 beq a968 <rtems_bdbuf_remove_from_tree+0x1c4>
a95c: e37c0001 cmn ip, #1
{
case -1:
p->avl.bal = 0;
a960: 05c31011 strbeq r1, [r3, #17]
a964: ea00004b b aa98 <rtems_bdbuf_remove_from_tree+0x2f4>
p->avl.bal = 1;
modified = false;
break;
case +1:
p1 = p->avl.right;
a968: e593000c ldr r0, [r3, #12]
if (p1->avl.bal >= 0) /* simple RR-turn */
a96c: e1d091d1 ldrsb r9, [r0, #17]
a970: e3590000 cmp r9, #0
a974: e5908008 ldr r8, [r0, #8]
a978: ba000009 blt a9a4 <rtems_bdbuf_remove_from_tree+0x200>
{
p->avl.right = p1->avl.left;
a97c: e583800c str r8, [r3, #12]
p1->avl.left = p;
a980: e5803008 str r3, [r0, #8]
p1->avl.bal = -1;
modified = false;
}
else
{
p->avl.bal = 0;
a984: 15c31011 strbne r1, [r3, #17]
p->avl.right = p1->avl.left;
p1->avl.left = p;
if (p1->avl.bal == 0)
{
p1->avl.bal = -1;
a988: 05c0a011 strbeq sl, [r0, #17]
a98c: 01a02000 moveq r2, r0
a990: 01a03009 moveq r3, r9
modified = false;
}
else
{
p->avl.bal = 0;
p1->avl.bal = 0;
a994: 11a02000 movne r2, r0
a998: 15c01011 strbne r1, [r0, #17]
if (p1->avl.bal >= 0) /* simple RR-turn */
{
p->avl.right = p1->avl.left;
p1->avl.left = p;
if (p1->avl.bal == 0)
a99c: 1a00001b bne aa10 <rtems_bdbuf_remove_from_tree+0x26c>
a9a0: ea00003e b aaa0 <rtems_bdbuf_remove_from_tree+0x2fc>
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
a9a4: e598200c ldr r2, [r8, #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;
a9a8: e1d8c1d1 ldrsb ip, [r8, #17] <== NOT EXECUTED
}
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
a9ac: e5802008 str r2, [r0, #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;
a9b0: e35c0001 cmp ip, #1 <== NOT EXECUTED
a9b4: 05c3a011 strbeq sl, [r3, #17] <== NOT EXECUTED
a9b8: 15c31011 strbne r1, [r3, #17] <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
a9bc: e5982008 ldr r2, [r8, #8] <== NOT EXECUTED
else /* double RL-turn */
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
a9c0: e588000c str r0, [r8, #12] <== NOT EXECUTED
p->avl.right = p2->avl.left;
p2->avl.left = p;
a9c4: e5883008 str r3, [r8, #8] <== NOT EXECUTED
{
p2 = p1->avl.left;
p1->avl.left = p2->avl.right;
p2->avl.right = p1;
p->avl.right = p2->avl.left;
a9c8: e583200c str r2, [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;
a9cc: e1d831d1 ldrsb r3, [r8, #17] <== NOT EXECUTED
a9d0: e3730001 cmn r3, #1 <== NOT EXECUTED
a9d4: 05c04011 strbeq r4, [r0, #17] <== NOT EXECUTED
a9d8: 15c01011 strbne r1, [r0, #17] <== NOT EXECUTED
}
p = p1;
}
else /* double RL-turn */
{
p2 = p1->avl.left;
a9dc: e1a02008 mov r2, r8 <== 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;
a9e0: e5c81011 strb r1, [r8, #17] <== NOT EXECUTED
a9e4: ea00002c b aa9c <rtems_bdbuf_remove_from_tree+0x2f8> <== NOT EXECUTED
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
a9e8: e35c0000 cmp ip, #0
case +1:
p->avl.bal = 0;
break;
case 0:
p->avl.bal = -1;
a9ec: 05c35011 strbeq r5, [r3, #17]
}
}
else
{
/* rebalance right branch */
switch (p->avl.bal)
a9f0: 0a000005 beq aa0c <rtems_bdbuf_remove_from_tree+0x268>
a9f4: e35c0001 cmp ip, #1
a9f8: 0a000002 beq aa08 <rtems_bdbuf_remove_from_tree+0x264>
a9fc: e37c0001 cmn ip, #1 <== NOT EXECUTED
aa00: 1a000024 bne aa98 <rtems_bdbuf_remove_from_tree+0x2f4> <== NOT EXECUTED
aa04: ea000003 b aa18 <rtems_bdbuf_remove_from_tree+0x274> <== NOT EXECUTED
{
case +1:
p->avl.bal = 0;
aa08: e5c31011 strb r1, [r3, #17]
break;
case 0:
p->avl.bal = -1;
aa0c: e1a02003 mov r2, r3
aa10: e1a0300c mov r3, ip
aa14: ea000021 b aaa0 <rtems_bdbuf_remove_from_tree+0x2fc>
modified = false;
break;
case -1:
p1 = p->avl.left;
aa18: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
if (p1->avl.bal <= 0) /* simple LL-turn */
aa1c: e1d081d1 ldrsb r8, [r0, #17] <== NOT EXECUTED
aa20: e3580000 cmp r8, #0 <== NOT EXECUTED
aa24: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED
aa28: ca000009 bgt aa54 <rtems_bdbuf_remove_from_tree+0x2b0> <== NOT EXECUTED
{
p->avl.left = p1->avl.right;
aa2c: e583c008 str ip, [r3, #8] <== NOT EXECUTED
p1->avl.right = p;
aa30: e580300c str r3, [r0, #12] <== NOT EXECUTED
p1->avl.bal = 1;
modified = false;
}
else
{
p->avl.bal = 0;
aa34: 15c31011 strbne r1, [r3, #17] <== NOT EXECUTED
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
if (p1->avl.bal == 0)
{
p1->avl.bal = 1;
aa38: 05c04011 strbeq r4, [r0, #17] <== NOT EXECUTED
aa3c: 01a02000 moveq r2, r0 <== NOT EXECUTED
aa40: 01a03008 moveq r3, r8 <== NOT EXECUTED
modified = false;
}
else
{
p->avl.bal = 0;
p1->avl.bal = 0;
aa44: 11a02000 movne r2, r0 <== NOT EXECUTED
aa48: 15c01011 strbne r1, [r0, #17] <== NOT EXECUTED
if (p1->avl.bal <= 0) /* simple LL-turn */
{
p->avl.left = p1->avl.right;
p1->avl.right = p;
if (p1->avl.bal == 0)
aa4c: 1a000012 bne aa9c <rtems_bdbuf_remove_from_tree+0x2f8> <== NOT EXECUTED
aa50: ea000012 b aaa0 <rtems_bdbuf_remove_from_tree+0x2fc> <== NOT EXECUTED
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
aa54: e59c2008 ldr r2, [ip, #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;
aa58: e1dc81d1 ldrsb r8, [ip, #17] <== NOT EXECUTED
}
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
aa5c: e580200c str r2, [r0, #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;
aa60: e3780001 cmn r8, #1 <== NOT EXECUTED
aa64: 05c34011 strbeq r4, [r3, #17] <== NOT EXECUTED
aa68: 15c31011 strbne r1, [r3, #17] <== NOT EXECUTED
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
aa6c: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
else /* double LR-turn */
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
aa70: e58c0008 str r0, [ip, #8] <== NOT EXECUTED
p->avl.left = p2->avl.right;
p2->avl.right = p;
aa74: e58c300c str r3, [ip, #12] <== NOT EXECUTED
{
p2 = p1->avl.right;
p1->avl.right = p2->avl.left;
p2->avl.left = p1;
p->avl.left = p2->avl.right;
aa78: e5832008 str r2, [r3, #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;
aa7c: e1dc31d1 ldrsb r3, [ip, #17] <== NOT EXECUTED
aa80: e3530001 cmp r3, #1 <== NOT EXECUTED
aa84: 05c05011 strbeq r5, [r0, #17] <== NOT EXECUTED
aa88: 15c01011 strbne r1, [r0, #17] <== NOT EXECUTED
}
p = p1;
}
else /* double LR-turn */
{
p2 = p1->avl.right;
aa8c: e1a0200c mov r2, ip <== 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;
aa90: e5cc1011 strb r1, [ip, #17] <== NOT EXECUTED
aa94: ea000000 b aa9c <rtems_bdbuf_remove_from_tree+0x2f8> <== NOT EXECUTED
aa98: e1a02003 mov r2, r3
aa9c: e3a03001 mov r3, #1
default:
break;
}
}
if (buf_prev > buf_stack)
aaa0: e1560007 cmp r6, r7
aaa4: 9a000007 bls aac8 <rtems_bdbuf_remove_from_tree+0x324>
{
q = *(buf_prev - 1);
aaa8: e5160004 ldr r0, [r6, #-4]
if (q->avl.cache == -1)
aaac: e1d0c1d0 ldrsb ip, [r0, #16]
aab0: e37c0001 cmn ip, #1
{
q->avl.left = p;
aab4: 05802008 streq r2, [r0, #8]
}
else
{
q->avl.right = p;
aab8: 1580200c strne r2, [r0, #12]
*root = q;
}
modified = true;
while (modified)
aabc: e3530000 cmp r3, #0
aac0: 1affff9b bne a934 <rtems_bdbuf_remove_from_tree+0x190>
aac4: ea000007 b aae8 <rtems_bdbuf_remove_from_tree+0x344> <== NOT EXECUTED
q->avl.right = p;
}
}
else
{
*root = p;
aac8: e59f3020 ldr r3, [pc, #32] ; aaf0 <rtems_bdbuf_remove_from_tree+0x34c>
aacc: e5832040 str r2, [r3, #64] ; 0x40
aad0: ea000004 b aae8 <rtems_bdbuf_remove_from_tree+0x344>
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);
aad4: e5950024 ldr r0, [r5, #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);
aad8: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
aadc: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
aae0: e3800009 orr r0, r0, #9 <== NOT EXECUTED
aae4: ebffef95 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
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);
}
aae8: e28dd080 add sp, sp, #128 ; 0x80
aaec: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
0000aaf4 <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)
aaf4: e5903024 ldr r3, [r0, #36] ; 0x24
aaf8: 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)
{
aafc: e92d4010 push {r4, lr}
ab00: e1a04000 mov r4, r0
switch (bd->state)
ab04: 0a000008 beq ab2c <rtems_bdbuf_remove_from_tree_and_lru_list+0x38>
ab08: e3530002 cmp r3, #2
ab0c: 1a000001 bne ab18 <rtems_bdbuf_remove_from_tree_and_lru_list+0x24>
{
case RTEMS_BDBUF_STATE_FREE:
break;
case RTEMS_BDBUF_STATE_CACHED:
rtems_bdbuf_remove_from_tree (bd);
ab10: ebffff23 bl a7a4 <rtems_bdbuf_remove_from_tree>
break;
ab14: ea000004 b ab2c <rtems_bdbuf_remove_from_tree_and_lru_list+0x38>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
ab18: 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);
ab1c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
ab20: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
ab24: e3800008 orr r0, r0, #8 <== NOT EXECUTED
ab28: ebffef84 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
ab2c: e1a00004 mov r0, r4
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_10);
}
rtems_chain_extract (&bd->link);
}
ab30: e8bd4010 pop {r4, lr}
ab34: eafff0bf b 6e38 <_Chain_Extract>
0000b14c <rtems_bdbuf_swapout_task>:
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
b14c: 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;;
b150: e59f42f8 ldr r4, [pc, #760] ; b450 <rtems_bdbuf_swapout_task+0x304>
b154: e594200c ldr r2, [r4, #12]
* not this.
* @return rtems_task Not used.
*/
static rtems_task
rtems_bdbuf_swapout_task (rtems_task_argument arg)
{
b158: e24dd034 sub sp, sp, #52 ; 0x34
rtems_bdbuf_swapout_transfer transfer;
uint32_t period_in_ticks;
const uint32_t period_in_msecs = bdbuf_config.swapout_period;;
b15c: e58d2008 str r2, [sp, #8]
uint32_t timer_delta;
transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
b160: ebfffd7b bl a754 <rtems_bdbuf_swapout_writereq_alloc>
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
b164: e59dc008 ldr ip, [sp, #8]
b168: e59f22e4 ldr r2, [pc, #740] ; b454 <rtems_bdbuf_swapout_task+0x308>
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b16c: e28d3010 add r3, sp, #16
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 ();
b170: e58d0028 str r0, [sp, #40] ; 0x28
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
b174: e3a00ffa mov r0, #1000 ; 0x3e8
b178: e592100c ldr r1, [r2, #12]
the_chain->permanent_null = NULL;
b17c: e3a05000 mov r5, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b180: e2832004 add r2, r3, #4
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;
b184: e3e0a000 mvn sl, #0
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
b188: e000009c mul r0, ip, r0
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;
b18c: e3e09000 mvn r9, #0
b190: e58d2010 str r2, [sp, #16]
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
b194: e58d3018 str r3, [sp, #24]
b198: e58d901c str r9, [sp, #28]
b19c: e58da020 str sl, [sp, #32]
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
the_chain->permanent_null = NULL;
b1a0: e58d5014 str r5, [sp, #20]
transfer.syncing = false;
b1a4: e5cd5024 strb r5, [sp, #36] ; 0x24
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
b1a8: eb004142 bl 1b6b8 <__aeabi_uidiv>
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;
b1ac: e1a0800a mov r8, sl
transfer.syncing = false;
/*
* Localise the period.
*/
period_in_ticks = RTEMS_MICROSECONDS_TO_TICKS (period_in_msecs * 1000);
b1b0: e58d000c str r0, [sp, #12]
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;
b1b4: e3a0a001 mov sl, #1
rtems_bdbuf_swapout_workers_open (void)
{
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
b1b8: ebfffad9 bl 9d24 <rtems_bdbuf_lock_cache>
b1bc: e1a06005 mov r6, r5
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),
(bdbuf_config.swapout_priority ?
b1c0: e5947008 ldr r7, [r4, #8]
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
b1c4: e594b014 ldr fp, [r4, #20]
b1c8: ea000028 b b270 <rtems_bdbuf_swapout_task+0x124>
{
rtems_bdbuf_swapout_worker* worker;
worker = malloc (sizeof (rtems_bdbuf_swapout_worker));
b1cc: e3a00030 mov r0, #48 ; 0x30 <== NOT EXECUTED
b1d0: ebffdfc5 bl 30ec <malloc> <== NOT EXECUTED
if (!worker)
b1d4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_NOMEM);
b1d8: 059f0278 ldreq r0, [pc, #632] ; b458 <rtems_bdbuf_swapout_task+0x30c><== NOT EXECUTED
b1dc: 0a00001a beq b24c <rtems_bdbuf_swapout_task+0x100> <== 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 );
b1e0: e1a01004 mov r1, r4 <== NOT EXECUTED
b1e4: e59f0270 ldr r0, [pc, #624] ; b45c <rtems_bdbuf_swapout_task+0x310><== NOT EXECUTED
b1e8: ebffef07 bl 6e0c <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
worker->enabled = true;
b1ec: e5c4a00c strb sl, [r4, #12] <== NOT EXECUTED
worker->transfer.write_req = rtems_bdbuf_swapout_writereq_alloc ();
b1f0: ebfffd57 bl a754 <rtems_bdbuf_swapout_writereq_alloc> <== NOT EXECUTED
b1f4: 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),
b1f8: e59f0260 ldr r0, [pc, #608] ; b460 <rtems_bdbuf_swapout_task+0x314><== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b1fc: e2841014 add r1, r4, #20 <== NOT EXECUTED
b200: e3570000 cmp r7, #0 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
b204: e2842010 add r2, r4, #16 <== NOT EXECUTED
b208: e2853061 add r3, r5, #97 ; 0x61 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b20c: e5841010 str r1, [r4, #16] <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
b210: e5842018 str r2, [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;
b214: e5846014 str r6, [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;
b218: e584901c str r9, [r4, #28] <== NOT EXECUTED
b21c: e5848020 str r8, [r4, #32] <== NOT EXECUTED
sc = rtems_task_create (rtems_build_name('B', 'D', 'o', 'a' + w),
b220: e1830000 orr r0, r3, r0 <== NOT EXECUTED
b224: 11a01007 movne r1, r7 <== NOT EXECUTED
b228: 03a0100f moveq r1, #15 <== NOT EXECUTED
b22c: e284c008 add ip, r4, #8 <== NOT EXECUTED
b230: e3a02a02 mov r2, #8192 ; 0x2000 <== NOT EXECUTED
b234: e3a03b01 mov r3, #1024 ; 0x400 <== NOT EXECUTED
b238: e88d1040 stm sp, {r6, ip} <== NOT EXECUTED
b23c: ebffecbd bl 6538 <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)
b240: e3500000 cmp r0, #0 <== NOT EXECUTED
b244: 0a000001 beq b250 <rtems_bdbuf_swapout_task+0x104> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_CREATE);
b248: e59f0214 ldr r0, [pc, #532] ; b464 <rtems_bdbuf_swapout_task+0x318><== NOT EXECUTED
b24c: ebffedbb bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
sc = rtems_task_start (worker->id,
b250: e1a02004 mov r2, r4 <== NOT EXECUTED
b254: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
b258: e59f1208 ldr r1, [pc, #520] ; b468 <rtems_bdbuf_swapout_task+0x31c><== NOT EXECUTED
b25c: ebffed45 bl 6778 <rtems_task_start> <== NOT EXECUTED
rtems_bdbuf_swapout_worker_task,
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
b260: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
b264: 159f0200 ldrne r0, [pc, #512] ; b46c <rtems_bdbuf_swapout_task+0x320><== NOT EXECUTED
b268: 1afffff7 bne b24c <rtems_bdbuf_swapout_task+0x100> <== NOT EXECUTED
rtems_status_code sc;
size_t w;
rtems_bdbuf_lock_cache ();
for (w = 0; w < bdbuf_config.swapout_workers; w++)
b26c: e2855001 add r5, r5, #1 <== NOT EXECUTED
b270: e155000b cmp r5, fp
b274: 3affffd4 bcc b1cc <rtems_bdbuf_swapout_task+0x80>
* 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)
b278: e3a0b000 mov fp, #0
(rtems_task_argument) worker);
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WK_START);
}
rtems_bdbuf_unlock_cache ();
b27c: ebfffb21 bl 9f08 <rtems_bdbuf_unlock_cache>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
b280: e59f51e8 ldr r5, [pc, #488] ; b470 <rtems_bdbuf_swapout_task+0x324>
* 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)
b284: e28d9010 add r9, sp, #16
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
b288: ea000059 b b3f4 <rtems_bdbuf_swapout_task+0x2a8>
b28c: e3a07001 mov r7, #1
rtems_bdbuf_swapout_transfer* transfer)
{
rtems_bdbuf_swapout_worker* worker;
bool transfered_buffers = false;
rtems_bdbuf_lock_cache ();
b290: ebfffaa3 bl 9d24 <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)
b294: e5d53030 ldrb r3, [r5, #48] ; 0x30
b298: e3530000 cmp r3, #0
b29c: 13a06000 movne r6, #0
b2a0: 1a000004 bne b2b8 <rtems_bdbuf_swapout_task+0x16c>
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
b2a4: e59f01b0 ldr r0, [pc, #432] ; b45c <rtems_bdbuf_swapout_task+0x310>
b2a8: ebffeeeb bl 6e5c <_Chain_Get>
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
b2ac: e2506000 subs r6, r0, #0
transfer = &worker->transfer;
b2b0: 12864010 addne r4, r6, #16
worker = NULL;
else
{
worker = (rtems_bdbuf_swapout_worker*)
rtems_chain_get (&bdbuf_cache.swapout_workers);
if (worker)
b2b4: 1a000000 bne b2bc <rtems_bdbuf_swapout_task+0x170>
b2b8: e1a04009 mov r4, r9
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
transfer->syncing = bdbuf_cache.sync_active;
b2bc: e5d53030 ldrb r3, [r5, #48] ; 0x30
b2c0: 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)
b2c4: e5d53030 ldrb r3, [r5, #48] ; 0x30
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
b2c8: e284a004 add sl, r4, #4
b2cc: e3530000 cmp r3, #0
if (worker)
transfer = &worker->transfer;
}
rtems_chain_initialize_empty (&transfer->bds);
transfer->dev = BDBUF_INVALID_DEV;
b2d0: e3e02000 mvn r2, #0
b2d4: e3e03000 mvn r3, #0
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b2d8: e8840c00 stm r4, {sl, fp}
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
b2dc: e5844008 str r4, [r4, #8]
b2e0: e584200c str r2, [r4, #12]
b2e4: e5843010 str r3, [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;
b2e8: 12853038 addne r3, r5, #56 ; 0x38
b2ec: 1893000c ldmne r3, {r2, r3}
b2f0: 1584200c strne r2, [r4, #12]
b2f4: 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,
b2f8: e3a0c000 mov ip, #0
b2fc: e284800c add r8, r4, #12
b300: e58dc000 str ip, [sp]
b304: e59dc008 ldr ip, [sp, #8]
b308: e1a02004 mov r2, r4
b30c: e1a00008 mov r0, r8
b310: e59f115c ldr r1, [pc, #348] ; b474 <rtems_bdbuf_swapout_task+0x328>
b314: e3a03001 mov r3, #1
b318: e58dc004 str ip, [sp, #4]
b31c: ebfffa91 bl 9d68 <rtems_bdbuf_swapout_modified_processing>
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
b320: e59dc008 ldr ip, [sp, #8]
&bdbuf_cache.modified,
&transfer->bds,
bdbuf_cache.sync_active,
b324: e5d53030 ldrb r3, [r5, #48] ; 0x30
timer_delta);
/*
* Process the cache's modified list.
*/
rtems_bdbuf_swapout_modified_processing (&transfer->dev,
b328: e1a02004 mov r2, r4
b32c: e1a00008 mov r0, r8
b330: e59f1140 ldr r1, [pc, #320] ; b478 <rtems_bdbuf_swapout_task+0x32c>
b334: e88d1080 stm sp, {r7, ip}
b338: ebfffa8a bl 9d68 <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 ();
b33c: ebfffaf1 bl 9f08 <rtems_bdbuf_unlock_cache>
/*
* If there are buffers to transfer to the media transfer them.
*/
if (!rtems_chain_is_empty (&transfer->bds))
b340: e5943000 ldr r3, [r4]
b344: e153000a cmp r3, sl
b348: 03a04000 moveq r4, #0
b34c: 0a00000b beq b380 <rtems_bdbuf_swapout_task+0x234>
{
if (worker)
b350: e3560000 cmp r6, #0
b354: 0a000006 beq b374 <rtems_bdbuf_swapout_task+0x228>
{
rtems_status_code sc = rtems_event_send (worker->id,
b358: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
b35c: e3a01004 mov r1, #4 <== NOT EXECUTED
b360: ebffeaf4 bl 5f38 <rtems_event_send> <== NOT EXECUTED
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
b364: e3500000 cmp r0, #0 <== NOT EXECUTED
b368: 0a000003 beq b37c <rtems_bdbuf_swapout_task+0x230> <== NOT EXECUTED
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
b36c: e59f0108 ldr r0, [pc, #264] ; b47c <rtems_bdbuf_swapout_task+0x330><== NOT EXECUTED
b370: eaffffb5 b b24c <rtems_bdbuf_swapout_task+0x100> <== NOT EXECUTED
}
else
{
rtems_bdbuf_swapout_write (transfer);
b374: e1a00004 mov r0, r4
b378: ebffff14 bl afd0 <rtems_bdbuf_swapout_write>
b37c: e3a04001 mov r4, #1
}
transfered_buffers = true;
}
if (bdbuf_cache.sync_active && !transfered_buffers)
b380: e5d57030 ldrb r7, [r5, #48] ; 0x30
b384: e21770ff ands r7, r7, #255 ; 0xff
b388: e59f60e0 ldr r6, [pc, #224] ; b470 <rtems_bdbuf_swapout_task+0x324>
b38c: 0a00000d beq b3c8 <rtems_bdbuf_swapout_task+0x27c>
b390: e3540000 cmp r4, #0
b394: e3a07000 mov r7, #0
b398: 1affffbc bne b290 <rtems_bdbuf_swapout_task+0x144>
{
rtems_id sync_requester;
rtems_bdbuf_lock_cache ();
b39c: ebfffa60 bl 9d24 <rtems_bdbuf_lock_cache>
sync_requester = bdbuf_cache.sync_requester;
b3a0: e5967034 ldr r7, [r6, #52] ; 0x34
bdbuf_cache.sync_active = false;
b3a4: e5c64030 strb r4, [r6, #48] ; 0x30
bdbuf_cache.sync_requester = 0;
b3a8: e5864034 str r4, [r6, #52] ; 0x34
rtems_bdbuf_unlock_cache ();
b3ac: ebfffad5 bl 9f08 <rtems_bdbuf_unlock_cache>
if (sync_requester)
b3b0: e3570000 cmp r7, #0
b3b4: 0a000005 beq b3d0 <rtems_bdbuf_swapout_task+0x284>
rtems_event_send (sync_requester, RTEMS_BDBUF_TRANSFER_SYNC);
b3b8: e1a00007 mov r0, r7
b3bc: e3a01002 mov r1, #2
b3c0: ebffeadc bl 5f38 <rtems_event_send>
b3c4: ea000001 b b3d0 <rtems_bdbuf_swapout_task+0x284>
/*
* 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,
b3c8: e3540000 cmp r4, #0
b3cc: 1affffaf bne b290 <rtems_bdbuf_swapout_task+0x144>
*/
update_timers = false;
}
while (transfered_buffers);
sc = rtems_event_receive (RTEMS_BDBUF_SWAPOUT_SYNC,
b3d0: e3a00004 mov r0, #4
b3d4: e3a01000 mov r1, #0
b3d8: e59d200c ldr r2, [sp, #12]
b3dc: e28d3030 add r3, sp, #48 ; 0x30
b3e0: ebffea78 bl 5dc8 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
period_in_ticks,
&out);
if ((sc != RTEMS_SUCCESSFUL) && (sc != RTEMS_TIMEOUT))
b3e4: e3500006 cmp r0, #6
b3e8: 13500000 cmpne r0, #0
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
b3ec: 159f008c ldrne r0, [pc, #140] ; b480 <rtems_bdbuf_swapout_task+0x334>
b3f0: 1affff95 bne b24c <rtems_bdbuf_swapout_task+0x100>
/*
* Create the worker threads.
*/
rtems_bdbuf_swapout_workers_open ();
while (bdbuf_cache.swapout_enabled)
b3f4: e5d53004 ldrb r3, [r5, #4]
b3f8: e21330ff ands r3, r3, #255 ; 0xff
b3fc: e59f406c ldr r4, [pc, #108] ; b470 <rtems_bdbuf_swapout_task+0x324>
b400: 1affffa1 bne b28c <rtems_bdbuf_swapout_task+0x140>
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
b404: e284600c add r6, r4, #12 <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
b408: e1a05003 mov r5, r3 <== NOT EXECUTED
static void
rtems_bdbuf_swapout_workers_close (void)
{
rtems_chain_node* node;
rtems_bdbuf_lock_cache ();
b40c: ebfffa44 bl 9d24 <rtems_bdbuf_lock_cache> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
b410: e5944008 ldr r4, [r4, #8] <== NOT EXECUTED
b414: ea000004 b b42c <rtems_bdbuf_swapout_task+0x2e0> <== NOT EXECUTED
node = rtems_chain_first (&bdbuf_cache.swapout_workers);
while (!rtems_chain_is_tail (&bdbuf_cache.swapout_workers, node))
{
rtems_bdbuf_swapout_worker* worker = (rtems_bdbuf_swapout_worker*) node;
worker->enabled = false;
b418: e5c4500c strb r5, [r4, #12] <== NOT EXECUTED
rtems_event_send (worker->id, RTEMS_BDBUF_SWAPOUT_SYNC);
b41c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
b420: e3a01004 mov r1, #4 <== NOT EXECUTED
b424: ebffeac3 bl 5f38 <rtems_event_send> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
b428: e5944000 ldr r4, [r4] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
b42c: e1540006 cmp r4, r6 <== NOT EXECUTED
b430: 1afffff8 bne b418 <rtems_bdbuf_swapout_task+0x2cc> <== NOT EXECUTED
node = rtems_chain_next (node);
}
rtems_bdbuf_unlock_cache ();
b434: ebfffab3 bl 9f08 <rtems_bdbuf_unlock_cache> <== NOT EXECUTED
rtems_fatal_error_occurred (BLKDEV_FATAL_BDBUF_SWAPOUT_RE);
}
rtems_bdbuf_swapout_workers_close ();
free (transfer.write_req);
b438: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
b43c: ebffde5e bl 2dbc <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
b440: e3a00000 mov r0, #0 <== NOT EXECUTED
b444: ebffec8d bl 6680 <rtems_task_delete> <== NOT EXECUTED
}
b448: e28dd034 add sp, sp, #52 ; 0x34 <== NOT EXECUTED
b44c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000b484 <rtems_bdbuf_swapout_worker_task>:
* @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)
{
b484: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
b488: e1a04000 mov r4, r0 <== NOT EXECUTED
while (worker->enabled)
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
rtems_bdbuf_swapout_write (&worker->transfer);
b48c: e2805010 add r5, r0, #16 <== NOT EXECUTED
b490: 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;
b494: e3a08000 mov r8, #0 <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
b498: e3e06000 mvn r6, #0 <== NOT EXECUTED
b49c: e3e07000 mvn r7, #0 <== 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)
b4a0: ea00000c b b4d8 <rtems_bdbuf_swapout_worker_task+0x54> <== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
b4a4: ebfffb2f bl a168 <rtems_bdbuf_wait_for_event> <== NOT EXECUTED
rtems_bdbuf_swapout_write (&worker->transfer);
b4a8: e1a00005 mov r0, r5 <== NOT EXECUTED
b4ac: ebfffec7 bl afd0 <rtems_bdbuf_swapout_write> <== NOT EXECUTED
rtems_bdbuf_lock_cache ();
b4b0: ebfffa1b bl 9d24 <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 );
b4b4: e59f0048 ldr r0, [pc, #72] ; b504 <rtems_bdbuf_swapout_worker_task+0x80><== NOT EXECUTED
b4b8: e1a01004 mov r1, r4 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
b4bc: e584a010 str sl, [r4, #16] <== NOT EXECUTED
the_chain->permanent_null = NULL;
b4c0: e5848014 str r8, [r4, #20] <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
b4c4: e5845018 str r5, [r4, #24] <== NOT EXECUTED
rtems_chain_initialize_empty (&worker->transfer.bds);
worker->transfer.dev = BDBUF_INVALID_DEV;
b4c8: e584601c str r6, [r4, #28] <== NOT EXECUTED
b4cc: e5847020 str r7, [r4, #32] <== NOT EXECUTED
b4d0: ebffee4d bl 6e0c <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
b4d4: ebfffa8b bl 9f08 <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)
b4d8: e5d4900c ldrb r9, [r4, #12] <== NOT EXECUTED
b4dc: e21990ff ands r9, r9, #255 ; 0xff <== NOT EXECUTED
{
rtems_bdbuf_wait_for_event (RTEMS_BDBUF_SWAPOUT_SYNC);
b4e0: e3a00004 mov r0, #4 <== 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)
b4e4: 1affffee bne b4a4 <rtems_bdbuf_swapout_worker_task+0x20> <== NOT EXECUTED
rtems_chain_append (&bdbuf_cache.swapout_workers, &worker->link);
rtems_bdbuf_unlock_cache ();
}
free (worker->transfer.write_req);
b4e8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
b4ec: ebffde32 bl 2dbc <free> <== NOT EXECUTED
free (worker);
b4f0: e1a00004 mov r0, r4 <== NOT EXECUTED
b4f4: ebffde30 bl 2dbc <free> <== NOT EXECUTED
rtems_task_delete (RTEMS_SELF);
b4f8: e1a00009 mov r0, r9 <== NOT EXECUTED
}
b4fc: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
}
free (worker->transfer.write_req);
free (worker);
rtems_task_delete (RTEMS_SELF);
b500: eaffec5e b 6680 <rtems_task_delete> <== NOT EXECUTED
0000afd0 <rtems_bdbuf_swapout_write>:
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))
afd0: e5903000 ldr r3, [r0]
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
afd4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
afd8: e2807004 add r7, r0, #4
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))
afdc: e1530007 cmp r3, r7
*
* @param transfer The transfer transaction.
*/
static void
rtems_bdbuf_swapout_write (rtems_bdbuf_swapout_transfer* transfer)
{
afe0: 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))
afe4: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc}
/*
* 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);
afe8: e280100c add r1, r0, #12
afec: e8910003 ldm r1, {r0, r1}
aff0: ebffdba5 bl 1e8c <rtems_disk_obtain>
if (dd == NULL)
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
aff4: e59f9148 ldr r9, [pc, #328] ; b144 <rtems_bdbuf_swapout_write+0x174>
* 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)
aff8: e3500000 cmp r0, #0
affc: e59f5144 ldr r5, [pc, #324] ; b148 <rtems_bdbuf_swapout_write+0x178>
b000: 11a05000 movne r5, r0
dd = &null_disk;
bufs_per_bd = dd->block_size / bdbuf_config.buffer_min;
b004: e5950020 ldr r0, [r5, #32]
b008: e5991020 ldr r1, [r9, #32]
b00c: eb0041a9 bl 1b6b8 <__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;
b010: e5943018 ldr r3, [r4, #24]
transfer->write_req->bufnum = 0;
b014: 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;
b018: e3a0800c mov r8, #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))
b01c: e599b004 ldr fp, [r9, #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;
b020: e1a0a000 mov sl, 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))
b024: e1a06002 mov r6, r2
* 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;
transfer->write_req->bufnum = 0;
b028: 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;
b02c: e583800c str r8, [r3, #12]
transfer->write_req->bufnum++;
buf->user = bd;
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
last_block = bd->block;
b030: e1a09002 mov r9, r2
* 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)
b034: ea00002f b b0f8 <rtems_bdbuf_swapout_write+0x128>
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) &&
b038: e5953008 ldr r3, [r5, #8]
b03c: e593300c ldr r3, [r3, #12]
b040: e3130001 tst r3, #1
b044: 0a00000c beq b07c <rtems_bdbuf_swapout_write+0xac>
transfer->write_req->bufnum &&
b048: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
b04c: e5931010 ldr r1, [r3, #16] <== NOT EXECUTED
b050: e3510000 cmp r1, #0 <== NOT EXECUTED
(bd->block != (last_block + bufs_per_bd)))
b054: e086300a add r3, r6, sl <== NOT EXECUTED
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) &&
transfer->write_req->bufnum &&
b058: 0a000007 beq b07c <rtems_bdbuf_swapout_write+0xac> <== NOT EXECUTED
(bd->block != (last_block + bufs_per_bd)))
b05c: e592101c ldr r1, [r2, #28] <== NOT EXECUTED
b060: e1510003 cmp r1, r3 <== NOT EXECUTED
b064: 0a000004 beq b07c <rtems_bdbuf_swapout_write+0xac> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE void _Chain_Prepend(
Chain_Control *the_chain,
Chain_Node *the_node
)
{
_Chain_Insert(_Chain_Head(the_chain), the_node);
b068: e1a01002 mov r1, r2 <== NOT EXECUTED
b06c: e1a00004 mov r0, r4 <== NOT EXECUTED
b070: eb0010a7 bl f314 <_Chain_Insert> <== NOT EXECUTED
b074: e3a03001 mov r3, #1 <== 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) &&
b078: ea00000e b b0b8 <rtems_bdbuf_swapout_write+0xe8> <== NOT EXECUTED
write = true;
}
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
b07c: e5943018 ldr r3, [r4, #24]
b080: e5930010 ldr r0, [r3, #16]
transfer->write_req->bufnum++;
b084: e2801001 add r1, r0, #1
b088: e5831010 str r1, [r3, #16]
buf->user = bd;
buf->block = bd->block;
b08c: 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;
b090: e0831200 add r1, r3, r0, lsl #4
buf->block = bd->block;
b094: e581c018 str ip, [r1, #24]
buf->length = dd->block_size;
b098: e595c020 ldr ip, [r5, #32]
b09c: e581c01c str ip, [r1, #28]
buf->buffer = bd->buffer;
b0a0: e592c020 ldr ip, [r2, #32]
b0a4: e2800002 add r0, r0, #2
else
{
rtems_blkdev_sg_buffer* buf;
buf = &transfer->write_req->bufs[transfer->write_req->bufnum];
transfer->write_req->bufnum++;
buf->user = bd;
b0a8: e5812024 str r2, [r1, #36] ; 0x24
buf->block = bd->block;
buf->length = dd->block_size;
buf->buffer = bd->buffer;
last_block = bd->block;
b0ac: 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;
b0b0: e783c200 str ip, [r3, r0, lsl #4]
last_block = bd->block;
b0b4: e3a03000 mov r3, #0
/*
* 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) ||
b0b8: e5942000 ldr r2, [r4]
b0bc: e1520007 cmp r2, r7
b0c0: 0a000005 beq b0dc <rtems_bdbuf_swapout_write+0x10c>
(transfer->write_req->bufnum >= bdbuf_config.max_write_blocks))
b0c4: e5942018 ldr r2, [r4, #24]
b0c8: e5922010 ldr r2, [r2, #16]
b0cc: e152000b cmp r2, fp
b0d0: 2a000001 bcs b0dc <rtems_bdbuf_swapout_write+0x10c>
write = true;
if (write)
b0d4: e3530000 cmp r3, #0
b0d8: 0a000006 beq b0f8 <rtems_bdbuf_swapout_write+0x128>
{
rtems_bdbuf_execute_transfer_request (dd, transfer->write_req, false);
b0dc: e1a00005 mov r0, r5
b0e0: e5941018 ldr r1, [r4, #24]
b0e4: e3a02000 mov r2, #0
b0e8: ebffff77 bl aecc <rtems_bdbuf_execute_transfer_request>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
b0ec: e5943018 ldr r3, [r4, #24]
transfer->write_req->bufnum = 0;
b0f0: 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;
b0f4: e583800c str r8, [r3, #12]
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
b0f8: e1a00004 mov r0, r4
b0fc: ebffef56 bl 6e5c <_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)
b100: e2502000 subs r2, r0, #0
b104: 1affffcb bne b038 <rtems_bdbuf_swapout_write+0x68>
transfer->write_req->status = RTEMS_RESOURCE_IN_USE;
transfer->write_req->bufnum = 0;
}
}
if (dd != &null_disk)
b108: e59f3038 ldr r3, [pc, #56] ; b148 <rtems_bdbuf_swapout_write+0x178>
b10c: e1550003 cmp r5, r3
b110: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc}
{
/*
* If sync'ing and the deivce is capability of handling a sync IO control
* call perform the call.
*/
if (transfer->syncing &&
b114: e5d43014 ldrb r3, [r4, #20]
b118: e3530000 cmp r3, #0
b11c: 0a000005 beq b138 <rtems_bdbuf_swapout_write+0x168>
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
b120: 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 &&
b124: e590300c ldr r3, [r0, #12]
b128: e3130002 tst r3, #2
(dd->phys_dev->capabilities & RTEMS_BLKDEV_CAP_SYNC))
{
/* int result = */ dd->ioctl (dd->phys_dev, RTEMS_BLKDEV_REQ_SYNC, NULL);
b12c: 13a01002 movne r1, #2
b130: 11a0e00f movne lr, pc
b134: 1595f028 ldrne pc, [r5, #40] ; 0x28
/* How should the error be handled ? */
}
rtems_disk_release (dd);
b138: e1a00005 mov r0, r5
}
}
}
b13c: 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);
b140: eaffdbcd b 207c <rtems_disk_release>
0000b508 <rtems_bdbuf_sync>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
b508: 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)
b50c: e59f514c ldr r5, [pc, #332] ; b660 <rtems_bdbuf_sync+0x158>
b510: e5d53088 ldrb r3, [r5, #136] ; 0x88
b514: e3530000 cmp r3, #0
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_bdbuf_sync (rtems_bdbuf_buffer *bd)
{
b518: e1a04000 mov r4, r0
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
b51c: 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)
b520: 08bd8030 popeq {r4, r5, pc}
return RTEMS_NOT_CONFIGURED;
if (bd == NULL)
b524: e3540000 cmp r4, #0
b528: 03a00009 moveq r0, #9
b52c: 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();
b530: ebfff9fb bl 9d24 <rtems_bdbuf_lock_cache>
sc = rtems_bdbuf_check_bd_and_lock_cache (bd, "sync");
if (sc != RTEMS_SUCCESSFUL)
return sc;
switch (bd->state)
b534: e5943024 ldr r3, [r4, #36] ; 0x24
b538: e3530003 cmp r3, #3
b53c: 3a00003f bcc b640 <rtems_bdbuf_sync+0x138>
b540: e3530005 cmp r3, #5
b544: 9a000002 bls b554 <rtems_bdbuf_sync+0x4c>
b548: e3530006 cmp r3, #6
b54c: 1a00003b bne b640 <rtems_bdbuf_sync+0x138>
b550: ea000037 b b634 <rtems_bdbuf_sync+0x12c>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b554: e3a03008 mov r3, #8
b558: e5843024 str r3, [r4, #36] ; 0x24
b55c: e285005c add r0, r5, #92 ; 0x5c
b560: e1a01004 mov r1, r4
b564: ebffee28 bl 6e0c <_Chain_Append>
{
rtems_bdbuf_set_state (bd, RTEMS_BDBUF_STATE_SYNC);
rtems_chain_append (&bdbuf_cache.sync, &bd->link);
if (bd->waiters)
b568: e5943028 ldr r3, [r4, #40] ; 0x28
b56c: e3530000 cmp r3, #0
rtems_bdbuf_wake (&bdbuf_cache.access_waiters);
b570: 12850068 addne r0, r5, #104 ; 0x68
b574: 1bfff9f0 blne 9d3c <rtems_bdbuf_wake>
rtems_bdbuf_wake_swapper ();
b578: ebfffaba bl a068 <rtems_bdbuf_wake_swapper>
static void
rtems_bdbuf_wait_for_sync_done (rtems_bdbuf_buffer *bd)
{
while (true)
{
switch (bd->state)
b57c: e5943024 ldr r3, [r4, #36] ; 0x24
b580: e2433001 sub r3, r3, #1
b584: e3530009 cmp r3, #9
b588: 979ff103 ldrls pc, [pc, r3, lsl #2]
b58c: ea00000d b b5c8 <rtems_bdbuf_sync+0xc0> <== NOT EXECUTED
b590: 0000b5dc .word 0x0000b5dc <== NOT EXECUTED
b594: 0000b5dc .word 0x0000b5dc <== NOT EXECUTED
b598: 0000b5dc .word 0x0000b5dc <== NOT EXECUTED
b59c: 0000b5dc .word 0x0000b5dc <== NOT EXECUTED
b5a0: 0000b5dc .word 0x0000b5dc <== NOT EXECUTED
b5a4: 0000b5dc .word 0x0000b5dc <== NOT EXECUTED
b5a8: 0000b5dc .word 0x0000b5dc <== NOT EXECUTED
b5ac: 0000b5b8 .word 0x0000b5b8 <== NOT EXECUTED
b5b0: 0000b5b8 .word 0x0000b5b8 <== NOT EXECUTED
b5b4: 0000b5b8 .word 0x0000b5b8 <== 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);
b5b8: e1a00004 mov r0, r4
b5bc: e59f10a0 ldr r1, [pc, #160] ; b664 <rtems_bdbuf_sync+0x15c>
b5c0: ebfffb51 bl a30c <rtems_bdbuf_wait>
b5c4: eaffffec b b57c <rtems_bdbuf_sync+0x74>
break;
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_9);
b5c8: 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);
b5cc: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
b5d0: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b5d4: e3800007 orr r0, r0, #7 <== NOT EXECUTED
b5d8: ea00001c b b650 <rtems_bdbuf_sync+0x148> <== NOT EXECUTED
/*
* We may have created a cached or empty buffer which may be recycled.
*/
if (bd->waiters == 0
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
b5dc: 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
b5e0: e3530000 cmp r3, #0
b5e4: 1a00001a bne b654 <rtems_bdbuf_sync+0x14c>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
b5e8: 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
b5ec: e3530002 cmp r3, #2
b5f0: 0a000002 beq b600 <rtems_bdbuf_sync+0xf8>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
b5f4: 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
b5f8: e3530001 cmp r3, #1
b5fc: 1a000014 bne b654 <rtems_bdbuf_sync+0x14c>
&& (bd->state == RTEMS_BDBUF_STATE_CACHED
|| bd->state == RTEMS_BDBUF_STATE_EMPTY))
{
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
b600: e5943024 ldr r3, [r4, #36] ; 0x24
b604: e3530001 cmp r3, #1
b608: 1a000006 bne b628 <rtems_bdbuf_sync+0x120>
{
rtems_bdbuf_remove_from_tree (bd);
b60c: e1a00004 mov r0, r4
b610: ebfffc63 bl a7a4 <rtems_bdbuf_remove_from_tree>
}
static void
rtems_bdbuf_set_state (rtems_bdbuf_buffer *bd, rtems_bdbuf_buf_state state)
{
bd->state = state;
b614: e3a03000 mov r3, #0
b618: 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);
b61c: e1a01004 mov r1, r4
b620: e59f0040 ldr r0, [pc, #64] ; b668 <rtems_bdbuf_sync+0x160>
b624: eb000f3a bl f314 <_Chain_Insert>
if (bd->state == RTEMS_BDBUF_STATE_EMPTY)
{
rtems_bdbuf_remove_from_tree (bd);
rtems_bdbuf_make_free_and_add_to_lru_list (bd);
}
rtems_bdbuf_wake (&bdbuf_cache.buffer_waiters);
b628: e59f003c ldr r0, [pc, #60] ; b66c <rtems_bdbuf_sync+0x164>
b62c: ebfff9c2 bl 9d3c <rtems_bdbuf_wake>
b630: ea000007 b b654 <rtems_bdbuf_sync+0x14c>
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);
b634: e1a00004 mov r0, r4
b638: ebfffd4c bl ab70 <rtems_bdbuf_discard_buffer_after_access>
break;
b63c: ea000004 b b654 <rtems_bdbuf_sync+0x14c>
default:
rtems_bdbuf_fatal (bd->state, RTEMS_BLKDEV_FATAL_BDBUF_STATE_5);
b640: 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);
b644: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
b648: e3800442 orr r0, r0, #1107296256 ; 0x42000000 <== NOT EXECUTED
b64c: e3800003 orr r0, r0, #3 <== NOT EXECUTED
b650: ebffecba bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (rtems_bdbuf_tracer)
rtems_bdbuf_show_usage ();
rtems_bdbuf_unlock_cache ();
b654: ebfffa2b bl 9f08 <rtems_bdbuf_unlock_cache>
b658: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
}
b65c: e8bd8030 pop {r4, r5, pc}
00009f08 <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);
9f08: e59f3018 ldr r3, [pc, #24] ; 9f28 <rtems_bdbuf_unlock_cache+0x20>
/**
* Unlock the cache.
*/
static void
rtems_bdbuf_unlock_cache (void)
{
9f0c: 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);
9f10: e5930028 ldr r0, [r3, #40] ; 0x28
9f14: ebfff160 bl 649c <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
9f18: e3500000 cmp r0, #0
9f1c: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (fatal_error_code);
9f20: e59f0004 ldr r0, [pc, #4] ; 9f2c <rtems_bdbuf_unlock_cache+0x24><== NOT EXECUTED
9f24: ebfff285 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
00009f30 <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);
9f30: e59f3018 ldr r3, [pc, #24] ; 9f50 <rtems_bdbuf_unlock_sync+0x20>
/**
* Unlock the cache's sync lock. Any blocked writers are woken.
*/
static void
rtems_bdbuf_unlock_sync (void)
{
9f34: 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);
9f38: e593002c ldr r0, [r3, #44] ; 0x2c
9f3c: ebfff156 bl 649c <rtems_semaphore_release>
if (sc != RTEMS_SUCCESSFUL)
9f40: e3500000 cmp r0, #0
9f44: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (fatal_error_code);
9f48: e59f0004 ldr r0, [pc, #4] ; 9f54 <rtems_bdbuf_unlock_sync+0x24><== NOT EXECUTED
9f4c: ebfff27b bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000a168 <rtems_bdbuf_wait_for_event>:
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
a168: e92d4011 push {r0, r4, lr}
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
a16c: e3a01000 mov r1, #0
a170: e28d3004 add r3, sp, #4
a174: e5231004 str r1, [r3, #-4]!
sc = rtems_event_receive (event,
a178: e1a02001 mov r2, r1
a17c: e1a0300d mov r3, sp
return RTEMS_UNSATISFIED;
}
static void
rtems_bdbuf_wait_for_event (rtems_event_set event)
{
a180: e1a04000 mov r4, r0
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_event_set out = 0;
sc = rtems_event_receive (event,
a184: ebffef0f bl 5dc8 <rtems_event_receive>
RTEMS_EVENT_ALL | RTEMS_WAIT,
RTEMS_NO_TIMEOUT,
&out);
if (sc != RTEMS_SUCCESSFUL || out != event)
a188: e3500000 cmp r0, #0
a18c: 1a000002 bne a19c <rtems_bdbuf_wait_for_event+0x34>
a190: e59d3000 ldr r3, [sp]
a194: e1530004 cmp r3, r4
a198: 0a000001 beq a1a4 <rtems_bdbuf_wait_for_event+0x3c>
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_WAIT_EVNT);
a19c: e59f0004 ldr r0, [pc, #4] ; a1a8 <rtems_bdbuf_wait_for_event+0x40><== NOT EXECUTED
a1a0: ebfff1e6 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
}
a1a4: e8bd8018 pop {r3, r4, pc}
00009d3c <rtems_bdbuf_wake>:
static void
rtems_bdbuf_wake (const rtems_bdbuf_waiters *waiters)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
9d3c: e5903000 ldr r3, [r0]
9d40: 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)
{
9d44: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = RTEMS_SUCCESSFUL;
if (waiters->count > 0)
9d48: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
{
sc = rtems_semaphore_flush (waiters->sema);
9d4c: e5900004 ldr r0, [r0, #4]
9d50: eb001428 bl edf8 <rtems_semaphore_flush>
if (sc != RTEMS_SUCCESSFUL)
9d54: e3500000 cmp r0, #0
9d58: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_CACHE_WAKE);
9d5c: e59f0000 ldr r0, [pc, #0] ; 9d64 <rtems_bdbuf_wake+0x28> <== NOT EXECUTED
9d60: ebfff2f6 bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
0000a068 <rtems_bdbuf_wake_swapper>:
}
static void
rtems_bdbuf_wake_swapper (void)
{
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
a068: e59f301c ldr r3, [pc, #28] ; a08c <rtems_bdbuf_wake_swapper+0x24>
}
}
static void
rtems_bdbuf_wake_swapper (void)
{
a06c: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_status_code sc = rtems_event_send (bdbuf_cache.swapout,
a070: e5930000 ldr r0, [r3]
a074: e3a01004 mov r1, #4
a078: ebffefae bl 5f38 <rtems_event_send>
RTEMS_BDBUF_SWAPOUT_SYNC);
if (sc != RTEMS_SUCCESSFUL)
a07c: e3500000 cmp r0, #0
a080: 049df004 popeq {pc} ; (ldreq pc, [sp], #4)
rtems_fatal_error_occurred (RTEMS_BLKDEV_FATAL_BDBUF_SO_WAKE);
a084: e59f0004 ldr r0, [pc, #4] ; a090 <rtems_bdbuf_wake_swapper+0x28><== NOT EXECUTED
a088: ebfff22c bl 6940 <rtems_fatal_error_occurred> <== NOT EXECUTED
000208ec <rtems_bdpart_create>:
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
208ec: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
208f0: e2514000 subs r4, r1, #0 <== NOT EXECUTED
const rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
const unsigned *dist,
size_t count
)
{
208f4: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
208f8: e98d000c stmib sp, {r2, r3} <== NOT EXECUTED
208fc: e59d5040 ldr r5, [sp, #64] ; 0x40 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
20900: 0a000003 beq 20914 <rtems_bdpart_create+0x28> <== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
20904: e5943000 ldr r3, [r4] <== NOT EXECUTED
20908: e3530000 cmp r3, #0 <== NOT EXECUTED
2090c: 05d48008 ldrbeq r8, [r4, #8] <== NOT EXECUTED
20910: 0a000000 beq 20918 <rtems_bdpart_create+0x2c> <== NOT EXECUTED
20914: e3a08000 mov r8, #0 <== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
20918: e3580000 cmp r8, #0 <== NOT EXECUTED
2091c: 13a0603f movne r6, #63 ; 0x3f <== NOT EXECUTED
20920: 03a06001 moveq r6, #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) {
20924: e3550000 cmp r5, #0 <== NOT EXECUTED
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
rtems_blkdev_bnum pos = 0;
rtems_blkdev_bnum dist_sum = 0;
rtems_blkdev_bnum record_space =
dos_compatibility ? RTEMS_BDPART_MBR_CYLINDER_SIZE : 1;
20928: e20880ff and r8, r8, #255 ; 0xff <== 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) {
2092c: 01a07005 moveq r7, r5 <== NOT EXECUTED
20930: 0a00006a beq 20ae0 <rtems_bdpart_create+0x1f4> <== NOT EXECUTED
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL || dist == NULL) {
20934: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
20938: e3540000 cmp r4, #0 <== NOT EXECUTED
2093c: 13510000 cmpne r1, #0 <== NOT EXECUTED
20940: 13a03000 movne r3, #0 <== NOT EXECUTED
20944: 03a03001 moveq r3, #1 <== NOT EXECUTED
20948: 0a000061 beq 20ad4 <rtems_bdpart_create+0x1e8> <== NOT EXECUTED
2094c: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
20950: e3520000 cmp r2, #0 <== NOT EXECUTED
20954: 0a00005e beq 20ad4 <rtems_bdpart_create+0x1e8> <== 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;
20958: e3a0b000 mov fp, #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);
2095c: e28d1010 add r1, sp, #16 <== NOT EXECUTED
20960: e28d2018 add r2, sp, #24 <== 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;
20964: e3a0a000 mov sl, #0 <== NOT EXECUTED
20968: e58da010 str sl, [sp, #16] <== NOT EXECUTED
2096c: e58db014 str fp, [sp, #20] <== NOT EXECUTED
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& format->mbr.dos_compatibility;
rtems_blkdev_bnum disk_end = 0;
20970: e58d3018 str r3, [sp, #24] <== 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);
20974: eb000163 bl 20f08 <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
20978: e2507000 subs r7, r0, #0 <== NOT EXECUTED
2097c: 01a03007 moveq r3, r7 <== NOT EXECUTED
20980: 01a0b007 moveq fp, r7 <== NOT EXECUTED
20984: 0a000007 beq 209a8 <rtems_bdpart_create+0xbc> <== NOT EXECUTED
20988: ea000054 b 20ae0 <rtems_bdpart_create+0x1f4> <== NOT EXECUTED
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
unsigned prev_sum = dist_sum;
dist_sum += dist [i];
2098c: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
20990: e79c2103 ldr r2, [ip, r3, lsl #2] <== NOT EXECUTED
if (dist_sum < prev_sum) {
20994: e09bb002 adds fp, fp, r2 <== NOT EXECUTED
20998: 2a00004f bcs 20adc <rtems_bdpart_create+0x1f0> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
if (dist [i] == 0) {
2099c: e3520000 cmp r2, #0 <== NOT EXECUTED
209a0: 0a00004d beq 20adc <rtems_bdpart_create+0x1f0> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get distribution sum and check for overflow */
for (i = 0; i < count; ++i) {
209a4: e2833001 add r3, r3, #1 <== NOT EXECUTED
209a8: e1530005 cmp r3, r5 <== NOT EXECUTED
209ac: 3afffff6 bcc 2098c <rtems_bdpart_create+0xa0> <== NOT EXECUTED
return RTEMS_INVALID_NUMBER;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
209b0: e5943000 ldr r3, [r4] <== NOT EXECUTED
209b4: e3530000 cmp r3, #0 <== NOT EXECUTED
209b8: 13a07018 movne r7, #24 <== NOT EXECUTED
209bc: 1a000047 bne 20ae0 <rtems_bdpart_create+0x1f4> <== NOT EXECUTED
return RTEMS_NOT_IMPLEMENTED;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
209c0: e3580000 cmp r8, #0 <== NOT EXECUTED
209c4: 0a000005 beq 209e0 <rtems_bdpart_create+0xf4> <== NOT EXECUTED
disk_end -= (disk_end % record_space);
209c8: e59d4018 ldr r4, [sp, #24] <== NOT EXECUTED
209cc: e1a01006 mov r1, r6 <== NOT EXECUTED
209d0: e1a00004 mov r0, r4 <== NOT EXECUTED
209d4: eb00d6de bl 56554 <__umodsi3> <== NOT EXECUTED
209d8: e0600004 rsb r0, r0, r4 <== NOT EXECUTED
209dc: e58d0018 str r0, [sp, #24] <== 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) {
209e0: e3550004 cmp r5, #4 <== NOT EXECUTED
overhead += (count - 3) * record_space;
209e4: 82453003 subhi r3, r5, #3 <== NOT EXECUTED
209e8: 802c6693 mlahi ip, r3, r6, r6 <== 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) {
209ec: 91a0c006 movls ip, r6 <== NOT EXECUTED
/*
* Account space to align every partition on cylinder boundaries if
* necessary.
*/
if (dos_compatibility) {
209f0: e3580000 cmp r8, #0 <== NOT EXECUTED
overhead += (count - 1) * record_space;
209f4: 12453001 subne r3, r5, #1 <== NOT EXECUTED
209f8: 102cc693 mlane ip, r3, r6, ip <== NOT EXECUTED
}
/* Check disk space */
if ((overhead + count) > disk_end) {
209fc: e59d9018 ldr r9, [sp, #24] <== NOT EXECUTED
20a00: e08c3005 add r3, ip, r5 <== NOT EXECUTED
20a04: e1530009 cmp r3, r9 <== NOT EXECUTED
20a08: 83a0701b movhi r7, #27 <== NOT EXECUTED
20a0c: 8a000033 bhi 20ae0 <rtems_bdpart_create+0x1f4> <== NOT EXECUTED
/* Begin of first primary partition */
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
20a10: e06cc009 rsb ip, ip, r9 <== NOT EXECUTED
20a14: e1a02009 mov r2, r9 <== NOT EXECUTED
20a18: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
20a1c: e1a09007 mov r9, r7 <== NOT EXECUTED
20a20: e1a0a006 mov sl, r6 <== NOT EXECUTED
20a24: e3a04000 mov r4, #0 <== NOT EXECUTED
20a28: e1a0700c mov r7, ip <== NOT EXECUTED
for (i = 0; i < count; ++i) {
20a2c: ea00001b b 20aa0 <rtems_bdpart_create+0x1b4> <== NOT EXECUTED
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
20a30: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
20a34: e793c104 ldr ip, [r3, r4, lsl #2] <== NOT EXECUTED
20a38: e003079c mul r3, ip, r7 <== NOT EXECUTED
if (s < free_space || s < dist [i]) {
20a3c: e1530007 cmp r3, r7 <== NOT EXECUTED
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
20a40: e1a00003 mov r0, r3 <== NOT EXECUTED
for (i = 0; i < count; ++i) {
rtems_bdpart_partition *p = pt + i;
/* Partition size */
rtems_blkdev_bnum s = free_space * dist [i];
if (s < free_space || s < dist [i]) {
20a44: 3a000024 bcc 20adc <rtems_bdpart_create+0x1f0> <== NOT EXECUTED
20a48: e153000c cmp r3, ip <== NOT EXECUTED
20a4c: 3a000022 bcc 20adc <rtems_bdpart_create+0x1f0> <== NOT EXECUTED
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
20a50: e58d2000 str r2, [sp] <== NOT EXECUTED
20a54: eb00d62a bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
/* Ensure that the partition is not empty */
if (s == 0) {
20a58: e3500000 cmp r0, #0 <== NOT EXECUTED
20a5c: 11a03000 movne r3, r0 <== NOT EXECUTED
20a60: 03a03001 moveq r3, #1 <== NOT EXECUTED
/* Align partition upwards */
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
pos += s;
20a64: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED
/* Align partition upwards */
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
20a68: e588a000 str sl, [r8] <== NOT EXECUTED
pos += s;
20a6c: e1a01006 mov r1, r6 <== NOT EXECUTED
20a70: e1a00003 mov r0, r3 <== NOT EXECUTED
20a74: e08ca003 add sl, ip, r3 <== NOT EXECUTED
20a78: eb00d6b5 bl 56554 <__umodsi3> <== NOT EXECUTED
p->end = pos;
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
20a7c: e3540002 cmp r4, #2 <== NOT EXECUTED
20a80: 83550004 cmphi r5, #4 <== NOT EXECUTED
p->begin += record_space;
20a84: 859d100c ldrhi r1, [sp, #12] <== NOT EXECUTED
/* Align partition upwards */
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
pos += s;
20a88: e060a00a rsb sl, r0, sl <== NOT EXECUTED
p->end = pos;
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
20a8c: e59d2000 ldr r2, [sp] <== NOT EXECUTED
s += record_space - (s % record_space);
/* Partition begin and end */
p->begin = pos;
pos += s;
p->end = pos;
20a90: e588a004 str sl, [r8, #4] <== NOT EXECUTED
/* Reserve space for the EBR if necessary */
if (count > 4 && i > 2) {
p->begin += record_space;
20a94: 85881000 strhi r1, [r8] <== NOT EXECUTED
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
20a98: e2844001 add r4, r4, #1 <== NOT EXECUTED
20a9c: e2888030 add r8, r8, #48 ; 0x30 <== NOT EXECUTED
if (s == 0) {
s = 1;
}
/* Align partition upwards */
s += record_space - (s % record_space);
20aa0: e08a3006 add r3, sl, r6 <== NOT EXECUTED
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
20aa4: e1540005 cmp r4, r5 <== NOT EXECUTED
rtems_blkdev_bnum s = free_space * dist [i];
if (s < free_space || s < dist [i]) {
/* TODO: Calculate without overflow */
return RTEMS_INVALID_NUMBER;
}
s /= dist_sum;
20aa8: e1a0100b mov r1, fp <== NOT EXECUTED
if (s == 0) {
s = 1;
}
/* Align partition upwards */
s += record_space - (s % record_space);
20aac: e58d300c str r3, [sp, #12] <== NOT EXECUTED
pos = record_space;
/* Space for partitions */
free_space = disk_end - overhead;
for (i = 0; i < count; ++i) {
20ab0: 3affffde bcc 20a30 <rtems_bdpart_create+0x144> <== NOT EXECUTED
p->begin += record_space;
}
}
/* Expand the last partition to the disk end */
pt [count - 1].end = disk_end;
20ab4: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
20ab8: e1a07009 mov r7, r9 <== NOT EXECUTED
20abc: e2455001 sub r5, r5, #1 <== NOT EXECUTED
20ac0: e1a09002 mov r9, r2 <== NOT EXECUTED
20ac4: e3a02030 mov r2, #48 ; 0x30 <== NOT EXECUTED
20ac8: e0233592 mla r3, r2, r5, r3 <== NOT EXECUTED
20acc: e5839004 str r9, [r3, #4] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
20ad0: ea000002 b 20ae0 <rtems_bdpart_create+0x1f4> <== NOT EXECUTED
20ad4: e3a07009 mov r7, #9 <== NOT EXECUTED
20ad8: ea000000 b 20ae0 <rtems_bdpart_create+0x1f4> <== NOT EXECUTED
20adc: e3a0700a mov r7, #10 <== NOT EXECUTED
}
20ae0: e1a00007 mov r0, r7 <== NOT EXECUTED
20ae4: e28dd01c add sp, sp, #28 <== NOT EXECUTED
20ae8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00020aec <rtems_bdpart_dump>:
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
20aec: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
20af0: e1a04000 mov r4, r0 <== NOT EXECUTED
20af4: e24dd038 sub sp, sp, #56 ; 0x38 <== NOT EXECUTED
size_t i = 0;
printf(
20af8: e3a06000 mov r6, #0 <== NOT EXECUTED
20afc: e59f00e0 ldr r0, [pc, #224] ; 20be4 <rtems_bdpart_dump+0xf8><== NOT EXECUTED
{
uuid_unparse_lower( type, str);
}
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
20b00: e1a07001 mov r7, r1 <== 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;
20b04: e1a08006 mov r8, r6 <== NOT EXECUTED
void rtems_bdpart_dump( const rtems_bdpart_partition *pt, size_t count)
{
size_t i = 0;
printf(
20b08: eb008831 bl 42bd4 <puts> <== 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)) {
20b0c: e28da037 add sl, sp, #55 ; 0x37 <== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
20b10: e1a0500d mov r5, sp <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
20b14: ea00002c b 20bcc <rtems_bdpart_dump+0xe0> <== 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)) {
20b18: e2849008 add r9, r4, #8 <== NOT EXECUTED
20b1c: e1a00009 mov r0, r9 <== NOT EXECUTED
20b20: e1a0100a mov r1, sl <== 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;
20b24: e5cd8037 strb r8, [sp, #55] ; 0x37 <== NOT EXECUTED
if (rtems_bdpart_to_mbr_partition_type( p->type, &type_mbr)) {
20b28: eb000115 bl 20f84 <rtems_bdpart_to_mbr_partition_type> <== NOT EXECUTED
20b2c: e3500000 cmp r0, #0 <== NOT EXECUTED
20b30: 0a00001c beq 20ba8 <rtems_bdpart_dump+0xbc> <== NOT EXECUTED
switch (type_mbr) {
20b34: e5dd3037 ldrb r3, [sp, #55] ; 0x37 <== NOT EXECUTED
20b38: 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;
20b3c: 059f30a4 ldreq r3, [pc, #164] ; 20be8 <rtems_bdpart_dump+0xfc><== 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) {
20b40: 0a00001c beq 20bb8 <rtems_bdpart_dump+0xcc> <== NOT EXECUTED
20b44: 8a000005 bhi 20b60 <rtems_bdpart_dump+0x74> <== NOT EXECUTED
20b48: e3530001 cmp r3, #1 <== NOT EXECUTED
20b4c: 059f3098 ldreq r3, [pc, #152] ; 20bec <rtems_bdpart_dump+0x100><== NOT EXECUTED
20b50: 0a000018 beq 20bb8 <rtems_bdpart_dump+0xcc> <== NOT EXECUTED
20b54: e3530004 cmp r3, #4 <== NOT EXECUTED
20b58: 1a00000d bne 20b94 <rtems_bdpart_dump+0xa8> <== NOT EXECUTED
20b5c: ea000008 b 20b84 <rtems_bdpart_dump+0x98> <== NOT EXECUTED
20b60: e353000e cmp r3, #14 <== NOT EXECUTED
20b64: 059f3084 ldreq r3, [pc, #132] ; 20bf0 <rtems_bdpart_dump+0x104><== NOT EXECUTED
20b68: 0a000012 beq 20bb8 <rtems_bdpart_dump+0xcc> <== NOT EXECUTED
20b6c: 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;
20b70: 059f307c ldreq r3, [pc, #124] ; 20bf4 <rtems_bdpart_dump+0x108><== 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) {
20b74: 0a00000f beq 20bb8 <rtems_bdpart_dump+0xcc> <== NOT EXECUTED
20b78: e353000c cmp r3, #12 <== NOT EXECUTED
20b7c: 1a000004 bne 20b94 <rtems_bdpart_dump+0xa8> <== NOT EXECUTED
20b80: ea000001 b 20b8c <rtems_bdpart_dump+0xa0> <== NOT EXECUTED
20b84: e59f306c ldr r3, [pc, #108] ; 20bf8 <rtems_bdpart_dump+0x10c><== NOT EXECUTED
20b88: ea00000a b 20bb8 <rtems_bdpart_dump+0xcc> <== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_16_LBA:
type = "FAT 16 LBA";
break;
case RTEMS_BDPART_MBR_FAT_32:
type = "FAT 32";
break;
20b8c: e59f3068 ldr r3, [pc, #104] ; 20bfc <rtems_bdpart_dump+0x110><== NOT EXECUTED
case RTEMS_BDPART_MBR_FAT_32_LBA:
type = "FAT 32 LBA";
break;
20b90: ea000008 b 20bb8 <rtems_bdpart_dump+0xcc> <== NOT EXECUTED
case RTEMS_BDPART_MBR_DATA:
type = "DATA";
break;
default:
snprintf( type_buffer, sizeof( type_buffer), "0x%02" PRIx8, type_mbr);
20b94: e1a0000d mov r0, sp <== NOT EXECUTED
20b98: e3a01034 mov r1, #52 ; 0x34 <== NOT EXECUTED
20b9c: e59f205c ldr r2, [pc, #92] ; 20c00 <rtems_bdpart_dump+0x114><== NOT EXECUTED
20ba0: eb008d04 bl 43fb8 <snprintf> <== NOT EXECUTED
20ba4: ea000002 b 20bb4 <rtems_bdpart_dump+0xc8> <== NOT EXECUTED
static void rtems_bdpart_type_to_string(
const uuid_t type,
char str [37]
)
{
uuid_unparse_lower( type, str);
20ba8: e1a00009 mov r0, r9 <== NOT EXECUTED
20bac: e1a0100d mov r1, sp <== NOT EXECUTED
20bb0: eb00636d bl 3996c <uuid_unparse_lower> <== NOT EXECUTED
20bb4: e1a0300d mov r3, sp <== NOT EXECUTED
} else {
rtems_bdpart_type_to_string( p->type, type_buffer);
type = type_buffer;
}
printf(
20bb8: e8940006 ldm r4, {r1, r2} <== NOT EXECUTED
20bbc: e59f0040 ldr r0, [pc, #64] ; 20c04 <rtems_bdpart_dump+0x118><== NOT EXECUTED
20bc0: eb00875e bl 42940 <printf> <== NOT EXECUTED
"------------+------------+-----------------------------------------------------\n"
" BEGIN | END | TYPE\n"
"------------+------------+-----------------------------------------------------\n"
);
for (i = 0; i < count; ++i) {
20bc4: e2866001 add r6, r6, #1 <== NOT EXECUTED
20bc8: e2844030 add r4, r4, #48 ; 0x30 <== NOT EXECUTED
20bcc: e1560007 cmp r6, r7 <== NOT EXECUTED
20bd0: 3affffd0 bcc 20b18 <rtems_bdpart_dump+0x2c> <== NOT EXECUTED
p->end,
type
);
}
puts( "------------+------------+-----------------------------------------------------");
20bd4: e59f002c ldr r0, [pc, #44] ; 20c08 <rtems_bdpart_dump+0x11c><== NOT EXECUTED
20bd8: eb0087fd bl 42bd4 <puts> <== NOT EXECUTED
}
20bdc: e28dd038 add sp, sp, #56 ; 0x38 <== NOT EXECUTED
20be0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00020f08 <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
)
{
20f08: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
20f0c: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
20f10: 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);
20f14: 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
)
{
20f18: 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);
20f1c: ebff9fc4 bl 8e34 <stat> <== NOT EXECUTED
if (rv != 0) {
20f20: e3500000 cmp r0, #0 <== NOT EXECUTED
20f24: 1a000011 bne 20f70 <rtems_bdpart_get_disk_data+0x68> <== NOT EXECUTED
return RTEMS_INVALID_NAME;
}
*disk = st.st_rdev;
20f28: e28d1018 add r1, sp, #24 <== NOT EXECUTED
20f2c: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
20f30: e8840003 stm r4, {r0, r1} <== NOT EXECUTED
/* Get disk begin, end and block size */
dd = rtems_disk_obtain( *disk);
20f34: ebff94d8 bl 629c <rtems_disk_obtain> <== NOT EXECUTED
if (dd == NULL) {
20f38: e2503000 subs r3, r0, #0 <== NOT EXECUTED
20f3c: 0a00000b beq 20f70 <rtems_bdpart_get_disk_data+0x68> <== NOT EXECUTED
return RTEMS_INVALID_NAME;
}
disk_begin = dd->start;
*disk_end = dd->size;
20f40: 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;
20f44: e5934018 ldr r4, [r3, #24] <== NOT EXECUTED
*disk_end = dd->size;
20f48: e5852000 str r2, [r5] <== NOT EXECUTED
block_size = dd->block_size;
20f4c: e5935020 ldr r5, [r3, #32] <== NOT EXECUTED
sc = rtems_disk_release( dd);
20f50: ebff954d bl 648c <rtems_disk_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
20f54: e3500000 cmp r0, #0 <== NOT EXECUTED
20f58: 1a000007 bne 20f7c <rtems_bdpart_get_disk_data+0x74> <== NOT EXECUTED
return sc;
}
/* Check block size */
if (block_size < RTEMS_BDPART_BLOCK_SIZE) {
20f5c: e3550c02 cmp r5, #512 ; 0x200 <== NOT EXECUTED
20f60: 3a000004 bcc 20f78 <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) {
20f64: e3540000 cmp r4, #0 <== NOT EXECUTED
20f68: 0a000003 beq 20f7c <rtems_bdpart_get_disk_data+0x74> <== NOT EXECUTED
20f6c: ea000001 b 20f78 <rtems_bdpart_get_disk_data+0x70> <== NOT EXECUTED
20f70: e3a00003 mov r0, #3 <== NOT EXECUTED
20f74: ea000000 b 20f7c <rtems_bdpart_get_disk_data+0x74> <== NOT EXECUTED
20f78: e3a0001b mov r0, #27 <== NOT EXECUTED
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
20f7c: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
20f80: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00020d14 <rtems_bdpart_mount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
20d14: e92d4ff3 push {r0, r1, 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, '/');
20d18: 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
)
{
20d1c: e1a0b003 mov fp, r3 <== NOT EXECUTED
20d20: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
20d24: e1a0a000 mov sl, r0 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
20d28: eb009400 bl 45d30 <strrchr> <== NOT EXECUTED
20d2c: e1a04000 mov r4, 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);
20d30: e1a0000a mov r0, sl <== NOT EXECUTED
20d34: eb0090b1 bl 45000 <strlen> <== NOT EXECUTED
20d38: e1a06000 mov r6, r0 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
20d3c: e1a0000b mov r0, fp <== NOT EXECUTED
20d40: eb0090ae bl 45000 <strlen> <== NOT EXECUTED
20d44: e1a07000 mov r7, r0 <== NOT EXECUTED
size_t i = 0;
/* Create logical disk name base */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
20d48: e2860004 add r0, r6, #4 <== NOT EXECUTED
20d4c: ebff9bff bl 7d50 <malloc> <== NOT EXECUTED
if (logical_disk_name == NULL) {
20d50: e2505000 subs r5, r0, #0 <== NOT EXECUTED
20d54: 03a0601a moveq r6, #26 <== NOT EXECUTED
20d58: 0a000042 beq 20e68 <rtems_bdpart_mount+0x154> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
20d5c: e1a0100a mov r1, sl <== NOT EXECUTED
20d60: e1a02006 mov r2, r6 <== NOT EXECUTED
20d64: eb009145 bl 45280 <strncpy> <== NOT EXECUTED
/* Get disk file name */
if (disk_file_name != NULL) {
20d68: e3540000 cmp r4, #0 <== NOT EXECUTED
20d6c: 01a08006 moveq r8, r6 <== NOT EXECUTED
20d70: 0a000003 beq 20d84 <rtems_bdpart_mount+0x70> <== NOT EXECUTED
disk_file_name += 1;
20d74: e284a001 add sl, r4, #1 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
20d78: e1a0000a mov r0, sl <== NOT EXECUTED
20d7c: eb00909f bl 45000 <strlen> <== NOT EXECUTED
20d80: e1a08000 mov r8, 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);
20d84: e0889007 add r9, r8, r7 <== NOT EXECUTED
20d88: e2890005 add r0, r9, #5 <== NOT EXECUTED
20d8c: ebff9bef bl 7d50 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
20d90: e2504000 subs r4, r0, #0 <== NOT EXECUTED
20d94: 03a0601a moveq r6, #26 <== NOT EXECUTED
20d98: 0a00002e beq 20e58 <rtems_bdpart_mount+0x144> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
20d9c: e1a02007 mov r2, r7 <== NOT EXECUTED
20da0: e1a0100b mov r1, fp <== NOT EXECUTED
20da4: eb009135 bl 45280 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
20da8: 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] = '/';
20dac: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED
20db0: e7c43007 strb r3, [r4, r7] <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
20db4: e0840000 add r0, r4, r0 <== NOT EXECUTED
20db8: e1a0100a mov r1, sl <== NOT EXECUTED
20dbc: e1a02008 mov r2, r8 <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
20dc0: e2899001 add r9, r9, #1 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
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);
20dc4: eb00912d bl 45280 <strncpy> <== NOT EXECUTED
/* Markers */
logical_disk_marker = logical_disk_name + disk_name_size;
20dc8: e0856006 add r6, r5, r6 <== NOT EXECUTED
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
20dcc: e0849009 add r9, r4, r9 <== NOT EXECUTED
20dd0: e3a07000 mov r7, #0 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
20dd4: ea000016 b 20e34 <rtems_bdpart_mount+0x120> <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
20dd8: eb008c76 bl 43fb8 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
20ddc: 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);
20de0: e3a02004 mov r2, #4 <== NOT EXECUTED
20de4: e1a01006 mov r1, r6 <== NOT EXECUTED
20de8: e1a00009 mov r0, r9 <== 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) {
20dec: c3a06003 movgt r6, #3 <== NOT EXECUTED
20df0: ca000018 bgt 20e58 <rtems_bdpart_mount+0x144> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create mount point */
strncpy( mount_marker, logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE);
20df4: eb009121 bl 45280 <strncpy> <== NOT EXECUTED
rv = rtems_mkdir( mount_point, S_IRWXU | S_IRWXG | S_IRWXO);
20df8: e59f1070 ldr r1, [pc, #112] ; 20e70 <rtems_bdpart_mount+0x15c><== NOT EXECUTED
20dfc: e1a00004 mov r0, r4 <== NOT EXECUTED
20e00: ebff9fa7 bl 8ca4 <rtems_mkdir> <== NOT EXECUTED
if (rv != 0) {
20e04: e250c000 subs ip, r0, #0 <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
20e08: e1a01004 mov r1, r4 <== NOT EXECUTED
20e0c: e59f2060 ldr r2, [pc, #96] ; 20e74 <rtems_bdpart_mount+0x160><== NOT EXECUTED
20e10: e1a0300c mov r3, ip <== NOT EXECUTED
20e14: 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) {
20e18: 13a0601b movne r6, #27 <== NOT EXECUTED
20e1c: 1a00000d bne 20e58 <rtems_bdpart_mount+0x144> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Mount */
rv = mount(
20e20: e58dc000 str ip, [sp] <== NOT EXECUTED
20e24: ebff9ca8 bl 80cc <mount> <== NOT EXECUTED
mount_point,
"msdos",
0,
NULL
);
if (rv != 0) {
20e28: e3500000 cmp r0, #0 <== NOT EXECUTED
rmdir( mount_point);
20e2c: 11a00004 movne r0, r4 <== NOT EXECUTED
20e30: 1b00172d blne 26aec <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) {
20e34: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
20e38: e1570003 cmp r7, r3 <== NOT EXECUTED
/* Create logical disk name */
int rv = snprintf( logical_disk_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
20e3c: e2877001 add r7, r7, #1 <== NOT EXECUTED
20e40: e3a01004 mov r1, #4 <== NOT EXECUTED
20e44: e59f202c ldr r2, [pc, #44] ; 20e78 <rtems_bdpart_mount+0x164><== NOT EXECUTED
20e48: e1a00006 mov r0, r6 <== NOT EXECUTED
20e4c: e1a03007 mov r3, r7 <== 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) {
20e50: 3affffe0 bcc 20dd8 <rtems_bdpart_mount+0xc4> <== NOT EXECUTED
20e54: e3a06000 mov r6, #0 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
20e58: e1a00005 mov r0, r5 <== NOT EXECUTED
20e5c: ebff9a14 bl 76b4 <free> <== NOT EXECUTED
free( mount_point);
20e60: e1a00004 mov r0, r4 <== NOT EXECUTED
20e64: ebff9a12 bl 76b4 <free> <== NOT EXECUTED
return esc;
}
20e68: e1a00006 mov r0, r6 <== NOT EXECUTED
20e6c: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0002130c <rtems_bdpart_new_record>:
static rtems_status_code rtems_bdpart_new_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
2130c: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
21310: e1a04003 mov r4, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
21314: e5933000 ldr r3, [r3] <== NOT EXECUTED
21318: 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
)
{
2131c: e1a06002 mov r6, r2 <== NOT EXECUTED
21320: e1a07000 mov r7, r0 <== NOT EXECUTED
21324: e1a08001 mov r8, r1 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Synchronize previous block if necessary */
if (*block != NULL) {
21328: 0a000003 beq 2133c <rtems_bdpart_new_record+0x30> <== NOT EXECUTED
sc = rtems_bdbuf_sync( *block);
2132c: e1a00003 mov r0, r3 <== NOT EXECUTED
21330: ebff8de1 bl 4abc <rtems_bdbuf_sync> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
21334: e2505000 subs r5, r0, #0 <== NOT EXECUTED
21338: 1a000016 bne 21398 <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);
2133c: e1a00007 mov r0, r7 <== NOT EXECUTED
21340: e1a01008 mov r1, r8 <== NOT EXECUTED
21344: e1a02006 mov r2, r6 <== NOT EXECUTED
21348: e1a03004 mov r3, r4 <== NOT EXECUTED
2134c: ebff8fe5 bl 52e8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
21350: e2505000 subs r5, r0, #0 <== NOT EXECUTED
21354: 1a00000f bne 21398 <rtems_bdpart_new_record+0x8c> <== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
21358: e5943000 ldr r3, [r4] <== NOT EXECUTED
2135c: e3530000 cmp r3, #0 <== NOT EXECUTED
21360: 03a05009 moveq r5, #9 <== NOT EXECUTED
21364: 0a00000b beq 21398 <rtems_bdpart_new_record+0x8c> <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
}
/* Clear record */
memset( (*block)->buffer, 0, RTEMS_BDPART_BLOCK_SIZE);
21368: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
2136c: e3a02c02 mov r2, #512 ; 0x200 <== NOT EXECUTED
21370: e1a01005 mov r1, r5 <== NOT EXECUTED
21374: eb00814a bl 418a4 <memset> <== NOT EXECUTED
/* Write signature */
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_0] =
21378: e5943000 ldr r3, [r4] <== NOT EXECUTED
2137c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
21380: e3a02055 mov r2, #85 ; 0x55 <== NOT EXECUTED
21384: e5c321fe strb r2, [r3, #510] ; 0x1fe <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_0;
(*block)->buffer [RTEMS_BDPART_MBR_OFFSET_SIGNATURE_1] =
21388: e5943000 ldr r3, [r4] <== NOT EXECUTED
2138c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
21390: e3e02055 mvn r2, #85 ; 0x55 <== NOT EXECUTED
21394: e5c321ff strb r2, [r3, #511] ; 0x1ff <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
21398: e1a00005 mov r0, r5 <== NOT EXECUTED
2139c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000210a0 <rtems_bdpart_read>:
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
210a0: 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);
210a4: e2535000 subs r5, r3, #0 <== NOT EXECUTED
210a8: 15953000 ldrne r3, [r5] <== NOT EXECUTED
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
210ac: e1a06002 mov r6, r2 <== 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);
210b0: 13a02030 movne r2, #48 ; 0x30 <== NOT EXECUTED
210b4: 10080392 mulne r8, r2, r3 <== NOT EXECUTED
210b8: 01a08005 moveq r8, r5 <== NOT EXECUTED
dev_t disk = 0;
size_t i = 0;
const uint8_t *data = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
210bc: e3510000 cmp r1, #0 <== NOT EXECUTED
210c0: 13560000 cmpne r6, #0 <== NOT EXECUTED
const char *disk_name,
rtems_bdpart_format *format,
rtems_bdpart_partition *pt,
size_t *count
)
{
210c4: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
210c8: e1a07001 mov r7, r1 <== NOT EXECUTED
dev_t disk = 0;
size_t i = 0;
const uint8_t *data = NULL;
/* Check parameter */
if (format == NULL || pt == NULL || count == NULL) {
210cc: 13a03000 movne r3, #0 <== NOT EXECUTED
210d0: 03a03001 moveq r3, #1 <== NOT EXECUTED
210d4: 0a000088 beq 212fc <rtems_bdpart_read+0x25c> <== NOT EXECUTED
210d8: e3550000 cmp r5, #0 <== NOT EXECUTED
210dc: 0a000086 beq 212fc <rtems_bdpart_read+0x25c> <== NOT EXECUTED
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 */
rtems_blkdev_bnum ebr = 0; /* Extended boot record block index */
rtems_blkdev_bnum disk_end = 0;
210e0: e58d3008 str r3, [sp, #8] <== 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 */
210e4: 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;
210e8: e246c030 sub ip, r6, #48 ; 0x30 <== NOT EXECUTED
if (format == NULL || pt == NULL || count == NULL) {
return RTEMS_INVALID_ADDRESS;
}
/* Set count to a save value */
*count = 0;
210ec: e5853000 str r3, [r5] <== NOT EXECUTED
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
210f0: e1a0100d mov r1, sp <== NOT EXECUTED
210f4: e28d2008 add r2, sp, #8 <== 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;
210f8: e3a0a000 mov sl, #0 <== NOT EXECUTED
210fc: e3a0b000 mov fp, #0 <== NOT EXECUTED
21100: e88d0c00 stm sp, {sl, fp} <== 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;
21104: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
size_t *count
)
{
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
rtems_bdbuf_buffer *block = NULL;
21108: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
/* Set count to a save value */
*count = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
2110c: ebffff7d bl 20f08 <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
21110: e3500000 cmp r0, #0 <== NOT EXECUTED
21114: 1a000079 bne 21300 <rtems_bdpart_read+0x260> <== NOT EXECUTED
return sc;
}
/* Read MBR */
sc = rtems_bdpart_read_record( disk, 0, &block);
21118: e1a02000 mov r2, r0 <== NOT EXECUTED
2111c: e28d3014 add r3, sp, #20 <== NOT EXECUTED
21120: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
21124: ebffff54 bl 20e7c <rtems_bdpart_read_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
21128: e2504000 subs r4, r0, #0 <== NOT EXECUTED
2112c: 1a00006d bne 212e8 <rtems_bdpart_read+0x248> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
21130: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
21134: e593a020 ldr sl, [r3, #32] <== NOT EXECUTED
21138: e28a4f6f add r4, sl, #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);
2113c: e0868008 add r8, r6, r8 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read the first partition entry */
data = block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0;
21140: e2844002 add r4, r4, #2 <== NOT EXECUTED
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
21144: e28d9010 add r9, sp, #16 <== NOT EXECUTED
21148: e28db00c add fp, sp, #12 <== NOT EXECUTED
2114c: e1a00004 mov r0, r4 <== NOT EXECUTED
21150: e1a01009 mov r1, r9 <== NOT EXECUTED
21154: e1a02008 mov r2, r8 <== NOT EXECUTED
21158: e1a0300b mov r3, fp <== NOT EXECUTED
2115c: ebffff98 bl 20fc4 <rtems_bdpart_read_mbr_partition> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
21160: e3500000 cmp r0, #0 <== NOT EXECUTED
21164: 1a00002f bne 21228 <rtems_bdpart_read+0x188> <== 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) {
21168: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
2116c: e5d33008 ldrb r3, [r3, #8] <== NOT EXECUTED
21170: e35300ee cmp r3, #238 ; 0xee <== NOT EXECUTED
21174: 03a04018 moveq r4, #24 <== NOT EXECUTED
21178: 0a00005a beq 212e8 <rtems_bdpart_read+0x248> <== NOT EXECUTED
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
2117c: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
esc = RTEMS_NOT_IMPLEMENTED;
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
21180: e5870000 str r0, [r7] <== NOT EXECUTED
format->mbr.disk_id = rtems_uint32_from_little_endian(
21184: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
21188: e5d321ba ldrb r2, [r3, #442] ; 0x1ba <== NOT EXECUTED
2118c: e5d301bb ldrb r0, [r3, #443] ; 0x1bb <== NOT EXECUTED
21190: e5d311b9 ldrb r1, [r3, #441] ; 0x1b9 <== NOT EXECUTED
21194: e0820400 add r0, r2, r0, lsl #8 <== NOT EXECUTED
21198: e5d321b8 ldrb r2, [r3, #440] ; 0x1b8 <== NOT EXECUTED
2119c: e0813400 add r3, r1, r0, lsl #8 <== NOT EXECUTED
211a0: e0823403 add r3, r2, r3, lsl #8 <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_DISK_ID
);
format->mbr.dos_compatibility = true;
211a4: e3a02001 mov r2, #1 <== NOT EXECUTED
211a8: e5c72008 strb r2, [r7, #8] <== NOT EXECUTED
goto cleanup;
}
/* Set format */
format->type = RTEMS_BDPART_FORMAT_MBR;
format->mbr.disk_id = rtems_uint32_from_little_endian(
211ac: e5873004 str r3, [r7, #4] <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_read(
211b0: e28a7f7b add r7, sl, #492 ; 0x1ec <== NOT EXECUTED
211b4: e2877002 add r7, r7, #2 <== NOT EXECUTED
/* Iterate through the rest of the primary partition table */
for (i = 1; i < 4; ++i) {
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
211b8: e1a0a009 mov sl, r9 <== 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;
211bc: e2844010 add r4, r4, #16 <== NOT EXECUTED
sc = rtems_bdpart_read_mbr_partition( data, &p, p_end, &ep_begin);
211c0: e1a00004 mov r0, r4 <== NOT EXECUTED
211c4: e1a0100a mov r1, sl <== NOT EXECUTED
211c8: e1a02008 mov r2, r8 <== NOT EXECUTED
211cc: e1a0300b mov r3, fp <== NOT EXECUTED
211d0: ebffff7b bl 20fc4 <rtems_bdpart_read_mbr_partition> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
211d4: e3500000 cmp r0, #0 <== NOT EXECUTED
211d8: 1a000012 bne 21228 <rtems_bdpart_read+0x188> <== 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) {
211dc: e1540007 cmp r4, r7 <== NOT EXECUTED
211e0: 1afffff5 bne 211bc <rtems_bdpart_read+0x11c> <== NOT EXECUTED
goto cleanup;
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
211e4: e59d400c ldr r4, [sp, #12] <== NOT EXECUTED
while (ebr != 0) {
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( disk, ebr, &block);
211e8: e28d7014 add r7, sp, #20 <== NOT EXECUTED
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
while (ebr != 0) {
211ec: ea00002f b 212b0 <rtems_bdpart_read+0x210> <== NOT EXECUTED
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( disk, ebr, &block);
211f0: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
211f4: ebffff20 bl 20e7c <rtems_bdpart_read_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
211f8: e3500000 cmp r0, #0 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
211fc: e1a0100a mov r1, sl <== NOT EXECUTED
21200: e1a02008 mov r2, r8 <== NOT EXECUTED
21204: 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) {
21208: 1a000006 bne 21228 <rtems_bdpart_read+0x188> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Read first partition entry */
sc = rtems_bdpart_read_mbr_partition(
2120c: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
21210: e5900020 ldr r0, [r0, #32] <== NOT EXECUTED
21214: e2800f6f add r0, r0, #444 ; 0x1bc <== NOT EXECUTED
21218: e2800002 add r0, r0, #2 <== NOT EXECUTED
2121c: ebffff68 bl 20fc4 <rtems_bdpart_read_mbr_partition> <== NOT EXECUTED
block->buffer + RTEMS_BDPART_MBR_OFFSET_TABLE_0,
&p,
p_end,
NULL
);
if (sc != RTEMS_SUCCESSFUL) {
21220: e3500000 cmp r0, #0 <== NOT EXECUTED
21224: 0a000001 beq 21230 <rtems_bdpart_read+0x190> <== NOT EXECUTED
21228: e1a04000 mov r4, r0 <== NOT EXECUTED
2122c: ea00002d b 212e8 <rtems_bdpart_read+0x248> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Adjust partition begin */
tmp = p->begin + ebr;
21230: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
21234: e5931000 ldr r1, [r3] <== NOT EXECUTED
21238: e0842001 add r2, r4, r1 <== NOT EXECUTED
if (tmp > p->begin) {
2123c: e1520001 cmp r2, r1 <== NOT EXECUTED
21240: 9a000027 bls 212e4 <rtems_bdpart_read+0x244> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
21244: e5931004 ldr r1, [r3, #4] <== NOT EXECUTED
21248: e0844001 add r4, r4, r1 <== NOT EXECUTED
if (tmp > p->end) {
2124c: e1540001 cmp r4, r1 <== NOT EXECUTED
}
/* Adjust partition begin */
tmp = p->begin + ebr;
if (tmp > p->begin) {
p->begin = tmp;
21250: e5832000 str r2, [r3] <== NOT EXECUTED
goto cleanup;
}
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
21254: 9a000022 bls 212e4 <rtems_bdpart_read+0x244> <== NOT EXECUTED
esc = RTEMS_IO_ERROR;
goto cleanup;
}
/* Read second partition entry for next EBR block */
ebr = rtems_bdpart_next_ebr(
21258: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
2125c: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
}
/* Adjust partition end */
tmp = p->end + ebr;
if (tmp > p->end) {
p->end = tmp;
21260: e5834004 str r4, [r3, #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);
21264: e2823f75 add r3, r2, #468 ; 0x1d4 <== NOT EXECUTED
21268: e2833002 add r3, r3, #2 <== NOT EXECUTED
2126c: e5d34003 ldrb r4, [r3, #3] <== NOT EXECUTED
21270: e5d3c002 ldrb ip, [r3, #2] <== NOT EXECUTED
21274: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
if (type == RTEMS_BDPART_MBR_EXTENDED) {
21278: e5d211d2 ldrb r1, [r2, #466] ; 0x1d2 <== NOT EXECUTED
2127c: e08c4404 add r4, ip, r4, lsl #8 <== NOT EXECUTED
21280: e5d231d6 ldrb r3, [r2, #470] ; 0x1d6 <== NOT EXECUTED
21284: e0804404 add r4, r0, r4, lsl #8 <== NOT EXECUTED
21288: e3510005 cmp r1, #5 <== NOT EXECUTED
2128c: e0834404 add r4, r3, r4, lsl #8 <== NOT EXECUTED
21290: 1a00000a bne 212c0 <rtems_bdpart_read+0x220> <== 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) {
21294: e3540000 cmp r4, #0 <== NOT EXECUTED
21298: 0a000008 beq 212c0 <rtems_bdpart_read+0x220> <== NOT EXECUTED
/* Adjust partition EBR block index */
tmp = ebr + ep_begin;
2129c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
212a0: e0843003 add r3, r4, r3 <== NOT EXECUTED
if (tmp > ebr) {
212a4: e1530004 cmp r3, r4 <== NOT EXECUTED
212a8: 9a00000d bls 212e4 <rtems_bdpart_read+0x244> <== NOT EXECUTED
212ac: e1a04003 mov r4, r3 <== NOT EXECUTED
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
while (ebr != 0) {
212b0: e3540000 cmp r4, #0 <== NOT EXECUTED
rtems_blkdev_bnum tmp = 0;
/* Read EBR */
sc = rtems_bdpart_read_record( disk, ebr, &block);
212b4: e1a02004 mov r2, r4 <== NOT EXECUTED
212b8: e1a03007 mov r3, r7 <== NOT EXECUTED
}
}
/* Iterate through the logical partitions within the extended partition */
ebr = ep_begin;
while (ebr != 0) {
212bc: 1affffcb bne 211f0 <rtems_bdpart_read+0x150> <== NOT EXECUTED
}
}
}
/* Return partition count */
*count = (size_t) (p - pt + 1);
212c0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
212c4: e59f203c ldr r2, [pc, #60] ; 21308 <rtems_bdpart_read+0x268><== NOT EXECUTED
212c8: e0666003 rsb r6, r6, r3 <== NOT EXECUTED
212cc: e1a06246 asr r6, r6, #4 <== NOT EXECUTED
212d0: e0030692 mul r3, r2, r6 <== NOT EXECUTED
212d4: e2833001 add r3, r3, #1 <== NOT EXECUTED
212d8: e5853000 str r3, [r5] <== NOT EXECUTED
212dc: e3a04000 mov r4, #0 <== NOT EXECUTED
212e0: ea000000 b 212e8 <rtems_bdpart_read+0x248> <== NOT EXECUTED
212e4: e3a0401b mov r4, #27 <== NOT EXECUTED
cleanup:
if (block != NULL) {
212e8: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
212ec: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_bdbuf_release( block);
212f0: 1bff8bbc blne 41e8 <rtems_bdbuf_release> <== NOT EXECUTED
212f4: e1a00004 mov r0, r4 <== NOT EXECUTED
212f8: ea000000 b 21300 <rtems_bdpart_read+0x260> <== NOT EXECUTED
212fc: e3a00009 mov r0, #9 <== NOT EXECUTED
}
return esc;
}
21300: e28dd018 add sp, sp, #24 <== NOT EXECUTED
21304: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00020fc4 <rtems_bdpart_read_mbr_partition>:
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
20fc4: 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);
20fc8: e2805008 add r5, r0, #8 <== NOT EXECUTED
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
20fcc: 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);
20fd0: 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];
20fd4: e5d57003 ldrb r7, [r5, #3] <== NOT EXECUTED
20fd8: e5d08002 ldrb r8, [r0, #2] <== NOT EXECUTED
20fdc: e5d56002 ldrb r6, [r5, #2] <== NOT EXECUTED
20fe0: e5d0c003 ldrb ip, [r0, #3] <== NOT EXECUTED
20fe4: e5d5a001 ldrb sl, [r5, #1] <== NOT EXECUTED
20fe8: e5d09001 ldrb r9, [r0, #1] <== NOT EXECUTED
rtems_blkdev_bnum end = begin + size;
uint8_t type = data [RTEMS_BDPART_MBR_OFFSET_TYPE];
20fec: e5d45004 ldrb r5, [r4, #4] <== NOT EXECUTED
20ff0: e0866407 add r6, r6, r7, lsl #8 <== NOT EXECUTED
20ff4: e088c40c add ip, r8, ip, lsl #8 <== NOT EXECUTED
20ff8: e5d40008 ldrb r0, [r4, #8] <== NOT EXECUTED
20ffc: e5d4800c ldrb r8, [r4, #12] <== NOT EXECUTED
21000: e08a6406 add r6, sl, r6, lsl #8 <== NOT EXECUTED
21004: e089c40c add ip, r9, ip, lsl #8 <== NOT EXECUTED
if (type == RTEMS_BDPART_MBR_EMPTY) {
21008: e3550000 cmp r5, #0 <== NOT EXECUTED
2100c: e0806406 add r6, r0, r6, lsl #8 <== NOT EXECUTED
21010: e088840c add r8, r8, ip, lsl #8 <== NOT EXECUTED
const uint8_t *data,
rtems_bdpart_partition **p,
const rtems_bdpart_partition *p_end,
rtems_blkdev_bnum *ep_begin
)
{
21014: e1a07001 mov r7, 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) {
21018: 0a00001e beq 21098 <rtems_bdpart_read_mbr_partition+0xd4> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
2101c: e5910000 ldr r0, [r1] <== NOT EXECUTED
21020: e1500002 cmp r0, r2 <== NOT EXECUTED
21024: 03a00005 moveq r0, #5 <== NOT EXECUTED
21028: 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;
2102c: e0888006 add r8, r8, r6 <== NOT EXECUTED
if (type == RTEMS_BDPART_MBR_EMPTY) {
return RTEMS_SUCCESSFUL;
} else if (*p == p_end) {
return RTEMS_TOO_MANY;
} else if (begin >= end) {
21030: e1560008 cmp r6, r8 <== NOT EXECUTED
21034: 23a0001b movcs r0, #27 <== NOT EXECUTED
21038: 28bd87f0 popcs {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
return RTEMS_IO_ERROR;
} else if (type == RTEMS_BDPART_MBR_EXTENDED) {
2103c: e3550005 cmp r5, #5 <== NOT EXECUTED
21040: 1a000003 bne 21054 <rtems_bdpart_read_mbr_partition+0x90> <== NOT EXECUTED
if (ep_begin != NULL) {
21044: e3530000 cmp r3, #0 <== NOT EXECUTED
*ep_begin = begin;
21048: 15836000 strne r6, [r3] <== 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) {
2104c: 1a00000f bne 21090 <rtems_bdpart_read_mbr_partition+0xcc> <== NOT EXECUTED
21050: ea000010 b 21098 <rtems_bdpart_read_mbr_partition+0xd4> <== NOT EXECUTED
*ep_begin = begin;
}
} else {
/* Increment partition index */
++(*p);
21054: e2800030 add r0, r0, #48 ; 0x30 <== NOT EXECUTED
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
21058: e3a02030 mov r2, #48 ; 0x30 <== NOT EXECUTED
if (ep_begin != NULL) {
*ep_begin = begin;
}
} else {
/* Increment partition index */
++(*p);
2105c: e5810000 str r0, [r1] <== NOT EXECUTED
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
21060: e3a01000 mov r1, #0 <== NOT EXECUTED
21064: eb00820e bl 418a4 <memset> <== NOT EXECUTED
/* Set values */
(*p)->begin = begin;
21068: e5971000 ldr r1, [r7] <== NOT EXECUTED
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
2106c: e1a00005 mov r0, r5 <== NOT EXECUTED
/* Clear partition */
memset( *p, 0, sizeof( rtems_bdpart_partition));
/* Set values */
(*p)->begin = begin;
21070: e8810140 stm r1, {r6, r8} <== NOT EXECUTED
(*p)->end = end;
rtems_bdpart_to_partition_type( type, (*p)->type);
21074: e2811008 add r1, r1, #8 <== NOT EXECUTED
21078: ebffffcb bl 20fac <rtems_bdpart_to_partition_type> <== NOT EXECUTED
(*p)->flags = data [RTEMS_BDPART_MBR_OFFSET_FLAGS];
2107c: e5973000 ldr r3, [r7] <== NOT EXECUTED
21080: e5d41000 ldrb r1, [r4] <== NOT EXECUTED
21084: e3a02000 mov r2, #0 <== NOT EXECUTED
21088: e5831028 str r1, [r3, #40] ; 0x28 <== NOT EXECUTED
2108c: e583202c str r2, [r3, #44] ; 0x2c <== NOT EXECUTED
21090: e3a00000 mov r0, #0 <== NOT EXECUTED
21094: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
21098: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return RTEMS_SUCCESSFUL;
}
2109c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00020e7c <rtems_bdpart_read_record>:
static rtems_status_code rtems_bdpart_read_record(
dev_t disk,
rtems_blkdev_bnum index,
rtems_bdbuf_buffer **block
)
{
20e7c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
20e80: e1a04003 mov r4, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
20e84: e5933000 ldr r3, [r3] <== NOT EXECUTED
20e88: 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
)
{
20e8c: e1a05002 mov r5, r2 <== NOT EXECUTED
20e90: e1a06000 mov r6, r0 <== NOT EXECUTED
20e94: e1a07001 mov r7, r1 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
/* Release previous block if necessary */
if (*block != NULL) {
20e98: 0a000003 beq 20eac <rtems_bdpart_read_record+0x30> <== NOT EXECUTED
sc = rtems_bdbuf_release( *block);
20e9c: e1a00003 mov r0, r3 <== NOT EXECUTED
20ea0: ebff8cd0 bl 41e8 <rtems_bdbuf_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
20ea4: e3500000 cmp r0, #0 <== NOT EXECUTED
20ea8: 18bd80f0 popne {r4, r5, r6, r7, pc} <== NOT EXECUTED
return sc;
}
}
/* Read the record block */
sc = rtems_bdbuf_read( disk, index, block);
20eac: e1a00006 mov r0, r6 <== NOT EXECUTED
20eb0: e1a01007 mov r1, r7 <== NOT EXECUTED
20eb4: e1a02005 mov r2, r5 <== NOT EXECUTED
20eb8: e1a03004 mov r3, r4 <== NOT EXECUTED
20ebc: ebff9109 bl 52e8 <rtems_bdbuf_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
20ec0: e3500000 cmp r0, #0 <== NOT EXECUTED
20ec4: 18bd80f0 popne {r4, r5, r6, r7, pc} <== NOT EXECUTED
return sc;
}
/* just in case block did not get filled in */
if ( *block == NULL ) {
20ec8: e5943000 ldr r3, [r4] <== NOT EXECUTED
20ecc: e3530000 cmp r3, #0 <== NOT EXECUTED
20ed0: 03a00009 moveq r0, #9 <== NOT EXECUTED
20ed4: 08bd80f0 popeq {r4, r5, r6, r7, pc} <== NOT EXECUTED
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
20ed8: 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]
20edc: e5d321fe ldrb r2, [r3, #510] ; 0x1fe <== NOT EXECUTED
20ee0: e3520055 cmp r2, #85 ; 0x55 <== NOT EXECUTED
20ee4: 1a000003 bne 20ef8 <rtems_bdpart_read_record+0x7c> <== NOT EXECUTED
20ee8: e5d301ff ldrb r0, [r3, #511] ; 0x1ff <== NOT EXECUTED
20eec: e35000aa cmp r0, #170 ; 0xaa <== NOT EXECUTED
20ef0: 13a00000 movne r0, #0 <== NOT EXECUTED
20ef4: 03a00001 moveq r0, #1 <== NOT EXECUTED
if ( *block == NULL ) {
return RTEMS_INVALID_ADDRESS;
}
/* Check MBR signature */
if (!rtems_bdpart_is_valid_record( (*block)->buffer)) {
20ef8: e31000ff tst r0, #255 ; 0xff <== NOT EXECUTED
20efc: 13a00000 movne r0, #0 <== NOT EXECUTED
20f00: 03a0001b moveq r0, #27 <== NOT EXECUTED
return RTEMS_IO_ERROR;
}
return RTEMS_SUCCESSFUL;
}
20f04: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00005658 <rtems_bdpart_register>:
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
5658: 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;
565c: e3a03000 mov r3, #0 <== NOT EXECUTED
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
5660: e24dd02c sub sp, sp, #44 ; 0x2c <== 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;
5664: e58d3028 str r3, [sp, #40] ; 0x28 <== NOT EXECUTED
dev_t disk = 0;
5668: e3a04000 mov r4, #0 <== NOT EXECUTED
566c: e3a03000 mov r3, #0 <== NOT EXECUTED
5670: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
5674: e58d4024 str r4, [sp, #36] ; 0x24 <== NOT EXECUTED
rtems_status_code rtems_bdpart_register(
const char *disk_name,
const rtems_bdpart_partition *pt,
size_t count
)
{
5678: e1a0a000 mov sl, r0 <== NOT EXECUTED
567c: e1a05001 mov r5, r1 <== NOT EXECUTED
5680: e1a0b002 mov fp, 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);
5684: eb00fe5d bl 45000 <strlen> <== NOT EXECUTED
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
5688: e28d1020 add r1, sp, #32 <== 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);
568c: e1a08000 mov r8, r0 <== NOT EXECUTED
size_t i = 0;
/* Get disk data */
sc = rtems_bdpart_get_disk_data( disk_name, &disk, &disk_end);
5690: e28d2028 add r2, sp, #40 ; 0x28 <== NOT EXECUTED
5694: e1a0000a mov r0, sl <== NOT EXECUTED
5698: eb006e1a bl 20f08 <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
569c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
56a0: 1a000031 bne 576c <rtems_bdpart_register+0x114> <== NOT EXECUTED
return sc;
}
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
56a4: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
56a8: e2880004 add r0, r8, #4 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
56ac: e58d300c str r3, [sp, #12] <== NOT EXECUTED
56b0: e59d7024 ldr r7, [sp, #36] ; 0x24 <== NOT EXECUTED
/* Create logical disk name */
logical_disk_name = malloc( disk_name_size + RTEMS_BDPART_NUMBER_SIZE);
56b4: eb0009a5 bl 7d50 <malloc> <== NOT EXECUTED
if (logical_disk_name == NULL) {
56b8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
56bc: 03a0401a moveq r4, #26 <== NOT EXECUTED
56c0: 0a000029 beq 576c <rtems_bdpart_register+0x114> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
}
strncpy( logical_disk_name, disk_name, disk_name_size);
56c4: e1a02008 mov r2, r8 <== NOT EXECUTED
56c8: e1a0100a mov r1, sl <== NOT EXECUTED
56cc: eb00feeb bl 45280 <strncpy> <== NOT EXECUTED
logical_disk_marker = logical_disk_name + disk_name_size;
56d0: e0868008 add r8, r6, r8 <== NOT EXECUTED
/* Create a logical disk for each partition */
for (i = 0; i < count; ++i) {
56d4: ea000019 b 5740 <rtems_bdpart_register+0xe8> <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
56d8: e59d900c ldr r9, [sp, #12] <== NOT EXECUTED
temp.__overlay.minor = _minor;
56dc: e58d701c str r7, [sp, #28] <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
56e0: e58d9018 str r9, [sp, #24] <== NOT EXECUTED
temp.__overlay.minor = _minor;
return temp.device;
56e4: e28da018 add sl, sp, #24 <== NOT EXECUTED
56e8: e89a0600 ldm sl, {r9, sl} <== NOT EXECUTED
56ec: e58d9010 str r9, [sp, #16] <== NOT EXECUTED
56f0: e58da014 str sl, [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);
56f4: eb00fa2f bl 43fb8 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
56f8: e3500003 cmp r0, #3 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
56fc: e28d1010 add r1, sp, #16 <== NOT EXECUTED
5700: e8910003 ldm r1, {r0, r1} <== 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) {
5704: c3a04003 movgt r4, #3 <== NOT EXECUTED
5708: ca000015 bgt 5764 <rtems_bdpart_register+0x10c> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
570c: e5953000 ldr r3, [r5] <== NOT EXECUTED
5710: e58d3000 str r3, [sp] <== NOT EXECUTED
5714: e595c004 ldr ip, [r5, #4] <== NOT EXECUTED
5718: e063c00c rsb ip, r3, ip <== NOT EXECUTED
571c: e28d3020 add r3, sp, #32 <== NOT EXECUTED
5720: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
5724: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
5728: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
572c: eb0003d2 bl 667c <rtems_disk_create_log> <== NOT EXECUTED
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
5730: e3500000 cmp r0, #0 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Create logical disk */
sc = rtems_disk_create_log(
5734: e2855030 add r5, r5, #48 ; 0x30 <== NOT EXECUTED
disk,
p->begin,
p->end - p->begin,
logical_disk_name
);
if (sc != RTEMS_SUCCESSFUL) {
5738: 11a04000 movne r4, r0 <== NOT EXECUTED
573c: 1a000008 bne 5764 <rtems_bdpart_register+0x10c> <== 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) {
5740: e154000b cmp r4, fp <== 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);
5744: 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;
5748: e2877001 add r7, r7, #1 <== 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);
574c: e3a01004 mov r1, #4 <== NOT EXECUTED
5750: e59f2020 ldr r2, [pc, #32] ; 5778 <rtems_bdpart_register+0x120><== NOT EXECUTED
5754: e1a00008 mov r0, r8 <== NOT EXECUTED
5758: e1a03004 mov r3, r4 <== 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) {
575c: 3affffdd bcc 56d8 <rtems_bdpart_register+0x80> <== NOT EXECUTED
5760: e3a04000 mov r4, #0 <== NOT EXECUTED
}
}
cleanup:
free( logical_disk_name);
5764: e1a00006 mov r0, r6 <== NOT EXECUTED
5768: eb0007d1 bl 76b4 <free> <== NOT EXECUTED
return esc;
}
576c: e1a00004 mov r0, r4 <== NOT EXECUTED
5770: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED
5774: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000577c <rtems_bdpart_register_from_disk>:
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
577c: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
5780: 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;
5784: e3a0c010 mov ip, #16 <== NOT EXECUTED
/* Read partitions */
sc = rtems_bdpart_read( disk_name, &format, pt, &count);
5788: e28d1c03 add r1, sp, #768 ; 0x300 <== NOT EXECUTED
578c: e1a0200d mov r2, sp <== NOT EXECUTED
5790: 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;
5794: e58dc314 str ip, [sp, #788] ; 0x314 <== NOT EXECUTED
return esc;
}
rtems_status_code rtems_bdpart_register_from_disk( const char *disk_name)
{
5798: 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);
579c: eb006e3f bl 210a0 <rtems_bdpart_read> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
57a0: 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);
57a4: e1a0400d mov r4, sp <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
return sc;
}
/* Register partitions */
return rtems_bdpart_register( disk_name, pt, count);
57a8: 01a00005 moveq r0, r5 <== NOT EXECUTED
57ac: 01a0100d moveq r1, sp <== NOT EXECUTED
57b0: 059d2314 ldreq r2, [sp, #788] ; 0x314 <== NOT EXECUTED
57b4: 0bffffa7 bleq 5658 <rtems_bdpart_register> <== NOT EXECUTED
}
57b8: e28ddfc6 add sp, sp, #792 ; 0x318 <== NOT EXECUTED
57bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00020f84 <rtems_bdpart_to_mbr_partition_type>:
bool rtems_bdpart_to_mbr_partition_type(
const uuid_t type,
uint8_t *mbr_type
)
{
20f84: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
*mbr_type = rtems_bdpart_mbr_partition_type( type);
20f88: e4d03001 ldrb r3, [r0], #1 <== NOT EXECUTED
return memcmp(
20f8c: 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);
20f90: e5c13000 strb r3, [r1] <== NOT EXECUTED
return memcmp(
20f94: e59f100c ldr r1, [pc, #12] ; 20fa8 <rtems_bdpart_to_mbr_partition_type+0x24><== NOT EXECUTED
20f98: eb008190 bl 415e0 <memcmp> <== NOT EXECUTED
type + 1,
RTEMS_BDPART_MBR_MASTER_TYPE + 1,
sizeof( uuid_t) - 1
) == 0;
}
20f9c: e2700001 rsbs r0, r0, #1 <== NOT EXECUTED
20fa0: 33a00000 movcc r0, #0 <== NOT EXECUTED
20fa4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00020fac <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;
20fac: e4c10001 strb r0, [r1], #1 <== NOT EXECUTED
memcpy( type + 1, RTEMS_BDPART_MBR_MASTER_TYPE + 1, sizeof( uuid_t) - 1);
20fb0: e1a00001 mov r0, r1 <== NOT EXECUTED
20fb4: e59f1004 ldr r1, [pc, #4] ; 20fc0 <rtems_bdpart_to_partition_type+0x14><== NOT EXECUTED
20fb8: e3a0200f mov r2, #15 <== NOT EXECUTED
20fbc: ea0081b1 b 41688 <memcpy> <== NOT EXECUTED
00020c0c <rtems_bdpart_unmount>:
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count,
const char *mount_base
)
{
20c0c: 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, '/');
20c10: 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
)
{
20c14: e1a09003 mov r9, r3 <== NOT EXECUTED
20c18: e1a04000 mov r4, r0 <== NOT EXECUTED
20c1c: e1a06002 mov r6, r2 <== NOT EXECUTED
rtems_status_code esc = RTEMS_SUCCESSFUL;
const char *disk_file_name = strrchr( disk_name, '/');
20c20: eb009442 bl 45d30 <strrchr> <== NOT EXECUTED
20c24: e1a0a000 mov sl, 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);
20c28: e1a00004 mov r0, r4 <== NOT EXECUTED
20c2c: eb0090f3 bl 45000 <strlen> <== NOT EXECUTED
20c30: e1a08000 mov r8, r0 <== NOT EXECUTED
size_t mount_base_size = strlen( mount_base);
20c34: e1a00009 mov r0, r9 <== NOT EXECUTED
20c38: eb0090f0 bl 45000 <strlen> <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
20c3c: e35a0000 cmp sl, #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);
20c40: e1a05000 mov r5, r0 <== NOT EXECUTED
size_t i = 0;
/* Get disk file name */
if (disk_file_name != NULL) {
20c44: 01a0a004 moveq sl, r4 <== NOT EXECUTED
20c48: 0a000003 beq 20c5c <rtems_bdpart_unmount+0x50> <== NOT EXECUTED
disk_file_name += 1;
20c4c: e28aa001 add sl, sl, #1 <== NOT EXECUTED
disk_file_name_size = strlen( disk_file_name);
20c50: e1a0000a mov r0, sl <== NOT EXECUTED
20c54: eb0090e9 bl 45000 <strlen> <== NOT EXECUTED
20c58: e1a08000 mov r8, 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);
20c5c: e0887005 add r7, r8, r5 <== NOT EXECUTED
20c60: e2870005 add r0, r7, #5 <== NOT EXECUTED
20c64: ebff9c39 bl 7d50 <malloc> <== NOT EXECUTED
if (mount_point == NULL) {
20c68: e2504000 subs r4, r0, #0 <== NOT EXECUTED
20c6c: 03a0501a moveq r5, #26 <== NOT EXECUTED
20c70: 0a000022 beq 20d00 <rtems_bdpart_unmount+0xf4> <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
strncpy( mount_point, mount_base, mount_base_size);
20c74: e1a02005 mov r2, r5 <== NOT EXECUTED
20c78: e1a01009 mov r1, r9 <== NOT EXECUTED
20c7c: eb00917f bl 45280 <strncpy> <== NOT EXECUTED
mount_point [mount_base_size] = '/';
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
20c80: e2850001 add r0, r5, #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] = '/';
20c84: e3a0302f mov r3, #47 ; 0x2f <== NOT EXECUTED
20c88: e7c43005 strb r3, [r4, r5] <== NOT EXECUTED
strncpy( mount_point + mount_base_size + 1, disk_file_name, disk_file_name_size);
20c8c: e0840000 add r0, r4, r0 <== NOT EXECUTED
20c90: e1a0100a mov r1, sl <== NOT EXECUTED
20c94: e1a02008 mov r2, r8 <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
20c98: e2877001 add r7, r7, #1 <== NOT EXECUTED
esc = RTEMS_NO_MEMORY;
goto cleanup;
}
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);
20c9c: eb009177 bl 45280 <strncpy> <== NOT EXECUTED
/* Marker */
mount_marker = mount_point + mount_base_size + 1 + disk_file_name_size;
20ca0: e0847007 add r7, r4, r7 <== NOT EXECUTED
20ca4: e3a05000 mov r5, #0 <== NOT EXECUTED
/* Mount supported file systems for each partition */
for (i = 0; i < count; ++i) {
20ca8: ea00000c b 20ce0 <rtems_bdpart_unmount+0xd4> <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
20cac: eb008cc1 bl 43fb8 <snprintf> <== NOT EXECUTED
if (rv >= RTEMS_BDPART_NUMBER_SIZE) {
20cb0: e3500003 cmp r0, #3 <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
20cb4: e1a00004 mov r0, r4 <== 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) {
20cb8: c3a05003 movgt r5, #3 <== NOT EXECUTED
20cbc: ca00000f bgt 20d00 <rtems_bdpart_unmount+0xf4> <== NOT EXECUTED
esc = RTEMS_INVALID_NAME;
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
20cc0: eb0018b0 bl 26f88 <unmount> <== NOT EXECUTED
if (rv == 0) {
20cc4: e3500000 cmp r0, #0 <== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
20cc8: e1a00004 mov r0, r4 <== NOT EXECUTED
goto cleanup;
}
/* Unmount */
rv = unmount( mount_point);
if (rv == 0) {
20ccc: 1a000003 bne 20ce0 <rtems_bdpart_unmount+0xd4> <== NOT EXECUTED
/* Remove mount point */
rv = rmdir( mount_point);
20cd0: eb001785 bl 26aec <rmdir> <== NOT EXECUTED
if (rv != 0) {
20cd4: e3500000 cmp r0, #0 <== NOT EXECUTED
20cd8: 13a0501b movne r5, #27 <== NOT EXECUTED
20cdc: 1a000007 bne 20d00 <rtems_bdpart_unmount+0xf4> <== 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) {
20ce0: e1550006 cmp r5, r6 <== NOT EXECUTED
/* Create mount point */
int rv = snprintf( mount_marker, RTEMS_BDPART_NUMBER_SIZE, "%zu", i + 1);
20ce4: e2855001 add r5, r5, #1 <== NOT EXECUTED
20ce8: e3a01004 mov r1, #4 <== NOT EXECUTED
20cec: e59f201c ldr r2, [pc, #28] ; 20d10 <rtems_bdpart_unmount+0x104><== NOT EXECUTED
20cf0: e1a00007 mov r0, r7 <== NOT EXECUTED
20cf4: e1a03005 mov r3, 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) {
20cf8: 3affffeb bcc 20cac <rtems_bdpart_unmount+0xa0> <== NOT EXECUTED
20cfc: e3a05000 mov r5, #0 <== NOT EXECUTED
}
}
cleanup:
free( mount_point);
20d00: e1a00004 mov r0, r4 <== NOT EXECUTED
20d04: ebff9a6a bl 76b4 <free> <== NOT EXECUTED
return esc;
}
20d08: e1a00005 mov r0, r5 <== NOT EXECUTED
20d0c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
000055dc <rtems_bdpart_unregister>:
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
55dc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
55e0: 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;
55e4: e3a03000 mov r3, #0 <== NOT EXECUTED
dev_t disk = 0;
55e8: e3a05000 mov r5, #0 <== NOT EXECUTED
55ec: e3a06000 mov r6, #0 <== NOT EXECUTED
rtems_status_code rtems_bdpart_unregister(
const char *disk_name,
const rtems_bdpart_partition *pt __attribute__((unused)),
size_t count
)
{
55f0: 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);
55f4: e28d1008 add r1, sp, #8 <== NOT EXECUTED
55f8: 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;
55fc: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
5600: e58d600c str r6, [sp, #12] <== 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;
5604: e58d3010 str r3, [sp, #16] <== 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);
5608: eb006e3e bl 20f08 <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
560c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
return sc;
}
/* Get the disk device identifier */
rtems_filesystem_split_dev_t( disk, major, minor);
5610: 059d8008 ldreq r8, [sp, #8] <== NOT EXECUTED
5614: 059d600c ldreq r6, [sp, #12] <== NOT EXECUTED
)
{
union __rtems_dev_t temp;
temp.device = device;
return temp.__overlay.minor;
5618: 01a05007 moveq r5, r7 <== 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);
if (sc != RTEMS_SUCCESSFUL) {
561c: 0a000007 beq 5640 <rtems_bdpart_unregister+0x64> <== NOT EXECUTED
5620: ea000009 b 564c <rtems_bdpart_unregister+0x70> <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
5624: e58d8000 str r8, [sp] <== NOT EXECUTED
temp.__overlay.minor = _minor;
5628: e58d6004 str r6, [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);
562c: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
5630: eb000334 bl 6308 <rtems_disk_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
5634: e3500000 cmp r0, #0 <== NOT EXECUTED
5638: 1a000004 bne 5650 <rtems_bdpart_unregister+0x74> <== 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) {
563c: e2855001 add r5, r5, #1 <== NOT EXECUTED
5640: e1550004 cmp r5, r4 <== NOT EXECUTED
/* New minor number */
++minor;
5644: e2866001 add r6, r6, #1 <== 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) {
5648: 3afffff5 bcc 5624 <rtems_bdpart_unregister+0x48> <== NOT EXECUTED
564c: e1a00007 mov r0, r7 <== NOT EXECUTED
return sc;
}
}
return RTEMS_SUCCESSFUL;
}
5650: e28dd014 add sp, sp, #20 <== NOT EXECUTED
5654: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000213a0 <rtems_bdpart_write>:
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
213a0: 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
213a4: e2518000 subs r8, r1, #0 <== NOT EXECUTED
const char *disk_name,
const rtems_bdpart_format *format,
const rtems_bdpart_partition *pt,
size_t count
)
{
213a8: e24dd034 sub sp, sp, #52 ; 0x34 <== NOT EXECUTED
213ac: e1a05002 mov r5, r2 <== NOT EXECUTED
213b0: e1a06003 mov r6, r3 <== NOT EXECUTED
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_status_code esc = RTEMS_SUCCESSFUL;
bool dos_compatibility = format != NULL
213b4: 0a000003 beq 213c8 <rtems_bdpart_write+0x28> <== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
213b8: e5983000 ldr r3, [r8] <== NOT EXECUTED
213bc: e3530000 cmp r3, #0 <== NOT EXECUTED
213c0: 05d8a008 ldrbeq sl, [r8, #8] <== NOT EXECUTED
213c4: 0a000000 beq 213cc <rtems_bdpart_write+0x2c> <== NOT EXECUTED
213c8: e3a0a000 mov sl, #0 <== 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;
213cc: e35a0000 cmp sl, #0 <== NOT EXECUTED
213d0: 13a0203f movne r2, #63 ; 0x3f <== NOT EXECUTED
213d4: 03a02001 moveq r2, #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) {
213d8: e3560000 cmp r6, #0 <== NOT EXECUTED
&& format->type == RTEMS_BDPART_FORMAT_MBR
&& 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;
213dc: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
213e0: e20aa0ff and sl, sl, #255 ; 0xff <== 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) {
213e4: 01a00006 moveq r0, r6 <== NOT EXECUTED
213e8: 0a000120 beq 21870 <rtems_bdpart_write+0x4d0> <== NOT EXECUTED
/* Nothing to do */
return RTEMS_SUCCESSFUL;
}
/* Check parameter */
if (format == NULL || pt == NULL) {
213ec: e3580000 cmp r8, #0 <== NOT EXECUTED
213f0: 13550000 cmpne r5, #0 <== NOT EXECUTED
213f4: 13a03000 movne r3, #0 <== NOT EXECUTED
213f8: 03a03001 moveq r3, #1 <== NOT EXECUTED
213fc: 03a00009 moveq r0, #9 <== NOT EXECUTED
21400: 0a00011a beq 21870 <rtems_bdpart_write+0x4d0> <== 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;
21404: e3a0c000 mov ip, #0 <== 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);
21408: e28d1020 add r1, sp, #32 <== NOT EXECUTED
2140c: 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;
21410: e3a0b000 mov fp, #0 <== NOT EXECUTED
21414: e58db020 str fp, [sp, #32] <== NOT EXECUTED
21418: e58dc024 str ip, [sp, #36] ; 0x24 <== 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;
2141c: e58d302c str r3, [sp, #44] ; 0x2c <== NOT EXECUTED
rtems_blkdev_bnum disk_end = 0;
21420: e58d3028 str r3, [sp, #40] ; 0x28 <== 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);
21424: ebfffeb7 bl 20f08 <rtems_bdpart_get_disk_data> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
21428: e3500000 cmp r0, #0 <== NOT EXECUTED
2142c: 1a00010f bne 21870 <rtems_bdpart_write+0x4d0> <== NOT EXECUTED
return sc;
}
/* Align end of disk on cylinder boundary if necessary */
if (dos_compatibility) {
21430: e35a0000 cmp sl, #0 <== NOT EXECUTED
21434: 0a000005 beq 21450 <rtems_bdpart_write+0xb0> <== NOT EXECUTED
disk_end -= (disk_end % record_space);
21438: e59d4028 ldr r4, [sp, #40] ; 0x28 <== NOT EXECUTED
2143c: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
21440: e1a00004 mov r0, r4 <== NOT EXECUTED
21444: eb00d442 bl 56554 <__umodsi3> <== NOT EXECUTED
21448: e0600004 rsb r0, r0, r4 <== NOT EXECUTED
2144c: 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) {
21450: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED
21454: e1a07005 mov r7, r5 <== NOT EXECUTED
21458: e1a03005 mov r3, r5 <== NOT EXECUTED
2145c: e3a02000 mov r2, #0 <== NOT EXECUTED
21460: ea00000e b 214a0 <rtems_bdpart_write+0x100> <== NOT EXECUTED
21464: e5931000 ldr r1, [r3] <== NOT EXECUTED
21468: e1510000 cmp r1, r0 <== NOT EXECUTED
2146c: 2a0000f6 bcs 2184c <rtems_bdpart_write+0x4ac> <== NOT EXECUTED
21470: e593c004 ldr ip, [r3, #4] <== NOT EXECUTED
21474: e15c0000 cmp ip, r0 <== NOT EXECUTED
21478: 8a0000f3 bhi 2184c <rtems_bdpart_write+0x4ac> <== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that begin and end are valid */
if (p->begin >= p->end) {
2147c: e151000c cmp r1, ip <== NOT EXECUTED
21480: 2a0000f1 bcs 2184c <rtems_bdpart_write+0x4ac> <== NOT EXECUTED
esc = RTEMS_INVALID_NUMBER;
goto cleanup;
}
/* Check that partitions do not overlap */
if (i > 0 && pt [i - 1].end > p->begin) {
21484: e3520000 cmp r2, #0 <== NOT EXECUTED
21488: 0a000002 beq 21498 <rtems_bdpart_write+0xf8> <== NOT EXECUTED
2148c: e513c02c ldr ip, [r3, #-44] ; 0x2c <== NOT EXECUTED
21490: e15c0001 cmp ip, r1 <== NOT EXECUTED
21494: 8a0000ec bhi 2184c <rtems_bdpart_write+0x4ac> <== 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) {
21498: e2822001 add r2, r2, #1 <== NOT EXECUTED
2149c: e2833030 add r3, r3, #48 ; 0x30 <== NOT EXECUTED
214a0: e1520006 cmp r2, r6 <== NOT EXECUTED
214a4: 3affffee bcc 21464 <rtems_bdpart_write+0xc4> <== NOT EXECUTED
goto cleanup;
}
}
/* Check format */
if (format->type != RTEMS_BDPART_FORMAT_MBR) {
214a8: e5983000 ldr r3, [r8] <== NOT EXECUTED
214ac: e3530000 cmp r3, #0 <== NOT EXECUTED
214b0: 13a04018 movne r4, #24 <== NOT EXECUTED
214b4: 1a0000e9 bne 21860 <rtems_bdpart_write+0x4c0> <== 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;
214b8: e3560004 cmp r6, #4 <== NOT EXECUTED
214bc: 91a04006 movls r4, r6 <== NOT EXECUTED
214c0: 83a04003 movhi r4, #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) {
214c4: e35a0000 cmp sl, #0 <== NOT EXECUTED
214c8: 1a000009 bne 214f4 <rtems_bdpart_write+0x154> <== NOT EXECUTED
* 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) {
if ((pt [i].begin - pt [i - 1].end) < record_space) {
214cc: e3a03030 mov r3, #48 ; 0x30 <== NOT EXECUTED
214d0: e00a0493 mul sl, r3, r4 <== NOT EXECUTED
214d4: e2441001 sub r1, r4, #1 <== NOT EXECUTED
214d8: e085c00a add ip, r5, sl <== NOT EXECUTED
214dc: e0225193 mla r2, r3, r1, r5 <== NOT EXECUTED
214e0: e58da00c str sl, [sp, #12] <== NOT EXECUTED
214e4: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
214e8: e1a0100c mov r1, ip <== NOT EXECUTED
214ec: e1a03004 mov r3, r4 <== NOT EXECUTED
214f0: ea00000b b 21524 <rtems_bdpart_write+0x184> <== 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) {
214f4: e5953000 ldr r3, [r5] <== NOT EXECUTED
214f8: e353003f cmp r3, #63 ; 0x3f <== NOT EXECUTED
214fc: 1a0000d2 bne 2184c <rtems_bdpart_write+0x4ac> <== NOT EXECUTED
21500: eafffff1 b 214cc <rtems_bdpart_write+0x12c> <== NOT EXECUTED
* 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) {
if ((pt [i].begin - pt [i - 1].end) < record_space) {
21504: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
21508: e491c030 ldr ip, [r1], #48 ; 0x30 <== NOT EXECUTED
2150c: e59da004 ldr sl, [sp, #4] <== NOT EXECUTED
21510: e060000c rsb r0, r0, ip <== NOT EXECUTED
21514: e150000a cmp r0, sl <== NOT EXECUTED
21518: e2822030 add r2, r2, #48 ; 0x30 <== NOT EXECUTED
2151c: 3a0000ca bcc 2184c <rtems_bdpart_write+0x4ac> <== 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) {
21520: e2833001 add r3, r3, #1 <== NOT EXECUTED
21524: e1530006 cmp r3, r6 <== NOT EXECUTED
21528: 3afffff5 bcc 21504 <rtems_bdpart_write+0x164> <== NOT EXECUTED
2152c: e3a09000 mov r9, #0 <== NOT EXECUTED
21530: e1a0a005 mov sl, r5 <== NOT EXECUTED
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
21534: e1a0b009 mov fp, r9 <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
21538: e28d3033 add r3, sp, #51 ; 0x33 <== NOT EXECUTED
2153c: ea00000d b 21578 <rtems_bdpart_write+0x1d8> <== NOT EXECUTED
21540: e58d3000 str r3, [sp] <== NOT EXECUTED
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
uint8_t type = 0;
21544: e5cdb033 strb fp, [sp, #51] ; 0x33 <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Check type */
if (!rtems_bdpart_to_mbr_partition_type( p->type, &type)) {
21548: ebfffe8d bl 20f84 <rtems_bdpart_to_mbr_partition_type> <== NOT EXECUTED
2154c: e3500000 cmp r0, #0 <== NOT EXECUTED
21550: e59d3000 ldr r3, [sp] <== NOT EXECUTED
21554: 0a0000be beq 21854 <rtems_bdpart_write+0x4b4> <== NOT EXECUTED
esc = RTEMS_INVALID_ID;
goto cleanup;
}
/* Check flags */
if (p->flags > 0xffU) {
21558: e59a202c ldr r2, [sl, #44] ; 0x2c <== NOT EXECUTED
2155c: e3520000 cmp r2, #0 <== NOT EXECUTED
21560: e59a2028 ldr r2, [sl, #40] ; 0x28 <== NOT EXECUTED
21564: e28aa030 add sl, sl, #48 ; 0x30 <== NOT EXECUTED
21568: 1a0000b9 bne 21854 <rtems_bdpart_write+0x4b4> <== NOT EXECUTED
2156c: e35200ff cmp r2, #255 ; 0xff <== NOT EXECUTED
21570: 8a0000b7 bhi 21854 <rtems_bdpart_write+0x4b4> <== NOT EXECUTED
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
21574: e2899001 add r9, r9, #1 <== NOT EXECUTED
21578: e1590006 cmp r9, r6 <== 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)) {
2157c: e28a0008 add r0, sl, #8 <== NOT EXECUTED
21580: e1a01003 mov r1, r3 <== NOT EXECUTED
goto cleanup;
}
}
/* Check that we can convert the parition descriptions to the MBR format */
for (i = 0; i < count; ++i) {
21584: 3affffed bcc 21540 <rtems_bdpart_write+0x1a0> <== NOT EXECUTED
/* Check ID */
/* TODO */
}
/* New MBR */
sc = rtems_bdpart_new_record( disk, 0, &block);
21588: e28d1020 add r1, sp, #32 <== NOT EXECUTED
2158c: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
21590: e3a02000 mov r2, #0 <== NOT EXECUTED
21594: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED
21598: ebffff5b bl 2130c <rtems_bdpart_new_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
2159c: e3500000 cmp r0, #0 <== NOT EXECUTED
215a0: 1a000085 bne 217bc <rtems_bdpart_write+0x41c> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write disk ID */
rtems_uint32_to_little_endian(
215a4: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
215a8: e5982004 ldr r2, [r8, #4] <== NOT EXECUTED
215ac: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
{
size_t i = 0;
for (i = 0; i < 4; ++i) {
data [i] = (uint8_t) value;
value >>= 8;
215b0: 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;
215b4: e1a08c22 lsr r8, r2, #24 <== NOT EXECUTED
value >>= 8;
215b8: e1a0c422 lsr ip, r2, #8 <== 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;
215bc: e5c311ba strb r1, [r3, #442] ; 0x1ba <== NOT EXECUTED
215c0: e5c381bb strb r8, [r3, #443] ; 0x1bb <== NOT EXECUTED
215c4: e5c3c1b9 strb ip, [r3, #441] ; 0x1b9 <== NOT EXECUTED
215c8: 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;
215cc: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
215d0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
215d4: e2831f6f add r1, r3, #444 ; 0x1bc <== NOT EXECUTED
215d8: e2811002 add r1, r1, #2 <== NOT EXECUTED
for (i = 0; i < ppc; ++i) {
215dc: ea00001e b 2165c <rtems_bdpart_write+0x2bc> <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Write partition entry */
rtems_bdpart_write_mbr_partition(
215e0: e8971004 ldm r7, {r2, ip} <== NOT EXECUTED
static inline uint8_t rtems_bdpart_mbr_partition_type(
const uuid_t type
)
{
return type [0];
215e4: e5d78008 ldrb r8, [r7, #8] <== NOT EXECUTED
data,
p->begin,
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
215e8: e597a028 ldr sl, [r7, #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(
215ec: e062c00c rsb ip, r2, ip <== NOT EXECUTED
215f0: e58d8014 str r8, [sp, #20] <== NOT EXECUTED
215f4: e1a08c2c lsr r8, ip, #24 <== NOT EXECUTED
data,
p->begin,
p->end - p->begin,
rtems_bdpart_mbr_partition_type( p->type),
(uint8_t) p->flags
215f8: e58da01c str sl, [sp, #28] <== NOT EXECUTED
215fc: e58d8018 str r8, [sp, #24] <== NOT EXECUTED
value >>= 8;
21600: e1a0a822 lsr sl, r2, #16 <== NOT EXECUTED
21604: e1a0842c lsr r8, ip, #8 <== NOT EXECUTED
21608: e1a09422 lsr r9, r2, #8 <== 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;
2160c: e1a0bc22 lsr fp, r2, #24 <== NOT EXECUTED
value >>= 8;
21610: 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;
21614: e5c391c7 strb r9, [r3, #455] ; 0x1c7 <== NOT EXECUTED
21618: e5c3a1c8 strb sl, [r3, #456] ; 0x1c8 <== NOT EXECUTED
2161c: e5c3b1c9 strb fp, [r3, #457] ; 0x1c9 <== NOT EXECUTED
21620: e59da010 ldr sl, [sp, #16] <== NOT EXECUTED
value >>= 8;
21624: e1a0882c lsr r8, ip, #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;
21628: e5c3a1cb strb sl, [r3, #459] ; 0x1cb <== NOT EXECUTED
2162c: e5c381cc strb r8, [r3, #460] ; 0x1cc <== NOT EXECUTED
21630: e59d8018 ldr r8, [sp, #24] <== NOT EXECUTED
21634: e5c381cd strb r8, [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;
21638: e59da014 ldr sl, [sp, #20] <== NOT EXECUTED
2163c: e5c3a1c2 strb sl, [r3, #450] ; 0x1c2 <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
21640: e59d801c ldr r8, [sp, #28] <== 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) {
21644: e2800001 add r0, r0, #1 <== 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;
21648: e5c381be strb r8, [r3, #446] ; 0x1be <== NOT EXECUTED
2164c: e5c321c6 strb r2, [r3, #454] ; 0x1c6 <== NOT EXECUTED
21650: e5c3c1ca strb ip, [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) {
21654: e2877030 add r7, r7, #48 ; 0x30 <== NOT EXECUTED
21658: e2833010 add r3, r3, #16 <== NOT EXECUTED
2165c: e1500004 cmp r0, r4 <== NOT EXECUTED
21660: 3affffde bcc 215e0 <rtems_bdpart_write+0x240> <== NOT EXECUTED
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
21664: e1540006 cmp r4, r6 <== 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) {
21668: e0813204 add r3, r1, r4, lsl #4 <== NOT EXECUTED
data += RTEMS_BDPART_MBR_TABLE_ENTRY_SIZE;
}
/* Write extended partition with logical partitions if necessary */
if (ppc != count) {
2166c: 0a00007a beq 2185c <rtems_bdpart_write+0x4bc> <== 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;
21670: e59da00c ldr sl, [sp, #12] <== NOT EXECUTED
21674: e59dc004 ldr ip, [sp, #4] <== NOT EXECUTED
21678: e795700a ldr r7, [r5, sl] <== NOT EXECUTED
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
2167c: e59d2028 ldr r2, [sp, #40] ; 0x28 <== 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;
21680: e06c7007 rsb r7, ip, r7 <== NOT EXECUTED
/* Write extended partition */
rtems_bdpart_write_mbr_partition(
21684: e0672002 rsb r2, r7, r2 <== NOT EXECUTED
value >>= 8;
21688: e1a05427 lsr r5, r7, #8 <== NOT EXECUTED
2168c: e58d5018 str r5, [sp, #24] <== NOT EXECUTED
21690: e1a05422 lsr r5, r2, #8 <== NOT EXECUTED
21694: e58d5010 str r5, [sp, #16] <== NOT EXECUTED
uint32_t size,
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
21698: e283c008 add ip, r3, #8 <== 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;
2169c: e1a00c22 lsr r0, r2, #24 <== NOT EXECUTED
value >>= 8;
216a0: e1a05822 lsr r5, 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;
216a4: e1a09c27 lsr r9, r7, #24 <== NOT EXECUTED
216a8: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
value >>= 8;
216ac: e58d500c str r5, [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;
216b0: e5c37008 strb r7, [r3, #8] <== NOT EXECUTED
216b4: e5cc9003 strb r9, [ip, #3] <== NOT EXECUTED
216b8: e59d5018 ldr r5, [sp, #24] <== NOT EXECUTED
value >>= 8;
216bc: e1a0b827 lsr fp, r7, #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;
216c0: e5cc5001 strb r5, [ip, #1] <== NOT EXECUTED
216c4: e5ccb002 strb fp, [ip, #2] <== 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;
216c8: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
216cc: e5c3200c strb r2, [r3, #12] <== NOT EXECUTED
216d0: e59d2014 ldr r2, [sp, #20] <== 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);
216d4: e283000c add r0, r3, #12 <== NOT EXECUTED
216d8: e5c02003 strb r2, [r0, #3] <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
216dc: e28c5004 add r5, ip, #4 <== NOT EXECUTED
216e0: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
216e4: e5c0c001 strb ip, [r0, #1] <== NOT EXECUTED
216e8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
216ec: e3a08000 mov r8, #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;
216f0: e3a0a005 mov sl, #5 <== NOT EXECUTED
216f4: e5c02002 strb r2, [r0, #2] <== NOT EXECUTED
216f8: e5c3a004 strb sl, [r3, #4] <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
216fc: e7c18204 strb r8, [r1, r4, lsl #4] <== NOT EXECUTED
21700: e1a08004 mov r8, r4 <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
21704: ea00004d b 21840 <rtems_bdpart_write+0x4a0> <== NOT EXECUTED
const rtems_bdpart_partition *p = pt + i;
/* Write second partition entry */
if (i > ppc) {
21708: e1580004 cmp r8, r4 <== NOT EXECUTED
2170c: 9a000021 bls 21798 <rtems_bdpart_write+0x3f8> <== NOT EXECUTED
rtems_blkdev_bnum begin = p->begin - record_space;
rtems_bdpart_write_mbr_partition(
21710: 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;
21714: e59da004 ldr sl, [sp, #4] <== NOT EXECUTED
21718: e5151004 ldr r1, [r5, #-4] <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
2171c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
21720: e59d2028 ldr r2, [sp, #40] ; 0x28 <== 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;
21724: e06a1001 rsb r1, sl, r1 <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
21728: e0612002 rsb r2, r1, r2 <== NOT EXECUTED
2172c: e283cf73 add ip, r3, #460 ; 0x1cc <== NOT EXECUTED
21730: e0671001 rsb r1, r7, r1 <== NOT EXECUTED
21734: e1a0ec22 lsr lr, r2, #24 <== NOT EXECUTED
21738: e28cc002 add ip, ip, #2 <== NOT EXECUTED
2173c: e58de00c str lr, [sp, #12] <== 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);
21740: e28c000c add r0, ip, #12 <== NOT EXECUTED
value >>= 8;
21744: e1a0e422 lsr lr, r2, #8 <== NOT EXECUTED
uint32_t size,
uint8_t type,
uint8_t flags
)
{
rtems_uint32_to_little_endian( begin, data + RTEMS_BDPART_MBR_OFFSET_BEGIN);
21748: e28cc008 add ip, ip, #8 <== NOT EXECUTED
2174c: e1a0a821 lsr sl, 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;
21750: e1a0bc21 lsr fp, r1, #24 <== NOT EXECUTED
value >>= 8;
21754: e1a09421 lsr r9, r1, #8 <== NOT EXECUTED
21758: e58de008 str lr, [sp, #8] <== 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;
2175c: e5c311d6 strb r1, [r3, #470] ; 0x1d6 <== NOT EXECUTED
21760: e5ccb003 strb fp, [ip, #3] <== NOT EXECUTED
21764: e5cc9001 strb r9, [ip, #1] <== NOT EXECUTED
21768: e5cca002 strb sl, [ip, #2] <== NOT EXECUTED
2176c: e5c321da strb r2, [r3, #474] ; 0x1da <== NOT EXECUTED
value >>= 8;
21770: 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;
21774: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
21778: e5c02003 strb r2, [r0, #3] <== NOT EXECUTED
2177c: e59da008 ldr sl, [sp, #8] <== 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;
21780: e3a0c000 mov ip, #0 <== NOT EXECUTED
21784: 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;
21788: e3a0e005 mov lr, #5 <== NOT EXECUTED
2178c: e5c0a001 strb sl, [r0, #1] <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
21790: e5c3c1ce strb ip, [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;
21794: e5c3e1d2 strb lr, [r3, #466] ; 0x1d2 <== NOT EXECUTED
);
}
/* New EBR */
ebr = p->begin - record_space;
sc = rtems_bdpart_new_record( disk, ebr, &block);
21798: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
2179c: e5152004 ldr r2, [r5, #-4] <== NOT EXECUTED
217a0: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED
217a4: e0602002 rsb r2, r0, r2 <== NOT EXECUTED
217a8: e28d1020 add r1, sp, #32 <== NOT EXECUTED
217ac: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
217b0: ebfffed5 bl 2130c <rtems_bdpart_new_record> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) {
217b4: e3500000 cmp r0, #0 <== NOT EXECUTED
217b8: 0a000001 beq 217c4 <rtems_bdpart_write+0x424> <== NOT EXECUTED
217bc: e1a04000 mov r4, r0 <== NOT EXECUTED
217c0: ea000026 b 21860 <rtems_bdpart_write+0x4c0> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
217c4: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
217c8: e5d50004 ldrb r0, [r5, #4] <== NOT EXECUTED
217cc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
217d0: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
217d4: e2831f6f add r1, r3, #444 ; 0x1bc <== NOT EXECUTED
217d8: e595a000 ldr sl, [r5] <== NOT EXECUTED
217dc: e515c004 ldr ip, [r5, #-4] <== 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
217e0: e595b024 ldr fp, [r5, #36] ; 0x24 <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
217e4: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
rtems_bdpart_write_mbr_partition(
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
217e8: e1a02003 mov r2, r3 <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
217ec: e2811002 add r1, r1, #2 <== NOT EXECUTED
RTEMS_BDPART_MBR_SIGNATURE_1;
return RTEMS_SUCCESSFUL;
}
rtems_status_code rtems_bdpart_write(
217f0: e2839004 add r9, r3, #4 <== NOT EXECUTED
217f4: e5c201c6 strb r0, [r2, #454] ; 0x1c6 <== NOT EXECUTED
217f8: e2822001 add r2, r2, #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) {
217fc: e1520009 cmp r2, r9 <== NOT EXECUTED
data [i] = (uint8_t) value;
21800: e3a00000 mov r0, #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) {
21804: 1afffffa bne 217f4 <rtems_bdpart_write+0x454> <== NOT EXECUTED
esc = sc;
goto cleanup;
}
/* Write first partition entry */
rtems_bdpart_write_mbr_partition(
21808: e06cc00a rsb ip, ip, sl <== 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);
2180c: e281100c add r1, r1, #12 <== NOT EXECUTED
data [i] = (uint8_t) value;
value >>= 8;
21810: e1a0282c lsr r2, ip, #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;
21814: e1a0ac2c lsr sl, ip, #24 <== NOT EXECUTED
value >>= 8;
21818: e1a0042c lsr r0, ip, #8 <== 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;
2181c: e5c3c1ca strb ip, [r3, #458] ; 0x1ca <== NOT EXECUTED
21820: e5c1a003 strb sl, [r1, #3] <== NOT EXECUTED
21824: e5c10001 strb r0, [r1, #1] <== NOT EXECUTED
21828: e5c12002 strb r2, [r1, #2] <== NOT EXECUTED
data [RTEMS_BDPART_MBR_OFFSET_TYPE] = type;
data [RTEMS_BDPART_MBR_OFFSET_FLAGS] = flags;
2182c: e5c3b1be strb fp, [r3, #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;
21830: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
21834: e5c321c2 strb r2, [r3, #450] ; 0x1c2 <== NOT EXECUTED
RTEMS_BDPART_MBR_EXTENDED,
0
);
/* Write logical partitions */
for (i = ppc; i < count; ++i) {
21838: e2888001 add r8, r8, #1 <== NOT EXECUTED
2183c: e2855030 add r5, r5, #48 ; 0x30 <== NOT EXECUTED
21840: e1580006 cmp r8, r6 <== NOT EXECUTED
21844: 3affffaf bcc 21708 <rtems_bdpart_write+0x368> <== NOT EXECUTED
21848: ea000003 b 2185c <rtems_bdpart_write+0x4bc> <== NOT EXECUTED
2184c: e3a0400a mov r4, #10 <== NOT EXECUTED
21850: ea000002 b 21860 <rtems_bdpart_write+0x4c0> <== NOT EXECUTED
21854: e3a04004 mov r4, #4 <== NOT EXECUTED
21858: ea000000 b 21860 <rtems_bdpart_write+0x4c0> <== NOT EXECUTED
2185c: e3a04000 mov r4, #0 <== NOT EXECUTED
}
}
cleanup:
if (block != NULL) {
21860: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
21864: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_bdbuf_sync( block);
21868: 1bff8c93 blne 4abc <rtems_bdbuf_sync> <== NOT EXECUTED
2186c: e1a00004 mov r0, r4 <== NOT EXECUTED
}
return esc;
}
21870: e28dd034 add sp, sp, #52 ; 0x34 <== NOT EXECUTED
21874: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000c0b0 <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)
c0b0: e5921004 ldr r1, [r2, #4]
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;
c0b4: e5923000 ldr r3, [r2]
rtems_device_driver
rtems_blkdev_generic_ioctl(
rtems_device_major_number major __attribute__((unused)),
rtems_device_minor_number minor __attribute__((unused)),
void * arg)
{
c0b8: e92d4010 push {r4, lr}
c0bc: e1a04002 mov r4, r2
rtems_libio_ioctl_args_t *args = arg;
rtems_libio_t *iop = args->iop;
rtems_disk_device *dd = iop->data1;
int rc;
switch (args->command)
c0c0: e59f20c0 ldr r2, [pc, #192] ; c188 <rtems_blkdev_generic_ioctl+0xd8>
c0c4: e1510002 cmp r1, r2
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;
c0c8: e5933034 ldr r3, [r3, #52] ; 0x34
int rc;
switch (args->command)
c0cc: 0a000013 beq c120 <rtems_blkdev_generic_ioctl+0x70>
c0d0: 8a000006 bhi c0f0 <rtems_blkdev_generic_ioctl+0x40>
c0d4: e59f20b0 ldr r2, [pc, #176] ; c18c <rtems_blkdev_generic_ioctl+0xdc><== NOT EXECUTED
c0d8: e1510002 cmp r1, r2 <== NOT EXECUTED
c0dc: 0a00001b beq c150 <rtems_blkdev_generic_ioctl+0xa0> <== NOT EXECUTED
c0e0: e59f20a8 ldr r2, [pc, #168] ; c190 <rtems_blkdev_generic_ioctl+0xe0><== NOT EXECUTED
c0e4: e1510002 cmp r1, r2 <== NOT EXECUTED
c0e8: 1a00001f bne c16c <rtems_blkdev_generic_ioctl+0xbc> <== NOT EXECUTED
c0ec: ea000009 b c118 <rtems_blkdev_generic_ioctl+0x68> <== NOT EXECUTED
c0f0: e59f209c ldr r2, [pc, #156] ; c194 <rtems_blkdev_generic_ioctl+0xe4>
c0f4: e1510002 cmp r1, r2
c0f8: 0a00000e beq c138 <rtems_blkdev_generic_ioctl+0x88>
c0fc: e59f2094 ldr r2, [pc, #148] ; c198 <rtems_blkdev_generic_ioctl+0xe8><== NOT EXECUTED
c100: e1510002 cmp r1, r2 <== NOT EXECUTED
c104: 0a000016 beq c164 <rtems_blkdev_generic_ioctl+0xb4> <== NOT EXECUTED
c108: e59f208c ldr r2, [pc, #140] ; c19c <rtems_blkdev_generic_ioctl+0xec><== NOT EXECUTED
c10c: e1510002 cmp r1, r2 <== NOT EXECUTED
c110: 1a000015 bne c16c <rtems_blkdev_generic_ioctl+0xbc> <== NOT EXECUTED
c114: ea00000b b c148 <rtems_blkdev_generic_ioctl+0x98> <== NOT EXECUTED
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*((uint32_t *) args->buffer) = dd->media_block_size;
c118: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED
c11c: ea000000 b c124 <rtems_blkdev_generic_ioctl+0x74> <== NOT EXECUTED
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETBLKSIZE:
*((uint32_t *) args->buffer) = dd->block_size;
c120: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
c124: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
c128: e5832000 str r2, [r3] <== NOT EXECUTED
args->ioctl_return = 0;
c12c: e3a03000 mov r3, #0
c130: e584300c str r3, [r4, #12]
break;
c134: ea000011 b c180 <rtems_blkdev_generic_ioctl+0xd0>
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *((uint32_t *) args->buffer);
c138: e5942008 ldr r2, [r4, #8]
c13c: e5922000 ldr r2, [r2]
c140: e5832020 str r2, [r3, #32]
c144: eafffff8 b c12c <rtems_blkdev_generic_ioctl+0x7c>
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_GETSIZE:
*((rtems_blkdev_bnum *) args->buffer) = dd->size;
c148: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
c14c: eafffff4 b c124 <rtems_blkdev_generic_ioctl+0x74> <== NOT EXECUTED
args->ioctl_return = 0;
break;
case RTEMS_BLKIO_SYNCDEV:
rc = rtems_bdbuf_syncdev(dd->dev);
c150: e8930003 ldm r3, {r0, r1} <== NOT EXECUTED
c154: ebfff814 bl a1ac <rtems_bdbuf_syncdev> <== NOT EXECUTED
args->ioctl_return = (uint32_t) (rc == RTEMS_SUCCESSFUL ? 0 : -1);
c158: e3500000 cmp r0, #0 <== NOT EXECUTED
c15c: 13e00000 mvnne r0, #0 <== NOT EXECUTED
c160: ea000005 b c17c <rtems_blkdev_generic_ioctl+0xcc> <== NOT EXECUTED
case RTEMS_BLKIO_REQUEST:
/*
* It is not allowed to directly access the driver circumventing
* the cache.
*/
args->ioctl_return = (uint32_t) -1;
c164: e3e03000 mvn r3, #0 <== NOT EXECUTED
c168: eafffff0 b c130 <rtems_blkdev_generic_ioctl+0x80> <== NOT EXECUTED
break;
default:
args->ioctl_return = (uint32_t) dd->ioctl(dd->phys_dev,
c16c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
c170: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
c174: e1a0e00f mov lr, pc <== NOT EXECUTED
c178: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED
c17c: e584000c str r0, [r4, #12] <== NOT EXECUTED
args->buffer);
break;
}
return RTEMS_SUCCESSFUL;
}
c180: e3a00000 mov r0, #0
c184: e8bd8010 pop {r4, pc}
0000c2d8 <rtems_blkdev_generic_read>:
void * arg)
{
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;
c2d8: e5923000 ldr r3, [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)
{
c2dc: e92d4ff7 push {r0, r1, r2, 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;
c2e0: e5938034 ldr r8, [r3, #52] ; 0x34 <== 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);
c2e4: e9920c00 ldmib r2, {sl, fp} <== 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;
c2e8: e5986020 ldr r6, [r8, #32] <== NOT EXECUTED
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
c2ec: e3a05000 mov r5, #0 <== 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)
{
c2f0: e1a04002 mov r4, r2 <== 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);
c2f4: e1a03005 mov r3, r5 <== NOT EXECUTED
c2f8: e1a0100b mov r1, fp <== NOT EXECUTED
c2fc: e1a02006 mov r2, r6 <== NOT EXECUTED
c300: e1a0000a mov r0, sl <== NOT EXECUTED
c304: eb00402c bl 1c3bc <__divdi3> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
c308: e1a03005 mov r3, r5 <== NOT EXECUTED
c30c: e1a0100b mov r1, fp <== NOT EXECUTED
c310: e1a02006 mov r2, r6 <== 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);
c314: e1a07000 mov r7, r0 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
c318: e1a0000a mov r0, sl <== NOT EXECUTED
c31c: eb004150 bl 1c864 <__moddi3> <== NOT EXECUTED
dev_t dev = dd->dev;
c320: e898000c ldm r8, {r2, r3} <== NOT EXECUTED
args->bytes_moved = 0;
c324: e5845018 str r5, [r4, #24] <== NOT EXECUTED
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);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
c328: e1a09000 mov r9, r0 <== NOT EXECUTED
dev_t dev = dd->dev;
c32c: e88d000c stm sp, {r2, r3} <== 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;
c330: e594800c ldr r8, [r4, #12] <== NOT EXECUTED
uint32_t count = args->count;
c334: e5945010 ldr r5, [r4, #16] <== NOT EXECUTED
while (count > 0)
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
c338: e28db008 add fp, sp, #8 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
c33c: ea000016 b c39c <rtems_blkdev_generic_read+0xc4> <== NOT EXECUTED
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
c340: ebfffe7b bl bd34 <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
c344: e2503000 subs r3, r0, #0 <== NOT EXECUTED
break;
copy = block_size - blkofs;
c348: e069a006 rsb sl, r9, r6 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
c34c: e1a00008 mov r0, r8 <== NOT EXECUTED
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
c350: 1a000017 bne c3b4 <rtems_blkdev_generic_read+0xdc> <== NOT EXECUTED
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
c354: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
c358: 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;
c35c: e15a0005 cmp sl, r5 <== NOT EXECUTED
c360: 21a0a005 movcs sl, r5 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
c364: e1a0200a mov r2, sl <== NOT EXECUTED
c368: e0811009 add r1, r1, r9 <== NOT EXECUTED
c36c: eb0019bf bl 12a70 <memcpy> <== NOT EXECUTED
rc = rtems_bdbuf_release(diskbuf);
c370: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
c374: ebfffa2e bl ac34 <rtems_bdbuf_release> <== NOT EXECUTED
args->bytes_moved += copy;
c378: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
c37c: 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;
c380: e082200a add r2, r2, sl <== NOT EXECUTED
c384: e5842018 str r2, [r4, #24] <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
c388: 1a000009 bne c3b4 <rtems_blkdev_generic_read+0xdc> <== NOT EXECUTED
break;
count -= copy;
buf += copy;
c38c: e088800a add r8, r8, sl <== NOT EXECUTED
memcpy(buf, (char *)diskbuf->buffer + blkofs, copy);
rc = rtems_bdbuf_release(diskbuf);
args->bytes_moved += copy;
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
c390: e06a5005 rsb r5, sl, r5 <== NOT EXECUTED
buf += copy;
blkofs = 0;
block++;
c394: e2877001 add r7, r7, #1 <== NOT EXECUTED
c398: e1a09003 mov r9, r3 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
c39c: e3550000 cmp r5, #0 <== NOT EXECUTED
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
rc = rtems_bdbuf_read(dev, block, &diskbuf);
c3a0: e1a02007 mov r2, r7 <== NOT EXECUTED
c3a4: e1a0300b mov r3, fp <== NOT EXECUTED
c3a8: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
c3ac: 1affffe3 bne c340 <rtems_blkdev_generic_read+0x68> <== NOT EXECUTED
c3b0: e1a03005 mov r3, r5 <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
c3b4: e1a00003 mov r0, r3 <== NOT EXECUTED
c3b8: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
0000c1d8 <rtems_blkdev_generic_write>:
void * arg)
{
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;
c1d8: e5923000 ldr r3, [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)
{
c1dc: e92d4ff7 push {r0, r1, r2, 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;
c1e0: e593a034 ldr sl, [r3, #52] ; 0x34 <== 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);
c1e4: e9920300 ldmib r2, {r8, r9} <== 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;
c1e8: e59a6020 ldr r6, [sl, #32] <== NOT EXECUTED
char *buf = args->buffer;
uint32_t count = args->count;
rtems_blkdev_bnum block = (rtems_blkdev_bnum) (args->offset / block_size);
c1ec: e3a05000 mov r5, #0 <== 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)
{
c1f0: e1a04002 mov r4, r2 <== 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);
c1f4: e1a03005 mov r3, r5 <== NOT EXECUTED
c1f8: e1a00008 mov r0, r8 <== NOT EXECUTED
c1fc: e1a01009 mov r1, r9 <== NOT EXECUTED
c200: e1a02006 mov r2, r6 <== NOT EXECUTED
c204: eb00406c bl 1c3bc <__divdi3> <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
c208: e1a03005 mov r3, r5 <== NOT EXECUTED
c20c: e1a01009 mov r1, r9 <== NOT EXECUTED
c210: e1a02006 mov r2, r6 <== 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);
c214: e1a07000 mov r7, r0 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
c218: e1a00008 mov r0, r8 <== NOT EXECUTED
c21c: eb004190 bl 1c864 <__moddi3> <== NOT EXECUTED
dev_t dev = dd->dev;
c220: e89a000c ldm sl, {r2, r3} <== NOT EXECUTED
args->bytes_moved = 0;
c224: e5845018 str r5, [r4, #24] <== NOT EXECUTED
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);
uint32_t blkofs = (uint32_t) (args->offset % block_size);
c228: e1a08000 mov r8, r0 <== NOT EXECUTED
dev_t dev = dd->dev;
c22c: e88d000c stm sp, {r2, r3} <== 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;
c230: e594900c ldr r9, [r4, #12] <== NOT EXECUTED
uint32_t count = args->count;
c234: e5945010 ldr r5, [r4, #16] <== NOT EXECUTED
c238: e28db008 add fp, sp, #8 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
c23c: ea000021 b c2c8 <rtems_blkdev_generic_write+0xf0> <== NOT EXECUTED
{
rtems_bdbuf_buffer *diskbuf;
uint32_t copy;
if ((blkofs == 0) && (count >= block_size))
c240: e1550006 cmp r5, r6 <== NOT EXECUTED
c244: 23580000 cmpcs r8, #0 <== NOT EXECUTED
c248: 1a000004 bne c260 <rtems_blkdev_generic_write+0x88> <== NOT EXECUTED
rc = rtems_bdbuf_get(dev, block, &diskbuf);
c24c: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
c250: e1a02007 mov r2, r7 <== NOT EXECUTED
c254: e1a0300b mov r3, fp <== NOT EXECUTED
c258: ebfffe82 bl bc68 <rtems_bdbuf_get> <== NOT EXECUTED
c25c: ea000003 b c270 <rtems_blkdev_generic_write+0x98> <== NOT EXECUTED
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
c260: e1a02007 mov r2, r7 <== NOT EXECUTED
c264: e1a0300b mov r3, fp <== NOT EXECUTED
c268: e89d0003 ldm sp, {r0, r1} <== NOT EXECUTED
c26c: ebfffeb0 bl bd34 <rtems_bdbuf_read> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
c270: e3500000 cmp r0, #0 <== NOT EXECUTED
break;
copy = block_size - blkofs;
c274: e068a006 rsb sl, r8, r6 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
c278: e1a01009 mov r1, r9 <== 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)
c27c: 1a000014 bne c2d4 <rtems_blkdev_generic_write+0xfc> <== NOT EXECUTED
break;
copy = block_size - blkofs;
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
c280: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
c284: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
else
rc = rtems_bdbuf_read(dev, block, &diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
copy = block_size - blkofs;
c288: e15a0005 cmp sl, r5 <== NOT EXECUTED
c28c: 21a0a005 movcs sl, r5 <== NOT EXECUTED
if (copy > count)
copy = count;
memcpy((char *)diskbuf->buffer + blkofs, buf, copy);
c290: e1a0200a mov r2, sl <== NOT EXECUTED
c294: e0800008 add r0, r0, r8 <== NOT EXECUTED
c298: eb0019f4 bl 12a70 <memcpy> <== NOT EXECUTED
args->bytes_moved += copy;
c29c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
c2a0: e083300a add r3, r3, sl <== NOT EXECUTED
c2a4: e5843018 str r3, [r4, #24] <== NOT EXECUTED
rc = rtems_bdbuf_release_modified(diskbuf);
c2a8: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
c2ac: ebfffa3e bl abac <rtems_bdbuf_release_modified> <== NOT EXECUTED
if (rc != RTEMS_SUCCESSFUL)
c2b0: e3500000 cmp r0, #0 <== NOT EXECUTED
c2b4: 1a000006 bne c2d4 <rtems_blkdev_generic_write+0xfc> <== NOT EXECUTED
break;
count -= copy;
buf += copy;
c2b8: e089900a add r9, r9, sl <== NOT EXECUTED
rc = rtems_bdbuf_release_modified(diskbuf);
if (rc != RTEMS_SUCCESSFUL)
break;
count -= copy;
c2bc: e06a5005 rsb r5, sl, r5 <== NOT EXECUTED
buf += copy;
blkofs = 0;
block++;
c2c0: e2877001 add r7, r7, #1 <== NOT EXECUTED
c2c4: e1a08000 mov r8, r0 <== NOT EXECUTED
uint32_t blkofs = (uint32_t) (args->offset % block_size);
dev_t dev = dd->dev;
args->bytes_moved = 0;
while (count > 0)
c2c8: e3550000 cmp r5, #0 <== NOT EXECUTED
c2cc: 1affffdb bne c240 <rtems_blkdev_generic_write+0x68> <== NOT EXECUTED
c2d0: e1a00005 mov r0, r5 <== NOT EXECUTED
blkofs = 0;
block++;
}
return rc;
}
c2d4: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
0000c028 <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)
c028: e59f3078 ldr r3, [pc, #120] ; c0a8 <rtems_blkdev_ioctl+0x80>
c02c: e1510003 cmp r1, r3
return RTEMS_SUCCESSFUL;
}
int
rtems_blkdev_ioctl(rtems_disk_device *dd, uint32_t req, void *argp)
{
c030: e52de004 push {lr} ; (str lr, [sp, #-4]!)
size_t *arg_size = argp;
int rc = 0;
switch (req)
c034: 0a00000d beq c070 <rtems_blkdev_ioctl+0x48>
c038: 8a000003 bhi c04c <rtems_blkdev_ioctl+0x24>
c03c: e2433001 sub r3, r3, #1
c040: e1510003 cmp r1, r3
c044: 1a000012 bne c094 <rtems_blkdev_ioctl+0x6c>
c048: ea000006 b c068 <rtems_blkdev_ioctl+0x40> <== NOT EXECUTED
c04c: e59f3058 ldr r3, [pc, #88] ; c0ac <rtems_blkdev_ioctl+0x84><== NOT EXECUTED
c050: e1510003 cmp r1, r3 <== NOT EXECUTED
c054: 0a00000a beq c084 <rtems_blkdev_ioctl+0x5c> <== NOT EXECUTED
c058: e2433107 sub r3, r3, #-1073741823 ; 0xc0000001 <== NOT EXECUTED
c05c: e1510003 cmp r1, r3 <== NOT EXECUTED
c060: 1a00000b bne c094 <rtems_blkdev_ioctl+0x6c> <== NOT EXECUTED
c064: ea000003 b c078 <rtems_blkdev_ioctl+0x50> <== NOT EXECUTED
{
case RTEMS_BLKIO_GETMEDIABLKSIZE:
*arg_size = dd->media_block_size;
c068: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED
c06c: ea000005 b c088 <rtems_blkdev_ioctl+0x60> <== NOT EXECUTED
break;
case RTEMS_BLKIO_GETBLKSIZE:
*arg_size = dd->block_size;
c070: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
c074: ea000003 b c088 <rtems_blkdev_ioctl+0x60> <== NOT EXECUTED
break;
case RTEMS_BLKIO_SETBLKSIZE:
dd->block_size = *arg_size;
c078: e5923000 ldr r3, [r2] <== NOT EXECUTED
c07c: e5803020 str r3, [r0, #32] <== NOT EXECUTED
c080: ea000001 b c08c <rtems_blkdev_ioctl+0x64> <== NOT EXECUTED
break;
case RTEMS_BLKIO_GETSIZE:
*arg_size = dd->size;
c084: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
c088: e5823000 str r3, [r2] <== NOT EXECUTED
c08c: e3a00000 mov r0, #0 <== NOT EXECUTED
break;
c090: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
default:
errno = EINVAL;
c094: eb001867 bl 12238 <__errno>
c098: e3a03016 mov r3, #22
c09c: e5803000 str r3, [r0]
c0a0: e3e00000 mvn r0, #0
rc = -1;
break;
}
return rc;
}
c0a4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001868 <rtems_bsp_cmdline_get_param>:
size_t length
)
{
const char *p;
if ( !name )
1868: e3500000 cmp r0, #0
const char *rtems_bsp_cmdline_get_param(
const char *name,
char *value,
size_t length
)
{
186c: e92d4070 push {r4, r5, r6, lr}
1870: e1a04001 mov r4, r1
1874: e1a05002 mov r5, r2
const char *p;
if ( !name )
1878: 0a00001c beq 18f0 <rtems_bsp_cmdline_get_param+0x88>
return NULL;
if ( !value )
187c: e3510000 cmp r1, #0
1880: 0a00001b beq 18f4 <rtems_bsp_cmdline_get_param+0x8c>
return NULL;
if ( !length )
1884: e3520000 cmp r2, #0
1888: 0a000018 beq 18f0 <rtems_bsp_cmdline_get_param+0x88>
return NULL;
value[0] = '\0';
188c: e3a06000 mov r6, #0
1890: e5c16000 strb r6, [r1]
p = rtems_bsp_cmdline_get_param_raw( name );
1894: eb000018 bl 18fc <rtems_bsp_cmdline_get_param_raw>
if ( !p )
1898: e3500000 cmp r0, #0
189c: 0a000013 beq 18f0 <rtems_bsp_cmdline_get_param+0x88>
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
18a0: e2455001 sub r5, r5, #1
value[0] = '\0';
p = rtems_bsp_cmdline_get_param_raw( name );
if ( !p )
18a4: e1a03006 mov r3, r6
if ( *p == '\"' ) {
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
break;
value[i++] = *p++;
value[i] = '\0';
18a8: e1a01006 mov r1, r6
18ac: ea000009 b 18d8 <rtems_bsp_cmdline_get_param+0x70>
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
18b0: e3520022 cmp r2, #34 ; 0x22
quotes++;
18b4: 02866001 addeq r6, r6, #1
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
if ( *p == '\"' ) {
18b8: 0a000003 beq 18cc <rtems_bsp_cmdline_get_param+0x64>
quotes++;
} else if ( ((quotes % 2) == 0) && *p == ' ' )
18bc: e3160001 tst r6, #1
18c0: 1a000001 bne 18cc <rtems_bsp_cmdline_get_param+0x64>
18c4: e3520020 cmp r2, #32
18c8: 0a000009 beq 18f4 <rtems_bsp_cmdline_get_param+0x8c>
break;
value[i++] = *p++;
18cc: e7c42003 strb r2, [r4, r3]
18d0: e2833001 add r3, r3, #1
value[i] = '\0';
18d4: e7c41003 strb r1, [r4, r3]
int i;
int quotes;
const char *p = start;
quotes=0;
for (i=0 ; *p && i<length-1; ) {
18d8: e7d02003 ldrb r2, [r0, r3]
18dc: e3520000 cmp r2, #0
18e0: 0a000003 beq 18f4 <rtems_bsp_cmdline_get_param+0x8c>
18e4: e1530005 cmp r3, r5
18e8: 3afffff0 bcc 18b0 <rtems_bsp_cmdline_get_param+0x48>
18ec: ea000000 b 18f4 <rtems_bsp_cmdline_get_param+0x8c> <== NOT EXECUTED
18f0: e3a04000 mov r4, #0
return NULL;
copy_string( p, value, length );
return value;
}
18f4: e1a00004 mov r0, r4
18f8: e8bd8070 pop {r4, r5, r6, pc}
0000247c <rtems_cpu_usage_report_with_plugin>:
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
247c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
2480: e251a000 subs sl, r1, #0
void rtems_cpu_usage_report_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
2484: e24dd040 sub sp, sp, #64 ; 0x40
2488: e1a08000 mov r8, r0
Timestamp_Control uptime, total, ran;
#else
uint32_t total_units = 0;
#endif
if ( !print )
248c: 0a000059 beq 25f8 <rtems_cpu_usage_report_with_plugin+0x17c>
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
2490: e28d4030 add r4, sp, #48 ; 0x30
2494: e1a00004 mov r0, r4
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2498: e28d5028 add r5, sp, #40 ; 0x28
* When not using nanosecond CPU usage resolution, we have to count
* the number of "ticks" we gave credit for to give the user a rough
* guideline as to what each number means proportionally.
*/
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
_TOD_Get_uptime( &uptime );
249c: eb0014f3 bl 7870 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
24a0: e1a01004 mov r1, r4
24a4: e1a02005 mov r2, r5
24a8: e59f0150 ldr r0, [pc, #336] ; 2600 <rtems_cpu_usage_report_with_plugin+0x184>
24ac: eb001e04 bl 9cc4 <_Timespec_Subtract>
}
}
}
#endif
(*print)(
24b0: e1a00008 mov r0, r8
24b4: e59f1148 ldr r1, [pc, #328] ; 2604 <rtems_cpu_usage_report_with_plugin+0x188>
24b8: e1a0e00f mov lr, pc
24bc: e12fff1a bx sl
24c0: e59f4140 ldr r4, [pc, #320] ; 2608 <rtems_cpu_usage_report_with_plugin+0x18c>
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
24c4: e59fb140 ldr fp, [pc, #320] ; 260c <rtems_cpu_usage_report_with_plugin+0x190>
);
for ( api_index = 1 ;
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
24c8: e5943004 ldr r3, [r4, #4]
24cc: e3530000 cmp r3, #0
24d0: 0a00003b beq 25c4 <rtems_cpu_usage_report_with_plugin+0x148>
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
24d4: e5936004 ldr r6, [r3, #4]
if ( information ) {
24d8: e3560000 cmp r6, #0
24dc: 13a07001 movne r7, #1
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
Timestamp_Control used;
_Timestamp_Subtract(
24e0: 128d9018 addne r9, sp, #24
24e4: 11a05004 movne r5, r4
api_index <= OBJECTS_APIS_LAST ;
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
24e8: 1a00002f bne 25ac <rtems_cpu_usage_report_with_plugin+0x130>
24ec: ea000034 b 25c4 <rtems_cpu_usage_report_with_plugin+0x148> <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) {
the_thread = (Thread_Control *)information->local_table[ i ];
24f0: e596301c ldr r3, [r6, #28]
24f4: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
24f8: e3540000 cmp r4, #0
24fc: 0a000029 beq 25a8 <rtems_cpu_usage_report_with_plugin+0x12c>
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2500: e5940008 ldr r0, [r4, #8]
2504: eb001041 bl 6610 <rtems_object_get_name>
(*print)(
2508: e28d3008 add r3, sp, #8
250c: e5942008 ldr r2, [r4, #8]
2510: e1a00008 mov r0, r8
2514: e59f10f4 ldr r1, [pc, #244] ; 2610 <rtems_cpu_usage_report_with_plugin+0x194>
2518: e1a0e00f mov lr, pc
251c: e12fff1a bx sl
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
/*
* If this is the currently executing thread, account for time
* since the last context switch.
*/
ran = the_thread->cpu_time_used;
2520: e2843084 add r3, r4, #132 ; 0x84
2524: e893000c ldm r3, {r2, r3}
2528: e58d2020 str r2, [sp, #32]
252c: e58d3024 str r3, [sp, #36] ; 0x24
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
2530: e59b2000 ldr r2, [fp]
2534: e5943008 ldr r3, [r4, #8]
2538: e5922008 ldr r2, [r2, #8]
253c: e1520003 cmp r2, r3
2540: 1a000006 bne 2560 <rtems_cpu_usage_report_with_plugin+0xe4>
Timestamp_Control used;
_Timestamp_Subtract(
2544: e59f00c8 ldr r0, [pc, #200] ; 2614 <rtems_cpu_usage_report_with_plugin+0x198>
2548: e28d1030 add r1, sp, #48 ; 0x30
254c: e1a02009 mov r2, r9
2550: eb001ddb bl 9cc4 <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used
);
_Timestamp_Add_to( &ran, &used );
2554: e28d0020 add r0, sp, #32
2558: e1a01009 mov r1, r9
255c: eb001d9d bl 9bd8 <_Timespec_Add_to>
};
_Timestamp_Divide( &ran, &total, &ival, &fval );
2560: e28d203c add r2, sp, #60 ; 0x3c
2564: e28d3038 add r3, sp, #56 ; 0x38
2568: e28d0020 add r0, sp, #32
256c: e28d1028 add r1, sp, #40 ; 0x28
2570: eb001dad bl 9c2c <_Timespec_Divide>
/*
* Print the information
*/
(*print)( context,
2574: e3a01ffa mov r1, #1000 ; 0x3e8
2578: e59d0024 ldr r0, [sp, #36] ; 0x24
257c: eb006a78 bl 1cf64 <__aeabi_uidiv>
2580: e59d203c ldr r2, [sp, #60] ; 0x3c
2584: e58d2000 str r2, [sp]
2588: e59d2038 ldr r2, [sp, #56] ; 0x38
258c: e1a03000 mov r3, r0
2590: e58d2004 str r2, [sp, #4]
2594: e1a00008 mov r0, r8
2598: e59f1078 ldr r1, [pc, #120] ; 2618 <rtems_cpu_usage_report_with_plugin+0x19c>
259c: e59d2020 ldr r2, [sp, #32]
25a0: e1a0e00f mov lr, pc
25a4: e12fff1a bx sl
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
25a8: e2877001 add r7, r7, #1
25ac: e1d631b0 ldrh r3, [r6, #16]
25b0: e1570003 cmp r7, r3
the_thread = (Thread_Control *)information->local_table[ i ];
if ( !the_thread )
continue;
rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
25b4: e3a0100d mov r1, #13
25b8: e28d2008 add r2, sp, #8
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
25bc: 9affffcb bls 24f0 <rtems_cpu_usage_report_with_plugin+0x74>
25c0: e1a04005 mov r4, r5
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
25c4: e59f3050 ldr r3, [pc, #80] ; 261c <rtems_cpu_usage_report_with_plugin+0x1a0>
api_index++ ) {
if ( !_Objects_Information_table[ api_index ] )
continue;
information = _Objects_Information_table[ api_index ][ 1 ];
if ( information ) {
for ( i=1 ; i <= information->maximum ; i++ ) {
25c8: e2844004 add r4, r4, #4
" ID | NAME | TICKS | PERCENT\n"
#endif
"------------+----------------------------------------+---------------+---------\n"
);
for ( api_index = 1 ;
25cc: e1540003 cmp r4, r3
25d0: 1affffbc bne 24c8 <rtems_cpu_usage_report_with_plugin+0x4c>
}
}
}
#ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__
(*print)(
25d4: e3a01ffa mov r1, #1000 ; 0x3e8
25d8: e59d002c ldr r0, [sp, #44] ; 0x2c
25dc: eb006a60 bl 1cf64 <__aeabi_uidiv>
25e0: e59f1038 ldr r1, [pc, #56] ; 2620 <rtems_cpu_usage_report_with_plugin+0x1a4>
25e4: e1a03000 mov r3, r0
25e8: e59d2028 ldr r2, [sp, #40] ; 0x28
25ec: e1a00008 mov r0, r8
25f0: e1a0e00f mov lr, pc
25f4: e12fff1a bx sl
"-------------------------------------------------------------------------------\n",
_Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset,
total_units
);
#endif
}
25f8: e28dd040 add sp, sp, #64 ; 0x40
25fc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000e5b0 <rtems_deviceio_errno>:
{ 0, 0, 0 },
};
int
rtems_deviceio_errno(rtems_status_code code)
{
e5b0: e92d4010 push {r4, lr} <== NOT EXECUTED
e5b4: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc;
if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
e5b8: e59f0018 ldr r0, [pc, #24] ; e5d8 <rtems_deviceio_errno+0x28><== NOT EXECUTED
e5bc: eb000006 bl e5dc <rtems_assoc_remote_by_local> <== NOT EXECUTED
e5c0: e2504000 subs r4, r0, #0 <== NOT EXECUTED
e5c4: 0a000001 beq e5d0 <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{
errno = rc;
e5c8: eb000045 bl e6e4 <__errno> <== NOT EXECUTED
e5cc: e5804000 str r4, [r0] <== NOT EXECUTED
return -1;
}
return -1;
}
e5d0: e3e00000 mvn r0, #0 <== NOT EXECUTED
e5d4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00001ef8 <rtems_disk_delete>:
}
}
rtems_status_code
rtems_disk_delete(dev_t dev)
{
1ef8: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
1efc: e1a05000 mov r5, r0
1f00: e1a06001 mov r6, r1
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_disk_device *dd = NULL;
sc = disk_lock();
1f04: ebffff91 bl 1d50 <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
1f08: e2504000 subs r4, r0, #0
1f0c: 1a000057 bne 2070 <rtems_disk_delete+0x178>
return sc;
}
dd = get_disk_entry(dev, true);
1f10: e1a00005 mov r0, r5
1f14: e1a01006 mov r1, r6
1f18: e3a02001 mov r2, #1
1f1c: ebffff12 bl 1b6c <get_disk_entry>
if (dd == NULL) {
1f20: e2503000 subs r3, r0, #0
1f24: 1a000002 bne 1f34 <rtems_disk_delete+0x3c>
disk_unlock();
1f28: ebffff94 bl 1d80 <disk_unlock> <== NOT EXECUTED
1f2c: e3a04004 mov r4, #4 <== NOT EXECUTED
return RTEMS_INVALID_ID;
1f30: ea00004e b 2070 <rtems_disk_delete+0x178> <== NOT EXECUTED
}
dd->deleted = true;
1f34: e3a0b001 mov fp, #1
1f38: e5c3b030 strb fp, [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;
1f3c: e5935008 ldr r5, [r3, #8]
rtems_device_major_number major = 0;
rtems_device_minor_number minor = 0;
if (physical_disk->deleted) {
1f40: e5d52030 ldrb r2, [r5, #48] ; 0x30
1f44: e3520000 cmp r2, #0
1f48: 0a00003a beq 2038 <rtems_disk_delete+0x140>
dev_t dev = physical_disk->dev;
1f4c: e895000c ldm r5, {r2, r3}
1f50: e98d000c stmib sp, {r2, r3}
1f54: e1a08004 mov r8, r4
1f58: e1a07004 mov r7, r4
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
1f5c: e59fa114 ldr sl, [pc, #276] ; 2078 <rtems_disk_delete+0x180>
1f60: ea000024 b 1ff8 <rtems_disk_delete+0x100>
rtems_disk_device_table *dtab = disktab + major;
1f64: e59a9004 ldr r9, [sl, #4]
1f68: e3a06000 mov r6, #0
1f6c: e0899187 add r9, r9, r7, lsl #3
1f70: ea00001c b 1fe8 <rtems_disk_delete+0xf0>
for (minor = 0; minor < dtab->size; ++minor) {
rtems_disk_device *dd = dtab->minor [minor];
1f74: e5993000 ldr r3, [r9]
1f78: e7930106 ldr r0, [r3, r6, lsl #2]
1f7c: e1a0c106 lsl ip, r6, #2
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
1f80: 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];
1f84: e58dc000 str ip, [sp]
if (dd != NULL && dd->phys_dev->dev == dev && dd != physical_disk) {
1f88: 0a000015 beq 1fe4 <rtems_disk_delete+0xec>
1f8c: e5901008 ldr r1, [r0, #8]
1f90: e59d2004 ldr r2, [sp, #4]
1f94: e591c000 ldr ip, [r1]
1f98: e050e005 subs lr, r0, r5
1f9c: 13a0e001 movne lr, #1
1fa0: e15c0002 cmp ip, r2
1fa4: e3a02000 mov r2, #0
1fa8: 1a000003 bne 1fbc <rtems_disk_delete+0xc4>
1fac: e5911004 ldr r1, [r1, #4]
1fb0: e59dc008 ldr ip, [sp, #8]
1fb4: e151000c cmp r1, ip
1fb8: 03a02001 moveq r2, #1
1fbc: e11e0002 tst lr, r2
1fc0: 0a000007 beq 1fe4 <rtems_disk_delete+0xec>
if (dd->uses == 0) {
1fc4: e5902014 ldr r2, [r0, #20]
1fc8: e3520000 cmp r2, #0
++deleted_count;
dtab->minor [minor] = NULL;
free_disk_device(dd);
} else {
dd->deleted = true;
1fcc: 11a0200b movne r2, fp
1fd0: 15c02030 strbne r2, [r0, #48] ; 0x30
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;
1fd4: 059d1000 ldreq r1, [sp]
1fd8: 07832001 streq r2, [r3, r1]
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;
1fdc: 02888001 addeq r8, r8, #1
dtab->minor [minor] = NULL;
free_disk_device(dd);
1fe0: 0bfffefe bleq 1be0 <free_disk_device>
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) {
1fe4: e2866001 add r6, r6, #1
1fe8: e5993004 ldr r3, [r9, #4]
1fec: e1560003 cmp r6, r3
1ff0: 3affffdf bcc 1f74 <rtems_disk_delete+0x7c>
if (physical_disk->deleted) {
dev_t dev = physical_disk->dev;
unsigned deleted_count = 0;
for (major = 0; major < disktab_size; ++major) {
1ff4: e2877001 add r7, r7, #1
1ff8: e59a3000 ldr r3, [sl]
1ffc: e1570003 cmp r7, r3
2000: 3affffd7 bcc 1f64 <rtems_disk_delete+0x6c>
}
}
}
}
physical_disk->uses -= deleted_count;
2004: e5953014 ldr r3, [r5, #20]
2008: e0688003 rsb r8, r8, r3
if (physical_disk->uses == 0) {
200c: e3580000 cmp r8, #0
}
}
}
}
physical_disk->uses -= deleted_count;
2010: e5858014 str r8, [r5, #20]
if (physical_disk->uses == 0) {
2014: 1a000014 bne 206c <rtems_disk_delete+0x174>
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
disktab [major].minor [minor] = NULL;
2018: e59f3058 ldr r3, [pc, #88] ; 2078 <rtems_disk_delete+0x180>
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
201c: e5952000 ldr r2, [r5]
disktab [major].minor [minor] = NULL;
2020: e5933004 ldr r3, [r3, #4]
2024: e7933182 ldr r3, [r3, r2, lsl #3]
}
}
physical_disk->uses -= deleted_count;
if (physical_disk->uses == 0) {
rtems_filesystem_split_dev_t(physical_disk->dev, major, minor);
2028: e5952004 ldr r2, [r5, #4]
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
202c: e1a00005 mov r0, r5
}
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;
2030: e7838102 str r8, [r3, r2, lsl #2]
2034: ea00000b b 2068 <rtems_disk_delete+0x170>
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
2038: e5932014 ldr r2, [r3, #20]
203c: e3520000 cmp r2, #0
2040: 1a000009 bne 206c <rtems_disk_delete+0x174>
--physical_disk->uses;
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2044: e59f202c ldr r2, [pc, #44] ; 2078 <rtems_disk_delete+0x180>
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);
2048: e593c000 ldr ip, [r3]
disktab [major].minor [minor] = NULL;
204c: 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;
2050: e5951014 ldr r1, [r5, #20]
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2054: 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);
2058: e5933004 ldr r3, [r3, #4]
disktab [major].minor [minor] = NULL;
free_disk_device(physical_disk);
}
} else {
if (disk_to_remove->uses == 0) {
--physical_disk->uses;
205c: e2411001 sub r1, r1, #1
2060: e5851014 str r1, [r5, #20]
rtems_filesystem_split_dev_t(disk_to_remove->dev, major, minor);
disktab [major].minor [minor] = NULL;
2064: e7824103 str r4, [r2, r3, lsl #2]
free_disk_device(disk_to_remove);
2068: ebfffedc bl 1be0 <free_disk_device>
}
dd->deleted = true;
rtems_disk_cleanup(dd);
disk_unlock();
206c: ebffff43 bl 1d80 <disk_unlock>
return RTEMS_SUCCESSFUL;
}
2070: e1a00004 mov r0, r4
2074: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00001cb0 <rtems_disk_io_initialize>:
}
}
rtems_status_code
rtems_disk_io_initialize(void)
{
1cb0: e92d4031 push {r0, r4, r5, lr}
rtems_status_code sc = RTEMS_SUCCESSFUL;
rtems_device_major_number size = DISKTAB_INITIAL_SIZE;
if (disktab_size > 0) {
1cb4: e59f408c ldr r4, [pc, #140] ; 1d48 <rtems_disk_io_initialize+0x98>
1cb8: e5945000 ldr r5, [r4]
1cbc: e3550000 cmp r5, #0
1cc0: 13a00000 movne r0, #0
1cc4: 1a00001e bne 1d44 <rtems_disk_io_initialize+0x94>
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
1cc8: e3a00008 mov r0, #8
1ccc: e1a01000 mov r1, r0
1cd0: eb0003b1 bl 2b9c <calloc>
if (disktab == NULL) {
1cd4: e3500000 cmp r0, #0
if (disktab_size > 0) {
return RTEMS_SUCCESSFUL;
}
disktab = calloc(size, sizeof(rtems_disk_device_table));
1cd8: e5840004 str r0, [r4, #4]
if (disktab == NULL) {
1cdc: 0280001a addeq r0, r0, #26
1ce0: 0a000017 beq 1d44 <rtems_disk_io_initialize+0x94>
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
sc = rtems_semaphore_create(
1ce4: e284c008 add ip, r4, #8
1ce8: e1a03005 mov r3, r5
1cec: e59f0058 ldr r0, [pc, #88] ; 1d4c <rtems_disk_io_initialize+0x9c>
1cf0: e3a01001 mov r1, #1
1cf4: e3a02010 mov r2, #16
1cf8: e58dc000 str ip, [sp]
disktab = calloc(size, sizeof(rtems_disk_device_table));
if (disktab == NULL) {
return RTEMS_NO_MEMORY;
}
diskdevs_protected = false;
1cfc: e5c4500c strb r5, [r4, #12]
sc = rtems_semaphore_create(
1d00: eb00110d bl 613c <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) {
1d04: e3500000 cmp r0, #0
1d08: 0a000003 beq 1d1c <rtems_disk_io_initialize+0x6c>
free(disktab);
1d0c: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
1d10: eb000429 bl 2dbc <free> <== NOT EXECUTED
1d14: e3a0001a mov r0, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
1d18: ea000009 b 1d44 <rtems_disk_io_initialize+0x94> <== NOT EXECUTED
}
sc = rtems_bdbuf_init();
1d1c: eb00218d bl a358 <rtems_bdbuf_init>
if (sc != RTEMS_SUCCESSFUL) {
1d20: e3500000 cmp r0, #0
free(disktab);
return RTEMS_UNSATISFIED;
}
disktab_size = size;
1d24: 03a03008 moveq r3, #8
1d28: 05843000 streq r3, [r4]
return RTEMS_NO_MEMORY;
}
sc = rtems_bdbuf_init();
if (sc != RTEMS_SUCCESSFUL) {
1d2c: 0a000004 beq 1d44 <rtems_disk_io_initialize+0x94>
rtems_semaphore_delete(diskdevs_mutex);
1d30: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
1d34: eb00116b bl 62e8 <rtems_semaphore_delete> <== NOT EXECUTED
free(disktab);
1d38: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
1d3c: eb00041e bl 2dbc <free> <== NOT EXECUTED
1d40: e3a0000d mov r0, #13 <== NOT EXECUTED
}
disktab_size = size;
return RTEMS_SUCCESSFUL;
}
1d44: e8bd8038 pop {r3, r4, r5, pc}
00001db0 <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) {
1db0: e3700001 cmn r0, #1
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_next(dev_t dev)
{
1db4: 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) {
1db8: 1a000003 bne 1dcc <rtems_disk_next+0x1c>
1dbc: e3710001 cmn r1, #1
1dc0: 03a04000 moveq r4, #0
1dc4: 01a05004 moveq r5, r4
1dc8: 0a000005 beq 1de4 <rtems_disk_next+0x34>
rtems_filesystem_split_dev_t(dev, major, minor);
/* If minor wraps around */
if ((minor + 1) < minor) {
1dcc: e2914001 adds r4, r1, #1
1dd0: 31a05000 movcc r5, r0
1dd4: 3a000002 bcc 1de4 <rtems_disk_next+0x34>
/* If major wraps around */
if ((major + 1) < major) {
1dd8: e2905001 adds r5, r0, #1 <== NOT EXECUTED
1ddc: 2a000027 bcs 1e80 <rtems_disk_next+0xd0> <== NOT EXECUTED
1de0: e3a04000 mov r4, #0 <== NOT EXECUTED
} else {
++minor;
}
}
sc = disk_lock();
1de4: ebffffd9 bl 1d50 <disk_lock>
if (sc != RTEMS_SUCCESSFUL) {
1de8: e2506000 subs r6, r0, #0
1dec: 1a000023 bne 1e80 <rtems_disk_next+0xd0>
return NULL;
}
if (major >= disktab_size) {
1df0: e59f3090 ldr r3, [pc, #144] ; 1e88 <rtems_disk_next+0xd8>
1df4: e5931000 ldr r1, [r3]
1df8: e1550001 cmp r5, r1
disk_unlock();
return NULL;
}
dtab = disktab + major;
1dfc: 35932004 ldrcc r2, [r3, #4]
1e00: 30826185 addcc r6, r2, r5, lsl #3
sc = disk_lock();
if (sc != RTEMS_SUCCESSFUL) {
return NULL;
}
if (major >= disktab_size) {
1e04: 3a000002 bcc 1e14 <rtems_disk_next+0x64>
disk_unlock();
1e08: ebffffdc bl 1d80 <disk_unlock> <== NOT EXECUTED
1e0c: e1a00006 mov r0, r6 <== NOT EXECUTED
return NULL;
1e10: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
1e14: e5963000 ldr r3, [r6]
1e18: e3530000 cmp r3, #0
1e1c: 0a000002 beq 1e2c <rtems_disk_next+0x7c>
1e20: e5960004 ldr r0, [r6, #4]
1e24: e1540000 cmp r4, r0
1e28: 3a000008 bcc 1e50 <rtems_disk_next+0xa0>
minor = 0;
++major;
1e2c: e2855001 add r5, r5, #1
if (major >= disktab_size) {
1e30: e1550001 cmp r5, r1
1e34: 3a000002 bcc 1e44 <rtems_disk_next+0x94>
disk_unlock();
1e38: ebffffd0 bl 1d80 <disk_unlock>
1e3c: e3a00000 mov r0, #0
return NULL;
1e40: e8bd80f0 pop {r4, r5, r6, r7, pc}
}
dtab = disktab + major;
1e44: e0826185 add r6, r2, r5, lsl #3
1e48: e3a04000 mov r4, #0
return NULL;
}
dtab = disktab + major;
while (true) {
if (dtab->minor == NULL || minor >= dtab->size) {
1e4c: eafffff0 b 1e14 <rtems_disk_next+0x64>
disk_unlock();
return NULL;
}
dtab = disktab + major;
} else if (dtab->minor [minor] == NULL) {
1e50: e7933104 ldr r3, [r3, r4, lsl #2]
1e54: e3530000 cmp r3, #0
1e58: e1a07104 lsl r7, r4, #2
++minor;
1e5c: 02844001 addeq r4, r4, #1
1e60: 0affffeb beq 1e14 <rtems_disk_next+0x64>
} else {
++dtab->minor [minor]->uses;
1e64: e5932014 ldr r2, [r3, #20]
1e68: e2822001 add r2, r2, #1
1e6c: e5832014 str r2, [r3, #20]
disk_unlock();
1e70: ebffffc2 bl 1d80 <disk_unlock>
return dtab->minor [minor];
1e74: e5963000 ldr r3, [r6]
1e78: e7930007 ldr r0, [r3, r7]
1e7c: e8bd80f0 pop {r4, r5, r6, r7, pc}
1e80: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
}
1e84: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00001e8c <rtems_disk_obtain>:
return RTEMS_SUCCESSFUL;
}
rtems_disk_device *
rtems_disk_obtain(dev_t dev)
{
1e8c: e92d4070 push {r4, r5, r6, lr}
1e90: e1a05000 mov r5, r0
1e94: e1a06001 mov r6, r1
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
1e98: e10f4000 mrs r4, CPSR
1e9c: e3843080 orr r3, r4, #128 ; 0x80
1ea0: 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) {
1ea4: e59f3048 ldr r3, [pc, #72] ; 1ef4 <rtems_disk_obtain+0x68>
1ea8: e5d3200c ldrb r2, [r3, #12]
1eac: e21220ff ands r2, r2, #255 ; 0xff
1eb0: 1a000003 bne 1ec4 <rtems_disk_obtain+0x38>
/* Frequent and quickest case */
dd = get_disk_entry(dev, false);
1eb4: ebffff2c bl 1b6c <get_disk_entry>
1eb8: e1a05000 mov r5, r0
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
1ebc: e129f004 msr CPSR_fc, r4
1ec0: ea000009 b 1eec <rtems_disk_obtain+0x60>
1ec4: e129f004 msr CPSR_fc, r4 <== NOT EXECUTED
rtems_interrupt_enable(level);
} else {
rtems_interrupt_enable(level);
sc = disk_lock();
1ec8: ebffffa0 bl 1d50 <disk_lock> <== NOT EXECUTED
if (sc == RTEMS_SUCCESSFUL) {
1ecc: e2502000 subs r2, r0, #0 <== NOT EXECUTED
1ed0: 13a05000 movne r5, #0 <== NOT EXECUTED
1ed4: 1a000004 bne 1eec <rtems_disk_obtain+0x60> <== NOT EXECUTED
dd = get_disk_entry(dev, false);
1ed8: e1a00005 mov r0, r5 <== NOT EXECUTED
1edc: e1a01006 mov r1, r6 <== NOT EXECUTED
1ee0: ebffff21 bl 1b6c <get_disk_entry> <== NOT EXECUTED
1ee4: e1a05000 mov r5, r0 <== NOT EXECUTED
disk_unlock();
1ee8: ebffffa4 bl 1d80 <disk_unlock> <== NOT EXECUTED
}
}
return dd;
}
1eec: e1a00005 mov r0, r5
1ef0: e8bd8070 pop {r4, r5, r6, pc}
0001d2e8 <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,
1d2e8: e59f1008 ldr r1, [pc, #8] ; 1d2f8 <rtems_dosfs_initialize+0x10><== NOT EXECUTED
1d2ec: e59f2008 ldr r2, [pc, #8] ; 1d2fc <rtems_dosfs_initialize+0x14><== NOT EXECUTED
1d2f0: e59f3008 ldr r3, [pc, #8] ; 1d300 <rtems_dosfs_initialize+0x18><== NOT EXECUTED
1d2f4: ea000002 b 1d304 <msdos_initialize_support> <== NOT EXECUTED
00006680 <rtems_error>:
int rtems_error(
rtems_error_code_t error_flag,
const char *printf_format,
...
)
{
6680: e92d000e push {r1, r2, r3} <== NOT EXECUTED
6684: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
6688: e28d300c add r3, sp, #12 <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
668c: e1a02003 mov r2, r3 <== NOT EXECUTED
6690: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
)
{
va_list arglist;
int chars_written;
va_start(arglist, printf_format);
6694: e58d3000 str r3, [sp] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6698: ebffff84 bl 64b0 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
return chars_written;
}
669c: e8bd4008 pop {r3, lr} <== NOT EXECUTED
66a0: e28dd00c add sp, sp, #12 <== NOT EXECUTED
66a4: e12fff1e bx lr <== NOT EXECUTED
00001e58 <rtems_filesystem_evaluate_path>:
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1e58: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr}
int i = 0;
1e5c: e3a0c000 mov ip, #0
/*
* Verify Input parameters.
*/
if ( !pathname )
1e60: e2505000 subs r5, r0, #0
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
int i = 0;
1e64: e58dc004 str ip, [sp, #4]
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1e68: e1a06001 mov r6, r1
1e6c: e1a04002 mov r4, r2
1e70: e1a07003 mov r7, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
1e74: 1a000002 bne 1e84 <rtems_filesystem_evaluate_path+0x2c>
rtems_set_errno_and_return_minus_one( EFAULT );
1e78: eb003219 bl e6e4 <__errno> <== NOT EXECUTED
1e7c: e3a0300e mov r3, #14 <== NOT EXECUTED
1e80: ea000003 b 1e94 <rtems_filesystem_evaluate_path+0x3c> <== NOT EXECUTED
if ( !pathloc )
1e84: e3530000 cmp r3, #0
1e88: 1a000004 bne 1ea0 <rtems_filesystem_evaluate_path+0x48>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
1e8c: eb003214 bl e6e4 <__errno> <== NOT EXECUTED
1e90: e3a03005 mov r3, #5 <== NOT EXECUTED
1e94: e5803000 str r3, [r0] <== NOT EXECUTED
1e98: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e9c: ea00000a b 1ecc <rtems_filesystem_evaluate_path+0x74> <== NOT EXECUTED
/*
* Evaluate the path using the optable evalpath.
*/
rtems_filesystem_get_start_loc( pathname, &i, pathloc );
1ea0: e1a02003 mov r2, r3
1ea4: e28d1004 add r1, sp, #4
1ea8: eb0003a6 bl 2d48 <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],
1eac: e59d0004 ldr r0, [sp, #4]
1eb0: e59dc01c ldr ip, [sp, #28]
1eb4: e0601006 rsb r1, r0, r6
1eb8: e1a02004 mov r2, r4
1ebc: e0850000 add r0, r5, r0
1ec0: e1a03007 mov r3, r7
1ec4: e58dc000 str ip, [sp]
1ec8: ebffffaa bl 1d78 <rtems_filesystem_evaluate_relative_path>
pathnamelen - i,
flags,
pathloc,
follow_link );
}
1ecc: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc}
00001d78 <rtems_filesystem_evaluate_relative_path>:
/*
* Verify Input parameters.
*/
if ( !pathname )
1d78: e3500000 cmp r0, #0
size_t pathnamelen,
int flags,
rtems_filesystem_location_info_t *pathloc,
int follow_link
)
{
1d7c: e92d4030 push {r4, r5, lr}
1d80: e1a05002 mov r5, r2
1d84: e1a04003 mov r4, r3
/*
* Verify Input parameters.
*/
if ( !pathname )
1d88: 1a000002 bne 1d98 <rtems_filesystem_evaluate_relative_path+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
1d8c: eb003254 bl e6e4 <__errno> <== NOT EXECUTED
1d90: e3a0300e mov r3, #14 <== NOT EXECUTED
1d94: ea000027 b 1e38 <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc )
1d98: e3530000 cmp r3, #0
1d9c: 1a000002 bne 1dac <rtems_filesystem_evaluate_relative_path+0x34>
rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
1da0: eb00324f bl e6e4 <__errno> <== NOT EXECUTED
1da4: e3a03005 mov r3, #5 <== NOT EXECUTED
1da8: ea000022 b 1e38 <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
1dac: e593c00c ldr ip, [r3, #12]
1db0: e59cc000 ldr ip, [ip]
1db4: e35c0000 cmp ip, #0
1db8: 0a00001c beq 1e30 <rtems_filesystem_evaluate_relative_path+0xb8>
rtems_set_errno_and_return_minus_one( ENOTSUP );
result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
1dbc: e1a0e00f mov lr, pc
1dc0: e12fff1c bx ip
/*
* Get the Node type and determine if you need to follow the link or
* not.
*/
if ( (result == 0) && follow_link ) {
1dc4: e59d200c ldr r2, [sp, #12]
1dc8: e2703001 rsbs r3, r0, #1
1dcc: 33a03000 movcc r3, #0
1dd0: e3520000 cmp r2, #0
1dd4: 03a03000 moveq r3, #0
1dd8: e3530000 cmp r3, #0
1ddc: 08bd8030 popeq {r4, r5, pc}
if ( !pathloc->ops->node_type_h ){
1de0: e594200c ldr r2, [r4, #12]
1de4: e5923010 ldr r3, [r2, #16]
1de8: e3530000 cmp r3, #0
1dec: 0a00000a beq 1e1c <rtems_filesystem_evaluate_relative_path+0xa4>
rtems_filesystem_freenode( pathloc );
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
type = (*pathloc->ops->node_type_h)( pathloc );
1df0: e1a00004 mov r0, r4
1df4: e1a0e00f mov lr, pc
1df8: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1dfc: e2400003 sub r0, r0, #3
1e00: e3500001 cmp r0, #1
1e04: 83a00000 movhi r0, #0
1e08: 88bd8030 pophi {r4, r5, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) {
if ( !pathloc->ops->eval_link_h ){
1e0c: e594200c ldr r2, [r4, #12]
1e10: e5923034 ldr r3, [r2, #52] ; 0x34
1e14: e3530000 cmp r3, #0
1e18: 1a000009 bne 1e44 <rtems_filesystem_evaluate_relative_path+0xcc>
rtems_filesystem_freenode( pathloc );
1e1c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1e20: e3530000 cmp r3, #0 <== NOT EXECUTED
1e24: 11a00004 movne r0, r4 <== NOT EXECUTED
1e28: 11a0e00f movne lr, pc <== NOT EXECUTED
1e2c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1e30: eb00322b bl e6e4 <__errno> <== NOT EXECUTED
1e34: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1e38: e5803000 str r3, [r0] <== NOT EXECUTED
1e3c: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e40: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
* 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 );
1e44: e1a00004 mov r0, r4
1e48: e1a01005 mov r1, r5
1e4c: e1a0e00f mov lr, pc
1e50: e12fff13 bx r3
}
}
return result;
}
1e54: e8bd8030 pop {r4, r5, pc}
00001b9c <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 )
{
1b9c: e92d40f0 push {r4, r5, r6, r7, lr}
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1ba0: e59f20e4 ldr r2, [pc, #228] ; 1c8c <rtems_filesystem_initialize+0xf0>
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1ba4: e59f60e4 ldr r6, [pc, #228] ; 1c90 <rtems_filesystem_initialize+0xf4>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1ba8: e5922000 ldr r2, [r2]
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1bac: e5963000 ldr r3, [r6]
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1bb0: e3520000 cmp r2, #0
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1bb4: 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 )
{
1bb8: e24dd018 sub sp, sp, #24
/*
* Set the default umask to "022".
*/
rtems_filesystem_umask = 022;
1bbc: e583202c str r2, [r3, #44] ; 0x2c
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
1bc0: 059f00cc ldreq r0, [pc, #204] ; 1c94 <rtems_filesystem_initialize+0xf8>
/*
* mount the first filesystem.
*/
if ( rtems_filesystem_mount_table_size == 0 )
1bc4: 0a00000b beq 1bf8 <rtems_filesystem_initialize+0x5c>
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
1bc8: e59f30c8 ldr r3, [pc, #200] ; 1c98 <rtems_filesystem_initialize+0xfc>
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
1bcc: e3a05000 mov r5, #0
*/
if ( rtems_filesystem_mount_table_size == 0 )
rtems_fatal_error_occurred( 0xABCD0001 );
mt = &rtems_filesystem_mount_table[0];
1bd0: e5932000 ldr r2, [r3]
status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL );
1bd4: e58d5000 str r5, [sp]
1bd8: e5923004 ldr r3, [r2, #4]
1bdc: e2820008 add r0, r2, #8
1be0: e8900003 ldm r0, {r0, r1}
1be4: e5922000 ldr r2, [r2]
1be8: eb000231 bl 24b4 <mount>
if ( status == -1 )
1bec: e3700001 cmn r0, #1
1bf0: 1a000001 bne 1bfc <rtems_filesystem_initialize+0x60>
rtems_fatal_error_occurred( 0xABCD0002 );
1bf4: e59f00a0 ldr r0, [pc, #160] ; 1c9c <rtems_filesystem_initialize+0x100><== NOT EXECUTED
1bf8: eb000eeb bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_filesystem_link_counts = 0;
1bfc: e5963000 ldr r3, [r6]
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1c00: 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;
1c04: 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);
1c08: e3a01001 mov r1, #1
1c0c: e1a03004 mov r3, r4
1c10: e1a02005 mov r2, r5
1c14: e59f0084 ldr r0, [pc, #132] ; 1ca0 <rtems_filesystem_initialize+0x104>
rtems_filesystem_root = loc;
1c18: e1a07004 mov r7, r4
* gonna hit performance.
*
* Till Straumann, 10/25/2002
*/
/* Clone the root pathloc */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1c1c: e58d5000 str r5, [sp]
1c20: eb00008c bl 1e58 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
1c24: e596c000 ldr ip, [r6]
1c28: e8b7000f ldm r7!, {r0, r1, r2, r3}
1c2c: e28cc018 add ip, ip, #24
1c30: e8ac000f stmia ip!, {r0, r1, r2, r3}
1c34: e5973000 ldr r3, [r7]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1c38: 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;
1c3c: e58c3000 str r3, [ip]
/* One more clone for the current node */
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1c40: e3a01001 mov r1, #1
1c44: e1a03004 mov r3, r4
1c48: e59f0050 ldr r0, [pc, #80] ; 1ca0 <rtems_filesystem_initialize+0x104>
1c4c: e58d5000 str r5, [sp]
1c50: eb000080 bl 1e58 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
1c54: e596c000 ldr ip, [r6]
1c58: e8b4000f ldm r4!, {r0, r1, r2, r3}
1c5c: e28cc004 add ip, ip, #4
1c60: e8ac000f stmia ip!, {r0, r1, r2, r3}
1c64: 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);
1c68: e59f0034 ldr r0, [pc, #52] ; 1ca4 <rtems_filesystem_initialize+0x108>
/* 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;
1c6c: 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);
1c70: e59f1030 ldr r1, [pc, #48] ; 1ca8 <rtems_filesystem_initialize+0x10c>
1c74: eb00019f bl 22f8 <mkdir>
if ( status != 0 )
1c78: e3500000 cmp r0, #0
rtems_fatal_error_occurred( 0xABCD0003 );
1c7c: 159f0028 ldrne r0, [pc, #40] ; 1cac <rtems_filesystem_initialize+0x110>
* 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);
if ( status != 0 )
1c80: 1affffdc bne 1bf8 <rtems_filesystem_initialize+0x5c>
* 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.
*/
}
1c84: e28dd018 add sp, sp, #24
1c88: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000a808 <rtems_filesystem_register>:
int
rtems_filesystem_register(
const char *type,
rtems_filesystem_fsmount_me_t mount_h
)
{
a808: e92d41f0 push {r4, r5, r6, r7, r8, lr}
a80c: e1a08001 mov r8, r1
a810: e1a06000 mov r6, r0
size_t fsn_size = sizeof( filesystem_node ) + strlen(type) + 1;
a814: eb0013b7 bl f6f8 <strlen>
filesystem_node *fsn = malloc( fsn_size );
a818: e2800011 add r0, r0, #17
a81c: ebffde77 bl 2200 <malloc>
char *type_storage = (char *) fsn + sizeof( filesystem_node );
if ( fsn == NULL )
a820: e2504000 subs r4, r0, #0
a824: 1a000004 bne a83c <rtems_filesystem_register+0x34>
rtems_set_errno_and_return_minus_one( ENOMEM );
a828: eb000fad bl e6e4 <__errno> <== NOT EXECUTED
a82c: e3a0300c mov r3, #12 <== NOT EXECUTED
a830: e5803000 str r3, [r0] <== NOT EXECUTED
a834: e3e00000 mvn r0, #0 <== NOT EXECUTED
a838: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
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 );
a83c: e2847010 add r7, r4, #16
if ( fsn == NULL )
rtems_set_errno_and_return_minus_one( ENOMEM );
strcpy(type_storage, type);
a840: e1a01006 mov r1, r6
a844: 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 );
a848: e59f5068 ldr r5, [pc, #104] ; a8b8 <rtems_filesystem_register+0xb0>
a84c: eb001359 bl f5b8 <strcpy>
a850: e3a01000 mov r1, #0
a854: e1a02001 mov r2, r1
fsn->entry.type = type_storage;
a858: e5847008 str r7, [r4, #8]
fsn->entry.mount_h = mount_h;
a85c: e584800c str r8, [r4, #12]
a860: e5950000 ldr r0, [r5]
a864: ebffea4c bl 519c <rtems_semaphore_obtain>
rtems_libio_lock();
if ( rtems_filesystem_get_mount_handler( type ) == NULL ) {
a868: e1a00006 mov r0, r6
a86c: ebffffdb bl a7e0 <rtems_filesystem_get_mount_handler>
a870: e2506000 subs r6, r0, #0
a874: 1a000006 bne a894 <rtems_filesystem_register+0x8c>
RTEMS_INLINE_ROUTINE void rtems_chain_append(
rtems_chain_control *the_chain,
rtems_chain_node *the_node
)
{
_Chain_Append( the_chain, the_node );
a878: e1a01004 mov r1, r4
a87c: e59f0038 ldr r0, [pc, #56] ; a8bc <rtems_filesystem_register+0xb4>
a880: ebffec83 bl 5a94 <_Chain_Append>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a884: e5950000 ldr r0, [r5]
a888: ebffea89 bl 52b4 <rtems_semaphore_release>
a88c: e1a00006 mov r0, r6
rtems_set_errno_and_return_minus_one( EINVAL );
}
rtems_libio_unlock();
return 0;
a890: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
a894: e5950000 ldr r0, [r5] <== NOT EXECUTED
a898: ebffea85 bl 52b4 <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 );
a89c: e1a00004 mov r0, r4 <== NOT EXECUTED
a8a0: ebffdd8a bl 1ed0 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a8a4: eb000f8e bl e6e4 <__errno> <== NOT EXECUTED
a8a8: e3a03016 mov r3, #22 <== NOT EXECUTED
a8ac: e5803000 str r3, [r0] <== NOT EXECUTED
a8b0: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
rtems_libio_unlock();
return 0;
}
a8b4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0000a680 <rtems_filesystem_unregister>:
int
rtems_filesystem_unregister(
const char *type
)
{
a680: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_chain_node *node = NULL;
if ( type == NULL ) {
a684: e2505000 subs r5, r0, #0 <== NOT EXECUTED
a688: 1a000004 bne a6a0 <rtems_filesystem_unregister+0x20> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EINVAL );
a68c: eb001014 bl e6e4 <__errno> <== NOT EXECUTED
a690: e3a03016 mov r3, #22 <== NOT EXECUTED
a694: e5803000 str r3, [r0] <== NOT EXECUTED
a698: e3e00000 mvn r0, #0 <== NOT EXECUTED
a69c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== 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 );
a6a0: e59f307c ldr r3, [pc, #124] ; a724 <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
a6a4: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
a6a8: e59f4078 ldr r4, [pc, #120] ; a728 <rtems_filesystem_unregister+0xa8><== NOT EXECUTED
a6ac: e5930000 ldr r0, [r3] <== NOT EXECUTED
a6b0: e1a02001 mov r2, r1 <== NOT EXECUTED
a6b4: ebffeab8 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
a6b8: e4946004 ldr r6, [r4], #4 <== NOT EXECUTED
}
rtems_libio_lock();
for (
a6bc: ea00000d b a6f8 <rtems_filesystem_unregister+0x78> <== 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 ) {
a6c0: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED
a6c4: eb00132f bl f388 <strcmp> <== NOT EXECUTED
a6c8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
a6cc: 1a000008 bne a6f4 <rtems_filesystem_unregister+0x74> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
a6d0: e1a00006 mov r0, r6 <== NOT EXECUTED
a6d4: ebffecf9 bl 5ac0 <_Chain_Extract> <== NOT EXECUTED
rtems_chain_extract( node );
free( fsn );
a6d8: e1a00006 mov r0, r6 <== NOT EXECUTED
a6dc: ebffddfb bl 1ed0 <free> <== NOT EXECUTED
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
a6e0: e59f303c ldr r3, [pc, #60] ; a724 <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
a6e4: e5930000 ldr r0, [r3] <== NOT EXECUTED
a6e8: ebffeaf1 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
a6ec: e1a00007 mov r0, r7 <== NOT EXECUTED
rtems_libio_unlock();
return 0;
a6f0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
a6f4: e5966000 ldr r6, [r6] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
a6f8: e1560004 cmp r6, r4 <== 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 ) {
a6fc: e1a01005 mov r1, r5 <== NOT EXECUTED
a700: 1affffee bne a6c0 <rtems_filesystem_unregister+0x40> <== NOT EXECUTED
a704: e59f3018 ldr r3, [pc, #24] ; a724 <rtems_filesystem_unregister+0xa4><== NOT EXECUTED
a708: e5930000 ldr r0, [r3] <== NOT EXECUTED
a70c: ebffeae8 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
}
}
rtems_libio_unlock();
rtems_set_errno_and_return_minus_one( ENOENT );
a710: eb000ff3 bl e6e4 <__errno> <== NOT EXECUTED
a714: e3a03002 mov r3, #2 <== NOT EXECUTED
a718: e5803000 str r3, [r0] <== NOT EXECUTED
a71c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
a720: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00006828 <rtems_fsmount>:
)
/*-------------------------------------------------------------------------*\
| Return Value: |
| 0, if success, -1 and errno if failed |
\*=========================================================================*/
{
6828: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
682c: e1a0a001 mov sl, r1 <== NOT EXECUTED
6830: e1a08002 mov r8, r2 <== NOT EXECUTED
6834: e2804014 add r4, r0, #20 <== NOT EXECUTED
6838: e3a05000 mov r5, #0 <== NOT EXECUTED
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
fprintf(stdout,"fsmount: mounting of \"%s\" to"
683c: e59f6118 ldr r6, [pc, #280] ; 695c <rtems_fsmount+0x134> <== NOT EXECUTED
6840: ea000036 b 6920 <rtems_fsmount+0xf8> <== 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);
6844: e5140010 ldr r0, [r4, #-16] <== NOT EXECUTED
6848: e59f1110 ldr r1, [pc, #272] ; 6960 <rtems_fsmount+0x138> <== NOT EXECUTED
684c: eb000914 bl 8ca4 <rtems_mkdir> <== NOT EXECUTED
if (tmp_rc != 0) {
6850: e2507000 subs r7, r0, #0 <== NOT EXECUTED
6854: 0a000038 beq 693c <rtems_fsmount+0x114> <== NOT EXECUTED
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNTPNT_CRTERR)) {
6858: e15430b4 ldrh r3, [r4, #-4] <== NOT EXECUTED
685c: e3130002 tst r3, #2 <== NOT EXECUTED
6860: 0a00000a beq 6890 <rtems_fsmount+0x68> <== NOT EXECUTED
fprintf(stdout,"fsmount: creation of mount point \"%s\" failed: %s\n",
6864: e5963000 ldr r3, [r6] <== NOT EXECUTED
6868: e5149010 ldr r9, [r4, #-16] <== NOT EXECUTED
686c: e593b008 ldr fp, [r3, #8] <== NOT EXECUTED
6870: eb00ded4 bl 3e3c8 <__errno> <== NOT EXECUTED
6874: e5900000 ldr r0, [r0] <== NOT EXECUTED
6878: eb00f854 bl 449d0 <strerror> <== NOT EXECUTED
687c: e1a02009 mov r2, r9 <== NOT EXECUTED
6880: e1a03000 mov r3, r0 <== NOT EXECUTED
6884: e59f10d8 ldr r1, [pc, #216] ; 6964 <rtems_fsmount+0x13c> <== NOT EXECUTED
6888: e1a0000b mov r0, fp <== NOT EXECUTED
688c: eb00e144 bl 3eda4 <fprintf> <== NOT EXECUTED
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNTPNT_CRTERR)) {
6890: e15430b2 ldrh r3, [r4, #-2] <== NOT EXECUTED
6894: e3130002 tst r3, #2 <== NOT EXECUTED
6898: ea000011 b 68e4 <rtems_fsmount+0xbc> <== NOT EXECUTED
fstab_ptr->target,
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_FAILED)) {
689c: e3130004 tst r3, #4 <== NOT EXECUTED
68a0: 0a00000d beq 68dc <rtems_fsmount+0xb4> <== NOT EXECUTED
fprintf(stdout,"fsmount: mounting of \"%s\" to"
68a4: e5963000 ldr r3, [r6] <== NOT EXECUTED
68a8: e5142014 ldr r2, [r4, #-20] <== NOT EXECUTED
68ac: e593b008 ldr fp, [r3, #8] <== NOT EXECUTED
68b0: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
68b4: e5149010 ldr r9, [r4, #-16] <== NOT EXECUTED
68b8: eb00dec2 bl 3e3c8 <__errno> <== NOT EXECUTED
68bc: e5900000 ldr r0, [r0] <== NOT EXECUTED
68c0: eb00f842 bl 449d0 <strerror> <== NOT EXECUTED
68c4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
68c8: e58d0000 str r0, [sp] <== NOT EXECUTED
68cc: e1a03009 mov r3, r9 <== NOT EXECUTED
68d0: e1a0000b mov r0, fp <== NOT EXECUTED
68d4: e59f108c ldr r1, [pc, #140] ; 6968 <rtems_fsmount+0x140> <== NOT EXECUTED
68d8: eb00e131 bl 3eda4 <fprintf> <== NOT EXECUTED
" \"%s\" failed: %s\n",
fstab_ptr->source,
fstab_ptr->target,
strerror(errno));
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_FAILED)) {
68dc: e15430b2 ldrh r3, [r4, #-2] <== NOT EXECUTED
68e0: e3130004 tst r3, #4 <== NOT EXECUTED
68e4: 0a00000b beq 6918 <rtems_fsmount+0xf0> <== NOT EXECUTED
68e8: ea00000f b 692c <rtems_fsmount+0x104> <== NOT EXECUTED
terminate = true;
rc = tmp_rc;
}
}
else {
if (0 != (fstab_ptr->report_reasons & FSMOUNT_MNT_OK)) {
68ec: e3130001 tst r3, #1 <== NOT EXECUTED
68f0: 0a000005 beq 690c <rtems_fsmount+0xe4> <== NOT EXECUTED
fprintf(stdout,"fsmount: mounting of \"%s\" to"
68f4: e5963000 ldr r3, [r6] <== NOT EXECUTED
68f8: e59f106c ldr r1, [pc, #108] ; 696c <rtems_fsmount+0x144> <== NOT EXECUTED
68fc: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
6900: e2442014 sub r2, r4, #20 <== NOT EXECUTED
6904: e892000c ldm r2, {r2, r3} <== NOT EXECUTED
6908: eb00e125 bl 3eda4 <fprintf> <== NOT EXECUTED
" \"%s\" succeeded\n",
fstab_ptr->source,
fstab_ptr->target);
}
if (0 != (fstab_ptr->abort_reasons & FSMOUNT_MNT_OK)) {
690c: e15430b2 ldrh r3, [r4, #-2] <== NOT EXECUTED
6910: e3130001 tst r3, #1 <== NOT EXECUTED
6914: 1a000003 bne 6928 <rtems_fsmount+0x100> <== NOT EXECUTED
/*
* proceed to next entry
*/
if (!terminate) {
fstab_ptr++;
fstab_idx++;
6918: e2855001 add r5, r5, #1 <== NOT EXECUTED
691c: e2844014 add r4, r4, #20 <== NOT EXECUTED
bool terminate = false;
/*
* scan through all fstab entries;
*/
while (!terminate &&
6920: e155000a cmp r5, sl <== NOT EXECUTED
6924: 3affffc6 bcc 6844 <rtems_fsmount+0x1c> <== NOT EXECUTED
6928: e3a07000 mov r7, #0 <== NOT EXECUTED
if (!terminate) {
fstab_ptr++;
fstab_idx++;
}
}
if (fail_idx != NULL) {
692c: e3580000 cmp r8, #0 <== NOT EXECUTED
*fail_idx = fstab_idx;
6930: 15885000 strne r5, [r8] <== NOT EXECUTED
}
return rc;
}
6934: e1a00007 mov r0, r7 <== NOT EXECUTED
6938: e8bd8ffc pop {r2, r3, 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,
693c: e58d7000 str r7, [sp] <== NOT EXECUTED
6940: e2440014 sub r0, r4, #20 <== NOT EXECUTED
6944: e890000f ldm r0, {r0, r1, r2, r3} <== NOT EXECUTED
6948: eb0005df bl 80cc <mount> <== NOT EXECUTED
fstab_ptr->target,
fstab_ptr->type,
fstab_ptr->options,
NULL);
if (tmp_rc != 0) {
694c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
6950: e15430b4 ldrh r3, [r4, #-4] <== NOT EXECUTED
6954: 1affffd0 bne 689c <rtems_fsmount+0x74> <== NOT EXECUTED
6958: eaffffe3 b 68ec <rtems_fsmount+0xc4> <== NOT EXECUTED
00001a5c <rtems_io_lookup_name>:
rtems_status_code rtems_io_lookup_name(
const char *name,
rtems_driver_name_t *device_info
)
{
1a5c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
1a60: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
1a64: e1a05001 mov r5, r1 <== NOT EXECUTED
1a68: e1a06000 mov r6, 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 );
1a6c: eb003721 bl f6f8 <strlen> <== NOT EXECUTED
1a70: e28d4004 add r4, sp, #4 <== NOT EXECUTED
1a74: e1a01000 mov r1, r0 <== NOT EXECUTED
1a78: e3a02000 mov r2, #0 <== NOT EXECUTED
1a7c: e1a03004 mov r3, r4 <== NOT EXECUTED
1a80: e3a0c001 mov ip, #1 <== NOT EXECUTED
1a84: e1a00006 mov r0, r6 <== NOT EXECUTED
1a88: e58dc000 str ip, [sp] <== NOT EXECUTED
1a8c: eb0000f1 bl 1e58 <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access;
if ( !loc.ops->node_type_h ) {
1a90: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
1a94: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED
1a98: 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 );
1a9c: e1a07000 mov r7, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
1aa0: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
1aa4: 1a000009 bne 1ad0 <rtems_io_lookup_name+0x74> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1aa8: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
1aac: e3530000 cmp r3, #0 <== NOT EXECUTED
1ab0: 11a00004 movne r0, r4 <== NOT EXECUTED
1ab4: 11a0e00f movne lr, pc <== NOT EXECUTED
1ab8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1abc: eb003308 bl e6e4 <__errno> <== NOT EXECUTED
1ac0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1ac4: e5803000 str r3, [r0] <== NOT EXECUTED
1ac8: e3e00000 mvn r0, #0 <== NOT EXECUTED
1acc: ea000026 b 1b6c <rtems_io_lookup_name+0x110> <== NOT EXECUTED
}
node_type = (*loc.ops->node_type_h)( &loc );
1ad0: e1a00004 mov r0, r4 <== NOT EXECUTED
1ad4: e1a0e00f mov lr, pc <== NOT EXECUTED
1ad8: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
1adc: e3570000 cmp r7, #0 <== NOT EXECUTED
1ae0: 03500002 cmpeq r0, #2 <== NOT EXECUTED
1ae4: 03a0a000 moveq sl, #0 <== NOT EXECUTED
1ae8: 13a0a001 movne sl, #1 <== NOT EXECUTED
1aec: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED
1af0: 0a000008 beq 1b18 <rtems_io_lookup_name+0xbc> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1af4: e3570000 cmp r7, #0 <== NOT EXECUTED
1af8: 0a000018 beq 1b60 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
1afc: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
1b00: e3530000 cmp r3, #0 <== NOT EXECUTED
1b04: 0a000015 beq 1b60 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
1b08: e1a00004 mov r0, r4 <== NOT EXECUTED
1b0c: e1a0e00f mov lr, pc <== NOT EXECUTED
1b10: e12fff13 bx r3 <== NOT EXECUTED
1b14: ea000011 b 1b60 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
return RTEMS_UNSATISFIED;
}
device_info->device_name = (char *) name;
1b18: e5856000 str r6, [r5] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
1b1c: e1a00006 mov r0, r6 <== NOT EXECUTED
1b20: eb0036f4 bl f6f8 <strlen> <== NOT EXECUTED
1b24: e5850004 str r0, [r5, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
1b28: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED
1b2c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
1b30: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1b34: e3570000 cmp r7, #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;
1b38: e585300c str r3, [r5, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1b3c: 0a000009 beq 1b68 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED
1b40: e597301c ldr r3, [r7, #28] <== NOT EXECUTED
1b44: e3530000 cmp r3, #0 <== NOT EXECUTED
1b48: 0a000006 beq 1b68 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED
1b4c: e1a00004 mov r0, r4 <== NOT EXECUTED
1b50: e1a0e00f mov lr, pc <== NOT EXECUTED
1b54: e12fff13 bx r3 <== NOT EXECUTED
1b58: e1a0000a mov r0, sl <== NOT EXECUTED
1b5c: ea000002 b 1b6c <rtems_io_lookup_name+0x110> <== NOT EXECUTED
1b60: e3a0000d mov r0, #13 <== NOT EXECUTED
1b64: ea000000 b 1b6c <rtems_io_lookup_name+0x110> <== NOT EXECUTED
1b68: e3a00000 mov r0, #0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
}
1b6c: e28dd018 add sp, sp, #24 <== NOT EXECUTED
1b70: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00001fdc <rtems_libio_init>:
*
* Called by BSP startup code to initialize the libio subsystem.
*/
void rtems_libio_init( void )
{
1fdc: e92d4011 push {r0, r4, lr}
rtems_status_code rc;
uint32_t i;
rtems_libio_t *iop;
if (rtems_libio_number_iops > 0)
1fe0: e59f4098 ldr r4, [pc, #152] ; 2080 <rtems_libio_init+0xa4>
1fe4: e5940000 ldr r0, [r4]
1fe8: e3500000 cmp r0, #0
1fec: 0a000013 beq 2040 <rtems_libio_init+0x64>
{
rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1ff0: e3a01040 mov r1, #64 ; 0x40
1ff4: ebffff2d bl 1cb0 <calloc>
1ff8: e59f3084 ldr r3, [pc, #132] ; 2084 <rtems_libio_init+0xa8>
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
1ffc: 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,
2000: e5830000 str r0, [r3]
sizeof(rtems_libio_t));
if (rtems_libio_iops == NULL)
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
2004: 0280001a addeq r0, r0, #26
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)
2008: 0a000015 beq 2064 <rtems_libio_init+0x88>
rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
iop = rtems_libio_iop_freelist = rtems_libio_iops;
200c: e59f3074 ldr r3, [pc, #116] ; 2088 <rtems_libio_init+0xac>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2010: 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;
2014: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
2018: e3a03000 mov r3, #0
201c: ea000000 b 2024 <rtems_libio_init+0x48>
iop->data1 = iop + 1;
2020: e500000c str r0, [r0, #-12]
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++)
2024: e2833001 add r3, r3, #1
2028: e1530001 cmp r3, r1
iop->data1 = iop + 1;
202c: e1a02000 mov r2, r0
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++)
2030: e2800040 add r0, r0, #64 ; 0x40
2034: 3afffff9 bcc 2020 <rtems_libio_init+0x44>
iop->data1 = iop + 1;
iop->data1 = NULL;
2038: e3a03000 mov r3, #0
203c: e5823034 str r3, [r2, #52] ; 0x34
/*
* Create the binary semaphore used to provide mutual exclusion
* on the IOP Table.
*/
rc = rtems_semaphore_create(
2040: e59fc044 ldr ip, [pc, #68] ; 208c <rtems_libio_init+0xb0>
2044: e59f0044 ldr r0, [pc, #68] ; 2090 <rtems_libio_init+0xb4>
2048: e3a01001 mov r1, #1
204c: e3a02054 mov r2, #84 ; 0x54
2050: e3a03000 mov r3, #0
2054: e58dc000 str ip, [sp]
2058: eb000bbd bl 4f54 <rtems_semaphore_create>
1,
RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY,
RTEMS_NO_PRIORITY,
&rtems_libio_semaphore
);
if ( rc != RTEMS_SUCCESSFUL )
205c: e3500000 cmp r0, #0
2060: 0a000000 beq 2068 <rtems_libio_init+0x8c>
rtems_fatal_error_occurred( rc );
2064: eb000dd0 bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
/*
* Initialize the base file system infrastructure.
*/
if (rtems_fs_init_helper)
2068: e59f3024 ldr r3, [pc, #36] ; 2094 <rtems_libio_init+0xb8>
206c: e5933000 ldr r3, [r3]
2070: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
2074: 11a0e00f movne lr, pc
2078: 112fff13 bxne r3
}
207c: e8bd8018 pop {r3, r4, pc}
000268b8 <rtems_libio_set_private_env>:
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
268b8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_status_code sc;
rtems_id task_id;
rtems_filesystem_location_info_t loc;
sc=rtems_task_ident(RTEMS_SELF,0,&task_id);
268bc: e3a00000 mov r0, #0
rtems_filesystem_freenode( &env->root_directory);
free(env);
}
}
rtems_status_code rtems_libio_set_private_env(void) {
268c0: 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);
268c4: e1a01000 mov r1, r0
268c8: e28d2018 add r2, sp, #24
268cc: eb000647 bl 281f0 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
268d0: e2508000 subs r8, r0, #0
268d4: 1a000037 bne 269b8 <rtems_libio_set_private_env+0x100>
/* Only for the first time a malloc is necesary */
if (rtems_current_user_env==&rtems_global_user_env) {
268d8: e59f40e4 ldr r4, [pc, #228] ; 269c4 <rtems_libio_set_private_env+0x10c>
268dc: e59f30e4 ldr r3, [pc, #228] ; 269c8 <rtems_libio_set_private_env+0x110>
268e0: e5942000 ldr r2, [r4]
268e4: e1520003 cmp r2, r3
268e8: 1a00000f bne 2692c <rtems_libio_set_private_env+0x74>
rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
268ec: e2800048 add r0, r0, #72 ; 0x48
268f0: ebff8516 bl 7d50 <malloc>
if (!tmp)
268f4: e2505000 subs r5, r0, #0
268f8: 03a0801a moveq r8, #26
268fc: 0a00002d beq 269b8 <rtems_libio_set_private_env+0x100>
#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);
26900: e1a00008 mov r0, r8
26904: e1a01004 mov r1, r4
26908: e59f20bc ldr r2, [pc, #188] ; 269cc <rtems_libio_set_private_env+0x114>
2690c: eb0006d7 bl 28470 <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
26910: e2506000 subs r6, r0, #0
* not initialized yet
*/
free(tmp);
return sc;
}
rtems_current_user_env = tmp;
26914: 05845000 streq r5, [r4]
#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) {
26918: 0a000003 beq 2692c <rtems_libio_set_private_env+0x74>
/* don't use free_user_env because the pathlocs are
* not initialized yet
*/
free(tmp);
2691c: e1a00005 mov r0, r5 <== NOT EXECUTED
26920: ebff8363 bl 76b4 <free> <== NOT EXECUTED
26924: e1a08006 mov r8, r6 <== NOT EXECUTED
return sc;
26928: ea000022 b 269b8 <rtems_libio_set_private_env+0x100> <== NOT EXECUTED
}
rtems_current_user_env = tmp;
};
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/
2692c: e59f6090 ldr r6, [pc, #144] ; 269c4 <rtems_libio_set_private_env+0x10c>
26930: e5967000 ldr r7, [r6]
26934: e59f108c ldr r1, [pc, #140] ; 269c8 <rtems_libio_set_private_env+0x110>
26938: e3a02048 mov r2, #72 ; 0x48
2693c: e1a00007 mov r0, r7
26940: eb006b50 bl 41688 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/
26944: 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);
26948: e28d4004 add r4, sp, #4
2694c: e3a05000 mov r5, #0
}
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*/
26950: e5873000 str r3, [r7]
* 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);
26954: e3a01001 mov r1, #1
26958: e1a03004 mov r3, r4
2695c: e1a02005 mov r2, r5
26960: e59f0068 ldr r0, [pc, #104] ; 269d0 <rtems_libio_set_private_env+0x118>
rtems_filesystem_root = loc;
26964: e1a07004 mov r7, 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);
26968: e58d5000 str r5, [sp]
2696c: ebff8332 bl 763c <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
26970: e596c000 ldr ip, [r6]
26974: e8b7000f ldm r7!, {r0, r1, r2, r3}
26978: e28cc018 add ip, ip, #24
2697c: e8ac000f stmia ip!, {r0, r1, r2, r3}
26980: e5973000 ldr r3, [r7]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
26984: e1a02005 mov r2, r5
* 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;
26988: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
2698c: e3a01001 mov r1, #1
26990: e1a03004 mov r3, r4
26994: e59f0034 ldr r0, [pc, #52] ; 269d0 <rtems_libio_set_private_env+0x118>
26998: e58d5000 str r5, [sp]
2699c: ebff8326 bl 763c <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
269a0: e596c000 ldr ip, [r6]
269a4: e8b4000f ldm r4!, {r0, r1, r2, r3}
269a8: e28cc004 add ip, ip, #4
269ac: e8ac000f stmia ip!, {r0, r1, r2, r3}
269b0: e5973000 ldr r3, [r7]
269b4: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL;
}
269b8: e1a00008 mov r0, r8
269bc: e28dd01c add sp, sp, #28
269c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00026814 <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) {
26814: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
26818: e1a05000 mov r5, r0 <== 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);
2681c: e3a00000 mov r0, #0 <== NOT EXECUTED
26820: e1a01000 mov r1, r0 <== NOT EXECUTED
26824: e1a0200d mov r2, sp <== NOT EXECUTED
26828: eb000670 bl 281f0 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
2682c: e2503000 subs r3, r0, #0 <== NOT EXECUTED
26830: 1a00001b bne 268a4 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
26834: e59f1070 ldr r1, [pc, #112] ; 268ac <rtems_libio_share_private_env+0x98><== NOT EXECUTED
26838: e5914000 ldr r4, [r1] <== NOT EXECUTED
2683c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
26840: e5942000 ldr r2, [r4] <== NOT EXECUTED
26844: e1520003 cmp r2, r3 <== NOT EXECUTED
26848: 1a000004 bne 26860 <rtems_libio_share_private_env+0x4c> <== NOT EXECUTED
/* 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);
2684c: eb000730 bl 28514 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
26850: e2503000 subs r3, r0, #0 <== NOT EXECUTED
26854: 1a000012 bne 268a4 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
free_user_env(tmp);
26858: e1a00004 mov r0, r4 <== NOT EXECUTED
2685c: ebffffd3 bl 267b0 <free_user_env> <== NOT EXECUTED
};
/* AT THIS POINT, rtems_current_user_env is DANGLING */
sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env,
26860: e59f4044 ldr r4, [pc, #68] ; 268ac <rtems_libio_share_private_env+0x98><== NOT EXECUTED
26864: e1a00005 mov r0, r5 <== NOT EXECUTED
26868: e1a01004 mov r1, r4 <== NOT EXECUTED
2686c: e28d2004 add r2, sp, #4 <== NOT EXECUTED
26870: eb000744 bl 28588 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env );
if (sc != RTEMS_SUCCESSFUL)
26874: e2503000 subs r3, r0, #0 <== NOT EXECUTED
26878: 1a000006 bne 26898 <rtems_libio_share_private_env+0x84> <== NOT EXECUTED
goto bailout;
sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env);
2687c: e59f202c ldr r2, [pc, #44] ; 268b0 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED
26880: e1a01004 mov r1, r4 <== NOT EXECUTED
26884: eb0006f9 bl 28470 <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
26888: e2503000 subs r3, r0, #0 <== NOT EXECUTED
goto bailout;
/* the current_user_env is the same pointer that remote env */
rtems_current_user_env = shared_user_env;
2688c: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED
26890: 05842000 streq r2, [r4] <== NOT EXECUTED
(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);
if (sc != RTEMS_SUCCESSFUL)
26894: 0a000002 beq 268a4 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
bailout:
/* fallback to the global env */
rtems_current_user_env = &rtems_global_user_env;
26898: e59f1014 ldr r1, [pc, #20] ; 268b4 <rtems_libio_share_private_env+0xa0><== NOT EXECUTED
2689c: e59f2008 ldr r2, [pc, #8] ; 268ac <rtems_libio_share_private_env+0x98><== NOT EXECUTED
268a0: e5821000 str r1, [r2] <== NOT EXECUTED
return sc;
}
268a4: e1a00003 mov r0, r3 <== NOT EXECUTED
268a8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00007e48 <rtems_malloc_statistics_at_free>:
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
7e48: e92d4801 push {r0, fp, lr} <== NOT EXECUTED
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
7e4c: e59f3038 ldr r3, [pc, #56] ; 7e8c <rtems_malloc_statistics_at_free+0x44><== NOT EXECUTED
* size and thus we skip updating the statistics.
*/
static void rtems_malloc_statistics_at_free(
void *pointer
)
{
7e50: e1a01000 mov r1, r0 <== NOT EXECUTED
uintptr_t size;
if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) {
7e54: e1a0200d mov r2, sp <== NOT EXECUTED
7e58: e5930000 ldr r0, [r3] <== NOT EXECUTED
7e5c: eb0015f4 bl d634 <_Protected_heap_Get_block_size> <== NOT EXECUTED
7e60: e3500000 cmp r0, #0 <== NOT EXECUTED
7e64: 0a000007 beq 7e88 <rtems_malloc_statistics_at_free+0x40> <== NOT EXECUTED
MSBUMP(lifetime_freed, size);
7e68: e59f3020 ldr r3, [pc, #32] ; 7e90 <rtems_malloc_statistics_at_free+0x48><== NOT EXECUTED
7e6c: e59d0000 ldr r0, [sp] <== NOT EXECUTED
7e70: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED
7e74: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
7e78: e09b1000 adds r1, fp, r0 <== NOT EXECUTED
7e7c: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED
7e80: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED
7e84: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED
}
}
7e88: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED
00008ca4 <rtems_mkdir>:
return (retval);
}
int
rtems_mkdir(const char *path, mode_t mode)
{
8ca4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
8ca8: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
8cac: e1a0b001 mov fp, r1 <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
8cb0: eb00ef32 bl 44980 <strdup> <== NOT EXECUTED
if (dup_path != NULL) {
8cb4: e2506000 subs r6, r0, #0 <== NOT EXECUTED
8cb8: 0a000057 beq 8e1c <rtems_mkdir+0x178> <== NOT EXECUTED
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
8cbc: e5d63000 ldrb r3, [r6] <== NOT EXECUTED
++p;
8cc0: e3a07000 mov r7, #0 <== NOT EXECUTED
char *p;
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
8cc4: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED
8cc8: 11a05006 movne r5, r6 <== NOT EXECUTED
++p;
8ccc: 02865001 addeq r5, r6, #1 <== NOT EXECUTED
8cd0: e3a03001 mov r3, #1 <== NOT EXECUTED
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
8cd4: e1a09007 mov r9, r7 <== NOT EXECUTED
retval = 0;
break;
}
}
if (!last)
*p = '/';
8cd8: e3a0a02f mov sl, #47 ; 0x2f <== 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) {
8cdc: e1a0800d mov r8, sp <== NOT EXECUTED
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
8ce0: e5d52000 ldrb r2, [r5] <== NOT EXECUTED
8ce4: e3520000 cmp r2, #0 <== NOT EXECUTED
8ce8: 02822001 addeq r2, r2, #1 <== NOT EXECUTED
8cec: 0a000002 beq 8cfc <rtems_mkdir+0x58> <== NOT EXECUTED
last = 1;
else if (p[0] != '/')
8cf0: e352002f cmp r2, #47 ; 0x2f <== NOT EXECUTED
8cf4: 1a00003c bne 8dec <rtems_mkdir+0x148> <== NOT EXECUTED
8cf8: e3a02000 mov r2, #0 <== NOT EXECUTED
continue;
*p = '\0';
if (!last && p[1] == '\0')
8cfc: e3520000 cmp r2, #0 <== NOT EXECUTED
for (first = 1, last = 0; !last ; ++p) {
if (p[0] == '\0')
last = 1;
else if (p[0] != '/')
continue;
*p = '\0';
8d00: e5c59000 strb r9, [r5] <== NOT EXECUTED
if (!last && p[1] == '\0')
8d04: 13a04001 movne r4, #1 <== NOT EXECUTED
8d08: 1a000002 bne 8d18 <rtems_mkdir+0x74> <== NOT EXECUTED
8d0c: e5d54001 ldrb r4, [r5, #1] <== NOT EXECUTED
8d10: e2744001 rsbs r4, r4, #1 <== NOT EXECUTED
8d14: 33a04000 movcc r4, #0 <== NOT EXECUTED
last = 1;
if (first) {
8d18: e3530000 cmp r3, #0 <== NOT EXECUTED
8d1c: 0a000004 beq 8d34 <rtems_mkdir+0x90> <== NOT EXECUTED
* mkdir [-m mode] dir
*
* We change the user's umask and then restore it,
* instead of doing chmod's.
*/
oumask = umask(0);
8d20: e3a00000 mov r0, #0 <== NOT EXECUTED
8d24: eb000755 bl aa80 <umask> <== NOT EXECUTED
8d28: e1a07000 mov r7, r0 <== NOT EXECUTED
numask = oumask & ~(S_IWUSR | S_IXUSR);
(void)umask(numask);
8d2c: e3c000c0 bic r0, r0, #192 ; 0xc0 <== NOT EXECUTED
8d30: eb000752 bl aa80 <umask> <== NOT EXECUTED
first = 0;
}
if (last)
8d34: e3540000 cmp r4, #0 <== NOT EXECUTED
8d38: 059f10f0 ldreq r1, [pc, #240] ; 8e30 <rtems_mkdir+0x18c> <== NOT EXECUTED
8d3c: 0a000002 beq 8d4c <rtems_mkdir+0xa8> <== NOT EXECUTED
(void)umask(oumask);
8d40: e1a00007 mov r0, r7 <== NOT EXECUTED
8d44: eb00074d bl aa80 <umask> <== NOT EXECUTED
8d48: e1a0100b mov r1, fp <== NOT EXECUTED
if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
8d4c: e1a00006 mov r0, r6 <== NOT EXECUTED
8d50: ebfffc6e bl 7f10 <mkdir> <== NOT EXECUTED
8d54: e3500000 cmp r0, #0 <== NOT EXECUTED
8d58: aa00001f bge 8ddc <rtems_mkdir+0x138> <== NOT EXECUTED
if (errno == EEXIST || errno == EISDIR) {
8d5c: eb00d599 bl 3e3c8 <__errno> <== NOT EXECUTED
8d60: e5903000 ldr r3, [r0] <== NOT EXECUTED
8d64: e3530011 cmp r3, #17 <== NOT EXECUTED
8d68: 0a000003 beq 8d7c <rtems_mkdir+0xd8> <== NOT EXECUTED
8d6c: eb00d595 bl 3e3c8 <__errno> <== NOT EXECUTED
8d70: e5903000 ldr r3, [r0] <== NOT EXECUTED
8d74: e3530015 cmp r3, #21 <== NOT EXECUTED
8d78: 1a00001d bne 8df4 <rtems_mkdir+0x150> <== NOT EXECUTED
if (stat(path, &sb) < 0) {
8d7c: e1a00006 mov r0, r6 <== NOT EXECUTED
8d80: e1a0100d mov r1, sp <== NOT EXECUTED
8d84: eb00002a bl 8e34 <stat> <== NOT EXECUTED
8d88: e3500000 cmp r0, #0 <== NOT EXECUTED
8d8c: ba000018 blt 8df4 <rtems_mkdir+0x150> <== NOT EXECUTED
retval = 0;
break;
} else if (!S_ISDIR(sb.st_mode)) {
8d90: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
8d94: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
8d98: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
8d9c: 0a00000a beq 8dcc <rtems_mkdir+0x128> <== NOT EXECUTED
if (last)
8da0: e3540000 cmp r4, #0 <== NOT EXECUTED
8da4: 0a000004 beq 8dbc <rtems_mkdir+0x118> <== NOT EXECUTED
errno = EEXIST;
8da8: eb00d586 bl 3e3c8 <__errno> <== NOT EXECUTED
8dac: e3a03011 mov r3, #17 <== NOT EXECUTED
8db0: e5803000 str r3, [r0] <== NOT EXECUTED
8db4: e3a04000 mov r4, #0 <== NOT EXECUTED
8db8: ea000012 b 8e08 <rtems_mkdir+0x164> <== NOT EXECUTED
else
errno = ENOTDIR;
8dbc: eb00d581 bl 3e3c8 <__errno> <== NOT EXECUTED
8dc0: e3a03014 mov r3, #20 <== NOT EXECUTED
8dc4: e5803000 str r3, [r0] <== NOT EXECUTED
8dc8: ea00000c b 8e00 <rtems_mkdir+0x15c> <== NOT EXECUTED
retval = 0;
break;
}
if (last)
8dcc: e3540000 cmp r4, #0 <== NOT EXECUTED
8dd0: 0a000003 beq 8de4 <rtems_mkdir+0x140> <== NOT EXECUTED
8dd4: e3a04002 mov r4, #2 <== NOT EXECUTED
8dd8: ea00000a b 8e08 <rtems_mkdir+0x164> <== NOT EXECUTED
} else {
retval = 0;
break;
}
}
if (!last)
8ddc: e3540000 cmp r4, #0 <== NOT EXECUTED
8de0: 1a000010 bne 8e28 <rtems_mkdir+0x184> <== NOT EXECUTED
*p = '/';
8de4: e5c5a000 strb sl, [r5] <== NOT EXECUTED
8de8: e3a03000 mov r3, #0 <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
8dec: e2855001 add r5, r5, #1 <== NOT EXECUTED
8df0: eaffffba b 8ce0 <rtems_mkdir+0x3c> <== NOT EXECUTED
}
}
if (!last)
*p = '/';
}
if (!first && !last)
8df4: e3540000 cmp r4, #0 <== NOT EXECUTED
p = path;
oumask = 0;
retval = 1;
if (p[0] == '/') /* Skip leading '/'. */
++p;
for (first = 1, last = 0; !last ; ++p) {
8df8: e3a04000 mov r4, #0 <== NOT EXECUTED
}
}
if (!last)
*p = '/';
}
if (!first && !last)
8dfc: 1a000001 bne 8e08 <rtems_mkdir+0x164> <== NOT EXECUTED
(void)umask(oumask);
8e00: e1a00007 mov r0, r7 <== NOT EXECUTED
8e04: eb00071d bl aa80 <umask> <== NOT EXECUTED
int success = 0;
char *dup_path = strdup(path);
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
8e08: e1a00006 mov r0, r6 <== NOT EXECUTED
8e0c: ebfffa28 bl 76b4 <free> <== NOT EXECUTED
}
return success != 0 ? 0 : -1;
8e10: e3540000 cmp r4, #0 <== NOT EXECUTED
8e14: 13a00000 movne r0, #0 <== NOT EXECUTED
8e18: 1a000000 bne 8e20 <rtems_mkdir+0x17c> <== NOT EXECUTED
8e1c: e3e00000 mvn r0, #0 <== NOT EXECUTED
}
8e20: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
8e24: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (dup_path != NULL) {
success = build(dup_path, mode);
free(dup_path);
}
return success != 0 ? 0 : -1;
8e28: e3a04001 mov r4, #1 <== NOT EXECUTED
8e2c: eafffff5 b 8e08 <rtems_mkdir+0x164> <== NOT EXECUTED
0001dc9c <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)
{
1dc9c: e92d4010 push {r4, lr} <== NOT EXECUTED
1dca0: e1a04800 lsl r4, r0, #16 <== NOT EXECUTED
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
1dca4: e3a00c02 mov r0, #512 ; 0x200 <== NOT EXECUTED
1dca8: ebffa828 bl 7d50 <malloc> <== NOT EXECUTED
1dcac: e59f3054 ldr r3, [pc, #84] ; 1dd08 <rtems_nvdisk_crc16_gen_factors+0x6c><== NOT EXECUTED
if (!rtems_nvdisk_crc16_factor)
1dcb0: 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);
1dcb4: 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)
{
1dcb8: e1a04824 lsr r4, r4, #16 <== NOT EXECUTED
uint32_t b;
rtems_nvdisk_crc16_factor = malloc (sizeof (uint16_t) * 256);
if (!rtems_nvdisk_crc16_factor)
1dcbc: 0280001a addeq r0, r0, #26 <== NOT EXECUTED
1dcc0: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
1dcc4: e3a03000 mov r3, #0 <== NOT EXECUTED
1dcc8: e1a02803 lsl r2, r3, #16 <== NOT EXECUTED
1dccc: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
1dcd0: e3a01008 mov r1, #8 <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
1dcd4: ea000002 b 1dce4 <rtems_nvdisk_crc16_gen_factors+0x48> <== NOT EXECUTED
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
1dcd8: e3120001 tst r2, #1 <== NOT EXECUTED
1dcdc: e1a020a2 lsr r2, r2, #1 <== NOT EXECUTED
1dce0: 10222004 eorne r2, r2, r4 <== NOT EXECUTED
for (b = 0; b < 256; b++)
{
uint32_t i;
uint16_t v = b;
for (i = 8; i--;)
1dce4: e2511001 subs r1, r1, #1 <== NOT EXECUTED
1dce8: 2afffffa bcs 1dcd8 <rtems_nvdisk_crc16_gen_factors+0x3c> <== NOT EXECUTED
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
1dcec: e1a01083 lsl r1, r3, #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++)
1dcf0: e2833001 add r3, r3, #1 <== NOT EXECUTED
1dcf4: e3530c01 cmp r3, #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;
1dcf8: e18020b1 strh r2, [r0, r1] <== 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++)
1dcfc: 1afffff1 bne 1dcc8 <rtems_nvdisk_crc16_gen_factors+0x2c> <== NOT EXECUTED
1dd00: e3a00000 mov r0, #0 <== NOT EXECUTED
for (i = 8; i--;)
v = v & 1 ? (v >> 1) ^ pattern : v >> 1;
rtems_nvdisk_crc16_factor[b] = v & 0xffff;
}
return RTEMS_SUCCESSFUL;
}
1dd04: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0001d62c <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, ...)
{
1d62c: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED
1d630: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "nvdisk:error:");
1d634: e59f4058 ldr r4, [pc, #88] ; 1d694 <rtems_nvdisk_error+0x68><== NOT EXECUTED
1d638: e5943000 ldr r3, [r4] <== NOT EXECUTED
1d63c: e59f0054 ldr r0, [pc, #84] ; 1d698 <rtems_nvdisk_error+0x6c><== NOT EXECUTED
1d640: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
static int
rtems_nvdisk_error (const char *format, ...)
{
int ret;
va_list args;
va_start (args, format);
1d644: e28d3014 add r3, sp, #20 <== NOT EXECUTED
1d648: e58d3000 str r3, [sp] <== NOT EXECUTED
fprintf (stderr, "nvdisk:error:");
1d64c: eb008635 bl 3ef28 <fputs> <== NOT EXECUTED
ret = vfprintf (stderr, format, args);
1d650: e5943000 ldr r3, [r4] <== NOT EXECUTED
1d654: e59d2000 ldr r2, [sp] <== NOT EXECUTED
1d658: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
1d65c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
1d660: eb00be86 bl 4d080 <vfprintf> <== NOT EXECUTED
fprintf (stderr, "\n");
1d664: e5943000 ldr r3, [r4] <== NOT EXECUTED
{
int ret;
va_list args;
va_start (args, format);
fprintf (stderr, "nvdisk:error:");
ret = vfprintf (stderr, format, args);
1d668: e1a05000 mov r5, r0 <== NOT EXECUTED
fprintf (stderr, "\n");
1d66c: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
1d670: e3a0000a mov r0, #10 <== NOT EXECUTED
1d674: eb0085e6 bl 3ee14 <fputc> <== NOT EXECUTED
fflush (stderr);
1d678: e5943000 ldr r3, [r4] <== NOT EXECUTED
1d67c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
1d680: eb008443 bl 3e794 <fflush> <== NOT EXECUTED
va_end (args);
return ret;
}
1d684: e1a00005 mov r0, r5 <== NOT EXECUTED
1d688: e8bd4038 pop {r3, r4, r5, lr} <== NOT EXECUTED
1d68c: e28dd010 add sp, sp, #16 <== NOT EXECUTED
1d690: e12fff1e bx lr <== NOT EXECUTED
0001d69c <rtems_nvdisk_get_device>:
/**
* Map a block to a device.
*/
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
1d69c: e1a02000 mov r2, r0 <== NOT EXECUTED
uint32_t device;
if (block >= nvd->block_count)
1d6a0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
1d6a4: e1510000 cmp r1, r0 <== NOT EXECUTED
/**
* Map a block to a device.
*/
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
1d6a8: e1a03001 mov r3, r1 <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
1d6ac: 33a01000 movcc r1, #0 <== NOT EXECUTED
/**
* Map a block to a device.
*/
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
1d6b0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
1d6b4: 31a0c001 movcc ip, r1 <== NOT EXECUTED
1d6b8: 35925018 ldrcc r5, [r2, #24] <== NOT EXECUTED
static rtems_nvdisk_device_ctl*
rtems_nvdisk_get_device (rtems_nvdisk* nvd, uint32_t block)
{
uint32_t device;
if (block >= nvd->block_count)
1d6bc: 3a000010 bcc 1d704 <rtems_nvdisk_get_device+0x68> <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
1d6c0: e59f0058 ldr r0, [pc, #88] ; 1d720 <rtems_nvdisk_get_device+0x84><== NOT EXECUTED
1d6c4: ebffffd8 bl 1d62c <rtems_nvdisk_error> <== NOT EXECUTED
1d6c8: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
1d6cc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
}
for (device = 0; device < nvd->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
1d6d0: e5920014 ldr r0, [r2, #20] <== NOT EXECUTED
1d6d4: e0800001 add r0, r0, r1 <== NOT EXECUTED
if ((block >= dc->block_base) &&
1d6d8: e590400c ldr r4, [r0, #12] <== NOT EXECUTED
1d6dc: e1530004 cmp r3, r4 <== NOT EXECUTED
1d6e0: 3a000005 bcc 1d6fc <rtems_nvdisk_get_device+0x60> <== NOT EXECUTED
(block < (dc->block_base + dc->pages - dc->pages_desc)))
1d6e4: e5907004 ldr r7, [r0, #4] <== NOT EXECUTED
1d6e8: e5906008 ldr r6, [r0, #8] <== NOT EXECUTED
1d6ec: e0844007 add r4, r4, r7 <== NOT EXECUTED
1d6f0: e0664004 rsb r4, r6, r4 <== NOT EXECUTED
1d6f4: e1530004 cmp r3, r4 <== NOT EXECUTED
1d6f8: 38bd80f0 popcc {r4, r5, r6, r7, pc} <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: bad block: %d", block);
return NULL;
}
for (device = 0; device < nvd->device_count; device++)
1d6fc: e28cc001 add ip, ip, #1 <== NOT EXECUTED
1d700: e2811014 add r1, r1, #20 <== NOT EXECUTED
1d704: e15c0005 cmp ip, r5 <== NOT EXECUTED
1d708: 3afffff0 bcc 1d6d0 <rtems_nvdisk_get_device+0x34> <== 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);
1d70c: e1a01003 mov r1, r3 <== NOT EXECUTED
1d710: e59f000c ldr r0, [pc, #12] ; 1d724 <rtems_nvdisk_get_device+0x88><== NOT EXECUTED
1d714: ebffffc4 bl 1d62c <rtems_nvdisk_error> <== NOT EXECUTED
1d718: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL;
}
1d71c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
0001dd0c <rtems_nvdisk_initialize>:
*/
rtems_device_driver
rtems_nvdisk_initialize (rtems_device_major_number major,
rtems_device_minor_number minor,
void* arg __attribute__((unused)))
{
1dd0c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1dd10: e24dd038 sub sp, sp, #56 ; 0x38 <== NOT EXECUTED
1dd14: e58d0018 str r0, [sp, #24] <== NOT EXECUTED
const rtems_nvdisk_config* c = rtems_nvdisk_configuration;
rtems_nvdisk* nvd;
rtems_status_code sc;
sc = rtems_disk_io_initialize ();
1dd18: ebffa0e8 bl 60c0 <rtems_disk_io_initialize> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1dd1c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
1dd20: 1a000080 bne 1df28 <rtems_nvdisk_initialize+0x21c> <== NOT EXECUTED
return sc;
sc = rtems_nvdisk_crc16_gen_factors (0x8408);
1dd24: e59f0208 ldr r0, [pc, #520] ; 1df34 <rtems_nvdisk_initialize+0x228><== NOT EXECUTED
1dd28: ebffffdb bl 1dc9c <rtems_nvdisk_crc16_gen_factors> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1dd2c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1dd30: 11a08006 movne r8, r6 <== NOT EXECUTED
1dd34: 1a00007b bne 1df28 <rtems_nvdisk_initialize+0x21c> <== NOT EXECUTED
return sc;
rtems_nvdisks = calloc (rtems_nvdisk_configuration_size,
1dd38: e59f41f8 ldr r4, [pc, #504] ; 1df38 <rtems_nvdisk_initialize+0x22c><== NOT EXECUTED
1dd3c: e3a01028 mov r1, #40 ; 0x28 <== NOT EXECUTED
1dd40: e5940000 ldr r0, [r4] <== NOT EXECUTED
1dd44: ebffa4ea bl 70f4 <calloc> <== NOT EXECUTED
1dd48: e59f31ec ldr r3, [pc, #492] ; 1df3c <rtems_nvdisk_initialize+0x230><== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
1dd4c: 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,
1dd50: e5830004 str r0, [r3, #4] <== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
1dd54: 159f51e4 ldrne r5, [pc, #484] ; 1df40 <rtems_nvdisk_initialize+0x234><== NOT EXECUTED
1dd58: 11a07006 movne r7, r6 <== NOT EXECUTED
1dd5c: 1a000068 bne 1df04 <rtems_nvdisk_initialize+0x1f8> <== NOT EXECUTED
1dd60: ea00006f b 1df24 <rtems_nvdisk_initialize+0x218> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
{
char name[] = RTEMS_NVDISK_DEVICE_BASE_NAME "a";
1dd64: e59f11d8 ldr r1, [pc, #472] ; 1df44 <rtems_nvdisk_initialize+0x238><== NOT EXECUTED
1dd68: e3a0200a mov r2, #10 <== NOT EXECUTED
1dd6c: e28d0024 add r0, sp, #36 ; 0x24 <== NOT EXECUTED
1dd70: eb008e44 bl 41688 <memcpy> <== NOT EXECUTED
dev_t dev = rtems_filesystem_make_dev_t (major, minor);
uint32_t device;
uint32_t blocks = 0;
nvd = &rtems_nvdisks[minor];
1dd74: e59f11c0 ldr r1, [pc, #448] ; 1df3c <rtems_nvdisk_initialize+0x230><== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
1dd78: e5dd202d ldrb r2, [sp, #45] ; 0x2d <== 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];
1dd7c: e5913004 ldr r3, [r1, #4] <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
1dd80: e59dc018 ldr ip, [sp, #24] <== NOT EXECUTED
temp.__overlay.minor = _minor;
1dd84: e58d7034 str r7, [sp, #52] ; 0x34 <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
1dd88: e58dc030 str ip, [sp, #48] ; 0x30 <== NOT EXECUTED
1dd8c: e0834006 add r4, r3, r6 <== NOT EXECUTED
name [sizeof(RTEMS_NVDISK_DEVICE_BASE_NAME)] += minor;
1dd90: e0872002 add r2, r7, r2 <== NOT EXECUTED
1dd94: e5cd202d strb r2, [sp, #45] ; 0x2d <== NOT EXECUTED
temp.__overlay.minor = _minor;
return temp.device;
1dd98: e28d2030 add r2, sp, #48 ; 0x30 <== NOT EXECUTED
1dd9c: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
nvd->major = major;
1dda0: e783c006 str ip, [r3, r6] <== NOT EXECUTED
nvd->minor = minor;
1dda4: e5847004 str r7, [r4, #4] <== NOT EXECUTED
nvd->flags = c->flags;
1dda8: e5953000 ldr r3, [r5] <== NOT EXECUTED
1ddac: e5843008 str r3, [r4, #8] <== NOT EXECUTED
nvd->block_size = c->block_size;
1ddb0: e515300c ldr r3, [r5, #-12] <== NOT EXECUTED
1ddb4: e584300c str r3, [r4, #12] <== NOT EXECUTED
nvd->info_level = c->info_level;
1ddb8: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
1ddbc: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
1ddc0: e58d101c str r1, [sp, #28] <== NOT EXECUTED
1ddc4: e58d2020 str r2, [sp, #32] <== NOT EXECUTED
nvd->devices = calloc (c->device_count, sizeof (rtems_nvdisk_device_ctl));
1ddc8: e5150008 ldr r0, [r5, #-8] <== NOT EXECUTED
1ddcc: e3a01014 mov r1, #20 <== NOT EXECUTED
1ddd0: ebffa4c7 bl 70f4 <calloc> <== NOT EXECUTED
if (!nvd->devices)
1ddd4: 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));
1ddd8: e5840014 str r0, [r4, #20] <== NOT EXECUTED
if (!nvd->devices)
1dddc: 0a000050 beq 1df24 <rtems_nvdisk_initialize+0x218> <== NOT EXECUTED
1dde0: e3a08000 mov r8, #0 <== NOT EXECUTED
1dde4: e1a0a008 mov sl, r8 <== NOT EXECUTED
1dde8: e1a09008 mov r9, r8 <== NOT EXECUTED
1ddec: e1a03006 mov r3, r6 <== NOT EXECUTED
1ddf0: ea00001f b 1de74 <rtems_nvdisk_initialize+0x168> <== NOT EXECUTED
return RTEMS_NO_MEMORY;
for (device = 0; device < c->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
1ddf4: e5946014 ldr r6, [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;
1ddf8: e515b004 ldr fp, [r5, #-4] <== NOT EXECUTED
for (device = 0; device < c->device_count; device++)
{
rtems_nvdisk_device_ctl* dc = &nvd->devices[device];
dc->device = device;
1ddfc: e7869008 str r9, [r6, r8] <== 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;
1de00: e08bb209 add fp, fp, r9, lsl #4 <== NOT EXECUTED
1de04: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
1de08: e59b0008 ldr r0, [fp, #8] <== NOT EXECUTED
1de0c: e58d300c str r3, [sp, #12] <== NOT EXECUTED
1de10: eb00e13b bl 56304 <__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];
1de14: e0866008 add r6, r6, r8 <== NOT EXECUTED
dc->device = device;
dc->pages = rtems_nvdisk_pages_in_device (nvd, &c->devices[device]);
1de18: e5860004 str r0, [r6, #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;
1de1c: e594c00c ldr ip, [r4, #12] <== NOT EXECUTED
1de20: e1a02000 mov r2, 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;
1de24: e1a0100c mov r1, ip <== NOT EXECUTED
1de28: e59b0008 ldr r0, [fp, #8] <== NOT EXECUTED
1de2c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
1de30: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
1de34: eb00e132 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
1de38: e59dc014 ldr ip, [sp, #20] <== NOT EXECUTED
1de3c: e1a00080 lsl r0, r0, #1 <== NOT EXECUTED
1de40: e2400001 sub r0, r0, #1 <== NOT EXECUTED
1de44: e1a0100c mov r1, ip <== NOT EXECUTED
1de48: eb00e12d bl 56304 <__aeabi_uidiv> <== 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;
1de4c: e59d2010 ldr r2, [sp, #16] <== 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;
1de50: e2800001 add r0, r0, #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;
1de54: e0602002 rsb r2, r0, r2 <== NOT EXECUTED
dc->descriptor = &c->devices[device];
1de58: e586b010 str fp, [r6, #16] <== 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]);
1de5c: e5860008 str r0, [r6, #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++)
1de60: e59d300c ldr r3, [sp, #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]);
dc->block_base = blocks;
1de64: e586a00c str sl, [r6, #12] <== 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++)
1de68: e2899001 add r9, r9, #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;
1de6c: e08aa002 add sl, sl, r2 <== 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++)
1de70: e2888014 add r8, r8, #20 <== NOT EXECUTED
1de74: e5152008 ldr r2, [r5, #-8] <== NOT EXECUTED
1de78: e1590002 cmp r9, r2 <== NOT EXECUTED
1de7c: 3affffdc bcc 1ddf4 <rtems_nvdisk_initialize+0xe8> <== NOT EXECUTED
blocks += dc->pages - dc->pages_desc;
dc->descriptor = &c->devices[device];
}
nvd->block_count = blocks;
1de80: e584a010 str sl, [r4, #16] <== NOT EXECUTED
1de84: e1a06003 mov r6, r3 <== NOT EXECUTED
nvd->device_count = c->device_count;
1de88: e5153008 ldr r3, [r5, #-8] <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
1de8c: e59fc0b4 ldr ip, [pc, #180] ; 1df48 <rtems_nvdisk_initialize+0x23c><== NOT EXECUTED
dc->descriptor = &c->devices[device];
}
nvd->block_count = blocks;
nvd->device_count = c->device_count;
1de90: e5843018 str r3, [r4, #24] <== NOT EXECUTED
sc = rtems_disk_create_phys(dev, c->block_size, blocks,
1de94: e58dc000 str ip, [sp] <== NOT EXECUTED
1de98: e3a0c000 mov ip, #0 <== NOT EXECUTED
1de9c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
1dea0: e28d101c add r1, sp, #28 <== NOT EXECUTED
1dea4: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
1dea8: e28dc024 add ip, sp, #36 ; 0x24 <== NOT EXECUTED
1deac: e1a0300a mov r3, sl <== NOT EXECUTED
1deb0: e515200c ldr r2, [r5, #-12] <== NOT EXECUTED
1deb4: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
1deb8: ebffa22d bl 6774 <rtems_disk_create_phys> <== NOT EXECUTED
rtems_nvdisk_ioctl, NULL, name);
if (sc != RTEMS_SUCCESSFUL)
1debc: e2508000 subs r8, r0, #0 <== NOT EXECUTED
{
rtems_nvdisk_error ("disk create phy failed");
1dec0: 159f0084 ldrne r0, [pc, #132] ; 1df4c <rtems_nvdisk_initialize+0x240><== NOT EXECUTED
1dec4: 1a00000b bne 1def8 <rtems_nvdisk_initialize+0x1ec> <== NOT EXECUTED
return sc;
}
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
1dec8: e2844020 add r4, r4, #32 <== NOT EXECUTED
1decc: e59f007c ldr r0, [pc, #124] ; 1df50 <rtems_nvdisk_initialize+0x244><== NOT EXECUTED
1ded0: e3a01001 mov r1, #1 <== NOT EXECUTED
1ded4: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED
1ded8: e3a03000 mov r3, #0 <== NOT EXECUTED
1dedc: e58d4000 str r4, [sp] <== NOT EXECUTED
1dee0: ebffb5cd bl b61c <rtems_semaphore_create> <== NOT EXECUTED
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
1dee4: e2508000 subs r8, r0, #0 <== NOT EXECUTED
{
rtems_nvdisk_error ("disk create phy failed");
return sc;
}
sc = rtems_semaphore_create (rtems_build_name ('N', 'V', 'D', 'K'), 1,
1dee8: e2866028 add r6, r6, #40 ; 0x28 <== NOT EXECUTED
1deec: e2855014 add r5, r5, #20 <== NOT EXECUTED
RTEMS_PRIORITY | RTEMS_BINARY_SEMAPHORE |
RTEMS_INHERIT_PRIORITY, 0, &nvd->lock);
if (sc != RTEMS_SUCCESSFUL)
1def0: 0a000002 beq 1df00 <rtems_nvdisk_initialize+0x1f4> <== NOT EXECUTED
{
rtems_nvdisk_error ("disk lock create failed");
1def4: e59f0058 ldr r0, [pc, #88] ; 1df54 <rtems_nvdisk_initialize+0x248><== NOT EXECUTED
1def8: ebfffdcb bl 1d62c <rtems_nvdisk_error> <== NOT EXECUTED
return sc;
1defc: ea000009 b 1df28 <rtems_nvdisk_initialize+0x21c> <== NOT EXECUTED
sizeof (rtems_nvdisk));
if (!rtems_nvdisks)
return RTEMS_NO_MEMORY;
for (minor = 0; minor < rtems_nvdisk_configuration_size; minor++, c++)
1df00: e2877001 add r7, r7, #1 <== NOT EXECUTED
1df04: e59f102c ldr r1, [pc, #44] ; 1df38 <rtems_nvdisk_initialize+0x22c><== NOT EXECUTED
1df08: e5913000 ldr r3, [r1] <== NOT EXECUTED
1df0c: e1570003 cmp r7, r3 <== NOT EXECUTED
1df10: 3affff93 bcc 1dd64 <rtems_nvdisk_initialize+0x58> <== NOT EXECUTED
rtems_nvdisk_error ("disk lock create failed");
return sc;
}
}
rtems_nvdisk_count = rtems_nvdisk_configuration_size;
1df14: e59f2020 ldr r2, [pc, #32] ; 1df3c <rtems_nvdisk_initialize+0x230><== NOT EXECUTED
1df18: e3a08000 mov r8, #0 <== NOT EXECUTED
1df1c: e5823000 str r3, [r2] <== NOT EXECUTED
return RTEMS_SUCCESSFUL;
1df20: ea000000 b 1df28 <rtems_nvdisk_initialize+0x21c> <== NOT EXECUTED
1df24: e3a0801a mov r8, #26 <== NOT EXECUTED
}
1df28: e1a00008 mov r0, r8 <== NOT EXECUTED
1df2c: e28dd038 add sp, sp, #56 ; 0x38 <== NOT EXECUTED
1df30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001d728 <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)
{
1d728: 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)
1d72c: e59f6550 ldr r6, [pc, #1360] ; 1dc84 <rtems_nvdisk_ioctl+0x55c><== NOT EXECUTED
dev_t device
)
{
union __rtems_dev_t temp;
temp.device = device;
1d730: 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)
{
1d734: e1a07000 mov r7, 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)
1d738: e5960000 ldr r0, [r6] <== NOT EXECUTED
1d73c: e1530000 cmp r3, r0 <== 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)
{
1d740: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
1d744: e1a05001 mov r5, r1 <== NOT EXECUTED
1d748: e1a04002 mov r4, r2 <== 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)
1d74c: 2a000006 bcs 1d76c <rtems_nvdisk_ioctl+0x44> <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
if (rtems_nvdisks[minor].device_count == 0)
1d750: e3a02028 mov r2, #40 ; 0x28 <== NOT EXECUTED
1d754: e0090392 mul r9, r2, r3 <== NOT EXECUTED
1d758: e5963004 ldr r3, [r6, #4] <== NOT EXECUTED
1d75c: e0833009 add r3, r3, r9 <== NOT EXECUTED
1d760: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
1d764: e3530000 cmp r3, #0 <== NOT EXECUTED
1d768: 1a000004 bne 1d780 <rtems_nvdisk_ioctl+0x58> <== NOT EXECUTED
{
errno = ENODEV;
1d76c: eb008315 bl 3e3c8 <__errno> <== NOT EXECUTED
1d770: e3a03013 mov r3, #19 <== NOT EXECUTED
1d774: e5803000 str r3, [r0] <== NOT EXECUTED
1d778: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
1d77c: ea00013a b 1dc6c <rtems_nvdisk_ioctl+0x544> <== NOT EXECUTED
}
errno = 0;
1d780: eb008310 bl 3e3c8 <__errno> <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
1d784: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
1d788: e3a03000 mov r3, #0 <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
1d78c: e0822009 add r2, r2, r9 <== NOT EXECUTED
{
errno = ENODEV;
return -1;
}
errno = 0;
1d790: e5803000 str r3, [r0] <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
1d794: e1a01003 mov r1, r3 <== NOT EXECUTED
1d798: e5920020 ldr r0, [r2, #32] <== NOT EXECUTED
1d79c: e1a02003 mov r2, r3 <== NOT EXECUTED
1d7a0: ebffb846 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1d7a4: e2508000 subs r8, r0, #0 <== NOT EXECUTED
1d7a8: 1a000128 bne 1dc50 <rtems_nvdisk_ioctl+0x528> <== NOT EXECUTED
errno = EIO;
else
{
errno = 0;
1d7ac: eb008305 bl 3e3c8 <__errno> <== NOT EXECUTED
switch (req)
1d7b0: e59f34d0 ldr r3, [pc, #1232] ; 1dc88 <rtems_nvdisk_ioctl+0x560><== NOT EXECUTED
1d7b4: e1550003 cmp r5, r3 <== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
break;
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
1d7b8: 05963004 ldreq r3, [r6, #4] <== NOT EXECUTED
1d7bc: 00833009 addeq r3, r3, r9 <== NOT EXECUTED
sc = rtems_semaphore_obtain (rtems_nvdisks[minor].lock, RTEMS_WAIT, 0);
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
1d7c0: e5808000 str r8, [r0] <== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
break;
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
1d7c4: 05834024 streq r4, [r3, #36] ; 0x24 <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
errno = EIO;
else
{
errno = 0;
switch (req)
1d7c8: 0a000119 beq 1dc34 <rtems_nvdisk_ioctl+0x50c> <== NOT EXECUTED
1d7cc: e59f34b8 ldr r3, [pc, #1208] ; 1dc8c <rtems_nvdisk_ioctl+0x564><== NOT EXECUTED
1d7d0: e1550003 cmp r5, r3 <== NOT EXECUTED
1d7d4: 0a000003 beq 1d7e8 <rtems_nvdisk_ioctl+0xc0> <== NOT EXECUTED
1d7d8: e59f34b0 ldr r3, [pc, #1200] ; 1dc90 <rtems_nvdisk_ioctl+0x568><== NOT EXECUTED
1d7dc: e1550003 cmp r5, r3 <== NOT EXECUTED
1d7e0: 1a00010f bne 1dc24 <rtems_nvdisk_ioctl+0x4fc> <== NOT EXECUTED
1d7e4: ea0000e3 b 1db78 <rtems_nvdisk_ioctl+0x450> <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
1d7e8: e5947000 ldr r7, [r4] <== NOT EXECUTED
1d7ec: e3570000 cmp r7, #0 <== NOT EXECUTED
1d7f0: 0a000002 beq 1d800 <rtems_nvdisk_ioctl+0xd8> <== NOT EXECUTED
1d7f4: e3570001 cmp r7, #1 <== NOT EXECUTED
1d7f8: 1a0000da bne 1db68 <rtems_nvdisk_ioctl+0x440> <== NOT EXECUTED
1d7fc: ea000070 b 1d9c4 <rtems_nvdisk_ioctl+0x29c> <== NOT EXECUTED
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
1d800: eb0082f0 bl 3e3c8 <__errno> <== NOT EXECUTED
1d804: e5965004 ldr r5, [r6, #4] <== NOT EXECUTED
1d808: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
* @retval int The ioctl return value.
*/
static int
rtems_nvdisk_read (rtems_nvdisk* nvd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
1d80c: e58d700c str r7, [sp, #12] <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
1d810: e0855009 add r5, r5, r9 <== NOT EXECUTED
* @retval int The ioctl return value.
*/
static int
rtems_nvdisk_read (rtems_nvdisk* nvd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
1d814: e2846018 add r6, r4, #24 <== NOT EXECUTED
1d818: ea00005c b 1d990 <rtems_nvdisk_ioctl+0x268> <== NOT EXECUTED
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
1d81c: e5960004 ldr r0, [r6, #4] <== NOT EXECUTED
1d820: e595100c ldr r1, [r5, #12] <== NOT EXECUTED
1d824: eb00e2b6 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
data = sg->buffer;
1d828: e3a0a000 mov sl, #0 <== NOT EXECUTED
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
1d82c: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
data = sg->buffer;
1d830: e5967008 ldr r7, [r6, #8] <== NOT EXECUTED
1d834: e1a08004 mov r8, r4 <== NOT EXECUTED
1d838: ea00004c b 1d970 <rtems_nvdisk_ioctl+0x248> <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_read_block (nvd, sg->block + b, data);
1d83c: e5963000 ldr r3, [r6] <== NOT EXECUTED
1d840: e08a3003 add r3, sl, r3 <== NOT EXECUTED
uint32_t page;
uint16_t crc;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
1d844: e1a00005 mov r0, r5 <== NOT EXECUTED
1d848: e1a01003 mov r1, r3 <== NOT EXECUTED
uint32_t b;
nvb = sg->length / nvd->block_size;
data = sg->buffer;
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_read_block (nvd, sg->block + b, data);
1d84c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
uint32_t page;
uint16_t crc;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
1d850: ebffff91 bl 1d69c <rtems_nvdisk_get_device> <== NOT EXECUTED
if (!dc)
1d854: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1d858: 01a04008 moveq r4, r8 <== NOT EXECUTED
1d85c: 0a00003d beq 1d958 <rtems_nvdisk_ioctl+0x230> <== 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;
1d860: e5952014 ldr r2, [r5, #20] <== 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);
1d864: 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;
1d868: e3a03014 mov r3, #20 <== NOT EXECUTED
1d86c: e0232390 mla r3, r0, r3, r2 <== NOT EXECUTED
1d870: 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;
1d874: e594b00c ldr fp, [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);
1d878: e28d101a add r1, sp, #26 <== NOT EXECUTED
1d87c: e3a02002 mov r2, #2 <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
1d880: e59de008 ldr lr, [sp, #8] <== 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);
1d884: e593c00c ldr ip, [r3, #12] <== NOT EXECUTED
1d888: e88d0006 stm sp, {r1, r2} <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
1d88c: e06bb00e rsb fp, fp, lr <== 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);
1d890: e8930006 ldm r3, {r1, r2} <== NOT EXECUTED
1d894: e1a0308b lsl r3, fp, #1 <== NOT EXECUTED
1d898: e1a0e00f mov lr, pc <== NOT EXECUTED
1d89c: e59cf000 ldr pc, [ip] <== NOT EXECUTED
block, dc->device, page, crc);
#endif
ret = rtems_nvdisk_read_checksum (nvd, dc->device, page, &crc);
if (ret)
1d8a0: e2501000 subs r1, r0, #0 <== NOT EXECUTED
1d8a4: 1a00002d bne 1d960 <rtems_nvdisk_ioctl+0x238> <== NOT EXECUTED
return ret;
if (crc == 0xffff)
1d8a8: e59f23e4 ldr r2, [pc, #996] ; 1dc94 <rtems_nvdisk_ioctl+0x56c><== NOT EXECUTED
1d8ac: e1dd31ba ldrh r3, [sp, #26] <== NOT EXECUTED
1d8b0: e1530002 cmp r3, r2 <== NOT EXECUTED
1d8b4: e595200c ldr r2, [r5, #12] <== NOT EXECUTED
1d8b8: 1a000002 bne 1d8c8 <rtems_nvdisk_ioctl+0x1a0> <== NOT EXECUTED
{
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_warning (nvd, "read-block: crc not set: %d", block);
#endif
memset (buffer, 0, nvd->block_size);
1d8bc: e1a00007 mov r0, r7 <== NOT EXECUTED
1d8c0: eb008ff7 bl 418a4 <memset> <== NOT EXECUTED
1d8c4: ea0000ea b 1dc74 <rtems_nvdisk_ioctl+0x54c> <== 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;
1d8c8: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED
#endif
memset (buffer, 0, nvd->block_size);
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
1d8cc: 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;
1d8d0: e3a03014 mov r3, #20 <== NOT EXECUTED
1d8d4: e0231390 mla r3, r0, r3, r1 <== NOT EXECUTED
1d8d8: e5931010 ldr r1, [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);
1d8dc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
1d8e0: e591c00c ldr ip, [r1, #12] <== NOT EXECUTED
1d8e4: e58d7000 str r7, [sp] <== NOT EXECUTED
1d8e8: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
1d8ec: e08b3003 add r3, fp, r3 <== NOT EXECUTED
1d8f0: e0030392 mul r3, r2, r3 <== NOT EXECUTED
1d8f4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
1d8f8: e1a0e00f mov lr, pc <== NOT EXECUTED
1d8fc: e59cf000 ldr pc, [ip] <== NOT EXECUTED
return 0;
}
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
1d900: e2501000 subs r1, r0, #0 <== NOT EXECUTED
1d904: 1a000015 bne 1d960 <rtems_nvdisk_ioctl+0x238> <== NOT EXECUTED
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
1d908: e59fe374 ldr lr, [pc, #884] ; 1dc84 <rtems_nvdisk_ioctl+0x55c><== NOT EXECUTED
ret = rtems_nvdisk_read_page (nvd, dc->device, page + dc->pages_desc, buffer);
if (ret)
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
1d90c: e595000c ldr r0, [r5, #12] <== NOT EXECUTED
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
1d910: e59e3008 ldr r3, [lr, #8] <== NOT EXECUTED
1d914: e59f2378 ldr r2, [pc, #888] ; 1dc94 <rtems_nvdisk_ioctl+0x56c><== NOT EXECUTED
1d918: ea000005 b 1d934 <rtems_nvdisk_ioctl+0x20c> <== NOT EXECUTED
1d91c: e7d7c001 ldrb ip, [r7, r1] <== NOT EXECUTED
1d920: e022200c eor r2, r2, ip <== NOT EXECUTED
1d924: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
1d928: e1a02082 lsl r2, r2, #1 <== NOT EXECUTED
1d92c: 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++)
1d930: e2811001 add r1, r1, #1 <== NOT EXECUTED
1d934: e1510000 cmp r1, r0 <== NOT EXECUTED
1d938: 3afffff7 bcc 1d91c <rtems_nvdisk_ioctl+0x1f4> <== NOT EXECUTED
if (ret)
return ret;
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
if (cs != crc)
1d93c: e1dd31ba ldrh r3, [sp, #26] <== NOT EXECUTED
1d940: e1520003 cmp r2, r3 <== NOT EXECUTED
1d944: 0a0000ca beq 1dc74 <rtems_nvdisk_ioctl+0x54c> <== NOT EXECUTED
{
rtems_nvdisk_error ("read-block: crc failure: %d: buffer:%04x page:%04x",
1d948: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
1d94c: e59f0344 ldr r0, [pc, #836] ; 1dc98 <rtems_nvdisk_ioctl+0x570><== NOT EXECUTED
1d950: e1a04008 mov r4, r8 <== NOT EXECUTED
1d954: ebffff34 bl 1d62c <rtems_nvdisk_error> <== NOT EXECUTED
1d958: e3a0b005 mov fp, #5 <== NOT EXECUTED
1d95c: ea000001 b 1d968 <rtems_nvdisk_ioctl+0x240> <== NOT EXECUTED
1d960: e1a0b001 mov fp, r1 <== NOT EXECUTED
1d964: e1a04008 mov r4, r8 <== NOT EXECUTED
1d968: e3a0101b mov r1, #27 <== NOT EXECUTED
1d96c: ea00000d b 1d9a8 <rtems_nvdisk_ioctl+0x280> <== 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)
1d970: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
1d974: e15a0001 cmp sl, r1 <== NOT EXECUTED
1d978: 3affffaf bcc 1d83c <rtems_nvdisk_ioctl+0x114> <== 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++)
1d97c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1d980: e2833001 add r3, r3, #1 <== NOT EXECUTED
1d984: e58d300c str r3, [sp, #12] <== NOT EXECUTED
1d988: e1a04008 mov r4, r8 <== NOT EXECUTED
1d98c: e2866010 add r6, r6, #16 <== NOT EXECUTED
1d990: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
1d994: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
1d998: e1520003 cmp r2, r3 <== NOT EXECUTED
1d99c: 3affff9e bcc 1d81c <rtems_nvdisk_ioctl+0xf4> <== NOT EXECUTED
1d9a0: e3a0b000 mov fp, #0 <== NOT EXECUTED
1d9a4: e1a0100b mov r1, fp <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
1d9a8: e584100c str r1, [r4, #12] <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
1d9ac: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
1d9b0: e1a0e00f mov lr, pc <== NOT EXECUTED
1d9b4: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
{
case RTEMS_BLKIO_REQUEST:
switch (r->req)
{
case RTEMS_BLKDEV_REQ_READ:
errno = rtems_nvdisk_read (&rtems_nvdisks[minor], r);
1d9b8: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
1d9bc: e583b000 str fp, [r3] <== NOT EXECUTED
break;
1d9c0: ea00009b b 1dc34 <rtems_nvdisk_ioctl+0x50c> <== NOT EXECUTED
case RTEMS_BLKDEV_REQ_WRITE:
errno = rtems_nvdisk_write (&rtems_nvdisks[minor], r);
1d9c4: eb00827f bl 3e3c8 <__errno> <== NOT EXECUTED
1d9c8: e5965004 ldr r5, [r6, #4] <== NOT EXECUTED
1d9cc: e58d0014 str r0, [sp, #20] <== NOT EXECUTED
* @retval int The ioctl return value.
*/
static int
rtems_nvdisk_write (rtems_nvdisk* nvd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
1d9d0: e58d8008 str r8, [sp, #8] <== 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);
1d9d4: e0855009 add r5, r5, r9 <== NOT EXECUTED
* @retval int The ioctl return value.
*/
static int
rtems_nvdisk_write (rtems_nvdisk* nvd, rtems_blkdev_request* req)
{
rtems_blkdev_sg_buffer* sg = req->bufs;
1d9d8: e2846018 add r6, r4, #24 <== NOT EXECUTED
1d9dc: e1a0b009 mov fp, r9 <== NOT EXECUTED
1d9e0: ea000052 b 1db30 <rtems_nvdisk_ioctl+0x408> <== NOT EXECUTED
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
1d9e4: e5960004 ldr r0, [r6, #4] <== NOT EXECUTED
1d9e8: e595100c ldr r1, [r5, #12] <== NOT EXECUTED
1d9ec: eb00e244 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
data = sg->buffer;
1d9f0: e3a0a000 mov sl, #0 <== NOT EXECUTED
for (bufs = 0; (ret == 0) && (bufs < req->bufnum); bufs++, sg++)
{
uint8_t* data;
uint32_t nvb;
uint32_t b;
nvb = sg->length / nvd->block_size;
1d9f4: e58d0010 str r0, [sp, #16] <== NOT EXECUTED
data = sg->buffer;
1d9f8: e5968008 ldr r8, [r6, #8] <== NOT EXECUTED
1d9fc: e1a09004 mov r9, r4 <== NOT EXECUTED
1da00: ea00003d b 1dafc <rtems_nvdisk_ioctl+0x3d4> <== NOT EXECUTED
for (b = 0; b < nvb; b++, data += nvd->block_size)
{
ret = rtems_nvdisk_write_block (nvd, sg->block + b, data);
1da04: e5967000 ldr r7, [r6] <== NOT EXECUTED
1da08: e08a7007 add r7, sl, r7 <== NOT EXECUTED
rtems_nvdisk_device_ctl* dc;
uint32_t page;
uint16_t cs;
int ret;
dc = rtems_nvdisk_get_device (nvd, block);
1da0c: e1a00005 mov r0, r5 <== NOT EXECUTED
1da10: e1a01007 mov r1, r7 <== NOT EXECUTED
1da14: ebffff20 bl 1d69c <rtems_nvdisk_get_device> <== NOT EXECUTED
if (!dc)
1da18: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1da1c: 0a00003f beq 1db20 <rtems_nvdisk_ioctl+0x3f8> <== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
1da20: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
1da24: e59fe258 ldr lr, [pc, #600] ; 1dc84 <rtems_nvdisk_ioctl+0x55c><== NOT EXECUTED
*/
static uint32_t
rtems_nvdisk_get_page (rtems_nvdisk_device_ctl* dc,
uint32_t block)
{
return block - dc->block_base;
1da28: e0633007 rsb r3, r3, r7 <== NOT EXECUTED
1da2c: e58d300c str r3, [sp, #12] <== NOT EXECUTED
if (!dc)
return EIO;
page = rtems_nvdisk_get_page (dc, block);
cs = rtems_nvdisk_page_checksum (buffer, nvd->block_size);
1da30: e595200c ldr r2, [r5, #12] <== NOT EXECUTED
{
uint16_t cs = 0xffff;
uint32_t i;
for (i = 0; i < page_size; i++, buffer++)
cs = rtems_nvdisk_calc_crc16 (cs, *buffer);
1da34: e59e1008 ldr r1, [lr, #8] <== NOT EXECUTED
1da38: e3a03000 mov r3, #0 <== NOT EXECUTED
1da3c: e59f7250 ldr r7, [pc, #592] ; 1dc94 <rtems_nvdisk_ioctl+0x56c><== NOT EXECUTED
1da40: ea000005 b 1da5c <rtems_nvdisk_ioctl+0x334> <== NOT EXECUTED
1da44: e7d80003 ldrb r0, [r8, r3] <== NOT EXECUTED
1da48: e0270000 eor r0, r7, r0 <== NOT EXECUTED
1da4c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
1da50: e1a00080 lsl r0, r0, #1 <== NOT EXECUTED
1da54: e19170b0 ldrh r7, [r1, r0] <== 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++)
1da58: e2833001 add r3, r3, #1 <== NOT EXECUTED
1da5c: e1530002 cmp r3, r2 <== NOT EXECUTED
1da60: 3afffff7 bcc 1da44 <rtems_nvdisk_ioctl+0x31c> <== 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;
1da64: e5951014 ldr r1, [r5, #20] <== 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);
1da68: 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;
1da6c: e3a03014 mov r3, #20 <== NOT EXECUTED
1da70: e0231390 mla r3, r0, r3, r1 <== NOT EXECUTED
1da74: e5931010 ldr r1, [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);
1da78: e59de00c ldr lr, [sp, #12] <== NOT EXECUTED
1da7c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
1da80: e591c00c ldr ip, [r1, #12] <== NOT EXECUTED
1da84: e58d8000 str r8, [sp] <== NOT EXECUTED
1da88: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
1da8c: e08e3003 add r3, lr, r3 <== NOT EXECUTED
1da90: e0030392 mul r3, r2, r3 <== NOT EXECUTED
1da94: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
1da98: e1a0e00f mov lr, pc <== NOT EXECUTED
1da9c: 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)
1daa0: e3500000 cmp r0, #0 <== NOT EXECUTED
1daa4: 1a00001d bne 1db20 <rtems_nvdisk_ioctl+0x3f8> <== 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;
1daa8: e5952014 ldr r2, [r5, #20] <== 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);
1daac: 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;
1dab0: e3a03014 mov r3, #20 <== NOT EXECUTED
1dab4: e0232390 mla r3, r0, r3, r2 <== NOT EXECUTED
1dab8: e5931010 ldr r1, [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);
1dabc: e28d201a add r2, sp, #26 <== NOT EXECUTED
1dac0: e3a03002 mov r3, #2 <== NOT EXECUTED
1dac4: e591c00c ldr ip, [r1, #12] <== NOT EXECUTED
1dac8: e59de00c ldr lr, [sp, #12] <== NOT EXECUTED
1dacc: e88d000c stm sp, {r2, r3} <== 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);
1dad0: e1cd71ba strh r7, [sp, #26] <== 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);
1dad4: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
1dad8: e1a0308e lsl r3, lr, #1 <== NOT EXECUTED
1dadc: e5911000 ldr r1, [r1] <== NOT EXECUTED
1dae0: e1a0e00f mov lr, pc <== NOT EXECUTED
1dae4: 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)
1dae8: e3500000 cmp r0, #0 <== NOT EXECUTED
1daec: 1a00000b bne 1db20 <rtems_nvdisk_ioctl+0x3f8> <== 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)
1daf0: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
1daf4: e28aa001 add sl, sl, #1 <== NOT EXECUTED
1daf8: e0888003 add r8, r8, r3 <== NOT EXECUTED
1dafc: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
1db00: e15a0001 cmp sl, r1 <== NOT EXECUTED
1db04: 3affffbe bcc 1da04 <rtems_nvdisk_ioctl+0x2dc> <== 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++)
1db08: e59de008 ldr lr, [sp, #8] <== NOT EXECUTED
1db0c: e28ee001 add lr, lr, #1 <== NOT EXECUTED
1db10: e1a04009 mov r4, r9 <== NOT EXECUTED
1db14: e58de008 str lr, [sp, #8] <== NOT EXECUTED
1db18: e2866010 add r6, r6, #16 <== NOT EXECUTED
1db1c: ea000003 b 1db30 <rtems_nvdisk_ioctl+0x408> <== NOT EXECUTED
1db20: e1a04009 mov r4, r9 <== 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)
1db24: e3a0101b mov r1, #27 <== NOT EXECUTED
1db28: e1a0900b mov r9, fp <== NOT EXECUTED
1db2c: ea000005 b 1db48 <rtems_nvdisk_ioctl+0x420> <== 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++)
1db30: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
1db34: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
1db38: e1520003 cmp r2, r3 <== NOT EXECUTED
1db3c: 3affffa8 bcc 1d9e4 <rtems_nvdisk_ioctl+0x2bc> <== NOT EXECUTED
1db40: e1a0900b mov r9, fp <== NOT EXECUTED
1db44: e3a01000 mov r1, #0 <== NOT EXECUTED
if (ret)
break;
}
}
req->status = ret ? RTEMS_IO_ERROR : RTEMS_SUCCESSFUL;
1db48: e584100c str r1, [r4, #12] <== NOT EXECUTED
req->req_done (req->done_arg, req->status);
1db4c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
1db50: e1a0e00f mov lr, pc <== NOT EXECUTED
1db54: e594f004 ldr pc, [r4, #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);
1db58: e59de014 ldr lr, [sp, #20] <== NOT EXECUTED
1db5c: e3a03000 mov r3, #0 <== NOT EXECUTED
1db60: e58e3000 str r3, [lr] <== NOT EXECUTED
break;
1db64: ea000032 b 1dc34 <rtems_nvdisk_ioctl+0x50c> <== NOT EXECUTED
default:
errno = EINVAL;
1db68: eb008216 bl 3e3c8 <__errno> <== NOT EXECUTED
1db6c: e3a03016 mov r3, #22 <== NOT EXECUTED
1db70: e5803000 str r3, [r0] <== NOT EXECUTED
1db74: ea00002e b 1dc34 <rtems_nvdisk_ioctl+0x50c> <== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
1db78: eb008212 bl 3e3c8 <__errno> <== NOT EXECUTED
1db7c: e5966004 ldr r6, [r6, #4] <== NOT EXECUTED
1db80: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
1db84: e1a04008 mov r4, r8 <== NOT EXECUTED
1db88: e0866009 add r6, r6, r9 <== 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;
1db8c: e3a0a014 mov sl, #20 <== 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);
1db90: e28db01a add fp, sp, #26 <== NOT EXECUTED
1db94: ea00001b b 1dc08 <rtems_nvdisk_ioctl+0x4e0> <== 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];
1db98: e5967014 ldr r7, [r6, #20] <== NOT EXECUTED
1db9c: e3a05000 mov r5, #0 <== NOT EXECUTED
1dba0: e0877004 add r7, r7, r4 <== NOT EXECUTED
1dba4: ea000010 b 1dbec <rtems_nvdisk_ioctl+0x4c4> <== 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;
1dba8: e5961014 ldr r1, [r6, #20] <== 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);
1dbac: e5970000 ldr r0, [r7] <== 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;
1dbb0: e022109a mla r2, sl, r0, r1 <== NOT EXECUTED
1dbb4: e5921010 ldr r1, [r2, #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);
1dbb8: e3a02002 mov r2, #2 <== NOT EXECUTED
1dbbc: e591c00c ldr ip, [r1, #12] <== NOT EXECUTED
1dbc0: e58db000 str fp, [sp] <== NOT EXECUTED
1dbc4: e58d2004 str r2, [sp, #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);
1dbc8: 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);
1dbcc: e5912004 ldr r2, [r1, #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);
1dbd0: e1cde1ba strh lr, [sp, #26] <== 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);
1dbd4: e5911000 ldr r1, [r1] <== NOT EXECUTED
1dbd8: e1a0e00f mov lr, pc <== NOT EXECUTED
1dbdc: 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)
1dbe0: e3500000 cmp r0, #0 <== NOT EXECUTED
1dbe4: 1a00000b bne 1dc18 <rtems_nvdisk_ioctl+0x4f0> <== 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++)
1dbe8: e2855001 add r5, r5, #1 <== NOT EXECUTED
1dbec: e9970006 ldmib r7, {r1, r2} <== NOT EXECUTED
1dbf0: e0412002 sub r2, r1, r2 <== NOT EXECUTED
1dbf4: e1550002 cmp r5, r2 <== 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);
1dbf8: e1a03085 lsl r3, r5, #1 <== 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++)
1dbfc: 3affffe9 bcc 1dba8 <rtems_nvdisk_ioctl+0x480> <== NOT EXECUTED
#if RTEMS_NVDISK_TRACE
rtems_nvdisk_info (nvd, "erase-disk");
#endif
for (device = 0; device < nvd->device_count; device++)
1dc00: e2888001 add r8, r8, #1 <== NOT EXECUTED
1dc04: e2844014 add r4, r4, #20 <== NOT EXECUTED
1dc08: e5963018 ldr r3, [r6, #24] <== NOT EXECUTED
1dc0c: e1580003 cmp r8, r3 <== NOT EXECUTED
1dc10: 3affffe0 bcc 1db98 <rtems_nvdisk_ioctl+0x470> <== NOT EXECUTED
1dc14: e3a00000 mov r0, #0 <== NOT EXECUTED
break;
}
break;
case RTEMS_NVDISK_IOCTL_ERASE_DISK:
errno = rtems_nvdisk_erase_disk (&rtems_nvdisks[minor]);
1dc18: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
1dc1c: e5820000 str r0, [r2] <== NOT EXECUTED
break;
1dc20: ea000003 b 1dc34 <rtems_nvdisk_ioctl+0x50c> <== NOT EXECUTED
case RTEMS_NVDISK_IOCTL_INFO_LEVEL:
rtems_nvdisks[minor].info_level = (uintptr_t) argp;
break;
default:
rtems_blkdev_ioctl (dd, req, argp);
1dc24: e1a00007 mov r0, r7 <== NOT EXECUTED
1dc28: e1a01005 mov r1, r5 <== NOT EXECUTED
1dc2c: e1a02004 mov r2, r4 <== NOT EXECUTED
1dc30: ebff9ee2 bl 57c0 <rtems_blkdev_ioctl> <== NOT EXECUTED
break;
}
sc = rtems_semaphore_release (rtems_nvdisks[minor].lock);
1dc34: e59f3048 ldr r3, [pc, #72] ; 1dc84 <rtems_nvdisk_ioctl+0x55c><== NOT EXECUTED
1dc38: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
1dc3c: e0839009 add r9, r3, r9 <== NOT EXECUTED
1dc40: e5990020 ldr r0, [r9, #32] <== NOT EXECUTED
1dc44: ebffb763 bl b9d8 <rtems_semaphore_release> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1dc48: e3500000 cmp r0, #0 <== NOT EXECUTED
1dc4c: 0a000002 beq 1dc5c <rtems_nvdisk_ioctl+0x534> <== NOT EXECUTED
errno = EIO;
1dc50: eb0081dc bl 3e3c8 <__errno> <== NOT EXECUTED
1dc54: e3a03005 mov r3, #5 <== NOT EXECUTED
1dc58: e5803000 str r3, [r0] <== NOT EXECUTED
}
return errno == 0 ? 0 : -1;
1dc5c: eb0081d9 bl 3e3c8 <__errno> <== NOT EXECUTED
1dc60: e5900000 ldr r0, [r0] <== NOT EXECUTED
1dc64: e3500000 cmp r0, #0 <== NOT EXECUTED
1dc68: 13e00000 mvnne r0, #0 <== NOT EXECUTED
}
1dc6c: e28dd01c add sp, sp, #28 <== NOT EXECUTED
1dc70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== 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)
1dc74: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
1dc78: e28aa001 add sl, sl, #1 <== NOT EXECUTED
1dc7c: e0877003 add r7, r7, r3 <== NOT EXECUTED
1dc80: eaffff3a b 1d970 <rtems_nvdisk_ioctl+0x248> <== NOT EXECUTED
0001df90 <rtems_nvdisk_sram_read>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
void* buffer,
size_t size)
{
1df90: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
memcpy (buffer, (base + offset), size);
1df94: e0821003 add r1, r2, r3 <== NOT EXECUTED
1df98: e99d0005 ldmib sp, {r0, r2} <== NOT EXECUTED
1df9c: eb008db9 bl 41688 <memcpy> <== NOT EXECUTED
return 0;
}
1dfa0: e3a00000 mov r0, #0 <== NOT EXECUTED
1dfa4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0001df58 <rtems_nvdisk_sram_verify>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
1df58: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
return memcmp ((base + offset), buffer, size) == 0 ? 0 : EIO;
1df5c: e0820003 add r0, r2, r3 <== NOT EXECUTED
1df60: e99d0006 ldmib sp, {r1, r2} <== NOT EXECUTED
1df64: eb008d9d bl 415e0 <memcmp> <== NOT EXECUTED
}
1df68: e3500000 cmp r0, #0 <== NOT EXECUTED
1df6c: 13a00005 movne r0, #5 <== NOT EXECUTED
1df70: 03a00000 moveq r0, #0 <== NOT EXECUTED
1df74: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0001df78 <rtems_nvdisk_sram_write>:
uint32_t flags __attribute__((unused)),
void* base,
uint32_t offset,
const void* buffer,
size_t size)
{
1df78: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
memcpy ((base + offset), buffer, size);
1df7c: e0820003 add r0, r2, r3 <== NOT EXECUTED
1df80: e99d0006 ldmib sp, {r1, r2} <== NOT EXECUTED
1df84: eb008dbf bl 41688 <memcpy> <== NOT EXECUTED
return 0;
}
1df88: e3a00000 mov r0, #0 <== NOT EXECUTED
1df8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00006654 <rtems_panic>:
void rtems_panic(
const char *printf_format,
...
)
{
6654: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED
6658: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist;
va_start(arglist, printf_format);
665c: e28d300c add r3, sp, #12 <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6660: e1a02003 mov r2, r3 <== NOT EXECUTED
6664: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
6668: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
...
)
{
va_list arglist;
va_start(arglist, printf_format);
666c: e58d3000 str r3, [sp] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6670: ebffff8e bl 64b0 <rtems_verror> <== NOT EXECUTED
va_end(arglist);
}
6674: e8bd4008 pop {r3, lr} <== NOT EXECUTED
6678: e28dd010 add sp, sp, #16 <== NOT EXECUTED
667c: e12fff1e bx lr <== NOT EXECUTED
000088a4 <rtems_pipe_initialize>:
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
if (!rtems_pipe_configured)
88a4: e59f3048 ldr r3, [pc, #72] ; 88f4 <rtems_pipe_initialize+0x50>
88a8: e5d33000 ldrb r3, [r3]
88ac: e3530000 cmp r3, #0
/*
* Initialization of FIFO/pipe module.
*/
void rtems_pipe_initialize (void)
{
88b0: e92d4001 push {r0, lr}
if (!rtems_pipe_configured)
88b4: 0a00000d beq 88f0 <rtems_pipe_initialize+0x4c>
return;
if (rtems_pipe_semaphore)
88b8: e59fc038 ldr ip, [pc, #56] ; 88f8 <rtems_pipe_initialize+0x54><== NOT EXECUTED
88bc: e59c3000 ldr r3, [ip] <== NOT EXECUTED
88c0: e3530000 cmp r3, #0 <== NOT EXECUTED
88c4: 1a000009 bne 88f0 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
return;
rtems_status_code sc;
sc = rtems_semaphore_create(
88c8: e59f002c ldr r0, [pc, #44] ; 88fc <rtems_pipe_initialize+0x58><== NOT EXECUTED
88cc: e3a01001 mov r1, #1 <== NOT EXECUTED
88d0: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED
88d4: e58dc000 str ip, [sp] <== NOT EXECUTED
88d8: ebfff19d bl 4f54 <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)
88dc: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
88e0: 1bfff3b1 blne 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interval now;
now = rtems_clock_get_ticks_since_boot();
88e4: ebfff0a0 bl 4b6c <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
rtems_pipe_no = now;
88e8: e59f3010 ldr r3, [pc, #16] ; 8900 <rtems_pipe_initialize+0x5c><== NOT EXECUTED
88ec: e1c300b0 strh r0, [r3] <== NOT EXECUTED
}
88f0: e8bd8008 pop {r3, pc}
0003d65c <rtems_rfs_bitmap_close>:
return rtems_rfs_bitmap_create_search (control);
}
int
rtems_rfs_bitmap_close (rtems_rfs_bitmap_control* control)
{
3d65c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
free (control->search_bits);
3d660: e5900014 ldr r0, [r0, #20] <== NOT EXECUTED
3d664: ebff2812 bl 76b4 <free> <== NOT EXECUTED
return 0;
}
3d668: e3a00000 mov r0, #0 <== NOT EXECUTED
3d66c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0003d6c0 <rtems_rfs_bitmap_create_search>:
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
3d6c0: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== 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);
3d6c4: e1a0100d mov r1, sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_create_search (rtems_rfs_bitmap_control* control)
{
3d6c8: 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);
3d6cc: ebffffe7 bl 3d670 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
3d6d0: e3500000 cmp r0, #0 <== NOT EXECUTED
3d6d4: ca000021 bgt 3d760 <rtems_rfs_bitmap_create_search+0xa0> <== NOT EXECUTED
return rc;
control->free = 0;
search_map = control->search_bits;
3d6d8: e594c014 ldr ip, [r4, #20] <== NOT EXECUTED
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
3d6dc: e3e02000 mvn r2, #0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
control->free = 0;
3d6e0: e3a03000 mov r3, #0 <== NOT EXECUTED
3d6e4: e5843010 str r3, [r4, #16] <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
3d6e8: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
3d6ec: e1a07002 mov r7, r2 <== NOT EXECUTED
control->free = 0;
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
3d6f0: e58c2000 str r2, [ip] <== NOT EXECUTED
3d6f4: e59d1000 ldr r1, [sp] <== 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))
3d6f8: e3a08001 mov r8, #1 <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
3d6fc: ea000015 b 3d758 <rtems_rfs_bitmap_create_search+0x98> <== NOT EXECUTED
{
rtems_rfs_bitmap_element bits;
int available;
if (size < rtems_rfs_bitmap_element_bits ())
3d700: e350001f cmp r0, #31 <== NOT EXECUTED
3d704: e5916000 ldr r6, [r1] <== NOT EXECUTED
{
/*
* Use the normal bit operators because we do not change the bits just merge
* the 2 separate parts.
*/
bits1 &= mask;
3d708: 92602020 rsbls r2, r0, #32 <== NOT EXECUTED
3d70c: 90066237 andls r6, r6, r7, lsr r2 <== 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;
3d710: 91a05000 movls r5, r0 <== NOT EXECUTED
}
else
{
bits = *map;
3d714: 83a05020 movhi r5, #32 <== NOT EXECUTED
available = rtems_rfs_bitmap_element_bits ();
}
if (rtems_rfs_bitmap_match (bits, RTEMS_RFS_BITMAP_ELEMENT_SET))
3d718: e3560000 cmp r6, #0 <== NOT EXECUTED
3d71c: 0a000007 beq 3d740 <rtems_rfs_bitmap_create_search+0x80> <== NOT EXECUTED
3d720: e3a02000 mov r2, #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))
3d724: e016a218 ands sl, r6, r8, lsl r2 <== NOT EXECUTED
control->free++;
3d728: 1594a010 ldrne sl, [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++)
3d72c: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
3d730: 128aa001 addne sl, sl, #1 <== NOT EXECUTED
3d734: 1584a010 strne sl, [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++)
3d738: e1520005 cmp r2, r5 <== NOT EXECUTED
3d73c: bafffff8 blt 3d724 <rtems_rfs_bitmap_create_search+0x64> <== NOT EXECUTED
control->free++;
}
size -= available;
if (bit == rtems_rfs_bitmap_element_bits ())
3d740: e3530020 cmp r3, #32 <== NOT EXECUTED
{
bit = 0;
search_map++;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
3d744: 05ac7004 streq r7, [ip, #4]! <== NOT EXECUTED
3d748: 03a03000 moveq r3, #0 <== NOT EXECUTED
}
else
bit++;
3d74c: 12833001 addne r3, r3, #1 <== NOT EXECUTED
for (b = 0; b < available; b++)
if (!rtems_rfs_bitmap_test (bits, b))
control->free++;
}
size -= available;
3d750: e0650000 rsb r0, r5, r0 <== NOT EXECUTED
3d754: e2811004 add r1, r1, #4 <== NOT EXECUTED
search_map = control->search_bits;
size = control->size;
bit = 0;
*search_map = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
while (size)
3d758: e3500000 cmp r0, #0 <== NOT EXECUTED
3d75c: 1affffe7 bne 3d700 <rtems_rfs_bitmap_create_search+0x40> <== NOT EXECUTED
bit++;
map++;
}
return 0;
}
3d760: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0003d670 <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)
3d670: e5903000 ldr r3, [r0] <== NOT EXECUTED
3d674: 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)
{
3d678: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3d67c: e1a04000 mov r4, r0 <== NOT EXECUTED
3d680: e1a05001 mov r5, r1 <== NOT EXECUTED
int rc;
if (!control->buffer)
3d684: 03a00006 moveq r0, #6 <== NOT EXECUTED
3d688: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED
return ENXIO;
*map = NULL;
3d68c: e3a02000 mov r2, #0 <== NOT EXECUTED
3d690: e5812000 str r2, [r1] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (control->fs,
3d694: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
3d698: e1a01003 mov r1, r3 <== NOT EXECUTED
3d69c: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
3d6a0: e3a03001 mov r3, #1 <== NOT EXECUTED
3d6a4: ebffde9d bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
control->buffer,
control->block,
true);
if (rc)
3d6a8: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
*map = rtems_rfs_buffer_data (control->buffer);
3d6ac: 05943000 ldreq r3, [r4] <== NOT EXECUTED
3d6b0: 05933008 ldreq r3, [r3, #8] <== NOT EXECUTED
3d6b4: 05933020 ldreq r3, [r3, #32] <== NOT EXECUTED
3d6b8: 05853000 streq r3, [r5] <== NOT EXECUTED
return 0;
}
3d6bc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0003dc38 <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)
{
3dc38: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
3dc3c: e1a07002 mov r7, r2 <== NOT EXECUTED
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
3dc40: e3a02000 mov r2, #0 <== NOT EXECUTED
3dc44: e1a04001 mov r4, r1 <== NOT EXECUTED
3dc48: 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)
{
3dc4c: e1a06000 mov r6, r0 <== NOT EXECUTED
3dc50: e1a08003 mov r8, r3 <== NOT EXECUTED
int rc = 0;
/*
* By default we assume the allocation failed.
*/
*allocated = false;
3dc54: e1a05001 mov r5, 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))
3dc58: ea00001f b 3dcdc <rtems_rfs_bitmap_map_alloc+0xa4> <== 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)
3dc5c: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
3dc60: e1550003 cmp r5, r3 <== NOT EXECUTED
3dc64: 2a00000a bcs 3dc94 <rtems_rfs_bitmap_map_alloc+0x5c> <== NOT EXECUTED
{
*bit = upper_seed;
3dc68: e5885000 str r5, [r8] <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
3dc6c: e1a00006 mov r0, r6 <== NOT EXECUTED
3dc70: e1a01008 mov r1, r8 <== NOT EXECUTED
3dc74: e1a02007 mov r2, r7 <== NOT EXECUTED
3dc78: e3a03001 mov r3, #1 <== NOT EXECUTED
3dc7c: ebffff69 bl 3da28 <T.57> <== NOT EXECUTED
window, 1);
if ((rc > 0) || *allocated)
3dc80: e3500000 cmp r0, #0 <== NOT EXECUTED
3dc84: ca00001e bgt 3dd04 <rtems_rfs_bitmap_map_alloc+0xcc> <== NOT EXECUTED
3dc88: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
3dc8c: e3530000 cmp r3, #0 <== NOT EXECUTED
3dc90: 1a00001b bne 3dd04 <rtems_rfs_bitmap_map_alloc+0xcc> <== NOT EXECUTED
break;
}
if (lower_seed >= 0)
3dc94: e3540000 cmp r4, #0 <== NOT EXECUTED
3dc98: ba00000a blt 3dcc8 <rtems_rfs_bitmap_map_alloc+0x90> <== NOT EXECUTED
{
*bit = lower_seed;
3dc9c: e5884000 str r4, [r8] <== NOT EXECUTED
rc = rtems_rfs_search_map_for_clear_bit (control, bit, allocated,
3dca0: e1a00006 mov r0, r6 <== NOT EXECUTED
3dca4: e1a01008 mov r1, r8 <== NOT EXECUTED
3dca8: e1a02007 mov r2, r7 <== NOT EXECUTED
3dcac: e3e03000 mvn r3, #0 <== NOT EXECUTED
3dcb0: ebffff5c bl 3da28 <T.57> <== NOT EXECUTED
window, -1);
if ((rc > 0) || *allocated)
3dcb4: e3500000 cmp r0, #0 <== NOT EXECUTED
3dcb8: ca000011 bgt 3dd04 <rtems_rfs_bitmap_map_alloc+0xcc> <== NOT EXECUTED
3dcbc: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
3dcc0: e3530000 cmp r3, #0 <== NOT EXECUTED
3dcc4: 1a00000e bne 3dd04 <rtems_rfs_bitmap_map_alloc+0xcc> <== 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)
3dcc8: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
3dccc: e1550003 cmp r5, r3 <== NOT EXECUTED
upper_seed += window;
3dcd0: 32855b02 addcc r5, r5, #2048 ; 0x800 <== NOT EXECUTED
if (lower_seed >= 0)
3dcd4: e3540000 cmp r4, #0 <== NOT EXECUTED
lower_seed -= window;
3dcd8: a2444b02 subge r4, r4, #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))
3dcdc: e3550000 cmp r5, #0 <== NOT EXECUTED
3dce0: ba000002 blt 3dcf0 <rtems_rfs_bitmap_map_alloc+0xb8> <== NOT EXECUTED
3dce4: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
3dce8: e1550003 cmp r5, r3 <== NOT EXECUTED
3dcec: 3affffda bcc 3dc5c <rtems_rfs_bitmap_map_alloc+0x24> <== NOT EXECUTED
3dcf0: e3540000 cmp r4, #0 <== NOT EXECUTED
3dcf4: ba000002 blt 3dd04 <rtems_rfs_bitmap_map_alloc+0xcc> <== NOT EXECUTED
|| ((lower_seed >= 0) && (lower_seed < control->size)))
3dcf8: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
3dcfc: e1540003 cmp r4, r3 <== NOT EXECUTED
3dd00: 3affffd5 bcc 3dc5c <rtems_rfs_bitmap_map_alloc+0x24> <== NOT EXECUTED
if (lower_seed >= 0)
lower_seed -= window;
}
return 0;
}
3dd04: e3a00000 mov r0, #0 <== NOT EXECUTED
3dd08: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0003d928 <rtems_rfs_bitmap_map_clear>:
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
3d928: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
3d92c: 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);
3d930: e1a0100d mov r1, sp <== NOT EXECUTED
}
int
rtems_rfs_bitmap_map_clear (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
3d934: 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);
3d938: ebffff4c bl 3d670 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
3d93c: e3500000 cmp r0, #0 <== NOT EXECUTED
3d940: ca000016 bgt 3d9a0 <rtems_rfs_bitmap_map_clear+0x78> <== NOT EXECUTED
return rc;
if (bit >= control->size)
3d944: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3d948: e1550003 cmp r5, r3 <== NOT EXECUTED
3d94c: 23a00016 movcs r0, #22 <== NOT EXECUTED
3d950: 2a000012 bcs 3d9a0 <rtems_rfs_bitmap_map_clear+0x78> <== 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);
3d954: 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);
3d958: e1a022c5 asr r2, r5, #5 <== NOT EXECUTED
offset = rtems_rfs_bitmap_map_offset (bit);
map[index] = rtems_rfs_bitmap_clear (map[index], 1 << offset);
3d95c: e7910102 ldr r0, [r1, r2, lsl #2] <== NOT EXECUTED
3d960: e3a03001 mov r3, #1 <== NOT EXECUTED
3d964: e205c01f and ip, r5, #31 <== NOT EXECUTED
3d968: e1800c13 orr r0, r0, r3, lsl ip <== NOT EXECUTED
3d96c: 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;
3d970: 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);
3d974: e1a05545 asr r5, r5, #10 <== NOT EXECUTED
3d978: e7910105 ldr r0, [r1, r5, lsl #2] <== NOT EXECUTED
3d97c: e202201f and r2, r2, #31 <== NOT EXECUTED
3d980: e1802213 orr r2, r0, r3, lsl r2 <== NOT EXECUTED
3d984: e7812105 str r2, [r1, r5, lsl #2] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
control->free++;
3d988: 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);
3d98c: e5941000 ldr r1, [r4] <== NOT EXECUTED
control->free++;
3d990: 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);
3d994: e5c13000 strb r3, [r1] <== NOT EXECUTED
control->free++;
3d998: e5842010 str r2, [r4, #16] <== NOT EXECUTED
3d99c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
3d9a0: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
0003d7ac <rtems_rfs_bitmap_map_clear_all>:
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
3d7ac: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
rtems_rfs_bitmap_bit last_search_bit;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
3d7b0: e1a0100d mov r1, sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
{
3d7b4: 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);
3d7b8: ebffffac bl 3d670 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
3d7bc: e3500000 cmp r0, #0 <== NOT EXECUTED
3d7c0: ca00001f bgt 3d844 <rtems_rfs_bitmap_map_clear_all+0x98> <== NOT EXECUTED
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
3d7c4: e594100c ldr r1, [r4, #12] <== NOT EXECUTED
3d7c8: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3d7cc: e1a012a1 lsr r1, r1, #5 <== NOT EXECUTED
3d7d0: e2813001 add r3, r1, #1 <== NOT EXECUTED
control->free = elements;
3d7d4: e5843010 str r3, [r4, #16] <== NOT EXECUTED
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
3d7d8: e59dc000 ldr ip, [sp] <== NOT EXECUTED
3d7dc: e3a02000 mov r2, #0 <== NOT EXECUTED
3d7e0: e3e00000 mvn r0, #0 <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = elements;
for (e = 0; e < elements; e++)
3d7e4: ea000001 b 3d7f0 <rtems_rfs_bitmap_map_clear_all+0x44> <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
3d7e8: 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++)
3d7ec: e2822001 add r2, r2, #1 <== NOT EXECUTED
3d7f0: e1520003 cmp r2, r3 <== NOT EXECUTED
3d7f4: 3afffffb bcc 3d7e8 <rtems_rfs_bitmap_map_clear_all+0x3c> <== 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)
3d7f8: e213201f ands r2, r3, #31 <== NOT EXECUTED
3d7fc: 03a02020 moveq r2, #32 <== NOT EXECUTED
last_search_bit = rtems_rfs_bitmap_element_bits ();
elements = rtems_rfs_bitmap_elements (elements);
3d800: e1a0c2a1 lsr ip, r1, #5 <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_clear_all (rtems_rfs_bitmap_control* control)
3d804: e3a03000 mov r3, #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;
3d808: e3e00000 mvn r0, #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++)
3d80c: ea000001 b 3d818 <rtems_rfs_bitmap_map_clear_all+0x6c> <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
3d810: e7810103 str r0, [r1, r3, 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++)
3d814: e2833001 add r3, r3, #1 <== NOT EXECUTED
3d818: e153000c cmp r3, ip <== NOT EXECUTED
3d81c: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED
3d820: 1afffffa bne 3d810 <rtems_rfs_bitmap_map_clear_all+0x64> <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_CLEAR;
control->search_bits[elements - 1] =
3d824: e3e00000 mvn r0, #0 <== NOT EXECUTED
3d828: e2622020 rsb r2, r2, #32 <== NOT EXECUTED
3d82c: e1a02230 lsr r2, r0, r2 <== 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);
3d830: e5940000 ldr r0, [r4] <== 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] =
3d834: e7812103 str r2, [r1, r3, 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);
3d838: e3a03001 mov r3, #1 <== NOT EXECUTED
3d83c: e5c03000 strb r3, [r0] <== NOT EXECUTED
3d840: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
3d844: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
0003d9a4 <rtems_rfs_bitmap_map_set>:
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
3d9a4: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
3d9a8: 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);
3d9ac: e1a0100d mov r1, sp <== NOT EXECUTED
}
int
rtems_rfs_bitmap_map_set (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit)
{
3d9b0: 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);
3d9b4: ebffff2d bl 3d670 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
3d9b8: e3500000 cmp r0, #0 <== NOT EXECUTED
3d9bc: ca000018 bgt 3da24 <rtems_rfs_bitmap_map_set+0x80> <== NOT EXECUTED
return rc;
if (bit >= control->size)
3d9c0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3d9c4: e1550003 cmp r5, r3 <== NOT EXECUTED
3d9c8: 23a00016 movcs r0, #22 <== NOT EXECUTED
3d9cc: 2a000014 bcs 3da24 <rtems_rfs_bitmap_map_set+0x80> <== 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);
3d9d0: 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);
3d9d4: e1a022c5 asr r2, 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);
3d9d8: e7910102 ldr r0, [r1, r2, lsl #2] <== NOT EXECUTED
3d9dc: e205c01f and ip, r5, #31 <== NOT EXECUTED
3d9e0: e3a03001 mov r3, #1 <== NOT EXECUTED
3d9e4: e1c00c13 bic r0, r0, r3, 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))
3d9e8: 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);
3d9ec: 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;
3d9f0: 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))
3d9f4: 13a00000 movne r0, #0 <== NOT EXECUTED
3d9f8: 1a000009 bne 3da24 <rtems_rfs_bitmap_map_set+0x80> <== 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);
3d9fc: e1a05545 asr r5, r5, #10 <== NOT EXECUTED
3da00: e791c105 ldr ip, [r1, r5, lsl #2] <== NOT EXECUTED
3da04: e202201f and r2, r2, #31 <== NOT EXECUTED
3da08: e1cc2213 bic r2, ip, r3, lsl r2 <== NOT EXECUTED
3da0c: e7812105 str r2, [r1, r5, lsl #2] <== NOT EXECUTED
control->free--;
3da10: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
3da14: 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--;
3da18: e2422001 sub r2, r2, #1 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
3da1c: e5c13000 strb r3, [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--;
3da20: e5842010 str r2, [r4, #16] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (control->buffer);
}
return 0;
}
3da24: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
0003d848 <rtems_rfs_bitmap_map_set_all>:
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
3d848: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
rtems_rfs_bitmap_map map;
size_t elements;
int e;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
3d84c: e1a0100d mov r1, sp <== NOT EXECUTED
return 0;
}
int
rtems_rfs_bitmap_map_set_all (rtems_rfs_bitmap_control* control)
{
3d850: 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);
3d854: ebffff85 bl 3d670 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
3d858: e3500000 cmp r0, #0 <== NOT EXECUTED
3d85c: ca00001a bgt 3d8cc <rtems_rfs_bitmap_map_set_all+0x84> <== NOT EXECUTED
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
3d860: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
3d864: e2422001 sub r2, r2, #1 <== NOT EXECUTED
control->free = 0;
3d868: e3a01000 mov r1, #0 <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
3d86c: e1a022a2 lsr r2, r2, #5 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
3d870: e1a03001 mov r3, r1 <== NOT EXECUTED
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
3d874: e5841010 str r1, [r4, #16] <== NOT EXECUTED
rc = rtems_rfs_bitmap_load_map (control, &map);
if (rc > 0)
return rc;
elements = rtems_rfs_bitmap_elements (control->size);
3d878: e282c001 add ip, r2, #1 <== NOT EXECUTED
control->free = 0;
for (e = 0; e < elements; e++)
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
3d87c: e59d0000 ldr r0, [sp] <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
3d880: ea000001 b 3d88c <rtems_rfs_bitmap_map_set_all+0x44> <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
3d884: e7801103 str r1, [r0, r3, lsl #2] <== NOT EXECUTED
elements = rtems_rfs_bitmap_elements (control->size);
control->free = 0;
for (e = 0; e < elements; e++)
3d888: e2833001 add r3, r3, #1 <== NOT EXECUTED
3d88c: e153000c cmp r3, ip <== NOT EXECUTED
3d890: 3afffffb bcc 3d884 <rtems_rfs_bitmap_map_set_all+0x3c> <== NOT EXECUTED
map[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
elements = rtems_rfs_bitmap_elements (elements);
3d894: e1a022a2 lsr r2, r2, #5 <== NOT EXECUTED
3d898: e3a03000 mov r3, #0 <== NOT EXECUTED
3d89c: e2822001 add r2, r2, #1 <== NOT EXECUTED
for (e = 0; e < elements; e++)
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
3d8a0: e1a01003 mov r1, r3 <== 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++)
3d8a4: ea000002 b 3d8b4 <rtems_rfs_bitmap_map_set_all+0x6c> <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
3d8a8: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3d8ac: e7801103 str r1, [r0, r3, 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++)
3d8b0: e2833001 add r3, r3, #1 <== NOT EXECUTED
3d8b4: e1530002 cmp r3, r2 <== NOT EXECUTED
3d8b8: 3afffffa bcc 3d8a8 <rtems_rfs_bitmap_map_set_all+0x60> <== NOT EXECUTED
control->search_bits[e] = RTEMS_RFS_BITMAP_ELEMENT_SET;
rtems_rfs_buffer_mark_dirty (control->buffer);
3d8bc: e5943000 ldr r3, [r4] <== NOT EXECUTED
3d8c0: e3a02001 mov r2, #1 <== NOT EXECUTED
3d8c4: e5c32000 strb r2, [r3] <== NOT EXECUTED
3d8c8: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
3d8cc: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
0003d8d0 <rtems_rfs_bitmap_map_test>:
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
3d8d0: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED
3d8d4: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
3d8d8: e1a0100d mov r1, sp <== NOT EXECUTED
int
rtems_rfs_bitmap_map_test (rtems_rfs_bitmap_control* control,
rtems_rfs_bitmap_bit bit,
bool* state)
{
3d8dc: e1a05002 mov r5, r2 <== NOT EXECUTED
3d8e0: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_rfs_bitmap_map map;
int index;
int rc;
rc = rtems_rfs_bitmap_load_map (control, &map);
3d8e4: ebffff61 bl 3d670 <rtems_rfs_bitmap_load_map> <== NOT EXECUTED
if (rc > 0)
3d8e8: e3500000 cmp r0, #0 <== NOT EXECUTED
3d8ec: ca00000c bgt 3d924 <rtems_rfs_bitmap_map_test+0x54> <== NOT EXECUTED
return rc;
if (bit >= control->size)
3d8f0: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
3d8f4: e1540003 cmp r4, r3 <== NOT EXECUTED
3d8f8: 23a00016 movcs r0, #22 <== NOT EXECUTED
3d8fc: 2a000008 bcs 3d924 <rtems_rfs_bitmap_map_test+0x54> <== NOT EXECUTED
return EINVAL;
index = rtems_rfs_bitmap_map_index (bit);
*state = rtems_rfs_bitmap_test (map[index], bit);
3d900: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3d904: e1a022c4 asr r2, r4, #5 <== NOT EXECUTED
3d908: e7933102 ldr r3, [r3, r2, lsl #2] <== NOT EXECUTED
3d90c: e3a02001 mov r2, #1 <== NOT EXECUTED
3d910: e0133412 ands r3, r3, r2, lsl r4 <== NOT EXECUTED
3d914: 13a03000 movne r3, #0 <== NOT EXECUTED
3d918: 03a03001 moveq r3, #1 <== NOT EXECUTED
3d91c: e5c53000 strb r3, [r5] <== NOT EXECUTED
3d920: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
3d924: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED
0003d62c <rtems_rfs_bitmap_mask>:
return 0;
}
rtems_rfs_bitmap_element
rtems_rfs_bitmap_mask (unsigned int size)
{
3d62c: e3e03000 mvn r3, #0 <== NOT EXECUTED
3d630: 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;
}
3d634: e1a00033 lsr r0, r3, r0 <== NOT EXECUTED
3d638: e12fff1e bx lr <== NOT EXECUTED
0003d63c <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)
3d63c: e1510000 cmp r1, r0 <== NOT EXECUTED
mask = rtems_rfs_bitmap_mask (end - start) << start;
3d640: 80601001 rsbhi r1, r0, r1 <== NOT EXECUTED
3d644: 82611020 rsbhi r1, r1, #32 <== NOT EXECUTED
3d648: 83e03000 mvnhi r3, #0 <== NOT EXECUTED
3d64c: 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)
3d650: 93a00000 movls r0, #0 <== NOT EXECUTED
mask = rtems_rfs_bitmap_mask (end - start) << start;
3d654: 81a00011 lslhi r0, r1, r0 <== NOT EXECUTED
return mask;
}
3d658: e12fff1e bx lr <== NOT EXECUTED
0003d764 <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)
{
3d764: 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));
3d768: 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)
{
3d76c: 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));
3d770: 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;
3d774: e5842000 str r2, [r4] <== NOT EXECUTED
control->fs = fs;
control->block = block;
3d778: 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));
3d77c: 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;
3d780: 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));
3d784: e1a00100 lsl r0, r0, #2 <== NOT EXECUTED
3d788: ebff2970 bl 7d50 <malloc> <== NOT EXECUTED
if (!control->search_bits)
3d78c: 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));
3d790: e5840014 str r0, [r4, #20] <== NOT EXECUTED
if (!control->search_bits)
3d794: 1a000001 bne 3d7a0 <rtems_rfs_bitmap_open+0x3c> <== NOT EXECUTED
return ENOMEM;
return rtems_rfs_bitmap_create_search (control);
}
3d798: e280000c add r0, r0, #12 <== NOT EXECUTED
3d79c: e8bd8010 pop {r4, pc} <== 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);
3d7a0: e1a00004 mov r0, r4 <== NOT EXECUTED
}
3d7a4: 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);
3d7a8: eaffffc4 b 3d6c0 <rtems_rfs_bitmap_create_search> <== NOT EXECUTED
00034080 <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)
{
34080: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
34084: 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);
34088: 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)
{
3408c: e1a06000 mov r6, r0 <== NOT EXECUTED
34090: e1a07001 mov r7, r1 <== NOT EXECUTED
34094: 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);
34098: eb000420 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
3409c: e3500000 cmp r0, #0 <== NOT EXECUTED
340a0: c8bd80f0 popgt {r4, r5, r6, r7, pc} <== NOT EXECUTED
return rc;
*result = rtems_rfs_block_get_number (buffer, offset);
340a4: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
340a8: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
340ac: e0821104 add r1, r2, r4, lsl #2 <== NOT EXECUTED
340b0: e7d20104 ldrb r0, [r2, r4, lsl #2] <== NOT EXECUTED
340b4: e5d13003 ldrb r3, [r1, #3] <== NOT EXECUTED
340b8: e1a04001 mov r4, r1 <== NOT EXECUTED
340bc: e5d11001 ldrb r1, [r1, #1] <== NOT EXECUTED
340c0: e5d42002 ldrb r2, [r4, #2] <== NOT EXECUTED
340c4: e1833c00 orr r3, r3, r0, lsl #24 <== NOT EXECUTED
340c8: e1833801 orr r3, r3, r1, lsl #16 <== NOT EXECUTED
340cc: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
if ((*result + 1) == 0)
340d0: e3730001 cmn r3, #1 <== NOT EXECUTED
340d4: 03a03000 moveq r3, #0 <== NOT EXECUTED
340d8: e5853000 str r3, [r5] <== NOT EXECUTED
*result = 0;
if (*result >= rtems_rfs_fs_blocks (fs))
340dc: e5962004 ldr r2, [r6, #4] <== NOT EXECUTED
340e0: 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;
340e4: 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))
340e8: 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;
340ec: 25850000 strcs r0, [r5] <== NOT EXECUTED
rc = EIO;
}
return 0;
}
340f0: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00033fe0 <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)
{
33fe0: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
33fe4: e1a05002 mov r5, r2 <== NOT EXECUTED
if (pos == 0)
33fe8: 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)
{
33fec: e1a06001 mov r6, r1 <== NOT EXECUTED
33ff0: e1a04003 mov r4, r3 <== NOT EXECUTED
*/
static inline void
rtems_rfs_block_set_size_zero (rtems_rfs_block_size* size)
{
size->count = 0;
size->offset = 0;
33ff4: 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;
33ff8: 05832000 streq r2, [r3] <== NOT EXECUTED
if (pos == 0)
33ffc: 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;
34000: e5907008 ldr r7, [r0, #8] <== NOT EXECUTED
34004: e3a03000 mov r3, #0 <== NOT EXECUTED
34008: e1a02007 mov r2, r7 <== NOT EXECUTED
3400c: e1a00001 mov r0, r1 <== NOT EXECUTED
34010: e1a01005 mov r1, r5 <== NOT EXECUTED
34014: eb008cd4 bl 5736c <__udivdi3> <== NOT EXECUTED
34018: e2800001 add r0, r0, #1 <== NOT EXECUTED
3401c: e5840000 str r0, [r4] <== NOT EXECUTED
size->offset = pos % rtems_rfs_fs_block_size (fs);
34020: e1a01005 mov r1, r5 <== NOT EXECUTED
34024: e1a00006 mov r0, r6 <== NOT EXECUTED
34028: e1a02007 mov r2, r7 <== NOT EXECUTED
3402c: e3a03000 mov r3, #0 <== NOT EXECUTED
34030: eb008dde bl 577b0 <__umoddi3> <== NOT EXECUTED
34034: e5840004 str r0, [r4, #4] <== NOT EXECUTED
34038: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00033f80 <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)
{
33f80: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
33f84: 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)
{
33f88: e1a08002 mov r8, r2 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
33f8c: 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)
{
33f90: e1a04003 mov r4, r3 <== NOT EXECUTED
33f94: e1a07001 mov r7, r1 <== NOT EXECUTED
bpos->bno = pos / rtems_rfs_fs_block_size (fs);
33f98: e1a02006 mov r2, r6 <== NOT EXECUTED
33f9c: e1a03005 mov r3, r5 <== NOT EXECUTED
33fa0: e1a00001 mov r0, r1 <== NOT EXECUTED
33fa4: e1a01008 mov r1, r8 <== NOT EXECUTED
33fa8: eb008cef bl 5736c <__udivdi3> <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
33fac: 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);
33fb0: e5840000 str r0, [r4] <== NOT EXECUTED
bpos->boff = pos % rtems_rfs_fs_block_size (fs);
33fb4: e1a01008 mov r1, r8 <== NOT EXECUTED
33fb8: e1a00007 mov r0, r7 <== NOT EXECUTED
33fbc: e1a03005 mov r3, r5 <== NOT EXECUTED
33fc0: eb008dfa bl 577b0 <__umoddi3> <== NOT EXECUTED
33fc4: e5840004 str r0, [r4, #4] <== NOT EXECUTED
}
33fc8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00033fcc <rtems_rfs_block_get_pos>:
rtems_rfs_pos
rtems_rfs_block_get_pos (rtems_rfs_file_system* fs,
rtems_rfs_block_pos* bpos)
{
33fcc: e5902008 ldr r2, [r0, #8] <== NOT EXECUTED
33fd0: e8910009 ldm r1, {r0, r3} <== NOT EXECUTED
return (bpos->bno * rtems_rfs_fs_block_size (fs)) + bpos->boff;
}
33fd4: e3a01000 mov r1, #0 <== NOT EXECUTED
33fd8: e0203092 mla r0, r2, r0, r3 <== NOT EXECUTED
33fdc: e12fff1e bx lr <== NOT EXECUTED
0003403c <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)
3403c: e5913000 ldr r3, [r1] <== NOT EXECUTED
34040: e3530000 cmp r3, #0 <== NOT EXECUTED
}
rtems_rfs_pos
rtems_rfs_block_get_size (rtems_rfs_file_system* fs,
rtems_rfs_block_size* size)
{
34044: e92d4010 push {r4, lr} <== NOT EXECUTED
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
34048: 03a03000 moveq r3, #0 <== NOT EXECUTED
3404c: 03a04000 moveq r4, #0 <== NOT EXECUTED
34050: 0a000007 beq 34074 <rtems_rfs_block_get_size+0x38> <== NOT EXECUTED
return 0;
if (size->offset == 0)
34054: e5912004 ldr r2, [r1, #4] <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
34058: e590c008 ldr ip, [r0, #8] <== NOT EXECUTED
{
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
return 0;
if (size->offset == 0)
3405c: e3520000 cmp r2, #0 <== NOT EXECUTED
offset = rtems_rfs_fs_block_size (fs);
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
34060: e2433001 sub r3, r3, #1 <== NOT EXECUTED
uint32_t offset;
uint64_t block_size;
if (size->count == 0)
return 0;
if (size->offset == 0)
offset = rtems_rfs_fs_block_size (fs);
34064: 05902008 ldreq r2, [r0, #8] <== NOT EXECUTED
else
offset = size->offset;
block_size = rtems_rfs_fs_block_size (fs);
return (((uint64_t) (size->count - 1)) * block_size) + offset;
34068: e0810c93 umull r0, r1, r3, ip <== NOT EXECUTED
3406c: e0903002 adds r3, r0, r2 <== NOT EXECUTED
34070: e2a14000 adc r4, r1, #0 <== NOT EXECUTED
}
34074: e1a01004 mov r1, r4 <== NOT EXECUTED
34078: e1a00003 mov r0, r3 <== NOT EXECUTED
3407c: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00034b18 <rtems_rfs_block_map_close>:
rtems_rfs_block_map* map)
{
int rc = 0;
int brc;
if (map->dirty && map->inode)
34b18: e5d13000 ldrb r3, [r1] <== NOT EXECUTED
34b1c: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_block_map_close (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map)
{
34b20: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
34b24: e1a04001 mov r4, r1 <== NOT EXECUTED
34b28: e1a05000 mov r5, r0 <== NOT EXECUTED
int rc = 0;
int brc;
if (map->dirty && map->inode)
34b2c: 0a00005a beq 34c9c <rtems_rfs_block_map_close+0x184> <== NOT EXECUTED
34b30: e5911004 ldr r1, [r1, #4] <== NOT EXECUTED
34b34: e3510000 cmp r1, #0 <== NOT EXECUTED
34b38: 0a000057 beq 34c9c <rtems_rfs_block_map_close+0x184> <== NOT EXECUTED
{
brc = rtems_rfs_inode_load (fs, map->inode);
34b3c: eb000e0a bl 3836c <rtems_rfs_inode_load> <== NOT EXECUTED
if (brc > 0)
34b40: e2507000 subs r7, r0, #0 <== NOT EXECUTED
34b44: ca000055 bgt 34ca0 <rtems_rfs_block_map_close+0x188> <== NOT EXECUTED
34b48: e1a00004 mov r0, r4 <== NOT EXECUTED
34b4c: 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);
34b50: e3a0c001 mov ip, #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]);
34b54: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED
34b58: 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);
34b5c: e592e00c ldr lr, [r2, #12] <== NOT EXECUTED
34b60: e1a06c21 lsr r6, r1, #24 <== NOT EXECUTED
34b64: e08ee003 add lr, lr, r3 <== NOT EXECUTED
34b68: e5ce601c strb r6, [lr, #28] <== NOT EXECUTED
34b6c: e592e00c ldr lr, [r2, #12] <== NOT EXECUTED
34b70: e1a06821 lsr r6, r1, #16 <== NOT EXECUTED
34b74: e08ee003 add lr, lr, r3 <== NOT EXECUTED
34b78: e5ce601d strb r6, [lr, #29] <== NOT EXECUTED
34b7c: e592e00c ldr lr, [r2, #12] <== NOT EXECUTED
34b80: e1a06421 lsr r6, r1, #8 <== NOT EXECUTED
34b84: e08ee003 add lr, lr, r3 <== NOT EXECUTED
34b88: e5ce601e strb r6, [lr, #30] <== NOT EXECUTED
34b8c: e592e00c ldr lr, [r2, #12] <== NOT EXECUTED
34b90: e08ee003 add lr, lr, r3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
34b94: e2833004 add r3, r3, #4 <== NOT EXECUTED
if (rc == 0)
{
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
34b98: 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);
34b9c: e5ce101f strb r1, [lr, #31] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
34ba0: e2800004 add r0, r0, #4 <== NOT EXECUTED
34ba4: e5c2c010 strb ip, [r2, #16] <== NOT EXECUTED
34ba8: e3a02001 mov r2, #1 <== NOT EXECUTED
34bac: 1affffe8 bne 34b54 <rtems_rfs_block_map_close+0x3c> <== NOT EXECUTED
rtems_rfs_inode_set_block (map->inode, b, map->blocks[b]);
rtems_rfs_inode_set_block_count (map->inode, map->size.count);
34bb0: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
34bb4: 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);
34bb8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
34bbc: e1a0cc21 lsr ip, r1, #24 <== NOT EXECUTED
34bc0: e5c0c00c strb ip, [r0, #12] <== NOT EXECUTED
34bc4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
34bc8: e1a0c821 lsr ip, r1, #16 <== NOT EXECUTED
34bcc: e5c0c00d strb ip, [r0, #13] <== NOT EXECUTED
34bd0: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
34bd4: e1a0c421 lsr ip, r1, #8 <== NOT EXECUTED
34bd8: e5c0c00e strb ip, [r0, #14] <== NOT EXECUTED
34bdc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
34be0: e5c0100f strb r1, [r0, #15] <== NOT EXECUTED
rtems_rfs_inode_set_block_offset (map->inode, map->size.offset);
34be4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED
34be8: 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);
34bec: e590c00c ldr ip, [r0, #12] <== NOT EXECUTED
34bf0: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
34bf4: 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);
34bf8: 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);
34bfc: e5cce00a strb lr, [ip, #10] <== NOT EXECUTED
34c00: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
34c04: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
34c08: e5c3100b strb r1, [r3, #11] <== NOT EXECUTED
rtems_rfs_inode_set_last_map_block (map->inode, map->last_map_block);
34c0c: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
34c10: 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);
34c14: e591c00c ldr ip, [r1, #12] <== NOT EXECUTED
34c18: 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);
34c1c: 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);
34c20: e5cce030 strb lr, [ip, #48] ; 0x30 <== NOT EXECUTED
34c24: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
34c28: e1a0c823 lsr ip, r3, #16 <== NOT EXECUTED
34c2c: e5c0c031 strb ip, [r0, #49] ; 0x31 <== NOT EXECUTED
34c30: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
34c34: e1a0c423 lsr ip, r3, #8 <== NOT EXECUTED
34c38: e5c0c032 strb ip, [r0, #50] ; 0x32 <== NOT EXECUTED
34c3c: e591000c ldr r0, [r1, #12] <== NOT EXECUTED
34c40: e5c03033 strb r3, [r0, #51] ; 0x33 <== NOT EXECUTED
rtems_rfs_inode_set_last_data_block (map->inode, map->last_data_block);
34c44: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED
34c48: 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);
34c4c: e593c00c ldr ip, [r3, #12] <== NOT EXECUTED
34c50: 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);
34c54: 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);
34c58: e5cce034 strb lr, [ip, #52] ; 0x34 <== NOT EXECUTED
34c5c: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
34c60: e1a0c820 lsr ip, r0, #16 <== NOT EXECUTED
34c64: e5c1c035 strb ip, [r1, #53] ; 0x35 <== NOT EXECUTED
34c68: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
34c6c: e1a0c420 lsr ip, r0, #8 <== NOT EXECUTED
34c70: e5c1c036 strb ip, [r1, #54] ; 0x36 <== NOT EXECUTED
34c74: e593100c ldr r1, [r3, #12] <== NOT EXECUTED
34c78: e5c10037 strb r0, [r1, #55] ; 0x37 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
34c7c: e5c32010 strb r2, [r3, #16] <== NOT EXECUTED
brc = rtems_rfs_inode_unload (fs, map->inode, true);
34c80: e1a00005 mov r0, r5 <== NOT EXECUTED
34c84: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
34c88: eb000d80 bl 38290 <rtems_rfs_inode_unload> <== NOT EXECUTED
if (brc > 0)
rc = brc;
map->dirty = false;
34c8c: e3a03000 mov r3, #0 <== NOT EXECUTED
34c90: 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);
34c94: e1c07fc0 bic r7, r0, r0, asr #31 <== NOT EXECUTED
34c98: ea000000 b 34ca0 <rtems_rfs_block_map_close+0x188> <== NOT EXECUTED
if (brc > 0)
rc = brc;
map->dirty = false;
34c9c: e3a07000 mov r7, #0 <== NOT EXECUTED
}
}
map->inode = NULL;
34ca0: 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);
34ca4: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
34ca8: e5846004 str r6, [r4, #4] <== NOT EXECUTED
34cac: e1a00005 mov r0, r5 <== NOT EXECUTED
34cb0: eb0000d1 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
34cb4: e5c46038 strb r6, [r4, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = 0;
34cb8: e584603c str r6, [r4, #60] ; 0x3c <== NOT EXECUTED
handle->buffer = NULL;
34cbc: 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);
34cc0: e1a00005 mov r0, r5 <== NOT EXECUTED
34cc4: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
34cc8: eb0000cb bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
34ccc: 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;
34cd0: e5c46044 strb r6, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
34cd4: 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;
}
34cd8: e1a00007 mov r0, r7 <== NOT EXECUTED
34cdc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
000340f4 <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)
{
340f4: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
340f8: e1a05003 mov r5, r3 <== NOT EXECUTED
int rc = 0;
*block = 0;
340fc: e3a03000 mov r3, #0 <== NOT EXECUTED
34100: e5853000 str r3, [r5] <== NOT EXECUTED
/*
* Range checking here makes the remaining logic simpler.
*/
if (rtems_rfs_block_pos_block_past_end (bpos, &map->size))
34104: e592b000 ldr fp, [r2] <== NOT EXECUTED
34108: 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)
{
3410c: e1a07002 mov r7, r2 <== NOT EXECUTED
34110: e1a06000 mov r6, r0 <== NOT EXECUTED
34114: 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))
34118: 0a000002 beq 34128 <rtems_rfs_block_map_find+0x34> <== NOT EXECUTED
3411c: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
34120: e3530000 cmp r3, #0 <== NOT EXECUTED
34124: 0a000046 beq 34244 <rtems_rfs_block_map_find+0x150> <== NOT EXECUTED
34128: e5948008 ldr r8, [r4, #8] <== NOT EXECUTED
3412c: e15b0008 cmp fp, r8 <== NOT EXECUTED
34130: 2a000043 bcs 34244 <rtems_rfs_block_map_find+0x150> <== 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))
34134: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
34138: e15b0003 cmp fp, r3 <== NOT EXECUTED
3413c: 1a000002 bne 3414c <rtems_rfs_block_map_find+0x58> <== NOT EXECUTED
34140: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
34144: e3530000 cmp r3, #0 <== NOT EXECUTED
34148: 1a000003 bne 3415c <rtems_rfs_block_map_find+0x68> <== 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)
3414c: e3580005 cmp r8, #5 <== NOT EXECUTED
34150: 8a000003 bhi 34164 <rtems_rfs_block_map_find+0x70> <== NOT EXECUTED
{
*block = map->blocks[bpos->bno];
34154: e28bb009 add fp, fp, #9 <== NOT EXECUTED
34158: e794310b ldr r3, [r4, fp, lsl #2] <== NOT EXECUTED
3415c: e5853000 str r3, [r5] <== NOT EXECUTED
34160: ea00002e b 34220 <rtems_rfs_block_map_find+0x12c> <== 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;
34164: e5969030 ldr r9, [r6, #48] ; 0x30 <== NOT EXECUTED
34168: e1a0000b mov r0, fp <== NOT EXECUTED
3416c: e1a01009 mov r1, r9 <== NOT EXECUTED
34170: eb0088f7 bl 56554 <__umodsi3> <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
34174: 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;
34178: e1a0a000 mov sl, r0 <== NOT EXECUTED
singly = bpos->bno / fs->blocks_per_block;
3417c: e1a0000b mov r0, fp <== NOT EXECUTED
34180: eb00885f bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
34184: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED
34188: e1580003 cmp r8, 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;
3418c: e1a0b000 mov fp, r0 <== NOT EXECUTED
34190: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
if (map->size.count <= fs->block_map_singly_blocks)
34194: 8a000005 bhi 341b0 <rtems_rfs_block_map_find+0xbc> <== NOT EXECUTED
{
/*
* This is a single indirect table of blocks anchored off a slot in the
* inode.
*/
rc = rtems_rfs_block_find_indirect (fs,
34198: e280b009 add fp, r0, #9 <== NOT EXECUTED
3419c: e794210b ldr r2, [r4, fp, lsl #2] <== NOT EXECUTED
341a0: e1a00006 mov r0, r6 <== NOT EXECUTED
341a4: e1a0300a mov r3, sl <== NOT EXECUTED
341a8: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
341ac: ea000017 b 34210 <rtems_rfs_block_map_find+0x11c> <== 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)
341b0: e5963038 ldr r3, [r6, #56] ; 0x38 <== NOT EXECUTED
341b4: e1580003 cmp r8, r3 <== NOT EXECUTED
341b8: 2a000021 bcs 34244 <rtems_rfs_block_map_find+0x150> <== NOT EXECUTED
* The map is doubly indirect.
*/
rtems_rfs_block_no doubly;
doubly = singly / fs->blocks_per_block;
singly %= fs->blocks_per_block;
341bc: e1a01009 mov r1, r9 <== NOT EXECUTED
341c0: eb0088e3 bl 56554 <__umodsi3> <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
341c4: 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;
341c8: e1a08000 mov r8, r0 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
341cc: e1a0000b mov r0, fp <== NOT EXECUTED
341d0: eb00884b bl 56304 <__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;
341d4: e28dc008 add ip, sp, #8 <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
341d8: e2800009 add r0, r0, #9 <== NOT EXECUTED
341dc: 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;
341e0: e52c8004 str r8, [ip, #-4]! <== NOT EXECUTED
if (map->size.count < fs->block_map_doubly_blocks)
{
rc = rtems_rfs_block_find_indirect (fs,
341e4: e1a03008 mov r3, r8 <== NOT EXECUTED
341e8: e1a00006 mov r0, r6 <== NOT EXECUTED
341ec: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
341f0: e58dc000 str ip, [sp] <== NOT EXECUTED
341f4: ebffffa1 bl 34080 <rtems_rfs_block_find_indirect> <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
singly, &singly);
if (rc == 0)
341f8: e3500000 cmp r0, #0 <== NOT EXECUTED
341fc: 1a000011 bne 34248 <rtems_rfs_block_map_find+0x154> <== NOT EXECUTED
{
rc = rtems_rfs_block_find_indirect (fs,
34200: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
34204: e1a00006 mov r0, r6 <== NOT EXECUTED
34208: e1a0300a mov r3, sl <== NOT EXECUTED
3420c: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
34210: e58d5000 str r5, [sp] <== NOT EXECUTED
34214: ebffff99 bl 34080 <rtems_rfs_block_find_indirect> <== NOT EXECUTED
}
}
}
}
if (rc == 0)
34218: e3500000 cmp r0, #0 <== NOT EXECUTED
3421c: 1a000009 bne 34248 <rtems_rfs_block_map_find+0x154> <== NOT EXECUTED
{
rtems_rfs_block_copy_bpos (&map->bpos, bpos);
34220: e5971008 ldr r1, [r7, #8] <== NOT EXECUTED
34224: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
34228: e5841018 str r1, [r4, #24] <== NOT EXECUTED
3422c: e5842010 str r2, [r4, #16] <== NOT EXECUTED
34230: e5843014 str r3, [r4, #20] <== NOT EXECUTED
map->bpos.block = *block;
34234: e5953000 ldr r3, [r5] <== NOT EXECUTED
34238: e3a00000 mov r0, #0 <== NOT EXECUTED
3423c: e5843018 str r3, [r4, #24] <== NOT EXECUTED
34240: ea000000 b 34248 <rtems_rfs_block_map_find+0x154> <== NOT EXECUTED
34244: e3a00006 mov r0, #6 <== NOT EXECUTED
}
return rc;
}
34248: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00034648 <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);
34648: e5912008 ldr r2, [r1, #8] <== NOT EXECUTED
3464c: eaffff4d b 34388 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
00034768 <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)
{
34768: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3476c: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
34770: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
34774: 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))
34778: 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)
{
3477c: e1a05000 mov r5, 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))
34780: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED
34784: e59d0008 ldr r0, [sp, #8] <== NOT EXECUTED
34788: e0801001 add r1, r0, r1 <== NOT EXECUTED
3478c: 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)
{
34790: e58d3010 str r3, [sp, #16] <== 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))
34794: 23a0a01b movcs sl, #27 <== NOT EXECUTED
34798: 2a0000db bcs 34b0c <rtems_rfs_block_map_grow+0x3a4> <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
3479c: e2842044 add r2, r4, #68 ; 0x44 <== NOT EXECUTED
347a0: e3a08000 mov r8, #0 <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
347a4: e284b038 add fp, r4, #56 ; 0x38 <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
347a8: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
347ac: ea0000d0 b 34af4 <rtems_rfs_block_map_grow+0x38c> <== 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,
347b0: e1a00005 mov r0, r5 <== NOT EXECUTED
347b4: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
347b8: e3a02000 mov r2, #0 <== NOT EXECUTED
347bc: e28d3018 add r3, sp, #24 <== NOT EXECUTED
347c0: eb000d57 bl 37d24 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
false, &block);
if (rc > 0)
347c4: e3500000 cmp r0, #0 <== NOT EXECUTED
347c8: ca0000ce bgt 34b08 <rtems_rfs_block_map_grow+0x3a0> <== NOT EXECUTED
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
347cc: e5949008 ldr r9, [r4, #8] <== NOT EXECUTED
347d0: e3590004 cmp r9, #4 <== NOT EXECUTED
map->blocks[map->size.count] = block;
347d4: 959d3018 ldrls r3, [sp, #24] <== NOT EXECUTED
347d8: 92899009 addls r9, r9, #9 <== NOT EXECUTED
347dc: 97843109 strls r3, [r4, r9, lsl #2] <== NOT EXECUTED
rc = rtems_rfs_group_bitmap_alloc (fs, map->last_data_block,
false, &block);
if (rc > 0)
return rc;
if (map->size.count < RTEMS_RFS_INODE_BLOCKS)
347e0: 9a0000b5 bls 34abc <rtems_rfs_block_map_grow+0x354> <== 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;
347e4: e5956030 ldr r6, [r5, #48] ; 0x30 <== NOT EXECUTED
347e8: e1a00009 mov r0, r9 <== NOT EXECUTED
347ec: e1a01006 mov r1, r6 <== NOT EXECUTED
347f0: eb008757 bl 56554 <__umodsi3> <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
347f4: e1a01006 mov r1, r6 <== 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;
347f8: e1a07000 mov r7, r0 <== NOT EXECUTED
singly = map->size.count / fs->blocks_per_block;
347fc: e1a00009 mov r0, r9 <== NOT EXECUTED
34800: eb0086bf bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
if (map->size.count < fs->block_map_singly_blocks)
34804: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED
34808: e1590003 cmp r9, 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;
3480c: e1a0a000 mov sl, r0 <== NOT EXECUTED
if (map->size.count < fs->block_map_singly_blocks)
34810: 2a000017 bcs 34874 <rtems_rfs_block_map_grow+0x10c> <== 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) ||
34814: e3570000 cmp r7, #0 <== NOT EXECUTED
34818: 0a000002 beq 34828 <rtems_rfs_block_map_grow+0xc0> <== NOT EXECUTED
3481c: e3570005 cmp r7, #5 <== NOT EXECUTED
34820: 03500000 cmpeq r0, #0 <== NOT EXECUTED
34824: 1a00000a bne 34854 <rtems_rfs_block_map_grow+0xec> <== 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,
34828: e28a3009 add r3, sl, #9 <== NOT EXECUTED
3482c: e3590005 cmp r9, #5 <== NOT EXECUTED
34830: 13a0c000 movne ip, #0 <== NOT EXECUTED
34834: 03a0c001 moveq ip, #1 <== NOT EXECUTED
34838: e0843103 add r3, r4, r3, lsl #2 <== NOT EXECUTED
3483c: e1a00005 mov r0, r5 <== NOT EXECUTED
34840: e1a01004 mov r1, r4 <== NOT EXECUTED
34844: e1a0200b mov r2, fp <== NOT EXECUTED
34848: e58dc000 str ip, [sp] <== NOT EXECUTED
3484c: ebffff7f bl 34650 <rtems_rfs_block_map_indirect_alloc> <== 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) ||
34850: ea000005 b 3486c <rtems_rfs_block_map_grow+0x104> <== NOT EXECUTED
&map->blocks[singly],
upping);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
34854: e280a009 add sl, r0, #9 <== NOT EXECUTED
34858: e794210a ldr r2, [r4, sl, lsl #2] <== NOT EXECUTED
3485c: e1a00005 mov r0, r5 <== NOT EXECUTED
34860: e1a0100b mov r1, fp <== NOT EXECUTED
34864: e3a03001 mov r3, #1 <== NOT EXECUTED
34868: eb00022c bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
map->blocks[singly], true);
}
if (rc > 0)
3486c: e3500000 cmp r0, #0 <== NOT EXECUTED
34870: ea000072 b 34a40 <rtems_rfs_block_map_grow+0x2d8> <== 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;
34874: e1a01006 mov r1, r6 <== NOT EXECUTED
34878: eb0086a1 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
singly %= fs->blocks_per_block;
3487c: e1a01006 mov r1, r6 <== 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;
34880: e1a09000 mov r9, r0 <== NOT EXECUTED
singly %= fs->blocks_per_block;
34884: e1a0000a mov r0, sl <== NOT EXECUTED
34888: eb008731 bl 56554 <__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)
3488c: 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;
34890: e1a06000 mov r6, 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)
34894: 1a00004f bne 349d8 <rtems_rfs_block_map_grow+0x270> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_indirect_alloc (fs, map,
34898: e1a00005 mov r0, r5 <== NOT EXECUTED
3489c: e1a01004 mov r1, r4 <== NOT EXECUTED
348a0: e1a0200b mov r2, fp <== NOT EXECUTED
348a4: e28d3014 add r3, sp, #20 <== NOT EXECUTED
348a8: e58d7000 str r7, [sp] <== NOT EXECUTED
348ac: ebffff67 bl 34650 <rtems_rfs_block_map_indirect_alloc> <== NOT EXECUTED
&map->singly_buffer,
&singly_block,
false);
if (rc > 0)
348b0: e3500000 cmp r0, #0 <== NOT EXECUTED
348b4: c1a0a000 movgt sl, r0 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
348b8: c1a01007 movgt r1, r7 <== NOT EXECUTED
348bc: c1a00005 movgt r0, r5 <== NOT EXECUTED
348c0: ca000062 bgt 34a50 <rtems_rfs_block_map_grow+0x2e8> <== 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) ||
348c4: e3560000 cmp r6, #0 <== NOT EXECUTED
348c8: 0a000005 beq 348e4 <rtems_rfs_block_map_grow+0x17c> <== NOT EXECUTED
348cc: e3560005 cmp r6, #5 <== NOT EXECUTED
348d0: 03590000 cmpeq r9, #0 <== NOT EXECUTED
348d4: 13a03000 movne r3, #0 <== NOT EXECUTED
348d8: 03a03001 moveq r3, #1 <== NOT EXECUTED
348dc: e58d300c str r3, [sp, #12] <== NOT EXECUTED
348e0: 1a000013 bne 34934 <rtems_rfs_block_map_grow+0x1cc> <== 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,
348e4: e5952034 ldr r2, [r5, #52] ; 0x34 <== NOT EXECUTED
348e8: e594c008 ldr ip, [r4, #8] <== NOT EXECUTED
348ec: e2893009 add r3, r9, #9 <== NOT EXECUTED
348f0: e15c0002 cmp ip, r2 <== NOT EXECUTED
348f4: 13a0c000 movne ip, #0 <== NOT EXECUTED
348f8: 03a0c001 moveq ip, #1 <== NOT EXECUTED
348fc: e0843103 add r3, r4, r3, lsl #2 <== NOT EXECUTED
34900: e1a00005 mov r0, r5 <== NOT EXECUTED
34904: e1a01004 mov r1, r4 <== NOT EXECUTED
34908: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
3490c: e58dc000 str ip, [sp] <== NOT EXECUTED
34910: ebffff4e bl 34650 <rtems_rfs_block_map_indirect_alloc> <== NOT EXECUTED
&map->doubly_buffer,
&map->blocks[doubly],
upping);
if (rc > 0)
34914: e3500000 cmp r0, #0 <== NOT EXECUTED
34918: da000015 ble 34974 <rtems_rfs_block_map_grow+0x20c> <== NOT EXECUTED
3491c: e1a0a000 mov sl, r0 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
34920: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
34924: e1a00005 mov r0, r5 <== NOT EXECUTED
34928: e3a01000 mov r1, #0 <== NOT EXECUTED
3492c: eb000cdf bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
34930: ea000044 b 34a48 <rtems_rfs_block_map_grow+0x2e0> <== NOT EXECUTED
return rc;
}
}
else
{
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
34934: e2899009 add r9, r9, #9 <== NOT EXECUTED
34938: e7942109 ldr r2, [r4, r9, lsl #2] <== NOT EXECUTED
3493c: e1a00005 mov r0, r5 <== NOT EXECUTED
34940: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
34944: e3a03001 mov r3, #1 <== NOT EXECUTED
34948: eb0001f4 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
3494c: e3500000 cmp r0, #0 <== NOT EXECUTED
34950: da000007 ble 34974 <rtems_rfs_block_map_grow+0x20c> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, singly_block);
34954: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
34958: e1a0a000 mov sl, r0 <== NOT EXECUTED
3495c: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
34960: e1a00005 mov r0, r5 <== NOT EXECUTED
34964: eb000cd1 bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_group_bitmap_free (fs, false, block);
34968: e1a00005 mov r0, r5 <== NOT EXECUTED
3496c: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
34970: ea000036 b 34a50 <rtems_rfs_block_map_grow+0x2e8> <== NOT EXECUTED
return rc;
}
}
rtems_rfs_block_set_number (&map->doubly_buffer,
34974: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
34978: e5dd2017 ldrb r2, [sp, #23] <== NOT EXECUTED
3497c: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
34980: e7c32106 strb r2, [r3, r6, lsl #2] <== NOT EXECUTED
34984: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
34988: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
3498c: e1dd11b6 ldrh r1, [sp, #22] <== NOT EXECUTED
34990: e1a03106 lsl r3, r6, #2 <== NOT EXECUTED
34994: e0822003 add r2, r2, r3 <== NOT EXECUTED
34998: e5c21001 strb r1, [r2, #1] <== NOT EXECUTED
3499c: e594204c ldr r2, [r4, #76] ; 0x4c <== NOT EXECUTED
349a0: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
349a4: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
349a8: e1a06086 lsl r6, r6, #1 <== NOT EXECUTED
349ac: e2866001 add r6, r6, #1 <== NOT EXECUTED
349b0: e1a01421 lsr r1, r1, #8 <== NOT EXECUTED
349b4: e7c21086 strb r1, [r2, r6, lsl #1] <== NOT EXECUTED
349b8: e594204c ldr r2, [r4, #76] ; 0x4c <== NOT EXECUTED
349bc: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
349c0: e0823003 add r3, r2, r3 <== NOT EXECUTED
349c4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
349c8: e3a00001 mov r0, #1 <== NOT EXECUTED
349cc: e5c32003 strb r2, [r3, #3] <== NOT EXECUTED
349d0: e5c40044 strb r0, [r4, #68] ; 0x44 <== NOT EXECUTED
349d4: ea000020 b 34a5c <rtems_rfs_block_map_grow+0x2f4> <== NOT EXECUTED
singly,
singly_block);
}
else
{
rc = rtems_rfs_buffer_handle_request (fs,
349d8: e2899009 add r9, r9, #9 <== NOT EXECUTED
349dc: e7942109 ldr r2, [r4, r9, lsl #2] <== NOT EXECUTED
349e0: e1a00005 mov r0, r5 <== NOT EXECUTED
349e4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
349e8: e3a03001 mov r3, #1 <== NOT EXECUTED
349ec: eb0001cb bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
&map->doubly_buffer,
map->blocks[doubly],
true);
if (rc > 0)
349f0: e3500000 cmp r0, #0 <== NOT EXECUTED
349f4: ca000012 bgt 34a44 <rtems_rfs_block_map_grow+0x2dc> <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
return rc;
}
singly_block = rtems_rfs_block_get_number (&map->doubly_buffer,
349f8: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
349fc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
34a00: e0832106 add r2, r3, r6, lsl #2 <== NOT EXECUTED
34a04: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
34a08: e7d3c106 ldrb ip, [r3, r6, lsl #2] <== NOT EXECUTED
34a0c: e1a06002 mov r6, r2 <== NOT EXECUTED
34a10: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
34a14: e5d63002 ldrb r3, [r6, #2] <== NOT EXECUTED
34a18: e181cc0c orr ip, r1, ip, lsl #24 <== NOT EXECUTED
34a1c: e18cc802 orr ip, ip, r2, lsl #16 <== NOT EXECUTED
34a20: e18cc403 orr ip, ip, r3, lsl #8 <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
34a24: e1a0200c mov r2, ip <== NOT EXECUTED
34a28: e1a00005 mov r0, r5 <== NOT EXECUTED
34a2c: e1a0100b mov r1, fp <== NOT EXECUTED
34a30: 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,
34a34: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
singly);
rc = rtems_rfs_buffer_handle_request (fs, &map->singly_buffer,
34a38: eb0001b8 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
singly_block, true);
if (rc > 0)
34a3c: e3500000 cmp r0, #0 <== NOT EXECUTED
34a40: da000005 ble 34a5c <rtems_rfs_block_map_grow+0x2f4> <== NOT EXECUTED
34a44: e1a0a000 mov sl, r0 <== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, block);
34a48: e1a00005 mov r0, r5 <== NOT EXECUTED
34a4c: e3a01000 mov r1, #0 <== NOT EXECUTED
34a50: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
34a54: eb000c95 bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
34a58: ea00002b b 34b0c <rtems_rfs_block_map_grow+0x3a4> <== NOT EXECUTED
}
}
}
rtems_rfs_block_set_number (&map->singly_buffer, direct, block);
34a5c: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
34a60: e5dd201b ldrb r2, [sp, #27] <== NOT EXECUTED
34a64: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
34a68: e7c32107 strb r2, [r3, r7, lsl #2] <== NOT EXECUTED
34a6c: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
34a70: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
34a74: e1dd11ba ldrh r1, [sp, #26] <== NOT EXECUTED
34a78: e1a03107 lsl r3, r7, #2 <== NOT EXECUTED
34a7c: e0822003 add r2, r2, r3 <== NOT EXECUTED
34a80: e5c21001 strb r1, [r2, #1] <== NOT EXECUTED
34a84: e5942040 ldr r2, [r4, #64] ; 0x40 <== NOT EXECUTED
34a88: e59d1018 ldr r1, [sp, #24] <== NOT EXECUTED
34a8c: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
34a90: e1a07087 lsl r7, r7, #1 <== NOT EXECUTED
34a94: e2877001 add r7, r7, #1 <== NOT EXECUTED
34a98: e1a01421 lsr r1, r1, #8 <== NOT EXECUTED
34a9c: e7c21087 strb r1, [r2, r7, lsl #1] <== NOT EXECUTED
34aa0: e5942040 ldr r2, [r4, #64] ; 0x40 <== NOT EXECUTED
34aa4: e5922020 ldr r2, [r2, #32] <== NOT EXECUTED
34aa8: e0823003 add r3, r2, r3 <== NOT EXECUTED
34aac: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
34ab0: e5c32003 strb r2, [r3, #3] <== NOT EXECUTED
34ab4: e3a02001 mov r2, #1 <== NOT EXECUTED
34ab8: e5c42038 strb r2, [r4, #56] ; 0x38 <== NOT EXECUTED
}
map->size.count++;
34abc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
34ac0: e2833001 add r3, r3, #1 <== NOT EXECUTED
34ac4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
map->size.offset = 0;
34ac8: e3a03000 mov r3, #0 <== NOT EXECUTED
34acc: e584300c str r3, [r4, #12] <== NOT EXECUTED
if (b == 0)
34ad0: e3580000 cmp r8, #0 <== NOT EXECUTED
*new_block = block;
34ad4: 059d3018 ldreq r3, [sp, #24] <== NOT EXECUTED
34ad8: 059d0010 ldreq r0, [sp, #16] <== NOT EXECUTED
34adc: 05803000 streq r3, [r0] <== NOT EXECUTED
map->last_data_block = block;
34ae0: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
map->dirty = true;
34ae4: e3a02001 mov r2, #1 <== NOT EXECUTED
map->size.count++;
map->size.offset = 0;
if (b == 0)
*new_block = block;
map->last_data_block = block;
34ae8: e5843020 str r3, [r4, #32] <== NOT EXECUTED
map->dirty = true;
34aec: e5c42000 strb r2, [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++)
34af0: e2888001 add r8, r8, #1 <== NOT EXECUTED
34af4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
34af8: e1580003 cmp r8, r3 <== NOT EXECUTED
34afc: 3affff2b bcc 347b0 <rtems_rfs_block_map_grow+0x48> <== NOT EXECUTED
34b00: e3a0a000 mov sl, #0 <== NOT EXECUTED
34b04: ea000000 b 34b0c <rtems_rfs_block_map_grow+0x3a4> <== NOT EXECUTED
34b08: e1a0a000 mov sl, r0 <== NOT EXECUTED
map->last_data_block = block;
map->dirty = true;
}
return 0;
}
34b0c: e1a0000a mov r0, sl <== NOT EXECUTED
34b10: e28dd01c add sp, sp, #28 <== NOT EXECUTED
34b14: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00034650 <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)
{
34650: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
34654: e1a05001 mov r5, r1 <== NOT EXECUTED
34658: e1a04002 mov r4, r2 <== NOT EXECUTED
3465c: 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);
34660: e591101c ldr r1, [r1, #28] <== NOT EXECUTED
34664: e3a02000 mov r2, #0 <== NOT EXECUTED
34668: 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)
{
3466c: e1a06000 mov r6, r0 <== NOT EXECUTED
34670: 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);
34674: eb000daa bl 37d24 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
if (rc > 0)
34678: e250a000 subs sl, r0, #0 <== NOT EXECUTED
3467c: ca000037 bgt 34760 <rtems_rfs_block_map_indirect_alloc+0x110><== NOT EXECUTED
return rc;
rc = rtems_rfs_buffer_handle_request (fs, buffer, new_block, false);
34680: e1a00006 mov r0, r6 <== NOT EXECUTED
34684: e1a01004 mov r1, r4 <== NOT EXECUTED
34688: e59d2000 ldr r2, [sp] <== NOT EXECUTED
3468c: e3a03000 mov r3, #0 <== NOT EXECUTED
34690: eb0002a2 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
34694: e250a000 subs sl, r0, #0 <== NOT EXECUTED
34698: da000004 ble 346b0 <rtems_rfs_block_map_indirect_alloc+0x60><== NOT EXECUTED
{
rtems_rfs_group_bitmap_free (fs, false, new_block);
3469c: e1a00006 mov r0, r6 <== NOT EXECUTED
346a0: e3a01000 mov r1, #0 <== NOT EXECUTED
346a4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
346a8: eb000d80 bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
return rc;
346ac: ea00002b b 34760 <rtems_rfs_block_map_indirect_alloc+0x110><== NOT EXECUTED
}
memset (rtems_rfs_buffer_data (buffer), 0xff, rtems_rfs_fs_block_size (fs));
346b0: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
346b4: e5962008 ldr r2, [r6, #8] <== NOT EXECUTED
346b8: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
346bc: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
346c0: eb003477 bl 418a4 <memset> <== NOT EXECUTED
if (upping)
346c4: e3570000 cmp r7, #0 <== NOT EXECUTED
346c8: 0a00001e beq 34748 <rtems_rfs_block_map_indirect_alloc+0xf8><== NOT EXECUTED
346cc: e1a03005 mov r3, r5 <== NOT EXECUTED
346d0: e3a02000 mov r2, #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]);
346d4: e3a01001 mov r1, #1 <== NOT EXECUTED
346d8: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
346dc: e5d3c027 ldrb ip, [r3, #39] ; 0x27 <== NOT EXECUTED
346e0: e5900020 ldr r0, [r0, #32] <== NOT EXECUTED
346e4: e7c0c002 strb ip, [r0, r2] <== NOT EXECUTED
346e8: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
346ec: e5900020 ldr r0, [r0, #32] <== NOT EXECUTED
346f0: e1d3c2b6 ldrh ip, [r3, #38] ; 0x26 <== NOT EXECUTED
346f4: e0800002 add r0, r0, r2 <== NOT EXECUTED
346f8: e5c0c001 strb ip, [r0, #1] <== NOT EXECUTED
346fc: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
34700: e593c024 ldr ip, [r3, #36] ; 0x24 <== NOT EXECUTED
34704: e5900020 ldr r0, [r0, #32] <== NOT EXECUTED
34708: e1a0c42c lsr ip, ip, #8 <== NOT EXECUTED
3470c: e0800002 add r0, r0, r2 <== NOT EXECUTED
34710: e5c0c002 strb ip, [r0, #2] <== NOT EXECUTED
34714: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED
34718: e5900020 ldr r0, [r0, #32] <== NOT EXECUTED
3471c: e593c024 ldr ip, [r3, #36] ; 0x24 <== NOT EXECUTED
34720: e0800002 add r0, r0, r2 <== NOT EXECUTED
34724: e2822004 add r2, r2, #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++)
34728: e3520014 cmp r2, #20 <== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
3472c: e5c0c003 strb ip, [r0, #3] <== NOT EXECUTED
34730: e2833004 add r3, r3, #4 <== NOT EXECUTED
34734: e5c41000 strb r1, [r4] <== 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++)
34738: 1affffe6 bne 346d8 <rtems_rfs_block_map_indirect_alloc+0x88><== NOT EXECUTED
rtems_rfs_block_set_number (buffer, b, map->blocks[b]);
memset (map->blocks, 0, sizeof (map->blocks));
3473c: e2850024 add r0, r5, #36 ; 0x24 <== NOT EXECUTED
34740: e3a01000 mov r1, #0 <== NOT EXECUTED
34744: eb003456 bl 418a4 <memset> <== NOT EXECUTED
}
rtems_rfs_buffer_mark_dirty (buffer);
*block = new_block;
34748: 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);
3474c: e3a02001 mov r2, #1 <== NOT EXECUTED
*block = new_block;
34750: 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);
34754: e5c42000 strb r2, [r4] <== NOT EXECUTED
*block = new_block;
map->last_map_block = new_block;
34758: e585301c str r3, [r5, #28] <== NOT EXECUTED
3475c: e3a0a000 mov sl, #0 <== NOT EXECUTED
return 0;
}
34760: e1a0000a mov r0, sl <== NOT EXECUTED
34764: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
000342e0 <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)
{
342e0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
342e4: 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) ||
342e8: 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)
{
342ec: 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) ||
342f0: 0a000005 beq 3430c <rtems_rfs_block_map_indirect_shrink+0x2c><== NOT EXECUTED
342f4: e35c0005 cmp ip, #5 <== NOT EXECUTED
342f8: 03530000 cmpeq r3, #0 <== NOT EXECUTED
342fc: 13a01000 movne r1, #0 <== NOT EXECUTED
34300: 03a01001 moveq r1, #1 <== NOT EXECUTED
34304: 11a00001 movne r0, r1 <== NOT EXECUTED
34308: 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];
if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
3430c: e35c0005 cmp ip, #5 <== NOT EXECUTED
34310: 03530000 cmpeq r3, #0 <== NOT EXECUTED
34314: 13a0c000 movne ip, #0 <== NOT EXECUTED
34318: 03a0c001 moveq ip, #1 <== 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];
3431c: e2833009 add r3, r3, #9 <== NOT EXECUTED
34320: e7945103 ldr r5, [r4, r3, lsl #2] <== NOT EXECUTED
else
{
/*
* One less singly indirect block in the inode.
*/
map->blocks[indirect] = 0;
34324: 1784c103 strne ip, [r4, r3, lsl #2] <== NOT EXECUTED
if ((index == 0) ||
((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS)))
{
rtems_rfs_block_no block_to_free = map->blocks[indirect];
if ((indirect == 0) && (index == RTEMS_RFS_INODE_BLOCKS))
34328: 1a000010 bne 34370 <rtems_rfs_block_map_indirect_shrink+0x90><== NOT EXECUTED
3432c: e5923008 ldr r3, [r2, #8] <== NOT EXECUTED
34330: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
34334: e1a02004 mov r2, r4 <== 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,
34338: e2831014 add r1, 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);
3433c: e5d3c001 ldrb ip, [r3, #1] <== NOT EXECUTED
34340: e5d3e000 ldrb lr, [r3] <== NOT EXECUTED
34344: e5d36003 ldrb r6, [r3, #3] <== NOT EXECUTED
34348: e1a0c80c lsl ip, ip, #16 <== NOT EXECUTED
3434c: e18ccc0e orr ip, ip, lr, lsl #24 <== NOT EXECUTED
34350: e5d3e002 ldrb lr, [r3, #2] <== NOT EXECUTED
34354: e18cc006 orr ip, ip, r6 <== NOT EXECUTED
34358: e2833004 add r3, r3, #4 <== NOT EXECUTED
3435c: e18cc40e orr ip, ip, lr, lsl #8 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
34360: e1530001 cmp r3, r1 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_block_get_number (buffer, b);
34364: e582c024 str ip, [r2, #36] ; 0x24 <== NOT EXECUTED
34368: e2822004 add r2, r2, #4 <== NOT EXECUTED
{
/*
* Move to direct inode access.
*/
int b;
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
3436c: 1afffff2 bne 3433c <rtems_rfs_block_map_indirect_shrink+0x5c><== 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);
34370: e3a01000 mov r1, #0 <== NOT EXECUTED
34374: e1a02005 mov r2, r5 <== NOT EXECUTED
34378: eb000e4c bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
3437c: e3500000 cmp r0, #0 <== NOT EXECUTED
return rc;
map->last_map_block = block_to_free;
34380: d584501c strle r5, [r4, #28] <== NOT EXECUTED
}
return rc;
}
34384: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0003424c <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)
{
3424c: e92d4007 push {r0, r1, r2, lr} <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
34250: e591e010 ldr lr, [r1, #16] <== NOT EXECUTED
bpos.boff = 0;
34254: 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)
{
34258: e1a03002 mov r3, r2 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
bpos.bno = map->bpos.bno + 1;
3425c: e28ee001 add lr, lr, #1 <== NOT EXECUTED
bpos.boff = 0;
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
34260: 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;
34264: e58de000 str lr, [sp] <== NOT EXECUTED
bpos.boff = 0;
bpos.block = 0;
34268: 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;
3426c: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
bpos.block = 0;
return rtems_rfs_block_map_find (fs, map, &bpos, block);
34270: ebffff9f bl 340f4 <rtems_rfs_block_map_find> <== NOT EXECUTED
}
34274: e8bd800e pop {r1, r2, r3, pc} <== NOT EXECUTED
00034ce0 <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)
{
34ce0: 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;
34ce4: e3a05000 mov r5, #0 <== NOT EXECUTED
34ce8: e5c25000 strb r5, [r2] <== NOT EXECUTED
map->inode = NULL;
34cec: 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;
34cf0: e5825008 str r5, [r2, #8] <== NOT EXECUTED
size->offset = 0;
34cf4: 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;
34cf8: e5825010 str r5, [r2, #16] <== NOT EXECUTED
bpos->boff = 0;
34cfc: e5825014 str r5, [r2, #20] <== NOT EXECUTED
bpos->block = 0;
34d00: 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;
34d04: e5c25038 strb r5, [r2, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = 0;
34d08: e582503c str r5, [r2, #60] ; 0x3c <== NOT EXECUTED
handle->buffer = NULL;
34d0c: 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;
34d10: e5c25044 strb r5, [r2, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
34d14: e5825048 str r5, [r2, #72] ; 0x48 <== NOT EXECUTED
handle->buffer = NULL;
34d18: 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)
{
34d1c: e1a04002 mov r4, r2 <== NOT EXECUTED
34d20: e1a07000 mov r7, r0 <== NOT EXECUTED
34d24: 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);
34d28: eb000d8f bl 3836c <rtems_rfs_inode_load> <== NOT EXECUTED
if (rc > 0)
34d2c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
34d30: da00000d ble 34d6c <rtems_rfs_block_map_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);
34d34: e2841038 add r1, r4, #56 ; 0x38 <== NOT EXECUTED
34d38: e1a00007 mov r0, r7 <== NOT EXECUTED
34d3c: eb0000ae bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
34d40: e5c45038 strb r5, [r4, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = 0;
34d44: e584503c str r5, [r4, #60] ; 0x3c <== NOT EXECUTED
handle->buffer = NULL;
34d48: 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);
34d4c: e1a00007 mov r0, r7 <== NOT EXECUTED
34d50: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
34d54: eb0000a8 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
34d58: 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;
34d5c: e5c45044 strb r5, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
34d60: e5845048 str r5, [r4, #72] ; 0x48 <== NOT EXECUTED
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
rc = rtems_rfs_inode_unload (fs, inode, false);
return rc;
}
34d64: e1a00008 mov r0, r8 <== NOT EXECUTED
34d68: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
34d6c: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
34d70: e5846004 str r6, [r4, #4] <== 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,
34d74: e2831030 add r1, r3, #48 ; 0x30 <== NOT EXECUTED
/*
* Extract the block and block count data from the inode into the targets
* byte order.
*/
map->inode = inode;
34d78: e1a02004 mov r2, r4 <== NOT EXECUTED
34d7c: e283301c add r3, r3, #28 <== NOT EXECUTED
for (b = 0; b < RTEMS_RFS_INODE_BLOCKS; b++)
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
34d80: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
34d84: e5d3c000 ldrb ip, [r3] <== NOT EXECUTED
34d88: e5d35003 ldrb r5, [r3, #3] <== NOT EXECUTED
34d8c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
34d90: e1800c0c orr r0, r0, ip, lsl #24 <== NOT EXECUTED
34d94: e5d3c002 ldrb ip, [r3, #2] <== NOT EXECUTED
34d98: e1800005 orr r0, r0, r5 <== NOT EXECUTED
34d9c: e2833004 add r3, r3, #4 <== NOT EXECUTED
34da0: 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++)
34da4: e1530001 cmp r3, r1 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
34da8: e5820024 str r0, [r2, #36] ; 0x24 <== NOT EXECUTED
34dac: 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++)
34db0: 1afffff2 bne 34d80 <rtems_rfs_block_map_open+0xa0> <== 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);
34db4: e596300c ldr r3, [r6, #12] <== NOT EXECUTED
34db8: e283200c add r2, r3, #12 <== NOT EXECUTED
map->blocks[b] = rtems_rfs_inode_get_block (inode, b);
map->size.count = rtems_rfs_inode_get_block_count (inode);
34dbc: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
34dc0: e5d3000c ldrb r0, [r3, #12] <== NOT EXECUTED
34dc4: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
34dc8: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
34dcc: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
34dd0: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
34dd4: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
34dd8: e5842008 str r2, [r4, #8] <== NOT EXECUTED
map->size.offset = rtems_rfs_inode_get_block_offset (inode);
34ddc: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
34de0: e5d3200b ldrb r2, [r3, #11] <== NOT EXECUTED
34de4: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
34de8: e584200c str r2, [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);
34dec: e2832030 add r2, r3, #48 ; 0x30 <== NOT EXECUTED
map->last_map_block = rtems_rfs_inode_get_last_map_block (inode);
34df0: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
34df4: e5d30030 ldrb r0, [r3, #48] ; 0x30 <== NOT EXECUTED
34df8: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
34dfc: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
34e00: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
34e04: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
34e08: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
34e0c: e584201c str r2, [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);
34e10: e2832034 add r2, r3, #52 ; 0x34 <== NOT EXECUTED
map->last_data_block = rtems_rfs_inode_get_last_data_block (inode);
34e14: e5d30034 ldrb r0, [r3, #52] ; 0x34 <== NOT EXECUTED
34e18: e5d23003 ldrb r3, [r2, #3] <== NOT EXECUTED
34e1c: e5d21001 ldrb r1, [r2, #1] <== NOT EXECUTED
34e20: e1833c00 orr r3, r3, r0, lsl #24 <== NOT EXECUTED
34e24: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
34e28: e1833801 orr r3, r3, r1, lsl #16 <== NOT EXECUTED
34e2c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, inode, false);
34e30: e1a00007 mov r0, r7 <== NOT EXECUTED
34e34: e1a01006 mov r1, r6 <== NOT EXECUTED
34e38: 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);
34e3c: e5843020 str r3, [r4, #32] <== NOT EXECUTED
rc = rtems_rfs_inode_unload (fs, inode, false);
return rc;
}
34e40: 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);
34e44: ea000d11 b 38290 <rtems_rfs_inode_unload> <== NOT EXECUTED
00034278 <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)
{
34278: e92d43f7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, lr} <== NOT EXECUTED
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
3427c: 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,
34280: e5905008 ldr r5, [r0, #8] <== NOT EXECUTED
34284: 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)
{
34288: e1a04001 mov r4, r1 <== NOT EXECUTED
3428c: e021ce95 mla r1, r5, lr, ip <== NOT EXECUTED
34290: e0928001 adds r8, r2, r1 <== NOT EXECUTED
34294: e2a39000 adc r9, r3, #0 <== NOT EXECUTED
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
34298: 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)
{
3429c: e1a06000 mov r6, r0 <== NOT EXECUTED
342a0: e1a01008 mov r1, r8 <== NOT EXECUTED
342a4: e1a02009 mov r2, r9 <== NOT EXECUTED
342a8: e1a0300d mov r3, sp <== NOT EXECUTED
rtems_rfs_block_pos bpos;
rtems_rfs_block_copy_bpos (&bpos, &map->bpos);
342ac: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
342b0: e58d7008 str r7, [sp, #8] <== NOT EXECUTED
342b4: e58de000 str lr, [sp] <== NOT EXECUTED
342b8: ebffff30 bl 33f80 <rtems_rfs_block_get_bpos> <== NOT EXECUTED
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
342bc: e3a0c000 mov ip, #0 <== NOT EXECUTED
rtems_rfs_block_add_pos (fs, offset, &bpos);
return rtems_rfs_block_map_find (fs, map, &bpos, block);
342c0: e1a00006 mov r0, r6 <== NOT EXECUTED
342c4: e1a01004 mov r1, r4 <== NOT EXECUTED
342c8: e1a0200d mov r2, sp <== NOT EXECUTED
342cc: 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,
342d0: e1a0500d mov r5, sp <== NOT EXECUTED
rtems_rfs_block_get_pos (fs, bpos) + offset,
bpos);
bpos->block = 0;
342d4: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
342d8: ebffff85 bl 340f4 <rtems_rfs_block_map_find> <== NOT EXECUTED
}
342dc: e8bd83fe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, pc} <== NOT EXECUTED
00034388 <rtems_rfs_block_map_shrink>:
{
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)
34388: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
3438c: e3530000 cmp r3, #0 <== NOT EXECUTED
int
rtems_rfs_block_map_shrink (rtems_rfs_file_system* fs,
rtems_rfs_block_map* map,
size_t blocks)
{
34390: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED
34394: e1a04001 mov r4, r1 <== NOT EXECUTED
34398: e1a05000 mov r5, r0 <== 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)
3439c: 0a0000a7 beq 34640 <rtems_rfs_block_map_shrink+0x2b8> <== NOT EXECUTED
343a0: e1520003 cmp r2, r3 <== NOT EXECUTED
343a4: 31a09002 movcc r9, r2 <== NOT EXECUTED
343a8: 21a09003 movcs r9, r3 <== 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,
343ac: e2812044 add r2, r1, #68 ; 0x44 <== 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,
343b0: e281b038 add fp, r1, #56 ; 0x38 <== 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,
343b4: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
343b8: ea000080 b 345c0 <rtems_rfs_block_map_shrink+0x238> <== NOT EXECUTED
{
rtems_rfs_block_no block;
rtems_rfs_block_no block_to_free;
int rc;
block = map->size.count - 1;
343bc: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
343c0: e243a001 sub sl, r3, #1 <== NOT EXECUTED
if (block < RTEMS_RFS_INODE_BLOCKS)
343c4: e35a0004 cmp sl, #4 <== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
343c8: 92833008 addls r3, r3, #8 <== NOT EXECUTED
map->blocks[block] = 0;
343cc: 93a02000 movls r2, #0 <== NOT EXECUTED
{
/*
* We have less than RTEMS_RFS_INODE_BLOCKS so they are held in the
* inode.
*/
block_to_free = map->blocks[block];
343d0: 97948103 ldrls r8, [r4, r3, lsl #2] <== NOT EXECUTED
map->blocks[block] = 0;
343d4: 97842103 strls r2, [r4, r3, lsl #2] <== NOT EXECUTED
343d8: 9a000069 bls 34584 <rtems_rfs_block_map_shrink+0x1fc> <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
343dc: e5957030 ldr r7, [r5, #48] ; 0x30 <== NOT EXECUTED
343e0: e1a0000a mov r0, sl <== NOT EXECUTED
343e4: e1a01007 mov r1, r7 <== NOT EXECUTED
343e8: eb008859 bl 56554 <__umodsi3> <== NOT EXECUTED
singly = block / fs->blocks_per_block;
343ec: e1a01007 mov r1, r7 <== NOT EXECUTED
* table of block numbers.
*/
rtems_rfs_block_no direct;
rtems_rfs_block_no singly;
direct = block % fs->blocks_per_block;
343f0: e1a06000 mov r6, r0 <== NOT EXECUTED
singly = block / fs->blocks_per_block;
343f4: e1a0000a mov r0, sl <== NOT EXECUTED
343f8: eb0087c1 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
if (block < fs->block_map_singly_blocks)
343fc: e5953034 ldr r3, [r5, #52] ; 0x34 <== NOT EXECUTED
34400: e15a0003 cmp sl, 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;
34404: e1a08000 mov r8, r0 <== NOT EXECUTED
if (block < fs->block_map_singly_blocks)
34408: 2a00001d bcs 34484 <rtems_rfs_block_map_shrink+0xfc> <== 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,
3440c: e2803009 add r3, r0, #9 <== NOT EXECUTED
34410: e7942103 ldr r2, [r4, r3, lsl #2] <== NOT EXECUTED
34414: e1a00005 mov r0, r5 <== NOT EXECUTED
34418: e1a0100b mov r1, fp <== NOT EXECUTED
3441c: e3a03001 mov r3, #1 <== NOT EXECUTED
34420: eb00033e bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
map->blocks[singly], true);
if (rc > 0)
34424: e3500000 cmp r0, #0 <== NOT EXECUTED
34428: ca000085 bgt 34644 <rtems_rfs_block_map_shrink+0x2bc> <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
3442c: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
34430: e593c020 ldr ip, [r3, #32] <== NOT EXECUTED
34434: e08c7106 add r7, ip, r6, lsl #2 <== NOT EXECUTED
34438: e1a0e007 mov lr, r7 <== NOT EXECUTED
3443c: e5d77002 ldrb r7, [r7, #2] <== NOT EXECUTED
34440: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
34444: e1a03008 mov r3, r8 <== NOT EXECUTED
34448: e1a00005 mov r0, r5 <== NOT EXECUTED
3444c: e1a01004 mov r1, r4 <== NOT EXECUTED
34450: e1a0200b mov r2, fp <== 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,
34454: e5dea003 ldrb sl, [lr, #3] <== NOT EXECUTED
34458: e7dc8106 ldrb r8, [ip, r6, lsl #2] <== NOT EXECUTED
3445c: e5de7001 ldrb r7, [lr, #1] <== NOT EXECUTED
direct);
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->singly_buffer,
34460: e58d6000 str r6, [sp] <== NOT EXECUTED
34464: ebffff9d bl 342e0 <rtems_rfs_block_map_indirect_shrink> <== NOT EXECUTED
singly, direct);
if (rc)
34468: e3500000 cmp r0, #0 <== NOT EXECUTED
3446c: 1a000074 bne 34644 <rtems_rfs_block_map_shrink+0x2bc> <== 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,
34470: e18a8c08 orr r8, sl, r8, lsl #24 <== NOT EXECUTED
34474: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
34478: e1888807 orr r8, r8, r7, lsl #16 <== NOT EXECUTED
3447c: e1888403 orr r8, r8, r3, lsl #8 <== NOT EXECUTED
34480: ea00003f b 34584 <rtems_rfs_block_map_shrink+0x1fc> <== 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)
34484: e5953038 ldr r3, [r5, #56] ; 0x38 <== NOT EXECUTED
34488: e15a0003 cmp sl, r3 <== NOT EXECUTED
3448c: 2a00004d bcs 345c8 <rtems_rfs_block_map_shrink+0x240> <== 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;
34490: e1a01007 mov r1, r7 <== NOT EXECUTED
34494: eb00879a bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
34498: e2803009 add r3, r0, #9 <== 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;
3449c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
doubly_singly = singly % fs->blocks_per_block;
rc = rtems_rfs_buffer_handle_request (fs, &map->doubly_buffer,
344a0: e7942103 ldr r2, [r4, r3, lsl #2] <== NOT EXECUTED
344a4: e1a00005 mov r0, r5 <== NOT EXECUTED
344a8: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
344ac: e3a03001 mov r3, #1 <== NOT EXECUTED
344b0: eb00031a bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
map->blocks[doubly], true);
if (rc > 0)
344b4: e3500000 cmp r0, #0 <== NOT EXECUTED
344b8: ca000061 bgt 34644 <rtems_rfs_block_map_shrink+0x2bc> <== 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;
344bc: e1a01007 mov r1, r7 <== NOT EXECUTED
344c0: e1a00008 mov r0, r8 <== NOT EXECUTED
344c4: eb008822 bl 56554 <__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,
344c8: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
344cc: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
344d0: e0832100 add r2, r3, r0, lsl #2 <== NOT EXECUTED
344d4: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
344d8: e7d3a100 ldrb sl, [r3, r0, lsl #2] <== NOT EXECUTED
344dc: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
344e0: e0833100 add r3, r3, r0, lsl #2 <== NOT EXECUTED
344e4: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
344e8: e181ac0a orr sl, r1, sl, lsl #24 <== NOT EXECUTED
344ec: e18aa802 orr sl, sl, r2, lsl #16 <== NOT EXECUTED
344f0: e18aa403 orr sl, sl, 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;
344f4: e1a07000 mov r7, 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,
344f8: e1a0100b mov r1, fp <== NOT EXECUTED
344fc: e1a00005 mov r0, r5 <== NOT EXECUTED
34500: e1a0200a mov r2, sl <== NOT EXECUTED
34504: e3a03001 mov r3, #1 <== NOT EXECUTED
34508: eb000304 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
singly, true);
if (rc > 0)
3450c: e3500000 cmp r0, #0 <== NOT EXECUTED
34510: ca00004b bgt 34644 <rtems_rfs_block_map_shrink+0x2bc> <== NOT EXECUTED
return rc;
block_to_free = rtems_rfs_block_get_number (&map->singly_buffer,
34514: e5943040 ldr r3, [r4, #64] ; 0x40 <== NOT EXECUTED
34518: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
3451c: e0832106 add r2, r3, r6, lsl #2 <== NOT EXECUTED
34520: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
34524: e7d38106 ldrb r8, [r3, r6, lsl #2] <== NOT EXECUTED
34528: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED
3452c: e0833106 add r3, r3, r6, lsl #2 <== NOT EXECUTED
34530: e1818c08 orr r8, r1, r8, lsl #24 <== NOT EXECUTED
34534: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
34538: e1888802 orr r8, r8, r2, lsl #16 <== NOT EXECUTED
direct);
if (direct == 0)
3453c: e3560000 cmp r6, #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,
34540: e1888403 orr r8, r8, r3, lsl #8 <== NOT EXECUTED
direct);
if (direct == 0)
34544: 1a00000e bne 34584 <rtems_rfs_block_map_shrink+0x1fc> <== NOT EXECUTED
{
rc = rtems_rfs_group_bitmap_free (fs, false, singly);
34548: e1a01006 mov r1, r6 <== NOT EXECUTED
3454c: e1a00005 mov r0, r5 <== NOT EXECUTED
34550: e1a0200a mov r2, sl <== NOT EXECUTED
34554: eb000dd5 bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
34558: e3500000 cmp r0, #0 <== NOT EXECUTED
3455c: ca000038 bgt 34644 <rtems_rfs_block_map_shrink+0x2bc> <== NOT EXECUTED
return rc;
map->last_map_block = singly;
34560: e584a01c str sl, [r4, #28] <== NOT EXECUTED
rc = rtems_rfs_block_map_indirect_shrink (fs, map, &map->doubly_buffer,
34564: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
34568: e1a00005 mov r0, r5 <== NOT EXECUTED
3456c: e1a01004 mov r1, r4 <== NOT EXECUTED
34570: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
34574: e58d7000 str r7, [sp] <== NOT EXECUTED
34578: ebffff58 bl 342e0 <rtems_rfs_block_map_indirect_shrink> <== NOT EXECUTED
doubly, doubly_singly);
if (rc)
3457c: e3500000 cmp r0, #0 <== NOT EXECUTED
34580: 1a00002f bne 34644 <rtems_rfs_block_map_shrink+0x2bc> <== NOT EXECUTED
{
rc = EIO;
break;
}
}
rc = rtems_rfs_group_bitmap_free (fs, false, block_to_free);
34584: e1a00005 mov r0, r5 <== NOT EXECUTED
34588: e3a01000 mov r1, #0 <== NOT EXECUTED
3458c: e1a02008 mov r2, r8 <== NOT EXECUTED
34590: eb000dc6 bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
if (rc > 0)
34594: e3500000 cmp r0, #0 <== NOT EXECUTED
34598: ca000029 bgt 34644 <rtems_rfs_block_map_shrink+0x2bc> <== NOT EXECUTED
return rc;
map->size.count--;
3459c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
345a0: e2433001 sub r3, r3, #1 <== NOT EXECUTED
345a4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
map->size.offset = 0;
345a8: e3a02000 mov r2, #0 <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
345ac: 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;
345b0: e5848020 str r8, [r4, #32] <== 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;
345b4: e584200c str r2, [r4, #12] <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
345b8: e5c43000 strb r3, [r4] <== NOT EXECUTED
blocks--;
345bc: e2499001 sub r9, r9, #1 <== NOT EXECUTED
return 0;
if (blocks > map->size.count)
blocks = map->size.count;
while (blocks)
345c0: e3590000 cmp r9, #0 <== NOT EXECUTED
345c4: 1affff7c bne 343bc <rtems_rfs_block_map_shrink+0x34> <== NOT EXECUTED
map->last_data_block = block_to_free;
map->dirty = true;
blocks--;
}
if (map->size.count == 0)
345c8: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
345cc: e3530000 cmp r3, #0 <== NOT EXECUTED
{
map->last_map_block = 0;
map->last_data_block = 0;
345d0: 05843020 streq r3, [r4, #32] <== NOT EXECUTED
blocks--;
}
if (map->size.count == 0)
{
map->last_map_block = 0;
345d4: 0584301c streq r3, [r4, #28] <== NOT EXECUTED
}
/*
* Keep the position inside the map.
*/
if (rtems_rfs_block_pos_past_end (&map->bpos, &map->size))
345d8: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
345dc: e3530000 cmp r3, #0 <== NOT EXECUTED
345e0: 0a000002 beq 345f0 <rtems_rfs_block_map_shrink+0x268> <== NOT EXECUTED
345e4: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
345e8: e3520000 cmp r2, #0 <== NOT EXECUTED
345ec: 0a000009 beq 34618 <rtems_rfs_block_map_shrink+0x290> <== NOT EXECUTED
345f0: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
345f4: e1530002 cmp r3, r2 <== NOT EXECUTED
345f8: 2a000006 bcs 34618 <rtems_rfs_block_map_shrink+0x290> <== NOT EXECUTED
345fc: e2422001 sub r2, r2, #1 <== NOT EXECUTED
34600: e1530002 cmp r3, r2 <== NOT EXECUTED
34604: 1a00000d bne 34640 <rtems_rfs_block_map_shrink+0x2b8> <== NOT EXECUTED
34608: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED
3460c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
34610: e1520003 cmp r2, r3 <== NOT EXECUTED
34614: 9a000009 bls 34640 <rtems_rfs_block_map_shrink+0x2b8> <== NOT EXECUTED
rtems_rfs_block_size_get_bpos (&map->size, &map->bpos);
34618: e594200c ldr r2, [r4, #12] <== NOT EXECUTED
3461c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
34620: e3520000 cmp r2, #0 <== NOT EXECUTED
34624: e5843010 str r3, [r4, #16] <== NOT EXECUTED
34628: e3a00000 mov r0, #0 <== NOT EXECUTED
3462c: 12433001 subne r3, r3, #1 <== NOT EXECUTED
34630: e5842014 str r2, [r4, #20] <== NOT EXECUTED
34634: e5840018 str r0, [r4, #24] <== NOT EXECUTED
34638: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
3463c: 1a000000 bne 34644 <rtems_rfs_block_map_shrink+0x2bc> <== NOT EXECUTED
34640: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
34644: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
0003dd0c <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)
3dd0c: e31100ff tst r1, #255 ; 0xff <== NOT EXECUTED
}
int
rtems_rfs_buffer_bdbuf_release (rtems_rfs_buffer* buffer,
bool modified)
{
3dd10: 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)
3dd14: 0a000001 beq 3dd20 <rtems_rfs_buffer_bdbuf_release+0x14> <== NOT EXECUTED
sc = rtems_bdbuf_release_modified (buffer);
3dd18: ebff1910 bl 4160 <rtems_bdbuf_release_modified> <== NOT EXECUTED
3dd1c: ea000000 b 3dd24 <rtems_rfs_buffer_bdbuf_release+0x18> <== NOT EXECUTED
else
sc = rtems_bdbuf_release (buffer);
3dd20: ebff1930 bl 41e8 <rtems_bdbuf_release> <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
3dd24: e3500000 cmp r0, #0 <== NOT EXECUTED
3dd28: 13a00005 movne r0, #5 <== NOT EXECUTED
3dd2c: 03a00000 moveq r0, #0 <== NOT EXECUTED
3dd30: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0003dd34 <rtems_rfs_buffer_bdbuf_request>:
rtems_rfs_buffer** buffer)
{
rtems_status_code sc;
int rc = 0;
if (read)
3dd34: 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)
{
3dd38: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
3dd3c: e1a02001 mov r2, r1 <== NOT EXECUTED
3dd40: e590100c ldr r1, [r0, #12] <== NOT EXECUTED
rtems_status_code sc;
int rc = 0;
if (read)
3dd44: 0a000002 beq 3dd54 <rtems_rfs_buffer_bdbuf_request+0x20> <== NOT EXECUTED
sc = rtems_bdbuf_read (rtems_rfs_fs_device (fs), block, buffer);
3dd48: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3dd4c: ebff1d65 bl 52e8 <rtems_bdbuf_read> <== NOT EXECUTED
3dd50: ea000001 b 3dd5c <rtems_rfs_buffer_bdbuf_request+0x28> <== NOT EXECUTED
else
sc = rtems_bdbuf_get (rtems_rfs_fs_device (fs), block, buffer);
3dd54: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3dd58: ebff1d2f bl 521c <rtems_bdbuf_get> <== NOT EXECUTED
#endif
rc = EIO;
}
return rc;
}
3dd5c: e3500000 cmp r0, #0 <== NOT EXECUTED
3dd60: 13a00005 movne r0, #5 <== NOT EXECUTED
3dd64: 03a00000 moveq r0, #0 <== NOT EXECUTED
3dd68: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00034f7c <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));
34f7c: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
34f80: 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));
34f84: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
return 0;
}
int
rtems_rfs_buffer_close (rtems_rfs_file_system* fs)
{
34f88: 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));
34f8c: ebffffe7 bl 34f30 <rtems_rfs_buffer_setblksize> <== NOT EXECUTED
34f90: 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);
34f94: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
34f98: ebff453b bl 648c <rtems_disk_release> <== NOT EXECUTED
rc, strerror (rc));
}
#endif
return rc;
}
34f9c: e1a00005 mov r0, r5 <== NOT EXECUTED
34fa0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00035328 <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)
{
35328: e92d4010 push {r4, lr} <== NOT EXECUTED
3532c: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_rfs_buffer_handle_release (fs, handle);
35330: ebffff31 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
35334: e3a00000 mov r0, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
35338: 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;
3533c: e5c40000 strb r0, [r4] <== NOT EXECUTED
handle->bnum = 0;
35340: e5840004 str r0, [r4, #4] <== NOT EXECUTED
handle->buffer = NULL;
return 0;
}
35344: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00034ffc <rtems_rfs_buffer_handle_release>:
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
34ffc: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
35000: e5916008 ldr r6, [r1, #8] <== NOT EXECUTED
35004: e3560000 cmp r6, #0 <== NOT EXECUTED
}
int
rtems_rfs_buffer_handle_release (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
35008: e1a05001 mov r5, r1 <== NOT EXECUTED
3500c: e1a04000 mov r4, r0 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (handle))
35010: 0a000040 beq 35118 <rtems_rfs_buffer_handle_release+0x11c> <== 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)
35014: e5963034 ldr r3, [r6, #52] ; 0x34 <== NOT EXECUTED
35018: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_rfs_buffer_refs_down (handle);
3501c: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
35020: c5863034 strgt r3, [r6, #52] ; 0x34 <== NOT EXECUTED
if (rtems_rfs_buffer_refs (handle) == 0)
35024: e5967034 ldr r7, [r6, #52] ; 0x34 <== NOT EXECUTED
35028: e3570000 cmp r7, #0 <== NOT EXECUTED
3502c: 13a06000 movne r6, #0 <== NOT EXECUTED
35030: 1a000036 bne 35110 <rtems_rfs_buffer_handle_release+0x114> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
35034: e1a00006 mov r0, r6 <== NOT EXECUTED
35038: ebff5d13 bl c48c <_Chain_Extract> <== NOT EXECUTED
{
rtems_chain_extract (rtems_rfs_buffer_link (handle));
fs->buffers_count--;
3503c: e594304c ldr r3, [r4, #76] ; 0x4c <== NOT EXECUTED
if (rtems_rfs_fs_no_local_cache (fs))
35040: e5946000 ldr r6, [r4] <== 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--;
35044: e2433001 sub r3, r3, #1 <== NOT EXECUTED
if (rtems_rfs_fs_no_local_cache (fs))
35048: e2166002 ands r6, r6, #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--;
3504c: e584304c str r3, [r4, #76] ; 0x4c <== NOT EXECUTED
if (rtems_rfs_fs_no_local_cache (fs))
35050: 0a000005 beq 3506c <rtems_rfs_buffer_handle_release+0x70> <== NOT EXECUTED
{
handle->buffer->user = (void*) 0;
35054: e5950008 ldr r0, [r5, #8] <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (handle->buffer,
35058: e5d51000 ldrb r1, [r5] <== 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;
3505c: e5807038 str r7, [r0, #56] ; 0x38 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (handle->buffer,
35060: eb002329 bl 3dd0c <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
35064: e1a06000 mov r6, r0 <== NOT EXECUTED
35068: ea000028 b 35110 <rtems_rfs_buffer_handle_release+0x114> <== 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 +
3506c: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
35070: e594306c ldr r3, [r4, #108] ; 0x6c <== NOT EXECUTED
fs->release_modified_count) >= fs->max_held_buffers)
35074: e594103c ldr r1, [r4, #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 +
35078: e0830002 add r0, r3, r2 <== NOT EXECUTED
fs->release_modified_count) >= fs->max_held_buffers)
3507c: e1500001 cmp r0, r1 <== NOT EXECUTED
35080: 3a000012 bcc 350d0 <rtems_rfs_buffer_handle_release+0xd4> <== 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)
35084: e1520003 cmp r2, r3 <== NOT EXECUTED
35088: 9a000006 bls 350a8 <rtems_rfs_buffer_handle_release+0xac> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get(
rtems_chain_control *the_chain
)
{
return _Chain_Get( the_chain );
3508c: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED
35090: ebff5d06 bl c4b0 <_Chain_Get> <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (&fs->release);
fs->release_count--;
35094: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
35098: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3509c: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
350a0: e1a01006 mov r1, r6 <== NOT EXECUTED
350a4: ea000005 b 350c0 <rtems_rfs_buffer_handle_release+0xc4> <== NOT EXECUTED
350a8: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
350ac: ebff5cff bl c4b0 <_Chain_Get> <== NOT EXECUTED
}
else
{
buffer =
(rtems_rfs_buffer*) rtems_chain_get (&fs->release_modified);
fs->release_modified_count--;
350b0: e594306c ldr r3, [r4, #108] ; 0x6c <== NOT EXECUTED
350b4: e2433001 sub r3, r3, #1 <== NOT EXECUTED
350b8: e584306c str r3, [r4, #108] ; 0x6c <== NOT EXECUTED
350bc: e3a01001 mov r1, #1 <== NOT EXECUTED
modified = true;
}
buffer->user = (void*) 0;
350c0: e3a03000 mov r3, #0 <== NOT EXECUTED
350c4: e5803038 str r3, [r0, #56] ; 0x38 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
350c8: eb00230f bl 3dd0c <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
350cc: e1a06000 mov r6, r0 <== NOT EXECUTED
}
if (rtems_rfs_buffer_dirty (handle))
350d0: e5d53000 ldrb r3, [r5] <== NOT EXECUTED
350d4: e3530000 cmp r3, #0 <== NOT EXECUTED
350d8: 0a000006 beq 350f8 <rtems_rfs_buffer_handle_release+0xfc> <== 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 );
350dc: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
350e0: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
350e4: ebff5cdd bl c460 <_Chain_Append> <== NOT EXECUTED
{
rtems_chain_append (&fs->release_modified,
rtems_rfs_buffer_link (handle));
fs->release_modified_count++;
350e8: e594306c ldr r3, [r4, #108] ; 0x6c <== NOT EXECUTED
350ec: e2833001 add r3, r3, #1 <== NOT EXECUTED
350f0: e584306c str r3, [r4, #108] ; 0x6c <== NOT EXECUTED
350f4: ea000005 b 35110 <rtems_rfs_buffer_handle_release+0x114> <== NOT EXECUTED
350f8: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED
350fc: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
35100: ebff5cd6 bl c460 <_Chain_Append> <== NOT EXECUTED
}
else
{
rtems_chain_append (&fs->release, rtems_rfs_buffer_link (handle));
fs->release_count++;
35104: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
35108: e2833001 add r3, r3, #1 <== NOT EXECUTED
3510c: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
}
}
}
handle->buffer = NULL;
35110: e3a03000 mov r3, #0 <== NOT EXECUTED
35114: e5853008 str r3, [r5, #8] <== NOT EXECUTED
}
return rc;
}
35118: e1a00006 mov r0, r6 <== NOT EXECUTED
3511c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00035120 <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)
{
35120: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
35124: 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))
35128: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED
3512c: 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)
{
35130: e1a04000 mov r4, r0 <== NOT EXECUTED
35134: e1a06002 mov r6, r2 <== NOT EXECUTED
35138: e20380ff and r8, 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))
3513c: 0a00000d beq 35178 <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))
35140: e3520000 cmp r2, #0 <== NOT EXECUTED
35144: 0a000003 beq 35158 <rtems_rfs_buffer_handle_request+0x38> <== NOT EXECUTED
35148: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED
3514c: e1530002 cmp r3, r2 <== NOT EXECUTED
35150: 03a00000 moveq r0, #0 <== NOT EXECUTED
35154: 08bd81f0 popeq {r4, r5, r6, r7, r8, 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);
35158: e1a00004 mov r0, r4 <== NOT EXECUTED
3515c: e1a01005 mov r1, r5 <== NOT EXECUTED
35160: ebffffa5 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
if (rc > 0)
35164: e3500000 cmp r0, #0 <== NOT EXECUTED
35168: c8bd81f0 popgt {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return rc;
handle->dirty = false;
3516c: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
35170: 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;
35174: 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)
35178: e594204c ldr r2, [r4, #76] ; 0x4c <== NOT EXECUTED
3517c: e3520000 cmp r2, #0 <== NOT EXECUTED
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
35180: 12841040 addne r1, r4, #64 ; 0x40 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
35184: 15943048 ldrne r3, [r4, #72] ; 0x48 <== 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)
35188: 1a00000d bne 351c4 <rtems_rfs_buffer_handle_request+0xa4> <== NOT EXECUTED
3518c: ea000010 b 351d4 <rtems_rfs_buffer_handle_request+0xb4> <== 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)
35190: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED
35194: e1500006 cmp r0, r6 <== 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;
35198: e1a07003 mov r7, r3 <== 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)
3519c: 1a000007 bne 351c0 <rtems_rfs_buffer_handle_request+0xa0> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
351a0: e2422001 sub r2, r2, #1 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
351a4: e1a00003 mov r0, r3 <== NOT EXECUTED
351a8: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
351ac: ebff5cb6 bl c48c <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
351b0: e3a03000 mov r3, #0 <== NOT EXECUTED
351b4: e5873000 str r3, [r7] <== NOT EXECUTED
351b8: e5873004 str r3, [r7, #4] <== NOT EXECUTED
351bc: ea000003 b 351d0 <rtems_rfs_buffer_handle_request+0xb0> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
351c0: e5933004 ldr r3, [r3, #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))
351c4: e1530001 cmp r3, r1 <== NOT EXECUTED
351c8: 1afffff0 bne 35190 <rtems_rfs_buffer_handle_request+0x70> <== NOT EXECUTED
351cc: e3a07000 mov r7, #0 <== NOT EXECUTED
if (fs->buffers_count)
{
/*
* Check the active buffer list for shared buffers.
*/
handle->buffer = rtems_rfs_scan_chain (&fs->buffers,
351d0: e5857008 str r7, [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) &&
351d4: e5943000 ldr r3, [r4] <== NOT EXECUTED
351d8: e3130002 tst r3, #2 <== NOT EXECUTED
351dc: 1a000036 bne 352bc <rtems_rfs_buffer_handle_request+0x19c> <== NOT EXECUTED
!rtems_rfs_buffer_handle_has_block (handle))
351e0: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
351e4: e3530000 cmp r3, #0 <== NOT EXECUTED
351e8: 1a000033 bne 352bc <rtems_rfs_buffer_handle_request+0x19c> <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
351ec: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
351f0: e3520000 cmp r2, #0 <== NOT EXECUTED
handle->buffer = rtems_rfs_scan_chain (&fs->release,
351f4: 12841050 addne r1, r4, #80 ; 0x50 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
351f8: 15943058 ldrne r3, [r4, #88] ; 0x58 <== NOT EXECUTED
!rtems_rfs_buffer_handle_has_block (handle))
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
351fc: 1a00000d bne 35238 <rtems_rfs_buffer_handle_request+0x118> <== NOT EXECUTED
35200: ea000010 b 35248 <rtems_rfs_buffer_handle_request+0x128> <== 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)
35204: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED
35208: e1500006 cmp r0, r6 <== 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;
3520c: e1a07003 mov r7, r3 <== 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)
35210: 1a000007 bne 35234 <rtems_rfs_buffer_handle_request+0x114> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
35214: e2422001 sub r2, r2, #1 <== NOT EXECUTED
35218: e1a00003 mov r0, r3 <== NOT EXECUTED
3521c: e584205c str r2, [r4, #92] ; 0x5c <== NOT EXECUTED
35220: ebff5c99 bl c48c <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
35224: e3a03000 mov r3, #0 <== NOT EXECUTED
35228: e5873000 str r3, [r7] <== NOT EXECUTED
3522c: e5873004 str r3, [r7, #4] <== NOT EXECUTED
35230: ea000003 b 35244 <rtems_rfs_buffer_handle_request+0x124> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
35234: e5933004 ldr r3, [r3, #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))
35238: e1530001 cmp r3, r1 <== NOT EXECUTED
3523c: 1afffff0 bne 35204 <rtems_rfs_buffer_handle_request+0xe4> <== NOT EXECUTED
35240: e3a07000 mov r7, #0 <== NOT EXECUTED
{
/*
* Check the local cache of released buffers.
*/
if (fs->release_count)
handle->buffer = rtems_rfs_scan_chain (&fs->release,
35244: e5857008 str r7, [r5, #8] <== NOT EXECUTED
&fs->release_count,
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
35248: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
3524c: e3530000 cmp r3, #0 <== NOT EXECUTED
35250: 1a000019 bne 352bc <rtems_rfs_buffer_handle_request+0x19c> <== NOT EXECUTED
fs->release_modified_count)
35254: e594206c ldr r2, [r4, #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) &&
35258: e3520000 cmp r2, #0 <== NOT EXECUTED
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
3525c: 12841060 addne r1, r4, #96 ; 0x60 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Last(
Chain_Control *the_chain
)
{
return the_chain->last;
35260: 15943068 ldrne r3, [r4, #104] ; 0x68 <== 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) &&
35264: 1a00000d bne 352a0 <rtems_rfs_buffer_handle_request+0x180> <== NOT EXECUTED
35268: ea000013 b 352bc <rtems_rfs_buffer_handle_request+0x19c> <== 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)
3526c: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED
35270: e1500006 cmp r0, r6 <== 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;
35274: e1a07003 mov r7, r3 <== 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)
35278: 1a000007 bne 3529c <rtems_rfs_buffer_handle_request+0x17c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_BUFFER_CHAINS))
printf (": found block=%" PRIuPTR "\n",
((intptr_t)(buffer->user)));
(*count)--;
3527c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
35280: e1a00003 mov r0, r3 <== NOT EXECUTED
35284: e584206c str r2, [r4, #108] ; 0x6c <== NOT EXECUTED
35288: ebff5c7f bl c48c <_Chain_Extract> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
3528c: e3a03000 mov r3, #0 <== NOT EXECUTED
35290: e5873000 str r3, [r7] <== NOT EXECUTED
35294: e5873004 str r3, [r7, #4] <== NOT EXECUTED
35298: ea000003 b 352ac <rtems_rfs_buffer_handle_request+0x18c> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Previous(
Chain_Node *the_node
)
{
return the_node->previous;
3529c: e5933004 ldr r3, [r3, #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))
352a0: e1530001 cmp r3, r1 <== NOT EXECUTED
352a4: 1afffff0 bne 3526c <rtems_rfs_buffer_handle_request+0x14c> <== NOT EXECUTED
352a8: e3a07000 mov r7, #0 <== NOT EXECUTED
&fs->release_modified_count,
block);
/*
* If we found a buffer retain the dirty buffer state.
*/
if (rtems_rfs_buffer_handle_has_block (handle))
352ac: e3570000 cmp r7, #0 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (handle);
352b0: 13a03001 movne r3, #1 <== NOT EXECUTED
block);
if (!rtems_rfs_buffer_handle_has_block (handle) &&
fs->release_modified_count)
{
handle->buffer = rtems_rfs_scan_chain (&fs->release_modified,
352b4: e5857008 str r7, [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);
352b8: 15c53000 strbne r3, [r5] <== NOT EXECUTED
}
/*
* If not located we request the buffer from the I/O layer.
*/
if (!rtems_rfs_buffer_handle_has_block (handle))
352bc: e5957008 ldr r7, [r5, #8] <== NOT EXECUTED
352c0: e3570000 cmp r7, #0 <== NOT EXECUTED
352c4: 1a000009 bne 352f0 <rtems_rfs_buffer_handle_request+0x1d0> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_io_request (fs, block, read, &handle->buffer);
352c8: e2853008 add r3, r5, #8 <== NOT EXECUTED
352cc: e1a02008 mov r2, r8 <== NOT EXECUTED
352d0: e1a00004 mov r0, r4 <== NOT EXECUTED
352d4: e1a01006 mov r1, r6 <== NOT EXECUTED
352d8: eb002295 bl 3dd34 <rtems_rfs_buffer_bdbuf_request> <== NOT EXECUTED
rtems_chain_set_off_chain (rtems_rfs_buffer_link(handle));
352dc: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
if (rc > 0)
352e0: e3500000 cmp r0, #0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Set_off_chain(
Chain_Node *node
)
{
node->next = node->previous = NULL;
352e4: e5837000 str r7, [r3] <== NOT EXECUTED
352e8: e5837004 str r7, [r3, #4] <== NOT EXECUTED
352ec: c8bd81f0 popgt {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
}
/*
* Increase the reference count of the buffer.
*/
rtems_rfs_buffer_refs_up (handle);
352f0: e5951008 ldr r1, [r5, #8] <== NOT EXECUTED
352f4: e5913034 ldr r3, [r1, #52] ; 0x34 <== NOT EXECUTED
352f8: e2833001 add r3, r3, #1 <== NOT EXECUTED
352fc: e5813034 str r3, [r1, #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 );
35300: e2840040 add r0, r4, #64 ; 0x40 <== NOT EXECUTED
35304: ebff5c55 bl c460 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->buffers, rtems_rfs_buffer_link (handle));
fs->buffers_count++;
35308: e594204c ldr r2, [r4, #76] ; 0x4c <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
3530c: 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++;
35310: e2822001 add r2, r2, #1 <== NOT EXECUTED
35314: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED
handle->buffer->user = (void*) ((intptr_t) block);
35318: e5836038 str r6, [r3, #56] ; 0x38 <== NOT EXECUTED
handle->bnum = block;
3531c: e5856004 str r6, [r5, #4] <== NOT EXECUTED
35320: 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;
}
35324: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00034fa4 <rtems_rfs_buffer_open>:
return rc;
}
int
rtems_rfs_buffer_open (const char* name, rtems_rfs_file_system* fs)
{
34fa4: e92d4010 push {r4, lr} <== NOT EXECUTED
34fa8: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED
34fac: 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)
34fb0: e1a0100d mov r1, sp <== NOT EXECUTED
34fb4: ebff4f9e bl 8e34 <stat> <== NOT EXECUTED
34fb8: e3500000 cmp r0, #0 <== NOT EXECUTED
34fbc: b3a00002 movlt r0, #2 <== NOT EXECUTED
34fc0: ba00000b blt 34ff4 <rtems_rfs_buffer_open+0x50> <== NOT EXECUTED
#if RTEMS_RFS_USE_LIBBLOCK
/*
* Is the device a block device ?
*/
if (!S_ISBLK (st.st_mode))
34fc4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
34fc8: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
34fcc: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
34fd0: 1a000006 bne 34ff0 <rtems_rfs_buffer_open+0x4c> <== NOT EXECUTED
}
/*
* Check that device is registred as a block device and lock it.
*/
fs->disk = rtems_disk_obtain (st.st_rdev);
34fd4: e28d1018 add r1, sp, #24 <== NOT EXECUTED
34fd8: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
34fdc: ebff44ae bl 629c <rtems_disk_obtain> <== NOT EXECUTED
if (!fs->disk)
34fe0: 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);
34fe4: e584000c str r0, [r4, #12] <== NOT EXECUTED
if (!fs->disk)
34fe8: 13a00000 movne r0, #0 <== NOT EXECUTED
34fec: 1a000000 bne 34ff4 <rtems_rfs_buffer_open+0x50> <== NOT EXECUTED
34ff0: 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;
}
34ff4: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED
34ff8: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00034f30 <rtems_rfs_buffer_setblksize>:
int
rtems_rfs_buffer_setblksize (rtems_rfs_file_system* fs, size_t size)
{
34f30: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
34f34: e1a05000 mov r5, r0 <== NOT EXECUTED
34f38: e28d4004 add r4, sp, #4 <== NOT EXECUTED
34f3c: 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);
34f40: ebffffdc bl 34eb8 <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);
34f44: e1a00005 mov r0, r5 <== NOT EXECUTED
34f48: ebffffec bl 34f00 <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);
34f4c: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
34f50: e1a0200d mov r2, sp <== NOT EXECUTED
34f54: e1a00003 mov r0, r3 <== NOT EXECUTED
34f58: e59f1018 ldr r1, [pc, #24] ; 34f78 <rtems_rfs_buffer_setblksize+0x48><== NOT EXECUTED
34f5c: e1a0e00f mov lr, pc <== NOT EXECUTED
34f60: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED
if (rc < 0)
34f64: e3500000 cmp r0, #0 <== NOT EXECUTED
34f68: aa000001 bge 34f74 <rtems_rfs_buffer_setblksize+0x44> <== NOT EXECUTED
rc = errno;
34f6c: eb002515 bl 3e3c8 <__errno> <== NOT EXECUTED
34f70: e5900000 ldr r0, [r0] <== NOT EXECUTED
#endif
return rc;
}
34f74: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
00034f00 <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));
34f00: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
return rc;
}
int
rtems_rfs_buffer_sync (rtems_rfs_file_system* fs)
{
34f04: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
34f08: 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));
34f0c: e8930003 ldm r3, {r0, r1} <== NOT EXECUTED
34f10: ebff3a12 bl 3760 <rtems_bdbuf_syncdev> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
34f14: e3500000 cmp r0, #0 <== NOT EXECUTED
34f18: 13a05005 movne r5, #5 <== NOT EXECUTED
34f1c: 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);
34f20: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
34f24: ebff4558 bl 648c <rtems_disk_release> <== NOT EXECUTED
printf ("rtems-rfs: buffer-sync: file sync failed: %d: %s\n",
result, strerror (result));
}
#endif
return result;
}
34f28: e1a00005 mov r0, r5 <== NOT EXECUTED
34f2c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00034eb8 <rtems_rfs_buffers_release>:
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
34eb8: 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,
34ebc: e280105c add r1, r0, #92 ; 0x5c <== NOT EXECUTED
return rrc;
}
int
rtems_rfs_buffers_release (rtems_rfs_file_system* fs)
{
34ec0: 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,
34ec4: e3a02000 mov r2, #0 <== NOT EXECUTED
34ec8: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED
34ecc: ebffffdd bl 34e48 <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,
34ed0: 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,
34ed4: 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,
34ed8: e3a02001 mov r2, #1 <== NOT EXECUTED
34edc: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED
34ee0: ebffffd8 bl 34e48 <rtems_rfs_release_chain> <== NOT EXECUTED
&fs->release_modified_count,
true);
if ((rc > 0) && (rrc == 0))
34ee4: e2753001 rsbs r3, r5, #1 <== NOT EXECUTED
34ee8: 33a03000 movcc r3, #0 <== NOT EXECUTED
34eec: e3500000 cmp r0, #0 <== NOT EXECUTED
34ef0: d3a03000 movle r3, #0 <== NOT EXECUTED
rrc = rc;
return rrc;
}
34ef4: e3530000 cmp r3, #0 <== NOT EXECUTED
34ef8: 01a00005 moveq r0, r5 <== NOT EXECUTED
34efc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
000359e4 <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)
{
359e4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
359e8: e24dd084 sub sp, sp, #132 ; 0x84 <== 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);
359ec: e28d8018 add r8, sp, #24 <== 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)
{
359f0: e58d2000 str r2, [sp] <== 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);
359f4: e1a02008 mov r2, r8 <== 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)
{
359f8: e1a05003 mov r5, r3 <== NOT EXECUTED
359fc: e1a04000 mov r4, r0 <== NOT EXECUTED
35a00: e59d60a8 ldr r6, [sp, #168] ; 0xa8 <== 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);
35a04: ebfffcb5 bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
35a08: e2509000 subs r9, r0, #0 <== NOT EXECUTED
35a0c: ca000095 bgt 35c68 <rtems_rfs_dir_add_entry+0x284> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
35a10: e3a03000 mov r3, #0 <== 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) <
35a14: e285000a add r0, r5, #10 <== NOT EXECUTED
35a18: e58d307c str r3, [sp, #124] ; 0x7c <== NOT EXECUTED
35a1c: e5cd3068 strb r3, [sp, #104] ; 0x68 <== NOT EXECUTED
handle->bnum = 0;
35a20: e58d306c str r3, [sp, #108] ; 0x6c <== NOT EXECUTED
handle->buffer = NULL;
35a24: e58d3070 str r3, [sp, #112] ; 0x70 <== 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;
35a28: e58d3074 str r3, [sp, #116] ; 0x74 <== NOT EXECUTED
bpos->boff = 0;
35a2c: e58d3078 str r3, [sp, #120] ; 0x78 <== NOT EXECUTED
35a30: e58d0014 str r0, [sp, #20] <== 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);
35a34: e28da080 add sl, sp, #128 ; 0x80 <== 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) <
35a38: e1a07005 mov r7, r5 <== 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);
35a3c: e1a00004 mov r0, r4 <== NOT EXECUTED
35a40: e1a01008 mov r1, r8 <== NOT EXECUTED
35a44: e28d2074 add r2, sp, #116 ; 0x74 <== NOT EXECUTED
35a48: e1a0300a mov r3, sl <== NOT EXECUTED
35a4c: ebfff9a8 bl 340f4 <rtems_rfs_block_map_find> <== NOT EXECUTED
if (rc > 0)
35a50: e2509000 subs r9, r0, #0 <== NOT EXECUTED
35a54: d3a05001 movle r5, #1 <== NOT EXECUTED
35a58: da000009 ble 35a84 <rtems_rfs_dir_add_entry+0xa0> <== NOT EXECUTED
{
if (rc != ENXIO)
35a5c: e3590006 cmp r9, #6 <== NOT EXECUTED
35a60: 1a00007a bne 35c50 <rtems_rfs_dir_add_entry+0x26c> <== NOT EXECUTED
}
/*
* We have reached the end of the directory so add a block.
*/
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
35a64: e1a00004 mov r0, r4 <== NOT EXECUTED
35a68: e1a01008 mov r1, r8 <== NOT EXECUTED
35a6c: e3a02001 mov r2, #1 <== NOT EXECUTED
35a70: e1a0300a mov r3, sl <== NOT EXECUTED
35a74: ebfffb3b bl 34768 <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
35a78: e2509000 subs r9, r0, #0 <== NOT EXECUTED
35a7c: ca000073 bgt 35c50 <rtems_rfs_dir_add_entry+0x26c> <== NOT EXECUTED
35a80: e3a05000 mov r5, #0 <== NOT EXECUTED
}
read = false;
}
bpos.bno++;
35a84: e59dc074 ldr ip, [sp, #116] ; 0x74 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
35a88: e1a00004 mov r0, r4 <== NOT EXECUTED
}
read = false;
}
bpos.bno++;
35a8c: e28cc001 add ip, ip, #1 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
35a90: e28d1068 add r1, sp, #104 ; 0x68 <== NOT EXECUTED
35a94: e59d2080 ldr r2, [sp, #128] ; 0x80 <== NOT EXECUTED
35a98: e1a03005 mov r3, r5 <== NOT EXECUTED
}
read = false;
}
bpos.bno++;
35a9c: e58dc074 str ip, [sp, #116] ; 0x74 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, read);
35aa0: ebfffd9e bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
35aa4: e2509000 subs r9, r0, #0 <== NOT EXECUTED
35aa8: ca000068 bgt 35c50 <rtems_rfs_dir_add_entry+0x26c> <== 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);
35aac: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
if (!read)
35ab0: 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);
35ab4: e5935020 ldr r5, [r3, #32] <== NOT EXECUTED
if (!read)
memset (entry, 0xff, rtems_rfs_fs_block_size (fs));
35ab8: 01a00005 moveq r0, r5 <== NOT EXECUTED
35abc: 03a010ff moveq r1, #255 ; 0xff <== NOT EXECUTED
35ac0: 05942008 ldreq r2, [r4, #8] <== NOT EXECUTED
35ac4: 0b002f76 bleq 418a4 <memset> <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
35ac8: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
35acc: e241300a sub r3, r1, #10 <== NOT EXECUTED
35ad0: e3a02000 mov r2, #0 <== NOT EXECUTED
35ad4: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
35ad8: ea000058 b 35c40 <rtems_rfs_dir_add_entry+0x25c> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
35adc: e5d50008 ldrb r0, [r5, #8] <== NOT EXECUTED
35ae0: e5d53009 ldrb r3, [r5, #9] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35ae4: e59fb188 ldr fp, [pc, #392] ; 35c74 <rtems_rfs_dir_add_entry+0x290><== 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);
35ae8: e1833400 orr r3, r3, r0, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35aec: e153000b cmp r3, fp <== 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);
35af0: e285b008 add fp, r5, #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
35af4: e5d5e001 ldrb lr, [r5, #1] <== NOT EXECUTED
35af8: e5d50003 ldrb r0, [r5, #3] <== NOT EXECUTED
35afc: e5d5c002 ldrb ip, [r5, #2] <== 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);
35b00: e58db010 str fp, [sp, #16] <== NOT EXECUTED
35b04: e285b009 add fp, r5, #9 <== NOT EXECUTED
35b08: e58db00c str fp, [sp, #12] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
35b0c: e1a09005 mov r9, r5 <== NOT EXECUTED
35b10: e4d9b001 ldrb fp, [r9], #1 <== NOT EXECUTED
35b14: e1800c0b orr r0, r0, fp, lsl #24 <== NOT EXECUTED
35b18: e180080e orr r0, r0, lr, lsl #16 <== NOT EXECUTED
35b1c: e285e003 add lr, r5, #3 <== NOT EXECUTED
35b20: e285b002 add fp, r5, #2 <== NOT EXECUTED
35b24: e58de008 str lr, [sp, #8] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35b28: 1a00002d bne 35be4 <rtems_rfs_dir_add_entry+0x200> <== NOT EXECUTED
{
if ((length + RTEMS_RFS_DIR_ENTRY_SIZE) <
35b2c: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
35b30: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
35b34: e1500002 cmp r0, r2 <== NOT EXECUTED
35b38: 2affffbf bcs 35a3c <rtems_rfs_dir_add_entry+0x58> <== NOT EXECUTED
35b3c: e1a03007 mov r3, r7 <== NOT EXECUTED
(rtems_rfs_fs_block_size (fs) - offset))
{
uint32_t hash;
hash = rtems_rfs_dir_hash (name, length);
35b40: e1a01003 mov r1, r3 <== NOT EXECUTED
35b44: e59d0000 ldr r0, [sp] <== NOT EXECUTED
35b48: e1a07005 mov r7, r5 <== NOT EXECUTED
35b4c: e1a05003 mov r5, r3 <== NOT EXECUTED
35b50: eb002085 bl 3dd6c <rtems_rfs_dir_hash> <== NOT EXECUTED
rtems_rfs_dir_set_entry_hash (entry, hash);
35b54: e1a0c820 lsr ip, r0, #16 <== NOT EXECUTED
35b58: e5c7c005 strb ip, [r7, #5] <== NOT EXECUTED
35b5c: e5c70007 strb r0, [r7, #7] <== NOT EXECUTED
rtems_rfs_dir_set_entry_ino (entry, ino);
35b60: e1a03007 mov r3, r7 <== NOT EXECUTED
35b64: e1a0c826 lsr ip, r6, #16 <== 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);
35b68: e1a0ec20 lsr lr, r0, #24 <== NOT EXECUTED
35b6c: e1a01420 lsr r1, r0, #8 <== NOT EXECUTED
rtems_rfs_dir_set_entry_ino (entry, ino);
35b70: e1a02c26 lsr r2, r6, #24 <== NOT EXECUTED
35b74: e1a00426 lsr r0, r6, #8 <== 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);
35b78: e5c71006 strb r1, [r7, #6] <== NOT EXECUTED
35b7c: e5c7e004 strb lr, [r7, #4] <== NOT EXECUTED
rtems_rfs_dir_set_entry_ino (entry, ino);
35b80: e4c3200a strb r2, [r3], #10 <== NOT EXECUTED
35b84: e5c9c000 strb ip, [r9] <== NOT EXECUTED
35b88: e5cb0000 strb r0, [fp] <== NOT EXECUTED
35b8c: e59db008 ldr fp, [sp, #8] <== NOT EXECUTED
35b90: e5cb6000 strb r6, [fp] <== NOT EXECUTED
rtems_rfs_dir_set_entry_length (entry,
35b94: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED
35b98: e285200a add r2, r5, #10 <== NOT EXECUTED
35b9c: e1a01422 lsr r1, r2, #8 <== NOT EXECUTED
35ba0: e5ce1000 strb r1, [lr] <== NOT EXECUTED
35ba4: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
35ba8: e5c02000 strb r2, [r0] <== NOT EXECUTED
RTEMS_RFS_DIR_ENTRY_SIZE + length);
memcpy (entry + RTEMS_RFS_DIR_ENTRY_SIZE, name, length);
35bac: e59d1000 ldr r1, [sp] <== NOT EXECUTED
35bb0: e1a02005 mov r2, r5 <== NOT EXECUTED
35bb4: e1a00003 mov r0, r3 <== NOT EXECUTED
35bb8: eb002eb2 bl 41688 <memcpy> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&buffer);
35bbc: e28d1084 add r1, sp, #132 ; 0x84 <== NOT EXECUTED
35bc0: e3a03001 mov r3, #1 <== NOT EXECUTED
35bc4: e561301c strb r3, [r1, #-28]! <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
35bc8: e1a00004 mov r0, r4 <== NOT EXECUTED
35bcc: ebfffdd5 bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
35bd0: e1a00004 mov r0, r4 <== NOT EXECUTED
35bd4: e28d1018 add r1, sp, #24 <== NOT EXECUTED
35bd8: ebfffbce bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
35bdc: e3a09000 mov r9, #0 <== NOT EXECUTED
return 0;
35be0: ea000020 b 35c68 <rtems_rfs_dir_add_entry+0x284> <== NOT EXECUTED
}
break;
}
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
35be4: e353000a cmp r3, #10 <== NOT EXECUTED
35be8: da00000a ble 35c18 <rtems_rfs_dir_add_entry+0x234> <== NOT EXECUTED
35bec: e190040c orrs r0, r0, ip, lsl #8 <== NOT EXECUTED
35bf0: e594e018 ldr lr, [r4, #24] <== NOT EXECUTED
35bf4: 13a0c000 movne ip, #0 <== NOT EXECUTED
35bf8: 03a0c001 moveq ip, #1 <== NOT EXECUTED
35bfc: e153000e cmp r3, lr <== NOT EXECUTED
35c00: 238cc001 orrcs ip, ip, #1 <== NOT EXECUTED
35c04: e35c0000 cmp ip, #0 <== NOT EXECUTED
35c08: 1a000002 bne 35c18 <rtems_rfs_dir_add_entry+0x234> <== NOT EXECUTED
35c0c: e594c010 ldr ip, [r4, #16] <== NOT EXECUTED
35c10: e150000c cmp r0, ip <== NOT EXECUTED
35c14: 9a000007 bls 35c38 <rtems_rfs_dir_add_entry+0x254> <== 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);
35c18: e28d1068 add r1, sp, #104 ; 0x68 <== NOT EXECUTED
35c1c: e1a00004 mov r0, r4 <== NOT EXECUTED
35c20: ebfffdc0 bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
35c24: e1a00004 mov r0, r4 <== NOT EXECUTED
35c28: e28d1018 add r1, sp, #24 <== NOT EXECUTED
35c2c: ebfffbb9 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
35c30: e3a09005 mov r9, #5 <== NOT EXECUTED
return EIO;
35c34: ea00000b b 35c68 <rtems_rfs_dir_add_entry+0x284> <== NOT EXECUTED
}
entry += elength;
offset += elength;
35c38: e0822003 add r2, r2, r3 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return EIO;
}
entry += elength;
35c3c: e0855003 add r5, r5, r3 <== 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))
35c40: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
35c44: e1520003 cmp r2, r3 <== NOT EXECUTED
35c48: 2affff7b bcs 35a3c <rtems_rfs_dir_add_entry+0x58> <== NOT EXECUTED
35c4c: eaffffa2 b 35adc <rtems_rfs_dir_add_entry+0xf8> <== NOT EXECUTED
entry += elength;
offset += elength;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
35c50: e28d1068 add r1, sp, #104 ; 0x68 <== NOT EXECUTED
35c54: e1a00004 mov r0, r4 <== NOT EXECUTED
35c58: ebfffdb2 bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
35c5c: e1a00004 mov r0, r4 <== NOT EXECUTED
35c60: e28d1018 add r1, sp, #24 <== NOT EXECUTED
35c64: ebfffbab bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
}
35c68: e1a00009 mov r0, r9 <== NOT EXECUTED
35c6c: e28dd084 add sp, sp, #132 ; 0x84 <== NOT EXECUTED
35c70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0003577c <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)
{
3577c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
35780: e24dd074 sub sp, sp, #116 ; 0x74 <== 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);
35784: e28d7014 add r7, sp, #20 <== 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)
{
35788: e58d2010 str r2, [sp, #16] <== 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);
3578c: e1a02007 mov r2, r7 <== 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)
{
35790: e1a08003 mov r8, r3 <== NOT EXECUTED
35794: e1a05000 mov r5, 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);
35798: ebfffd50 bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
3579c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
357a0: ca00008b bgt 359d4 <rtems_rfs_dir_del_entry+0x258> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
357a4: e3a06000 mov r6, #0 <== NOT EXECUTED
357a8: e28da070 add sl, sp, #112 ; 0x70 <== NOT EXECUTED
357ac: e1a00005 mov r0, r5 <== NOT EXECUTED
357b0: e1a01007 mov r1, r7 <== NOT EXECUTED
357b4: e1a02008 mov r2, r8 <== NOT EXECUTED
357b8: e1a03006 mov r3, r6 <== NOT EXECUTED
357bc: e58da000 str sl, [sp] <== NOT EXECUTED
357c0: ebfffaac bl 34278 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
357c4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
357c8: da000004 ble 357e0 <rtems_rfs_dir_del_entry+0x64> <== NOT EXECUTED
{
if (rc == ENXIO)
357cc: e3540006 cmp r4, #6 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
357d0: e1a00005 mov r0, r5 <== NOT EXECUTED
357d4: e1a01007 mov r1, r7 <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
357d8: 03a04002 moveq r4, #2 <== NOT EXECUTED
357dc: ea00007b b 359d0 <rtems_rfs_dir_del_entry+0x254> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
357e0: e5cd6064 strb r6, [sp, #100] ; 0x64 <== NOT EXECUTED
handle->bnum = 0;
357e4: e58d6068 str r6, [sp, #104] ; 0x68 <== NOT EXECUTED
handle->buffer = NULL;
357e8: e58d606c str r6, [sp, #108] ; 0x6c <== NOT EXECUTED
}
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
357ec: e2789001 rsbs r9, r8, #1 <== NOT EXECUTED
357f0: 33a09000 movcc r9, #0 <== NOT EXECUTED
357f4: e1a04006 mov r4, r6 <== NOT EXECUTED
while (rc == 0)
357f8: ea00006d b 359b4 <rtems_rfs_dir_del_entry+0x238> <== NOT EXECUTED
{
uint8_t* entry;
int eoffset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
357fc: e1a00005 mov r0, r5 <== NOT EXECUTED
35800: e28d1064 add r1, sp, #100 ; 0x64 <== NOT EXECUTED
35804: e59d2070 ldr r2, [sp, #112] ; 0x70 <== NOT EXECUTED
35808: e3a03001 mov r3, #1 <== NOT EXECUTED
3580c: ebfffe43 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
35810: e250b000 subs fp, r0, #0 <== NOT EXECUTED
35814: c1a0400b movgt r4, fp <== NOT EXECUTED
35818: ca000067 bgt 359bc <rtems_rfs_dir_del_entry+0x240> <== 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)
3581c: e3590000 cmp r9, #0 <== NOT EXECUTED
35820: 11a00004 movne r0, r4 <== NOT EXECUTED
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
35824: 01a00008 moveq r0, r8 <== NOT EXECUTED
35828: 05951008 ldreq r1, [r5, #8] <== NOT EXECUTED
3582c: 0b008348 bleq 56554 <__umodsi3> <== NOT EXECUTED
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
35830: e59d306c ldr r3, [sp, #108] ; 0x6c <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
35834: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
35838: e5936020 ldr r6, [r3, #32] <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
3583c: e242e00a sub lr, r2, #10 <== NOT EXECUTED
if (search)
eoffset = 0;
else
eoffset = offset % rtems_rfs_fs_block_size (fs);
entry = rtems_rfs_buffer_data (&buffer) + eoffset;
35840: e0866000 add r6, r6, r0 <== NOT EXECUTED
35844: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
while (eoffset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
35848: ea00004a b 35978 <rtems_rfs_dir_del_entry+0x1fc> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
3584c: e5d63009 ldrb r3, [r6, #9] <== NOT EXECUTED
35850: e5d67008 ldrb r7, [r6, #8] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
35854: e5d6c000 ldrb ip, [r6] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35858: e59f2180 ldr r2, [pc, #384] ; 359e0 <rtems_rfs_dir_del_entry+0x264><== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3585c: e5d61003 ldrb r1, [r6, #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);
35860: e1837407 orr r7, r3, r7, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
35864: e5d63001 ldrb r3, [r6, #1] <== NOT EXECUTED
35868: e1811c0c orr r1, r1, ip, lsl #24 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
3586c: e1570002 cmp r7, r2 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
35870: e1811803 orr r1, r1, r3, lsl #16 <== NOT EXECUTED
35874: e5d6a002 ldrb sl, [r6, #2] <== 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);
35878: e2863008 add r3, r6, #8 <== NOT EXECUTED
3587c: e286c009 add ip, r6, #9 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35880: 0a00003e beq 35980 <rtems_rfs_dir_del_entry+0x204> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
35884: e357000a cmp r7, #10 <== NOT EXECUTED
35888: da000047 ble 359ac <rtems_rfs_dir_del_entry+0x230> <== NOT EXECUTED
3588c: e191140a orrs r1, r1, sl, lsl #8 <== NOT EXECUTED
35890: e5952018 ldr r2, [r5, #24] <== NOT EXECUTED
35894: 13a0a000 movne sl, #0 <== NOT EXECUTED
35898: 03a0a001 moveq sl, #1 <== NOT EXECUTED
3589c: e1570002 cmp r7, r2 <== NOT EXECUTED
358a0: 238aa001 orrcs sl, sl, #1 <== NOT EXECUTED
358a4: e35a0000 cmp sl, #0 <== NOT EXECUTED
358a8: 1a00003f bne 359ac <rtems_rfs_dir_del_entry+0x230> <== NOT EXECUTED
358ac: e595a010 ldr sl, [r5, #16] <== NOT EXECUTED
358b0: e151000a cmp r1, sl <== NOT EXECUTED
358b4: 8a00003c bhi 359ac <rtems_rfs_dir_del_entry+0x230> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, block, eoffset);
rc = EIO;
break;
}
if (ino == rtems_rfs_dir_entry_ino (entry))
358b8: e59da010 ldr sl, [sp, #16] <== NOT EXECUTED
358bc: e15a0001 cmp sl, r1 <== NOT EXECUTED
358c0: 1a000028 bne 35968 <rtems_rfs_dir_del_entry+0x1ec> <== NOT EXECUTED
358c4: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
{
uint32_t remaining;
remaining = rtems_rfs_fs_block_size (fs) - (eoffset + elength);
358c8: e0808007 add r8, r0, r7 <== NOT EXECUTED
358cc: e0688002 rsb r8, r8, r2 <== NOT EXECUTED
358d0: e1a0a000 mov sl, r0 <== NOT EXECUTED
memmove (entry, entry + elength, remaining);
358d4: e0861007 add r1, r6, r7 <== NOT EXECUTED
358d8: e1a02008 mov r2, r8 <== NOT EXECUTED
358dc: e1a00006 mov r0, r6 <== NOT EXECUTED
358e0: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
358e4: e58dc00c str ip, [sp, #12] <== NOT EXECUTED
358e8: eb002fa2 bl 41778 <memmove> <== NOT EXECUTED
memset (entry + remaining, 0xff, elength);
358ec: e1a02007 mov r2, r7 <== NOT EXECUTED
358f0: e0860008 add r0, r6, r8 <== NOT EXECUTED
358f4: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
358f8: eb002fe9 bl 418a4 <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);
358fc: e28d3008 add r3, sp, #8 <== NOT EXECUTED
35900: e8931008 ldm r3, {r3, ip} <== NOT EXECUTED
35904: e5d32000 ldrb r2, [r3] <== NOT EXECUTED
35908: e5dc3000 ldrb r3, [ip] <== NOT EXECUTED
3590c: e1832402 orr r2, r3, r2, lsl #8 <== NOT EXECUTED
35910: e59f30c8 ldr r3, [pc, #200] ; 359e0 <rtems_rfs_dir_del_entry+0x264><== NOT EXECUTED
35914: e1520003 cmp r2, r3 <== NOT EXECUTED
35918: 035a0000 cmpeq sl, #0 <== NOT EXECUTED
3591c: 1a00000d bne 35958 <rtems_rfs_dir_del_entry+0x1dc> <== 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))
35920: e59d3024 ldr r3, [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) &&
35924: e3530000 cmp r3, #0 <== NOT EXECUTED
35928: 1a000002 bne 35938 <rtems_rfs_dir_del_entry+0x1bc> <== NOT EXECUTED
3592c: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
35930: e3520000 cmp r2, #0 <== NOT EXECUTED
35934: 0a000003 beq 35948 <rtems_rfs_dir_del_entry+0x1cc> <== NOT EXECUTED
35938: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
3593c: e2422001 sub r2, r2, #1 <== NOT EXECUTED
35940: e1530002 cmp r3, r2 <== NOT EXECUTED
35944: 1a000003 bne 35958 <rtems_rfs_dir_del_entry+0x1dc> <== NOT EXECUTED
(eoffset == 0) && rtems_rfs_block_map_last (&map))
{
rc = rtems_rfs_block_map_shrink (fs, &map, 1);
35948: e1a00005 mov r0, r5 <== NOT EXECUTED
3594c: e28d1014 add r1, sp, #20 <== NOT EXECUTED
35950: e3a02001 mov r2, #1 <== NOT EXECUTED
35954: ebfffa8b bl 34388 <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);
35958: e28d1074 add r1, sp, #116 ; 0x74 <== NOT EXECUTED
3595c: e3a03001 mov r3, #1 <== NOT EXECUTED
35960: e5613010 strb r3, [r1, #-16]! <== NOT EXECUTED
35964: ea000015 b 359c0 <rtems_rfs_dir_del_entry+0x244> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return 0;
}
if (!search)
35968: e3590000 cmp r9, #0 <== NOT EXECUTED
3596c: 0a00000e beq 359ac <rtems_rfs_dir_del_entry+0x230> <== NOT EXECUTED
rc = EIO;
break;
}
entry += elength;
eoffset += elength;
35970: e0800007 add r0, r0, r7 <== NOT EXECUTED
{
rc = EIO;
break;
}
entry += elength;
35974: e0866007 add r6, r6, r7 <== 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))
35978: e150000e cmp r0, lr <== NOT EXECUTED
3597c: 3affffb2 bcc 3584c <rtems_rfs_dir_del_entry+0xd0> <== NOT EXECUTED
entry += elength;
eoffset += elength;
}
if (rc == 0)
35980: e35b0000 cmp fp, #0 <== NOT EXECUTED
35984: 1a000009 bne 359b0 <rtems_rfs_dir_del_entry+0x234> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
35988: e1a00005 mov r0, r5 <== NOT EXECUTED
3598c: e28d1014 add r1, sp, #20 <== NOT EXECUTED
35990: e28d2070 add r2, sp, #112 ; 0x70 <== NOT EXECUTED
35994: ebfffa2c bl 3424c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
35998: e3500006 cmp r0, #6 <== NOT EXECUTED
eoffset += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3599c: e1a04000 mov r4, r0 <== NOT EXECUTED
if (rc == ENXIO)
359a0: 1a000003 bne 359b4 <rtems_rfs_dir_del_entry+0x238> <== NOT EXECUTED
359a4: e3a04002 mov r4, #2 <== NOT EXECUTED
359a8: ea000003 b 359bc <rtems_rfs_dir_del_entry+0x240> <== NOT EXECUTED
359ac: e3a0b005 mov fp, #5 <== NOT EXECUTED
359b0: e1a0400b mov r4, fp <== NOT EXECUTED
/*
* Only search if the offset is 0 else we are at that position.
*/
search = offset ? false : true;
while (rc == 0)
359b4: e3540000 cmp r4, #0 <== NOT EXECUTED
359b8: 0affff8f beq 357fc <rtems_rfs_dir_del_entry+0x80> <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
rtems_rfs_buffer_handle_close (fs, &buffer);
359bc: e28d1064 add r1, sp, #100 ; 0x64 <== NOT EXECUTED
359c0: e1a00005 mov r0, r5 <== NOT EXECUTED
359c4: ebfffe57 bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
359c8: e1a00005 mov r0, r5 <== NOT EXECUTED
359cc: e28d1014 add r1, sp, #20 <== NOT EXECUTED
359d0: ebfffc50 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
}
359d4: e1a00004 mov r0, r4 <== NOT EXECUTED
359d8: e28dd074 add sp, sp, #116 ; 0x74 <== NOT EXECUTED
359dc: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00035348 <rtems_rfs_dir_empty>:
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
35348: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
3534c: 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);
35350: e28d6004 add r6, sp, #4 <== NOT EXECUTED
35354: e1a02006 mov r2, r6 <== NOT EXECUTED
}
int
rtems_rfs_dir_empty (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* dir)
{
35358: 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);
3535c: ebfffe5f bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
35360: e250a000 subs sl, r0, #0 <== NOT EXECUTED
35364: ca000055 bgt 354c0 <rtems_rfs_dir_empty+0x178> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
35368: e1a01006 mov r1, r6 <== NOT EXECUTED
3536c: e28d5060 add r5, sp, #96 ; 0x60 <== NOT EXECUTED
35370: e1a00004 mov r0, r4 <== NOT EXECUTED
35374: e3a02000 mov r2, #0 <== NOT EXECUTED
35378: e3a03000 mov r3, #0 <== NOT EXECUTED
3537c: e58d5000 str r5, [sp] <== NOT EXECUTED
35380: ebfffbbc bl 34278 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
35384: e250a000 subs sl, r0, #0 <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
35388: c1a00004 movgt r0, r4 <== NOT EXECUTED
3538c: c1a01006 movgt r1, r6 <== 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);
if (rc > 0)
35390: ca000049 bgt 354bc <rtems_rfs_dir_empty+0x174> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
35394: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
35398: 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;
3539c: e5cd3054 strb r3, [sp, #84] ; 0x54 <== NOT EXECUTED
handle->bnum = 0;
353a0: e58d3058 str r3, [sp, #88] ; 0x58 <== 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)
353a4: e59f7120 ldr r7, [pc, #288] ; 354cc <rtems_rfs_dir_empty+0x184><== NOT EXECUTED
while (empty)
{
uint8_t* entry;
int offset;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
353a8: e28d8054 add r8, sp, #84 ; 0x54 <== NOT EXECUTED
353ac: e1a00004 mov r0, r4 <== NOT EXECUTED
353b0: e1a01008 mov r1, r8 <== NOT EXECUTED
353b4: e59d2060 ldr r2, [sp, #96] ; 0x60 <== NOT EXECUTED
353b8: e3a03001 mov r3, #1 <== NOT EXECUTED
353bc: ebffff57 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
353c0: e250a000 subs sl, r0, #0 <== NOT EXECUTED
353c4: ca000037 bgt 354a8 <rtems_rfs_dir_empty+0x160> <== NOT EXECUTED
break;
entry = rtems_rfs_buffer_data (&buffer);
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
353c8: e594e008 ldr lr, [r4, #8] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
353cc: e59d305c ldr r3, [sp, #92] ; 0x5c <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
353d0: e24ee00a sub lr, lr, #10 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
break;
entry = rtems_rfs_buffer_data (&buffer);
353d4: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
offset = 0;
while (offset < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
353d8: e3a01000 mov r1, #0 <== NOT EXECUTED
353dc: ea000024 b 35474 <rtems_rfs_dir_empty+0x12c> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
353e0: e5d30008 ldrb r0, [r3, #8] <== NOT EXECUTED
353e4: e5d32009 ldrb r2, [r3, #9] <== NOT EXECUTED
353e8: e1822400 orr r2, r2, r0, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
353ec: e1520007 cmp r2, r7 <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
353f0: e5d3b000 ldrb fp, [r3] <== NOT EXECUTED
353f4: e5d39001 ldrb r9, [r3, #1] <== NOT EXECUTED
353f8: e5d3c002 ldrb ip, [r3, #2] <== NOT EXECUTED
353fc: e5d30003 ldrb r0, [r3, #3] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35400: 0a00001d beq 3547c <rtems_rfs_dir_empty+0x134> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
35404: e352000a cmp r2, #10 <== NOT EXECUTED
35408: da00001b ble 3547c <rtems_rfs_dir_empty+0x134> <== NOT EXECUTED
{
rtems_rfs_ino eino;
int elength;
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3540c: e1800c0b orr r0, r0, fp, lsl #24 <== NOT EXECUTED
35410: e1800809 orr r0, r0, r9, lsl #16 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
break;
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
35414: e190040c orrs r0, r0, ip, lsl #8 <== NOT EXECUTED
35418: e5949018 ldr r9, [r4, #24] <== NOT EXECUTED
3541c: 13a0c000 movne ip, #0 <== NOT EXECUTED
35420: 03a0c001 moveq ip, #1 <== NOT EXECUTED
35424: e1520009 cmp r2, r9 <== NOT EXECUTED
35428: 238cc001 orrcs ip, ip, #1 <== NOT EXECUTED
3542c: e35c0000 cmp ip, #0 <== NOT EXECUTED
35430: 1a000011 bne 3547c <rtems_rfs_dir_empty+0x134> <== NOT EXECUTED
35434: e5949010 ldr r9, [r4, #16] <== NOT EXECUTED
35438: e1500009 cmp r0, r9 <== NOT EXECUTED
3543c: 8a00000e bhi 3547c <rtems_rfs_dir_empty+0x134> <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
35440: e352000b cmp r2, #11 <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
35444: 05d3000a ldrbeq r0, [r3, #10] <== NOT EXECUTED
/*
* Ignore the current (.) and parent (..) entries. Anything else means
* the directory is not empty.
*/
if (((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 1)) ||
35448: 0a000005 beq 35464 <rtems_rfs_dir_empty+0x11c> <== NOT EXECUTED
3544c: e352000c cmp r2, #12 <== NOT EXECUTED
35450: 1a000012 bne 354a0 <rtems_rfs_dir_empty+0x158> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.')) &&
((elength != (RTEMS_RFS_DIR_ENTRY_SIZE + 2)) ||
(entry[RTEMS_RFS_DIR_ENTRY_SIZE] != '.') ||
35454: e5d3000a ldrb r0, [r3, #10] <== NOT EXECUTED
35458: e350002e cmp r0, #46 ; 0x2e <== NOT EXECUTED
3545c: 1a00000f bne 354a0 <rtems_rfs_dir_empty+0x158> <== NOT EXECUTED
(entry[RTEMS_RFS_DIR_ENTRY_SIZE + 1] != '.')))
35460: e5d3000b ldrb r0, [r3, #11] <== NOT EXECUTED
35464: e350002e cmp r0, #46 ; 0x2e <== NOT EXECUTED
35468: 1a00000c bne 354a0 <rtems_rfs_dir_empty+0x158> <== NOT EXECUTED
empty = false;
break;
}
entry += elength;
offset += elength;
3546c: e0811002 add r1, r1, r2 <== NOT EXECUTED
{
empty = false;
break;
}
entry += elength;
35470: e0833002 add r3, r3, 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))
35474: e151000e cmp r1, lr <== NOT EXECUTED
35478: 3affffd8 bcc 353e0 <rtems_rfs_dir_empty+0x98> <== NOT EXECUTED
offset += elength;
}
if (empty)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
3547c: e1a00004 mov r0, r4 <== NOT EXECUTED
35480: e1a01006 mov r1, r6 <== NOT EXECUTED
35484: e1a02005 mov r2, r5 <== NOT EXECUTED
35488: ebfffb6f bl 3424c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc > 0)
3548c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
35490: daffffc5 ble 353ac <rtems_rfs_dir_empty+0x64> <== NOT EXECUTED
{
if (rc == ENXIO)
35494: e35a0006 cmp sl, #6 <== NOT EXECUTED
35498: 03a0a000 moveq sl, #0 <== NOT EXECUTED
3549c: ea000001 b 354a8 <rtems_rfs_dir_empty+0x160> <== NOT EXECUTED
break;
}
}
}
if ((rc == 0) && !empty)
354a0: e35a0000 cmp sl, #0 <== NOT EXECUTED
354a4: 03a0a05a moveq sl, #90 ; 0x5a <== NOT EXECUTED
rc = ENOTEMPTY;
rtems_rfs_buffer_handle_close (fs, &buffer);
354a8: e28d1054 add r1, sp, #84 ; 0x54 <== NOT EXECUTED
354ac: e1a00004 mov r0, r4 <== NOT EXECUTED
354b0: ebffff9c bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
354b4: e1a00004 mov r0, r4 <== NOT EXECUTED
354b8: e28d1004 add r1, sp, #4 <== NOT EXECUTED
354bc: ebfffd95 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
}
354c0: e1a0000a mov r0, sl <== NOT EXECUTED
354c4: e28dd064 add sp, sp, #100 ; 0x64 <== NOT EXECUTED
354c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0003dd6c <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;
3dd6c: e59f31b8 ldr r3, [pc, #440] ; 3df2c <rtems_rfs_dir_hash+0x1c0><== NOT EXECUTED
3dd70: e0813003 add r3, r1, r3 <== NOT EXECUTED
*/
#define initval (20010928)
uint32_t
rtems_rfs_dir_hash (const void *key, size_t length)
{
3dd74: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== 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;
3dd78: e1a02003 mov r2, r3 <== NOT EXECUTED
3dd7c: e1a0c003 mov ip, r3 <== 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)
3dd80: ea00002d b 3de3c <rtems_rfs_dir_hash+0xd0> <== NOT EXECUTED
{
a += k[0];
3dd84: e550900a ldrb r9, [r0, #-10] <== 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];
3dd88: e5508002 ldrb r8, [r0, #-2] <== 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];
3dd8c: e550500b ldrb r5, [r0, #-11] <== 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];
3dd90: e5504003 ldrb r4, [r0, #-3] <== 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];
3dd94: 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];
3dd98: e1a08808 lsl r8, r8, #16 <== 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;
3dd9c: e550a00c ldrb sl, [r0, #-12] <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
3dda0: e5506006 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;
3dda4: e5507004 ldrb r7, [r0, #-4] <== 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];
3dda8: 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];
3ddac: 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;
3ddb0: e5505009 ldrb r5, [r0, #-9] <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
3ddb4: e5504007 ldrb r4, [r0, #-7] <== 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;
3ddb8: e550b001 ldrb fp, [r0, #-1] <== 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;
3ddbc: e089a00a add sl, r9, sl <== NOT EXECUTED
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
3ddc0: e1a06806 lsl r6, r6, #16 <== 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;
3ddc4: e0887007 add r7, r8, r7 <== NOT EXECUTED
a += k[0];
a += ((uint32_t)k[1])<<8;
a += ((uint32_t)k[2])<<16;
a += ((uint32_t)k[3])<<24;
b += k[4];
b += ((uint32_t)k[5])<<8;
3ddc8: e5509008 ldrb r9, [r0, #-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;
3ddcc: e08aac05 add sl, sl, r5, lsl #24 <== NOT EXECUTED
a += ((uint32_t)k[3])<<24;
b += k[4];
3ddd0: e0864404 add r4, r6, r4, lsl #8 <== 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;
3ddd4: e0877c0b add r7, r7, fp, lsl #24 <== NOT EXECUTED
a += ((uint32_t)k[1])<<8;
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;
3ddd8: e5505005 ldrb r5, [r0, #-5] <== 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;
3dddc: 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;
3dde0: e08ac00c add ip, sl, ip <== NOT EXECUTED
b += k[4];
b += ((uint32_t)k[5])<<8;
3dde4: e0844009 add r4, r4, r9 <== NOT EXECUTED
b += ((uint32_t)k[6])<<16;
3dde8: 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);
3ddec: e063c00c rsb ip, r3, ip <== NOT EXECUTED
3ddf0: e02cce63 eor ip, ip, 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;
3ddf4: e0842002 add r2, r4, r2 <== 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);
3ddf8: e06c6002 rsb r6, ip, r2 <== NOT EXECUTED
3ddfc: e0266d6c eor r6, r6, ip, ror #26 <== NOT EXECUTED
3de00: e0833002 add r3, r3, r2 <== NOT EXECUTED
3de04: e0664003 rsb r4, r6, r3 <== NOT EXECUTED
3de08: e0244c66 eor r4, r4, r6, ror #24 <== NOT EXECUTED
3de0c: e08c3003 add r3, ip, r3 <== NOT EXECUTED
3de10: e064c003 rsb ip, r4, r3 <== NOT EXECUTED
3de14: e02cc864 eor ip, ip, r4, ror #16 <== NOT EXECUTED
3de18: e0866003 add r6, r6, r3 <== NOT EXECUTED
3de1c: e06c2006 rsb r2, ip, r6 <== NOT EXECUTED
3de20: e02226ec eor r2, r2, ip, ror #13 <== NOT EXECUTED
3de24: e0844006 add r4, r4, r6 <== NOT EXECUTED
3de28: e08cc004 add ip, ip, r4 <== NOT EXECUTED
3de2c: e0624004 rsb r4, r2, r4 <== NOT EXECUTED
3de30: e0243e62 eor r3, r4, r2, ror #28 <== NOT EXECUTED
length -= 12;
3de34: 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);
3de38: e082200c add r2, r2, ip <== 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)
3de3c: e351000c cmp r1, #12 <== 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);
length -= 12;
3de40: e1a04000 mov r4, r0 <== NOT EXECUTED
3de44: e280000c add r0, r0, #12 <== 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)
3de48: 8affffcd bhi 3dd84 <rtems_rfs_dir_hash+0x18> <== NOT EXECUTED
length -= 12;
k += 12;
}
/*-------------------------------- last block: affect all 32 bits of (c) */
switch(length) /* all the case statements fall through */
3de4c: e2411001 sub r1, r1, #1 <== NOT EXECUTED
3de50: e351000b cmp r1, #11 <== NOT EXECUTED
3de54: 979ff101 ldrls pc, [pc, r1, lsl #2] <== NOT EXECUTED
3de58: ea000031 b 3df24 <rtems_rfs_dir_hash+0x1b8> <== NOT EXECUTED
3de5c: 0003dee4 .word 0x0003dee4 <== NOT EXECUTED
3de60: 0003dedc .word 0x0003dedc <== NOT EXECUTED
3de64: 0003ded4 .word 0x0003ded4 <== NOT EXECUTED
3de68: 0003decc .word 0x0003decc <== NOT EXECUTED
3de6c: 0003dec4 .word 0x0003dec4 <== NOT EXECUTED
3de70: 0003debc .word 0x0003debc <== NOT EXECUTED
3de74: 0003deb4 .word 0x0003deb4 <== NOT EXECUTED
3de78: 0003deac .word 0x0003deac <== NOT EXECUTED
3de7c: 0003dea4 .word 0x0003dea4 <== NOT EXECUTED
3de80: 0003de9c .word 0x0003de9c <== NOT EXECUTED
3de84: 0003de94 .word 0x0003de94 <== NOT EXECUTED
3de88: 0003de8c .word 0x0003de8c <== NOT EXECUTED
{
case 12: c+=((uint32_t)k[11])<<24;
3de8c: e5d4100b ldrb r1, [r4, #11] <== NOT EXECUTED
3de90: e0833c01 add r3, r3, r1, lsl #24 <== NOT EXECUTED
case 11: c+=((uint32_t)k[10])<<16;
3de94: e5d4100a ldrb r1, [r4, #10] <== NOT EXECUTED
3de98: e0833801 add r3, r3, r1, lsl #16 <== NOT EXECUTED
case 10: c+=((uint32_t)k[9])<<8;
3de9c: e5d41009 ldrb r1, [r4, #9] <== NOT EXECUTED
3dea0: e0833401 add r3, r3, r1, lsl #8 <== NOT EXECUTED
case 9 : c+=k[8];
3dea4: e5d41008 ldrb r1, [r4, #8] <== NOT EXECUTED
3dea8: e0833001 add r3, r3, r1 <== NOT EXECUTED
case 8 : b+=((uint32_t)k[7])<<24;
3deac: e5d41007 ldrb r1, [r4, #7] <== NOT EXECUTED
3deb0: e0822c01 add r2, r2, r1, lsl #24 <== NOT EXECUTED
case 7 : b+=((uint32_t)k[6])<<16;
3deb4: e5d41006 ldrb r1, [r4, #6] <== NOT EXECUTED
3deb8: e0822801 add r2, r2, r1, lsl #16 <== NOT EXECUTED
case 6 : b+=((uint32_t)k[5])<<8;
3debc: e5d41005 ldrb r1, [r4, #5] <== NOT EXECUTED
3dec0: e0822401 add r2, r2, r1, lsl #8 <== NOT EXECUTED
case 5 : b+=k[4];
3dec4: e5d41004 ldrb r1, [r4, #4] <== NOT EXECUTED
3dec8: e0822001 add r2, r2, r1 <== NOT EXECUTED
case 4 : a+=((uint32_t)k[3])<<24;
3decc: e5d41003 ldrb r1, [r4, #3] <== NOT EXECUTED
3ded0: e08ccc01 add ip, ip, r1, lsl #24 <== NOT EXECUTED
case 3 : a+=((uint32_t)k[2])<<16;
3ded4: e5d41002 ldrb r1, [r4, #2] <== NOT EXECUTED
3ded8: e08cc801 add ip, ip, r1, lsl #16 <== NOT EXECUTED
case 2 : a+=((uint32_t)k[1])<<8;
3dedc: e5d41001 ldrb r1, [r4, #1] <== NOT EXECUTED
3dee0: e08cc401 add ip, ip, r1, lsl #8 <== NOT EXECUTED
case 1 : a+=k[0];
3dee4: e5d41000 ldrb r1, [r4] <== NOT EXECUTED
break;
case 0 : return c;
}
}
final(a,b,c);
3dee8: e0233002 eor r3, r3, r2 <== 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];
3deec: e08cc001 add ip, ip, r1 <== NOT EXECUTED
break;
case 0 : return c;
}
}
final(a,b,c);
3def0: e0431962 sub r1, r3, r2, ror #18 <== NOT EXECUTED
3def4: e021c00c eor ip, r1, ip <== NOT EXECUTED
3def8: e04ccae1 sub ip, ip, r1, ror #21 <== NOT EXECUTED
3defc: e02c2002 eor r2, ip, r2 <== NOT EXECUTED
3df00: e04223ec sub r2, r2, ip, ror #7 <== NOT EXECUTED
3df04: e0221001 eor r1, r2, r1 <== NOT EXECUTED
3df08: e0411862 sub r1, r1, r2, ror #16 <== NOT EXECUTED
3df0c: e021c00c eor ip, r1, ip <== NOT EXECUTED
3df10: e04cce61 sub ip, ip, r1, ror #28 <== NOT EXECUTED
3df14: e02c2002 eor r2, ip, r2 <== NOT EXECUTED
3df18: e042296c sub r2, r2, ip, ror #18 <== NOT EXECUTED
3df1c: e0223001 eor r3, r2, r1 <== NOT EXECUTED
3df20: e0433462 sub r3, r3, r2, ror #8 <== NOT EXECUTED
return c;
}
3df24: e1a00003 mov r0, r3 <== NOT EXECUTED
3df28: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00035c78 <rtems_rfs_dir_lookup_ino>:
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
35c78: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
35c7c: e24dd068 sub sp, sp, #104 ; 0x68 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
35c80: e59dc08c ldr ip, [sp, #140] ; 0x8c <== NOT EXECUTED
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
35c84: e1a09002 mov r9, r2 <== NOT EXECUTED
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
35c88: e59d2090 ldr r2, [sp, #144] ; 0x90 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
35c8c: e3a06000 mov r6, #0 <== NOT EXECUTED
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
35c90: e28d7008 add r7, sp, #8 <== NOT EXECUTED
for (c = 0; c < length; c++)
printf ("%c", name[c]);
printf (", len=%d\n", length);
}
*ino = RTEMS_RFS_EMPTY_INO;
35c94: e58c6000 str r6, [ip] <== NOT EXECUTED
*offset = 0;
35c98: e5826000 str r6, [r2] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, inode, &map);
35c9c: e1a02007 mov r2, r7 <== NOT EXECUTED
rtems_rfs_inode_handle* inode,
const char* name,
int length,
rtems_rfs_ino* ino,
uint32_t* offset)
{
35ca0: e1a08003 mov r8, r3 <== NOT EXECUTED
35ca4: e1a05000 mov r5, r0 <== NOT EXECUTED
}
*ino = RTEMS_RFS_EMPTY_INO;
*offset = 0;
rc = rtems_rfs_block_map_open (fs, inode, &map);
35ca8: ebfffc0c bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
35cac: e2504000 subs r4, r0, #0 <== NOT EXECUTED
35cb0: ca00007e bgt 35eb0 <rtems_rfs_dir_lookup_ino+0x238> <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
35cb4: e1a01008 mov r1, r8 <== NOT EXECUTED
35cb8: e1a00009 mov r0, r9 <== NOT EXECUTED
35cbc: e58d6060 str r6, [sp, #96] ; 0x60 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
35cc0: e5cd6058 strb r6, [sp, #88] ; 0x58 <== NOT EXECUTED
handle->bnum = 0;
35cc4: e58d605c str r6, [sp, #92] ; 0x5c <== NOT EXECUTED
35cc8: eb002027 bl 3dd6c <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);
35ccc: e28d6064 add r6, sp, #100 ; 0x64 <== NOT EXECUTED
uint32_t hash;
/*
* Calculate the hash of the look up string.
*/
hash = rtems_rfs_dir_hash (name, length);
35cd0: e58d0004 str r0, [sp, #4] <== 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);
35cd4: e1a01007 mov r1, r7 <== NOT EXECUTED
35cd8: e1a00005 mov r0, r5 <== NOT EXECUTED
35cdc: e3a02000 mov r2, #0 <== NOT EXECUTED
35ce0: e3a03000 mov r3, #0 <== NOT EXECUTED
35ce4: e58d6000 str r6, [sp] <== NOT EXECUTED
35ce8: ebfff962 bl 34278 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
35cec: e2504000 subs r4, r0, #0 <== NOT EXECUTED
35cf0: da000060 ble 35e78 <rtems_rfs_dir_lookup_ino+0x200> <== 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)
rc = ENOENT;
rtems_rfs_buffer_handle_close (fs, &entries);
35cf4: e28d1058 add r1, sp, #88 ; 0x58 <== NOT EXECUTED
35cf8: e1a00005 mov r0, r5 <== NOT EXECUTED
35cfc: ebfffd89 bl 35328 <rtems_rfs_buffer_handle_close> <== 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)
35d00: e3540006 cmp r4, #6 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
35d04: e1a00005 mov r0, r5 <== NOT EXECUTED
35d08: e1a01007 mov r1, r7 <== 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)
35d0c: 03a04002 moveq r4, #2 <== NOT EXECUTED
35d10: ea000065 b 35eac <rtems_rfs_dir_lookup_ino+0x234> <== 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);
35d14: e1a00005 mov r0, r5 <== NOT EXECUTED
35d18: e28d1058 add r1, sp, #88 ; 0x58 <== NOT EXECUTED
35d1c: e3a03001 mov r3, #1 <== NOT EXECUTED
35d20: ebfffcfe bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
35d24: e250a000 subs sl, r0, #0 <== NOT EXECUTED
35d28: ca000059 bgt 35e94 <rtems_rfs_dir_lookup_ino+0x21c> <== 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);
35d2c: e59d3060 ldr r3, [sp, #96] ; 0x60 <== NOT EXECUTED
map.bpos.boff = 0;
35d30: e58d401c str r4, [sp, #28] <== 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);
35d34: e5936020 ldr r6, [r3, #32] <== NOT EXECUTED
35d38: e1a07004 mov r7, r4 <== NOT EXECUTED
map.bpos.boff = 0;
while (map.bpos.boff < (rtems_rfs_fs_block_size (fs) - RTEMS_RFS_DIR_ENTRY_SIZE))
35d3c: ea00003a b 35e2c <rtems_rfs_dir_lookup_ino+0x1b4> <== 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);
35d40: e5d62000 ldrb r2, [r6] <== NOT EXECUTED
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
35d44: e5d60009 ldrb r0, [r6, #9] <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
35d48: e5d63003 ldrb r3, [r6, #3] <== NOT EXECUTED
{
uint32_t ehash;
int elength;
ehash = rtems_rfs_dir_entry_hash (entry);
elength = rtems_rfs_dir_entry_length (entry);
35d4c: e5d64008 ldrb r4, [r6, #8] <== NOT EXECUTED
*ino = rtems_rfs_dir_entry_ino (entry);
35d50: e5d61001 ldrb r1, [r6, #1] <== NOT EXECUTED
35d54: 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);
35d58: e1804404 orr r4, r0, r4, 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);
35d5c: e5d60005 ldrb r0, [r6, #5] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
35d60: 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);
35d64: e5d61004 ldrb r1, [r6, #4] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
35d68: e5d62002 ldrb r2, [r6, #2] <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
35d6c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
35d70: 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);
35d74: e5d61007 ldrb r1, [r6, #7] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
*ino = rtems_rfs_dir_entry_ino (entry);
35d78: 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);
35d7c: e5d62006 ldrb r2, [r6, #6] <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
35d80: 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)
35d84: e59fc138 ldr ip, [pc, #312] ; 35ec4 <rtems_rfs_dir_lookup_ino+0x24c><== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
35d88: e1812402 orr r2, 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);
35d8c: e59d108c ldr r1, [sp, #140] ; 0x8c <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35d90: e154000c cmp r4, ip <== 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);
35d94: e5813000 str r3, [r1] <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
35d98: 0a000028 beq 35e40 <rtems_rfs_dir_lookup_ino+0x1c8> <== NOT EXECUTED
break;
if (rtems_rfs_dir_entry_valid (fs, elength, *ino))
35d9c: e354000a cmp r4, #10 <== NOT EXECUTED
35da0: da000031 ble 35e6c <rtems_rfs_dir_lookup_ino+0x1f4> <== NOT EXECUTED
35da4: e5951018 ldr r1, [r5, #24] <== NOT EXECUTED
35da8: e1540001 cmp r4, r1 <== NOT EXECUTED
35dac: 2a00002e bcs 35e6c <rtems_rfs_dir_lookup_ino+0x1f4> <== NOT EXECUTED
35db0: e3530000 cmp r3, #0 <== NOT EXECUTED
35db4: 0a00002c beq 35e6c <rtems_rfs_dir_lookup_ino+0x1f4> <== NOT EXECUTED
35db8: e5951010 ldr r1, [r5, #16] <== NOT EXECUTED
35dbc: e1530001 cmp r3, r1 <== NOT EXECUTED
35dc0: 8a000029 bhi 35e6c <rtems_rfs_dir_lookup_ino+0x1f4> <== NOT EXECUTED
rtems_rfs_inode_ino (inode), elength, *ino, map.bpos.boff);
rc = EIO;
break;
}
if (ehash == hash)
35dc4: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
35dc8: e1520003 cmp r2, r3 <== NOT EXECUTED
35dcc: 1a000012 bne 35e1c <rtems_rfs_dir_lookup_ino+0x1a4> <== 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)
35dd0: e286000a add r0, r6, #10 <== NOT EXECUTED
35dd4: e1a01009 mov r1, r9 <== NOT EXECUTED
35dd8: e1a02008 mov r2, r8 <== NOT EXECUTED
35ddc: eb002dff bl 415e0 <memcmp> <== NOT EXECUTED
35de0: e3500000 cmp r0, #0 <== NOT EXECUTED
35de4: 1a00000c bne 35e1c <rtems_rfs_dir_lookup_ino+0x1a4> <== NOT EXECUTED
{
*offset = rtems_rfs_block_map_pos (fs, &map);
35de8: e28d6008 add r6, sp, #8 <== NOT EXECUTED
35dec: e1a00005 mov r0, r5 <== NOT EXECUTED
35df0: e2861010 add r1, r6, #16 <== NOT EXECUTED
35df4: ebfff874 bl 33fcc <rtems_rfs_block_get_pos> <== NOT EXECUTED
35df8: e59dc090 ldr ip, [sp, #144] ; 0x90 <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
printf ("rtems-rfs: dir-lookup-ino: "
"entry found in ino %" PRIu32 ", ino=%" PRIu32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (inode), *ino, *offset);
rtems_rfs_buffer_handle_close (fs, &entries);
35dfc: e28d1058 add r1, sp, #88 ; 0x58 <== NOT EXECUTED
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)
{
*offset = rtems_rfs_block_map_pos (fs, &map);
35e00: e58c0000 str r0, [ip] <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_DIR_LOOKUP_INO_FOUND))
printf ("rtems-rfs: dir-lookup-ino: "
"entry found in ino %" PRIu32 ", ino=%" PRIu32 " offset=%" PRIu32 "\n",
rtems_rfs_inode_ino (inode), *ino, *offset);
rtems_rfs_buffer_handle_close (fs, &entries);
35e04: e1a00005 mov r0, r5 <== NOT EXECUTED
35e08: ebfffd46 bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
35e0c: e1a04007 mov r4, r7 <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
35e10: e1a00005 mov r0, r5 <== NOT EXECUTED
35e14: e1a01006 mov r1, r6 <== NOT EXECUTED
35e18: ea000023 b 35eac <rtems_rfs_dir_lookup_ino+0x234> <== NOT EXECUTED
return 0;
}
}
map.bpos.boff += elength;
35e1c: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
35e20: e0833004 add r3, r3, r4 <== NOT EXECUTED
35e24: e58d301c str r3, [sp, #28] <== NOT EXECUTED
entry += elength;
35e28: e0866004 add r6, r6, r4 <== 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))
35e2c: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
35e30: e59d201c ldr r2, [sp, #28] <== NOT EXECUTED
35e34: e243300a sub r3, r3, #10 <== NOT EXECUTED
35e38: e1520003 cmp r2, r3 <== NOT EXECUTED
35e3c: 3affffbf bcc 35d40 <rtems_rfs_dir_lookup_ino+0xc8> <== NOT EXECUTED
map.bpos.boff += elength;
entry += elength;
}
if (rc == 0)
35e40: e35a0000 cmp sl, #0 <== NOT EXECUTED
35e44: 1a000009 bne 35e70 <rtems_rfs_dir_lookup_ino+0x1f8> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
35e48: e1a00005 mov r0, r5 <== NOT EXECUTED
35e4c: e28d1008 add r1, sp, #8 <== NOT EXECUTED
35e50: e1a0200b mov r2, fp <== NOT EXECUTED
35e54: ebfff8fc bl 3424c <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)
35e58: e3500006 cmp r0, #6 <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
35e5c: e1a04000 mov r4, r0 <== 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)
35e60: 1a000005 bne 35e7c <rtems_rfs_dir_lookup_ino+0x204> <== NOT EXECUTED
35e64: e3a04002 mov r4, #2 <== NOT EXECUTED
35e68: ea00000a b 35e98 <rtems_rfs_dir_lookup_ino+0x220> <== NOT EXECUTED
35e6c: e3a0a005 mov sl, #5 <== NOT EXECUTED
35e70: e1a0400a mov r4, sl <== NOT EXECUTED
35e74: ea000000 b 35e7c <rtems_rfs_dir_lookup_ino+0x204> <== NOT EXECUTED
entry += elength;
}
if (rc == 0)
{
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
35e78: e1a0b006 mov fp, r6 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &entries);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
while ((rc == 0) && block)
35e7c: e3540000 cmp r4, #0 <== NOT EXECUTED
35e80: 1a000004 bne 35e98 <rtems_rfs_dir_lookup_ino+0x220> <== NOT EXECUTED
35e84: e59d2064 ldr r2, [sp, #100] ; 0x64 <== NOT EXECUTED
35e88: e3520000 cmp r2, #0 <== NOT EXECUTED
35e8c: 1affffa0 bne 35d14 <rtems_rfs_dir_lookup_ino+0x9c> <== NOT EXECUTED
35e90: ea000009 b 35ebc <rtems_rfs_dir_lookup_ino+0x244> <== NOT EXECUTED
35e94: e1a0400a mov r4, sl <== 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);
35e98: e28d1058 add r1, sp, #88 ; 0x58 <== NOT EXECUTED
35e9c: e1a00005 mov r0, r5 <== NOT EXECUTED
35ea0: ebfffd20 bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
35ea4: e1a00005 mov r0, r5 <== NOT EXECUTED
35ea8: e28d1008 add r1, sp, #8 <== NOT EXECUTED
35eac: ebfffb19 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
}
35eb0: e1a00004 mov r0, r4 <== NOT EXECUTED
35eb4: e28dd068 add sp, sp, #104 ; 0x68 <== NOT EXECUTED
35eb8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
if (rc == ENXIO)
rc = ENOENT;
}
}
if ((rc == 0) && (block == 0))
35ebc: e3a04005 mov r4, #5 <== NOT EXECUTED
35ec0: eafffff4 b 35e98 <rtems_rfs_dir_lookup_ino+0x220> <== NOT EXECUTED
000354d0 <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)
{
354d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
354d4: e24dd078 sub sp, sp, #120 ; 0x78 <== NOT EXECUTED
354d8: e59d60a0 ldr r6, [sp, #160] ; 0xa0 <== 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;
354dc: e3a0c000 mov ip, #0 <== 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)
{
354e0: e58d2008 str r2, [sp, #8] <== NOT EXECUTED
354e4: 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;
354e8: e586c000 str ip, [r6] <== NOT EXECUTED
rc = rtems_rfs_block_map_open (fs, dir, &map);
354ec: e28d2018 add r2, sp, #24 <== 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)
{
354f0: e1a04000 mov r4, r0 <== NOT EXECUTED
354f4: e59d509c ldr r5, [sp, #156] ; 0x9c <== 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);
354f8: ebfffdf8 bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
354fc: e250a000 subs sl, r0, #0 <== NOT EXECUTED
35500: ca000099 bgt 3576c <rtems_rfs_dir_read+0x29c> <== NOT EXECUTED
return rc;
if (((rtems_rfs_fs_block_size (fs) -
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
35504: e5947008 ldr r7, [r4, #8] <== NOT EXECUTED
35508: 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) -
3550c: e1a02007 mov r2, r7 <== NOT EXECUTED
35510: e1a03008 mov r3, r8 <== NOT EXECUTED
35514: e28d1008 add r1, sp, #8 <== NOT EXECUTED
35518: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3551c: eb008650 bl 56e64 <__moddi3> <== NOT EXECUTED
35520: e1a02007 mov r2, r7 <== NOT EXECUTED
35524: e1a03008 mov r3, r8 <== NOT EXECUTED
35528: e0522000 subs r2, r2, r0 <== NOT EXECUTED
3552c: e0c33001 sbc r3, r3, r1 <== NOT EXECUTED
35530: e3530000 cmp r3, #0 <== NOT EXECUTED
35534: ca000010 bgt 3557c <rtems_rfs_dir_read+0xac> <== NOT EXECUTED
35538: 1a000001 bne 35544 <rtems_rfs_dir_read+0x74> <== NOT EXECUTED
3553c: e352000a cmp r2, #10 <== NOT EXECUTED
35540: 8a00000d bhi 3557c <rtems_rfs_dir_read+0xac> <== NOT EXECUTED
(offset % rtems_rfs_fs_block_size (fs))) <= RTEMS_RFS_DIR_ENTRY_SIZE))
offset = (((offset / rtems_rfs_fs_block_size (fs)) + 1) *
35544: e28d1008 add r1, sp, #8 <== NOT EXECUTED
35548: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
3554c: e1a02007 mov r2, r7 <== NOT EXECUTED
35550: e1a03008 mov r3, r8 <== NOT EXECUTED
35554: eb008518 bl 569bc <__divdi3> <== NOT EXECUTED
35558: e3a02001 mov r2, #1 <== NOT EXECUTED
3555c: e0922000 adds r2, r2, r0 <== NOT EXECUTED
35560: e3a03000 mov r3, #0 <== NOT EXECUTED
35564: e0a33001 adc r3, r3, r1 <== NOT EXECUTED
35568: e0810792 umull r0, r1, r2, r7 <== NOT EXECUTED
3556c: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
35570: e58d100c str r1, [sp, #12] <== NOT EXECUTED
35574: e0211397 mla r1, r7, r3, r1 <== NOT EXECUTED
35578: e58d100c str r1, [sp, #12] <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
3557c: e28d7018 add r7, sp, #24 <== NOT EXECUTED
35580: e28d8074 add r8, sp, #116 ; 0x74 <== NOT EXECUTED
35584: e1a00004 mov r0, r4 <== NOT EXECUTED
35588: e1a01007 mov r1, r7 <== NOT EXECUTED
3558c: e28d3008 add r3, sp, #8 <== NOT EXECUTED
35590: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
35594: e58d8000 str r8, [sp] <== NOT EXECUTED
35598: ebfffb36 bl 34278 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
3559c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
355a0: da000004 ble 355b8 <rtems_rfs_dir_read+0xe8> <== NOT EXECUTED
{
if (rc == ENXIO)
355a4: e35a0006 cmp sl, #6 <== NOT EXECUTED
rc = ENOENT;
rtems_rfs_block_map_close (fs, &map);
355a8: e1a00004 mov r0, r4 <== NOT EXECUTED
355ac: e1a01007 mov r1, r7 <== NOT EXECUTED
rtems_rfs_fs_block_size (fs));
rc = rtems_rfs_block_map_seek (fs, &map, offset, &block);
if (rc > 0)
{
if (rc == ENXIO)
355b0: 03a0a002 moveq sl, #2 <== NOT EXECUTED
355b4: ea00006b b 35768 <rtems_rfs_dir_read+0x298> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
355b8: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
355bc: e58d3070 str r3, [sp, #112] ; 0x70 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
355c0: e5cd3068 strb r3, [sp, #104] ; 0x68 <== NOT EXECUTED
handle->bnum = 0;
355c4: e58d306c str r3, [sp, #108] ; 0x6c <== NOT EXECUTED
uint8_t* entry;
rtems_rfs_ino eino;
int elength;
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
355c8: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
355cc: e28d9068 add r9, sp, #104 ; 0x68 <== NOT EXECUTED
355d0: e1a01009 mov r1, r9 <== NOT EXECUTED
355d4: e59d2074 ldr r2, [sp, #116] ; 0x74 <== NOT EXECUTED
355d8: e3a03001 mov r3, #1 <== NOT EXECUTED
355dc: e1a00004 mov r0, r4 <== NOT EXECUTED
355e0: ebfffece bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
355e4: e250a000 subs sl, 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);
355e8: e28d1018 add r1, sp, #24 <== NOT EXECUTED
355ec: e28d2074 add r2, sp, #116 ; 0x74 <== NOT EXECUTED
355f0: e1a00004 mov r0, r4 <== NOT EXECUTED
int remaining;
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
{
rtems_rfs_buffer_handle_close (fs, &buffer);
355f4: c1a01009 movgt r1, r9 <== NOT EXECUTED
355f8: ca000057 bgt 3575c <rtems_rfs_dir_read+0x28c> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
355fc: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
entry += map.bpos.boff;
35600: e59dc02c ldr ip, [sp, #44] ; 0x2c <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_block_map_close (fs, &map);
return rc;
}
entry = rtems_rfs_buffer_data (&buffer);
35604: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED
entry += map.bpos.boff;
35608: e083700c add r7, r3, ip <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (entry);
eino = rtems_rfs_dir_entry_ino (entry);
3560c: e7d3e00c ldrb lr, [r3, ip] <== NOT EXECUTED
35610: e5d7b003 ldrb fp, [r7, #3] <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
35614: e5d73009 ldrb r3, [r7, #9] <== NOT EXECUTED
35618: e5d78008 ldrb r8, [r7, #8] <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
3561c: e5d75001 ldrb r5, [r7, #1] <== NOT EXECUTED
}
entry = rtems_rfs_buffer_data (&buffer);
entry += map.bpos.boff;
elength = rtems_rfs_dir_entry_length (entry);
35620: e1838408 orr r8, r3, r8, lsl #8 <== NOT EXECUTED
eino = rtems_rfs_dir_entry_ino (entry);
35624: e18b3c0e orr r3, fp, lr, lsl #24 <== NOT EXECUTED
35628: e1833805 orr r3, r3, r5, lsl #16 <== NOT EXECUTED
3562c: e5d7e002 ldrb lr, [r7, #2] <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
35630: e59f5140 ldr r5, [pc, #320] ; 35778 <rtems_rfs_dir_read+0x2a8><== 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);
35634: e183340e orr r3, r3, lr, lsl #8 <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
35638: e1580005 cmp r8, r5 <== 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);
3563c: e287e002 add lr, r7, #2 <== NOT EXECUTED
35640: e2875003 add r5, r7, #3 <== NOT EXECUTED
35644: e287b001 add fp, r7, #1 <== NOT EXECUTED
35648: e58de014 str lr, [sp, #20] <== NOT EXECUTED
3564c: e58d5010 str r5, [sp, #16] <== NOT EXECUTED
if (elength != RTEMS_RFS_DIR_ENTRY_EMPTY)
35650: 0a000031 beq 3571c <rtems_rfs_dir_read+0x24c> <== NOT EXECUTED
{
if (rtems_rfs_dir_entry_valid (fs, elength, eino))
35654: e358000a cmp r8, #10 <== NOT EXECUTED
35658: e59d5004 ldr r5, [sp, #4] <== NOT EXECUTED
3565c: da00003b ble 35750 <rtems_rfs_dir_read+0x280> <== NOT EXECUTED
35660: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
35664: e3530000 cmp r3, #0 <== NOT EXECUTED
35668: 11580001 cmpne r8, r1 <== NOT EXECUTED
3566c: 33a01000 movcc r1, #0 <== NOT EXECUTED
35670: 23a01001 movcs r1, #1 <== NOT EXECUTED
35674: 2a000035 bcs 35750 <rtems_rfs_dir_read+0x280> <== NOT EXECUTED
35678: e5942010 ldr r2, [r4, #16] <== NOT EXECUTED
3567c: e1530002 cmp r3, r2 <== NOT EXECUTED
35680: 8a000032 bhi 35750 <rtems_rfs_dir_read+0x280> <== NOT EXECUTED
rtems_rfs_inode_ino (dir), elength, eino, map.bpos.boff);
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
35684: e3a02e11 mov r2, #272 ; 0x110 <== NOT EXECUTED
35688: e1a00005 mov r0, r5 <== NOT EXECUTED
3568c: eb003084 bl 418a4 <memset> <== NOT EXECUTED
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
*length += elength;
35690: e5963000 ldr r3, [r6] <== NOT EXECUTED
35694: e0883003 add r3, r8, r3 <== NOT EXECUTED
35698: e5863000 str r3, [r6] <== NOT EXECUTED
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
3569c: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
356a0: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
356a4: e0622001 rsb r2, r2, r1 <== NOT EXECUTED
356a8: e0682002 rsb r2, r8, r2 <== NOT EXECUTED
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
356ac: e352000a cmp r2, #10 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
356b0: e28d1008 add r1, sp, #8 <== NOT EXECUTED
356b4: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
*length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
*length += remaining;
356b8: d0823003 addle r3, r2, r3 <== NOT EXECUTED
elength -= RTEMS_RFS_DIR_ENTRY_SIZE;
356bc: e248800a sub r8, r8, #10 <== NOT EXECUTED
rc = EIO;
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
356c0: e9850003 stmib r5, {r0, r1} <== NOT EXECUTED
*length += elength;
remaining = rtems_rfs_fs_block_size (fs) - (map.bpos.boff + elength);
if (remaining <= RTEMS_RFS_DIR_ENTRY_SIZE)
*length += remaining;
356c4: d5863000 strle r3, [r6] <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
356c8: e3a01e11 mov r1, #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;
356cc: e35800ff cmp r8, #255 ; 0xff <== NOT EXECUTED
356d0: a3a080ff movge r8, #255 ; 0xff <== NOT EXECUTED
break;
}
memset (dirent, 0, sizeof (struct dirent));
dirent->d_off = offset;
dirent->d_reclen = sizeof (struct dirent);
356d4: e1c510bc strh r1, [r5, #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);
356d8: e1a02008 mov r2, r8 <== NOT EXECUTED
356dc: e287100a add r1, r7, #10 <== NOT EXECUTED
356e0: e2850010 add r0, r5, #16 <== NOT EXECUTED
356e4: eb002fe7 bl 41688 <memcpy> <== NOT EXECUTED
dirent->d_ino = rtems_rfs_dir_entry_ino (entry);
356e8: e5db3000 ldrb r3, [fp] <== NOT EXECUTED
356ec: e59de010 ldr lr, [sp, #16] <== NOT EXECUTED
356f0: e5d72000 ldrb r2, [r7] <== NOT EXECUTED
356f4: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
356f8: e5de1000 ldrb r1, [lr] <== NOT EXECUTED
356fc: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
35700: e1833c02 orr r3, r3, r2, lsl #24 <== NOT EXECUTED
35704: e5d02000 ldrb r2, [r0] <== NOT EXECUTED
35708: e1833001 orr r3, r3, r1 <== NOT EXECUTED
3570c: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
dirent->d_namlen = elength;
35710: e1c580be strh r8, [r5, #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);
35714: e5853000 str r3, [r5] <== 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;
35718: ea00000d b 35754 <rtems_rfs_dir_read+0x284> <== NOT EXECUTED
}
*length += rtems_rfs_fs_block_size (fs) - map.bpos.boff;
3571c: e594e008 ldr lr, [r4, #8] <== NOT EXECUTED
35720: e5963000 ldr r3, [r6] <== NOT EXECUTED
35724: e06cc00e rsb ip, ip, lr <== NOT EXECUTED
35728: e083300c add r3, r3, ip <== NOT EXECUTED
3572c: e5863000 str r3, [r6] <== 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);
35730: ebfffac5 bl 3424c <rtems_rfs_block_map_next_block> <== NOT EXECUTED
if (rc == ENXIO)
35734: 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);
35738: e1a0a000 mov sl, r0 <== NOT EXECUTED
if (rc == ENXIO)
3573c: 03a0a002 moveq sl, #2 <== NOT EXECUTED
35740: 0a000003 beq 35754 <rtems_rfs_dir_read+0x284> <== NOT EXECUTED
/*
* Look for an empty entry and if this is the last block that is the end of
* the directory.
*/
while (rc == 0)
35744: e3500000 cmp r0, #0 <== NOT EXECUTED
35748: 0affffa0 beq 355d0 <rtems_rfs_dir_read+0x100> <== NOT EXECUTED
3574c: ea000000 b 35754 <rtems_rfs_dir_read+0x284> <== NOT EXECUTED
35750: e3a0a005 mov sl, #5 <== NOT EXECUTED
rc = rtems_rfs_block_map_next_block (fs, &map, &block);
if (rc == ENXIO)
rc = ENOENT;
}
rtems_rfs_buffer_handle_close (fs, &buffer);
35754: e28d1068 add r1, sp, #104 ; 0x68 <== NOT EXECUTED
35758: e1a00004 mov r0, r4 <== NOT EXECUTED
3575c: ebfffef1 bl 35328 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
rtems_rfs_block_map_close (fs, &map);
35760: e1a00004 mov r0, r4 <== NOT EXECUTED
35764: e28d1018 add r1, sp, #24 <== NOT EXECUTED
35768: ebfffcea bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
return rc;
}
3576c: e1a0000a mov r0, sl <== NOT EXECUTED
35770: e28dd078 add sp, sp, #120 ; 0x78 <== NOT EXECUTED
35774: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0003657c <rtems_rfs_file_close>:
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)
3657c: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
36580: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
36584: e3520000 cmp r2, #0 <== NOT EXECUTED
handle->shared->references--;
36588: c2422001 subgt r2, r2, #1 <== NOT EXECUTED
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
3658c: e92d4070 push {r4, r5, r6, lr} <== 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)
handle->shared->references--;
36590: c5832008 strgt r2, [r3, #8] <== NOT EXECUTED
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
36594: e1a04001 mov r4, r1 <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
handle->shared->references--;
if (handle->shared->references == 0)
36598: e591101c ldr r1, [r1, #28] <== NOT EXECUTED
3659c: e5913008 ldr r3, [r1, #8] <== NOT EXECUTED
365a0: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_file_close (rtems_rfs_file_system* fs,
rtems_rfs_file_handle* handle)
{
365a4: e1a06000 mov r6, r0 <== NOT EXECUTED
handle->shared->inode.ino);
if (handle->shared->references > 0)
handle->shared->references--;
if (handle->shared->references == 0)
365a8: 13a05000 movne r5, #0 <== NOT EXECUTED
365ac: 1a000054 bne 36704 <rtems_rfs_file_close+0x188> <== NOT EXECUTED
{
if (!rtems_rfs_inode_is_loaded (&handle->shared->inode))
365b0: e5913018 ldr r3, [r1, #24] <== NOT EXECUTED
365b4: e3530000 cmp r3, #0 <== NOT EXECUTED
365b8: 1a000003 bne 365cc <rtems_rfs_file_close+0x50> <== NOT EXECUTED
rrc = rtems_rfs_inode_load (fs, &handle->shared->inode);
365bc: e281100c add r1, r1, #12 <== NOT EXECUTED
365c0: eb000769 bl 3836c <rtems_rfs_inode_load> <== NOT EXECUTED
if (rrc == 0)
365c4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
365c8: 1a000039 bne 366b4 <rtems_rfs_file_close+0x138> <== NOT EXECUTED
{
/*
* @todo This could be clever and only update if different.
*/
rtems_rfs_inode_set_atime (&handle->shared->inode,
365cc: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
365d0: e592308c ldr r3, [r2, #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);
365d4: e5921018 ldr r1, [r2, #24] <== NOT EXECUTED
365d8: e1a00c23 lsr r0, r3, #24 <== NOT EXECUTED
365dc: e5c10010 strb r0, [r1, #16] <== NOT EXECUTED
365e0: e5921018 ldr r1, [r2, #24] <== NOT EXECUTED
365e4: e1a00823 lsr r0, r3, #16 <== NOT EXECUTED
365e8: e5c10011 strb r0, [r1, #17] <== NOT EXECUTED
365ec: e5921018 ldr r1, [r2, #24] <== NOT EXECUTED
365f0: e1a00423 lsr r0, r3, #8 <== NOT EXECUTED
365f4: e5c10012 strb r0, [r1, #18] <== NOT EXECUTED
365f8: e5921018 ldr r1, [r2, #24] <== NOT EXECUTED
365fc: e5c13013 strb r3, [r1, #19] <== NOT EXECUTED
handle->shared->atime);
rtems_rfs_inode_set_mtime (&handle->shared->inode,
36600: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
36604: e5931090 ldr r1, [r3, #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);
36608: e593c018 ldr ip, [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);
3660c: 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);
36610: e1a0ec21 lsr lr, r1, #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);
36614: e5c2001c strb r0, [r2, #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);
36618: e5cce014 strb lr, [ip, #20] <== NOT EXECUTED
3661c: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED
36620: e1a0c821 lsr ip, r1, #16 <== NOT EXECUTED
36624: e5c2c015 strb ip, [r2, #21] <== NOT EXECUTED
36628: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED
3662c: e1a0c421 lsr ip, r1, #8 <== NOT EXECUTED
36630: e5c2c016 strb ip, [r2, #22] <== NOT EXECUTED
36634: e5932018 ldr r2, [r3, #24] <== NOT EXECUTED
36638: e5c21017 strb r1, [r2, #23] <== NOT EXECUTED
handle->shared->mtime);
rtems_rfs_inode_set_ctime (&handle->shared->inode,
3663c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
36640: e5921094 ldr r1, [r2, #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);
36644: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED
36648: 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);
3664c: e5c3001c strb r0, [r3, #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);
36650: e5cce018 strb lr, [ip, #24] <== NOT EXECUTED
36654: e5923018 ldr r3, [r2, #24] <== NOT EXECUTED
36658: e1a0c821 lsr ip, r1, #16 <== NOT EXECUTED
3665c: e5c3c019 strb ip, [r3, #25] <== NOT EXECUTED
36660: e5923018 ldr r3, [r2, #24] <== NOT EXECUTED
36664: e1a0c421 lsr ip, r1, #8 <== NOT EXECUTED
36668: e5c3c01a strb ip, [r3, #26] <== NOT EXECUTED
3666c: e5923018 ldr r3, [r2, #24] <== NOT EXECUTED
36670: e5c3101b strb r1, [r3, #27] <== NOT EXECUTED
handle->shared->ctime);
if (!rtems_rfs_block_size_equal (&handle->shared->size,
36674: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
36678: e5931084 ldr r1, [r3, #132] ; 0x84 <== NOT EXECUTED
3667c: e593c03c ldr ip, [r3, #60] ; 0x3c <== NOT EXECUTED
36680: e151000c cmp r1, ip <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
36684: e5c2001c strb r0, [r2, #28] <== NOT EXECUTED
36688: 1a000003 bne 3669c <rtems_rfs_file_close+0x120> <== NOT EXECUTED
3668c: e5930088 ldr r0, [r3, #136] ; 0x88 <== NOT EXECUTED
36690: e5932040 ldr r2, [r3, #64] ; 0x40 <== NOT EXECUTED
36694: e1500002 cmp r0, r2 <== NOT EXECUTED
36698: 0a000004 beq 366b0 <rtems_rfs_file_close+0x134> <== 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);
3669c: e5932088 ldr r2, [r3, #136] ; 0x88 <== NOT EXECUTED
map->dirty = true;
366a0: e3a00001 mov r0, #1 <== NOT EXECUTED
366a4: e5c30034 strb r0, [r3, #52] ; 0x34 <== 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);
366a8: e583103c str r1, [r3, #60] ; 0x3c <== NOT EXECUTED
366ac: e5832040 str r2, [r3, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
366b0: 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);
366b4: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
366b8: e1a00006 mov r0, r6 <== NOT EXECUTED
366bc: e2811034 add r1, r1, #52 ; 0x34 <== NOT EXECUTED
366c0: ebfff914 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
366c4: e3500000 cmp r0, #0 <== NOT EXECUTED
366c8: da000001 ble 366d4 <rtems_rfs_file_close+0x158> <== 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)
366cc: e3550000 cmp r5, #0 <== NOT EXECUTED
366d0: 01a05000 moveq r5, r0 <== NOT EXECUTED
rrc = rc;
}
rc = rtems_rfs_inode_close (fs, &handle->shared->inode);
366d4: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
366d8: e1a00006 mov r0, r6 <== NOT EXECUTED
366dc: e281100c add r1, r1, #12 <== NOT EXECUTED
366e0: eb000714 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
366e4: e3500000 cmp r0, #0 <== NOT EXECUTED
366e8: da000001 ble 366f4 <rtems_rfs_file_close+0x178> <== 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)
366ec: e3550000 cmp r5, #0 <== NOT EXECUTED
366f0: 01a05000 moveq r5, r0 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
366f4: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
366f8: ebff5763 bl c48c <_Chain_Extract> <== NOT EXECUTED
rrc = rc;
}
rtems_chain_extract (&handle->shared->link);
free (handle->shared);
366fc: e594001c ldr r0, [r4, #28] <== NOT EXECUTED
36700: ebff43eb bl 76b4 <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);
36704: e2841004 add r1, r4, #4 <== NOT EXECUTED
36708: e1a00006 mov r0, r6 <== NOT EXECUTED
3670c: ebfffa3a bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
36710: 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);
36714: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
36718: 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;
3671c: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED
handle->bnum = 0;
36720: e5843008 str r3, [r4, #8] <== NOT EXECUTED
36724: ebff43e2 bl 76b4 <free> <== NOT EXECUTED
return rrc;
}
36728: e1a00005 mov r0, r5 <== NOT EXECUTED
3672c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00035ec8 <rtems_rfs_file_get_shared>:
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
35ec8: e2802074 add r2, r0, #116 ; 0x74 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
35ecc: e5903070 ldr r3, [r0, #112] ; 0x70 <== 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))
35ed0: ea000004 b 35ee8 <rtems_rfs_file_get_shared+0x20> <== NOT EXECUTED
{
rtems_rfs_file_shared* shared;
shared = (rtems_rfs_file_shared*) node;
if (shared->inode.ino == ino)
35ed4: e5930014 ldr r0, [r3, #20] <== NOT EXECUTED
35ed8: 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;
35edc: e1a00003 mov r0, r3 <== NOT EXECUTED
if (shared->inode.ino == ino)
35ee0: 012fff1e bxeq lr <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
35ee4: 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))
35ee8: e1530002 cmp r3, r2 <== NOT EXECUTED
35eec: 1afffff8 bne 35ed4 <rtems_rfs_file_get_shared+0xc> <== NOT EXECUTED
35ef0: e3a00000 mov r0, #0 <== NOT EXECUTED
if (shared->inode.ino == ino)
return shared;
node = rtems_chain_next (node);
}
return NULL;
}
35ef4: e12fff1e bx lr <== NOT EXECUTED
000363dc <rtems_rfs_file_io_end>:
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
363dc: e92d45f1 push {r0, 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))
363e0: e590400c ldr r4, [r0, #12] <== NOT EXECUTED
363e4: e3540000 cmp r4, #0 <== NOT EXECUTED
int
rtems_rfs_file_io_end (rtems_rfs_file_handle* handle,
size_t size,
bool read)
{
363e8: e1a05000 mov r5, r0 <== NOT EXECUTED
363ec: e1a07001 mov r7, r1 <== NOT EXECUTED
363f0: 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))
363f4: 0a000015 beq 36450 <rtems_rfs_file_io_end+0x74> <== NOT EXECUTED
{
if (!read)
363f8: e3560000 cmp r6, #0 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
363fc: 03a03001 moveq r3, #1 <== NOT EXECUTED
36400: 05c03004 strbeq r3, [r0, #4] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
36404: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
36408: e2851004 add r1, r5, #4 <== NOT EXECUTED
3640c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
36410: ebfffaf9 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
36414: e2504000 subs r4, r0, #0 <== NOT EXECUTED
36418: da00000c ble 36450 <rtems_rfs_file_io_end+0x74> <== NOT EXECUTED
{
printf (
3641c: e59f314c ldr r3, [pc, #332] ; 36570 <rtems_rfs_file_io_end+0x194><== NOT EXECUTED
36420: e59f214c ldr r2, [pc, #332] ; 36574 <rtems_rfs_file_io_end+0x198><== NOT EXECUTED
36424: e3560000 cmp r6, #0 <== NOT EXECUTED
36428: 11a06002 movne r6, r2 <== NOT EXECUTED
3642c: 01a06003 moveq r6, r3 <== NOT EXECUTED
36430: eb003966 bl 449d0 <strerror> <== NOT EXECUTED
36434: e1a01006 mov r1, r6 <== NOT EXECUTED
36438: e58d0000 str r0, [sp] <== NOT EXECUTED
3643c: e1a02007 mov r2, r7 <== NOT EXECUTED
36440: e1a03004 mov r3, r4 <== NOT EXECUTED
36444: e59f012c ldr r0, [pc, #300] ; 36578 <rtems_rfs_file_io_end+0x19c><== NOT EXECUTED
36448: eb00313c bl 42940 <printf> <== NOT EXECUTED
"rtems-rfs: file-io: end: error on release: %s size=%zu: %d: %s\n",
read ? "read" : "write", size, rc, strerror (rc));
return rc;
3644c: ea000045 b 36568 <rtems_rfs_file_io_end+0x18c> <== 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;
36450: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
36454: 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;
36458: e0877002 add r7, r7, r2 <== NOT EXECUTED
3645c: e5857014 str r7, [r5, #20] <== NOT EXECUTED
if (handle->bpos.boff >=
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))
36460: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
36464: e5932008 ldr r2, [r3, #8] <== NOT EXECUTED
36468: e1570002 cmp r7, r2 <== NOT EXECUTED
3646c: 3a000005 bcc 36488 <rtems_rfs_file_io_end+0xac> <== NOT EXECUTED
{
handle->bpos.bno++;
36470: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED
36474: e2822001 add r2, r2, #1 <== NOT EXECUTED
36478: e5852010 str r2, [r5, #16] <== NOT EXECUTED
handle->bpos.boff -= rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
3647c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
36480: e0637007 rsb r7, r3, r7 <== NOT EXECUTED
36484: e5857014 str r7, [r5, #20] <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
36488: e3560000 cmp r6, #0 <== NOT EXECUTED
3648c: 1a000018 bne 364f4 <rtems_rfs_file_io_end+0x118> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
36490: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
36494: e3530000 cmp r3, #0 <== NOT EXECUTED
36498: 0a000003 beq 364ac <rtems_rfs_file_io_end+0xd0> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
3649c: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
364a0: e592203c ldr r2, [r2, #60] ; 0x3c <== NOT EXECUTED
364a4: e3520000 cmp r2, #0 <== NOT EXECUTED
364a8: 0a00000a beq 364d8 <rtems_rfs_file_io_end+0xfc> <== NOT EXECUTED
364ac: e595201c ldr r2, [r5, #28] <== NOT EXECUTED
364b0: e592103c ldr r1, [r2, #60] ; 0x3c <== NOT EXECUTED
}
length = false;
mtime = false;
if (!read &&
364b4: e1530001 cmp r3, r1 <== NOT EXECUTED
364b8: 2a000006 bcs 364d8 <rtems_rfs_file_io_end+0xfc> <== NOT EXECUTED
364bc: e2411001 sub r1, r1, #1 <== NOT EXECUTED
364c0: e1530001 cmp r3, r1 <== NOT EXECUTED
364c4: 1a00000a bne 364f4 <rtems_rfs_file_io_end+0x118> <== NOT EXECUTED
rtems_rfs_block_map_past_end (rtems_rfs_file_map (handle),
364c8: e5923040 ldr r3, [r2, #64] ; 0x40 <== NOT EXECUTED
364cc: e5952014 ldr r2, [r5, #20] <== NOT EXECUTED
364d0: e1520003 cmp r2, r3 <== NOT EXECUTED
364d4: 9a000006 bls 364f4 <rtems_rfs_file_io_end+0x118> <== NOT EXECUTED
rtems_rfs_file_bpos (handle)))
{
rtems_rfs_block_map_set_size_offset (rtems_rfs_file_map (handle),
364d8: e595301c ldr r3, [r5, #28] <== 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;
364dc: e5951014 ldr r1, [r5, #20] <== NOT EXECUTED
map->dirty = true;
364e0: e3a02001 mov r2, #1 <== NOT EXECUTED
364e4: 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;
364e8: e5831040 str r1, [r3, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
364ec: e5c32034 strb r2, [r3, #52] ; 0x34 <== NOT EXECUTED
364f0: ea000000 b 364f8 <rtems_rfs_file_io_end+0x11c> <== NOT EXECUTED
364f4: e3a08000 mov r8, #0 <== NOT EXECUTED
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
364f8: e595a000 ldr sl, [r5] <== NOT EXECUTED
364fc: e1a07008 mov r7, r8 <== NOT EXECUTED
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
36500: e31a0002 tst sl, #2 <== NOT EXECUTED
36504: 13a07000 movne r7, #0 <== NOT EXECUTED
length = rtems_rfs_file_update_length (handle) && length;
36508: e31a0004 tst sl, #4 <== NOT EXECUTED
handle->bpos.boff);
length = true;
mtime = true;
}
atime = rtems_rfs_file_update_atime (handle);
3650c: e22aa001 eor sl, sl, #1 <== NOT EXECUTED
mtime = rtems_rfs_file_update_mtime (handle) && mtime;
length = rtems_rfs_file_update_length (handle) && length;
36510: 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)
36514: e21aa001 ands sl, sl, #1 <== NOT EXECUTED
36518: 1a000001 bne 36524 <rtems_rfs_file_io_end+0x148> <== NOT EXECUTED
3651c: e3570000 cmp r7, #0 <== NOT EXECUTED
36520: 0a00000a beq 36550 <rtems_rfs_file_io_end+0x174> <== NOT EXECUTED
{
time_t now = time (NULL);
36524: e3a00000 mov r0, #0 <== NOT EXECUTED
36528: eb004f29 bl 4a1d4 <time> <== NOT EXECUTED
if (read && atime)
3652c: e3560000 cmp r6, #0 <== NOT EXECUTED
36530: 0a000003 beq 36544 <rtems_rfs_file_io_end+0x168> <== NOT EXECUTED
36534: e35a0000 cmp sl, #0 <== NOT EXECUTED
handle->shared->atime = now;
36538: 1595301c ldrne r3, [r5, #28] <== NOT EXECUTED
3653c: 1583008c strne r0, [r3, #140] ; 0x8c <== NOT EXECUTED
36540: ea000002 b 36550 <rtems_rfs_file_io_end+0x174> <== NOT EXECUTED
if (!read && mtime)
36544: e3570000 cmp r7, #0 <== NOT EXECUTED
handle->shared->mtime = now;
36548: 1595301c ldrne r3, [r5, #28] <== NOT EXECUTED
3654c: 15830090 strne r0, [r3, #144] ; 0x90 <== NOT EXECUTED
}
if (length)
36550: e3580000 cmp r8, #0 <== NOT EXECUTED
{
handle->shared->size.count =
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
36554: 1595301c ldrne r3, [r5, #28] <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
36558: 1593203c ldrne r2, [r3, #60] ; 0x3c <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
3655c: 15931040 ldrne r1, [r3, #64] ; 0x40 <== NOT EXECUTED
if (!read && mtime)
handle->shared->mtime = now;
}
if (length)
{
handle->shared->size.count =
36560: 15832084 strne r2, [r3, #132] ; 0x84 <== NOT EXECUTED
rtems_rfs_block_map_count (rtems_rfs_file_map (handle));
handle->shared->size.offset =
36564: 15831088 strne r1, [r3, #136] ; 0x88 <== NOT EXECUTED
rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle));
}
return rc;
}
36568: e1a00004 mov r0, r4 <== NOT EXECUTED
3656c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
00036034 <rtems_rfs_file_io_release>:
return rc;
}
int
rtems_rfs_file_io_release (rtems_rfs_file_handle* handle)
{
36034: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc = 0;
if (rtems_rfs_buffer_handle_has_block (&handle->buffer))
36038: e590000c ldr r0, [r0, #12] <== NOT EXECUTED
3603c: e3500000 cmp r0, #0 <== NOT EXECUTED
36040: 012fff1e bxeq lr <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
36044: e591301c ldr r3, [r1, #28] <== NOT EXECUTED
36048: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3604c: e2811004 add r1, r1, #4 <== NOT EXECUTED
36050: eafffbe9 b 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
00035ef8 <rtems_rfs_file_io_start>:
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
35ef8: e92d41f1 push {r0, 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))
35efc: e590700c ldr r7, [r0, #12] <== NOT EXECUTED
35f00: e3570000 cmp r7, #0 <== NOT EXECUTED
int
rtems_rfs_file_io_start (rtems_rfs_file_handle* handle,
size_t* available,
bool read)
{
35f04: e1a04000 mov r4, r0 <== NOT EXECUTED
35f08: e1a06001 mov r6, r1 <== NOT EXECUTED
35f0c: 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))
35f10: 1a00002f bne 35fd4 <rtems_rfs_file_io_start+0xdc> <== NOT EXECUTED
bool request_read;
int rc;
request_read = read;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
35f14: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
35f18: e2842010 add r2, r4, #16 <== NOT EXECUTED
35f1c: e2831034 add r1, r3, #52 ; 0x34 <== NOT EXECUTED
35f20: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
35f24: e1a0300d mov r3, sp <== NOT EXECUTED
35f28: ebfff871 bl 340f4 <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
35f2c: 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),
35f30: e1a0800d mov r8, sp <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
35f34: da000010 ble 35f7c <rtems_rfs_file_io_start+0x84> <== NOT EXECUTED
{
/*
* Has the read reached the EOF ?
*/
if (read && (rc == ENXIO))
35f38: e3550000 cmp r5, #0 <== NOT EXECUTED
35f3c: 0a000003 beq 35f50 <rtems_rfs_file_io_start+0x58> <== NOT EXECUTED
35f40: e3500006 cmp r0, #6 <== NOT EXECUTED
{
*available = 0;
35f44: 05867000 streq r7, [r6] <== NOT EXECUTED
35f48: 01a00007 moveq r0, r7 <== NOT EXECUTED
35f4c: ea000037 b 36030 <rtems_rfs_file_io_start+0x138> <== NOT EXECUTED
return 0;
}
if (rc != ENXIO)
35f50: e3500006 cmp r0, #6 <== NOT EXECUTED
35f54: 1a000035 bne 36030 <rtems_rfs_file_io_start+0x138> <== 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),
35f58: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
35f5c: e1a0300d mov r3, sp <== NOT EXECUTED
35f60: e2821034 add r1, r2, #52 ; 0x34 <== NOT EXECUTED
35f64: e5920098 ldr r0, [r2, #152] ; 0x98 <== NOT EXECUTED
35f68: e3a02001 mov r2, #1 <== NOT EXECUTED
35f6c: ebfff9fd bl 34768 <rtems_rfs_block_map_grow> <== NOT EXECUTED
rtems_rfs_file_map (handle),
1, &block);
if (rc > 0)
35f70: e3500000 cmp r0, #0 <== NOT EXECUTED
35f74: ca00002d bgt 36030 <rtems_rfs_file_io_start+0x138> <== NOT EXECUTED
35f78: ea00000b b 35fac <rtems_rfs_file_io_start+0xb4> <== 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 &&
35f7c: e3550000 cmp r5, #0 <== NOT EXECUTED
35f80: 11a03005 movne r3, r5 <== NOT EXECUTED
35f84: 1a00000b bne 35fb8 <rtems_rfs_file_io_start+0xc0> <== NOT EXECUTED
(rtems_rfs_file_block_offset (handle) ||
35f88: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
35f8c: e3530000 cmp r3, #0 <== NOT EXECUTED
35f90: 1a000007 bne 35fb4 <rtems_rfs_file_io_start+0xbc> <== NOT EXECUTED
(*available < rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle)))))
35f94: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
35f98: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
35f9c: e5962000 ldr r2, [r6] <== NOT EXECUTED
35fa0: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
35fa4: e1520003 cmp r2, r3 <== NOT EXECUTED
35fa8: 3a000001 bcc 35fb4 <rtems_rfs_file_io_start+0xbc> <== NOT EXECUTED
35fac: e3a03000 mov r3, #0 <== NOT EXECUTED
35fb0: ea000000 b 35fb8 <rtems_rfs_file_io_start+0xc0> <== NOT EXECUTED
35fb4: 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),
35fb8: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
35fbc: e2841004 add r1, r4, #4 <== NOT EXECUTED
35fc0: e5920098 ldr r0, [r2, #152] ; 0x98 <== NOT EXECUTED
35fc4: e59d2000 ldr r2, [sp] <== NOT EXECUTED
35fc8: ebfffc54 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, request_read);
if (rc > 0)
35fcc: e3500000 cmp r0, #0 <== NOT EXECUTED
35fd0: ca000016 bgt 36030 <rtems_rfs_file_io_start+0x138> <== NOT EXECUTED
return rc;
}
if (read
35fd4: e3550000 cmp r5, #0 <== NOT EXECUTED
35fd8: 0a00000d beq 36014 <rtems_rfs_file_io_start+0x11c> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
35fdc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
35fe0: e5932044 ldr r2, [r3, #68] ; 0x44 <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
35fe4: e3520000 cmp r2, #0 <== NOT EXECUTED
35fe8: 1a000002 bne 35ff8 <rtems_rfs_file_io_start+0x100> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
35fec: e593103c ldr r1, [r3, #60] ; 0x3c <== NOT EXECUTED
35ff0: e3510000 cmp r1, #0 <== NOT EXECUTED
35ff4: 0a000003 beq 36008 <rtems_rfs_file_io_start+0x110> <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
35ff8: e593103c ldr r1, [r3, #60] ; 0x3c <== NOT EXECUTED
35ffc: e2411001 sub r1, r1, #1 <== NOT EXECUTED
36000: e1520001 cmp r2, r1 <== NOT EXECUTED
36004: 1a000002 bne 36014 <rtems_rfs_file_io_start+0x11c> <== NOT EXECUTED
&& rtems_rfs_block_map_last (rtems_rfs_file_map (handle))
&& rtems_rfs_block_map_size_offset (rtems_rfs_file_map (handle)))
36008: e5933040 ldr r3, [r3, #64] ; 0x40 <== NOT EXECUTED
block, request_read);
if (rc > 0)
return rc;
}
if (read
3600c: e3530000 cmp r3, #0 <== NOT EXECUTED
36010: 1a000002 bne 36020 <rtems_rfs_file_io_start+0x128> <== 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));
36014: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
36018: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
3601c: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
*available = size - rtems_rfs_file_block_offset (handle);
36020: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED
36024: e0623003 rsb r3, r2, r3 <== NOT EXECUTED
36028: e5863000 str r3, [r6] <== NOT EXECUTED
3602c: 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;
}
36030: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00036730 <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)
{
36730: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, 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;
36734: e3a05000 mov r5, #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)
{
36738: e1a06000 mov r6, 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;
3673c: e5835000 str r5, [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));
36740: 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)
{
36744: e1a08003 mov r8, r3 <== NOT EXECUTED
36748: e1a0a001 mov sl, r1 <== NOT EXECUTED
3674c: 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));
36750: ebff457e bl 7d50 <malloc> <== NOT EXECUTED
if (!handle)
36754: e2504000 subs r4, r0, #0 <== NOT EXECUTED
36758: 0a000020 beq 367e0 <rtems_rfs_file_open+0xb0> <== NOT EXECUTED
return ENOMEM;
memset (handle, 0, sizeof (rtems_rfs_file_handle));
3675c: e3a02020 mov r2, #32 <== NOT EXECUTED
36760: e1a01005 mov r1, r5 <== NOT EXECUTED
36764: eb002c4e bl 418a4 <memset> <== 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;
36768: e584500c str r5, [r4, #12] <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
3676c: e5c45004 strb r5, [r4, #4] <== NOT EXECUTED
handle->bnum = 0;
36770: e5845008 str r5, [r4, #8] <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_First(
Chain_Control *the_chain
)
{
return the_chain->first;
36774: e5963070 ldr r3, [r6, #112] ; 0x70 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail(
Chain_Control *the_chain
)
{
return (Chain_Node *) &the_chain->permanent_null;
36778: e2862074 add r2, r6, #116 ; 0x74 <== NOT EXECUTED
3677c: ea000004 b 36794 <rtems_rfs_file_open+0x64> <== NOT EXECUTED
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;
if (shared->inode.ino == ino)
36780: e5931014 ldr r1, [r3, #20] <== NOT EXECUTED
36784: e151000a cmp r1, sl <== 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;
36788: e1a05003 mov r5, r3 <== NOT EXECUTED
if (shared->inode.ino == ino)
3678c: 0a000003 beq 367a0 <rtems_rfs_file_open+0x70> <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Next(
Chain_Node *the_node
)
{
return the_node->next;
36790: 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))
36794: e1530002 cmp r3, r2 <== NOT EXECUTED
36798: 1afffff8 bne 36780 <rtems_rfs_file_open+0x50> <== NOT EXECUTED
3679c: ea000003 b 367b0 <rtems_rfs_file_open+0x80> <== NOT EXECUTED
* the reference count and return the pointer to the data.
*/
shared = rtems_rfs_file_get_shared (fs, ino);
if (shared)
{
shared->references++;
367a0: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED
367a4: e2833001 add r3, r3, #1 <== NOT EXECUTED
367a8: e5853008 str r3, [r5, #8] <== NOT EXECUTED
367ac: ea000060 b 36934 <rtems_rfs_file_open+0x204> <== 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));
367b0: e3a0009c mov r0, #156 ; 0x9c <== NOT EXECUTED
367b4: ebff4565 bl 7d50 <malloc> <== NOT EXECUTED
if (!shared)
367b8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
367bc: 1a000009 bne 367e8 <rtems_rfs_file_open+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);
367c0: e1a00006 mov r0, r6 <== NOT EXECUTED
367c4: e2841004 add r1, r4, #4 <== NOT EXECUTED
367c8: ebfffa0b bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
367cc: e584500c str r5, [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;
367d0: e5c45004 strb r5, [r4, #4] <== NOT EXECUTED
handle->bnum = 0;
367d4: e5845008 str r5, [r4, #8] <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
367d8: e1a00004 mov r0, r4 <== NOT EXECUTED
367dc: ebff43b4 bl 76b4 <free> <== NOT EXECUTED
367e0: e3a0a00c mov sl, #12 <== NOT EXECUTED
return ENOMEM;
367e4: ea000056 b 36944 <rtems_rfs_file_open+0x214> <== NOT EXECUTED
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
367e8: e3a01000 mov r1, #0 <== NOT EXECUTED
367ec: e3a0209c mov r2, #156 ; 0x9c <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
367f0: e285700c add r7, r5, #12 <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
return ENOMEM;
}
memset (shared, 0, sizeof (rtems_rfs_file_shared));
367f4: eb002c2a bl 418a4 <memset> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &shared->inode, true);
367f8: e1a0100a mov r1, sl <== NOT EXECUTED
367fc: e1a00006 mov r0, r6 <== NOT EXECUTED
36800: e1a02007 mov r2, r7 <== NOT EXECUTED
36804: e3a03001 mov r3, #1 <== NOT EXECUTED
36808: eb0006ed bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
3680c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
36810: ca000008 bgt 36838 <rtems_rfs_file_open+0x108> <== 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);
36814: e1a00006 mov r0, r6 <== NOT EXECUTED
36818: e1a01007 mov r1, r7 <== NOT EXECUTED
3681c: e2852034 add r2, r5, #52 ; 0x34 <== NOT EXECUTED
36820: ebfff92e bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
36824: e250a000 subs sl, r0, #0 <== NOT EXECUTED
36828: da00000e ble 36868 <rtems_rfs_file_open+0x138> <== 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);
3682c: e1a01007 mov r1, r7 <== NOT EXECUTED
36830: e1a00006 mov r0, r6 <== NOT EXECUTED
36834: eb0006bf bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
free (shared);
36838: e1a00005 mov r0, r5 <== NOT EXECUTED
3683c: ebff439c bl 76b4 <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);
36840: e1a00006 mov r0, r6 <== NOT EXECUTED
36844: e2841004 add r1, r4, #4 <== NOT EXECUTED
36848: ebfff9eb bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
3684c: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
36850: 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;
36854: e5c43004 strb r3, [r4, #4] <== NOT EXECUTED
handle->bnum = 0;
36858: e5843008 str r3, [r4, #8] <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle->buffer);
free (handle);
3685c: e1a00004 mov r0, r4 <== NOT EXECUTED
36860: ebff4393 bl 76b4 <free> <== NOT EXECUTED
return rc;
36864: ea000036 b 36944 <rtems_rfs_file_open+0x214> <== 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);
36868: e5953018 ldr r3, [r5, #24] <== NOT EXECUTED
}
shared->references = 1;
3686c: e3a02001 mov r2, #1 <== NOT EXECUTED
36870: e5852008 str r2, [r5, #8] <== NOT EXECUTED
36874: e283200c add r2, r3, #12 <== NOT EXECUTED
shared->size.count = rtems_rfs_inode_get_block_count (&shared->inode);
36878: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
3687c: e5d3000c ldrb r0, [r3, #12] <== NOT EXECUTED
36880: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
36884: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
36888: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
3688c: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
36890: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
36894: e5852084 str r2, [r5, #132] ; 0x84 <== NOT EXECUTED
shared->size.offset = rtems_rfs_inode_get_block_offset (&shared->inode);
36898: e5d3100a ldrb r1, [r3, #10] <== NOT EXECUTED
3689c: e5d3200b ldrb r2, [r3, #11] <== NOT EXECUTED
368a0: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
368a4: e5852088 str r2, [r5, #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);
368a8: e2832010 add r2, r3, #16 <== NOT EXECUTED
shared->atime = rtems_rfs_inode_get_atime (&shared->inode);
368ac: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
368b0: e5d30010 ldrb r0, [r3, #16] <== NOT EXECUTED
368b4: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
368b8: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
368bc: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
368c0: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
368c4: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
368c8: e585208c str r2, [r5, #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);
368cc: e2832014 add r2, r3, #20 <== NOT EXECUTED
shared->mtime = rtems_rfs_inode_get_mtime (&shared->inode);
368d0: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
368d4: e5d30014 ldrb r0, [r3, #20] <== NOT EXECUTED
368d8: e5d2c001 ldrb ip, [r2, #1] <== NOT EXECUTED
368dc: e1810c00 orr r0, r1, r0, lsl #24 <== NOT EXECUTED
368e0: e5d21002 ldrb r1, [r2, #2] <== NOT EXECUTED
368e4: e180280c orr r2, r0, ip, lsl #16 <== NOT EXECUTED
368e8: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
368ec: e5852090 str r2, [r5, #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);
368f0: e2832018 add r2, r3, #24 <== NOT EXECUTED
shared->ctime = rtems_rfs_inode_get_ctime (&shared->inode);
368f4: e5d30018 ldrb r0, [r3, #24] <== NOT EXECUTED
368f8: e5d23003 ldrb r3, [r2, #3] <== NOT EXECUTED
368fc: e5d21001 ldrb r1, [r2, #1] <== NOT EXECUTED
36900: e1833c00 orr r3, r3, r0, lsl #24 <== NOT EXECUTED
36904: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
36908: e1833801 orr r3, r3, r1, lsl #16 <== NOT EXECUTED
3690c: 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 );
36910: e2860070 add r0, r6, #112 ; 0x70 <== NOT EXECUTED
36914: e1a01005 mov r1, r5 <== NOT EXECUTED
36918: e5853094 str r3, [r5, #148] ; 0x94 <== NOT EXECUTED
shared->fs = fs;
3691c: e5856098 str r6, [r5, #152] ; 0x98 <== NOT EXECUTED
36920: ebff56ce bl c460 <_Chain_Append> <== NOT EXECUTED
rtems_chain_append (&fs->file_shares, &shared->link);
rtems_rfs_inode_unload (fs, &shared->inode, false);
36924: e1a00006 mov r0, r6 <== NOT EXECUTED
36928: e1a01007 mov r1, r7 <== NOT EXECUTED
3692c: e3a02000 mov r2, #0 <== NOT EXECUTED
36930: eb000656 bl 38290 <rtems_rfs_inode_unload> <== NOT EXECUTED
}
handle->flags = flags;
handle->shared = shared;
*file = handle;
36934: e5884000 str r4, [r8] <== 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;
36938: e5849000 str r9, [r4] <== NOT EXECUTED
handle->shared = shared;
3693c: e584501c str r5, [r4, #28] <== NOT EXECUTED
*file = handle;
36940: e3a0a000 mov sl, #0 <== NOT EXECUTED
return 0;
}
36944: e1a0000a mov r0, sl <== NOT EXECUTED
36948: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
0003631c <rtems_rfs_file_seek>:
int
rtems_rfs_file_seek (rtems_rfs_file_handle* handle,
rtems_rfs_pos pos,
rtems_rfs_pos* new_pos)
{
3631c: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
36320: 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),
36324: 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)
{
36328: e1a05001 mov r5, r1 <== NOT EXECUTED
3632c: e2801084 add r1, r0, #132 ; 0x84 <== NOT EXECUTED
36330: e5900098 ldr r0, [r0, #152] ; 0x98 <== NOT EXECUTED
36334: e1a06002 mov r6, r2 <== NOT EXECUTED
36338: e1a08003 mov r8, r3 <== NOT EXECUTED
3633c: ebfff73e bl 3403c <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),
36340: e1510006 cmp r1, r6 <== NOT EXECUTED
36344: 8a000002 bhi 36354 <rtems_rfs_file_seek+0x38> <== NOT EXECUTED
36348: 1a00001c bne 363c0 <rtems_rfs_file_seek+0xa4> <== NOT EXECUTED
3634c: e1500005 cmp r0, r5 <== NOT EXECUTED
36350: 9a00001a bls 363c0 <rtems_rfs_file_seek+0xa4> <== NOT EXECUTED
handle->shared))
{
rtems_rfs_file_set_bpos (handle, pos);
36354: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
36358: e2847010 add r7, r4, #16 <== NOT EXECUTED
3635c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
36360: e1a01005 mov r1, r5 <== NOT EXECUTED
36364: e1a03007 mov r3, r7 <== NOT EXECUTED
36368: e1a02006 mov r2, r6 <== NOT EXECUTED
3636c: ebfff703 bl 33f80 <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))
36370: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
36374: e3530000 cmp r3, #0 <== NOT EXECUTED
36378: 0a000014 beq 363d0 <rtems_rfs_file_seek+0xb4> <== NOT EXECUTED
{
rtems_rfs_buffer_block block;
int rc;
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
3637c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
36380: e1a02007 mov r2, r7 <== NOT EXECUTED
36384: e2831034 add r1, r3, #52 ; 0x34 <== NOT EXECUTED
36388: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3638c: e1a0300d mov r3, sp <== NOT EXECUTED
36390: ebfff757 bl 340f4 <rtems_rfs_block_map_find> <== NOT EXECUTED
rtems_rfs_file_map (handle),
rtems_rfs_file_bpos (handle),
&block);
if (rc > 0)
36394: e3500000 cmp r0, #0 <== NOT EXECUTED
36398: ca00000e bgt 363d8 <rtems_rfs_file_seek+0xbc> <== NOT EXECUTED
return rc;
if (rtems_rfs_buffer_bnum (&handle->buffer) != block)
3639c: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
363a0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
363a4: e1520003 cmp r2, r3 <== NOT EXECUTED
363a8: 0a000008 beq 363d0 <rtems_rfs_file_seek+0xb4> <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
363ac: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
363b0: e2841004 add r1, r4, #4 <== NOT EXECUTED
363b4: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
363b8: ebfffb0f bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
363bc: ea000001 b 363c8 <rtems_rfs_file_seek+0xac> <== 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);
363c0: e1a00004 mov r0, r4 <== NOT EXECUTED
363c4: ebffff1a bl 36034 <rtems_rfs_file_io_release> <== NOT EXECUTED
if (rc > 0)
363c8: e3500000 cmp r0, #0 <== NOT EXECUTED
363cc: ca000001 bgt 363d8 <rtems_rfs_file_seek+0xbc> <== NOT EXECUTED
return rc;
}
*new_pos = pos;
363d0: e8880060 stm r8, {r5, r6} <== NOT EXECUTED
363d4: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
363d8: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00036054 <rtems_rfs_file_set_size>:
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
36054: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_block_map* map = rtems_rfs_file_map (handle);
36058: e590501c ldr r5, [r0, #28] <== NOT EXECUTED
}
int
rtems_rfs_file_set_size (rtems_rfs_file_handle* handle,
rtems_rfs_pos new_size)
{
3605c: e1a06001 mov r6, r1 <== NOT EXECUTED
36060: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
36064: e1a04000 mov r4, r0 <== NOT EXECUTED
36068: e2851084 add r1, r5, #132 ; 0x84 <== NOT EXECUTED
3606c: e5950098 ldr r0, [r5, #152] ; 0x98 <== NOT EXECUTED
36070: e1a07002 mov r7, r2 <== NOT EXECUTED
36074: ebfff7f0 bl 3403c <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)
36078: e1500006 cmp r0, r6 <== NOT EXECUTED
3607c: 1a000001 bne 36088 <rtems_rfs_file_set_size+0x34> <== NOT EXECUTED
36080: e1510007 cmp r1, r7 <== NOT EXECUTED
36084: 0a0000a1 beq 36310 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
{
/*
* Short cut for the common truncate on open call.
*/
if (new_size == 0)
36088: e1962007 orrs r2, r6, r7 <== 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);
3608c: 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)
36090: 1a000006 bne 360b0 <rtems_rfs_file_set_size+0x5c> <== NOT EXECUTED
{
rc = rtems_rfs_block_map_free_all (rtems_rfs_file_fs (handle), map);
36094: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
36098: e1a01009 mov r1, r9 <== NOT EXECUTED
3609c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
360a0: ebfff968 bl 34648 <rtems_rfs_block_map_free_all> <== NOT EXECUTED
if (rc > 0)
360a4: e3500000 cmp r0, #0 <== NOT EXECUTED
360a8: ca000099 bgt 36314 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
360ac: ea00008a b 362dc <rtems_rfs_file_set_size+0x288> <== NOT EXECUTED
return rc;
}
else
{
if (size < new_size)
360b0: e1570001 cmp r7, r1 <== NOT EXECUTED
360b4: 8a000002 bhi 360c4 <rtems_rfs_file_set_size+0x70> <== NOT EXECUTED
360b8: 1a000054 bne 36210 <rtems_rfs_file_set_size+0x1bc> <== NOT EXECUTED
360bc: e1560000 cmp r6, r0 <== NOT EXECUTED
360c0: 9a000052 bls 36210 <rtems_rfs_file_set_size+0x1bc> <== 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));
360c4: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
360c8: e5933098 ldr r3, [r3, #152] ; 0x98 <== 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),
360cc: e3a02000 mov r2, #0 <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
360d0: e1a0a006 mov sl, r6 <== NOT EXECUTED
360d4: e1a0b007 mov fp, r7 <== NOT EXECUTED
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
360d8: e5936008 ldr r6, [r3, #8] <== 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),
360dc: e2843004 add r3, r4, #4 <== NOT EXECUTED
360e0: e58d2000 str r2, [sp] <== NOT EXECUTED
*/
rtems_rfs_pos count;
uint32_t length;
bool read_block;
count = new_size - size;
360e4: e05aa000 subs sl, sl, r0 <== NOT EXECUTED
360e8: e0cbb001 sbc fp, fp, r1 <== 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),
360ec: e58d3004 str r3, [sp, #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);
360f0: e1a07002 mov r7, r2 <== NOT EXECUTED
* Have we reached the EOF ?
*/
if (rc != ENXIO)
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
360f4: e3a08001 mov r8, #1 <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
360f8: ea000041 b 36204 <rtems_rfs_file_set_size+0x1b0> <== 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);
360fc: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED
36100: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
36104: e5952040 ldr r2, [r5, #64] ; 0x40 <== NOT EXECUTED
36108: e3520000 cmp r2, #0 <== NOT EXECUTED
3610c: 12433001 subne r3, r3, #1 <== NOT EXECUTED
36110: 158d3008 strne r3, [sp, #8] <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
36114: e594301c ldr r3, [r4, #28] <== 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);
36118: e58d200c str r2, [sp, #12] <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
3611c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
36120: e1a01009 mov r1, r9 <== NOT EXECUTED
36124: e28d2008 add r2, sp, #8 <== NOT EXECUTED
36128: 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);
3612c: e58d7010 str r7, [sp, #16] <== NOT EXECUTED
rc = rtems_rfs_block_map_find (rtems_rfs_file_fs (handle),
36130: ebfff7ef bl 340f4 <rtems_rfs_block_map_find> <== NOT EXECUTED
map, &bpos, &block);
if (rc > 0)
36134: e3500000 cmp r0, #0 <== NOT EXECUTED
36138: da000009 ble 36164 <rtems_rfs_file_set_size+0x110> <== NOT EXECUTED
{
/*
* Have we reached the EOF ?
*/
if (rc != ENXIO)
3613c: e3500006 cmp r0, #6 <== NOT EXECUTED
36140: 1a000073 bne 36314 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
return rc;
rc = rtems_rfs_block_map_grow (rtems_rfs_file_fs (handle),
36144: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
36148: e1a01009 mov r1, r9 <== NOT EXECUTED
3614c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
36150: e3a02001 mov r2, #1 <== NOT EXECUTED
36154: e28d3014 add r3, sp, #20 <== NOT EXECUTED
36158: ebfff982 bl 34768 <rtems_rfs_block_map_grow> <== NOT EXECUTED
map, 1, &block);
if (rc > 0)
3615c: e3500000 cmp r0, #0 <== NOT EXECUTED
36160: ca00006b bgt 36314 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
return rc;
}
if (count < (length - bpos.boff))
36164: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
36168: e157000b cmp r7, fp <== NOT EXECUTED
3616c: e0632006 rsb r2, r3, r6 <== NOT EXECUTED
36170: 1a000007 bne 36194 <rtems_rfs_file_set_size+0x140> <== NOT EXECUTED
36174: e152000a cmp r2, sl <== NOT EXECUTED
36178: 9a000005 bls 36194 <rtems_rfs_file_set_size+0x140> <== NOT EXECUTED
{
length = count + bpos.boff;
3617c: e083600a add r6, r3, sl <== 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;
36180: e3a02001 mov r2, #1 <== 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;
36184: e5856040 str r6, [r5, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
36188: e5c58034 strb r8, [r5, #52] ; 0x34 <== NOT EXECUTED
3618c: e58d2000 str r2, [sp] <== NOT EXECUTED
36190: ea000001 b 3619c <rtems_rfs_file_set_size+0x148> <== 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;
36194: e5857040 str r7, [r5, #64] ; 0x40 <== NOT EXECUTED
map->dirty = true;
36198: e5c58034 strb r8, [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),
3619c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
361a0: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
361a4: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
361a8: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
361ac: e59d3000 ldr r3, [sp] <== NOT EXECUTED
361b0: ebfffbda bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
rtems_rfs_file_buffer (handle),
block, read_block);
if (rc > 0)
361b4: e3500000 cmp r0, #0 <== NOT EXECUTED
361b8: ca000055 bgt 36314 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
return rc;
dst = rtems_rfs_buffer_data (&handle->buffer);
memset (dst + bpos.boff, 0, length - bpos.boff);
361bc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
361c0: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
361c4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
361c8: e3a01000 mov r1, #0 <== NOT EXECUTED
361cc: e0632006 rsb r2, r3, r6 <== NOT EXECUTED
361d0: e0800003 add r0, r0, r3 <== NOT EXECUTED
361d4: eb002db2 bl 418a4 <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (rtems_rfs_file_buffer (handle));
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
361d8: 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));
361dc: e5c48004 strb r8, [r4, #4] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (rtems_rfs_file_fs (handle),
361e0: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
361e4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
361e8: ebfffb83 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_file_buffer (handle));
if (rc > 0)
361ec: e3500000 cmp r0, #0 <== NOT EXECUTED
361f0: ca000047 bgt 36314 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
return rc;
count -= length - bpos.boff;
361f4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
361f8: e0633006 rsb r3, r3, r6 <== NOT EXECUTED
361fc: e05aa003 subs sl, sl, r3 <== NOT EXECUTED
36200: e2cbb000 sbc fp, fp, #0 <== NOT EXECUTED
count = new_size - size;
length = rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle));
read_block = false;
while (count)
36204: e19a300b orrs r3, sl, fp <== NOT EXECUTED
36208: 1affffbb bne 360fc <rtems_rfs_file_set_size+0xa8> <== NOT EXECUTED
3620c: ea000032 b 362dc <rtems_rfs_file_set_size+0x288> <== 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);
36210: e594a01c ldr sl, [r4, #28] <== NOT EXECUTED
36214: e59a8098 ldr r8, [sl, #152] ; 0x98 <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
36218: e3e00000 mvn r0, #0 <== NOT EXECUTED
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
3621c: e5989008 ldr r9, [r8, #8] <== NOT EXECUTED
* Shrink
*/
rtems_rfs_block_no blocks;
uint32_t offset;
blocks =
36220: e0900006 adds r0, r0, r6 <== NOT EXECUTED
36224: e3e01000 mvn r1, #0 <== NOT EXECUTED
36228: e0a11007 adc r1, r1, r7 <== NOT EXECUTED
3622c: e1a02009 mov r2, r9 <== NOT EXECUTED
36230: e3a03000 mov r3, #0 <== NOT EXECUTED
36234: eb00844c bl 5736c <__udivdi3> <== NOT EXECUTED
36238: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED
3623c: 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)
36240: e0922003 adds r2, r2, r3 <== NOT EXECUTED
36244: 0a000004 beq 3625c <rtems_rfs_file_set_size+0x208> <== NOT EXECUTED
{
int rc;
rc = rtems_rfs_block_map_shrink (rtems_rfs_file_fs (handle),
36248: e1a00008 mov r0, r8 <== NOT EXECUTED
3624c: e28a1034 add r1, sl, #52 ; 0x34 <== NOT EXECUTED
36250: ebfff84c bl 34388 <rtems_rfs_block_map_shrink> <== NOT EXECUTED
rtems_rfs_file_map (handle),
blocks);
if (rc > 0)
36254: e3500000 cmp r0, #0 <== NOT EXECUTED
36258: ca00002d bgt 36314 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
blocks =
rtems_rfs_block_map_count (map) -
(((new_size - 1) /
rtems_rfs_fs_block_size (rtems_rfs_file_fs (handle))) + 1);
offset =
3625c: e1a02009 mov r2, r9 <== NOT EXECUTED
36260: e3a03000 mov r3, #0 <== NOT EXECUTED
36264: e1a00006 mov r0, r6 <== NOT EXECUTED
36268: e1a01007 mov r1, r7 <== NOT EXECUTED
3626c: eb00854f bl 577b0 <__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;
36270: 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),
36274: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
map->dirty = true;
36278: e3a02001 mov r2, #1 <== NOT EXECUTED
3627c: e3530000 cmp r3, #0 <== NOT EXECUTED
36280: e5c52034 strb r2, [r5, #52] ; 0x34 <== NOT EXECUTED
36284: 0a000002 beq 36294 <rtems_rfs_file_set_size+0x240> <== 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);
36288: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED
3628c: e3520000 cmp r2, #0 <== NOT EXECUTED
36290: 0a000008 beq 362b8 <rtems_rfs_file_set_size+0x264> <== 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),
36294: e595203c ldr r2, [r5, #60] ; 0x3c <== NOT EXECUTED
36298: e1530002 cmp r3, r2 <== NOT EXECUTED
3629c: 2a000005 bcs 362b8 <rtems_rfs_file_set_size+0x264> <== NOT EXECUTED
362a0: e2422001 sub r2, r2, #1 <== NOT EXECUTED
362a4: e1530002 cmp r3, r2 <== NOT EXECUTED
362a8: 1a00000b bne 362dc <rtems_rfs_file_set_size+0x288> <== NOT EXECUTED
362ac: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
362b0: e1530000 cmp r3, r0 <== NOT EXECUTED
362b4: 9a000008 bls 362dc <rtems_rfs_file_set_size+0x288> <== NOT EXECUTED
rtems_rfs_block_map_size (map)))
rtems_rfs_block_size_get_bpos (rtems_rfs_block_map_size (map),
362b8: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED
362bc: e5843010 str r3, [r4, #16] <== NOT EXECUTED
362c0: e5952040 ldr r2, [r5, #64] ; 0x40 <== NOT EXECUTED
362c4: e3520000 cmp r2, #0 <== NOT EXECUTED
362c8: e3a01000 mov r1, #0 <== NOT EXECUTED
362cc: 12433001 subne r3, r3, #1 <== NOT EXECUTED
362d0: e5841018 str r1, [r4, #24] <== NOT EXECUTED
362d4: e5842014 str r2, [r4, #20] <== NOT EXECUTED
362d8: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
rtems_rfs_file_bpos (handle));
}
}
handle->shared->size.count = rtems_rfs_block_map_count (map);
362dc: e594601c ldr r6, [r4, #28] <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
362e0: 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);
362e4: e595303c ldr r3, [r5, #60] ; 0x3c <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
362e8: e5862088 str r2, [r6, #136] ; 0x88 <== 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);
362ec: e5863084 str r3, [r6, #132] ; 0x84 <== NOT EXECUTED
handle->shared->size.offset = rtems_rfs_block_map_size_offset (map);
if (rtems_rfs_file_update_mtime (handle))
362f0: e5944000 ldr r4, [r4] <== NOT EXECUTED
362f4: e2144002 ands r4, r4, #2 <== NOT EXECUTED
362f8: 1a000004 bne 36310 <rtems_rfs_file_set_size+0x2bc> <== NOT EXECUTED
handle->shared->mtime = time (NULL);
362fc: e1a00004 mov r0, r4 <== NOT EXECUTED
36300: eb004fb3 bl 4a1d4 <time> <== NOT EXECUTED
36304: e5860090 str r0, [r6, #144] ; 0x90 <== NOT EXECUTED
36308: e1a00004 mov r0, r4 <== NOT EXECUTED
3630c: ea000000 b 36314 <rtems_rfs_file_set_size+0x2c0> <== NOT EXECUTED
36310: e3a00000 mov r0, #0 <== NOT EXECUTED
}
return 0;
}
36314: e28dd018 add sp, sp, #24 <== NOT EXECUTED
36318: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00036f38 <rtems_rfs_format>:
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
36f38: 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)
36f3c: e5d13015 ldrb r3, [r1, #21] <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
36f40: e24dd0ec sub sp, sp, #236 ; 0xec <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
36f44: e3530000 cmp r3, #0 <== NOT EXECUTED
return rc;
}
int
rtems_rfs_format (const char* name, const rtems_rfs_format_config* config)
{
36f48: e1a07001 mov r7, r1 <== NOT EXECUTED
36f4c: e58d000c str r0, [sp, #12] <== NOT EXECUTED
rtems_rfs_file_system fs;
int group;
int rc;
if (config->verbose)
printf ("rtems-rfs: format: %s\n", name);
36f50: 159f0b5c ldrne r0, [pc, #2908] ; 37ab4 <rtems_rfs_format+0xb7c><== NOT EXECUTED
36f54: 159d100c ldrne r1, [sp, #12] <== NOT EXECUTED
36f58: 1b002e78 blne 42940 <printf> <== NOT EXECUTED
memset (&fs, 0, sizeof (rtems_rfs_file_system));
36f5c: e28d4018 add r4, sp, #24 <== NOT EXECUTED
36f60: e3a01000 mov r1, #0 <== NOT EXECUTED
36f64: e3a02080 mov r2, #128 ; 0x80 <== NOT EXECUTED
36f68: e1a00004 mov r0, r4 <== NOT EXECUTED
36f6c: eb002a4c bl 418a4 <memset> <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
36f70: e2843070 add r3, r4, #112 ; 0x70 <== NOT EXECUTED
36f74: e58d3090 str r3, [sp, #144] ; 0x90 <== 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;
36f78: e3a03005 mov r3, #5 <== NOT EXECUTED
36f7c: 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);
36f80: e284e064 add lr, r4, #100 ; 0x64 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36f84: 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);
36f88: e2842074 add r2, r4, #116 ; 0x74 <== NOT EXECUTED
36f8c: e58d3054 str r3, [sp, #84] ; 0x54 <== NOT EXECUTED
36f90: 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;
36f94: e3a03002 mov r3, #2 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36f98: 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);
36f9c: e2846054 add r6, r4, #84 ; 0x54 <== NOT EXECUTED
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
36fa0: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
36fa4: e1a01004 mov r1, r4 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36fa8: e58d5070 str r5, [sp, #112] ; 0x70 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
36fac: e58da058 str sl, [sp, #88] ; 0x58 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36fb0: e58d8060 str r8, [sp, #96] ; 0x60 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
36fb4: e58d6068 str r6, [sp, #104] ; 0x68 <== NOT EXECUTED
36fb8: e58de078 str lr, [sp, #120] ; 0x78 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36fbc: e58dc080 str ip, [sp, #128] ; 0x80 <== NOT EXECUTED
*/
RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty(
Chain_Control *the_chain
)
{
the_chain->first = _Chain_Tail(the_chain);
36fc0: e58d2088 str r2, [sp, #136] ; 0x88 <== 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;
36fc4: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, &fs);
36fc8: ebfff7f5 bl 34fa4 <rtems_rfs_buffer_open> <== NOT EXECUTED
if (rc > 0)
36fcc: e2505000 subs r5, r0, #0 <== NOT EXECUTED
36fd0: da000004 ble 36fe8 <rtems_rfs_format+0xb0> <== NOT EXECUTED
{
printf ("rtems-rfs: format: buffer open failed: %d: %s\n",
36fd4: eb00367d bl 449d0 <strerror> <== NOT EXECUTED
36fd8: e1a01005 mov r1, r5 <== NOT EXECUTED
36fdc: e1a02000 mov r2, r0 <== NOT EXECUTED
36fe0: e59f0ad0 ldr r0, [pc, #2768] ; 37ab8 <rtems_rfs_format+0xb80><== NOT EXECUTED
36fe4: ea0002ac b 37a9c <rtems_rfs_format+0xb64> <== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
36fe8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
36fec: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
36ff0: e3510000 cmp r1, #0 <== NOT EXECUTED
{
printf ("rtems-rfs: media block is invalid: %" PRIu32 "\n",
36ff4: 059f0ac0 ldreq r0, [pc, #2752] ; 37abc <rtems_rfs_format+0xb84><== NOT EXECUTED
}
/*
* Check the media.
*/
if (rtems_rfs_fs_media_block_size (&fs) == 0)
36ff8: 0a00014e beq 37538 <rtems_rfs_format+0x600> <== 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;
36ffc: e5973000 ldr r3, [r7] <== NOT EXECUTED
if (!fs->block_size)
37000: e3530000 cmp r3, #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;
37004: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
if (!fs->block_size)
37008: 1a00001c bne 37080 <rtems_rfs_format+0x148> <== NOT EXECUTED
{
uint64_t total_size = rtems_rfs_fs_media_size (fs);
3700c: e1a00004 mov r0, r4 <== NOT EXECUTED
37010: ebfffe54 bl 36968 <rtems_rfs_fs_media_size> <== NOT EXECUTED
if (total_size >= GIGS (1))
37014: e3510000 cmp r1, #0 <== NOT EXECUTED
37018: 1a000001 bne 37024 <rtems_rfs_format+0xec> <== NOT EXECUTED
3701c: e3500601 cmp r0, #1048576 ; 0x100000 <== NOT EXECUTED
37020: 3a00000e bcc 37060 <rtems_rfs_format+0x128> <== NOT EXECUTED
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
37024: e3a03601 mov r3, #1048576 ; 0x100000 <== NOT EXECUTED
37028: e0933000 adds r3, r3, r0 <== NOT EXECUTED
3702c: e3a04000 mov r4, #0 <== NOT EXECUTED
37030: e0a44001 adc r4, r4, r1 <== NOT EXECUTED
37034: e1a01a23 lsr r1, r3, #20 <== NOT EXECUTED
37038: e1811604 orr r1, r1, r4, lsl #12 <== NOT EXECUTED
3703c: e3a0301f mov r3, #31 <== NOT EXECUTED
int b;
for (b = 31; b > 0; b--)
if ((gigs & (1 << b)) != 0)
37040: e3a02001 mov r2, #1 <== NOT EXECUTED
37044: e0110312 ands r0, r1, r2, lsl r3 <== NOT EXECUTED
37048: 1a000001 bne 37054 <rtems_rfs_format+0x11c> <== NOT EXECUTED
if (total_size >= GIGS (1))
{
uint32_t gigs = (total_size + GIGS (1)) / GIGS (1);
int b;
for (b = 31; b > 0; b--)
3704c: e2533001 subs r3, r3, #1 <== NOT EXECUTED
37050: 1afffffb bne 37044 <rtems_rfs_format+0x10c> <== NOT EXECUTED
if ((gigs & (1 << b)) != 0)
break;
fs->block_size = 1 << b;
37054: e3a02001 mov r2, #1 <== NOT EXECUTED
37058: e1a03312 lsl r3, r2, r3 <== NOT EXECUTED
3705c: e58d3020 str r3, [sp, #32] <== NOT EXECUTED
}
if (fs->block_size < 512)
37060: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
37064: e3530c02 cmp r3, #512 ; 0x200 <== NOT EXECUTED
fs->block_size = 512;
37068: 33a03c02 movcc r3, #512 ; 0x200 <== NOT EXECUTED
3706c: 358d3020 strcc r3, [sp, #32] <== NOT EXECUTED
if (fs->block_size > (4 * 1024))
37070: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
37074: e3530a01 cmp r3, #4096 ; 0x1000 <== NOT EXECUTED
fs->block_size = (4 * 1024);
37078: 83a03a01 movhi r3, #4096 ; 0x1000 <== NOT EXECUTED
3707c: 858d3020 strhi r3, [sp, #32] <== NOT EXECUTED
}
if ((fs->block_size % rtems_rfs_fs_media_block_size (fs)) != 0)
37080: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
37084: e59d4020 ldr r4, [sp, #32] <== NOT EXECUTED
37088: e5935024 ldr r5, [r3, #36] ; 0x24 <== NOT EXECUTED
3708c: e1a00004 mov r0, r4 <== NOT EXECUTED
37090: e1a01005 mov r1, r5 <== NOT EXECUTED
37094: eb007d2e bl 56554 <__umodsi3> <== NOT EXECUTED
37098: e3500000 cmp r0, #0 <== NOT EXECUTED
{
printf ("block size (%zd) is not a multiple of media block size (%" PRId32 ")\n",
3709c: 11a01004 movne r1, r4 <== NOT EXECUTED
370a0: 11a02005 movne r2, r5 <== NOT EXECUTED
370a4: 159f0a14 ldrne r0, [pc, #2580] ; 37ac0 <rtems_rfs_format+0xb88><== NOT EXECUTED
370a8: 1a00027b bne 37a9c <rtems_rfs_format+0xb64> <== NOT EXECUTED
fs->block_size, rtems_rfs_fs_media_block_size (fs));
return false;
}
fs->group_blocks = config->group_blocks;
370ac: e5973004 ldr r3, [r7, #4] <== NOT EXECUTED
if (!fs->group_blocks)
370b0: 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);
370b4: 01a04184 lsleq r4, r4, #3 <== 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;
370b8: e58d303c str r3, [sp, #60] ; 0x3c <== 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);
370bc: 058d403c streq r4, [sp, #60] ; 0x3c <== NOT EXECUTED
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
370c0: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
370c4: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
370c8: e1530182 cmp r3, r2, lsl #3 <== NOT EXECUTED
{
printf ("group block count is higher than bits in block\n");
370cc: 859f09f0 ldrhi r0, [pc, #2544] ; 37ac4 <rtems_rfs_format+0xb8c><== NOT EXECUTED
* block.
*/
fs->group_blocks = rtems_rfs_bitmap_numof_bits (fs->block_size);
}
if (fs->group_blocks > rtems_rfs_bitmap_numof_bits (fs->block_size))
370d0: 8a00010b bhi 37504 <rtems_rfs_format+0x5cc> <== 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;
370d4: e28d0018 add r0, sp, #24 <== NOT EXECUTED
370d8: ebfffe22 bl 36968 <rtems_rfs_fs_media_size> <== NOT EXECUTED
370dc: e59d4020 ldr r4, [sp, #32] <== NOT EXECUTED
370e0: e3a03000 mov r3, #0 <== NOT EXECUTED
370e4: e1a02004 mov r2, r4 <== NOT EXECUTED
370e8: eb00809f bl 5736c <__udivdi3> <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
370ec: 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;
370f0: e1a05000 mov r5, r0 <== NOT EXECUTED
370f4: e58d001c str r0, [sp, #28] <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
370f8: 03a04001 moveq r4, #1 <== NOT EXECUTED
370fc: 0a000003 beq 37110 <rtems_rfs_format+0x1d8> <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
37100: e1a01184 lsl r1, r4, #3 <== NOT EXECUTED
37104: e2450001 sub r0, r5, #1 <== NOT EXECUTED
37108: eb007c7d bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
3710c: e2804001 add r4, 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;
37110: e5973008 ldr r3, [r7, #8] <== NOT EXECUTED
if (!fs->group_inodes)
37114: 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),
37118: e58d4038 str r4, [sp, #56] ; 0x38 <== NOT EXECUTED
rtems_rfs_bits_per_block (fs));
fs->group_inodes = config->group_inodes;
3711c: e58d3040 str r3, [sp, #64] ; 0x40 <== NOT EXECUTED
if (!fs->group_inodes)
37120: 1a000012 bne 37170 <rtems_rfs_format+0x238> <== 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)
37124: e597300c ldr r3, [r7, #12] <== NOT EXECUTED
37128: e3530000 cmp r3, #0 <== NOT EXECUTED
3712c: 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) -
37130: e2450001 sub r0, r5, #1 <== NOT EXECUTED
37134: e0000093 mul r0, r3, r0 <== NOT EXECUTED
37138: e3a01064 mov r1, #100 ; 0x64 <== NOT EXECUTED
3713c: eb007c70 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
37140: e3500000 cmp r0, #0 <== NOT EXECUTED
37144: 03a04001 moveq r4, #1 <== NOT EXECUTED
37148: 0a000003 beq 3715c <rtems_rfs_format+0x224> <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
3714c: e1a01004 mov r1, r4 <== NOT EXECUTED
37150: e2400001 sub r0, r0, #1 <== NOT EXECUTED
37154: eb007c6a bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
37158: e2804001 add r4, 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);
3715c: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
37160: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED
37164: eb007c66 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
37168: e0000094 mul r0, r4, r0 <== NOT EXECUTED
3716c: e58d0040 str r0, [sp, #64] ; 0x40 <== 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;
37170: e59d0020 ldr r0, [sp, #32] <== NOT EXECUTED
37174: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED
37178: eb007c61 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
3717c: e1a04000 mov r4, r0 <== NOT EXECUTED
fs->group_inodes =
rtems_rfs_rup_quotient (fs->group_inodes,
37180: e59d0040 ldr r0, [sp, #64] ; 0x40 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
37184: 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;
37188: e58d4044 str r4, [sp, #68] ; 0x44 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
3718c: 12400001 subne r0, r0, #1 <== NOT EXECUTED
37190: 11a01004 movne r1, r4 <== NOT EXECUTED
37194: 1b007c5a blne 56304 <__aeabi_uidiv> <== NOT EXECUTED
37198: 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,
3719c: e0020094 mul r2, r4, r0 <== NOT EXECUTED
fs->inodes_per_block) * fs->inodes_per_block;
if (fs->group_inodes > rtems_rfs_bitmap_numof_bits (fs->block_size))
371a0: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
371a4: e1a03183 lsl r3, r3, #3 <== NOT EXECUTED
371a8: e1520003 cmp r2, r3 <== 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 =
371ac: e58d2040 str r2, [sp, #64] ; 0x40 <== 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);
371b0: 858d3040 strhi r3, [sp, #64] ; 0x40 <== NOT EXECUTED
fs->max_name_length = config->max_name_length;
371b4: e5973010 ldr r3, [r7, #16] <== NOT EXECUTED
if (!fs->max_name_length)
371b8: 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;
371bc: e58d3030 str r3, [sp, #48] ; 0x30 <== NOT EXECUTED
if (!fs->max_name_length)
{
fs->max_name_length = 512;
371c0: 02833c02 addeq r3, r3, #512 ; 0x200 <== NOT EXECUTED
371c4: 058d3030 streq r3, [sp, #48] ; 0x30 <== NOT EXECUTED
* Check the configuration data.
*/
if (!rtems_rfs_check_config (&fs, config))
return -1;
if (config->verbose)
371c8: e5d73015 ldrb r3, [r7, #21] <== NOT EXECUTED
371cc: e3530000 cmp r3, #0 <== NOT EXECUTED
371d0: 0a00003b beq 372c4 <rtems_rfs_format+0x38c> <== NOT EXECUTED
{
printf ("rtems-rfs: format: media size = %" PRIu64 "\n",
371d4: e28d4018 add r4, sp, #24 <== NOT EXECUTED
371d8: e1a00004 mov r0, r4 <== NOT EXECUTED
371dc: ebfffde1 bl 36968 <rtems_rfs_fs_media_size> <== NOT EXECUTED
371e0: e1a02001 mov r2, r1 <== NOT EXECUTED
371e4: e1a01000 mov r1, r0 <== NOT EXECUTED
371e8: e59f08d8 ldr r0, [pc, #2264] ; 37ac8 <rtems_rfs_format+0xb90><== NOT EXECUTED
371ec: eb002dd3 bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_size (&fs));
printf ("rtems-rfs: format: media blocks = %" PRIu32 "\n",
371f0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
371f4: e59f08d0 ldr r0, [pc, #2256] ; 37acc <rtems_rfs_format+0xb94><== NOT EXECUTED
371f8: e593101c ldr r1, [r3, #28] <== NOT EXECUTED
371fc: eb002dcf bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_blocks (&fs));
printf ("rtems-rfs: format: media block size = %" PRIu32 "\n",
37200: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
37204: e59f08c4 ldr r0, [pc, #2244] ; 37ad0 <rtems_rfs_format+0xb98><== NOT EXECUTED
37208: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
3720c: eb002dcb bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_fs_media_block_size (&fs));
printf ("rtems-rfs: format: size = %" PRIu64 "\n",
37210: e1a00004 mov r0, r4 <== NOT EXECUTED
37214: ebfffdcc bl 3694c <rtems_rfs_fs_size> <== NOT EXECUTED
37218: e1a02001 mov r2, r1 <== NOT EXECUTED
3721c: e1a01000 mov r1, r0 <== NOT EXECUTED
37220: e59f08ac ldr r0, [pc, #2220] ; 37ad4 <rtems_rfs_format+0xb9c><== NOT EXECUTED
37224: eb002dc5 bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_fs_size (&fs));
printf ("rtems-rfs: format: blocks = %zu\n",
37228: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
3722c: e59f08a4 ldr r0, [pc, #2212] ; 37ad8 <rtems_rfs_format+0xba0><== NOT EXECUTED
37230: eb002dc2 bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_fs_blocks (&fs));
printf ("rtems-rfs: format: block size = %zu\n",
37234: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
37238: e59f089c ldr r0, [pc, #2204] ; 37adc <rtems_rfs_format+0xba4><== NOT EXECUTED
3723c: eb002dbf bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_fs_block_size (&fs));
printf ("rtems-rfs: format: bits per block = %u\n",
37240: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
37244: e59f0894 ldr r0, [pc, #2196] ; 37ae0 <rtems_rfs_format+0xba8><== NOT EXECUTED
37248: e1a01181 lsl r1, r1, #3 <== NOT EXECUTED
3724c: eb002dbb bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_bits_per_block (&fs));
printf ("rtems-rfs: format: inode size = %zu\n", RTEMS_RFS_INODE_SIZE);
37250: e3a01038 mov r1, #56 ; 0x38 <== NOT EXECUTED
37254: e59f0888 ldr r0, [pc, #2184] ; 37ae4 <rtems_rfs_format+0xbac><== NOT EXECUTED
37258: eb002db8 bl 42940 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: inodes = %zu (%d.%d%%)\n",
3725c: e1a00004 mov r0, r4 <== NOT EXECUTED
37260: ebffff16 bl 36ec0 <rtems_rfs_inode_overhead> <== NOT EXECUTED
37264: e59d2040 ldr r2, [sp, #64] ; 0x40 <== NOT EXECUTED
37268: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
3726c: e3a0100a mov r1, #10 <== NOT EXECUTED
37270: e0040392 mul r4, r2, r3 <== NOT EXECUTED
37274: e1a06000 mov r6, r0 <== NOT EXECUTED
37278: eb007c65 bl 56414 <__aeabi_idiv> <== NOT EXECUTED
3727c: e3a0100a mov r1, #10 <== NOT EXECUTED
37280: e1a05000 mov r5, r0 <== NOT EXECUTED
37284: e1a00006 mov r0, r6 <== NOT EXECUTED
37288: eb007ce4 bl 56620 <__modsi3> <== NOT EXECUTED
3728c: e1a02005 mov r2, r5 <== NOT EXECUTED
37290: e1a03000 mov r3, r0 <== NOT EXECUTED
37294: e1a01004 mov r1, r4 <== NOT EXECUTED
37298: e59f0848 ldr r0, [pc, #2120] ; 37ae8 <rtems_rfs_format+0xbb0><== NOT EXECUTED
3729c: eb002da7 bl 42940 <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);
372a0: e59d1038 ldr r1, [sp, #56] ; 0x38 <== NOT EXECUTED
372a4: e59f0840 ldr r0, [pc, #2112] ; 37aec <rtems_rfs_format+0xbb4><== NOT EXECUTED
372a8: eb002da4 bl 42940 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group blocks = %zu\n", fs.group_blocks);
372ac: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
372b0: e59f0838 ldr r0, [pc, #2104] ; 37af0 <rtems_rfs_format+0xbb8><== NOT EXECUTED
372b4: eb002da1 bl 42940 <printf> <== NOT EXECUTED
printf ("rtems-rfs: format: group inodes = %zu\n", fs.group_inodes);
372b8: e59f0834 ldr r0, [pc, #2100] ; 37af4 <rtems_rfs_format+0xbbc><== NOT EXECUTED
372bc: e59d1040 ldr r1, [sp, #64] ; 0x40 <== NOT EXECUTED
372c0: eb002d9e bl 42940 <printf> <== NOT EXECUTED
}
rc = rtems_rfs_buffer_setblksize (&fs, rtems_rfs_fs_block_size (&fs));
372c4: e28d6018 add r6, sp, #24 <== NOT EXECUTED
372c8: e1a00006 mov r0, r6 <== NOT EXECUTED
372cc: e59d1020 ldr r1, [sp, #32] <== NOT EXECUTED
372d0: ebfff716 bl 34f30 <rtems_rfs_buffer_setblksize> <== NOT EXECUTED
if (rc > 0)
372d4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
372d8: da000004 ble 372f0 <rtems_rfs_format+0x3b8> <== NOT EXECUTED
{
printf ("rtems-rfs: format: setting block size failed: %d: %s\n",
372dc: eb0035bb bl 449d0 <strerror> <== NOT EXECUTED
372e0: e1a01004 mov r1, r4 <== NOT EXECUTED
372e4: e1a02000 mov r2, r0 <== NOT EXECUTED
372e8: e59f0808 ldr r0, [pc, #2056] ; 37af8 <rtems_rfs_format+0xbc0><== NOT EXECUTED
372ec: ea0001ea b 37a9c <rtems_rfs_format+0xb64> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
372f0: e3a04000 mov r4, #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);
372f4: e28d80d8 add r8, sp, #216 ; 0xd8 <== NOT EXECUTED
372f8: e1a00006 mov r0, r6 <== NOT EXECUTED
372fc: e1a01008 mov r1, r8 <== NOT EXECUTED
37300: e1a02004 mov r2, r4 <== NOT EXECUTED
37304: e1a03004 mov r3, r4 <== NOT EXECUTED
37308: e5cd40d8 strb r4, [sp, #216] ; 0xd8 <== NOT EXECUTED
handle->bnum = 0;
3730c: e58d40dc str r4, [sp, #220] ; 0xdc <== NOT EXECUTED
handle->buffer = NULL;
37310: e58d40e0 str r4, [sp, #224] ; 0xe0 <== NOT EXECUTED
37314: ebfff781 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
37318: e2505000 subs r5, r0, #0 <== NOT EXECUTED
3731c: da000008 ble 37344 <rtems_rfs_format+0x40c> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
37320: e1a01008 mov r1, r8 <== NOT EXECUTED
37324: e1a00006 mov r0, r6 <== NOT EXECUTED
37328: ebfffefa bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: request failed: %d: %s\n",
3732c: e1a00005 mov r0, r5 <== NOT EXECUTED
37330: eb0035a6 bl 449d0 <strerror> <== NOT EXECUTED
37334: e1a01005 mov r1, r5 <== NOT EXECUTED
37338: e1a02000 mov r2, r0 <== NOT EXECUTED
3733c: e59f07b8 ldr r0, [pc, #1976] ; 37afc <rtems_rfs_format+0xbc4><== NOT EXECUTED
37340: ea00006d b 374fc <rtems_rfs_format+0x5c4> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
sb = rtems_rfs_buffer_data (&handle);
37344: e59d30e0 ldr r3, [sp, #224] ; 0xe0 <== NOT EXECUTED
37348: e593a020 ldr sl, [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));
3734c: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
37350: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
37354: e1a0000a mov r0, sl <== NOT EXECUTED
37358: eb002951 bl 418a4 <memset> <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_MAGIC, RTEMS_RFS_SB_MAGIC);
3735c: e3a03028 mov r3, #40 ; 0x28 <== NOT EXECUTED
37360: e5ca3000 strb r3, [sl] <== NOT EXECUTED
37364: e3a03009 mov r3, #9 <== NOT EXECUTED
37368: e5ca3001 strb r3, [sl, #1] <== NOT EXECUTED
3736c: e3a05001 mov r5, #1 <== NOT EXECUTED
37370: e2833017 add r3, r3, #23 <== NOT EXECUTED
37374: e5ca3002 strb r3, [sl, #2] <== NOT EXECUTED
37378: e5ca5003 strb r5, [sl, #3] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_VERSION, RTEMS_RFS_VERSION);
3737c: e5ca4004 strb r4, [sl, #4] <== NOT EXECUTED
37380: e5ca4005 strb r4, [sl, #5] <== NOT EXECUTED
37384: e5ca4006 strb r4, [sl, #6] <== NOT EXECUTED
37388: e5ca4007 strb r4, [sl, #7] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BLOCKS, rtems_rfs_fs_blocks (fs));
3738c: e5dd301f ldrb r3, [sp, #31] <== NOT EXECUTED
37390: e5ca300c strb r3, [sl, #12] <== NOT EXECUTED
37394: e1dd31be ldrh r3, [sp, #30] <== NOT EXECUTED
37398: e5ca300d strb r3, [sl, #13] <== NOT EXECUTED
3739c: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
373a0: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
373a4: e5ca300e strb r3, [sl, #14] <== NOT EXECUTED
373a8: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
373ac: e5ca300f strb r3, [sl, #15] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE, rtems_rfs_fs_block_size (fs));
373b0: e5dd3023 ldrb r3, [sp, #35] ; 0x23 <== NOT EXECUTED
373b4: e5ca3008 strb r3, [sl, #8] <== NOT EXECUTED
373b8: e1dd32b2 ldrh r3, [sp, #34] ; 0x22 <== NOT EXECUTED
373bc: e5ca3009 strb r3, [sl, #9] <== NOT EXECUTED
373c0: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
373c4: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
373c8: e5ca300a strb r3, [sl, #10] <== NOT EXECUTED
373cc: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED
373d0: e5ca300b strb r3, [sl, #11] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_BAD_BLOCKS, fs->bad_blocks);
373d4: e5dd302f ldrb r3, [sp, #47] ; 0x2f <== NOT EXECUTED
373d8: e5ca3010 strb r3, [sl, #16] <== NOT EXECUTED
373dc: e1dd32be ldrh r3, [sp, #46] ; 0x2e <== NOT EXECUTED
373e0: e5ca3011 strb r3, [sl, #17] <== NOT EXECUTED
373e4: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
373e8: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
373ec: e5ca3012 strb r3, [sl, #18] <== NOT EXECUTED
373f0: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
373f4: e5ca3013 strb r3, [sl, #19] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH, fs->max_name_length);
373f8: e5dd3033 ldrb r3, [sp, #51] ; 0x33 <== NOT EXECUTED
373fc: e5ca3014 strb r3, [sl, #20] <== NOT EXECUTED
37400: e1dd33b2 ldrh r3, [sp, #50] ; 0x32 <== NOT EXECUTED
37404: e5ca3015 strb r3, [sl, #21] <== NOT EXECUTED
37408: e59d3030 ldr r3, [sp, #48] ; 0x30 <== NOT EXECUTED
3740c: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
37410: e5ca3016 strb r3, [sl, #22] <== NOT EXECUTED
37414: e59d3030 ldr r3, [sp, #48] ; 0x30 <== NOT EXECUTED
37418: e5ca3017 strb r3, [sl, #23] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUPS, fs->group_count);
3741c: e5dd303b ldrb r3, [sp, #59] ; 0x3b <== NOT EXECUTED
37420: e5ca3018 strb r3, [sl, #24] <== NOT EXECUTED
37424: e1dd33ba ldrh r3, [sp, #58] ; 0x3a <== NOT EXECUTED
37428: e5ca3019 strb r3, [sl, #25] <== NOT EXECUTED
3742c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
37430: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
37434: e5ca301a strb r3, [sl, #26] <== NOT EXECUTED
37438: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
3743c: e5ca301b strb r3, [sl, #27] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS, fs->group_blocks);
37440: e5dd303f ldrb r3, [sp, #63] ; 0x3f <== NOT EXECUTED
37444: e5ca301c strb r3, [sl, #28] <== NOT EXECUTED
37448: e1dd33be ldrh r3, [sp, #62] ; 0x3e <== NOT EXECUTED
3744c: e5ca301d strb r3, [sl, #29] <== NOT EXECUTED
37450: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
37454: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
37458: e5ca301e strb r3, [sl, #30] <== NOT EXECUTED
3745c: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
37460: e5ca301f strb r3, [sl, #31] <== NOT EXECUTED
write_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES, fs->group_inodes);
37464: e5dd3043 ldrb r3, [sp, #67] ; 0x43 <== NOT EXECUTED
37468: e5ca3020 strb r3, [sl, #32] <== NOT EXECUTED
3746c: e1dd34b2 ldrh r3, [sp, #66] ; 0x42 <== NOT EXECUTED
37470: e5ca3021 strb r3, [sl, #33] ; 0x21 <== NOT EXECUTED
37474: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
37478: e1a03423 lsr r3, r3, #8 <== NOT EXECUTED
3747c: e5ca3022 strb r3, [sl, #34] ; 0x22 <== NOT EXECUTED
37480: e59d3040 ldr r3, [sp, #64] ; 0x40 <== 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);
37484: e1a00006 mov r0, r6 <== 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);
37488: e5ca3023 strb r3, [sl, #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);
3748c: e1a01008 mov r1, r8 <== 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);
37490: e3a03038 mov r3, #56 ; 0x38 <== NOT EXECUTED
37494: e5ca4024 strb r4, [sl, #36] ; 0x24 <== NOT EXECUTED
37498: e5ca4025 strb r4, [sl, #37] ; 0x25 <== NOT EXECUTED
3749c: e5ca4026 strb r4, [sl, #38] ; 0x26 <== NOT EXECUTED
374a0: e5ca3027 strb r3, [sl, #39] ; 0x27 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
374a4: e5cd50d8 strb r5, [sp, #216] ; 0xd8 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (fs, &handle);
374a8: ebfff6d3 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
if (rc > 0)
374ac: e250a000 subs sl, r0, #0 <== NOT EXECUTED
374b0: da000008 ble 374d8 <rtems_rfs_format+0x5a0> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
374b4: e1a01008 mov r1, r8 <== NOT EXECUTED
374b8: e1a00006 mov r0, r6 <== NOT EXECUTED
374bc: ebfffe95 bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("rtems-rfs: write-superblock: buffer release failed: %d: %s\n",
374c0: e1a0000a mov r0, sl <== NOT EXECUTED
374c4: eb003541 bl 449d0 <strerror> <== NOT EXECUTED
374c8: e1a0100a mov r1, sl <== NOT EXECUTED
374cc: e1a02000 mov r2, r0 <== NOT EXECUTED
374d0: e59f0628 ldr r0, [pc, #1576] ; 37b00 <rtems_rfs_format+0xbc8><== NOT EXECUTED
374d4: ea000008 b 374fc <rtems_rfs_format+0x5c4> <== NOT EXECUTED
rc, strerror (rc));
return false;
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
374d8: e1a00006 mov r0, r6 <== NOT EXECUTED
374dc: e1a01008 mov r1, r8 <== NOT EXECUTED
374e0: ebfffe8c bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
if (rc > 0)
374e4: e250a000 subs sl, r0, #0 <== NOT EXECUTED
374e8: da0000e2 ble 37878 <rtems_rfs_format+0x940> <== NOT EXECUTED
{
printf ("rtems-rfs: write-superblock: buffer handle close failed: %d: %s\n",
374ec: eb003537 bl 449d0 <strerror> <== NOT EXECUTED
374f0: e1a02000 mov r2, r0 <== NOT EXECUTED
374f4: e59f0608 ldr r0, [pc, #1544] ; 37b04 <rtems_rfs_format+0xbcc><== NOT EXECUTED
374f8: e1a0100a mov r1, sl <== NOT EXECUTED
374fc: eb002d0f bl 42940 <printf> <== NOT EXECUTED
return -1;
}
if (!rtems_rfs_write_superblock (&fs))
{
printf ("rtems-rfs: format: superblock write failed\n");
37500: e59f0600 ldr r0, [pc, #1536] ; 37b08 <rtems_rfs_format+0xbd0><== NOT EXECUTED
37504: eb002db2 bl 42bd4 <puts> <== NOT EXECUTED
37508: ea000164 b 37aa0 <rtems_rfs_format+0xb68> <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
3750c: e59da03c ldr sl, [sp, #60] ; 0x3c <== NOT EXECUTED
37510: e002049a mul r2, sl, r4 <== NOT EXECUTED
if (group_base > rtems_rfs_fs_blocks (fs))
37514: e59d301c ldr r3, [sp, #28] <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
37518: e2827001 add r7, r2, #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))
3751c: e5d9c014 ldrb ip, [r9, #20] <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
37520: e1570003 cmp r7, r3 <== NOT EXECUTED
size_t group_size;
int blocks;
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
37524: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
return -1;
}
for (group = 0; group < fs.group_count; group++)
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
37528: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
int b;
int rc;
group_base = rtems_rfs_fs_block (fs, group, 0);
if (group_base > rtems_rfs_fs_blocks (fs))
3752c: 9a000003 bls 37540 <rtems_rfs_format+0x608> <== NOT EXECUTED
{
printf ("rtems-rfs: write-group: group %d base beyond disk limit\n",
37530: e59f05d4 ldr r0, [pc, #1492] ; 37b0c <rtems_rfs_format+0xbd4><== NOT EXECUTED
37534: e1a01004 mov r1, r4 <== NOT EXECUTED
37538: eb002d00 bl 42940 <printf> <== NOT EXECUTED
3753c: ea000157 b 37aa0 <rtems_rfs_format+0xb68> <== 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))
37540: e087200a add r2, r7, sl <== NOT EXECUTED
group_size = rtems_rfs_fs_blocks (fs) - group_base;
if (verbose)
37544: e59d0004 ldr r0, [sp, #4] <== 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))
37548: e1520003 cmp r2, r3 <== NOT EXECUTED
group_size = rtems_rfs_fs_blocks (fs) - group_base;
3754c: 8067a003 rsbhi sl, r7, r3 <== NOT EXECUTED
if (verbose)
37550: e3500000 cmp r0, #0 <== NOT EXECUTED
printf ("\rrtems-rfs: format: group %3d: base = %" PRId32 ", size = %zd",
37554: 159f05b4 ldrne r0, [pc, #1460] ; 37b10 <rtems_rfs_format+0xbd8><== NOT EXECUTED
37558: 11a01004 movne r1, r4 <== NOT EXECUTED
3755c: 11a02007 movne r2, r7 <== NOT EXECUTED
37560: 11a0300a movne r3, sl <== NOT EXECUTED
37564: 1b002cf5 blne 42940 <printf> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: handle open failed: %d: %s\n",
rc, strerror (rc));
return false;
}
if (verbose)
37568: e59d2004 ldr r2, [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;
handle->bnum = 0;
3756c: e3a0c000 mov ip, #0 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
37570: e3a03000 mov r3, #0 <== NOT EXECUTED
37574: e3520000 cmp r2, #0 <== NOT EXECUTED
37578: e5cd30d8 strb r3, [sp, #216] ; 0xd8 <== NOT EXECUTED
handle->bnum = 0;
3757c: e58dc0dc str ip, [sp, #220] ; 0xdc <== NOT EXECUTED
handle->buffer = NULL;
37580: e58dc0e0 str ip, [sp, #224] ; 0xe0 <== NOT EXECUTED
printf (", blocks");
37584: 159f0588 ldrne r0, [pc, #1416] ; 37b14 <rtems_rfs_format+0xbdc><== NOT EXECUTED
37588: 1b002cec blne 42940 <printf> <== NOT EXECUTED
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
3758c: e1a00005 mov r0, r5 <== NOT EXECUTED
37590: e1a01006 mov r1, r6 <== NOT EXECUTED
37594: e1a02008 mov r2, r8 <== NOT EXECUTED
37598: e1a0300a mov r3, sl <== NOT EXECUTED
3759c: e58d7000 str r7, [sp] <== NOT EXECUTED
375a0: eb00186f bl 3d764 <rtems_rfs_bitmap_open> <== NOT EXECUTED
group_base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
375a4: e250b000 subs fp, r0, #0 <== NOT EXECUTED
375a8: da000009 ble 375d4 <rtems_rfs_format+0x69c> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
375ac: e1a01008 mov r1, r8 <== NOT EXECUTED
375b0: e1a00006 mov r0, r6 <== NOT EXECUTED
375b4: ebfffe57 bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open block bitmap failed: %d: %s\n",
375b8: e1a0000b mov r0, fp <== NOT EXECUTED
375bc: eb003503 bl 449d0 <strerror> <== NOT EXECUTED
375c0: e1a01004 mov r1, r4 <== NOT EXECUTED
375c4: e1a03000 mov r3, r0 <== NOT EXECUTED
375c8: e1a0200b mov r2, fp <== NOT EXECUTED
375cc: e59f0544 ldr r0, [pc, #1348] ; 37b18 <rtems_rfs_format+0xbe0><== NOT EXECUTED
375d0: ea000013 b 37624 <rtems_rfs_format+0x6ec> <== 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));
375d4: e59d30e0 ldr r3, [sp, #224] ; 0xe0 <== NOT EXECUTED
375d8: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
375dc: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
375e0: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
375e4: eb0028ae bl 418a4 <memset> <== NOT EXECUTED
/*
* Clear the bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
375e8: e1a00005 mov r0, r5 <== NOT EXECUTED
375ec: eb00186e bl 3d7ac <rtems_rfs_bitmap_map_clear_all> <== NOT EXECUTED
if (rc > 0)
375f0: e250b000 subs fp, r0, #0 <== NOT EXECUTED
375f4: da00000c ble 3762c <rtems_rfs_format+0x6f4> <== NOT EXECUTED
{
rtems_rfs_bitmap_close (&bitmap);
375f8: e1a00005 mov r0, r5 <== NOT EXECUTED
375fc: eb001816 bl 3d65c <rtems_rfs_bitmap_close> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
37600: e1a01008 mov r1, r8 <== NOT EXECUTED
37604: e1a00006 mov r0, r6 <== NOT EXECUTED
37608: ebfffe42 bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block bitmap clear all failed: %d: %s\n",
3760c: e1a0000b mov r0, fp <== NOT EXECUTED
37610: eb0034ee bl 449d0 <strerror> <== NOT EXECUTED
37614: e1a03000 mov r3, r0 <== NOT EXECUTED
37618: e59f04fc ldr r0, [pc, #1276] ; 37b1c <rtems_rfs_format+0xbe4><== NOT EXECUTED
3761c: e1a01004 mov r1, r4 <== NOT EXECUTED
37620: e1a0200b mov r2, fp <== NOT EXECUTED
37624: eb002cc5 bl 42940 <printf> <== NOT EXECUTED
37628: ea00011c b 37aa0 <rtems_rfs_format+0xb68> <== NOT EXECUTED
}
/*
* Forced allocation of the block bitmap.
*/
rtems_rfs_bitmap_map_set (&bitmap, RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
3762c: e3a01000 mov r1, #0 <== NOT EXECUTED
37630: e1a00005 mov r0, r5 <== NOT EXECUTED
37634: eb0018da bl 3d9a4 <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);
37638: e3a01001 mov r1, #1 <== NOT EXECUTED
3763c: e1a00005 mov r0, r5 <== NOT EXECUTED
37640: eb0018d7 bl 3d9a4 <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);
37644: e59d0040 ldr r0, [sp, #64] ; 0x40 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
37648: 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);
3764c: e59d1044 ldr r1, [sp, #68] ; 0x44 <== NOT EXECUTED
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
return 1;
return ((dividend - 1) / divisor) + 1;
37650: 12400001 subne r0, r0, #1 <== NOT EXECUTED
37654: 1b007b2a blne 56304 <__aeabi_uidiv> <== NOT EXECUTED
37658: e2800001 add r0, r0, #1 <== NOT EXECUTED
3765c: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
37660: e3a0b000 mov fp, #0 <== NOT EXECUTED
37664: ea000001 b 37670 <rtems_rfs_format+0x738> <== 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);
37668: eb0018cd bl 3d9a4 <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++)
3766c: e28bb001 add fp, fp, #1 <== NOT EXECUTED
37670: e59d2008 ldr r2, [sp, #8] <== NOT EXECUTED
37674: e15b0002 cmp fp, r2 <== NOT EXECUTED
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
37678: e28b1002 add r1, fp, #2 <== NOT EXECUTED
3767c: e1a00005 mov r0, r5 <== 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++)
37680: bafffff8 blt 37668 <rtems_rfs_format+0x730> <== NOT EXECUTED
rtems_rfs_bitmap_map_set (&bitmap, b + RTEMS_RFS_GROUP_INODE_BLOCK);
/*
* Close the block bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
37684: eb0017f4 bl 3d65c <rtems_rfs_bitmap_close> <== NOT EXECUTED
if (rc > 0)
37688: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3768c: da000009 ble 376b8 <rtems_rfs_format+0x780> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
37690: e28d10d8 add r1, sp, #216 ; 0xd8 <== NOT EXECUTED
37694: e28d0018 add r0, sp, #24 <== NOT EXECUTED
37698: ebfffe1e bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close block bitmap failed: %d: %s\n",
3769c: e1a0000b mov r0, fp <== NOT EXECUTED
376a0: eb0034ca bl 449d0 <strerror> <== NOT EXECUTED
376a4: e1a01004 mov r1, r4 <== NOT EXECUTED
376a8: e1a03000 mov r3, r0 <== NOT EXECUTED
376ac: e1a0200b mov r2, fp <== NOT EXECUTED
376b0: e59f0468 ldr r0, [pc, #1128] ; 37b20 <rtems_rfs_format+0xbe8><== NOT EXECUTED
376b4: eaffffda b 37624 <rtems_rfs_format+0x6ec> <== NOT EXECUTED
return false;
}
rtems_rfs_buffer_mark_dirty (&handle);
if (verbose)
376b8: e59d3004 ldr r3, [sp, #4] <== 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);
376bc: e3a0c001 mov ip, #1 <== NOT EXECUTED
if (verbose)
376c0: e3530000 cmp r3, #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);
376c4: e5cdc0d8 strb ip, [sp, #216] ; 0xd8 <== NOT EXECUTED
if (verbose)
printf (", inodes");
376c8: 159f0454 ldrne r0, [pc, #1108] ; 37b24 <rtems_rfs_format+0xbec><== NOT EXECUTED
376cc: 1b002c9b blne 42940 <printf> <== NOT EXECUTED
/*
* Open the inode bitmap using the old buffer. Should release any changes.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
376d0: e1a0300a mov r3, sl <== NOT EXECUTED
376d4: e2877001 add r7, r7, #1 <== NOT EXECUTED
376d8: e1a00005 mov r0, r5 <== NOT EXECUTED
376dc: e1a01006 mov r1, r6 <== NOT EXECUTED
376e0: e1a02008 mov r2, r8 <== NOT EXECUTED
376e4: e58d7000 str r7, [sp] <== NOT EXECUTED
376e8: eb00181d bl 3d764 <rtems_rfs_bitmap_open> <== NOT EXECUTED
group_base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
376ec: e250a000 subs sl, r0, #0 <== NOT EXECUTED
376f0: da000009 ble 3771c <rtems_rfs_format+0x7e4> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
376f4: e1a01008 mov r1, r8 <== NOT EXECUTED
376f8: e1a00006 mov r0, r6 <== NOT EXECUTED
376fc: ebfffe05 bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: open inode bitmap failed: %d: %s\n",
37700: e1a0000a mov r0, sl <== NOT EXECUTED
37704: eb0034b1 bl 449d0 <strerror> <== NOT EXECUTED
37708: e1a01004 mov r1, r4 <== NOT EXECUTED
3770c: e1a03000 mov r3, r0 <== NOT EXECUTED
37710: e1a0200a mov r2, sl <== NOT EXECUTED
37714: e59f040c ldr r0, [pc, #1036] ; 37b28 <rtems_rfs_format+0xbf0><== NOT EXECUTED
37718: eaffffc1 b 37624 <rtems_rfs_format+0x6ec> <== 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));
3771c: e59d30e0 ldr r3, [sp, #224] ; 0xe0 <== NOT EXECUTED
37720: e3a01000 mov r1, #0 <== NOT EXECUTED
37724: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
37728: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
3772c: eb00285c bl 418a4 <memset> <== NOT EXECUTED
/*
* Clear the inode bitmap.
*/
rc = rtems_rfs_bitmap_map_clear_all (&bitmap);
37730: e1a00005 mov r0, r5 <== NOT EXECUTED
37734: eb00181c bl 3d7ac <rtems_rfs_bitmap_map_clear_all> <== NOT EXECUTED
if (rc > 0)
37738: e250a000 subs sl, r0, #0 <== NOT EXECUTED
3773c: da00000b ble 37770 <rtems_rfs_format+0x838> <== NOT EXECUTED
{
rtems_rfs_bitmap_close (&bitmap);
37740: e1a00005 mov r0, r5 <== NOT EXECUTED
37744: eb0017c4 bl 3d65c <rtems_rfs_bitmap_close> <== NOT EXECUTED
rtems_rfs_buffer_handle_close (fs, &handle);
37748: e1a01008 mov r1, r8 <== NOT EXECUTED
3774c: e1a00006 mov r0, r6 <== NOT EXECUTED
37750: ebfffdf0 bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: inode bitmap" \
37754: e1a0000a mov r0, sl <== NOT EXECUTED
37758: eb00349c bl 449d0 <strerror> <== NOT EXECUTED
3775c: e1a01004 mov r1, r4 <== NOT EXECUTED
37760: e1a03000 mov r3, r0 <== NOT EXECUTED
37764: e1a0200a mov r2, sl <== NOT EXECUTED
37768: e59f03bc ldr r0, [pc, #956] ; 37b2c <rtems_rfs_format+0xbf4><== NOT EXECUTED
3776c: eaffffac b 37624 <rtems_rfs_format+0x6ec> <== NOT EXECUTED
}
/*
* Close the inode bitmap.
*/
rc = rtems_rfs_bitmap_close (&bitmap);
37770: e1a00005 mov r0, r5 <== NOT EXECUTED
37774: eb0017b8 bl 3d65c <rtems_rfs_bitmap_close> <== NOT EXECUTED
if (rc > 0)
37778: e250a000 subs sl, r0, #0 <== NOT EXECUTED
3777c: da000009 ble 377a8 <rtems_rfs_format+0x870> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
37780: e1a01008 mov r1, r8 <== NOT EXECUTED
37784: e1a00006 mov r0, r6 <== NOT EXECUTED
37788: ebfffde2 bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: close inode" \
3778c: e1a0000a mov r0, sl <== NOT EXECUTED
37790: eb00348e bl 449d0 <strerror> <== NOT EXECUTED
37794: e1a01004 mov r1, r4 <== NOT EXECUTED
37798: e1a03000 mov r3, r0 <== NOT EXECUTED
3779c: e1a0200a mov r2, sl <== NOT EXECUTED
377a0: e59f0388 ldr r0, [pc, #904] ; 37b30 <rtems_rfs_format+0xbf8><== NOT EXECUTED
377a4: eaffff9e b 37624 <rtems_rfs_format+0x6ec> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
377a8: e59d0014 ldr r0, [sp, #20] <== NOT EXECUTED
377ac: e3500000 cmp r0, #0 <== NOT EXECUTED
377b0: 159d3010 ldrne r3, [sp, #16] <== 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);
377b4: e3a02001 mov r2, #1 <== NOT EXECUTED
377b8: e5cd20d8 strb r2, [sp, #216] ; 0xd8 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
377bc: 1283a003 addne sl, r3, #3 <== NOT EXECUTED
377c0: 13a07000 movne r7, #0 <== NOT EXECUTED
377c4: 1a00001a bne 37834 <rtems_rfs_format+0x8fc> <== NOT EXECUTED
377c8: ea000020 b 37850 <rtems_rfs_format+0x918> <== NOT EXECUTED
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
377cc: ebfff653 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
377d0: e3500000 cmp r0, #0 <== NOT EXECUTED
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
377d4: e28ab001 add fp, sl, #1 <== NOT EXECUTED
group_base + b + RTEMS_RFS_GROUP_INODE_BLOCK,
false);
if (rc > 0)
377d8: da00000c ble 37810 <rtems_rfs_format+0x8d8> <== NOT EXECUTED
377dc: e1a0b000 mov fp, r0 <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
377e0: e1a01008 mov r1, r8 <== NOT EXECUTED
377e4: e1a00006 mov r0, r6 <== NOT EXECUTED
377e8: ebfffdca bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
printf ("\nrtems-rfs: write-group: group %3d: block %" PRId32 " request failed: %d: %s\n",
377ec: e1a0000b mov r0, fp <== NOT EXECUTED
377f0: eb003476 bl 449d0 <strerror> <== NOT EXECUTED
377f4: e1a01004 mov r1, r4 <== NOT EXECUTED
377f8: e58d0000 str r0, [sp] <== NOT EXECUTED
377fc: e1a0200a mov r2, sl <== NOT EXECUTED
37800: e1a0300b mov r3, fp <== NOT EXECUTED
37804: e59f0328 ldr r0, [pc, #808] ; 37b34 <rtems_rfs_format+0xbfc><== NOT EXECUTED
37808: eb002c4c bl 42940 <printf> <== NOT EXECUTED
3780c: ea0000a3 b 37aa0 <rtems_rfs_format+0xb68> <== 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));
37810: e59d30e0 ldr r3, [sp, #224] ; 0xe0 <== NOT EXECUTED
37814: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
37818: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
3781c: e59d2020 ldr r2, [sp, #32] <== NOT EXECUTED
37820: eb00281f bl 418a4 <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
37824: e3a0c001 mov ip, #1 <== NOT EXECUTED
37828: e5cdc0d8 strb ip, [sp, #216] ; 0xd8 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
3782c: e2877001 add r7, r7, #1 <== NOT EXECUTED
37830: e1a0a00b mov sl, fp <== NOT EXECUTED
37834: e59dc008 ldr ip, [sp, #8] <== NOT EXECUTED
37838: e157000c cmp r7, ip <== NOT EXECUTED
{
rc = rtems_rfs_buffer_handle_request (fs, &handle,
3783c: e1a0200a mov r2, sl <== NOT EXECUTED
37840: e1a01008 mov r1, r8 <== NOT EXECUTED
37844: e3a03000 mov r3, #0 <== NOT EXECUTED
37848: e1a00006 mov r0, r6 <== NOT EXECUTED
/*
* Initialise the inode tables if required to do so.
*/
if (initialise_inodes)
{
for (b = 0; b < blocks; b++)
3784c: baffffde blt 377cc <rtems_rfs_format+0x894> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle);
}
}
rc = rtems_rfs_buffer_handle_close (fs, &handle);
37850: e1a00006 mov r0, r6 <== NOT EXECUTED
37854: e1a01008 mov r1, r8 <== NOT EXECUTED
37858: ebfffdae bl 36f18 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
if (rc > 0)
3785c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
37860: da000091 ble 37aac <rtems_rfs_format+0xb74> <== NOT EXECUTED
{
printf ("\nrtems-rfs: write-group: buffer handle close failed: %d: %s\n",
37864: eb003459 bl 449d0 <strerror> <== NOT EXECUTED
37868: e1a0100a mov r1, sl <== NOT EXECUTED
3786c: e1a02000 mov r2, r0 <== NOT EXECUTED
37870: e59f02c0 ldr r0, [pc, #704] ; 37b38 <rtems_rfs_format+0xc00><== NOT EXECUTED
37874: ea000088 b 37a9c <rtems_rfs_format+0xb64> <== NOT EXECUTED
printf (", blocks");
/*
* Open the block bitmap using the new buffer.
*/
rc = rtems_rfs_bitmap_open (&bitmap, fs, &handle, group_size,
37878: e28d50c0 add r5, sp, #192 ; 0xc0 <== NOT EXECUTED
3787c: e1a09007 mov r9, r7 <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
37880: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
37884: e5d90015 ldrb r0, [r9, #21] <== NOT EXECUTED
37888: e1540003 cmp r4, r3 <== NOT EXECUTED
3788c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
37890: baffff1d blt 3750c <rtems_rfs_format+0x5d4> <== NOT EXECUTED
if (!rtems_rfs_write_group (&fs, group,
config->initialise_inodes, config->verbose))
return -1;
if (config->verbose)
37894: e3500000 cmp r0, #0 <== NOT EXECUTED
printf ("\n");
37898: 13a0000a movne r0, #10 <== NOT EXECUTED
3789c: 1b002c9c blne 42b14 <putchar> <== NOT EXECUTED
rc = rtems_rfs_buffer_close (&fs);
378a0: e28d0018 add r0, sp, #24 <== NOT EXECUTED
378a4: ebfff5b4 bl 34f7c <rtems_rfs_buffer_close> <== NOT EXECUTED
if (rc > 0)
378a8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
378ac: da000004 ble 378c4 <rtems_rfs_format+0x98c> <== NOT EXECUTED
{
printf ("rtems-rfs: format: buffer close failed: %d: %s\n",
378b0: eb003446 bl 449d0 <strerror> <== NOT EXECUTED
378b4: e1a01004 mov r1, r4 <== NOT EXECUTED
378b8: e1a02000 mov r2, r0 <== NOT EXECUTED
378bc: e59f0278 ldr r0, [pc, #632] ; 37b3c <rtems_rfs_format+0xc04><== NOT EXECUTED
378c0: ea000075 b 37a9c <rtems_rfs_format+0xb64> <== NOT EXECUTED
int rc;
/*
* External API so returns -1.
*/
rc = rtems_rfs_fs_open (name, NULL,
378c4: e3a01000 mov r1, #0 <== NOT EXECUTED
378c8: e28dc0e8 add ip, sp, #232 ; 0xe8 <== NOT EXECUTED
378cc: e59d000c ldr r0, [sp, #12] <== NOT EXECUTED
378d0: e3a02006 mov r2, #6 <== NOT EXECUTED
378d4: e1a03001 mov r3, r1 <== NOT EXECUTED
378d8: e58dc000 str ip, [sp] <== NOT EXECUTED
378dc: ebfffc44 bl 369f4 <rtems_rfs_fs_open> <== NOT EXECUTED
RTEMS_RFS_FS_FORCE_OPEN | RTEMS_RFS_FS_NO_LOCAL_CACHE,
0, &fs);
if (rc < 0)
378e0: e3500000 cmp r0, #0 <== NOT EXECUTED
378e4: aa000008 bge 3790c <rtems_rfs_format+0x9d4> <== NOT EXECUTED
{
printf ("rtems-rfs: format: file system open failed: %d: %s\n",
378e8: eb001ab6 bl 3e3c8 <__errno> <== NOT EXECUTED
378ec: e5904000 ldr r4, [r0] <== NOT EXECUTED
378f0: eb001ab4 bl 3e3c8 <__errno> <== NOT EXECUTED
378f4: e5900000 ldr r0, [r0] <== NOT EXECUTED
378f8: eb003434 bl 449d0 <strerror> <== NOT EXECUTED
378fc: e1a01004 mov r1, r4 <== NOT EXECUTED
37900: e1a02000 mov r2, r0 <== NOT EXECUTED
37904: e59f0234 ldr r0, [pc, #564] ; 37b40 <rtems_rfs_format+0xc08><== NOT EXECUTED
37908: ea00005a b 37a78 <rtems_rfs_format+0xb40> <== NOT EXECUTED
errno, strerror (errno));
return -1;
}
rc = rtems_rfs_inode_alloc (fs, RTEMS_RFS_ROOT_INO, &ino);
3790c: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
37910: e3a01001 mov r1, #1 <== NOT EXECUTED
37914: e28d20e4 add r2, sp, #228 ; 0xe4 <== NOT EXECUTED
37918: eb000303 bl 3852c <rtems_rfs_inode_alloc> <== NOT EXECUTED
if (rc > 0)
3791c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
37920: da000005 ble 3793c <rtems_rfs_format+0xa04> <== NOT EXECUTED
{
printf ("rtems-rfs: format: inode allocation failed: %d: %s\n",
37924: eb003429 bl 449d0 <strerror> <== NOT EXECUTED
37928: e1a01006 mov r1, r6 <== NOT EXECUTED
3792c: e1a02000 mov r2, r0 <== NOT EXECUTED
37930: e59f020c ldr r0, [pc, #524] ; 37b44 <rtems_rfs_format+0xc0c><== NOT EXECUTED
37934: eb002c01 bl 42940 <printf> <== NOT EXECUTED
37938: ea000019 b 379a4 <rtems_rfs_format+0xa6c> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_fs_close (fs);
return rc;
}
if (ino != RTEMS_RFS_ROOT_INO)
3793c: e59d40e4 ldr r4, [sp, #228] ; 0xe4 <== NOT EXECUTED
37940: e3540001 cmp r4, #1 <== NOT EXECUTED
37944: 0a000005 beq 37960 <rtems_rfs_format+0xa28> <== NOT EXECUTED
{
printf ("rtems-rfs: format: allocated inode not root ino: %" PRId32 "\n", ino);
37948: e1a01004 mov r1, r4 <== NOT EXECUTED
3794c: e59f01f4 ldr r0, [pc, #500] ; 37b48 <rtems_rfs_format+0xc10><== NOT EXECUTED
37950: eb002bfa bl 42940 <printf> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
37954: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
37958: ebfffc0a bl 36988 <rtems_rfs_fs_close> <== NOT EXECUTED
3795c: ea000046 b 37a7c <rtems_rfs_format+0xb44> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
37960: e28d5098 add r5, sp, #152 ; 0x98 <== NOT EXECUTED
37964: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
37968: e1a01004 mov r1, r4 <== NOT EXECUTED
3796c: e1a02005 mov r2, r5 <== NOT EXECUTED
37970: e1a03004 mov r3, r4 <== NOT EXECUTED
37974: eb000292 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
37978: e2506000 subs r6, r0, #0 <== NOT EXECUTED
3797c: da00000b ble 379b0 <rtems_rfs_format+0xa78> <== NOT EXECUTED
{
printf ("rtems-rfs: format: inode open failed: %d: %s\n",
37980: eb003412 bl 449d0 <strerror> <== NOT EXECUTED
37984: e1a01006 mov r1, r6 <== NOT EXECUTED
37988: e1a02000 mov r2, r0 <== NOT EXECUTED
3798c: e59f01b8 ldr r0, [pc, #440] ; 37b4c <rtems_rfs_format+0xc14><== NOT EXECUTED
37990: eb002bea bl 42940 <printf> <== NOT EXECUTED
rc, strerror (rc));
rtems_rfs_group_bitmap_free (fs, true, ino);
37994: e1a01004 mov r1, r4 <== NOT EXECUTED
37998: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
3799c: e59d20e4 ldr r2, [sp, #228] ; 0xe4 <== NOT EXECUTED
379a0: eb0000c2 bl 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
rtems_rfs_fs_close (fs);
379a4: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
379a8: ebfffbf6 bl 36988 <rtems_rfs_fs_close> <== NOT EXECUTED
379ac: ea000035 b 37a88 <rtems_rfs_format+0xb50> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, 0,
379b0: e3a0c000 mov ip, #0 <== NOT EXECUTED
379b4: e1a0100c mov r1, ip <== NOT EXECUTED
379b8: e1a00005 mov r0, r5 <== NOT EXECUTED
379bc: e59f218c ldr r2, [pc, #396] ; 37b50 <rtems_rfs_format+0xc18><== NOT EXECUTED
379c0: e1a0300c mov r3, ip <== NOT EXECUTED
379c4: e58dc000 str ip, [sp] <== NOT EXECUTED
379c8: eb0001d4 bl 38120 <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)
379cc: e2504000 subs r4, r0, #0 <== NOT EXECUTED
379d0: da000004 ble 379e8 <rtems_rfs_format+0xab0> <== NOT EXECUTED
printf ("rtems-rfs: format: inode initialise failed: %d: %s\n",
379d4: eb0033fd bl 449d0 <strerror> <== NOT EXECUTED
379d8: e1a01004 mov r1, r4 <== NOT EXECUTED
379dc: e1a02000 mov r2, r0 <== NOT EXECUTED
379e0: e59f016c ldr r0, [pc, #364] ; 37b54 <rtems_rfs_format+0xc1c><== NOT EXECUTED
379e4: eb002bd5 bl 42940 <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, ino);
379e8: e59dc0e4 ldr ip, [sp, #228] ; 0xe4 <== NOT EXECUTED
379ec: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
379f0: e28d1098 add r1, sp, #152 ; 0x98 <== NOT EXECUTED
379f4: e59f215c ldr r2, [pc, #348] ; 37b58 <rtems_rfs_format+0xc20><== NOT EXECUTED
379f8: e3a03001 mov r3, #1 <== NOT EXECUTED
379fc: e58dc000 str ip, [sp] <== NOT EXECUTED
37a00: ebfff7f7 bl 359e4 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
37a04: e2504000 subs r4, r0, #0 <== NOT EXECUTED
37a08: da000004 ble 37a20 <rtems_rfs_format+0xae8> <== NOT EXECUTED
printf ("rtems-rfs: format: directory add failed: %d: %s\n",
37a0c: eb0033ef bl 449d0 <strerror> <== NOT EXECUTED
37a10: e1a01004 mov r1, r4 <== NOT EXECUTED
37a14: e1a02000 mov r2, r0 <== NOT EXECUTED
37a18: e59f013c ldr r0, [pc, #316] ; 37b5c <rtems_rfs_format+0xc24><== NOT EXECUTED
37a1c: eb002bc7 bl 42940 <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_inode_close (fs, &inode);
37a20: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
37a24: e28d1098 add r1, sp, #152 ; 0x98 <== NOT EXECUTED
37a28: eb000242 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
37a2c: e2504000 subs r4, r0, #0 <== NOT EXECUTED
37a30: da000004 ble 37a48 <rtems_rfs_format+0xb10> <== NOT EXECUTED
printf ("rtems-rfs: format: inode close failed: %d: %s\n",
37a34: eb0033e5 bl 449d0 <strerror> <== NOT EXECUTED
37a38: e1a01004 mov r1, r4 <== NOT EXECUTED
37a3c: e1a02000 mov r2, r0 <== NOT EXECUTED
37a40: e59f0118 ldr r0, [pc, #280] ; 37b60 <rtems_rfs_format+0xc28><== NOT EXECUTED
37a44: eb002bbd bl 42940 <printf> <== NOT EXECUTED
rc, strerror (rc));
rc = rtems_rfs_fs_close (fs);
37a48: e59d00e8 ldr r0, [sp, #232] ; 0xe8 <== NOT EXECUTED
37a4c: ebfffbcd bl 36988 <rtems_rfs_fs_close> <== NOT EXECUTED
if (rc < 0)
37a50: e2506000 subs r6, r0, #0 <== NOT EXECUTED
37a54: aa00000a bge 37a84 <rtems_rfs_format+0xb4c> <== NOT EXECUTED
printf ("rtems-rfs: format: file system close failed: %d: %s\n",
37a58: eb001a5a bl 3e3c8 <__errno> <== NOT EXECUTED
37a5c: e5904000 ldr r4, [r0] <== NOT EXECUTED
37a60: eb001a58 bl 3e3c8 <__errno> <== NOT EXECUTED
37a64: e5900000 ldr r0, [r0] <== NOT EXECUTED
37a68: eb0033d8 bl 449d0 <strerror> <== NOT EXECUTED
37a6c: e1a02000 mov r2, r0 <== NOT EXECUTED
37a70: e59f00ec ldr r0, [pc, #236] ; 37b64 <rtems_rfs_format+0xc2c><== NOT EXECUTED
37a74: e1a01004 mov r1, r4 <== NOT EXECUTED
37a78: eb002bb0 bl 42940 <printf> <== NOT EXECUTED
37a7c: e3a00000 mov r0, #0 <== NOT EXECUTED
37a80: ea000007 b 37aa4 <rtems_rfs_format+0xb6c> <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
rc = rtems_rfs_write_root_dir (name);
if (rc > 0)
37a84: dafffffc ble 37a7c <rtems_rfs_format+0xb44> <== NOT EXECUTED
{
printf ("rtems-rfs: format: writing root dir failed: %d: %s\n",
37a88: e1a00006 mov r0, r6 <== NOT EXECUTED
37a8c: eb0033cf bl 449d0 <strerror> <== NOT EXECUTED
37a90: e1a02000 mov r2, r0 <== NOT EXECUTED
37a94: e59f00cc ldr r0, [pc, #204] ; 37b68 <rtems_rfs_format+0xc30><== NOT EXECUTED
37a98: e1a01006 mov r1, r6 <== NOT EXECUTED
37a9c: eb002ba7 bl 42940 <printf> <== NOT EXECUTED
37aa0: e3e00000 mvn r0, #0 <== NOT EXECUTED
rc, strerror (rc));
return -1;
}
return 0;
}
37aa4: e28dd0ec add sp, sp, #236 ; 0xec <== NOT EXECUTED
37aa8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
{
printf ("rtems-rfs: format: superblock write failed\n");
return -1;
}
for (group = 0; group < fs.group_count; group++)
37aac: e2844001 add r4, r4, #1 <== NOT EXECUTED
37ab0: eaffff72 b 37880 <rtems_rfs_format+0x948> <== NOT EXECUTED
00036988 <rtems_rfs_fs_close>:
return 0;
}
int
rtems_rfs_fs_close (rtems_rfs_file_system* fs)
{
36988: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
3698c: e3a05000 mov r5, #0 <== NOT EXECUTED
36990: e1a04000 mov r4, r0 <== NOT EXECUTED
36994: e1a06005 mov r6, r5 <== 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++)
36998: ea000004 b 369b0 <rtems_rfs_fs_close+0x28> <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[group]);
3699c: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
369a0: e0811005 add r1, r1, r5 <== NOT EXECUTED
369a4: eb00053f bl 37ea8 <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++)
369a8: e2866001 add r6, r6, #1 <== NOT EXECUTED
369ac: e2855050 add r5, r5, #80 ; 0x50 <== NOT EXECUTED
369b0: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
369b4: e1560003 cmp r6, r3 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[group]);
369b8: e1a00004 mov r0, r4 <== 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++)
369bc: bafffff6 blt 3699c <rtems_rfs_fs_close+0x14> <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[group]);
rtems_rfs_buffer_close (fs);
369c0: ebfff96d bl 34f7c <rtems_rfs_buffer_close> <== NOT EXECUTED
free (fs);
369c4: e1a00004 mov r0, r4 <== NOT EXECUTED
369c8: ebff4339 bl 76b4 <free> <== NOT EXECUTED
return 0;
}
369cc: e3a00000 mov r0, #0 <== NOT EXECUTED
369d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00036968 <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);
36968: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
3696c: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
36970: e593201c ldr r2, [r3, #28] <== NOT EXECUTED
return blocks * block_size;
}
uint64_t
rtems_rfs_fs_media_size (rtems_rfs_file_system* fs)
{
36974: e92d4010 push {r4, lr} <== NOT EXECUTED
uint64_t media_blocks = (uint64_t) rtems_rfs_fs_media_blocks (fs);
36978: 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;
}
3697c: e1a01004 mov r1, r4 <== NOT EXECUTED
36980: e1a00003 mov r0, r3 <== NOT EXECUTED
36984: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000369f4 <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)
{
369f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
369f8: e24dd03c sub sp, sp, #60 ; 0x3c <== NOT EXECUTED
369fc: 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));
36a00: 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)
{
36a04: e59d4060 ldr r4, [sp, #96] ; 0x60 <== NOT EXECUTED
36a08: e1a07001 mov r7, r1 <== NOT EXECUTED
36a0c: e1a06002 mov r6, r2 <== NOT EXECUTED
36a10: 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));
36a14: ebff44cd bl 7d50 <malloc> <== NOT EXECUTED
if (!*fs)
36a18: 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));
36a1c: e5840000 str r0, [r4] <== NOT EXECUTED
if (!*fs)
36a20: 1a000002 bne 36a30 <rtems_rfs_fs_open+0x3c> <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: no memory for file system data\n");
errno = ENOMEM;
36a24: eb001e67 bl 3e3c8 <__errno> <== NOT EXECUTED
36a28: e3a0300c mov r3, #12 <== NOT EXECUTED
36a2c: ea0000fe b 36e2c <rtems_rfs_fs_open+0x438> <== NOT EXECUTED
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
36a30: e3a01000 mov r1, #0 <== NOT EXECUTED
36a34: e3a02080 mov r2, #128 ; 0x80 <== NOT EXECUTED
36a38: eb002b99 bl 418a4 <memset> <== NOT EXECUTED
(*fs)->user = user;
36a3c: e5941000 ldr r1, [r4] <== 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;
36a40: e3a05000 mov r5, #0 <== NOT EXECUTED
the_chain->last = _Chain_Head(the_chain);
36a44: 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);
36a48: e281b044 add fp, r1, #68 ; 0x44 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36a4c: 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);
36a50: e281a054 add sl, r1, #84 ; 0x54 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36a54: 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);
36a58: e281c064 add ip, r1, #100 ; 0x64 <== NOT EXECUTED
36a5c: e2812074 add r2, r1, #116 ; 0x74 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36a60: e2813070 add r3, r1, #112 ; 0x70 <== NOT EXECUTED
36a64: 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;
36a68: e5816000 str r6, [r1] <== NOT EXECUTED
return -1;
}
memset (*fs, 0, sizeof (rtems_rfs_file_system));
(*fs)->user = user;
36a6c: 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);
36a70: e581b040 str fp, [r1, #64] ; 0x40 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36a74: 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);
36a78: e581a050 str sl, [r1, #80] ; 0x50 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36a7c: 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);
36a80: e581c060 str ip, [r1, #96] ; 0x60 <== NOT EXECUTED
36a84: e5812070 str r2, [r1, #112] ; 0x70 <== NOT EXECUTED
the_chain->permanent_null = NULL;
the_chain->last = _Chain_Head(the_chain);
36a88: 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;
36a8c: 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;
36a90: e5815044 str r5, [r1, #68] ; 0x44 <== NOT EXECUTED
36a94: e5815054 str r5, [r1, #84] ; 0x54 <== NOT EXECUTED
36a98: e5815064 str r5, [r1, #100] ; 0x64 <== NOT EXECUTED
36a9c: e5815074 str r5, [r1, #116] ; 0x74 <== NOT EXECUTED
(*fs)->buffers_count = 0;
36aa0: e581504c str r5, [r1, #76] ; 0x4c <== NOT EXECUTED
(*fs)->release_count = 0;
36aa4: e581505c str r5, [r1, #92] ; 0x5c <== NOT EXECUTED
(*fs)->release_modified_count = 0;
36aa8: e581506c str r5, [r1, #108] ; 0x6c <== NOT EXECUTED
group_base = 0;
/*
* Open the buffer interface.
*/
rc = rtems_rfs_buffer_open (name, *fs);
36aac: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
36ab0: ebfff93b bl 34fa4 <rtems_rfs_buffer_open> <== NOT EXECUTED
if (rc > 0)
36ab4: e2506000 subs r6, r0, #0 <== NOT EXECUTED
36ab8: da000005 ble 36ad4 <rtems_rfs_fs_open+0xe0> <== NOT EXECUTED
{
free (*fs);
36abc: e5940000 ldr r0, [r4] <== NOT EXECUTED
36ac0: ebff42fb bl 76b4 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: buffer open failed: %d: %s\n",
rc, strerror (rc));
errno = rc;
36ac4: eb001e3f bl 3e3c8 <__errno> <== NOT EXECUTED
36ac8: e5806000 str r6, [r0] <== NOT EXECUTED
36acc: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
36ad0: ea0000e6 b 36e70 <rtems_rfs_fs_open+0x47c> <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
36ad4: e5946000 ldr r6, [r4] <== 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);
36ad8: e28d7030 add r7, sp, #48 ; 0x30 <== NOT EXECUTED
36adc: e1a02005 mov r2, r5 <== NOT EXECUTED
36ae0: e1a00006 mov r0, r6 <== NOT EXECUTED
36ae4: e1a01007 mov r1, r7 <== NOT EXECUTED
36ae8: 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;
36aec: e5cd5030 strb r5, [sp, #48] ; 0x30 <== NOT EXECUTED
handle->bnum = 0;
36af0: e58d5034 str r5, [sp, #52] ; 0x34 <== NOT EXECUTED
handle->buffer = NULL;
36af4: e58d5038 str r5, [sp, #56] ; 0x38 <== NOT EXECUTED
36af8: ebfff988 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
36afc: e2508000 subs r8, r0, #0 <== NOT EXECUTED
36b00: ca0000ac bgt 36db8 <rtems_rfs_fs_open+0x3c4> <== NOT EXECUTED
printf ("rtems-rfs: read-superblock: request failed%d: %s\n",
rc, strerror (rc));
return rc;
}
sb = rtems_rfs_buffer_data (&handle);
36b04: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED
36b08: 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)
36b0c: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
36b10: e5d31000 ldrb r1, [r3] <== NOT EXECUTED
36b14: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
36b18: e1821c01 orr r1, r2, r1, lsl #24 <== NOT EXECUTED
36b1c: e5d32002 ldrb r2, [r3, #2] <== NOT EXECUTED
36b20: e1811800 orr r1, r1, r0, lsl #16 <== NOT EXECUTED
36b24: e1811402 orr r1, r1, r2, lsl #8 <== NOT EXECUTED
36b28: e59f2368 ldr r2, [pc, #872] ; 36e98 <rtems_rfs_fs_open+0x4a4><== NOT EXECUTED
36b2c: e1510002 cmp r1, r2 <== NOT EXECUTED
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock, bad magic\n");
rtems_rfs_buffer_handle_close (fs, &handle);
36b30: 11a00006 movne r0, r6 <== NOT EXECUTED
36b34: 11a01007 movne r1, r7 <== NOT EXECUTED
sb = rtems_rfs_buffer_data (&handle);
#define read_sb(_o) rtems_rfs_read_u32 (sb + (_o))
if (read_sb (RTEMS_RFS_SB_OFFSET_MAGIC) != RTEMS_RFS_SB_MAGIC)
36b38: 1a00001d bne 36bb4 <rtems_rfs_fs_open+0x1c0> <== 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);
36b3c: e5d3000d ldrb r0, [r3, #13] <== NOT EXECUTED
36b40: e5d3200c ldrb r2, [r3, #12] <== NOT EXECUTED
36b44: e5d3100f ldrb r1, [r3, #15] <== NOT EXECUTED
36b48: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
36b4c: e1800c02 orr r0, r0, r2, lsl #24 <== NOT EXECUTED
36b50: e5d3200e ldrb r2, [r3, #14] <== NOT EXECUTED
36b54: e1800001 orr r0, r0, r1 <== NOT EXECUTED
36b58: e1800402 orr r0, r0, r2, lsl #8 <== NOT EXECUTED
36b5c: e5860004 str r0, [r6, #4] <== NOT EXECUTED
fs->block_size = read_sb (RTEMS_RFS_SB_OFFSET_BLOCK_SIZE);
36b60: e5d35009 ldrb r5, [r3, #9] <== NOT EXECUTED
36b64: e5d32008 ldrb r2, [r3, #8] <== NOT EXECUTED
36b68: e5d3100b ldrb r1, [r3, #11] <== NOT EXECUTED
36b6c: e1a05805 lsl r5, r5, #16 <== NOT EXECUTED
36b70: e1855c02 orr r5, r5, r2, lsl #24 <== NOT EXECUTED
36b74: e5d3200a ldrb r2, [r3, #10] <== NOT EXECUTED
36b78: e1855001 orr r5, r5, r1 <== NOT EXECUTED
36b7c: e1855402 orr r5, r5, r2, lsl #8 <== NOT EXECUTED
36b80: e5865008 str r5, [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);
36b84: e596200c ldr r2, [r6, #12] <== NOT EXECUTED
36b88: e592c01c ldr ip, [r2, #28] <== NOT EXECUTED
36b8c: e592e024 ldr lr, [r2, #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))
36b90: e0887095 umull r7, r8, r5, r0 <== 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);
36b94: e0821c9e umull r1, r2, lr, ip <== NOT EXECUTED
36b98: e1580002 cmp r8, r2 <== NOT EXECUTED
36b9c: 8a000002 bhi 36bac <rtems_rfs_fs_open+0x1b8> <== NOT EXECUTED
36ba0: 1a000006 bne 36bc0 <rtems_rfs_fs_open+0x1cc> <== NOT EXECUTED
36ba4: e1570001 cmp r7, r1 <== NOT EXECUTED
36ba8: 9a000004 bls 36bc0 <rtems_rfs_fs_open+0x1cc> <== NOT EXECUTED
if (rtems_rfs_fs_size(fs) > rtems_rfs_fs_media_size (fs))
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: read-superblock: invalid superblock block/size count\n");
rtems_rfs_buffer_handle_close (fs, &handle);
36bac: e1a00006 mov r0, r6 <== NOT EXECUTED
36bb0: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED
36bb4: ebffff86 bl 369d4 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
36bb8: e3a08005 mov r8, #5 <== NOT EXECUTED
36bbc: ea00007d b 36db8 <rtems_rfs_fs_open+0x3c4> <== 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)
36bc0: e5d31025 ldrb r1, [r3, #37] ; 0x25 <== NOT EXECUTED
36bc4: e5d32024 ldrb r2, [r3, #36] ; 0x24 <== NOT EXECUTED
36bc8: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
36bcc: e5d30027 ldrb r0, [r3, #39] ; 0x27 <== NOT EXECUTED
36bd0: e1811c02 orr r1, r1, r2, lsl #24 <== NOT EXECUTED
36bd4: e5d32026 ldrb r2, [r3, #38] ; 0x26 <== NOT EXECUTED
36bd8: e1811000 orr r1, r1, r0 <== NOT EXECUTED
36bdc: e1811402 orr r1, r1, r2, lsl #8 <== NOT EXECUTED
36be0: e3510038 cmp r1, #56 ; 0x38 <== NOT EXECUTED
36be4: 1afffff0 bne 36bac <rtems_rfs_fs_open+0x1b8> <== 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);
36be8: e5d32011 ldrb r2, [r3, #17] <== NOT EXECUTED
36bec: e5d30010 ldrb r0, [r3, #16] <== NOT EXECUTED
36bf0: e5d3c013 ldrb ip, [r3, #19] <== NOT EXECUTED
36bf4: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
36bf8: e1822c00 orr r2, r2, r0, lsl #24 <== NOT EXECUTED
36bfc: e5d30012 ldrb r0, [r3, #18] <== NOT EXECUTED
36c00: e182200c orr r2, r2, ip <== NOT EXECUTED
36c04: e1822400 orr r2, r2, r0, lsl #8 <== NOT EXECUTED
36c08: e5862014 str r2, [r6, #20] <== NOT EXECUTED
fs->max_name_length = read_sb (RTEMS_RFS_SB_OFFSET_MAX_NAME_LENGTH);
36c0c: e5d32015 ldrb r2, [r3, #21] <== NOT EXECUTED
36c10: e5d30014 ldrb r0, [r3, #20] <== NOT EXECUTED
36c14: e5d3c017 ldrb ip, [r3, #23] <== NOT EXECUTED
36c18: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
36c1c: e1822c00 orr r2, r2, r0, lsl #24 <== NOT EXECUTED
36c20: e5d30016 ldrb r0, [r3, #22] <== NOT EXECUTED
36c24: e182200c orr r2, r2, ip <== NOT EXECUTED
36c28: e1822400 orr r2, r2, r0, lsl #8 <== NOT EXECUTED
36c2c: e5862018 str r2, [r6, #24] <== NOT EXECUTED
fs->group_count = read_sb (RTEMS_RFS_SB_OFFSET_GROUPS);
36c30: e5d30019 ldrb r0, [r3, #25] <== NOT EXECUTED
36c34: e5d32018 ldrb r2, [r3, #24] <== NOT EXECUTED
36c38: e5d3c01b ldrb ip, [r3, #27] <== NOT EXECUTED
36c3c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
36c40: e1800c02 orr r0, r0, r2, lsl #24 <== NOT EXECUTED
36c44: e5d3201a ldrb r2, [r3, #26] <== NOT EXECUTED
36c48: e180000c orr r0, r0, ip <== NOT EXECUTED
36c4c: e1800402 orr r0, r0, r2, lsl #8 <== NOT EXECUTED
fs->group_blocks = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_BLOCKS);
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);
36c50: e1a02125 lsr r2, r5, #2 <== NOT EXECUTED
return EIO;
}
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);
36c54: e5860020 str r0, [r6, #32] <== 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 =
36c58: e00a0292 mul sl, r2, r2 <== 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);
36c5c: e5d3701d ldrb r7, [r3, #29] <== NOT EXECUTED
36c60: e5d3c01c ldrb ip, [r3, #28] <== NOT EXECUTED
36c64: e5d3e01f ldrb lr, [r3, #31] <== NOT EXECUTED
36c68: e1a07807 lsl r7, r7, #16 <== NOT EXECUTED
36c6c: e1877c0c orr r7, r7, ip, lsl #24 <== NOT EXECUTED
36c70: e5d3c01e ldrb ip, [r3, #30] <== NOT EXECUTED
36c74: e187700e orr r7, r7, lr <== NOT EXECUTED
36c78: e187740c orr r7, r7, ip, lsl #8 <== NOT EXECUTED
36c7c: e5867024 str r7, [r6, #36] ; 0x24 <== NOT EXECUTED
fs->group_inodes = read_sb (RTEMS_RFS_SB_OFFSET_GROUP_INODES);
36c80: e5d38021 ldrb r8, [r3, #33] ; 0x21 <== NOT EXECUTED
36c84: e5d3c020 ldrb ip, [r3, #32] <== NOT EXECUTED
36c88: e5d3e023 ldrb lr, [r3, #35] ; 0x23 <== NOT EXECUTED
36c8c: e1a08808 lsl r8, r8, #16 <== NOT EXECUTED
36c90: e1888c0c orr r8, r8, ip, lsl #24 <== NOT EXECUTED
36c94: e5d3c022 ldrb ip, [r3, #34] ; 0x22 <== NOT EXECUTED
36c98: e188300e orr r3, r8, lr <== NOT EXECUTED
36c9c: e183340c orr r3, r3, ip, lsl #8 <== NOT EXECUTED
fs->blocks_per_block =
rtems_rfs_fs_block_size (fs) / sizeof (rtems_rfs_inode_block);
fs->block_map_singly_blocks =
36ca0: e3a08005 mov r8, #5 <== NOT EXECUTED
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
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;
36ca4: e00c0390 mul ip, r0, r3 <== 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 =
36ca8: e00e0a98 mul lr, r8, sl <== 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 =
36cac: e0000298 mul r0, r8, r2 <== NOT EXECUTED
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
fs->block_map_doubly_blocks =
36cb0: e586e038 str lr, [r6, #56] ; 0x38 <== 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 =
36cb4: e5860034 str r0, [r6, #52] ; 0x34 <== NOT EXECUTED
fs->blocks_per_block * RTEMS_RFS_INODE_BLOCKS;
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;
36cb8: e586c010 str ip, [r6, #16] <== NOT EXECUTED
fs->inodes_per_block = fs->block_size / RTEMS_RFS_INODE_SIZE;
36cbc: e1a00005 mov r0, r5 <== 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);
36cc0: e5863028 str r3, [r6, #40] ; 0x28 <== NOT EXECUTED
fs->blocks_per_block =
36cc4: e5862030 str r2, [r6, #48] ; 0x30 <== 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;
36cc8: eb007d8d bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
if (fs->group_blocks >
36ccc: e1570185 cmp r7, r5, lsl #3 <== 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;
36cd0: e586002c str r0, [r6, #44] ; 0x2c <== NOT EXECUTED
36cd4: e28d5030 add r5, sp, #48 ; 0x30 <== NOT EXECUTED
if (fs->group_blocks >
36cd8: 8a000007 bhi 36cfc <rtems_rfs_fs_open+0x308> <== 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);
36cdc: e1a01005 mov r1, r5 <== NOT EXECUTED
36ce0: e1a00006 mov r0, r6 <== NOT EXECUTED
36ce4: ebffff3a bl 369d4 <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));
36ce8: e1a00006 mov r0, r6 <== NOT EXECUTED
36cec: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED
36cf0: ebfff88e bl 34f30 <rtems_rfs_buffer_setblksize> <== NOT EXECUTED
if (rc > 0)
36cf4: e2508000 subs r8, r0, #0 <== NOT EXECUTED
36cf8: da000002 ble 36d08 <rtems_rfs_fs_open+0x314> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
36cfc: e1a00006 mov r0, r6 <== NOT EXECUTED
36d00: e1a01005 mov r1, r5 <== NOT EXECUTED
36d04: ea000023 b 36d98 <rtems_rfs_fs_open+0x3a4> <== 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));
36d08: e5960020 ldr r0, [r6, #32] <== NOT EXECUTED
36d0c: e3a01050 mov r1, #80 ; 0x50 <== NOT EXECUTED
36d10: ebff40f7 bl 70f4 <calloc> <== NOT EXECUTED
if (!fs->groups)
36d14: e3500000 cmp r0, #0 <== NOT EXECUTED
36d18: 13a07000 movne r7, #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));
36d1c: e586001c str r0, [r6, #28] <== NOT EXECUTED
if (!fs->groups)
36d20: 11a05007 movne r5, r7 <== NOT EXECUTED
36d24: 1a00001e bne 36da4 <rtems_rfs_fs_open+0x3b0> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &handle);
36d28: e1a00006 mov r0, r6 <== NOT EXECUTED
36d2c: e1a01005 mov r1, r5 <== NOT EXECUTED
36d30: ebffff27 bl 369d4 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
36d34: e3a0800c mov r8, #12 <== NOT EXECUTED
36d38: ea00001e b 36db8 <rtems_rfs_fs_open+0x3c4> <== NOT EXECUTED
* close everything.
*/
for (group = 0; group < fs->group_count; group++)
{
rc = rtems_rfs_group_open (fs,
rtems_rfs_fs_block (fs, group, 0),
36d3c: e5962024 ldr r2, [r6, #36] ; 0x24 <== NOT EXECUTED
* 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++)
{
rc = rtems_rfs_group_open (fs,
36d40: e0010592 mul r1, r2, r5 <== NOT EXECUTED
36d44: e596301c ldr r3, [r6, #28] <== NOT EXECUTED
36d48: e0833007 add r3, r3, r7 <== NOT EXECUTED
36d4c: e58d3000 str r3, [sp] <== NOT EXECUTED
36d50: e2811001 add r1, r1, #1 <== NOT EXECUTED
36d54: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED
36d58: eb00046c bl 37f10 <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)
36d5c: e2508000 subs r8, r0, #0 <== NOT EXECUTED
* 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++)
{
rc = rtems_rfs_group_open (fs,
36d60: e2877050 add r7, r7, #80 ; 0x50 <== NOT EXECUTED
rtems_rfs_fs_block (fs, group, 0),
fs->group_blocks,
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
36d64: da00000d ble 36da0 <rtems_rfs_fs_open+0x3ac> <== NOT EXECUTED
36d68: e3a07000 mov r7, #0 <== NOT EXECUTED
36d6c: e1a0a007 mov sl, r7 <== NOT EXECUTED
36d70: ea000004 b 36d88 <rtems_rfs_fs_open+0x394> <== NOT EXECUTED
{
int g;
for (g = 0; g < group; g++)
rtems_rfs_group_close (fs, &fs->groups[g]);
36d74: e596101c ldr r1, [r6, #28] <== NOT EXECUTED
36d78: e0811007 add r1, r1, r7 <== NOT EXECUTED
36d7c: eb000449 bl 37ea8 <rtems_rfs_group_close> <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
36d80: e28aa001 add sl, sl, #1 <== NOT EXECUTED
36d84: e2877050 add r7, r7, #80 ; 0x50 <== NOT EXECUTED
36d88: e15a0005 cmp sl, r5 <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
36d8c: e1a00006 mov r0, r6 <== NOT EXECUTED
fs->group_inodes,
&fs->groups[group]);
if (rc > 0)
{
int g;
for (g = 0; g < group; g++)
36d90: bafffff7 blt 36d74 <rtems_rfs_fs_open+0x380> <== NOT EXECUTED
rtems_rfs_group_close (fs, &fs->groups[g]);
rtems_rfs_buffer_handle_close (fs, &handle);
36d94: e28d1030 add r1, sp, #48 ; 0x30 <== NOT EXECUTED
36d98: ebffff0d bl 369d4 <rtems_rfs_buffer_handle_close> <== NOT EXECUTED
36d9c: ea000005 b 36db8 <rtems_rfs_fs_open+0x3c4> <== 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++)
36da0: e2855001 add r5, r5, #1 <== NOT EXECUTED
36da4: e5963020 ldr r3, [r6, #32] <== NOT EXECUTED
36da8: e1550003 cmp r5, r3 <== NOT EXECUTED
{
rc = rtems_rfs_group_open (fs,
36dac: e1a00006 mov r0, r6 <== 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++)
36db0: baffffe1 blt 36d3c <rtems_rfs_fs_open+0x348> <== NOT EXECUTED
36db4: ea00002f b 36e78 <rtems_rfs_fs_open+0x484> <== NOT EXECUTED
}
rc = rtems_rfs_fs_read_superblock (*fs);
if (rc > 0)
{
rtems_rfs_buffer_close (*fs);
36db8: e5940000 ldr r0, [r4] <== NOT EXECUTED
36dbc: ebfff86e bl 34f7c <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
36dc0: e5940000 ldr r0, [r4] <== NOT EXECUTED
36dc4: ebff423a bl 76b4 <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;
36dc8: eb001d7e bl 3e3c8 <__errno> <== NOT EXECUTED
36dcc: e5808000 str r8, [r0] <== NOT EXECUTED
36dd0: eaffff3d b 36acc <rtems_rfs_fs_open+0xd8> <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
if (((*fs)->flags & RTEMS_RFS_FS_FORCE_OPEN) == 0)
36dd4: e5940000 ldr r0, [r4] <== NOT EXECUTED
36dd8: e5903000 ldr r3, [r0] <== NOT EXECUTED
36ddc: e3130004 tst r3, #4 <== NOT EXECUTED
36de0: 1a000013 bne 36e34 <rtems_rfs_fs_open+0x440> <== 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);
36de4: e59d2014 ldr r2, [sp, #20] <== NOT EXECUTED
36de8: e5d23003 ldrb r3, [r2, #3] <== NOT EXECUTED
36dec: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
36df0: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
{
mode = rtems_rfs_inode_get_mode (&inode);
if ((mode == 0xffff) || !RTEMS_RFS_S_ISDIR (mode))
36df4: e59f20a0 ldr r2, [pc, #160] ; 36e9c <rtems_rfs_fs_open+0x4a8><== NOT EXECUTED
36df8: e1530002 cmp r3, r2 <== NOT EXECUTED
36dfc: 0a000002 beq 36e0c <rtems_rfs_fs_open+0x418> <== NOT EXECUTED
36e00: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
36e04: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
36e08: 0a000009 beq 36e34 <rtems_rfs_fs_open+0x440> <== NOT EXECUTED
{
rtems_rfs_inode_close (*fs, &inode);
36e0c: e28d1008 add r1, sp, #8 <== NOT EXECUTED
36e10: eb000548 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_buffer_close (*fs);
36e14: e5940000 ldr r0, [r4] <== NOT EXECUTED
36e18: ebfff857 bl 34f7c <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
36e1c: e5940000 ldr r0, [r4] <== NOT EXECUTED
36e20: ebff4223 bl 76b4 <free> <== NOT EXECUTED
if (rtems_rfs_trace (RTEMS_RFS_TRACE_OPEN))
printf ("rtems-rfs: open: invalid root inode mode\n");
errno = EIO;
36e24: eb001d67 bl 3e3c8 <__errno> <== NOT EXECUTED
36e28: e3a03005 mov r3, #5 <== NOT EXECUTED
36e2c: e5803000 str r3, [r0] <== NOT EXECUTED
36e30: eaffff25 b 36acc <rtems_rfs_fs_open+0xd8> <== NOT EXECUTED
return -1;
}
}
rc = rtems_rfs_inode_close (*fs, &inode);
36e34: e28d1008 add r1, sp, #8 <== NOT EXECUTED
36e38: eb00053e bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
36e3c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
36e40: da000006 ble 36e60 <rtems_rfs_fs_open+0x46c> <== NOT EXECUTED
{
rtems_rfs_buffer_close (*fs);
36e44: e5940000 ldr r0, [r4] <== NOT EXECUTED
36e48: ebfff84b bl 34f7c <rtems_rfs_buffer_close> <== NOT EXECUTED
free (*fs);
36e4c: e5940000 ldr r0, [r4] <== NOT EXECUTED
36e50: ebff4217 bl 76b4 <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;
36e54: eb001d5b bl 3e3c8 <__errno> <== NOT EXECUTED
36e58: e5805000 str r5, [r0] <== NOT EXECUTED
36e5c: eaffff1a b 36acc <rtems_rfs_fs_open+0xd8> <== NOT EXECUTED
return -1;
}
errno = 0;
36e60: eb001d58 bl 3e3c8 <__errno> <== NOT EXECUTED
36e64: e3a03000 mov r3, #0 <== NOT EXECUTED
36e68: e5803000 str r3, [r0] <== NOT EXECUTED
36e6c: e1a00003 mov r0, r3 <== NOT EXECUTED
return 0;
}
36e70: e28dd03c add sp, sp, #60 ; 0x3c <== NOT EXECUTED
36e74: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rc, strerror (rc));
errno = rc;
return -1;
}
rc = rtems_rfs_inode_open (*fs, RTEMS_RFS_ROOT_INO, &inode, true);
36e78: e3a01001 mov r1, #1 <== NOT EXECUTED
36e7c: e5940000 ldr r0, [r4] <== NOT EXECUTED
36e80: e28d2008 add r2, sp, #8 <== NOT EXECUTED
36e84: e1a03001 mov r3, r1 <== NOT EXECUTED
36e88: eb00054d bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
36e8c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
36e90: daffffcf ble 36dd4 <rtems_rfs_fs_open+0x3e0> <== NOT EXECUTED
36e94: eaffffea b 36e44 <rtems_rfs_fs_open+0x450> <== NOT EXECUTED
0003694c <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)
{
3694c: e5901008 ldr r1, [r0, #8] <== NOT EXECUTED
36950: e5902004 ldr r2, [r0, #4] <== NOT EXECUTED
36954: e92d4010 push {r4, lr} <== NOT EXECUTED
36958: 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;
}
3695c: e1a01004 mov r1, r4 <== NOT EXECUTED
36960: e1a00003 mov r0, r3 <== NOT EXECUTED
36964: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00037d24 <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)
{
37d24: 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)
37d28: e21290ff ands r9, r2, #255 ; 0xff <== NOT EXECUTED
{
size = fs->group_inodes;
37d2c: 15906028 ldrne r6, [r0, #40] ; 0x28 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
37d30: 05906024 ldreq r6, [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)
{
37d34: e1a04001 mov r4, r1 <== NOT EXECUTED
int direction;
if (inode)
{
size = fs->group_inodes;
goal -= RTEMS_RFS_ROOT_INO;
37d38: 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)
{
37d3c: e24dd014 sub sp, sp, #20 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
37d40: e1a01006 mov r1, r6 <== 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)
{
37d44: e1a05000 mov r5, r0 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
37d48: 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)
{
37d4c: e58d3000 str r3, [sp] <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
37d50: eb00796b bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (goal % size);
37d54: e1a01006 mov r1, r6 <== NOT EXECUTED
goal -= RTEMS_RFS_ROOT_INO;
}
else
size = fs->group_blocks;
group_start = goal / size;
37d58: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (goal % size);
37d5c: e1a00004 mov r0, r4 <== NOT EXECUTED
37d60: eb0079fb bl 56554 <__umodsi3> <== NOT EXECUTED
37d64: e3a04001 mov 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)
bit = direction > 0 ? 0 : size - 1;
37d68: e2466001 sub r6, r6, #1 <== NOT EXECUTED
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
37d6c: e3a07000 mov r7, #0 <== NOT EXECUTED
37d70: e58d000c str r0, [sp, #12] <== 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;
37d74: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
37d78: e1a08004 mov r8, r4 <== NOT EXECUTED
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
else
bitmap = &fs->groups[group].block_bitmap;
37d7c: e3a0b050 mov fp, #80 ; 0x50 <== NOT EXECUTED
37d80: ea000001 b 37d8c <rtems_rfs_group_bitmap_alloc+0x68> <== NOT EXECUTED
}
else
size = fs->group_blocks;
group_start = goal / size;
bit = (rtems_rfs_bitmap_bit) (goal % size);
37d84: e3e04000 mvn r4, #0 <== NOT EXECUTED
37d88: e3a08000 mov r8, #0 <== 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);
37d8c: e59d6004 ldr r6, [sp, #4] <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
37d90: e3a02000 mov r2, #0 <== 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)
37d94: e3570000 cmp r7, #0 <== NOT EXECUTED
*/
while (true)
{
rtems_rfs_bitmap_control* bitmap;
int group;
bool allocated = false;
37d98: e5cd2013 strb r2, [sp, #19] <== 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);
37d9c: e0266497 mla r6, r7, r4, r6 <== NOT EXECUTED
if (offset)
37da0: 0a000003 beq 37db4 <rtems_rfs_group_bitmap_alloc+0x90> <== NOT EXECUTED
bit = direction > 0 ? 0 : size - 1;
37da4: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
37da8: e3540001 cmp r4, #1 <== NOT EXECUTED
37dac: 03a03000 moveq r3, #0 <== NOT EXECUTED
37db0: e58d300c str r3, [sp, #12] <== 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))
37db4: e3560000 cmp r6, #0 <== NOT EXECUTED
37db8: ba000002 blt 37dc8 <rtems_rfs_group_bitmap_alloc+0xa4> <== NOT EXECUTED
37dbc: e5953020 ldr r3, [r5, #32] <== NOT EXECUTED
37dc0: e1560003 cmp r6, r3 <== NOT EXECUTED
37dc4: ba000005 blt 37de0 <rtems_rfs_group_bitmap_alloc+0xbc> <== NOT EXECUTED
{
if (!updown)
37dc8: e3580000 cmp r8, #0 <== NOT EXECUTED
37dcc: 0a000032 beq 37e9c <rtems_rfs_group_bitmap_alloc+0x178> <== NOT EXECUTED
break;
direction = direction > 0 ? -1 : 1;
37dd0: e3540001 cmp r4, #1 <== NOT EXECUTED
37dd4: 13a04001 movne r4, #1 <== NOT EXECUTED
37dd8: 0affffe9 beq 37d84 <rtems_rfs_group_bitmap_alloc+0x60> <== NOT EXECUTED
37ddc: eaffffe9 b 37d88 <rtems_rfs_group_bitmap_alloc+0x64> <== NOT EXECUTED
37de0: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
updown = false;
continue;
}
if (inode)
37de4: e3590000 cmp r9, #0 <== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
37de8: 102a369b mlane sl, fp, r6, r3 <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37dec: 002a369b mlaeq sl, fp, r6, r3 <== NOT EXECUTED
updown = false;
continue;
}
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
37df0: 128aa02c addne sl, sl, #44 ; 0x2c <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37df4: 028aa008 addeq sl, sl, #8 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_alloc (bitmap, bit, &allocated, &bit);
37df8: e1a0000a mov r0, sl <== NOT EXECUTED
37dfc: e59d100c ldr r1, [sp, #12] <== NOT EXECUTED
37e00: e28d2013 add r2, sp, #19 <== NOT EXECUTED
37e04: e28d300c add r3, sp, #12 <== NOT EXECUTED
37e08: eb00178a bl 3dc38 <rtems_rfs_bitmap_map_alloc> <== NOT EXECUTED
if (rc > 0)
37e0c: e3500000 cmp r0, #0 <== NOT EXECUTED
37e10: ca000022 bgt 37ea0 <rtems_rfs_group_bitmap_alloc+0x17c> <== NOT EXECUTED
return rc;
if (rtems_rfs_fs_release_bitmaps (fs))
37e14: e5953000 ldr r3, [r5] <== NOT EXECUTED
37e18: e3130001 tst r3, #1 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
37e1c: 059a1000 ldreq r1, [sl] <== NOT EXECUTED
37e20: 01a00005 moveq r0, r5 <== NOT EXECUTED
37e24: 0bfff474 bleq 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
if (allocated)
37e28: e5dd3013 ldrb r3, [sp, #19] <== NOT EXECUTED
37e2c: e3530000 cmp r3, #0 <== NOT EXECUTED
37e30: 0a000012 beq 37e80 <rtems_rfs_group_bitmap_alloc+0x15c> <== NOT EXECUTED
{
if (inode)
37e34: e3590000 cmp r9, #0 <== NOT EXECUTED
37e38: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
37e3c: 0a000006 beq 37e5c <rtems_rfs_group_bitmap_alloc+0x138> <== NOT EXECUTED
*result = rtems_rfs_group_inode (fs, group, bit);
37e40: e5951028 ldr r1, [r5, #40] ; 0x28 <== NOT EXECUTED
37e44: e2833001 add r3, r3, #1 <== NOT EXECUTED
37e48: e0223691 mla r2, r1, r6, r3 <== NOT EXECUTED
37e4c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
37e50: e3a00000 mov r0, #0 <== NOT EXECUTED
37e54: e5832000 str r2, [r3] <== NOT EXECUTED
37e58: ea000010 b 37ea0 <rtems_rfs_group_bitmap_alloc+0x17c> <== NOT EXECUTED
else
*result = rtems_rfs_group_block (&fs->groups[group], bit);
37e5c: e3a01050 mov r1, #80 ; 0x50 <== NOT EXECUTED
37e60: e0020691 mul r2, r1, r6 <== NOT EXECUTED
37e64: e595101c ldr r1, [r5, #28] <== NOT EXECUTED
37e68: e7912002 ldr r2, [r1, r2] <== NOT EXECUTED
37e6c: e0833002 add r3, r3, r2 <== NOT EXECUTED
37e70: e59d2000 ldr r2, [sp] <== NOT EXECUTED
37e74: e1a00009 mov r0, r9 <== NOT EXECUTED
37e78: e5823000 str r3, [r2] <== NOT EXECUTED
37e7c: ea000007 b 37ea0 <rtems_rfs_group_bitmap_alloc+0x17c> <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-alloc: %s allocated: %" PRId32 "\n",
inode ? "inode" : "block", *result);
return 0;
}
if (updown)
37e80: e3580000 cmp r8, #0 <== NOT EXECUTED
37e84: 0a000002 beq 37e94 <rtems_rfs_group_bitmap_alloc+0x170> <== NOT EXECUTED
direction = direction > 0 ? -1 : 1;
37e88: e3540001 cmp r4, #1 <== NOT EXECUTED
37e8c: 03e04000 mvneq r4, #0 <== NOT EXECUTED
37e90: 13a04001 movne r4, #1 <== NOT EXECUTED
offset++;
37e94: e2877001 add r7, r7, #1 <== NOT EXECUTED
37e98: eaffffbb b 37d8c <rtems_rfs_group_bitmap_alloc+0x68> <== NOT EXECUTED
37e9c: 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;
}
37ea0: e28dd014 add sp, sp, #20 <== NOT EXECUTED
37ea4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00037cb0 <rtems_rfs_group_bitmap_free>:
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
37cb0: e92d40f0 push {r4, r5, r6, r7, lr} <== 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)
37cb4: e21150ff ands r5, r1, #255 ; 0xff <== NOT EXECUTED
{
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
37cb8: 15906028 ldrne r6, [r0, #40] ; 0x28 <== NOT EXECUTED
}
else
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
37cbc: 05906024 ldreq r6, [r0, #36] ; 0x24 <== NOT EXECUTED
37cc0: e2427001 sub r7, r2, #1 <== NOT EXECUTED
int
rtems_rfs_group_bitmap_free (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no)
{
37cc4: e1a04000 mov r4, r0 <== NOT EXECUTED
{
no -= RTEMS_RFS_SUPERBLOCK_SIZE;
size = fs->group_blocks;
}
group = no / size;
37cc8: e1a01006 mov r1, r6 <== NOT EXECUTED
37ccc: e1a00007 mov r0, r7 <== NOT EXECUTED
37cd0: eb00798b bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
37cd4: e3550000 cmp r5, #0 <== NOT EXECUTED
37cd8: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
37cdc: 13a02050 movne r2, #80 ; 0x50 <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37ce0: 03a02050 moveq r2, #80 ; 0x50 <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
37ce4: 10253092 mlane r5, r2, r0, r3 <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37ce8: 00253092 mlaeq r5, r2, r0, r3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
37cec: e1a01006 mov r1, r6 <== NOT EXECUTED
37cf0: e1a00007 mov r0, r7 <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
37cf4: 1285502c addne r5, r5, #44 ; 0x2c <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37cf8: 02855008 addeq r5, r5, #8 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_clear (bitmap, bit);
37cfc: eb007a14 bl 56554 <__umodsi3> <== NOT EXECUTED
37d00: e1a01000 mov r1, r0 <== NOT EXECUTED
37d04: e1a00005 mov r0, r5 <== NOT EXECUTED
37d08: eb001706 bl 3d928 <rtems_rfs_bitmap_map_clear> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
37d0c: 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);
37d10: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
37d14: e1a00004 mov r0, r4 <== NOT EXECUTED
37d18: ebfff4b7 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
}
37d1c: e1a00006 mov r0, r6 <== NOT EXECUTED
37d20: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00037c00 <rtems_rfs_group_bitmap_test>:
int
rtems_rfs_group_bitmap_test (rtems_rfs_file_system* fs,
bool inode,
rtems_rfs_bitmap_bit no,
bool* state)
{
37c00: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== 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)
37c04: e21150ff ands r5, 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)
{
37c08: e1a04000 mov r4, r0 <== NOT EXECUTED
37c0c: e1a06002 mov r6, r2 <== NOT EXECUTED
37c10: e1a08003 mov r8, 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)
37c14: 0a000007 beq 37c38 <rtems_rfs_group_bitmap_test+0x38> <== NOT EXECUTED
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
37c18: e3520000 cmp r2, #0 <== NOT EXECUTED
37c1c: da000020 ble 37ca4 <rtems_rfs_group_bitmap_test+0xa4> <== NOT EXECUTED
37c20: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
37c24: e1520003 cmp r2, r3 <== NOT EXECUTED
return EINVAL;
no -= RTEMS_RFS_ROOT_INO;
37c28: 92426001 subls r6, r2, #1 <== NOT EXECUTED
size = fs->group_inodes;
37c2c: 95907028 ldrls r7, [r0, #40] ; 0x28 <== NOT EXECUTED
printf ("rtems-rfs: group-bitmap-test: %s test: %" PRId32 "\n",
inode ? "inode" : "block", no);
if (inode)
{
if ((no < RTEMS_RFS_ROOT_INO) || (no > rtems_rfs_fs_inodes (fs)))
37c30: 9a000004 bls 37c48 <rtems_rfs_group_bitmap_test+0x48> <== NOT EXECUTED
37c34: ea00001a b 37ca4 <rtems_rfs_group_bitmap_test+0xa4> <== NOT EXECUTED
no -= RTEMS_RFS_ROOT_INO;
size = fs->group_inodes;
}
else
{
if (no >= rtems_rfs_fs_blocks (fs))
37c38: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
37c3c: e1520003 cmp r2, r3 <== NOT EXECUTED
37c40: 2a000017 bcs 37ca4 <rtems_rfs_group_bitmap_test+0xa4> <== NOT EXECUTED
return EINVAL;
size = fs->group_blocks;
37c44: e5907024 ldr r7, [r0, #36] ; 0x24 <== NOT EXECUTED
}
group = no / size;
37c48: e1a01007 mov r1, r7 <== NOT EXECUTED
37c4c: e1a00006 mov r0, r6 <== NOT EXECUTED
37c50: eb0079ab bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
37c54: e3550000 cmp r5, #0 <== NOT EXECUTED
37c58: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
bitmap = &fs->groups[group].inode_bitmap;
37c5c: 13a02050 movne r2, #80 ; 0x50 <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37c60: 03a02050 moveq r2, #80 ; 0x50 <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
37c64: 10253092 mlane r5, r2, r0, r3 <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37c68: 00253092 mlaeq r5, r2, r0, r3 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
37c6c: e1a01007 mov r1, r7 <== NOT EXECUTED
37c70: e1a00006 mov r0, r6 <== NOT EXECUTED
group = no / size;
bit = (rtems_rfs_bitmap_bit) (no % size);
if (inode)
bitmap = &fs->groups[group].inode_bitmap;
37c74: 1285502c addne r5, r5, #44 ; 0x2c <== NOT EXECUTED
else
bitmap = &fs->groups[group].block_bitmap;
37c78: 02855008 addeq r5, r5, #8 <== NOT EXECUTED
rc = rtems_rfs_bitmap_map_test (bitmap, bit, state);
37c7c: eb007a34 bl 56554 <__umodsi3> <== NOT EXECUTED
37c80: e1a02008 mov r2, r8 <== NOT EXECUTED
37c84: e1a01000 mov r1, r0 <== NOT EXECUTED
37c88: e1a00005 mov r0, r5 <== NOT EXECUTED
37c8c: eb00170f bl 3d8d0 <rtems_rfs_bitmap_map_test> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
37c90: 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);
37c94: e1a06000 mov r6, r0 <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, bitmap);
37c98: e1a00004 mov r0, r4 <== NOT EXECUTED
37c9c: ebfff4d6 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
return rc;
37ca0: ea000000 b 37ca8 <rtems_rfs_group_bitmap_test+0xa8> <== NOT EXECUTED
37ca4: e3a06016 mov r6, #22 <== NOT EXECUTED
}
37ca8: e1a00006 mov r0, r6 <== NOT EXECUTED
37cac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00037ea8 <rtems_rfs_group_close>:
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
37ea8: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
37eac: e1a06000 mov r6, 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);
37eb0: e281002c add r0, r1, #44 ; 0x2c <== NOT EXECUTED
return 0;
}
int
rtems_rfs_group_close (rtems_rfs_file_system* fs, rtems_rfs_group* group)
{
37eb4: 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);
37eb8: eb0015e7 bl 3d65c <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);
37ebc: e2841044 add r1, r4, #68 ; 0x44 <== NOT EXECUTED
37ec0: e1a07000 mov r7, r0 <== NOT EXECUTED
37ec4: e1a00006 mov r0, r6 <== NOT EXECUTED
37ec8: ebfff44b bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
37ecc: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
37ed0: 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;
37ed4: e5c43044 strb r3, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
37ed8: 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);
37edc: e2840008 add r0, r4, #8 <== NOT EXECUTED
37ee0: eb0015dd bl 3d65c <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);
37ee4: e2841020 add r1, r4, #32 <== NOT EXECUTED
if (rc > 0)
37ee8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
37eec: e1a00006 mov r0, r6 <== NOT EXECUTED
37ef0: d1c75fc7 bicle r5, r7, r7, asr #31 <== NOT EXECUTED
37ef4: ebfff440 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
37ef8: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->bnum = 0;
handle->buffer = NULL;
37efc: 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;
37f00: e5c43020 strb r3, [r4, #32] <== NOT EXECUTED
handle->bnum = 0;
37f04: 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;
}
37f08: e1a00005 mov r0, r5 <== NOT EXECUTED
37f0c: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00037f10 <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)
{
37f10: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
37f14: e1a06000 mov r6, r0 <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
37f18: e5900004 ldr r0, [r0, #4] <== NOT EXECUTED
37f1c: e1510000 cmp r1, r0 <== 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)
{
37f20: e1a0c001 mov ip, r1 <== NOT EXECUTED
37f24: e1a07002 mov r7, r2 <== NOT EXECUTED
37f28: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
37f2c: e59d402c ldr r4, [sp, #44] ; 0x2c <== NOT EXECUTED
int rc;
if (base >= rtems_rfs_fs_blocks (fs))
37f30: 23a0b005 movcs fp, #5 <== NOT EXECUTED
37f34: 2a00003a bcs 38024 <rtems_rfs_group_open+0x114> <== 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))
37f38: e0823001 add r3, r2, r1 <== NOT EXECUTED
37f3c: e1530000 cmp r3, r0 <== NOT EXECUTED
size = rtems_rfs_fs_blocks (fs) - base;
37f40: 20617000 rsbcs 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;
37f44: 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,
37f48: e2849008 add r9, r4, #8 <== NOT EXECUTED
37f4c: 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;
37f50: e8840082 stm r4, {r1, r7} <== NOT EXECUTED
37f54: e5c45020 strb r5, [r4, #32] <== NOT EXECUTED
handle->bnum = 0;
37f58: e5845024 str r5, [r4, #36] ; 0x24 <== NOT EXECUTED
handle->buffer = NULL;
37f5c: 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,
37f60: e1a00009 mov r0, r9 <== NOT EXECUTED
37f64: e1a01006 mov r1, r6 <== NOT EXECUTED
37f68: e1a02008 mov r2, r8 <== NOT EXECUTED
37f6c: e1a03007 mov r3, r7 <== NOT EXECUTED
37f70: e58dc000 str ip, [sp] <== NOT EXECUTED
37f74: eb0015fa bl 3d764 <rtems_rfs_bitmap_open> <== NOT EXECUTED
&group->block_bitmap_buffer, size,
group->base + RTEMS_RFS_GROUP_BLOCK_BITMAP_BLOCK);
if (rc > 0)
37f78: e250b000 subs fp, r0, #0 <== NOT EXECUTED
37f7c: ca000017 bgt 37fe0 <rtems_rfs_group_open+0xd0> <== 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,
37f80: e594c000 ldr ip, [r4] <== NOT EXECUTED
37f84: e59d3004 ldr r3, [sp, #4] <== NOT EXECUTED
37f88: e284a044 add sl, r4, #68 ; 0x44 <== NOT EXECUTED
37f8c: e1570003 cmp r7, r3 <== NOT EXECUTED
37f90: 31a03007 movcc r3, r7 <== NOT EXECUTED
37f94: e28cc001 add ip, ip, #1 <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
37f98: e5c45044 strb r5, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
37f9c: e5845048 str r5, [r4, #72] ; 0x48 <== NOT EXECUTED
handle->buffer = NULL;
37fa0: e584504c str r5, [r4, #76] ; 0x4c <== NOT EXECUTED
37fa4: e284002c add r0, r4, #44 ; 0x2c <== NOT EXECUTED
37fa8: e1a01006 mov r1, r6 <== NOT EXECUTED
37fac: e1a0200a mov r2, sl <== NOT EXECUTED
37fb0: e58dc000 str ip, [sp] <== NOT EXECUTED
37fb4: eb0015ea bl 3d764 <rtems_rfs_bitmap_open> <== NOT EXECUTED
&group->inode_bitmap_buffer, inodes,
group->base + RTEMS_RFS_GROUP_INODE_BITMAP_BLOCK);
if (rc > 0)
37fb8: e250b000 subs fp, r0, #0 <== NOT EXECUTED
37fbc: da00000e ble 37ffc <rtems_rfs_group_open+0xec> <== 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);
37fc0: e1a0100a mov r1, sl <== NOT EXECUTED
37fc4: e1a00006 mov r0, r6 <== NOT EXECUTED
37fc8: ebfff40b bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
37fcc: e5c45044 strb r5, [r4, #68] ; 0x44 <== NOT EXECUTED
handle->bnum = 0;
37fd0: e5845048 str r5, [r4, #72] ; 0x48 <== NOT EXECUTED
handle->buffer = NULL;
37fd4: e584504c str r5, [r4, #76] ; 0x4c <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &group->inode_bitmap_buffer);
rtems_rfs_bitmap_close (&group->block_bitmap);
37fd8: e1a00009 mov r0, r9 <== NOT EXECUTED
37fdc: eb00159e bl 3d65c <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);
37fe0: e1a00006 mov r0, r6 <== NOT EXECUTED
37fe4: e1a01008 mov r1, r8 <== NOT EXECUTED
37fe8: ebfff403 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
37fec: 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;
37ff0: e5c45020 strb r5, [r4, #32] <== NOT EXECUTED
handle->bnum = 0;
37ff4: e5845024 str r5, [r4, #36] ; 0x24 <== NOT EXECUTED
37ff8: ea000009 b 38024 <rtems_rfs_group_open+0x114> <== 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))
37ffc: e596b000 ldr fp, [r6] <== NOT EXECUTED
38000: e21bb001 ands fp, fp, #1 <== NOT EXECUTED
38004: 11a0b005 movne fp, r5 <== NOT EXECUTED
38008: 1a000005 bne 38024 <rtems_rfs_group_open+0x114> <== NOT EXECUTED
{
rtems_rfs_bitmap_release_buffer (fs, &group->block_bitmap);
3800c: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
38010: e1a00006 mov r0, r6 <== NOT EXECUTED
38014: ebfff3f8 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
rtems_rfs_bitmap_release_buffer (fs, &group->inode_bitmap);
38018: e1a00006 mov r0, r6 <== NOT EXECUTED
3801c: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED
38020: ebfff3f5 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
}
return 0;
}
38024: e1a0000b mov r0, fp <== NOT EXECUTED
38028: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00037b6c <rtems_rfs_group_usage>:
size_t* blocks,
size_t* inodes)
{
int g;
*blocks = 0;
37b6c: e3a03000 mov r3, #0 <== NOT EXECUTED
int
rtems_rfs_group_usage (rtems_rfs_file_system* fs,
size_t* blocks,
size_t* inodes)
{
37b70: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
int g;
*blocks = 0;
37b74: e5813000 str r3, [r1] <== NOT EXECUTED
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
37b78: e1a0c003 mov ip, r3 <== NOT EXECUTED
size_t* inodes)
{
int g;
*blocks = 0;
*inodes = 0;
37b7c: e5823000 str r3, [r2] <== NOT EXECUTED
for (g = 0; g < fs->group_count; g++)
37b80: e5906020 ldr r6, [r0, #32] <== NOT EXECUTED
37b84: e1a04003 mov r4, r3 <== NOT EXECUTED
37b88: ea00000e b 37bc8 <rtems_rfs_group_usage+0x5c> <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
37b8c: e590301c ldr r3, [r0, #28] <== NOT EXECUTED
37b90: e083300c add r3, r3, ip <== NOT EXECUTED
*blocks +=
37b94: e2838014 add r8, r3, #20 <== NOT EXECUTED
37b98: e8980180 ldm r8, {r7, r8} <== NOT EXECUTED
37b9c: e0477008 sub r7, r7, r8 <== NOT EXECUTED
37ba0: e0855007 add r5, r5, r7 <== NOT EXECUTED
37ba4: e5815000 str r5, [r1] <== NOT EXECUTED
rtems_rfs_bitmap_map_size(&group->block_bitmap) -
rtems_rfs_bitmap_map_free (&group->block_bitmap);
*inodes +=
37ba8: e2835038 add r5, r3, #56 ; 0x38 <== NOT EXECUTED
37bac: e8950028 ldm r5, {r3, r5} <== NOT EXECUTED
37bb0: e0433005 sub r3, r3, r5 <== NOT EXECUTED
37bb4: e5925000 ldr r5, [r2] <== NOT EXECUTED
37bb8: e0853003 add r3, r5, r3 <== NOT EXECUTED
37bbc: e5823000 str r3, [r2] <== NOT EXECUTED
int g;
*blocks = 0;
*inodes = 0;
for (g = 0; g < fs->group_count; g++)
37bc0: e2844001 add r4, r4, #1 <== NOT EXECUTED
37bc4: e28cc050 add ip, ip, #80 ; 0x50 <== NOT EXECUTED
37bc8: e1540006 cmp r4, r6 <== NOT EXECUTED
37bcc: e5915000 ldr r5, [r1] <== NOT EXECUTED
37bd0: baffffed blt 37b8c <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))
37bd4: e5903004 ldr r3, [r0, #4] <== NOT EXECUTED
37bd8: e1530005 cmp r3, r5 <== NOT EXECUTED
37bdc: 95813000 strls r3, [r1] <== NOT EXECUTED
37be0: 85815000 strhi r5, [r1] <== NOT EXECUTED
*blocks = rtems_rfs_fs_blocks (fs);
if (*inodes > rtems_rfs_fs_inodes (fs))
37be4: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
37be8: e5921000 ldr r1, [r2] <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
37bec: 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))
37bf0: e1510003 cmp r1, r3 <== NOT EXECUTED
37bf4: 95821000 strls r1, [r2] <== NOT EXECUTED
37bf8: 85823000 strhi r3, [r2] <== NOT EXECUTED
*inodes = rtems_rfs_fs_inodes (fs);
return 0;
}
37bfc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0003852c <rtems_rfs_inode_alloc>:
int
rtems_rfs_inode_alloc (rtems_rfs_file_system* fs,
rtems_rfs_bitmap_bit goal,
rtems_rfs_ino* ino)
{
3852c: e92d4011 push {r0, r4, lr} <== NOT EXECUTED
38530: e1a04002 mov r4, r2 <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
int rc;
rc = rtems_rfs_group_bitmap_alloc (fs, goal, true, &bit);
38534: e1a0300d mov r3, sp <== NOT EXECUTED
38538: e3a02001 mov r2, #1 <== NOT EXECUTED
3853c: ebfffdf8 bl 37d24 <rtems_rfs_group_bitmap_alloc> <== NOT EXECUTED
*ino = bit;
38540: e59d3000 ldr r3, [sp] <== NOT EXECUTED
38544: e5843000 str r3, [r4] <== NOT EXECUTED
return rc;
}
38548: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
00038338 <rtems_rfs_inode_close>:
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
38338: 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);
3833c: e3a02001 mov r2, #1 <== NOT EXECUTED
}
int
rtems_rfs_inode_close (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
38340: 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);
38344: ebffffd1 bl 38290 <rtems_rfs_inode_unload> <== NOT EXECUTED
if ((rc == 0) && (handle->loads > 0))
38348: e3500000 cmp r0, #0 <== NOT EXECUTED
3834c: 1a000003 bne 38360 <rtems_rfs_inode_close+0x28> <== NOT EXECUTED
38350: e5940024 ldr r0, [r4, #36] ; 0x24 <== NOT EXECUTED
38354: e3500000 cmp r0, #0 <== NOT EXECUTED
38358: c3a00005 movgt r0, #5 <== NOT EXECUTED
3835c: d3a00000 movle r0, #0 <== NOT EXECUTED
printf ("rtems-rfs: inode-close: bad loads number: %d\n",
handle->loads);
rc = EIO;
}
handle->ino = 0;
38360: e3a03000 mov r3, #0 <== NOT EXECUTED
38364: e5843008 str r3, [r4, #8] <== NOT EXECUTED
return rc;
}
38368: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0003854c <rtems_rfs_inode_create>:
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
3854c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
38550: e24dd064 sub sp, sp, #100 ; 0x64 <== NOT EXECUTED
38554: e1dda8b8 ldrh sl, [sp, #136] ; 0x88 <== NOT EXECUTED
38558: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
3855c: e20a6a0f and r6, sl, #61440 ; 0xf000 <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
38560: e1dd39b0 ldrh r3, [sp, #144] ; 0x90 <== NOT EXECUTED
38564: e1ddc9b4 ldrh ip, [sp, #148] ; 0x94 <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
38568: e3560a06 cmp r6, #24576 ; 0x6000 <== NOT EXECUTED
uint16_t mode,
uint16_t links,
uid_t uid,
gid_t gid,
rtems_rfs_ino* ino)
{
3856c: e1a04000 mov r4, r0 <== NOT EXECUTED
38570: e1a08001 mov r8, r1 <== NOT EXECUTED
38574: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
38578: e59d5098 ldr r5, [sp, #152] ; 0x98 <== NOT EXECUTED
3857c: e1ddb8bc ldrh fp, [sp, #140] ; 0x8c <== NOT EXECUTED
38580: e58d300c str r3, [sp, #12] <== NOT EXECUTED
38584: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
}
/*
* The file type is field within the mode. Check we have a sane mode set.
*/
switch (mode & RTEMS_RFS_S_IFMT)
38588: 0a000009 beq 385b4 <rtems_rfs_inode_create+0x68> <== NOT EXECUTED
3858c: ca000003 bgt 385a0 <rtems_rfs_inode_create+0x54> <== NOT EXECUTED
38590: e3560a02 cmp r6, #8192 ; 0x2000 <== NOT EXECUTED
38594: 0a000006 beq 385b4 <rtems_rfs_inode_create+0x68> <== NOT EXECUTED
38598: e3560901 cmp r6, #16384 ; 0x4000 <== NOT EXECUTED
3859c: ea000002 b 385ac <rtems_rfs_inode_create+0x60> <== NOT EXECUTED
385a0: e3560902 cmp r6, #32768 ; 0x8000 <== NOT EXECUTED
385a4: 0a000002 beq 385b4 <rtems_rfs_inode_create+0x68> <== NOT EXECUTED
385a8: e3560a0a cmp r6, #40960 ; 0xa000 <== NOT EXECUTED
385ac: 13a09016 movne r9, #22 <== NOT EXECUTED
385b0: 1a000077 bne 38794 <rtems_rfs_inode_create+0x248> <== NOT EXECUTED
break;
default:
return EINVAL;
}
rc = rtems_rfs_inode_alloc (fs, parent, ino);
385b4: e1a00004 mov r0, r4 <== NOT EXECUTED
385b8: e1a01008 mov r1, r8 <== NOT EXECUTED
385bc: e1a02005 mov r2, r5 <== NOT EXECUTED
385c0: ebffffd9 bl 3852c <rtems_rfs_inode_alloc> <== NOT EXECUTED
if (rc > 0)
385c4: e2509000 subs r9, r0, #0 <== NOT EXECUTED
385c8: ca000071 bgt 38794 <rtems_rfs_inode_create+0x248> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, *ino, &inode, true);
385cc: e28d7014 add r7, sp, #20 <== NOT EXECUTED
385d0: e1a00004 mov r0, r4 <== NOT EXECUTED
385d4: e5951000 ldr r1, [r5] <== NOT EXECUTED
385d8: e1a02007 mov r2, r7 <== NOT EXECUTED
385dc: e3a03001 mov r3, #1 <== NOT EXECUTED
385e0: ebffff77 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
385e4: e2509000 subs r9, r0, #0 <== NOT EXECUTED
385e8: ca000066 bgt 38788 <rtems_rfs_inode_create+0x23c> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
return rc;
}
rc = rtems_rfs_inode_initialise (&inode, links, mode, uid, gid);
385ec: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED
385f0: e1a0100b mov r1, fp <== NOT EXECUTED
385f4: e1a0200a mov r2, sl <== NOT EXECUTED
385f8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
385fc: e1a00007 mov r0, r7 <== NOT EXECUTED
38600: e58dc000 str ip, [sp] <== NOT EXECUTED
38604: ebfffec5 bl 38120 <rtems_rfs_inode_initialise> <== NOT EXECUTED
if (rc > 0)
38608: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3860c: da000003 ble 38620 <rtems_rfs_inode_create+0xd4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
38610: e1a01007 mov r1, r7 <== NOT EXECUTED
38614: e1a00004 mov r0, r4 <== NOT EXECUTED
38618: ebffff46 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
3861c: ea000059 b 38788 <rtems_rfs_inode_create+0x23c> <== 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))
38620: e3560901 cmp r6, #16384 ; 0x4000 <== NOT EXECUTED
38624: 1a000011 bne 38670 <rtems_rfs_inode_create+0x124> <== NOT EXECUTED
{
rc = rtems_rfs_dir_add_entry (fs, &inode, ".", 1, *ino);
38628: e595c000 ldr ip, [r5] <== NOT EXECUTED
3862c: e1a00004 mov r0, r4 <== NOT EXECUTED
38630: e1a01007 mov r1, r7 <== NOT EXECUTED
38634: e59f2164 ldr r2, [pc, #356] ; 387a0 <rtems_rfs_inode_create+0x254><== NOT EXECUTED
38638: e3a03001 mov r3, #1 <== NOT EXECUTED
3863c: e58dc000 str ip, [sp] <== NOT EXECUTED
38640: ebfff4e7 bl 359e4 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc == 0)
38644: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38648: 1a000006 bne 38668 <rtems_rfs_inode_create+0x11c> <== NOT EXECUTED
rc = rtems_rfs_dir_add_entry (fs, &inode, "..", 2, parent);
3864c: e1a01007 mov r1, r7 <== NOT EXECUTED
38650: e1a00004 mov r0, r4 <== NOT EXECUTED
38654: e59f2148 ldr r2, [pc, #328] ; 387a4 <rtems_rfs_inode_create+0x258><== NOT EXECUTED
38658: e3a03002 mov r3, #2 <== NOT EXECUTED
3865c: e58d8000 str r8, [sp] <== NOT EXECUTED
38660: ebfff4df bl 359e4 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
38664: e1a09000 mov r9, r0 <== NOT EXECUTED
if (rc > 0)
38668: e3590000 cmp r9, #0 <== NOT EXECUTED
3866c: ca000007 bgt 38690 <rtems_rfs_inode_create+0x144> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
38670: e28d703c add r7, sp, #60 ; 0x3c <== NOT EXECUTED
38674: e1a01008 mov r1, r8 <== NOT EXECUTED
38678: e1a00004 mov r0, r4 <== NOT EXECUTED
3867c: e1a02007 mov r2, r7 <== NOT EXECUTED
38680: e3a03001 mov r3, #1 <== NOT EXECUTED
38684: ebffff4e bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
38688: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3868c: da000006 ble 386ac <rtems_rfs_inode_create+0x160> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
38690: e28d5014 add r5, sp, #20 <== NOT EXECUTED
38694: e1a01005 mov r1, r5 <== NOT EXECUTED
38698: e1a00004 mov r0, r4 <== NOT EXECUTED
3869c: ebffff7b bl 38490 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
386a0: e1a00004 mov r0, r4 <== NOT EXECUTED
386a4: e1a01005 mov r1, r5 <== NOT EXECUTED
386a8: ea00002e b 38768 <rtems_rfs_inode_create+0x21c> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, *ino);
386ac: e595c000 ldr ip, [r5] <== NOT EXECUTED
386b0: e99d000c ldmib sp, {r2, r3} <== NOT EXECUTED
386b4: e1a00004 mov r0, r4 <== NOT EXECUTED
386b8: e1a01007 mov r1, r7 <== NOT EXECUTED
386bc: e58dc000 str ip, [sp] <== NOT EXECUTED
386c0: ebfff4c7 bl 359e4 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
386c4: e2509000 subs r9, r0, #0 <== NOT EXECUTED
386c8: da000009 ble 386f4 <rtems_rfs_inode_create+0x1a8> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
386cc: e28d5014 add r5, sp, #20 <== NOT EXECUTED
386d0: e1a01005 mov r1, r5 <== NOT EXECUTED
386d4: e1a00004 mov r0, r4 <== NOT EXECUTED
386d8: ebffff6c bl 38490 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
386dc: e1a01005 mov r1, r5 <== NOT EXECUTED
386e0: e1a00004 mov r0, r4 <== NOT EXECUTED
386e4: ebffff13 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
386e8: e1a00004 mov r0, r4 <== NOT EXECUTED
386ec: e1a01007 mov r1, r7 <== NOT EXECUTED
386f0: ea00001c b 38768 <rtems_rfs_inode_create+0x21c> <== 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))
386f4: e3560901 cmp r6, #16384 ; 0x4000 <== NOT EXECUTED
386f8: 1a00000f bne 3873c <rtems_rfs_inode_create+0x1f0> <== 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);
386fc: e59d2048 ldr r2, [sp, #72] ; 0x48 <== NOT EXECUTED
38700: e5d21000 ldrb r1, [r2] <== NOT EXECUTED
38704: e5d23001 ldrb r3, [r2, #1] <== NOT EXECUTED
38708: e1833401 orr r3, r3, r1, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
3870c: e59f1094 ldr r1, [pc, #148] ; 387a8 <rtems_rfs_inode_create+0x25c><== NOT EXECUTED
38710: e1530001 cmp r3, r1 <== NOT EXECUTED
38714: 03a03000 moveq r3, #0 <== NOT EXECUTED
rtems_rfs_inode_set_links (&parent_inode,
38718: e2833001 add r3, r3, #1 <== NOT EXECUTED
3871c: e1a03803 lsl r3, r3, #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);
38720: e1a01c23 lsr r1, r3, #24 <== NOT EXECUTED
38724: e5c21000 strb r1, [r2] <== NOT EXECUTED
38728: e59d2048 ldr r2, [sp, #72] ; 0x48 <== NOT EXECUTED
3872c: e1a03823 lsr r3, r3, #16 <== NOT EXECUTED
38730: e5c23001 strb r3, [r2, #1] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38734: e3a03001 mov r3, #1 <== NOT EXECUTED
38738: e5cd304c strb r3, [sp, #76] ; 0x4c <== NOT EXECUTED
rtems_rfs_inode_get_links (&parent_inode) + 1);
rc = rtems_rfs_inode_close (fs, &parent_inode);
3873c: e1a00004 mov r0, r4 <== NOT EXECUTED
38740: e28d103c add r1, sp, #60 ; 0x3c <== NOT EXECUTED
38744: ebfffefb bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
38748: e2509000 subs r9, r0, #0 <== NOT EXECUTED
3874c: e28d6014 add r6, sp, #20 <== NOT EXECUTED
38750: da000006 ble 38770 <rtems_rfs_inode_create+0x224> <== NOT EXECUTED
{
rtems_rfs_inode_delete (fs, &inode);
38754: e1a01006 mov r1, r6 <== NOT EXECUTED
38758: e1a00004 mov r0, r4 <== NOT EXECUTED
3875c: ebffff4b bl 38490 <rtems_rfs_inode_delete> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
38760: e1a00004 mov r0, r4 <== NOT EXECUTED
38764: e1a01006 mov r1, r6 <== NOT EXECUTED
38768: ebfffef2 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
3876c: ea000008 b 38794 <rtems_rfs_inode_create+0x248> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
38770: e1a01006 mov r1, r6 <== NOT EXECUTED
38774: e1a00004 mov r0, r4 <== NOT EXECUTED
38778: ebfffeee bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
3877c: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38780: d3a09000 movle r9, #0 <== NOT EXECUTED
38784: da000002 ble 38794 <rtems_rfs_inode_create+0x248> <== NOT EXECUTED
{
rtems_rfs_inode_free (fs, *ino);
38788: e1a00004 mov r0, r4 <== NOT EXECUTED
3878c: e5951000 ldr r1, [r5] <== NOT EXECUTED
38790: ebffff3b bl 38484 <rtems_rfs_inode_free> <== NOT EXECUTED
return rc;
}
return 0;
}
38794: e1a00009 mov r0, r9 <== NOT EXECUTED
38798: e28dd064 add sp, sp, #100 ; 0x64 <== NOT EXECUTED
3879c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00038490 <rtems_rfs_inode_delete>:
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
38490: 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))
38494: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
38498: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_inode_delete (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3849c: e1a05000 mov r5, r0 <== NOT EXECUTED
384a0: e24dd050 sub sp, sp, #80 ; 0x50 <== NOT EXECUTED
384a4: 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))
384a8: 01a00003 moveq r0, r3 <== NOT EXECUTED
384ac: 0a00001c beq 38524 <rtems_rfs_inode_delete+0x94> <== NOT EXECUTED
rtems_rfs_block_map map;
/*
* Free the ino number.
*/
rc = rtems_rfs_inode_free (fs, handle->ino);
384b0: e5911008 ldr r1, [r1, #8] <== NOT EXECUTED
384b4: ebfffff2 bl 38484 <rtems_rfs_inode_free> <== NOT EXECUTED
if (rc > 0)
384b8: e3500000 cmp r0, #0 <== NOT EXECUTED
384bc: ca000018 bgt 38524 <rtems_rfs_inode_delete+0x94> <== NOT EXECUTED
return rc;
/*
* Free the blocks the inode may have attached.
*/
rc = rtems_rfs_block_map_open (fs, handle, &map);
384c0: e1a00005 mov r0, r5 <== NOT EXECUTED
384c4: e1a01004 mov r1, r4 <== NOT EXECUTED
384c8: e1a0200d mov r2, sp <== NOT EXECUTED
384cc: ebfff203 bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc == 0)
384d0: 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);
384d4: e1a0600d mov r6, sp <== NOT EXECUTED
if (rc == 0)
384d8: 1a000011 bne 38524 <rtems_rfs_inode_delete+0x94> <== NOT EXECUTED
{
int rrc;
rrc = rtems_rfs_block_map_free_all (fs, &map);
384dc: e1a0100d mov r1, sp <== NOT EXECUTED
384e0: e1a00005 mov r0, r5 <== NOT EXECUTED
384e4: ebfff057 bl 34648 <rtems_rfs_block_map_free_all> <== NOT EXECUTED
rc = rtems_rfs_block_map_close (fs, &map);
384e8: e1a0100d mov r1, sp <== NOT EXECUTED
384ec: e1a00005 mov r0, r5 <== NOT EXECUTED
384f0: ebfff188 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
rrc = rc;
memset (handle->node, 0xff, RTEMS_RFS_INODE_SIZE);
384f4: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
384f8: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
384fc: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
38500: eb0024e7 bl 418a4 <memset> <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38504: e3a03001 mov r3, #1 <== NOT EXECUTED
38508: e1a01004 mov r1, r4 <== NOT EXECUTED
3850c: 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);
38510: e1a00005 mov r0, r5 <== NOT EXECUTED
38514: ebfff2b8 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->loads = 0;
38518: e3a03000 mov r3, #0 <== NOT EXECUTED
handle->node = NULL;
3851c: 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;
38520: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
handle->node = NULL;
}
}
return rc;
}
38524: e28dd050 add sp, sp, #80 ; 0x50 <== NOT EXECUTED
38528: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00038484 <rtems_rfs_inode_free>:
}
int
rtems_rfs_inode_free (rtems_rfs_file_system* fs,
rtems_rfs_ino ino)
{
38484: e1a02001 mov r2, r1 <== NOT EXECUTED
rtems_rfs_bitmap_bit bit;
bit = ino;
return rtems_rfs_group_bitmap_free (fs, true, bit);
38488: e3a01001 mov r1, #1 <== NOT EXECUTED
3848c: eafffe07 b 37cb0 <rtems_rfs_group_bitmap_free> <== NOT EXECUTED
0003802c <rtems_rfs_inode_get_size>:
}
rtems_rfs_pos
rtems_rfs_inode_get_size (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
3802c: e92d4003 push {r0, r1, lr} <== 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);
38030: e591200c ldr r2, [r1, #12] <== NOT EXECUTED
38034: e282300c add r3, r2, #12 <== NOT EXECUTED
rtems_rfs_block_size size;
size.count = rtems_rfs_inode_get_block_count (handle);
38038: e5d31003 ldrb r1, [r3, #3] <== NOT EXECUTED
3803c: e5d2c00c ldrb ip, [r2, #12] <== NOT EXECUTED
38040: e5d3e001 ldrb lr, [r3, #1] <== NOT EXECUTED
38044: e181cc0c orr ip, r1, ip, lsl #24 <== NOT EXECUTED
38048: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
3804c: e18c380e orr r3, ip, lr, lsl #16 <== NOT EXECUTED
38050: e1833401 orr r3, r3, r1, lsl #8 <== NOT EXECUTED
38054: e58d3000 str r3, [sp] <== NOT EXECUTED
size.offset = rtems_rfs_inode_get_block_offset (handle);
38058: e5d2300b ldrb r3, [r2, #11] <== NOT EXECUTED
3805c: e5d2200a ldrb r2, [r2, #10] <== NOT EXECUTED
return rtems_rfs_block_get_size (fs, &size);
38060: 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);
38064: e1833402 orr r3, r3, r2, lsl #8 <== NOT EXECUTED
38068: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
return rtems_rfs_block_get_size (fs, &size);
3806c: ebffeff2 bl 3403c <rtems_rfs_block_get_size> <== NOT EXECUTED
}
38070: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00038120 <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)
{
38120: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
38124: 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);
38128: e590400c ldr r4, [r0, #12] <== NOT EXECUTED
3812c: e1a05c21 lsr r5, r1, #24 <== NOT EXECUTED
38130: e1a0c000 mov ip, r0 <== NOT EXECUTED
38134: e1dd00bc ldrh r0, [sp, #12] <== NOT EXECUTED
38138: e5c45000 strb r5, [r4] <== NOT EXECUTED
3813c: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
38140: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED
38144: 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);
38148: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
3814c: e3a01000 mov r1, #0 <== NOT EXECUTED
38150: e5c41008 strb r1, [r4, #8] <== NOT EXECUTED
38154: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
38158: e5c41009 strb r1, [r4, #9] <== NOT EXECUTED
3815c: 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);
38160: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
38164: e1a05c22 lsr r5, r2, #24 <== NOT EXECUTED
38168: e5c45002 strb r5, [r4, #2] <== NOT EXECUTED
3816c: e59c400c ldr r4, [ip, #12] <== NOT EXECUTED
38170: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
38174: e5c42003 strb r2, [r4, #3] <== NOT EXECUTED
38178: e1a03803 lsl r3, r3, #16 <== NOT EXECUTED
3817c: 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);
38180: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
38184: e1830800 orr r0, r3, r0, lsl #16 <== NOT EXECUTED
38188: e1a04c20 lsr r4, r0, #24 <== NOT EXECUTED
3818c: e5c24004 strb r4, [r2, #4] <== NOT EXECUTED
38190: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
38194: e1a04820 lsr r4, r0, #16 <== NOT EXECUTED
38198: e5c24005 strb r4, [r2, #5] <== NOT EXECUTED
3819c: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
381a0: e1a00420 lsr r0, r0, #8 <== NOT EXECUTED
381a4: e5c20006 strb r0, [r2, #6] <== NOT EXECUTED
381a8: e59c200c ldr r2, [ip, #12] <== NOT EXECUTED
381ac: 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);
381b0: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
381b4: e5c3100a strb r1, [r3, #10] <== NOT EXECUTED
381b8: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
381bc: 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);
381c0: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
381c4: e5c3100c strb r1, [r3, #12] <== NOT EXECUTED
381c8: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
381cc: e5c3100d strb r1, [r3, #13] <== NOT EXECUTED
381d0: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
381d4: e5c3100e strb r1, [r3, #14] <== NOT EXECUTED
381d8: e59c200c ldr r2, [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);
381dc: e3a03001 mov r3, #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);
381e0: e5c2100f strb r1, [r2, #15] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
381e4: e5cc3010 strb r3, [ip, #16] <== 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);
381e8: e1a04003 mov r4, r3 <== 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);
381ec: e1a00001 mov r0, r1 <== NOT EXECUTED
381f0: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
381f4: e0833001 add r3, r3, r1 <== NOT EXECUTED
381f8: e5c3001c strb r0, [r3, #28] <== NOT EXECUTED
381fc: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
38200: e3a02000 mov r2, #0 <== NOT EXECUTED
38204: e0833001 add r3, r3, r1 <== NOT EXECUTED
38208: e5c3201d strb r2, [r3, #29] <== NOT EXECUTED
3820c: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
38210: e0833001 add r3, r3, r1 <== NOT EXECUTED
38214: e5c3001e strb r0, [r3, #30] <== NOT EXECUTED
38218: e59c300c ldr r3, [ip, #12] <== NOT EXECUTED
3821c: e0833001 add r3, r3, r1 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38220: 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++)
38224: 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);
38228: e5c3001f strb r0, [r3, #31] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
3822c: e5cc4010 strb r4, [ip, #16] <== NOT EXECUTED
38230: e3a03001 mov r3, #1 <== NOT EXECUTED
38234: 1affffed bne 381f0 <rtems_rfs_inode_initialise+0xd0> <== 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);
38238: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3823c: e5c12030 strb r2, [r1, #48] ; 0x30 <== NOT EXECUTED
38240: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
38244: e5c12031 strb r2, [r1, #49] ; 0x31 <== NOT EXECUTED
38248: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3824c: e5c12032 strb r2, [r1, #50] ; 0x32 <== NOT EXECUTED
38250: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
38254: 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);
38258: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3825c: e5c12034 strb r2, [r1, #52] ; 0x34 <== NOT EXECUTED
38260: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
38264: e5c12035 strb r2, [r1, #53] ; 0x35 <== NOT EXECUTED
38268: e59c100c ldr r1, [ip, #12] <== NOT EXECUTED
3826c: e5c12036 strb r2, [r1, #54] ; 0x36 <== NOT EXECUTED
38270: 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);
38274: e1a01003 mov r1, r3 <== NOT EXECUTED
38278: e5c02037 strb r2, [r0, #55] ; 0x37 <== NOT EXECUTED
3827c: e1a0000c mov r0, ip <== NOT EXECUTED
38280: e1a02003 mov r2, r3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38284: e5cc3010 strb r3, [ip, #16] <== NOT EXECUTED
}
38288: e8bd4030 pop {r4, r5, lr} <== 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);
3828c: eaffff78 b 38074 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
0003836c <rtems_rfs_inode_load>:
/*
* An inode does not move so once loaded no need to do again.
*/
if (!rtems_rfs_inode_is_loaded (handle))
3836c: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
38370: e3530000 cmp r3, #0 <== NOT EXECUTED
}
int
rtems_rfs_inode_load (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle)
{
38374: e92d4010 push {r4, lr} <== NOT EXECUTED
38378: 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))
3837c: 1a00000b bne 383b0 <rtems_rfs_inode_load+0x44> <== NOT EXECUTED
{
int rc;
rc = rtems_rfs_buffer_handle_request (fs,&handle->buffer,
38380: e2811010 add r1, r1, #16 <== NOT EXECUTED
38384: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
38388: e2833001 add r3, r3, #1 <== NOT EXECUTED
3838c: ebfff363 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
handle->block, true);
if (rc > 0)
38390: e3500000 cmp r0, #0 <== NOT EXECUTED
38394: c8bd8010 popgt {r4, pc} <== NOT EXECUTED
return rc;
handle->node = rtems_rfs_buffer_data (&handle->buffer);
38398: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
handle->node += handle->offset;
3839c: e5941020 ldr r1, [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);
383a0: e5932020 ldr r2, [r3, #32] <== NOT EXECUTED
handle->node += handle->offset;
383a4: e3a00038 mov r0, #56 ; 0x38 <== NOT EXECUTED
383a8: e0232190 mla r3, r0, r1, r2 <== NOT EXECUTED
383ac: e584300c str r3, [r4, #12] <== NOT EXECUTED
}
handle->loads++;
383b0: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED
383b4: e2833001 add r3, r3, #1 <== NOT EXECUTED
383b8: e5843024 str r3, [r4, #36] ; 0x24 <== NOT EXECUTED
383bc: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
383c0: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000383c4 <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)
383c4: 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)
{
383c8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
383cc: e1a04000 mov r4, r0 <== NOT EXECUTED
383d0: e1a05002 mov r5, r2 <== NOT EXECUTED
383d4: 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)
383d8: 0a000027 beq 3847c <rtems_rfs_inode_open+0xb8> <== NOT EXECUTED
return EINVAL;
if ((ino - RTEMS_RFS_ROOT_INO) > rtems_rfs_fs_inodes (fs))
383dc: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
383e0: e2417001 sub r7, r1, #1 <== NOT EXECUTED
383e4: e1570003 cmp r7, r3 <== NOT EXECUTED
383e8: 8a000023 bhi 3847c <rtems_rfs_inode_open+0xb8> <== NOT EXECUTED
return EINVAL;
handle->ino = ino;
383ec: e5821008 str r1, [r2, #8] <== NOT EXECUTED
handle->node = NULL;
handle->loads = 0;
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
383f0: 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;
383f4: e3a06000 mov r6, #0 <== NOT EXECUTED
383f8: e582600c str r6, [r2, #12] <== NOT EXECUTED
handle->loads = 0;
383fc: e5826024 str r6, [r2, #36] ; 0x24 <== NOT EXECUTED
gino = ino - RTEMS_RFS_ROOT_INO;
group = gino / fs->group_inodes;
gino = gino % fs->group_inodes;
38400: e1a01009 mov r1, r9 <== NOT EXECUTED
38404: e1a00007 mov r0, r7 <== NOT EXECUTED
38408: eb007851 bl 56554 <__umodsi3> <== NOT EXECUTED
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
3840c: e594a02c ldr sl, [r4, #44] ; 0x2c <== NOT EXECUTED
handle->offset = gino % fs->inodes_per_block;
38410: 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;
38414: e1a0b000 mov fp, r0 <== NOT EXECUTED
index = (gino / fs->inodes_per_block) + RTEMS_RFS_GROUP_INODE_BLOCK;
handle->offset = gino % fs->inodes_per_block;
38418: eb00784d bl 56554 <__umodsi3> <== NOT EXECUTED
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
3841c: 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;
38420: e5850020 str r0, [r5, #32] <== NOT EXECUTED
handle->block = rtems_rfs_group_block (&fs->groups[group], index);
38424: e1a00007 mov r0, r7 <== NOT EXECUTED
38428: eb0077b5 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
3842c: e3a03050 mov r3, #80 ; 0x50 <== NOT EXECUTED
38430: e0000093 mul r0, r3, r0 <== NOT EXECUTED
38434: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
38438: e1a0100a mov r1, sl <== NOT EXECUTED
3843c: e7937000 ldr r7, [r3, r0] <== NOT EXECUTED
38440: e1a0000b mov r0, fp <== NOT EXECUTED
38444: eb0077ae bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
38448: e2877002 add r7, r7, #2 <== NOT EXECUTED
3844c: e0870000 add r0, r7, r0 <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
38450: 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);
38454: 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;
38458: 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;
3845c: e5c56010 strb r6, [r5, #16] <== NOT EXECUTED
handle->bnum = 0;
38460: e5856014 str r6, [r5, #20] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_open (fs, &handle->buffer);
if ((rc == 0) && load)
38464: 01a00008 moveq r0, r8 <== NOT EXECUTED
38468: 08bd8ff0 popeq {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
rc = rtems_rfs_inode_load (fs, handle);
3846c: e1a00004 mov r0, r4 <== NOT EXECUTED
38470: e1a01005 mov r1, r5 <== NOT EXECUTED
return rc;
}
38474: 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);
38478: eaffffbb b 3836c <rtems_rfs_inode_load> <== NOT EXECUTED
3847c: e3a00016 mov r0, #22 <== NOT EXECUTED
return rc;
}
38480: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00036ec0 <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,
36ec0: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
36ec4: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
/**
* Return the inode overhead given a number of inodes.
*/
static int
rtems_rfs_inode_overhead (rtems_rfs_file_system* fs)
{
36ec8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
36ecc: e1a04000 mov r4, r0 <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
36ed0: e0100392 muls r0, r2, r3 <== 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,
36ed4: e5945008 ldr r5, [r4, #8] <== NOT EXECUTED
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
36ed8: 03a00001 moveq r0, #1 <== NOT EXECUTED
36edc: 0a000003 beq 36ef0 <rtems_rfs_inode_overhead+0x30> <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
36ee0: e2400001 sub r0, r0, #1 <== NOT EXECUTED
36ee4: e1a01005 mov r1, r5 <== NOT EXECUTED
36ee8: eb007d05 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
36eec: e2800001 add r0, r0, #1 <== 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))
36ef0: 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));
36ef4: 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))
36ef8: e2433001 sub r3, r3, #1 <== NOT EXECUTED
bits_per_block = rtems_rfs_fs_blocks (fs) - RTEMS_RFS_SUPERBLOCK_SIZE;
36efc: e1510003 cmp r1, r3 <== NOT EXECUTED
36f00: 21a01003 movcs r1, r3 <== NOT EXECUTED
36f04: e2800001 add r0, r0, #1 <== NOT EXECUTED
36f08: e3a03ffa mov r3, #1000 ; 0x3e8 <== NOT EXECUTED
36f0c: e0000093 mul r0, r3, r0 <== NOT EXECUTED
36f10: eb007d3f bl 56414 <__aeabi_idiv> <== NOT EXECUTED
return ((blocks + 1) * 100 * 10) / bits_per_block;
}
36f14: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00038074 <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))
38074: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
38078: e3530000 cmp r3, #0 <== NOT EXECUTED
int
rtems_rfs_inode_time_stamp_now (rtems_rfs_inode_handle* handle,
bool atime,
bool mtime)
{
3807c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
38080: e1a04000 mov r4, r0 <== NOT EXECUTED
38084: e20160ff and r6, r1, #255 ; 0xff <== NOT EXECUTED
38088: e20250ff and r5, r2, #255 ; 0xff <== NOT EXECUTED
time_t now;
if (!rtems_rfs_inode_is_loaded (handle))
3808c: 03a00006 moveq r0, #6 <== NOT EXECUTED
38090: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return ENXIO;
now = time (NULL);
38094: e3a00000 mov r0, #0 <== NOT EXECUTED
38098: eb00484d bl 4a1d4 <time> <== NOT EXECUTED
if (atime)
3809c: e3560000 cmp r6, #0 <== NOT EXECUTED
380a0: 0a00000c beq 380d8 <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);
380a4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
380a8: e1a02c20 lsr r2, r0, #24 <== NOT EXECUTED
380ac: e5c32010 strb r2, [r3, #16] <== NOT EXECUTED
380b0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
380b4: e1a02820 lsr r2, r0, #16 <== NOT EXECUTED
380b8: e5c32011 strb r2, [r3, #17] <== NOT EXECUTED
380bc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
380c0: e1a02420 lsr r2, r0, #8 <== NOT EXECUTED
380c4: e5c32012 strb r2, [r3, #18] <== NOT EXECUTED
380c8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
380cc: e5c30013 strb r0, [r3, #19] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
380d0: e3a03001 mov r3, #1 <== NOT EXECUTED
380d4: e5c43010 strb r3, [r4, #16] <== NOT EXECUTED
rtems_rfs_inode_set_atime (handle, now);
if (mtime)
380d8: e3550000 cmp r5, #0 <== NOT EXECUTED
380dc: 01a00005 moveq r0, r5 <== NOT EXECUTED
380e0: 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);
380e4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
380e8: e1a02c20 lsr r2, r0, #24 <== NOT EXECUTED
380ec: e5c32014 strb r2, [r3, #20] <== NOT EXECUTED
380f0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
380f4: e1a02820 lsr r2, r0, #16 <== NOT EXECUTED
380f8: e5c32015 strb r2, [r3, #21] <== NOT EXECUTED
380fc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
38100: e1a02420 lsr r2, r0, #8 <== NOT EXECUTED
38104: e5c32016 strb r2, [r3, #22] <== NOT EXECUTED
38108: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3810c: e5c30017 strb r0, [r3, #23] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38110: e3a03001 mov r3, #1 <== NOT EXECUTED
38114: e5c43010 strb r3, [r4, #16] <== NOT EXECUTED
38118: e3a00000 mov r0, #0 <== NOT EXECUTED
rtems_rfs_inode_set_mtime (handle, now);
return 0;
}
3811c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00038290 <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))
38290: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
38294: e3530000 cmp r3, #0 <== NOT EXECUTED
int
rtems_rfs_inode_unload (rtems_rfs_file_system* fs,
rtems_rfs_inode_handle* handle,
bool update_ctime)
{
38298: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3829c: e20220ff and r2, r2, #255 ; 0xff <== NOT EXECUTED
382a0: e1a04001 mov r4, r1 <== NOT EXECUTED
382a4: 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))
382a8: 0a000020 beq 38330 <rtems_rfs_inode_unload+0xa0> <== NOT EXECUTED
{
if (handle->loads == 0)
382ac: e5910024 ldr r0, [r1, #36] ; 0x24 <== NOT EXECUTED
382b0: e3500000 cmp r0, #0 <== NOT EXECUTED
382b4: 02800005 addeq r0, r0, #5 <== NOT EXECUTED
382b8: 08bd8030 popeq {r4, r5, pc} <== NOT EXECUTED
return EIO;
handle->loads--;
382bc: e2400001 sub r0, r0, #1 <== NOT EXECUTED
if (handle->loads == 0)
382c0: e3500000 cmp r0, #0 <== NOT EXECUTED
if (rtems_rfs_inode_is_loaded (handle))
{
if (handle->loads == 0)
return EIO;
handle->loads--;
382c4: e5810024 str r0, [r1, #36] ; 0x24 <== NOT EXECUTED
if (handle->loads == 0)
382c8: 1a000018 bne 38330 <rtems_rfs_inode_unload+0xa0> <== NOT EXECUTED
{
/*
* If the buffer is dirty it will be release. Also set the ctime.
*/
if (rtems_rfs_buffer_dirty (&handle->buffer) && update_ctime)
382cc: e5d13010 ldrb r3, [r1, #16] <== NOT EXECUTED
382d0: e3530000 cmp r3, #0 <== NOT EXECUTED
382d4: 0a00000f beq 38318 <rtems_rfs_inode_unload+0x88> <== NOT EXECUTED
382d8: e3520000 cmp r2, #0 <== NOT EXECUTED
382dc: 0a00000d beq 38318 <rtems_rfs_inode_unload+0x88> <== NOT EXECUTED
rtems_rfs_inode_set_ctime (handle, time (NULL));
382e0: eb0047bb bl 4a1d4 <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);
382e4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
382e8: e1a02c20 lsr r2, r0, #24 <== NOT EXECUTED
382ec: e5c32018 strb r2, [r3, #24] <== NOT EXECUTED
382f0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
382f4: e1a02820 lsr r2, r0, #16 <== NOT EXECUTED
382f8: e5c32019 strb r2, [r3, #25] <== NOT EXECUTED
382fc: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
38300: e1a02420 lsr r2, r0, #8 <== NOT EXECUTED
38304: e5c3201a strb r2, [r3, #26] <== NOT EXECUTED
38308: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
3830c: e5c3001b strb r0, [r3, #27] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38310: e3a03001 mov r3, #1 <== NOT EXECUTED
38314: e5c43010 strb r3, [r4, #16] <== NOT EXECUTED
rc = rtems_rfs_buffer_handle_release (fs, &handle->buffer);
38318: e1a00005 mov r0, r5 <== NOT EXECUTED
3831c: e2841010 add r1, r4, #16 <== NOT EXECUTED
38320: ebfff335 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->node = NULL;
38324: e3a03000 mov r3, #0 <== NOT EXECUTED
38328: e584300c str r3, [r4, #12] <== NOT EXECUTED
3832c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
38330: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return rc;
}
38334: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00038d54 <rtems_rfs_link>:
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
38d54: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
38d58: e24dd054 sub sp, sp, #84 ; 0x54 <== NOT EXECUTED
38d5c: 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);
38d60: e28d5004 add r5, sp, #4 <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
38d64: e1a08001 mov r8, r1 <== NOT EXECUTED
38d68: e1a0a002 mov sl, r2 <== NOT EXECUTED
38d6c: e1a06003 mov r6, 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);
38d70: e1a0100b mov r1, fp <== NOT EXECUTED
38d74: e1a02005 mov r2, r5 <== NOT EXECUTED
38d78: e3a03001 mov r3, #1 <== NOT EXECUTED
const char* name,
int length,
rtems_rfs_ino parent,
rtems_rfs_ino target,
bool link_dir)
{
38d7c: e1a04000 mov r4, r0 <== NOT EXECUTED
38d80: e5dd707c ldrb r7, [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);
38d84: ebfffd8e bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
38d88: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38d8c: 1a000043 bne 38ea0 <rtems_rfs_link+0x14c> <== 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)))
38d90: e3570000 cmp r7, #0 <== NOT EXECUTED
38d94: 1a00000a bne 38dc4 <rtems_rfs_link+0x70> <== 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);
38d98: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
38d9c: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
38da0: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
38da4: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
38da8: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
38dac: 1a000004 bne 38dc4 <rtems_rfs_link+0x70> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
38db0: e1a00004 mov r0, r4 <== NOT EXECUTED
38db4: e1a01005 mov r1, r5 <== NOT EXECUTED
38db8: ebfffd5e bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
38dbc: e3a09086 mov r9, #134 ; 0x86 <== NOT EXECUTED
return ENOTSUP;
38dc0: ea000036 b 38ea0 <rtems_rfs_link+0x14c> <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
38dc4: e28d502c add r5, sp, #44 ; 0x2c <== NOT EXECUTED
38dc8: e1a01006 mov r1, r6 <== NOT EXECUTED
38dcc: e1a00004 mov r0, r4 <== NOT EXECUTED
38dd0: e1a02005 mov r2, r5 <== NOT EXECUTED
38dd4: e3a03001 mov r3, #1 <== NOT EXECUTED
38dd8: ebfffd79 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
38ddc: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38de0: 1a00000a bne 38e10 <rtems_rfs_link+0xbc> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_dir_add_entry (fs, &parent_inode, name, length, target);
38de4: e1a02008 mov r2, r8 <== NOT EXECUTED
38de8: e1a0300a mov r3, sl <== NOT EXECUTED
38dec: e1a00004 mov r0, r4 <== NOT EXECUTED
38df0: e1a01005 mov r1, r5 <== NOT EXECUTED
38df4: e58db000 str fp, [sp] <== NOT EXECUTED
38df8: ebfff2f9 bl 359e4 <rtems_rfs_dir_add_entry> <== NOT EXECUTED
if (rc > 0)
38dfc: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38e00: da000006 ble 38e20 <rtems_rfs_link+0xcc> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &parent_inode);
38e04: e1a01005 mov r1, r5 <== NOT EXECUTED
38e08: e1a00004 mov r0, r4 <== NOT EXECUTED
38e0c: ebfffd49 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
38e10: e1a00004 mov r0, r4 <== NOT EXECUTED
38e14: e28d1004 add r1, sp, #4 <== NOT EXECUTED
38e18: ebfffd46 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
38e1c: ea00001f b 38ea0 <rtems_rfs_link+0x14c> <== 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);
38e20: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
38e24: e5d31000 ldrb r1, [r3] <== NOT EXECUTED
38e28: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
38e2c: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
38e30: e59f1074 ldr r1, [pc, #116] ; 38eac <rtems_rfs_link+0x158> <== NOT EXECUTED
38e34: e1520001 cmp r2, r1 <== NOT EXECUTED
38e38: 03a02000 moveq r2, #0 <== NOT EXECUTED
}
links = rtems_rfs_inode_get_links (&target_inode) + 1;
38e3c: e2822001 add r2, r2, #1 <== NOT EXECUTED
38e40: e1a02802 lsl r2, r2, #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);
38e44: e1a01c22 lsr r1, r2, #24 <== NOT EXECUTED
38e48: e5c31000 strb r1, [r3] <== NOT EXECUTED
38e4c: e59d0010 ldr r0, [sp, #16] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38e50: e3a03001 mov r3, #1 <== NOT EXECUTED
38e54: e1a02822 lsr r2, r2, #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);
38e58: e5c02001 strb r2, [r0, #1] <== NOT EXECUTED
rtems_rfs_inode_set_links (&target_inode, links);
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
38e5c: e1a01003 mov r1, r3 <== NOT EXECUTED
38e60: e1a00005 mov r0, r5 <== NOT EXECUTED
38e64: e1a02003 mov r2, r3 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38e68: e5cd3014 strb r3, [sp, #20] <== NOT EXECUTED
38e6c: ebfffc80 bl 38074 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
38e70: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38e74: caffffe2 bgt 38e04 <rtems_rfs_link+0xb0> <== 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);
38e78: e1a01005 mov r1, r5 <== NOT EXECUTED
38e7c: e1a00004 mov r0, r4 <== NOT EXECUTED
38e80: ebfffd2c bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
38e84: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38e88: e28d1004 add r1, sp, #4 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
38e8c: c1a00004 movgt r0, r4 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
if (rc > 0)
38e90: caffffe0 bgt 38e18 <rtems_rfs_link+0xc4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
rc = rtems_rfs_inode_close (fs, &target_inode);
38e94: e1a00004 mov r0, r4 <== NOT EXECUTED
38e98: ebfffd26 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
38e9c: e1a09000 mov r9, r0 <== NOT EXECUTED
return rc;
}
38ea0: e1a00009 mov r0, r9 <== NOT EXECUTED
38ea4: e28dd054 add sp, sp, #84 ; 0x54 <== NOT EXECUTED
38ea8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00038ecc <rtems_rfs_mutex_create>:
RTEMS_NO_INHERIT_PRIORITY | RTEMS_NO_PRIORITY_CEILING | RTEMS_LOCAL)
#endif
int
rtems_rfs_mutex_create (rtems_rfs_mutex* mutex)
{
38ecc: e92d4001 push {r0, lr} <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_create (rtems_build_name ('R', 'F', 'S', 'm'),
38ed0: e3a01001 mov r1, #1 <== NOT EXECUTED
38ed4: e58d0000 str r0, [sp] <== NOT EXECUTED
38ed8: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED
38edc: e3a03000 mov r3, #0 <== NOT EXECUTED
38ee0: e59f0010 ldr r0, [pc, #16] ; 38ef8 <rtems_rfs_mutex_create+0x2c><== NOT EXECUTED
38ee4: ebff49cc bl b61c <rtems_semaphore_create> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
38ee8: e3500000 cmp r0, #0 <== NOT EXECUTED
38eec: 13a00005 movne r0, #5 <== NOT EXECUTED
38ef0: 03a00000 moveq r0, #0 <== NOT EXECUTED
38ef4: e8bd8008 pop {r3, pc} <== NOT EXECUTED
00038eb0 <rtems_rfs_mutex_destroy>:
return 0;
}
int
rtems_rfs_mutex_destroy (rtems_rfs_mutex* mutex)
{
38eb0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
#if __rtems__
rtems_status_code sc;
sc = rtems_semaphore_delete (*mutex);
38eb4: e5900000 ldr r0, [r0] <== NOT EXECUTED
38eb8: ebff4a42 bl b7c8 <rtems_semaphore_delete> <== NOT EXECUTED
rtems_status_text (sc));
return EIO;
}
#endif
return 0;
}
38ebc: e3500000 cmp r0, #0 <== NOT EXECUTED
38ec0: 13a00005 movne r0, #5 <== NOT EXECUTED
38ec4: 03a00000 moveq r0, #0 <== NOT EXECUTED
38ec8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00034e48 <rtems_rfs_release_chain>:
static int
rtems_rfs_release_chain (rtems_chain_control* chain,
uint32_t* count,
bool modified)
{
34e48: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
34e4c: e3a05000 mov r5, #0 <== NOT EXECUTED
34e50: e1a04000 mov r4, r0 <== NOT EXECUTED
34e54: e1a06001 mov r6, r1 <== NOT EXECUTED
34e58: e202a0ff and sl, r2, #255 ; 0xff <== NOT EXECUTED
34e5c: e2808004 add r8, r0, #4 <== NOT EXECUTED
while (!rtems_chain_is_empty (chain))
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
buffer->user = (void*) 0;
34e60: e1a07005 mov r7, 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))
34e64: ea00000d b 34ea0 <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 );
34e68: ebff5d90 bl c4b0 <_Chain_Get> <== NOT EXECUTED
{
buffer = (rtems_rfs_buffer*) rtems_chain_get (chain);
(*count)--;
34e6c: e5962000 ldr r2, [r6] <== NOT EXECUTED
34e70: e2422001 sub r2, r2, #1 <== NOT EXECUTED
34e74: e5862000 str r2, [r6] <== NOT EXECUTED
buffer->user = (void*) 0;
34e78: e5807038 str r7, [r0, #56] ; 0x38 <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
34e7c: e1a0100a mov r1, sl <== NOT EXECUTED
34e80: eb0023a1 bl 3dd0c <rtems_rfs_buffer_bdbuf_release> <== NOT EXECUTED
if ((rc > 0) && (rrc == 0))
34e84: e3500000 cmp r0, #0 <== NOT EXECUTED
34e88: d3a03000 movle r3, #0 <== NOT EXECUTED
34e8c: c3a03001 movgt r3, #1 <== NOT EXECUTED
34e90: e3550000 cmp r5, #0 <== NOT EXECUTED
34e94: 13a03000 movne r3, #0 <== NOT EXECUTED
34e98: e3530000 cmp r3, #0 <== NOT EXECUTED
34e9c: 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))
34ea0: e5943000 ldr r3, [r4] <== NOT EXECUTED
34ea4: e1530008 cmp r3, r8 <== NOT EXECUTED
34ea8: e1a00004 mov r0, r4 <== NOT EXECUTED
34eac: 1affffed bne 34e68 <rtems_rfs_release_chain+0x20> <== NOT EXECUTED
rc = rtems_rfs_buffer_io_release (buffer, modified);
if ((rc > 0) && (rrc == 0))
rrc = rc;
}
return rrc;
}
34eb0: e1a00005 mov r0, r5 <== NOT EXECUTED
34eb4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0001e1f8 <rtems_rfs_rtems_chown>:
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
1e1f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1e1fc: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
1e200: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1e204: e5908000 ldr r8, [r0] <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
1e208: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
1e20c: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED
1e210: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_CHOWN))
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
1e214: e1a00004 mov r0, r4 <== NOT EXECUTED
static int
rtems_rfs_rtems_chown (rtems_filesystem_location_info_t *pathloc,
uid_t owner,
gid_t group)
{
1e218: e1a05821 lsr r5, r1, #16 <== NOT EXECUTED
1e21c: e1a07822 lsr r7, r2, #16 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_CHOWN))
printf ("rtems-rfs-rtems: chown: in: ino:%" PRId32 " uid:%d gid:%d\n",
ino, owner, group);
rtems_rfs_rtems_lock (fs);
1e220: ebffffe9 bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1e224: e1a01008 mov r1, r8 <== NOT EXECUTED
1e228: e1a00004 mov r0, r4 <== NOT EXECUTED
1e22c: e1a0200d mov r2, sp <== NOT EXECUTED
1e230: e3a03001 mov r3, #1 <== NOT EXECUTED
1e234: eb006862 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
1e238: 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);
1e23c: e1a0600d mov r6, sp <== NOT EXECUTED
if (rc > 0)
1e240: da000004 ble 1e258 <rtems_rfs_rtems_chown+0x60> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e244: e1a00004 mov r0, r4 <== NOT EXECUTED
1e248: ebffffe4 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: opening inode", rc);
1e24c: eb00805d bl 3e3c8 <__errno> <== NOT EXECUTED
1e250: e5808000 str r8, [r0] <== NOT EXECUTED
1e254: ea000011 b 1e2a0 <rtems_rfs_rtems_chown+0xa8> <== NOT EXECUTED
/*
* Verify I am the owner of the node or the super user.
*/
#if defined (RTEMS_POSIX_API)
uid = geteuid();
1e258: eb001d07 bl 2567c <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;
1e25c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e260: e2832004 add r2, r3, #4 <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
1e264: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
1e268: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
1e26c: e1812402 orr r2, r1, r2, lsl #8 <== NOT EXECUTED
1e270: e1500002 cmp r0, r2 <== NOT EXECUTED
1e274: 0a00000b beq 1e2a8 <rtems_rfs_rtems_chown+0xb0> <== NOT EXECUTED
1e278: e3500000 cmp r0, #0 <== NOT EXECUTED
1e27c: 0a000009 beq 1e2a8 <rtems_rfs_rtems_chown+0xb0> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1e280: e1a0100d mov r1, sp <== NOT EXECUTED
1e284: e1a00004 mov r0, r4 <== NOT EXECUTED
1e288: eb00682a bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1e28c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e290: ebffffd2 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: not able", EPERM);
1e294: eb00804b bl 3e3c8 <__errno> <== NOT EXECUTED
1e298: e3a03001 mov r3, #1 <== NOT EXECUTED
1e29c: e5803000 str r3, [r0] <== NOT EXECUTED
1e2a0: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e2a4: ea000019 b 1e310 <rtems_rfs_rtems_chown+0x118> <== 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);
1e2a8: e1857807 orr r7, r5, r7, lsl #16 <== NOT EXECUTED
1e2ac: e1a02c27 lsr r2, r7, #24 <== NOT EXECUTED
1e2b0: e5c32004 strb r2, [r3, #4] <== NOT EXECUTED
1e2b4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e2b8: e1a02827 lsr r2, r7, #16 <== NOT EXECUTED
1e2bc: e5c32005 strb r2, [r3, #5] <== NOT EXECUTED
1e2c0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e2c4: e1a07427 lsr r7, r7, #8 <== NOT EXECUTED
1e2c8: e5c37006 strb r7, [r3, #6] <== NOT EXECUTED
1e2cc: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
}
#endif
rtems_rfs_inode_set_uid_gid (&inode, owner, group);
rc = rtems_rfs_inode_close (fs, &inode);
1e2d0: e1a00004 mov r0, r4 <== NOT EXECUTED
1e2d4: e5c35007 strb r5, [r3, #7] <== NOT EXECUTED
1e2d8: e1a0100d mov r1, sp <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1e2dc: e3a03001 mov r3, #1 <== NOT EXECUTED
1e2e0: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
1e2e4: eb006813 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
1e2e8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1e2ec: 0a000004 beq 1e304 <rtems_rfs_rtems_chown+0x10c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e2f0: e1a00004 mov r0, r4 <== NOT EXECUTED
1e2f4: ebffffb9 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("chown: closing inode", rc);
1e2f8: eb008032 bl 3e3c8 <__errno> <== NOT EXECUTED
1e2fc: e5805000 str r5, [r0] <== NOT EXECUTED
1e300: eaffffe6 b 1e2a0 <rtems_rfs_rtems_chown+0xa8> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1e304: e1a00004 mov r0, r4 <== NOT EXECUTED
1e308: ebffffb4 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1e30c: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
1e310: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
1e314: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00039000 <rtems_rfs_rtems_device_close>:
* @return int
*/
static int
rtems_rfs_rtems_device_close (rtems_libio_t* iop)
{
39000: e92d4007 push {r0, r1, r2, lr} <== NOT EXECUTED
39004: e1a03000 mov r3, r0 <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.flags = 0;
39008: e3a0c000 mov ip, #0 <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
3900c: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
39010: 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);
39014: e1a0200d mov r2, sp <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
39018: e58d3000 str r3, [sp] <== NOT EXECUTED
args.flags = 0;
args.mode = 0;
3901c: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.flags = 0;
39020: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
args.mode = 0;
status = rtems_io_close (major, minor, (void *) &args);
39024: eb0009f7 bl 3b808 <rtems_io_close> <== NOT EXECUTED
if (status)
39028: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3902c: 01a00003 moveq r0, r3 <== NOT EXECUTED
return rtems_deviceio_errno (status);
39030: 1b000251 blne 3997c <rtems_deviceio_errno> <== NOT EXECUTED
return 0;
}
39034: e8bd800e pop {r1, r2, r3, pc} <== NOT EXECUTED
00038f08 <rtems_rfs_rtems_device_ftruncate>:
static int
rtems_rfs_rtems_device_ftruncate (rtems_libio_t* iop, rtems_off64_t length)
{
return 0;
}
38f08: e3a00000 mov r0, #0 <== NOT EXECUTED
38f0c: e12fff1e bx lr <== NOT EXECUTED
00038f10 <rtems_rfs_rtems_device_ioctl>:
static int
rtems_rfs_rtems_device_ioctl (rtems_libio_t* iop,
uint32_t command,
void* buffer)
{
38f10: e92d400f push {r0, r1, r2, r3, lr} <== NOT EXECUTED
38f14: e1a03000 mov r3, r0 <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
38f18: e593c034 ldr ip, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_libio_ioctl_args_t args;
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
38f1c: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
args.iop = iop;
args.command = command;
args.buffer = buffer;
38f20: e98d0006 stmib sp, {r1, r2} <== NOT EXECUTED
status = rtems_io_control (major, minor, (void *) &args);
38f24: e1a0200d mov r2, sp <== NOT EXECUTED
38f28: e1a0100c mov r1, ip <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
38f2c: e58d3000 str r3, [sp] <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
38f30: eb000a48 bl 3b858 <rtems_io_control> <== NOT EXECUTED
if (status)
38f34: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return args.ioctl_return;
38f38: 059d000c ldreq r0, [sp, #12] <== NOT EXECUTED
args.command = command;
args.buffer = buffer;
status = rtems_io_control (major, minor, (void *) &args);
if (status)
return rtems_deviceio_errno (status);
38f3c: 1b00028e blne 3997c <rtems_deviceio_errno> <== NOT EXECUTED
return args.ioctl_return;
}
38f40: e28dd010 add sp, sp, #16 <== NOT EXECUTED
38f44: e8bd8000 pop {pc} <== NOT EXECUTED
00038efc <rtems_rfs_rtems_device_lseek>:
rtems_rfs_rtems_device_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
return offset;
}
38efc: e1a00001 mov r0, r1 <== NOT EXECUTED
38f00: e1a01002 mov r1, r2 <== NOT EXECUTED
38f04: e12fff1e bx lr <== NOT EXECUTED
00039050 <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)
{
39050: 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);
39054: e5902028 ldr r2, [r0, #40] ; 0x28 <== NOT EXECUTED
39058: e5925034 ldr r5, [r2, #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);
3905c: e595207c ldr r2, [r5, #124] ; 0x7c <== NOT EXECUTED
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
39060: e24dd040 sub sp, sp, #64 ; 0x40 <== NOT EXECUTED
rtems_libio_open_close_args_t args;
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
39064: e5907038 ldr r7, [r0, #56] ; 0x38 <== NOT EXECUTED
39068: e3a01000 mov r1, #0 <== NOT EXECUTED
static int
rtems_rfs_rtems_device_open ( rtems_libio_t *iop,
const char *pathname,
uint32_t flag,
uint32_t mode)
{
3906c: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_status_code status;
int rc;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
39070: e28d600c add r6, sp, #12 <== NOT EXECUTED
39074: e5920000 ldr r0, [r2] <== NOT EXECUTED
39078: 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)
{
3907c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
39080: ebff4a0e bl b8c0 <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);
39084: e1a01007 mov r1, r7 <== NOT EXECUTED
39088: e1a00005 mov r0, r5 <== NOT EXECUTED
3908c: e1a02006 mov r2, r6 <== NOT EXECUTED
39090: e3a03001 mov r3, #1 <== NOT EXECUTED
39094: ebfffcca bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
39098: e2507000 subs r7, r0, #0 <== NOT EXECUTED
3909c: da000004 ble 390b4 <rtems_rfs_rtems_device_open+0x64> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
390a0: e1a00005 mov r0, r5 <== NOT EXECUTED
390a4: ebffffe3 bl 39038 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: opening inode", rc);
390a8: eb0014c6 bl 3e3c8 <__errno> <== NOT EXECUTED
390ac: e5807000 str r7, [r0] <== NOT EXECUTED
390b0: ea000016 b 39110 <rtems_rfs_rtems_device_open+0xc0> <== 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]);
390b4: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
390b8: e283201c add r2, r3, #28 <== NOT EXECUTED
390bc: e5d2c006 ldrb ip, [r2, #6] <== NOT EXECUTED
390c0: e5d3a01c ldrb sl, [r3, #28] <== NOT EXECUTED
390c4: e5d23002 ldrb r3, [r2, #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);
390c8: e1a01006 mov r1, r6 <== NOT EXECUTED
390cc: e1a00005 mov r0, r5 <== NOT EXECUTED
390d0: e5d26007 ldrb r6, [r2, #7] <== NOT EXECUTED
390d4: e5d27001 ldrb r7, [r2, #1] <== NOT EXECUTED
390d8: e5d28003 ldrb r8, [r2, #3] <== NOT EXECUTED
390dc: e5d29004 ldrb r9, [r2, #4] <== NOT EXECUTED
390e0: e5d2b005 ldrb fp, [r2, #5] <== NOT EXECUTED
390e4: e88d1008 stm sp, {r3, ip} <== NOT EXECUTED
390e8: ebfffc92 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
390ec: e2502000 subs r2, r0, #0 <== NOT EXECUTED
390f0: e89d1008 ldm sp, {r3, ip} <== NOT EXECUTED
390f4: da000007 ble 39118 <rtems_rfs_rtems_device_open+0xc8> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
390f8: e1a00005 mov r0, r5 <== NOT EXECUTED
390fc: e58d2004 str r2, [sp, #4] <== NOT EXECUTED
39100: ebffffcc bl 39038 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
39104: eb0014af bl 3e3c8 <__errno> <== NOT EXECUTED
39108: e59d2004 ldr r2, [sp, #4] <== NOT EXECUTED
3910c: e5802000 str r2, [r0] <== NOT EXECUTED
39110: e3e00000 mvn r0, #0 <== NOT EXECUTED
39114: ea000016 b 39174 <rtems_rfs_rtems_device_open+0x124> <== NOT EXECUTED
39118: e1a0b80b lsl fp, fp, #16 <== NOT EXECUTED
3911c: e18b9c09 orr r9, fp, r9, lsl #24 <== NOT EXECUTED
39120: e1888c0a orr r8, r8, sl, lsl #24 <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
39124: e1a00005 mov r0, r5 <== NOT EXECUTED
39128: e1887807 orr r7, r8, r7, lsl #16 <== NOT EXECUTED
3912c: e1896006 orr r6, r9, r6 <== NOT EXECUTED
39130: e1877403 orr r7, r7, r3, lsl #8 <== NOT EXECUTED
39134: e186640c orr r6, r6, ip, lsl #8 <== NOT EXECUTED
39138: ebffffbe bl 39038 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
3913c: e594e014 ldr lr, [r4, #20] <== NOT EXECUTED
args.mode = mode;
39140: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
return rtems_rfs_rtems_error ("device_open: closing inode", rc);
}
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
39144: e5847030 str r7, [r4, #48] ; 0x30 <== NOT EXECUTED
iop->data1 = (void*)((intptr_t) minor);
39148: e5846034 str r6, [r4, #52] ; 0x34 <== NOT EXECUTED
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
3914c: e1a00007 mov r0, r7 <== NOT EXECUTED
39150: e1a01006 mov r1, r6 <== NOT EXECUTED
39154: e28d2034 add r2, sp, #52 ; 0x34 <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
args.mode = mode;
39158: e58d303c str r3, [sp, #60] ; 0x3c <== NOT EXECUTED
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
args.flags = iop->flags;
3915c: e58de038 str lr, [sp, #56] ; 0x38 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
iop->data0 = major;
iop->data1 = (void*)((intptr_t) minor);
args.iop = iop;
39160: e58d4034 str r4, [sp, #52] ; 0x34 <== NOT EXECUTED
args.flags = iop->flags;
args.mode = mode;
status = rtems_io_open (major, minor, (void *) &args);
39164: eb0009cf bl 3b8a8 <rtems_io_open> <== NOT EXECUTED
if (status)
39168: e2503000 subs r3, r0, #0 <== NOT EXECUTED
3916c: 01a00003 moveq r0, r3 <== NOT EXECUTED
return rtems_deviceio_errno(status);
39170: 1b000201 blne 3997c <rtems_deviceio_errno> <== NOT EXECUTED
return 0;
}
39174: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED
39178: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00038fa4 <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)
{
38fa4: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
38fa8: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
38fac: e593c014 ldr ip, [r3, #20] <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
38fb0: 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)
{
38fb4: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
38fb8: e283500c add r5, r3, #12 <== NOT EXECUTED
38fbc: 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;
38fc0: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
args.buffer = buffer;
38fc4: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
38fc8: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags;
38fcc: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
args.bytes_moved = 0;
status = rtems_io_read (major, minor, (void *) &args);
38fd0: 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;
38fd4: e3a0c000 mov ip, #0 <== NOT EXECUTED
status = rtems_io_read (major, minor, (void *) &args);
38fd8: e1a0200d mov r2, sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
38fdc: e98d0030 stmib sp, {r4, r5} <== NOT EXECUTED
args.buffer = buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
38fe0: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
38fe4: 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);
38fe8: eb000a42 bl 3b8f8 <rtems_io_read> <== NOT EXECUTED
if (status)
38fec: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
38ff0: 059d0018 ldreq r0, [sp, #24] <== 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);
38ff4: 1b000260 blne 3997c <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
38ff8: e28dd01c add sp, sp, #28 <== NOT EXECUTED
38ffc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00038f48 <rtems_rfs_rtems_device_write>:
static ssize_t
rtems_rfs_rtems_device_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
38f48: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
38f4c: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
38f50: e593c014 ldr ip, [r3, #20] <== NOT EXECUTED
rtems_status_code status;
int major;
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
38f54: 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)
{
38f58: e24dd01c sub sp, sp, #28 <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
38f5c: e283500c add r5, r3, #12 <== NOT EXECUTED
38f60: 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;
38f64: e5900030 ldr r0, [r0, #48] ; 0x30 <== NOT EXECUTED
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
args.buffer = (void *) buffer;
38f68: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count;
38f6c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags;
38f70: e58dc014 str ip, [sp, #20] <== NOT EXECUTED
args.bytes_moved = 0;
status = rtems_io_write (major, minor, (void *) &args);
38f74: 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;
38f78: e3a0c000 mov ip, #0 <== NOT EXECUTED
status = rtems_io_write (major, minor, (void *) &args);
38f7c: e1a0200d mov r2, sp <== NOT EXECUTED
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
args.offset = iop->offset;
38f80: e98d0030 stmib sp, {r4, r5} <== NOT EXECUTED
args.buffer = (void *) buffer;
args.count = count;
args.flags = iop->flags;
args.bytes_moved = 0;
38f84: e58dc018 str ip, [sp, #24] <== NOT EXECUTED
int minor;
major = (int) iop->data0;
minor = (intptr_t) iop->data1;
args.iop = iop;
38f88: 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);
38f8c: eb000a6d bl 3b948 <rtems_io_write> <== NOT EXECUTED
if (status)
38f90: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno (status);
return (ssize_t) args.bytes_moved;
38f94: 059d0018 ldreq r0, [sp, #24] <== 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);
38f98: 1b000277 blne 3997c <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved;
}
38f9c: e28dd01c add sp, sp, #28 <== NOT EXECUTED
38fa0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0003917c <rtems_rfs_rtems_dir_close>:
{
/*
* The RFS does not hold any resources. Nothing to do.
*/
return 0;
}
3917c: e3a00000 mov r0, #0 <== NOT EXECUTED
39180: e12fff1e bx lr <== NOT EXECUTED
00039184 <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)
39184: 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)
{
39188: e92d4010 push {r4, lr} <== NOT EXECUTED
switch (whence)
3918c: 93a03000 movls r3, #0 <== NOT EXECUTED
39190: 93a04000 movls r4, #0 <== NOT EXECUTED
39194: 9a000004 bls 391ac <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);
39198: eb00148a bl 3e3c8 <__errno> <== NOT EXECUTED
3919c: e3a03016 mov r3, #22 <== NOT EXECUTED
391a0: e5803000 str r3, [r0] <== NOT EXECUTED
391a4: e3e04000 mvn r4, #0 <== NOT EXECUTED
391a8: e3e03000 mvn r3, #0 <== NOT EXECUTED
break;
}
return 0;
}
391ac: e1a01004 mov r1, r4 <== NOT EXECUTED
391b0: e1a00003 mov r0, r3 <== NOT EXECUTED
391b4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00039374 <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);
39374: 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)
{
39378: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3937c: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
39380: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
39384: e5907038 ldr r7, [r0, #56] ; 0x38 <== NOT EXECUTED
39388: 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)
{
3938c: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
39390: e1a02001 mov r2, r1 <== NOT EXECUTED
39394: e1a06000 mov r6, r0 <== NOT EXECUTED
39398: e5930000 ldr r0, [r3] <== NOT EXECUTED
3939c: ebff4947 bl b8c0 <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);
393a0: e1a01007 mov r1, r7 <== NOT EXECUTED
393a4: e1a00004 mov r0, r4 <== NOT EXECUTED
393a8: e1a0200d mov r2, sp <== NOT EXECUTED
393ac: e3a03001 mov r3, #1 <== NOT EXECUTED
393b0: ebfffc03 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
393b4: 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);
393b8: e1a0500d mov r5, sp <== NOT EXECUTED
if (rc)
393bc: 0a000004 beq 393d4 <rtems_rfs_rtems_dir_open+0x60> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
393c0: e1a00004 mov r0, r4 <== NOT EXECUTED
393c4: ebffff7b bl 391b8 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: opening inode", rc);
393c8: eb0013fe bl 3e3c8 <__errno> <== NOT EXECUTED
393cc: e5807000 str r7, [r0] <== NOT EXECUTED
393d0: ea00000d b 3940c <rtems_rfs_rtems_dir_open+0x98> <== 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);
393d4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
393d8: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
393dc: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
393e0: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
393e4: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
393e8: 0a000009 beq 39414 <rtems_rfs_rtems_dir_open+0xa0> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
393ec: e1a0100d mov r1, sp <== NOT EXECUTED
393f0: e1a00004 mov r0, r4 <== NOT EXECUTED
393f4: ebfffbcf bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
393f8: e1a00004 mov r0, r4 <== NOT EXECUTED
393fc: ebffff6d bl 391b8 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_open: not dir", ENOTDIR);
39400: eb0013f0 bl 3e3c8 <__errno> <== NOT EXECUTED
39404: e3a03014 mov r3, #20 <== NOT EXECUTED
39408: e5803000 str r3, [r0] <== NOT EXECUTED
3940c: e3e00000 mvn r0, #0 <== NOT EXECUTED
39410: ea000009 b 3943c <rtems_rfs_rtems_dir_open+0xc8> <== NOT EXECUTED
}
iop->offset = 0;
39414: e3a02000 mov r2, #0 <== NOT EXECUTED
39418: e3a03000 mov r3, #0 <== NOT EXECUTED
3941c: e586200c str r2, [r6, #12] <== NOT EXECUTED
39420: e5863010 str r3, [r6, #16] <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
39424: e1a0100d mov r1, sp <== NOT EXECUTED
39428: e1a00004 mov r0, r4 <== NOT EXECUTED
3942c: ebfffbc1 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
39430: e1a00004 mov r0, r4 <== NOT EXECUTED
39434: ebffff5f bl 391b8 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
39438: e1a00007 mov r0, r7 <== NOT EXECUTED
return 0;
}
3943c: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
39440: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00039260 <rtems_rfs_rtems_dir_read>:
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
39260: 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);
39264: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
39268: e24dd038 sub sp, sp, #56 ; 0x38 <== NOT EXECUTED
3926c: e1a06000 mov r6, r0 <== NOT EXECUTED
39270: e1a09001 mov r9, r1 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
39274: e1a00002 mov r0, r2 <== NOT EXECUTED
39278: e3a01e11 mov r1, #272 ; 0x110 <== NOT EXECUTED
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
3927c: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
39280: eb00741f bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
39284: e595307c ldr r3, [r5, #124] ; 0x7c <== NOT EXECUTED
39288: e3a01000 mov r1, #0 <== NOT EXECUTED
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
rtems_rfs_ino ino = rtems_rfs_rtems_get_iop_ino (iop);
3928c: e5964038 ldr r4, [r6, #56] ; 0x38 <== NOT EXECUTED
39290: e1a02001 mov r2, r1 <== NOT EXECUTED
struct dirent* dirent;
ssize_t bytes_transferred;
int d;
int rc;
count = count / sizeof (struct dirent);
39294: e1a0b000 mov fp, r0 <== NOT EXECUTED
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
39298: e28d800c add r8, sp, #12 <== NOT EXECUTED
3929c: e5930000 ldr r0, [r3] <== NOT EXECUTED
392a0: ebff4986 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
392a4: e1a01004 mov r1, r4 <== NOT EXECUTED
392a8: e1a00005 mov r0, r5 <== NOT EXECUTED
392ac: e1a02008 mov r2, r8 <== NOT EXECUTED
392b0: e3a03001 mov r3, #1 <== NOT EXECUTED
392b4: ebfffc42 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
392b8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
392bc: 01a04007 moveq r4, r7 <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
392c0: 028da034 addeq sl, sp, #52 ; 0x34 <== NOT EXECUTED
dirent = buffer;
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
if (rc)
392c4: 0a00001d beq 39340 <rtems_rfs_rtems_dir_read+0xe0> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
392c8: e1a00005 mov r0, r5 <== NOT EXECUTED
392cc: ebffffb9 bl 391b8 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
392d0: eb00143c bl 3e3c8 <__errno> <== NOT EXECUTED
392d4: e3e04000 mvn r4, #0 <== NOT EXECUTED
392d8: e5807000 str r7, [r0] <== NOT EXECUTED
392dc: ea000021 b 39368 <rtems_rfs_rtems_dir_read+0x108> <== NOT EXECUTED
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
392e0: e286300c add r3, r6, #12 <== NOT EXECUTED
392e4: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
392e8: e58dc000 str ip, [sp] <== NOT EXECUTED
392ec: e58da004 str sl, [sp, #4] <== NOT EXECUTED
392f0: ebfff076 bl 354d0 <rtems_rfs_dir_read> <== NOT EXECUTED
if (rc == ENOENT)
392f4: e3500002 cmp r0, #2 <== NOT EXECUTED
392f8: 0a000015 beq 39354 <rtems_rfs_rtems_dir_read+0xf4> <== NOT EXECUTED
{
rc = 0;
break;
}
if (rc > 0)
392fc: e3500000 cmp r0, #0 <== NOT EXECUTED
39300: da000005 ble 3931c <rtems_rfs_rtems_dir_read+0xbc> <== NOT EXECUTED
{
bytes_transferred = rtems_rfs_rtems_error ("dir_read: dir read", rc);
39304: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
39308: eb00142e bl 3e3c8 <__errno> <== NOT EXECUTED
3930c: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
39310: e3e04000 mvn r4, #0 <== NOT EXECUTED
39314: e5803000 str r3, [r0] <== NOT EXECUTED
39318: ea00000d b 39354 <rtems_rfs_rtems_dir_read+0xf4> <== NOT EXECUTED
break;
}
iop->offset += size;
3931c: e286100c add r1, r6, #12 <== NOT EXECUTED
39320: e8910003 ldm r1, {r0, r1} <== NOT EXECUTED
39324: e59dc034 ldr ip, [sp, #52] ; 0x34 <== NOT EXECUTED
39328: e090200c adds r2, r0, ip <== NOT EXECUTED
3932c: e2a13000 adc r3, r1, #0 <== NOT EXECUTED
39330: e586200c str r2, [r6, #12] <== NOT EXECUTED
39334: e5863010 str r3, [r6, #16] <== NOT EXECUTED
39338: 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++)
3933c: e2877001 add r7, r7, #1 <== NOT EXECUTED
39340: e157000b cmp r7, fp <== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_dir_read (fs, &inode, iop->offset, dirent, &size);
39344: e1a00005 mov r0, r5 <== NOT EXECUTED
39348: e1a01008 mov r1, r8 <== NOT EXECUTED
* exisiting file, the remaining entries will be placed in the buffer and the
* returned value will be equal to -m actual- times the size of a directory
* entry.
*/
static ssize_t
rtems_rfs_rtems_dir_read (rtems_libio_t* iop,
3934c: e089c004 add ip, r9, r4 <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_read: read inode", rc);
}
bytes_transferred = 0;
for (d = 0; d < count; d++, dirent++)
39350: 3affffe2 bcc 392e0 <rtems_rfs_rtems_dir_read+0x80> <== NOT EXECUTED
}
iop->offset += size;
bytes_transferred += sizeof (struct dirent);
}
rtems_rfs_inode_close (fs, &inode);
39354: e1a00005 mov r0, r5 <== NOT EXECUTED
39358: e28d100c add r1, sp, #12 <== NOT EXECUTED
3935c: ebfffbf5 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
39360: e1a00005 mov r0, r5 <== NOT EXECUTED
39364: ebffff93 bl 391b8 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return bytes_transferred;
}
39368: e1a00004 mov r0, r4 <== NOT EXECUTED
3936c: e28dd038 add sp, sp, #56 ; 0x38 <== NOT EXECUTED
39370: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000391d0 <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)
{
391d0: e92d40f1 push {r0, 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);
391d4: 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);
391d8: 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)
391dc: 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)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
391e0: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_pathloc);
391e4: 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);
391e8: 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)
391ec: 1a000003 bne 39200 <rtems_rfs_rtems_dir_rmnod+0x30> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: root inode", EBUSY);
391f0: eb001474 bl 3e3c8 <__errno> <== NOT EXECUTED
391f4: e3a03010 mov r3, #16 <== NOT EXECUTED
391f8: e5803000 str r3, [r0] <== NOT EXECUTED
391fc: ea000011 b 39248 <rtems_rfs_rtems_dir_rmnod+0x78> <== 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);
39200: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
39204: e3a01000 mov r1, #0 <== NOT EXECUTED
39208: e1a02001 mov r2, r1 <== NOT EXECUTED
3920c: e5930000 ldr r0, [r3] <== NOT EXECUTED
39210: ebff49aa bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_if_empty);
39214: e1a02005 mov r2, r5 <== NOT EXECUTED
39218: e3a0c001 mov ip, #1 <== NOT EXECUTED
3921c: e1a01007 mov r1, r7 <== NOT EXECUTED
39220: e1a03006 mov r3, r6 <== NOT EXECUTED
39224: e1a00004 mov r0, r4 <== NOT EXECUTED
39228: e58dc000 str ip, [sp] <== NOT EXECUTED
3922c: ebfffe46 bl 38b4c <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
39230: e2505000 subs r5, r0, #0 <== NOT EXECUTED
39234: 0a000005 beq 39250 <rtems_rfs_rtems_dir_rmnod+0x80> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
39238: e1a00004 mov r0, r4 <== NOT EXECUTED
3923c: ebffffdd bl 391b8 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("dir_rmnod: unlinking", rc);
39240: eb001460 bl 3e3c8 <__errno> <== NOT EXECUTED
39244: e5805000 str r5, [r0] <== NOT EXECUTED
39248: e3e00000 mvn r0, #0 <== NOT EXECUTED
3924c: ea000002 b 3925c <rtems_rfs_rtems_dir_rmnod+0x8c> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
39250: e1a00004 mov r0, r4 <== NOT EXECUTED
39254: ebffffd7 bl 391b8 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
39258: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
3925c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0001f008 <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)
{
1f008: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1f00c: 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)
{
1f010: 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);
1f014: 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)
{
1f018: 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);
1f01c: e58d103c str r1, [sp, #60] ; 0x3c <== NOT EXECUTED
rtems_rfs_ino node_ino;
uint32_t doff = 0;
1f020: 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)
{
1f024: e1a07002 mov r7, r2 <== NOT EXECUTED
1f028: e1a08000 mov r8, 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;
1f02c: 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);
1f030: e5934034 ldr r4, [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);
1f034: eb0097f1 bl 45000 <strlen> <== NOT EXECUTED
1f038: e0880000 add r0, r8, r0 <== NOT EXECUTED
1f03c: e5870000 str r0, [r7] <== NOT EXECUTED
while (*name != path)
1f040: ea000007 b 1f064 <rtems_rfs_rtems_eval_for_make+0x5c> <== NOT EXECUTED
{
(*name)--;
1f044: e5872000 str r2, [r7] <== NOT EXECUTED
if (rtems_filesystem_is_separator (**name))
1f048: e5530001 ldrb r0, [r3, #-1] <== NOT EXECUTED
1f04c: ebffa7cd bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
1f050: e3500000 cmp r0, #0 <== NOT EXECUTED
{
(*name)++;
1f054: 15973000 ldrne r3, [r7] <== NOT EXECUTED
1f058: 12833001 addne r3, r3, #1 <== NOT EXECUTED
1f05c: 15873000 strne r3, [r7] <== NOT EXECUTED
break;
1f060: 1a000003 bne 1f074 <rtems_rfs_rtems_eval_for_make+0x6c> <== 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)
1f064: e5973000 ldr r3, [r7] <== NOT EXECUTED
1f068: e1530008 cmp r3, r8 <== NOT EXECUTED
{
(*name)--;
1f06c: e2432001 sub r2, r3, #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)
1f070: 1afffff3 bne 1f044 <rtems_rfs_rtems_eval_for_make+0x3c> <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
1f074: e1a00008 mov r0, r8 <== NOT EXECUTED
1f078: eb0097e0 bl 45000 <strlen> <== NOT EXECUTED
1f07c: e1a01000 mov r1, r0 <== NOT EXECUTED
1f080: e1a00008 mov r0, r8 <== NOT EXECUTED
1f084: ebffa115 bl 74e0 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
path += stripped;
1f088: e0888000 add r8, r8, r0 <== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
1f08c: e1a00004 mov r0, r4 <== NOT EXECUTED
1f090: ebfffc4d bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1f094: e28d600c add r6, sp, #12 <== NOT EXECUTED
1f098: ea000000 b 1f0a0 <rtems_rfs_rtems_eval_for_make+0x98> <== NOT EXECUTED
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen(path));
path += stripped;
rtems_rfs_rtems_lock (fs);
1f09c: e1a08009 mov r8, r9 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1f0a0: e1a00004 mov r0, r4 <== NOT EXECUTED
1f0a4: e59d103c ldr r1, [sp, #60] ; 0x3c <== NOT EXECUTED
1f0a8: e1a02006 mov r2, r6 <== NOT EXECUTED
1f0ac: e3a03001 mov r3, #1 <== NOT EXECUTED
1f0b0: eb0064c3 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
1f0b4: e250a000 subs sl, r0, #0 <== NOT EXECUTED
1f0b8: da000004 ble 1f0d0 <rtems_rfs_rtems_eval_for_make+0xc8> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1f0bc: e1a00004 mov r0, r4 <== NOT EXECUTED
1f0c0: ebfffc46 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: read ino", rc);
1f0c4: eb007cbf bl 3e3c8 <__errno> <== NOT EXECUTED
1f0c8: e580a000 str sl, [r0] <== NOT EXECUTED
1f0cc: ea000012 b 1f11c <rtems_rfs_rtems_eval_for_make+0x114> <== 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);
1f0d0: 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)) &&
1f0d4: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
1f0d8: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
1f0dc: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
1f0e0: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
1f0e4: 1a00000e bne 1f124 <rtems_rfs_rtems_eval_for_make+0x11c> <== NOT EXECUTED
1f0e8: e1a00006 mov r0, r6 <== NOT EXECUTED
1f0ec: e3a01001 mov r1, #1 <== NOT EXECUTED
1f0f0: eb0001b1 bl 1f7bc <rtems_rfs_rtems_eval_perms> <== NOT EXECUTED
1f0f4: e3500000 cmp r0, #0 <== NOT EXECUTED
1f0f8: 1a000009 bne 1f124 <rtems_rfs_rtems_eval_for_make+0x11c> <== NOT EXECUTED
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
1f0fc: e1a01006 mov r1, r6 <== NOT EXECUTED
1f100: e1a00004 mov r0, r4 <== NOT EXECUTED
1f104: eb00648b bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f108: e1a00004 mov r0, r4 <== NOT EXECUTED
1f10c: ebfffc33 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: eval perms", EACCES);
1f110: eb007cac bl 3e3c8 <__errno> <== NOT EXECUTED
1f114: e3a0300d mov r3, #13 <== NOT EXECUTED
1f118: e5803000 str r3, [r0] <== NOT EXECUTED
1f11c: e3e05000 mvn r5, #0 <== NOT EXECUTED
1f120: ea0000bc b 1f418 <rtems_rfs_rtems_eval_for_make+0x410> <== NOT EXECUTED
}
/*
* Is this the end of the pathname we where given ?
*/
if (path == *name)
1f124: e5973000 ldr r3, [r7] <== NOT EXECUTED
1f128: e1580003 cmp r8, r3 <== NOT EXECUTED
1f12c: 0a000076 beq 1f30c <rtems_rfs_rtems_eval_for_make+0x304> <== NOT EXECUTED
1f130: e3a0a000 mov sl, #0 <== NOT EXECUTED
1f134: ea000000 b 1f13c <rtems_rfs_rtems_eval_for_make+0x134> <== NOT EXECUTED
node_len = 0;
while (!rtems_filesystem_is_separator(*path) &&
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
{
node_len++;
1f138: 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) &&
1f13c: e7d8000a ldrb r0, [r8, sl] <== NOT EXECUTED
1f140: ebffa790 bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
1f144: e3500000 cmp r0, #0 <== NOT EXECUTED
* @param pathloc
* @param name
* @return int
*/
int
rtems_rfs_rtems_eval_for_make (const char* path,
1f148: e088b00a add fp, r8, 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) &&
1f14c: 1a000006 bne 1f16c <rtems_rfs_rtems_eval_for_make+0x164> <== NOT EXECUTED
1f150: e7d8300a ldrb r3, [r8, sl] <== NOT EXECUTED
1f154: e3530000 cmp r3, #0 <== NOT EXECUTED
1f158: 0a000003 beq 1f16c <rtems_rfs_rtems_eval_for_make+0x164> <== NOT EXECUTED
(*path != '\0') &&
(node_len < (rtems_rfs_fs_max_name (fs) - 1)))
1f15c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
1f160: e2433001 sub r3, r3, #1 <== NOT EXECUTED
1f164: e15a0003 cmp sl, r3 <== NOT EXECUTED
1f168: 3afffff2 bcc 1f138 <rtems_rfs_rtems_eval_for_make+0x130> <== NOT EXECUTED
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
1f16c: e1a0000b mov r0, fp <== NOT EXECUTED
1f170: eb0097a2 bl 45000 <strlen> <== NOT EXECUTED
1f174: e1a01000 mov r1, r0 <== NOT EXECUTED
1f178: e1a0000b mov r0, fp <== NOT EXECUTED
1f17c: ebffa0d7 bl 74e0 <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))
1f180: e5d82000 ldrb r2, [r8] <== NOT EXECUTED
1f184: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
}
/*
* Eat any separators at start of the new path.
*/
stripped = rtems_filesystem_prefix_separators (path, strlen (path));
1f188: e1a03000 mov r3, r0 <== NOT EXECUTED
path += stripped;
1f18c: e08b9000 add r9, 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))
1f190: 1a00000e bne 1f1d0 <rtems_rfs_rtems_eval_for_make+0x1c8> <== NOT EXECUTED
1f194: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED
1f198: e3500000 cmp r0, #0 <== NOT EXECUTED
1f19c: 0a000004 beq 1f1b4 <rtems_rfs_rtems_eval_for_make+0x1ac> <== NOT EXECUTED
1f1a0: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
1f1a4: ebffa777 bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
1f1a8: e3500000 cmp r0, #0 <== NOT EXECUTED
1f1ac: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
1f1b0: 0a000006 beq 1f1d0 <rtems_rfs_rtems_eval_for_make+0x1c8> <== NOT EXECUTED
{
if (*path)
1f1b4: e7db3003 ldrb r3, [fp, r3] <== NOT EXECUTED
1f1b8: e3530000 cmp r3, #0 <== NOT EXECUTED
1f1bc: 0a000052 beq 1f30c <rtems_rfs_rtems_eval_for_make+0x304> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f1c0: e1a00004 mov r0, r4 <== NOT EXECUTED
1f1c4: e1a01006 mov r1, r6 <== NOT EXECUTED
1f1c8: eb00645a bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
continue;
1f1cc: eaffffb2 b 1f09c <rtems_rfs_rtems_eval_for_make+0x94> <== 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))
1f1d0: e7db3003 ldrb r3, [fp, r3] <== NOT EXECUTED
1f1d4: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
1f1d8: 1a000033 bne 1f2ac <rtems_rfs_rtems_eval_for_make+0x2a4> <== NOT EXECUTED
1f1dc: e5d93001 ldrb r3, [r9, #1] <== NOT EXECUTED
1f1e0: e353002e cmp r3, #46 ; 0x2e <== NOT EXECUTED
1f1e4: 1a000030 bne 1f2ac <rtems_rfs_rtems_eval_for_make+0x2a4> <== NOT EXECUTED
1f1e8: e5d90002 ldrb r0, [r9, #2] <== NOT EXECUTED
1f1ec: e3500000 cmp r0, #0 <== NOT EXECUTED
1f1f0: e289b002 add fp, r9, #2 <== NOT EXECUTED
1f1f4: 0a000002 beq 1f204 <rtems_rfs_rtems_eval_for_make+0x1fc> <== NOT EXECUTED
1f1f8: ebffa762 bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
1f1fc: e3500000 cmp r0, #0 <== NOT EXECUTED
1f200: 0a000029 beq 1f2ac <rtems_rfs_rtems_eval_for_make+0x2a4> <== NOT EXECUTED
{
/*
* If we are at the root inode of the file system we have a crossmount
* path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
1f204: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
1f208: e3530001 cmp r3, #1 <== NOT EXECUTED
1f20c: 1a000013 bne 1f260 <rtems_rfs_rtems_eval_for_make+0x258> <== 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);
1f210: e28d100c add r1, sp, #12 <== NOT EXECUTED
1f214: e1a00004 mov r0, r4 <== NOT EXECUTED
1f218: eb006446 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f21c: e1a00004 mov r0, r4 <== NOT EXECUTED
1f220: ebfffbee bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
*pathloc = pathloc->mt_entry->mt_point_node;
1f224: e595c010 ldr ip, [r5, #16] <== NOT EXECUTED
1f228: e28cc008 add ip, ip, #8 <== NOT EXECUTED
1f22c: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
1f230: e1a0e005 mov lr, r5 <== NOT EXECUTED
1f234: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
1f238: e59c2000 ldr r2, [ip] <== NOT EXECUTED
1f23c: e58e2000 str r2, [lr] <== NOT EXECUTED
return (*pathloc->ops->evalformake_h)(path + 2, pathloc, name);
1f240: e1a01005 mov r1, r5 <== NOT EXECUTED
1f244: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
1f248: e1a0000b mov r0, fp <== NOT EXECUTED
1f24c: e1a02007 mov r2, r7 <== NOT EXECUTED
1f250: e1a0e00f mov lr, pc <== NOT EXECUTED
1f254: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
1f258: e1a05000 mov r5, r0 <== NOT EXECUTED
1f25c: ea00006d b 1f418 <rtems_rfs_rtems_eval_for_make+0x410> <== NOT EXECUTED
1f260: 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)))
1f264: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
1f268: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
1f26c: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
1f270: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
1f274: 0a000007 beq 1f298 <rtems_rfs_rtems_eval_for_make+0x290> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f278: e1a01006 mov r1, r6 <== NOT EXECUTED
1f27c: e1a00004 mov r0, r4 <== NOT EXECUTED
1f280: eb00642c bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f284: e1a00004 mov r0, r4 <== NOT EXECUTED
1f288: ebfffbd4 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTSUP);
1f28c: eb007c4d bl 3e3c8 <__errno> <== NOT EXECUTED
1f290: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1f294: eaffff9f b 1f118 <rtems_rfs_rtems_eval_for_make+0x110> <== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
1f298: e1a00004 mov r0, r4 <== NOT EXECUTED
1f29c: e1a01006 mov r1, r6 <== NOT EXECUTED
1f2a0: e59f217c ldr r2, [pc, #380] ; 1f424 <rtems_rfs_rtems_eval_for_make+0x41c><== NOT EXECUTED
1f2a4: e3a03002 mov r3, #2 <== NOT EXECUTED
1f2a8: ea000003 b 1f2bc <rtems_rfs_rtems_eval_for_make+0x2b4> <== NOT EXECUTED
else
{
/*
* Read the inode so we know it exists and what type it is.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode,
1f2ac: e1a02008 mov r2, r8 <== NOT EXECUTED
1f2b0: e1a0300a mov r3, sl <== NOT EXECUTED
1f2b4: e1a00004 mov r0, r4 <== NOT EXECUTED
1f2b8: e1a01006 mov r1, r6 <== NOT EXECUTED
1f2bc: e28dc03c add ip, sp, #60 ; 0x3c <== NOT EXECUTED
1f2c0: e28de034 add lr, sp, #52 ; 0x34 <== NOT EXECUTED
1f2c4: e88d5000 stm sp, {ip, lr} <== NOT EXECUTED
1f2c8: eb005a6a bl 35c78 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
1f2cc: e2508000 subs r8, r0, #0 <== NOT EXECUTED
1f2d0: da000003 ble 1f2e4 <rtems_rfs_rtems_eval_for_make+0x2dc> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f2d4: e1a01006 mov r1, r6 <== NOT EXECUTED
1f2d8: e1a00004 mov r0, r4 <== NOT EXECUTED
1f2dc: eb006415 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
1f2e0: ea000004 b 1f2f8 <rtems_rfs_rtems_eval_for_make+0x2f0> <== 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);
1f2e4: e1a00004 mov r0, r4 <== NOT EXECUTED
1f2e8: e1a01006 mov r1, r6 <== NOT EXECUTED
1f2ec: eb006411 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
1f2f0: e2508000 subs r8, r0, #0 <== NOT EXECUTED
1f2f4: daffff68 ble 1f09c <rtems_rfs_rtems_eval_for_make+0x94> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1f2f8: e1a00004 mov r0, r4 <== NOT EXECUTED
1f2fc: ebfffbb7 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: closing node", rc);
1f300: eb007c30 bl 3e3c8 <__errno> <== NOT EXECUTED
1f304: e5808000 str r8, [r0] <== NOT EXECUTED
1f308: eaffff83 b 1f11c <rtems_rfs_rtems_eval_for_make+0x114> <== NOT EXECUTED
1f30c: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
}
}
if (!RTEMS_RFS_S_ISDIR (rtems_rfs_inode_get_mode (&inode)))
1f310: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
1f314: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
1f318: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
1f31c: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
1f320: e28d600c add r6, sp, #12 <== NOT EXECUTED
1f324: 0a000007 beq 1f348 <rtems_rfs_rtems_eval_for_make+0x340> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f328: e1a01006 mov r1, r6 <== NOT EXECUTED
1f32c: e1a00004 mov r0, r4 <== NOT EXECUTED
1f330: eb006400 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f334: e1a00004 mov r0, r4 <== NOT EXECUTED
1f338: ebfffba8 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: not dir", ENOTDIR);
1f33c: eb007c21 bl 3e3c8 <__errno> <== NOT EXECUTED
1f340: e3a03014 mov r3, #20 <== NOT EXECUTED
1f344: eaffff73 b 1f118 <rtems_rfs_rtems_eval_for_make+0x110> <== NOT EXECUTED
}
if (!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_WX))
1f348: e1a00006 mov r0, r6 <== NOT EXECUTED
1f34c: e3a01003 mov r1, #3 <== NOT EXECUTED
1f350: eb000119 bl 1f7bc <rtems_rfs_rtems_eval_perms> <== NOT EXECUTED
1f354: e3500000 cmp r0, #0 <== NOT EXECUTED
1f358: 0affff67 beq 1f0fc <rtems_rfs_rtems_eval_for_make+0xf4> <== NOT EXECUTED
}
/*
* Make sure the name does not already exists in the directory.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, *name, strlen (*name),
1f35c: e5977000 ldr r7, [r7] <== NOT EXECUTED
1f360: e1a00007 mov r0, r7 <== NOT EXECUTED
1f364: eb009725 bl 45000 <strlen> <== NOT EXECUTED
1f368: e28dc038 add ip, sp, #56 ; 0x38 <== NOT EXECUTED
1f36c: e1a03000 mov r3, r0 <== NOT EXECUTED
1f370: e1a02007 mov r2, r7 <== NOT EXECUTED
1f374: e58dc000 str ip, [sp] <== NOT EXECUTED
1f378: e1a00004 mov r0, r4 <== NOT EXECUTED
1f37c: e28dc034 add ip, sp, #52 ; 0x34 <== NOT EXECUTED
1f380: e1a01006 mov r1, r6 <== NOT EXECUTED
1f384: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
1f388: eb005a3a bl 35c78 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
&node_ino, &doff);
if (rc == 0)
1f38c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1f390: 1a000007 bne 1f3b4 <rtems_rfs_rtems_eval_for_make+0x3ac> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f394: e1a01006 mov r1, r6 <== NOT EXECUTED
1f398: e1a00004 mov r0, r4 <== NOT EXECUTED
1f39c: eb0063e5 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f3a0: e1a00004 mov r0, r4 <== NOT EXECUTED
1f3a4: ebfffb8d bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: found name", EEXIST);
1f3a8: eb007c06 bl 3e3c8 <__errno> <== NOT EXECUTED
1f3ac: e3a03011 mov r3, #17 <== NOT EXECUTED
1f3b0: eaffff58 b 1f118 <rtems_rfs_rtems_eval_for_make+0x110> <== NOT EXECUTED
}
if (rc != ENOENT)
1f3b4: e3570002 cmp r7, #2 <== NOT EXECUTED
1f3b8: 0a000007 beq 1f3dc <rtems_rfs_rtems_eval_for_make+0x3d4> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f3bc: e1a01006 mov r1, r6 <== NOT EXECUTED
1f3c0: e1a00004 mov r0, r4 <== NOT EXECUTED
1f3c4: eb0063db bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f3c8: e1a00004 mov r0, r4 <== NOT EXECUTED
1f3cc: ebfffb83 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_for_make: look up", rc);
1f3d0: eb007bfc bl 3e3c8 <__errno> <== NOT EXECUTED
1f3d4: e5807000 str r7, [r0] <== NOT EXECUTED
1f3d8: eaffff4f b 1f11c <rtems_rfs_rtems_eval_for_make+0x114> <== NOT EXECUTED
/*
* Set the parent ino in the path location.
*/
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
1f3dc: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
1f3e0: e5853000 str r3, [r5] <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
1f3e4: e59d3034 ldr r3, [sp, #52] ; 0x34 <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
1f3e8: e1a00005 mov r0, r5 <== 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);
1f3ec: e5853004 str r3, [r5, #4] <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
1f3f0: e1a01006 mov r1, r6 <== NOT EXECUTED
1f3f4: eb0000cd bl 1f730 <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);
1f3f8: e1a01006 mov r1, 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;
1f3fc: 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);
1f400: e1a00004 mov r0, r4 <== 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;
1f404: 03a05005 moveq r5, #5 <== NOT EXECUTED
1f408: 13a05000 movne r5, #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);
1f40c: eb0063c9 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f410: e1a00004 mov r0, r4 <== NOT EXECUTED
1f414: ebfffb71 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rc;
}
1f418: e1a00005 mov r0, r5 <== NOT EXECUTED
1f41c: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED
1f420: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001f428 <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)
{
1f428: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1f42c: e1a05003 mov r5, r3 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1f430: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED
1f434: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_inode_handle inode;
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1f438: e5953000 ldr r3, [r5] <== NOT EXECUTED
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
1f43c: 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);
1f440: e58d3040 str r3, [sp, #64] ; 0x40 <== NOT EXECUTED
uint32_t doff = 0;
1f444: e3a03000 mov r3, #0 <== NOT EXECUTED
int
rtems_rfs_rtems_eval_path (const char* path,
size_t pathlen,
int flags,
rtems_filesystem_location_info_t* pathloc)
{
1f448: e1a08001 mov r8, r1 <== NOT EXECUTED
1f44c: e1a06000 mov r6, 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);
uint32_t doff = 0;
1f450: e58d303c str r3, [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)
{
1f454: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
path, pathlen, ino);
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
1f458: ebffa020 bl 74e0 <rtems_filesystem_prefix_separators> <== NOT EXECUTED
1f45c: e1a07000 mov r7, r0 <== NOT EXECUTED
path += stripped;
pathlen -= stripped;
rtems_rfs_rtems_lock (fs);
1f460: e1a00004 mov r0, r4 <== NOT EXECUTED
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
1f464: e0678008 rsb r8, r7, r8 <== NOT EXECUTED
rtems_rfs_rtems_lock (fs);
1f468: ebfffb57 bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
/*
* Eat any separators at the start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
1f46c: e0867007 add r7, r6, r7 <== 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,
1f470: e28d9040 add r9, sp, #64 ; 0x40 <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1f474: e28d6014 add r6, sp, #20 <== NOT EXECUTED
1f478: ea000000 b 1f480 <rtems_rfs_rtems_eval_path+0x58> <== NOT EXECUTED
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
rtems_rfs_rtems_lock (fs);
1f47c: e59d700c ldr r7, [sp, #12] <== NOT EXECUTED
while (true)
{
/*
* Open and load the inode.
*/
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1f480: e1a00004 mov r0, r4 <== NOT EXECUTED
1f484: e59d1040 ldr r1, [sp, #64] ; 0x40 <== NOT EXECUTED
1f488: e1a02006 mov r2, r6 <== NOT EXECUTED
1f48c: e3a03001 mov r3, #1 <== NOT EXECUTED
1f490: eb0063cb bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
1f494: e250a000 subs sl, r0, #0 <== NOT EXECUTED
1f498: da000004 ble 1f4b0 <rtems_rfs_rtems_eval_path+0x88> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1f49c: e1a00004 mov r0, r4 <== NOT EXECUTED
1f4a0: ebfffb4e bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: opening inode", rc);
1f4a4: eb007bc7 bl 3e3c8 <__errno> <== NOT EXECUTED
1f4a8: e580a000 str sl, [r0] <== NOT EXECUTED
1f4ac: ea000018 b 1f514 <rtems_rfs_rtems_eval_path+0xec> <== NOT EXECUTED
}
/*
* Is this the end of the pathname we where given ?
*/
if ((*path == '\0') || (pathlen == 0))
1f4b0: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
1f4b4: e3580000 cmp r8, #0 <== NOT EXECUTED
1f4b8: 13530000 cmpne r3, #0 <== NOT EXECUTED
1f4bc: 0a000083 beq 1f6d0 <rtems_rfs_rtems_eval_path+0x2a8> <== NOT EXECUTED
1f4c0: 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)) &&
1f4c4: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
1f4c8: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
1f4cc: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
1f4d0: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
1f4d4: 0a000001 beq 1f4e0 <rtems_rfs_rtems_eval_path+0xb8> <== NOT EXECUTED
1f4d8: e3a0a000 mov sl, #0 <== NOT EXECUTED
1f4dc: ea000010 b 1f524 <rtems_rfs_rtems_eval_path+0xfc> <== NOT EXECUTED
1f4e0: e1a00006 mov r0, r6 <== NOT EXECUTED
1f4e4: e3a01001 mov r1, #1 <== NOT EXECUTED
1f4e8: eb0000b3 bl 1f7bc <rtems_rfs_rtems_eval_perms> <== NOT EXECUTED
1f4ec: e3500000 cmp r0, #0 <== NOT EXECUTED
1f4f0: 1afffff8 bne 1f4d8 <rtems_rfs_rtems_eval_path+0xb0> <== NOT EXECUTED
!rtems_rfs_rtems_eval_perms (&inode, RTEMS_LIBIO_PERMS_SEARCH))
{
rtems_rfs_inode_close (fs, &inode);
1f4f4: e1a01006 mov r1, r6 <== NOT EXECUTED
1f4f8: e1a00004 mov r0, r4 <== NOT EXECUTED
1f4fc: eb00638d bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f500: e1a00004 mov r0, r4 <== NOT EXECUTED
1f504: ebfffb35 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: eval perms", EACCES);
1f508: eb007bae bl 3e3c8 <__errno> <== NOT EXECUTED
1f50c: e3a0300d mov r3, #13 <== NOT EXECUTED
1f510: e5803000 str r3, [r0] <== NOT EXECUTED
1f514: e3e05000 mvn r5, #0 <== NOT EXECUTED
1f518: ea00007c b 1f710 <rtems_rfs_rtems_eval_path+0x2e8> <== NOT EXECUTED
while (!rtems_filesystem_is_separator (*path) &&
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
{
path++;
pathlen--;
1f51c: e2488001 sub r8, r8, #1 <== NOT EXECUTED
1f520: 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) &&
1f524: e7d7000a ldrb r0, [r7, sl] <== NOT EXECUTED
1f528: ebffa696 bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
1f52c: e3500000 cmp r0, #0 <== NOT EXECUTED
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
1f530: e28a3001 add r3, sl, #1 <== NOT EXECUTED
* @param pathlen
* @param flags
* @param pathloc
*/
int
rtems_rfs_rtems_eval_path (const char* path,
1f534: e087b00a add fp, r7, 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) &&
1f538: 1a000006 bne 1f558 <rtems_rfs_rtems_eval_path+0x130> <== NOT EXECUTED
1f53c: e7d7200a ldrb r2, [r7, sl] <== NOT EXECUTED
1f540: e3580000 cmp r8, #0 <== NOT EXECUTED
1f544: 13520000 cmpne r2, #0 <== NOT EXECUTED
1f548: 0a000002 beq 1f558 <rtems_rfs_rtems_eval_path+0x130> <== NOT EXECUTED
(*path != '\0') && pathlen &&
((node_len + 1) < rtems_rfs_fs_max_name (fs)))
1f54c: e5942018 ldr r2, [r4, #24] <== NOT EXECUTED
1f550: e1530002 cmp r3, r2 <== NOT EXECUTED
1f554: 3afffff0 bcc 1f51c <rtems_rfs_rtems_eval_path+0xf4> <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
1f558: e1a01008 mov r1, r8 <== NOT EXECUTED
1f55c: e1a0000b mov r0, fp <== NOT EXECUTED
1f560: ebff9fde bl 74e0 <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))
1f564: e5d72000 ldrb r2, [r7] <== NOT EXECUTED
1f568: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
1f56c: e08b2000 add r2, fp, r0 <== NOT EXECUTED
}
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
1f570: e1a03000 mov r3, r0 <== NOT EXECUTED
path += stripped;
pathlen -= stripped;
1f574: e0608008 rsb r8, r0, r8 <== NOT EXECUTED
/*
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
1f578: e58d200c str r2, [sp, #12] <== 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))
1f57c: 1a00000e bne 1f5bc <rtems_rfs_rtems_eval_path+0x194> <== NOT EXECUTED
1f580: e5d70001 ldrb r0, [r7, #1] <== NOT EXECUTED
1f584: e3500000 cmp r0, #0 <== NOT EXECUTED
1f588: 0a000004 beq 1f5a0 <rtems_rfs_rtems_eval_path+0x178> <== NOT EXECUTED
1f58c: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
1f590: ebffa67c bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
1f594: e3500000 cmp r0, #0 <== NOT EXECUTED
1f598: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
1f59c: 0a000006 beq 1f5bc <rtems_rfs_rtems_eval_path+0x194> <== NOT EXECUTED
{
if (*path)
1f5a0: e7db3003 ldrb r3, [fp, r3] <== NOT EXECUTED
1f5a4: e3530000 cmp r3, #0 <== NOT EXECUTED
1f5a8: 0a000048 beq 1f6d0 <rtems_rfs_rtems_eval_path+0x2a8> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f5ac: e1a00004 mov r0, r4 <== NOT EXECUTED
1f5b0: e1a01006 mov r1, r6 <== NOT EXECUTED
1f5b4: eb00635f bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
continue;
1f5b8: eaffffaf b 1f47c <rtems_rfs_rtems_eval_path+0x54> <== 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))
1f5bc: e5d72000 ldrb r2, [r7] <== NOT EXECUTED
1f5c0: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
* Eat any separators at start of the path.
*/
stripped = rtems_filesystem_prefix_separators (path, pathlen);
path += stripped;
pathlen -= stripped;
node_len += stripped;
1f5c4: e083a00a add sl, r3, sl <== 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))
1f5c8: 1a00002a bne 1f678 <rtems_rfs_rtems_eval_path+0x250> <== NOT EXECUTED
1f5cc: e5d72001 ldrb r2, [r7, #1] <== NOT EXECUTED
1f5d0: e352002e cmp r2, #46 ; 0x2e <== NOT EXECUTED
1f5d4: 1a000027 bne 1f678 <rtems_rfs_rtems_eval_path+0x250> <== NOT EXECUTED
1f5d8: e5d70002 ldrb r0, [r7, #2] <== NOT EXECUTED
1f5dc: e3500000 cmp r0, #0 <== NOT EXECUTED
1f5e0: 0a000004 beq 1f5f8 <rtems_rfs_rtems_eval_path+0x1d0> <== NOT EXECUTED
1f5e4: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
1f5e8: ebffa666 bl 8f88 <rtems_filesystem_is_separator> <== NOT EXECUTED
1f5ec: e3500000 cmp r0, #0 <== NOT EXECUTED
1f5f0: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
1f5f4: 0a00001f beq 1f678 <rtems_rfs_rtems_eval_path+0x250> <== NOT EXECUTED
{
/*
* If we are at root inode of the file system we have a crossmount path.
*/
if (ino == RTEMS_RFS_ROOT_INO)
1f5f8: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
1f5fc: e3530001 cmp r3, #1 <== NOT EXECUTED
1f600: 1a000015 bne 1f65c <rtems_rfs_rtems_eval_path+0x234> <== NOT EXECUTED
{
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);
1f604: e1a01006 mov r1, r6 <== NOT EXECUTED
1f608: e1a00004 mov r0, r4 <== NOT EXECUTED
1f60c: eb006349 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f610: e1a00004 mov r0, r4 <== NOT EXECUTED
1f614: ebfffaf1 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
*pathloc = pathloc->mt_entry->mt_point_node;
1f618: e595c010 ldr ip, [r5, #16] <== NOT EXECUTED
1f61c: e28cc008 add ip, ip, #8 <== NOT EXECUTED
1f620: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED
1f624: e1a0e005 mov lr, r5 <== NOT EXECUTED
1f628: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED
1f62c: e59c2000 ldr r2, [ip] <== NOT EXECUTED
1f630: e58e2000 str r2, [lr] <== NOT EXECUTED
return (*pathloc->ops->evalpath_h)(path - node_len, pathlen + node_len,
1f634: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
1f638: e1a03005 mov r3, r5 <== NOT EXECUTED
1f63c: e06a0002 rsb r0, sl, r2 <== NOT EXECUTED
1f640: e595c00c ldr ip, [r5, #12] <== NOT EXECUTED
1f644: e08a1008 add r1, sl, r8 <== NOT EXECUTED
1f648: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED
1f64c: e1a0e00f mov lr, pc <== NOT EXECUTED
1f650: e59cf000 ldr pc, [ip] <== NOT EXECUTED
1f654: e1a05000 mov r5, r0 <== NOT EXECUTED
1f658: ea00002c b 1f710 <rtems_rfs_rtems_eval_path+0x2e8> <== NOT EXECUTED
}
/*
* We need to find the parent of this node.
*/
rc = rtems_rfs_dir_lookup_ino (fs, &inode, "..", 2, &ino, &doff);
1f65c: e28dc03c add ip, sp, #60 ; 0x3c <== NOT EXECUTED
1f660: e1a00004 mov r0, r4 <== NOT EXECUTED
1f664: e1a01006 mov r1, r6 <== NOT EXECUTED
1f668: e59f20ac ldr r2, [pc, #172] ; 1f71c <rtems_rfs_rtems_eval_path+0x2f4><== NOT EXECUTED
1f66c: e3a03002 mov r3, #2 <== NOT EXECUTED
1f670: e88d1200 stm sp, {r9, ip} <== NOT EXECUTED
1f674: ea000005 b 1f690 <rtems_rfs_rtems_eval_path+0x268> <== 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,
1f678: e28de03c add lr, sp, #60 ; 0x3c <== NOT EXECUTED
1f67c: e88d4200 stm sp, {r9, lr} <== NOT EXECUTED
1f680: e063300a rsb r3, r3, sl <== NOT EXECUTED
1f684: e1a02007 mov r2, r7 <== NOT EXECUTED
1f688: e1a00004 mov r0, r4 <== NOT EXECUTED
1f68c: e1a01006 mov r1, r6 <== NOT EXECUTED
1f690: eb005978 bl 35c78 <rtems_rfs_dir_lookup_ino> <== NOT EXECUTED
node, node_len - stripped, &ino, &doff);
if (rc > 0)
1f694: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1f698: ca000004 bgt 1f6b0 <rtems_rfs_rtems_eval_path+0x288> <== 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);
1f69c: e1a00004 mov r0, r4 <== NOT EXECUTED
1f6a0: e1a01006 mov r1, r6 <== NOT EXECUTED
1f6a4: eb006323 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
1f6a8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1f6ac: daffff72 ble 1f47c <rtems_rfs_rtems_eval_path+0x54> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1f6b0: e1a01006 mov r1, r6 <== NOT EXECUTED
1f6b4: e1a00004 mov r0, r4 <== NOT EXECUTED
1f6b8: eb00631e bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f6bc: e1a00004 mov r0, r4 <== NOT EXECUTED
1f6c0: ebfffac6 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("eval_path: closing node", rc);
1f6c4: eb007b3f bl 3e3c8 <__errno> <== NOT EXECUTED
1f6c8: e5807000 str r7, [r0] <== NOT EXECUTED
1f6cc: eaffff90 b 1f514 <rtems_rfs_rtems_eval_path+0xec> <== NOT EXECUTED
}
}
rtems_rfs_rtems_set_pathloc_ino (pathloc, ino);
1f6d0: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
1f6d4: e5853000 str r3, [r5] <== NOT EXECUTED
rtems_rfs_rtems_set_pathloc_doff (pathloc, doff);
1f6d8: e59d303c ldr r3, [sp, #60] ; 0x3c <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
1f6dc: e28d6014 add r6, sp, #20 <== 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);
1f6e0: e5853004 str r3, [r5, #4] <== NOT EXECUTED
rc = rtems_rfs_rtems_set_handlers (pathloc, &inode) ? 0 : EIO;
1f6e4: e1a00005 mov r0, r5 <== NOT EXECUTED
1f6e8: e1a01006 mov r1, r6 <== NOT EXECUTED
1f6ec: eb00000f bl 1f730 <rtems_rfs_rtems_set_handlers> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
1f6f0: e1a01006 mov r1, 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;
1f6f4: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
1f6f8: e1a00004 mov r0, r4 <== 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;
1f6fc: 03a05005 moveq r5, #5 <== NOT EXECUTED
1f700: 13a05000 movne r5, #0 <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
1f704: eb00630b bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1f708: e1a00004 mov r0, r4 <== NOT EXECUTED
1f70c: ebfffab3 bl 1e1e0 <rtems_rfs_rtems_unlock> <== 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;
}
1f710: e1a00005 mov r0, r5 <== NOT EXECUTED
1f714: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED
1f718: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001f7bc <rtems_rfs_rtems_eval_perms>:
#include "rtems-rfs-rtems.h"
bool
rtems_rfs_rtems_eval_perms (rtems_rfs_inode_handle* inode, int flags)
{
1f7bc: 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;
1f7c0: e590300c ldr r3, [r0, #12] <== NOT EXECUTED
1f7c4: 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);
1f7c8: 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;
1f7cc: e5d39004 ldrb r9, [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);
1f7d0: e5d3a002 ldrb sl, [r3, #2] <== NOT EXECUTED
1f7d4: e1a06001 mov r6, 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;
1f7d8: e5d25002 ldrb r5, [r2, #2] <== NOT EXECUTED
1f7dc: e5d24003 ldrb r4, [r2, #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;
1f7e0: e5d2b001 ldrb fp, [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 ();
1f7e4: eb0017a4 bl 2567c <geteuid> <== NOT EXECUTED
1f7e8: e1a07000 mov r7, r0 <== NOT EXECUTED
st_gid = getegid ();
1f7ec: eb00179d bl 25668 <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))
1f7f0: e1844405 orr r4, r4, r5, lsl #8 <== NOT EXECUTED
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
1f7f4: e1a0b80b lsl fp, fp, #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))
1f7f8: e2772001 rsbs r2, r7, #1 <== NOT EXECUTED
1f7fc: 33a02000 movcc r2, #0 <== NOT EXECUTED
flags_to_test |= flags << 6;
if ((st_uid == 0) || (st_gid == gid))
1f800: e18b9c09 orr r9, fp, r9, 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))
1f804: e3570000 cmp r7, #0 <== NOT EXECUTED
1f808: 11570004 cmpne r7, r4 <== NOT EXECUTED
1f80c: 11a03006 movne r3, r6 <== NOT EXECUTED
flags_to_test |= flags << 6;
1f810: 01863306 orreq r3, r6, r6, lsl #6 <== NOT EXECUTED
if ((st_uid == 0) || (st_gid == gid))
1f814: e1500829 cmp r0, r9, lsr #16 <== NOT EXECUTED
1f818: 03822001 orreq r2, r2, #1 <== NOT EXECUTED
flags_to_test |= flags << 3;
1f81c: 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))
1f820: e3520000 cmp r2, #0 <== NOT EXECUTED
flags_to_test |= flags << 3;
1f824: e1a08b88 lsl r8, r8, #23 <== NOT EXECUTED
1f828: 11833186 orrne r3, r3, r6, lsl #3 <== NOT EXECUTED
1f82c: e1a08ba8 lsr r8, r8, #23 <== NOT EXECUTED
1f830: 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;
}
1f834: 03a00000 moveq r0, #0 <== NOT EXECUTED
1f838: 13a00001 movne r0, #1 <== NOT EXECUTED
1f83c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001e318 <rtems_rfs_rtems_fchmod>:
* @return int
*/
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
1e318: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1e31c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
1e320: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1e324: e5907000 ldr r7, [r0] <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
1e328: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FCHMOD))
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
1e32c: e1a00004 mov r0, r4 <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_fchmod (rtems_filesystem_location_info_t* pathloc,
mode_t mode)
{
1e330: e1a06001 mov r6, r1 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_FCHMOD))
printf ("rtems-rfs-rtems: fchmod: in: ino:%" PRId32 " mode:%06" PRIomode_t "\n",
ino, mode);
rtems_rfs_rtems_lock (fs);
1e334: ebffffa4 bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1e338: e1a01007 mov r1, r7 <== NOT EXECUTED
1e33c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e340: e1a0200d mov r2, sp <== NOT EXECUTED
1e344: e3a03001 mov r3, #1 <== NOT EXECUTED
1e348: eb00681d bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
1e34c: 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);
1e350: e1a0500d mov r5, sp <== NOT EXECUTED
if (rc)
1e354: 0a000004 beq 1e36c <rtems_rfs_rtems_fchmod+0x54> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e358: e1a00004 mov r0, r4 <== NOT EXECUTED
1e35c: ebffff9f bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: opening inode", rc);
1e360: eb008018 bl 3e3c8 <__errno> <== NOT EXECUTED
1e364: e5807000 str r7, [r0] <== NOT EXECUTED
1e368: ea000014 b 1e3c0 <rtems_rfs_rtems_fchmod+0xa8> <== 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);
1e36c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e370: e5d37003 ldrb r7, [r3, #3] <== NOT EXECUTED
1e374: 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();
1e378: eb001cbf bl 2567c <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;
1e37c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e380: e2832004 add r2, r3, #4 <== NOT EXECUTED
if ((uid != rtems_rfs_inode_get_uid (&inode)) && (uid != 0))
1e384: e5d21003 ldrb r1, [r2, #3] <== NOT EXECUTED
1e388: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
1e38c: e1812402 orr r2, r1, r2, lsl #8 <== NOT EXECUTED
1e390: e1500002 cmp r0, r2 <== NOT EXECUTED
1e394: 0a00000b beq 1e3c8 <rtems_rfs_rtems_fchmod+0xb0> <== NOT EXECUTED
1e398: e3500000 cmp r0, #0 <== NOT EXECUTED
1e39c: 0a000009 beq 1e3c8 <rtems_rfs_rtems_fchmod+0xb0> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
1e3a0: e1a0100d mov r1, sp <== NOT EXECUTED
1e3a4: e1a00004 mov r0, r4 <== NOT EXECUTED
1e3a8: eb0067e2 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1e3ac: e1a00004 mov r0, r4 <== NOT EXECUTED
1e3b0: ebffff8a bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: not owner", EPERM);
1e3b4: eb008003 bl 3e3c8 <__errno> <== NOT EXECUTED
1e3b8: e3a03001 mov r3, #1 <== NOT EXECUTED
1e3bc: e5803000 str r3, [r0] <== NOT EXECUTED
1e3c0: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e3c4: ea000018 b 1e42c <rtems_rfs_rtems_fchmod+0x114> <== 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);
1e3c8: e1877408 orr r7, r7, r8, lsl #8 <== NOT EXECUTED
}
#endif
imode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
1e3cc: e2077a0f and r7, r7, #61440 ; 0xf000 <== NOT EXECUTED
imode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX);
1e3d0: e3c66a0f bic r6, r6, #61440 ; 0xf000 <== NOT EXECUTED
1e3d4: e1876006 orr r6, r7, r6 <== NOT EXECUTED
1e3d8: 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);
1e3dc: e1a02c26 lsr r2, r6, #24 <== NOT EXECUTED
1e3e0: e5c32002 strb r2, [r3, #2] <== NOT EXECUTED
1e3e4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e3e8: e1a06826 lsr r6, r6, #16 <== NOT EXECUTED
1e3ec: e5c36003 strb r6, [r3, #3] <== NOT EXECUTED
rtems_rfs_inode_set_mode (&inode, imode);
rc = rtems_rfs_inode_close (fs, &inode);
1e3f0: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1e3f4: e3a03001 mov r3, #1 <== NOT EXECUTED
1e3f8: e1a0100d mov r1, sp <== NOT EXECUTED
1e3fc: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
1e400: eb0067cc bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
1e404: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1e408: da000004 ble 1e420 <rtems_rfs_rtems_fchmod+0x108> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e40c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e410: ebffff72 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("fchmod: closing inode", rc);
1e414: eb007feb bl 3e3c8 <__errno> <== NOT EXECUTED
1e418: e5805000 str r5, [r0] <== NOT EXECUTED
1e41c: eaffffe7 b 1e3c0 <rtems_rfs_rtems_fchmod+0xa8> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1e420: e1a00004 mov r0, r4 <== NOT EXECUTED
1e424: ebffff6d bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1e428: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
1e42c: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
1e430: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0001e1c4 <rtems_rfs_rtems_fcntl>:
int
rtems_rfs_rtems_fcntl (int cmd,
rtems_libio_t* iop)
{
return 0;
}
1e1c4: e3a00000 mov r0, #0 <== NOT EXECUTED
1e1c8: e12fff1e bx lr <== NOT EXECUTED
0001ea84 <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));
1ea84: e5903028 ldr r3, [r0, #40] ; 0x28 <== NOT EXECUTED
* @param iop
* @return int
*/
int
rtems_rfs_rtems_fdatasync (rtems_libio_t* iop)
{
1ea88: e92d4010 push {r4, lr} <== NOT EXECUTED
int rc;
rc = rtems_rfs_buffer_sync (rtems_rfs_rtems_pathloc_dev (&iop->pathinfo));
1ea8c: e5930034 ldr r0, [r3, #52] ; 0x34 <== NOT EXECUTED
1ea90: eb00591a bl 34f00 <rtems_rfs_buffer_sync> <== NOT EXECUTED
if (rc)
1ea94: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1ea98: 01a00004 moveq r0, r4 <== NOT EXECUTED
1ea9c: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
return rtems_rfs_rtems_error ("fdatasync: sync", rc);
1eaa0: eb007e48 bl 3e3c8 <__errno> <== NOT EXECUTED
1eaa4: e5804000 str r4, [r0] <== NOT EXECUTED
1eaa8: e3e00000 mvn r0, #0 <== NOT EXECUTED
return 0;
}
1eaac: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00039464 <rtems_rfs_rtems_file_close>:
* @param iop
* @return int
*/
static int
rtems_rfs_rtems_file_close (rtems_libio_t* iop)
{
39464: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
39468: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_file_fs (file);
3946c: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
39470: 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);
39474: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
39478: e3a01000 mov r1, #0 <== NOT EXECUTED
3947c: e1a02001 mov r2, r1 <== NOT EXECUTED
39480: e5930000 ldr r0, [r3] <== NOT EXECUTED
39484: ebff490d bl b8c0 <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);
39488: e1a01005 mov r1, r5 <== NOT EXECUTED
3948c: e1a00004 mov r0, r4 <== NOT EXECUTED
39490: ebfff439 bl 3657c <rtems_rfs_file_close> <== NOT EXECUTED
if (rc > 0)
39494: e2505000 subs r5, r0, #0 <== NOT EXECUTED
39498: da000002 ble 394a8 <rtems_rfs_rtems_file_close+0x44> <== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file-close: file close", rc);
3949c: eb0013c9 bl 3e3c8 <__errno> <== NOT EXECUTED
394a0: e5805000 str r5, [r0] <== NOT EXECUTED
394a4: e3e05000 mvn r5, #0 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
394a8: e1a00004 mov r0, r4 <== NOT EXECUTED
394ac: ebffffe6 bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rc;
}
394b0: e1a00005 mov r0, r5 <== NOT EXECUTED
394b4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00039540 <rtems_rfs_rtems_file_ftruncate>:
* @return int
*/
int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
39540: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
39544: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
39548: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
3954c: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
39550: e593307c ldr r3, [r3, #124] ; 0x7c <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_file_ftruncate (rtems_libio_t* iop,
rtems_off64_t length)
{
39554: e1a06001 mov r6, r1 <== NOT EXECUTED
39558: e3a01000 mov r1, #0 <== NOT EXECUTED
3955c: e1a07002 mov r7, r2 <== NOT EXECUTED
39560: e1a05000 mov r5, r0 <== NOT EXECUTED
39564: e1a02001 mov r2, r1 <== NOT EXECUTED
39568: e5930000 ldr r0, [r3] <== NOT EXECUTED
3956c: ebff48d3 bl b8c0 <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);
39570: e1a01006 mov r1, r6 <== NOT EXECUTED
39574: e1a00004 mov r0, r4 <== NOT EXECUTED
39578: e1a02007 mov r2, r7 <== NOT EXECUTED
3957c: ebfff2b4 bl 36054 <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
39580: e2506000 subs r6, r0, #0 <== NOT EXECUTED
39584: 0a000002 beq 39594 <rtems_rfs_rtems_file_ftruncate+0x54> <== NOT EXECUTED
rc = rtems_rfs_rtems_error ("file_ftruncate: set size", rc);
39588: eb00138e bl 3e3c8 <__errno> <== NOT EXECUTED
3958c: e5806000 str r6, [r0] <== NOT EXECUTED
39590: e3e06000 mvn r6, #0 <== NOT EXECUTED
iop->size = rtems_rfs_file_size (file);
39594: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
39598: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3959c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
395a0: ebffeaa5 bl 3403c <rtems_rfs_block_get_size> <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
395a4: e594301c ldr r3, [r4, #28] <== 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);
395a8: e9850003 stmib r5, {r0, r1} <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
395ac: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
395b0: ebffffa5 bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rc;
}
395b4: e1a00006 mov r0, r6 <== NOT EXECUTED
395b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
00039444 <rtems_rfs_rtems_file_ioctl>:
int
rtems_rfs_rtems_file_ioctl (rtems_libio_t* iop, uint32_t command, void* buffer)
{
return 0;
}
39444: e3a00000 mov r0, #0 <== NOT EXECUTED
39448: e12fff1e bx lr <== NOT EXECUTED
000395bc <rtems_rfs_rtems_file_lseek>:
*/
rtems_off64_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
395bc: e92d4073 push {r0, r1, r4, r5, r6, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
395c0: e5905038 ldr r5, [r0, #56] ; 0x38 <== NOT EXECUTED
395c4: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
395c8: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
395cc: e593307c ldr r3, [r3, #124] ; 0x7c <== NOT EXECUTED
395d0: e3a01000 mov r1, #0 <== NOT EXECUTED
*/
rtems_off64_t
rtems_rfs_rtems_file_lseek (rtems_libio_t* iop,
rtems_off64_t offset,
int whence)
{
395d4: e1a04000 mov r4, r0 <== NOT EXECUTED
395d8: e1a02001 mov r2, r1 <== NOT EXECUTED
395dc: e5930000 ldr r0, [r3] <== NOT EXECUTED
395e0: ebff48b6 bl b8c0 <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;
395e4: e284200c add r2, r4, #12 <== NOT EXECUTED
395e8: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
395ec: e28d3008 add r3, sp, #8 <== NOT EXECUTED
395f0: e9230006 stmdb r3!, {r1, r2} <== NOT EXECUTED
rc = rtems_rfs_file_seek (file, pos, &pos);
395f4: e1a00005 mov r0, r5 <== NOT EXECUTED
395f8: e1a0300d mov r3, sp <== NOT EXECUTED
395fc: ebfff346 bl 3631c <rtems_rfs_file_seek> <== NOT EXECUTED
if (rc)
39600: e2506000 subs r6, r0, #0 <== NOT EXECUTED
39604: e595301c ldr r3, [r5, #28] <== NOT EXECUTED
39608: 0a000006 beq 39628 <rtems_rfs_rtems_file_lseek+0x6c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
3960c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
39610: ebffff8d bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("file_lseek: lseek", rc);
39614: eb00136b bl 3e3c8 <__errno> <== NOT EXECUTED
39618: e3e04000 mvn r4, #0 <== NOT EXECUTED
3961c: e5806000 str r6, [r0] <== NOT EXECUTED
39620: e3e03000 mvn r3, #0 <== NOT EXECUTED
39624: ea000003 b 39638 <rtems_rfs_rtems_file_lseek+0x7c> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
39628: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3962c: ebffff86 bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return iop->offset;
39630: e284400c add r4, r4, #12 <== NOT EXECUTED
39634: e8940018 ldm r4, {r3, r4} <== NOT EXECUTED
}
39638: e1a01004 mov r1, r4 <== NOT EXECUTED
3963c: e1a00003 mov r0, r3 <== NOT EXECUTED
39640: e8bd807c pop {r2, r3, r4, r5, r6, pc} <== NOT EXECUTED
000394b8 <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);
394b8: 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)
{
394bc: e92d4071 push {r0, r4, r5, r6, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (&iop->pathinfo);
394c0: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
394c4: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
394c8: e3a01000 mov r1, #0 <== NOT EXECUTED
394cc: e1a02001 mov r2, r1 <== NOT EXECUTED
static int
rtems_rfs_rtems_file_open (rtems_libio_t* iop,
const char* pathname,
uint32_t flag,
uint32_t mode)
{
394d0: e1a05000 mov r5, r0 <== NOT EXECUTED
394d4: e5930000 ldr r0, [r3] <== NOT EXECUTED
394d8: ebff48f8 bl b8c0 <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);
394dc: e1a00004 mov r0, r4 <== NOT EXECUTED
394e0: e5951038 ldr r1, [r5, #56] ; 0x38 <== NOT EXECUTED
394e4: e3a02000 mov r2, #0 <== NOT EXECUTED
394e8: e1a0300d mov r3, sp <== NOT EXECUTED
394ec: ebfff48f bl 36730 <rtems_rfs_file_open> <== NOT EXECUTED
if (rc > 0)
394f0: e2506000 subs r6, r0, #0 <== NOT EXECUTED
394f4: da000005 ble 39510 <rtems_rfs_rtems_file_open+0x58> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
394f8: e1a00004 mov r0, r4 <== NOT EXECUTED
394fc: ebffffd2 bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-open: open", rc);
39500: eb0013b0 bl 3e3c8 <__errno> <== NOT EXECUTED
39504: e5806000 str r6, [r0] <== NOT EXECUTED
39508: e3e00000 mvn r0, #0 <== NOT EXECUTED
3950c: ea00000a b 3953c <rtems_rfs_rtems_file_open+0x84> <== 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);
39510: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39514: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
39518: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3951c: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
39520: ebffeac5 bl 3403c <rtems_rfs_block_get_size> <== NOT EXECUTED
iop->file_info = file;
39524: e59d3000 ldr r3, [sp] <== 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);
39528: e9850003 stmib r5, {r0, r1} <== NOT EXECUTED
iop->file_info = file;
3952c: e5853038 str r3, [r5, #56] ; 0x38 <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
39530: e1a00004 mov r0, r4 <== NOT EXECUTED
39534: ebffffc4 bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
39538: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
3953c: e8bd8078 pop {r3, r4, r5, r6, pc} <== NOT EXECUTED
000397b8 <rtems_rfs_rtems_file_read>:
*/
ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
397b8: e92d47f1 push {r0, r4, r5, r6, r7, r8, r9, sl, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
397bc: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
397c0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
397c4: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
397c8: e593307c ldr r3, [r3, #124] ; 0x7c <== NOT EXECUTED
*/
ssize_t
rtems_rfs_rtems_file_read (rtems_libio_t* iop,
void* buffer,
size_t count)
{
397cc: e1a08001 mov r8, r1 <== NOT EXECUTED
397d0: e3a01000 mov r1, #0 <== NOT EXECUTED
397d4: e1a05000 mov r5, r0 <== NOT EXECUTED
397d8: e1a06002 mov r6, r2 <== NOT EXECUTED
397dc: e5930000 ldr r0, [r3] <== NOT EXECUTED
397e0: e1a02001 mov r2, r1 <== NOT EXECUTED
397e4: ebff4835 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_rtems_lock (rtems_rfs_file_fs (file));
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
397e8: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
397ec: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
397f0: 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;
397f4: e285500c add r5, r5, #12 <== NOT EXECUTED
397f8: e89500a0 ldm r5, {r5, r7} <== NOT EXECUTED
397fc: ebffea0e bl 3403c <rtems_rfs_block_get_size> <== NOT EXECUTED
if (pos < rtems_rfs_file_size (file))
39800: e1510007 cmp r1, r7 <== NOT EXECUTED
39804: 8a000024 bhi 3989c <rtems_rfs_rtems_file_read+0xe4> <== NOT EXECUTED
39808: 1a000001 bne 39814 <rtems_rfs_rtems_file_read+0x5c> <== NOT EXECUTED
3980c: e1500005 cmp r0, r5 <== NOT EXECUTED
39810: 8a000021 bhi 3989c <rtems_rfs_rtems_file_read+0xe4> <== NOT EXECUTED
39814: e3a05000 mov r5, #0 <== NOT EXECUTED
39818: ea000026 b 398b8 <rtems_rfs_rtems_file_read+0x100> <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
3981c: ebfff1b5 bl 35ef8 <rtems_rfs_file_io_start> <== NOT EXECUTED
if (rc > 0)
39820: e2507000 subs r7, r0, #0 <== NOT EXECUTED
break;
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
39824: e1a00008 mov r0, r8 <== NOT EXECUTED
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
if (rc > 0)
39828: da000002 ble 39838 <rtems_rfs_rtems_file_read+0x80> <== NOT EXECUTED
{
read = rtems_rfs_rtems_error ("file-read: read: io-start", rc);
3982c: eb0012e5 bl 3e3c8 <__errno> <== NOT EXECUTED
39830: e5807000 str r7, [r0] <== NOT EXECUTED
39834: ea000016 b 39894 <rtems_rfs_rtems_file_read+0xdc> <== NOT EXECUTED
break;
}
if (size == 0)
39838: e59d3000 ldr r3, [sp] <== NOT EXECUTED
3983c: e3530000 cmp r3, #0 <== NOT EXECUTED
39840: 0a00001c beq 398b8 <rtems_rfs_rtems_file_read+0x100> <== NOT EXECUTED
break;
if (size > count)
39844: e1530006 cmp r3, r6 <== NOT EXECUTED
size = count;
39848: 858d6000 strhi r6, [sp] <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
3984c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
39850: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
39854: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
39858: e59d2000 ldr r2, [sp] <== NOT EXECUTED
3985c: e0811003 add r1, r1, r3 <== NOT EXECUTED
39860: eb001f88 bl 41688 <memcpy> <== NOT EXECUTED
data += size;
39864: e59d7000 ldr r7, [sp] <== NOT EXECUTED
count -= size;
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
39868: e1a00004 mov r0, r4 <== NOT EXECUTED
3986c: e1a01007 mov r1, r7 <== NOT EXECUTED
39870: e3a02001 mov r2, #1 <== NOT EXECUTED
39874: ebfff2d8 bl 363dc <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc > 0)
39878: e2509000 subs r9, r0, #0 <== NOT EXECUTED
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
count -= size;
read += size;
3987c: d0855007 addle r5, r5, r7 <== NOT EXECUTED
if (size > count)
size = count;
memcpy (data, rtems_rfs_file_data (file), size);
data += size;
39880: d0888007 addle r8, r8, r7 <== NOT EXECUTED
count -= size;
39884: d0676006 rsble r6, r7, r6 <== NOT EXECUTED
39888: da000005 ble 398a4 <rtems_rfs_rtems_file_read+0xec> <== NOT EXECUTED
read += size;
rc = rtems_rfs_file_io_end (file, size, true);
if (rc > 0)
{
read = rtems_rfs_rtems_error ("file-read: read: io-end", rc);
3988c: eb0012cd bl 3e3c8 <__errno> <== NOT EXECUTED
39890: e5809000 str r9, [r0] <== NOT EXECUTED
39894: e3e05000 mvn r5, #0 <== NOT EXECUTED
39898: ea000006 b 398b8 <rtems_rfs_rtems_file_read+0x100> <== NOT EXECUTED
void* buffer,
size_t count)
{
rtems_rfs_file_handle* file = iop->file_info;
rtems_rfs_pos pos;
uint8_t* data = buffer;
3989c: e3a05000 mov r5, #0 <== NOT EXECUTED
{
while (count)
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
398a0: e1a0a00d mov sl, sp <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
398a4: e3560000 cmp r6, #0 <== NOT EXECUTED
{
size_t size;
rc = rtems_rfs_file_io_start (file, &size, true);
398a8: e1a0100d mov r1, sp <== NOT EXECUTED
398ac: e1a00004 mov r0, r4 <== NOT EXECUTED
398b0: e3a02001 mov r2, #1 <== NOT EXECUTED
pos = iop->offset;
if (pos < rtems_rfs_file_size (file))
{
while (count)
398b4: 1affffd8 bne 3981c <rtems_rfs_rtems_file_read+0x64> <== NOT EXECUTED
break;
}
}
}
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
398b8: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
398bc: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
398c0: ebfffee1 bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return read;
}
398c4: e1a00005 mov r0, r5 <== NOT EXECUTED
398c8: e8bd87f8 pop {r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
00039644 <rtems_rfs_rtems_file_write>:
*/
ssize_t
rtems_rfs_rtems_file_write (rtems_libio_t* iop,
const void* buffer,
size_t count)
{
39644: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_rfs_file_handle* file = iop->file_info;
39648: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
3964c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
39650: e5933098 ldr r3, [r3, #152] ; 0x98 <== NOT EXECUTED
39654: 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)
{
39658: e1a0a001 mov sl, r1 <== NOT EXECUTED
3965c: e3a01000 mov r1, #0 <== NOT EXECUTED
39660: e1a06000 mov r6, r0 <== NOT EXECUTED
39664: e1a05002 mov r5, r2 <== NOT EXECUTED
39668: e5930000 ldr r0, [r3] <== NOT EXECUTED
3966c: e1a02001 mov r2, r1 <== NOT EXECUTED
39670: ebff4892 bl b8c0 <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))
39674: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
39678: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
3967c: 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;
39680: e286800c add r8, r6, #12 <== NOT EXECUTED
39684: e8980180 ldm r8, {r7, r8} <== NOT EXECUTED
39688: ebffea6b bl 3403c <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))
3968c: e1510008 cmp r1, r8 <== NOT EXECUTED
39690: 8a000011 bhi 396dc <rtems_rfs_rtems_file_write+0x98> <== NOT EXECUTED
39694: 1a000001 bne 396a0 <rtems_rfs_rtems_file_write+0x5c> <== NOT EXECUTED
39698: e1500007 cmp r0, r7 <== NOT EXECUTED
3969c: 8a00000e bhi 396dc <rtems_rfs_rtems_file_write+0x98> <== NOT EXECUTED
{
rc = rtems_rfs_file_set_size (file, pos + 1);
396a0: e3a01001 mov r1, #1 <== NOT EXECUTED
396a4: e0911007 adds r1, r1, r7 <== NOT EXECUTED
396a8: e3a02000 mov r2, #0 <== NOT EXECUTED
396ac: e0a22008 adc r2, r2, r8 <== NOT EXECUTED
396b0: e1a00004 mov r0, r4 <== NOT EXECUTED
396b4: ebfff266 bl 36054 <rtems_rfs_file_set_size> <== NOT EXECUTED
if (rc)
396b8: e2509000 subs r9, r0, #0 <== NOT EXECUTED
396bc: 0a000006 beq 396dc <rtems_rfs_rtems_file_write+0x98> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
396c0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
396c4: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
396c8: ebffff5f bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("file-write: write extend", rc);
396cc: eb00133d bl 3e3c8 <__errno> <== NOT EXECUTED
396d0: e3e07000 mvn r7, #0 <== NOT EXECUTED
396d4: e5809000 str r9, [r0] <== NOT EXECUTED
396d8: ea000034 b 397b0 <rtems_rfs_rtems_file_write+0x16c> <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
396dc: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
396e0: e1a01007 mov r1, r7 <== NOT EXECUTED
396e4: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
396e8: e1a02008 mov r2, r8 <== NOT EXECUTED
396ec: e2843010 add r3, r4, #16 <== NOT EXECUTED
396f0: ebffea22 bl 33f80 <rtems_rfs_block_get_bpos> <== NOT EXECUTED
396f4: e3a07000 mov r7, #0 <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
396f8: e1a0900d mov r9, sp <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
396fc: ea00001e b 3977c <rtems_rfs_rtems_file_write+0x138> <== NOT EXECUTED
{
size_t size = count;
39700: e58d5000 str r5, [sp] <== NOT EXECUTED
rc = rtems_rfs_file_io_start (file, &size, false);
39704: ebfff1fb bl 35ef8 <rtems_rfs_file_io_start> <== NOT EXECUTED
if (rc)
39708: e2508000 subs r8, r0, #0 <== NOT EXECUTED
}
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
3970c: e1a0100a mov r1, sl <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
if (rc)
39710: 0a000002 beq 39720 <rtems_rfs_rtems_file_write+0xdc> <== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write open", rc);
39714: eb00132b bl 3e3c8 <__errno> <== NOT EXECUTED
39718: e5808000 str r8, [r0] <== NOT EXECUTED
3971c: ea000011 b 39768 <rtems_rfs_rtems_file_write+0x124> <== NOT EXECUTED
break;
}
if (size > count)
39720: e59d3000 ldr r3, [sp] <== NOT EXECUTED
39724: e1530005 cmp r3, r5 <== NOT EXECUTED
size = count;
39728: 858d5000 strhi r5, [sp] <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
3972c: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
39730: e5930020 ldr r0, [r3, #32] <== NOT EXECUTED
39734: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
39738: e59d2000 ldr r2, [sp] <== NOT EXECUTED
3973c: e0800003 add r0, r0, r3 <== NOT EXECUTED
39740: eb001fd0 bl 41688 <memcpy> <== NOT EXECUTED
data += size;
39744: e59d8000 ldr r8, [sp] <== NOT EXECUTED
count -= size;
write += size;
rc = rtems_rfs_file_io_end (file, size, false);
39748: e1a00004 mov r0, r4 <== NOT EXECUTED
3974c: e1a01008 mov r1, r8 <== NOT EXECUTED
39750: e3a02000 mov r2, #0 <== NOT EXECUTED
39754: ebfff320 bl 363dc <rtems_rfs_file_io_end> <== NOT EXECUTED
if (rc)
39758: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3975c: 0a000003 beq 39770 <rtems_rfs_rtems_file_write+0x12c> <== NOT EXECUTED
{
write = rtems_rfs_rtems_error ("file-write: write close", rc);
39760: eb001318 bl 3e3c8 <__errno> <== NOT EXECUTED
39764: e580b000 str fp, [r0] <== NOT EXECUTED
39768: e3e07000 mvn r7, #0 <== NOT EXECUTED
3976c: ea000007 b 39790 <rtems_rfs_rtems_file_write+0x14c> <== NOT EXECUTED
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
count -= size;
write += size;
39770: e0877008 add r7, r7, r8 <== NOT EXECUTED
if (size > count)
size = count;
memcpy (rtems_rfs_file_data (file), data, size);
data += size;
39774: e08aa008 add sl, sl, r8 <== NOT EXECUTED
count -= size;
39778: e0685005 rsb r5, r8, r5 <== NOT EXECUTED
while (count)
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
3977c: e3a02000 mov r2, #0 <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
39780: e1550002 cmp r5, r2 <== NOT EXECUTED
{
size_t size = count;
rc = rtems_rfs_file_io_start (file, &size, false);
39784: e1a0100d mov r1, sp <== NOT EXECUTED
39788: e1a00004 mov r0, r4 <== NOT EXECUTED
}
}
rtems_rfs_file_set_bpos (file, pos);
while (count)
3978c: 1affffdb bne 39700 <rtems_rfs_rtems_file_write+0xbc> <== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
39790: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
39794: e2831084 add r1, r3, #132 ; 0x84 <== NOT EXECUTED
39798: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
3979c: ebffea26 bl 3403c <rtems_rfs_block_get_size> <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
397a0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
write = rtems_rfs_rtems_error ("file-write: write close", rc);
break;
}
}
iop->size = rtems_rfs_file_size (file);
397a4: e9860003 stmib r6, {r0, r1} <== NOT EXECUTED
rtems_rfs_rtems_unlock (rtems_rfs_file_fs (file));
397a8: e5930098 ldr r0, [r3, #152] ; 0x98 <== NOT EXECUTED
397ac: ebffff26 bl 3944c <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return write;
}
397b0: e1a00007 mov r0, r7 <== NOT EXECUTED
397b4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001e1bc <rtems_rfs_rtems_freenodinfo>:
int
rtems_rfs_rtems_freenodinfo (rtems_filesystem_location_info_t* pathloc)
{
return 0;
}
1e1bc: e3a00000 mov r0, #0 <== NOT EXECUTED
1e1c0: e12fff1e bx lr <== NOT EXECUTED
0001f720 <rtems_rfs_rtems_imode>:
return true;
}
uint16_t
rtems_rfs_rtems_imode (mode_t mode)
{
1f720: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
/*
* Mapping matches RTEMS so no need to change.
*/
return mode;
}
1f724: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED
1f728: e12fff1e bx lr <== NOT EXECUTED
0001e630 <rtems_rfs_rtems_initialise>:
*/
int
rtems_rfs_rtems_initialise (rtems_filesystem_mount_table_entry_t* mt_entry,
const void* data)
{
1e630: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
1e634: e1a05000 mov r5, r0 <== NOT EXECUTED
1e638: e1a04001 mov r4, r1 <== NOT EXECUTED
rtems_rfs_rtems_private* rtems;
rtems_rfs_file_system* fs;
uint32_t flags = 0;
uint32_t max_held_buffers = RTEMS_RFS_FS_MAX_HELD_BUFFERS;
const char* options = data;
1e63c: e3a07005 mov r7, #5 <== NOT EXECUTED
1e640: e3a06000 mov r6, #0 <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
1e644: ea000024 b 1e6dc <rtems_rfs_rtems_initialise+0xac> <== NOT EXECUTED
{
printf ("options=%s\n", options);
1e648: eb0090bc bl 42940 <printf> <== NOT EXECUTED
if (strncmp (options, "hold-bitmaps",
1e64c: e59f1180 ldr r1, [pc, #384] ; 1e7d4 <rtems_rfs_rtems_initialise+0x1a4><== NOT EXECUTED
1e650: e3a0200c mov r2, #12 <== NOT EXECUTED
1e654: e1a00004 mov r0, r4 <== NOT EXECUTED
1e658: eb009ab2 bl 45128 <strncmp> <== NOT EXECUTED
1e65c: e3500000 cmp r0, #0 <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
1e660: e59f1170 ldr r1, [pc, #368] ; 1e7d8 <rtems_rfs_rtems_initialise+0x1a8><== NOT EXECUTED
1e664: e3a0200e mov r2, #14 <== NOT EXECUTED
1e668: 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;
1e66c: 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",
1e670: 0a000011 beq 1e6bc <rtems_rfs_rtems_initialise+0x8c> <== NOT EXECUTED
sizeof ("hold-bitmaps") - 1) == 0)
flags |= RTEMS_RFS_FS_BITMAPS_HOLD;
else if (strncmp (options, "no-local-cache",
1e674: eb009aab bl 45128 <strncmp> <== NOT EXECUTED
1e678: 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",
1e67c: e59f1158 ldr r1, [pc, #344] ; 1e7dc <rtems_rfs_rtems_initialise+0x1ac><== NOT EXECUTED
1e680: e3a0200d mov r2, #13 <== NOT EXECUTED
1e684: 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;
1e688: 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",
1e68c: 0a00000a beq 1e6bc <rtems_rfs_rtems_initialise+0x8c> <== NOT EXECUTED
sizeof ("no-local-cache") - 1) == 0)
flags |= RTEMS_RFS_FS_NO_LOCAL_CACHE;
else if (strncmp (options, "max-held-bufs",
1e690: eb009aa4 bl 45128 <strncmp> <== NOT EXECUTED
1e694: e2501000 subs r1, r0, #0 <== NOT EXECUTED
1e698: 1a000004 bne 1e6b0 <rtems_rfs_rtems_initialise+0x80> <== NOT EXECUTED
sizeof ("max-held-bufs") - 1) == 0)
{
max_held_buffers = strtoul (options + sizeof ("max-held-bufs"), 0, 0);
1e69c: e284000e add r0, r4, #14 <== NOT EXECUTED
1e6a0: e1a02001 mov r2, r1 <== NOT EXECUTED
1e6a4: eb009f71 bl 46470 <strtoul> <== NOT EXECUTED
1e6a8: e1a07000 mov r7, r0 <== NOT EXECUTED
1e6ac: ea000002 b 1e6bc <rtems_rfs_rtems_initialise+0x8c> <== NOT EXECUTED
}
else
return rtems_rfs_rtems_error ("initialise: invalid option", EINVAL);
1e6b0: eb007f44 bl 3e3c8 <__errno> <== NOT EXECUTED
1e6b4: e3a03016 mov r3, #22 <== NOT EXECUTED
1e6b8: ea000011 b 1e704 <rtems_rfs_rtems_initialise+0xd4> <== NOT EXECUTED
options = strchr (options, ',');
1e6bc: e1a00004 mov r0, r4 <== NOT EXECUTED
1e6c0: e3a0102c mov r1, #44 ; 0x2c <== NOT EXECUTED
1e6c4: eb00977e bl 444c4 <strchr> <== NOT EXECUTED
if (options)
1e6c8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1e6cc: 0a000006 beq 1e6ec <rtems_rfs_rtems_initialise+0xbc> <== NOT EXECUTED
{
++options;
if (*options == '\0')
1e6d0: e5f43001 ldrb r3, [r4, #1]! <== NOT EXECUTED
1e6d4: e3530000 cmp r3, #0 <== NOT EXECUTED
1e6d8: 0a000003 beq 1e6ec <rtems_rfs_rtems_initialise+0xbc> <== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
1e6dc: e3540000 cmp r4, #0 <== NOT EXECUTED
{
printf ("options=%s\n", options);
1e6e0: e1a01004 mov r1, r4 <== NOT EXECUTED
1e6e4: e59f00f4 ldr r0, [pc, #244] ; 1e7e0 <rtems_rfs_rtems_initialise+0x1b0><== NOT EXECUTED
int rc;
/*
* Parse the options the user specifiies.
*/
while (options)
1e6e8: 1affffd6 bne 1e648 <rtems_rfs_rtems_initialise+0x18> <== NOT EXECUTED
if (*options == '\0')
options = NULL;
}
}
rtems = malloc (sizeof (rtems_rfs_rtems_private));
1e6ec: e3a00004 mov r0, #4 <== NOT EXECUTED
1e6f0: ebffa596 bl 7d50 <malloc> <== NOT EXECUTED
if (!rtems)
1e6f4: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1e6f8: 1a000004 bne 1e710 <rtems_rfs_rtems_initialise+0xe0> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: local data", ENOMEM);
1e6fc: eb007f31 bl 3e3c8 <__errno> <== NOT EXECUTED
1e700: e3a0300c mov r3, #12 <== NOT EXECUTED
1e704: e5803000 str r3, [r0] <== NOT EXECUTED
1e708: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e70c: ea000025 b 1e7a8 <rtems_rfs_rtems_initialise+0x178> <== NOT EXECUTED
memset (rtems, 0, sizeof (rtems_rfs_rtems_private));
1e710: e3a08000 mov r8, #0 <== NOT EXECUTED
1e714: e5848000 str r8, [r4] <== NOT EXECUTED
rc = rtems_rfs_mutex_create (&rtems->access);
1e718: eb0069eb bl 38ecc <rtems_rfs_mutex_create> <== NOT EXECUTED
if (rc > 0)
1e71c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
1e720: da000004 ble 1e738 <rtems_rfs_rtems_initialise+0x108> <== NOT EXECUTED
{
free (rtems);
1e724: e1a00004 mov r0, r4 <== NOT EXECUTED
1e728: ebffa3e1 bl 76b4 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot create mutex", rc);
1e72c: eb007f25 bl 3e3c8 <__errno> <== NOT EXECUTED
1e730: e580a000 str sl, [r0] <== NOT EXECUTED
1e734: eafffff3 b 1e708 <rtems_rfs_rtems_initialise+0xd8> <== 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);
1e738: e1a01008 mov r1, r8 <== NOT EXECUTED
1e73c: e5940000 ldr r0, [r4] <== NOT EXECUTED
1e740: e1a02008 mov r2, r8 <== NOT EXECUTED
1e744: ebffb45d bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
1e748: e3500000 cmp r0, #0 <== NOT EXECUTED
1e74c: 0a000016 beq 1e7ac <rtems_rfs_rtems_initialise+0x17c> <== NOT EXECUTED
}
rc = rtems_rfs_mutex_lock (&rtems->access);
if (rc > 0)
{
rtems_rfs_mutex_destroy (&rtems->access);
1e750: e1a00004 mov r0, r4 <== NOT EXECUTED
1e754: eb0069d5 bl 38eb0 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
1e758: e1a00004 mov r0, r4 <== NOT EXECUTED
1e75c: ebffa3d4 bl 76b4 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: cannot lock access mutex", rc);
1e760: eb007f18 bl 3e3c8 <__errno> <== NOT EXECUTED
1e764: e3a03005 mov r3, #5 <== NOT EXECUTED
1e768: eaffffe5 b 1e704 <rtems_rfs_rtems_initialise+0xd4> <== NOT EXECUTED
}
rc = rtems_rfs_fs_open (mt_entry->dev, rtems, flags, max_held_buffers, &fs);
if (rc)
{
free (rtems);
1e76c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e770: ebffa3cf bl 76b4 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("initialise: open", rc);
1e774: eb007f13 bl 3e3c8 <__errno> <== NOT EXECUTED
1e778: e5806000 str r6, [r0] <== NOT EXECUTED
1e77c: eaffffe1 b 1e708 <rtems_rfs_rtems_initialise+0xd8> <== 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;
1e780: e59f305c ldr r3, [pc, #92] ; 1e7e4 <rtems_rfs_rtems_initialise+0x1b4><== NOT EXECUTED
1e784: 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;
1e788: e3a03001 mov r3, #1 <== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
1e78c: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
mt_entry->mt_fs_root.node_access = (void*) RTEMS_RFS_ROOT_INO;
1e790: e585301c str r3, [r5, #28] <== NOT EXECUTED
mt_entry->mt_fs_root.handlers = &rtems_rfs_rtems_dir_handlers;
1e794: e59f304c ldr r3, [pc, #76] ; 1e7e8 <rtems_rfs_rtems_initialise+0x1b8><== NOT EXECUTED
{
free (rtems);
return rtems_rfs_rtems_error ("initialise: open", rc);
}
mt_entry->fs_info = fs;
1e798: 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;
1e79c: e5853024 str r3, [r5, #36] ; 0x24 <== NOT EXECUTED
mt_entry->mt_fs_root.ops = &rtems_rfs_ops;
rtems_rfs_rtems_unlock (fs);
1e7a0: ebfffe8e bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1e7a4: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0;
}
1e7a8: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} <== 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);
1e7ac: e1a02006 mov r2, r6 <== NOT EXECUTED
1e7b0: e5950070 ldr r0, [r5, #112] ; 0x70 <== NOT EXECUTED
1e7b4: e28dc004 add ip, sp, #4 <== NOT EXECUTED
1e7b8: e1a03007 mov r3, r7 <== NOT EXECUTED
1e7bc: e1a01004 mov r1, r4 <== NOT EXECUTED
1e7c0: e58dc000 str ip, [sp] <== NOT EXECUTED
1e7c4: eb00608a bl 369f4 <rtems_rfs_fs_open> <== NOT EXECUTED
if (rc)
1e7c8: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1e7cc: 1affffe6 bne 1e76c <rtems_rfs_rtems_initialise+0x13c> <== NOT EXECUTED
1e7d0: eaffffea b 1e780 <rtems_rfs_rtems_initialise+0x150> <== NOT EXECUTED
0001e884 <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)
{
1e884: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
1e888: e1a03000 mov r3, r0 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
1e88c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
1e890: e5904034 ldr r4, [r0, #52] ; 0x34 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
1e894: e1a07002 mov r7, r2 <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_LINK))
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rtems_rfs_rtems_lock (fs);
1e898: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_rtems_link (rtems_filesystem_location_info_t* to_loc,
rtems_filesystem_location_info_t* parent_loc,
const char* name)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (to_loc);
rtems_rfs_ino target = rtems_rfs_rtems_get_pathloc_ino (to_loc);
1e89c: e5935000 ldr r5, [r3] <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (parent_loc);
1e8a0: e5916000 ldr r6, [r1] <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_LINK))
printf ("rtems-rfs-rtems: link: in: parent:%" PRId32 " target:%" PRId32 "\n",
parent, target);
rtems_rfs_rtems_lock (fs);
1e8a4: ebfffe48 bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_link (fs, name, strlen (name), parent, target, false);
1e8a8: e1a00007 mov r0, r7 <== NOT EXECUTED
1e8ac: eb0099d3 bl 45000 <strlen> <== NOT EXECUTED
1e8b0: e3a0c000 mov ip, #0 <== NOT EXECUTED
1e8b4: e1a02000 mov r2, r0 <== NOT EXECUTED
1e8b8: e1a01007 mov r1, r7 <== NOT EXECUTED
1e8bc: e1a03006 mov r3, r6 <== NOT EXECUTED
1e8c0: e1a00004 mov r0, r4 <== NOT EXECUTED
1e8c4: e88d1020 stm sp, {r5, ip} <== NOT EXECUTED
1e8c8: eb006921 bl 38d54 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
1e8cc: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1e8d0: 0a000005 beq 1e8ec <rtems_rfs_rtems_link+0x68> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e8d4: e1a00004 mov r0, r4 <== NOT EXECUTED
1e8d8: ebfffe40 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("link: linking", rc);
1e8dc: eb007eb9 bl 3e3c8 <__errno> <== NOT EXECUTED
1e8e0: e5805000 str r5, [r0] <== NOT EXECUTED
1e8e4: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e8e8: ea000002 b 1e8f8 <rtems_rfs_rtems_link+0x74> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1e8ec: e1a00004 mov r0, r4 <== NOT EXECUTED
1e8f0: ebfffe3a bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1e8f4: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
1e8f8: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0001e1cc <rtems_rfs_rtems_lock>:
*/
static inline int
rtems_rfs_mutex_lock (rtems_rfs_mutex* mutex)
{
#if __rtems__
rtems_status_code sc = rtems_semaphore_obtain (*mutex, RTEMS_WAIT, 0);
1e1cc: e590307c ldr r3, [r0, #124] ; 0x7c <== NOT EXECUTED
1e1d0: e3a01000 mov r1, #0 <== NOT EXECUTED
1e1d4: e5930000 ldr r0, [r3] <== NOT EXECUTED
1e1d8: e1a02001 mov r2, r1 <== NOT EXECUTED
1e1dc: eaffb5b7 b b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
0001eab0 <rtems_rfs_rtems_mknod>:
int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
1eab0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
1eab4: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED
1eab8: e59dc068 ldr ip, [sp, #104] ; 0x68 <== NOT EXECUTED
1eabc: e1a08001 mov r8, r1 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1eac0: e59ce010 ldr lr, [ip, #16] <== NOT EXECUTED
rtems_rfs_ino parent = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1eac4: e59c1000 ldr r1, [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);
1eac8: 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)
{
1eacc: e1a06002 mov r6, r2 <== NOT EXECUTED
1ead0: e1a05003 mov r5, r3 <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
1ead4: e58d1014 str r1, [sp, #20] <== NOT EXECUTED
int
rtems_rfs_rtems_mknod (const char *name,
mode_t mode,
dev_t dev,
rtems_filesystem_location_info_t *pathloc)
{
1ead8: e1a0b000 mov fp, r0 <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
1eadc: eb001ae6 bl 2567c <geteuid> <== NOT EXECUTED
1eae0: e1a0a000 mov sl, r0 <== NOT EXECUTED
gid = getegid ();
1eae4: eb001adf bl 25668 <getegid> <== NOT EXECUTED
1eae8: e1a09000 mov r9, r0 <== NOT EXECUTED
#else
uid = 0;
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
1eaec: e1a00004 mov r0, r4 <== NOT EXECUTED
1eaf0: ebfffdb5 bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
1eaf4: e1a0000b mov r0, fp <== NOT EXECUTED
1eaf8: eb009940 bl 45000 <strlen> <== NOT EXECUTED
1eafc: e1a07000 mov r7, r0 <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1eb00: e1a00008 mov r0, r8 <== NOT EXECUTED
1eb04: eb000305 bl 1f720 <rtems_rfs_rtems_imode> <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
1eb08: e1a03007 mov r3, r7 <== NOT EXECUTED
1eb0c: e58d0000 str r0, [sp] <== NOT EXECUTED
1eb10: e28dc040 add ip, sp, #64 ; 0x40 <== NOT EXECUTED
1eb14: e59d1014 ldr r1, [sp, #20] <== NOT EXECUTED
1eb18: e1a0200b mov r2, fp <== NOT EXECUTED
1eb1c: e3a07001 mov r7, #1 <== NOT EXECUTED
1eb20: e1a00004 mov r0, r4 <== NOT EXECUTED
1eb24: e58da008 str sl, [sp, #8] <== NOT EXECUTED
1eb28: e58d900c str r9, [sp, #12] <== NOT EXECUTED
1eb2c: e58dc010 str ip, [sp, #16] <== NOT EXECUTED
1eb30: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
1eb34: eb006684 bl 3854c <rtems_rfs_inode_create> <== NOT EXECUTED
rtems_rfs_rtems_imode (mode),
1, uid, gid, &ino);
if (rc > 0)
1eb38: e250a000 subs sl, r0, #0 <== NOT EXECUTED
1eb3c: da000004 ble 1eb54 <rtems_rfs_rtems_mknod+0xa4> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1eb40: e1a00004 mov r0, r4 <== NOT EXECUTED
1eb44: ebfffda5 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: inode create", rc);
1eb48: eb007e1e bl 3e3c8 <__errno> <== NOT EXECUTED
1eb4c: e580a000 str sl, [r0] <== NOT EXECUTED
1eb50: ea00000b b 1eb84 <rtems_rfs_rtems_mknod+0xd4> <== NOT EXECUTED
}
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1eb54: e28da018 add sl, sp, #24 <== NOT EXECUTED
1eb58: e1a00004 mov r0, r4 <== NOT EXECUTED
1eb5c: e59d1040 ldr r1, [sp, #64] ; 0x40 <== NOT EXECUTED
1eb60: e1a0200a mov r2, sl <== NOT EXECUTED
1eb64: e1a03007 mov r3, r7 <== NOT EXECUTED
1eb68: eb006615 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
1eb6c: e2509000 subs r9, r0, #0 <== NOT EXECUTED
1eb70: da000005 ble 1eb8c <rtems_rfs_rtems_mknod+0xdc> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1eb74: e1a00004 mov r0, r4 <== NOT EXECUTED
1eb78: ebfffd98 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: inode open", rc);
1eb7c: eb007e11 bl 3e3c8 <__errno> <== NOT EXECUTED
1eb80: e5809000 str r9, [r0] <== NOT EXECUTED
1eb84: e3e00000 mvn r0, #0 <== NOT EXECUTED
1eb88: ea000034 b 1ec60 <rtems_rfs_rtems_mknod+0x1b0> <== NOT EXECUTED
}
if (S_ISDIR(mode) || S_ISREG(mode))
1eb8c: e2088a0f and r8, r8, #61440 ; 0xf000 <== NOT EXECUTED
1eb90: e3580901 cmp r8, #16384 ; 0x4000 <== NOT EXECUTED
1eb94: 13580902 cmpne r8, #32768 ; 0x8000 <== NOT EXECUTED
1eb98: 0a000023 beq 1ec2c <rtems_rfs_rtems_mknod+0x17c> <== NOT EXECUTED
{
}
else if (S_ISCHR (mode) || S_ISBLK (mode))
1eb9c: e3580a02 cmp r8, #8192 ; 0x2000 <== NOT EXECUTED
1eba0: 13580a06 cmpne r8, #24576 ; 0x6000 <== NOT EXECUTED
1eba4: 1a000017 bne 1ec08 <rtems_rfs_rtems_mknod+0x158> <== 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);
1eba8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebac: e1a02c26 lsr r2, r6, #24 <== NOT EXECUTED
1ebb0: e5c3201c strb r2, [r3, #28] <== NOT EXECUTED
1ebb4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebb8: e1a02826 lsr r2, r6, #16 <== NOT EXECUTED
1ebbc: e5c3201d strb r2, [r3, #29] <== NOT EXECUTED
1ebc0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebc4: e1a02426 lsr r2, r6, #8 <== NOT EXECUTED
1ebc8: e5c3201e strb r2, [r3, #30] <== NOT EXECUTED
1ebcc: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebd0: e5c3601f strb r6, [r3, #31] <== NOT EXECUTED
1ebd4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebd8: e1a02c25 lsr r2, r5, #24 <== NOT EXECUTED
1ebdc: e5c32020 strb r2, [r3, #32] <== NOT EXECUTED
1ebe0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebe4: e1a02825 lsr r2, r5, #16 <== NOT EXECUTED
1ebe8: e5c32021 strb r2, [r3, #33] ; 0x21 <== NOT EXECUTED
1ebec: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebf0: e1a02425 lsr r2, r5, #8 <== NOT EXECUTED
1ebf4: e5c32022 strb r2, [r3, #34] ; 0x22 <== NOT EXECUTED
1ebf8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
1ebfc: e5c35023 strb r5, [r3, #35] ; 0x23 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1ec00: e5cd7028 strb r7, [sp, #40] ; 0x28 <== NOT EXECUTED
1ec04: ea000008 b 1ec2c <rtems_rfs_rtems_mknod+0x17c> <== 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);
1ec08: e1a0100a mov r1, sl <== NOT EXECUTED
1ec0c: e1a00004 mov r0, r4 <== NOT EXECUTED
1ec10: eb0065c8 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_rtems_unlock (fs);
1ec14: e1a00004 mov r0, r4 <== NOT EXECUTED
1ec18: ebfffd70 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: bad mode", EINVAL);
1ec1c: eb007de9 bl 3e3c8 <__errno> <== NOT EXECUTED
1ec20: e3a03016 mov r3, #22 <== NOT EXECUTED
1ec24: e5803000 str r3, [r0] <== NOT EXECUTED
1ec28: eaffffd5 b 1eb84 <rtems_rfs_rtems_mknod+0xd4> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &inode);
1ec2c: e1a00004 mov r0, r4 <== NOT EXECUTED
1ec30: e28d1018 add r1, sp, #24 <== NOT EXECUTED
1ec34: eb0065bf bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
1ec38: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1ec3c: da000004 ble 1ec54 <rtems_rfs_rtems_mknod+0x1a4> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1ec40: e1a00004 mov r0, r4 <== NOT EXECUTED
1ec44: ebfffd65 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("mknod: closing inode", rc);
1ec48: eb007dde bl 3e3c8 <__errno> <== NOT EXECUTED
1ec4c: e5805000 str r5, [r0] <== NOT EXECUTED
1ec50: eaffffcb b 1eb84 <rtems_rfs_rtems_mknod+0xd4> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1ec54: e1a00004 mov r0, r4 <== NOT EXECUTED
1ec58: ebfffd60 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1ec5c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
1ec60: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED
1ec64: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001f72c <rtems_rfs_rtems_mode>:
{
/*
* Mapping matches RTEMS so no need to change.
*/
return imode;
}
1f72c: e12fff1e bx lr <== NOT EXECUTED
0001e52c <rtems_rfs_rtems_node_type>:
* @return rtems_filesystem_node_types_t
*/
rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
1e52c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1e530: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
1e534: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1e538: e5905000 ldr r5, [r0] <== NOT EXECUTED
* @return rtems_filesystem_node_types_t
*/
rtems_filesystem_node_types_t
rtems_rfs_rtems_node_type (rtems_filesystem_location_info_t* pathloc)
{
1e53c: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
rtems_filesystem_node_types_t type;
rtems_rfs_inode_handle inode;
uint16_t mode;
int rc;
rtems_rfs_rtems_lock (fs);
1e540: e1a00004 mov r0, r4 <== NOT EXECUTED
1e544: ebffff20 bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1e548: e1a01005 mov r1, r5 <== NOT EXECUTED
1e54c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e550: e1a0200d mov r2, sp <== NOT EXECUTED
1e554: e3a03001 mov r3, #1 <== NOT EXECUTED
1e558: eb006799 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
1e55c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1e560: da000004 ble 1e578 <rtems_rfs_rtems_node_type+0x4c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e564: e1a00004 mov r0, r4 <== NOT EXECUTED
1e568: ebffff1c bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("node_type: opening inode", rc);
1e56c: eb007f95 bl 3e3c8 <__errno> <== NOT EXECUTED
1e570: e5805000 str r5, [r0] <== NOT EXECUTED
1e574: ea000016 b 1e5d4 <rtems_rfs_rtems_node_type+0xa8> <== 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);
1e578: 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))
1e57c: e5d33002 ldrb r3, [r3, #2] <== NOT EXECUTED
1e580: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
1e584: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
1e588: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
1e58c: 03a05001 moveq r5, #1 <== NOT EXECUTED
1e590: 0a000006 beq 1e5b0 <rtems_rfs_rtems_node_type+0x84> <== NOT EXECUTED
type = RTEMS_FILESYSTEM_DIRECTORY;
else if (RTEMS_RFS_S_ISLNK (mode))
1e594: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
1e598: 03a05004 moveq r5, #4 <== NOT EXECUTED
1e59c: 0a000003 beq 1e5b0 <rtems_rfs_rtems_node_type+0x84> <== NOT EXECUTED
type = RTEMS_FILESYSTEM_SYM_LINK;
else if (RTEMS_RFS_S_ISBLK (mode) || RTEMS_RFS_S_ISCHR (mode))
1e5a0: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
1e5a4: 13530a02 cmpne r3, #8192 ; 0x2000 <== NOT EXECUTED
1e5a8: 03a05002 moveq r5, #2 <== NOT EXECUTED
1e5ac: 13a05005 movne r5, #5 <== NOT EXECUTED
type = RTEMS_FILESYSTEM_DEVICE;
else
type = RTEMS_FILESYSTEM_MEMORY_FILE;
rc = rtems_rfs_inode_close (fs, &inode);
1e5b0: e1a00004 mov r0, r4 <== NOT EXECUTED
1e5b4: e1a0100d mov r1, sp <== NOT EXECUTED
1e5b8: eb00675e bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
1e5bc: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1e5c0: da000005 ble 1e5dc <rtems_rfs_rtems_node_type+0xb0> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e5c4: e1a00004 mov r0, r4 <== NOT EXECUTED
1e5c8: ebffff04 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("node_type: closing inode", rc);
1e5cc: eb007f7d bl 3e3c8 <__errno> <== NOT EXECUTED
1e5d0: e5806000 str r6, [r0] <== NOT EXECUTED
1e5d4: e3e05000 mvn r5, #0 <== NOT EXECUTED
1e5d8: ea000001 b 1e5e4 <rtems_rfs_rtems_node_type+0xb8> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1e5dc: e1a00004 mov r0, r4 <== NOT EXECUTED
1e5e0: ebfffefe bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return type;
}
1e5e4: e1a00005 mov r0, r5 <== NOT EXECUTED
1e5e8: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
1e5ec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0001ef00 <rtems_rfs_rtems_readlink>:
int
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
1ef00: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1ef04: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
1ef08: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1ef0c: e5907000 ldr r7, [r0] <== NOT EXECUTED
int
rtems_rfs_rtems_readlink (rtems_filesystem_location_info_t* pathloc,
char* buf,
size_t bufsize)
{
1ef10: e1a05002 mov r5, r2 <== NOT EXECUTED
1ef14: e1a06001 mov r6, r1 <== NOT EXECUTED
int rc;
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);
1ef18: e1a00004 mov r0, r4 <== NOT EXECUTED
1ef1c: ebfffcaa bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_symlink_read (fs, ino, buf, bufsize, &length);
1ef20: e1a03005 mov r3, r5 <== NOT EXECUTED
1ef24: e28dc004 add ip, sp, #4 <== NOT EXECUTED
1ef28: e1a01007 mov r1, r7 <== NOT EXECUTED
1ef2c: e1a02006 mov r2, r6 <== NOT EXECUTED
1ef30: e1a00004 mov r0, r4 <== NOT EXECUTED
1ef34: e58dc000 str ip, [sp] <== NOT EXECUTED
1ef38: eb00661b bl 387ac <rtems_rfs_symlink_read> <== NOT EXECUTED
if (rc)
1ef3c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1ef40: 0a000005 beq 1ef5c <rtems_rfs_rtems_readlink+0x5c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1ef44: e1a00004 mov r0, r4 <== NOT EXECUTED
1ef48: ebfffca4 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("readlink: reading link", rc);
1ef4c: eb007d1d bl 3e3c8 <__errno> <== NOT EXECUTED
1ef50: e5805000 str r5, [r0] <== NOT EXECUTED
1ef54: e3e00000 mvn r0, #0 <== NOT EXECUTED
1ef58: ea000002 b 1ef68 <rtems_rfs_rtems_readlink+0x68> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1ef5c: e1a00004 mov r0, r4 <== NOT EXECUTED
1ef60: ebfffc9e bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return (int) length;
1ef64: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
}
1ef68: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0001e8fc <rtems_rfs_rtems_rename>:
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)
{
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
1e8fc: e591c010 ldr ip, [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)
{
1e900: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (old_loc);
1e904: e59c4034 ldr r4, [ip, #52] ; 0x34 <== 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)
{
1e908: e1a0a003 mov sl, r3 <== 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);
1e90c: e5907000 ldr r7, [r0] <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RENAME))
printf ("rtems-rfs: rename: ino:%" PRId32 " doff:%" PRIu32 ", new parent:%" PRId32 " new name:%s\n",
ino, doff, new_parent, new_name);
rtems_rfs_rtems_lock (fs);
1e910: e1a00004 mov r0, r4 <== 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);
1e914: e5928000 ldr r8, [r2] <== NOT EXECUTED
ino = rtems_rfs_rtems_get_pathloc_ino (old_loc);
1e918: e8910060 ldm r1, {r5, r6} <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RENAME))
printf ("rtems-rfs: rename: ino:%" PRId32 " doff:%" PRIu32 ", new parent:%" PRId32 " new name:%s\n",
ino, doff, new_parent, new_name);
rtems_rfs_rtems_lock (fs);
1e91c: ebfffe2a bl 1e1cc <rtems_rfs_rtems_lock> <== 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);
1e920: e1a0000a mov r0, sl <== NOT EXECUTED
1e924: eb0099b5 bl 45000 <strlen> <== NOT EXECUTED
1e928: e1a03008 mov r3, r8 <== NOT EXECUTED
1e92c: e1a02000 mov r2, r0 <== NOT EXECUTED
1e930: e3a0c001 mov ip, #1 <== NOT EXECUTED
1e934: e1a0100a mov r1, sl <== NOT EXECUTED
1e938: e1a00004 mov r0, r4 <== NOT EXECUTED
1e93c: e88d1020 stm sp, {r5, ip} <== NOT EXECUTED
1e940: eb006903 bl 38d54 <rtems_rfs_link> <== NOT EXECUTED
if (rc)
1e944: e2508000 subs r8, r0, #0 <== NOT EXECUTED
1e948: 0a000004 beq 1e960 <rtems_rfs_rtems_rename+0x64> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e94c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e950: ebfffe22 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("rename: linking", rc);
1e954: eb007e9b bl 3e3c8 <__errno> <== NOT EXECUTED
1e958: e5808000 str r8, [r0] <== NOT EXECUTED
1e95c: ea00000c b 1e994 <rtems_rfs_rtems_rename+0x98> <== 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,
1e960: e1a02005 mov r2, r5 <== NOT EXECUTED
1e964: e3a0c002 mov ip, #2 <== NOT EXECUTED
1e968: e1a01007 mov r1, r7 <== NOT EXECUTED
1e96c: e1a03006 mov r3, r6 <== NOT EXECUTED
1e970: e1a00004 mov r0, r4 <== NOT EXECUTED
1e974: e58dc000 str ip, [sp] <== NOT EXECUTED
1e978: eb006873 bl 38b4c <rtems_rfs_unlink> <== NOT EXECUTED
rtems_rfs_unlink_dir_allowed);
if (rc)
1e97c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1e980: 0a000005 beq 1e99c <rtems_rfs_rtems_rename+0xa0> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e984: e1a00004 mov r0, r4 <== NOT EXECUTED
1e988: ebfffe14 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("rename: unlinking", rc);
1e98c: eb007e8d bl 3e3c8 <__errno> <== NOT EXECUTED
1e990: e5805000 str r5, [r0] <== NOT EXECUTED
1e994: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e998: ea000002 b 1e9a8 <rtems_rfs_rtems_rename+0xac> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1e99c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e9a0: ebfffe0e bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1e9a4: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
1e9a8: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0001e9ac <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);
1e9ac: e5913010 ldr r3, [r1, #16] <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_rmnod (rtems_filesystem_location_info_t* parent_pathloc,
rtems_filesystem_location_info_t* pathloc)
{
1e9b0: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1e9b4: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
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);
1e9b8: 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);
1e9bc: e5907000 ldr r7, [r0] <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1e9c0: e5916000 ldr r6, [r1] <== NOT EXECUTED
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_RMNOD))
printf ("rtems-rfs: rmnod: parent:%" PRId32 " doff:%" PRIu32 ", ino:%" PRId32 "\n",
parent, doff, ino);
rtems_rfs_rtems_lock (fs);
1e9c4: e1a00004 mov r0, r4 <== NOT EXECUTED
1e9c8: ebfffdff bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_unlink (fs, parent, ino, doff, rtems_rfs_unlink_dir_denied);
1e9cc: e1a03005 mov r3, r5 <== NOT EXECUTED
1e9d0: e3a0c000 mov ip, #0 <== NOT EXECUTED
1e9d4: e1a01007 mov r1, r7 <== NOT EXECUTED
1e9d8: e1a02006 mov r2, r6 <== NOT EXECUTED
1e9dc: e1a00004 mov r0, r4 <== NOT EXECUTED
1e9e0: e58dc000 str ip, [sp] <== NOT EXECUTED
1e9e4: eb006858 bl 38b4c <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
1e9e8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1e9ec: 0a000005 beq 1ea08 <rtems_rfs_rtems_rmnod+0x5c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e9f0: e1a00004 mov r0, r4 <== NOT EXECUTED
1e9f4: ebfffdf9 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("rmnod: unlinking", rc);
1e9f8: eb007e72 bl 3e3c8 <__errno> <== NOT EXECUTED
1e9fc: e5805000 str r5, [r0] <== NOT EXECUTED
1ea00: e3e00000 mvn r0, #0 <== NOT EXECUTED
1ea04: ea000002 b 1ea14 <rtems_rfs_rtems_rmnod+0x68> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1ea08: e1a00004 mov r0, r4 <== NOT EXECUTED
1ea0c: ebfffdf3 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1ea10: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
1ea14: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0001f730 <rtems_rfs_rtems_set_handlers>:
*/
bool
rtems_rfs_rtems_set_handlers (rtems_filesystem_location_info_t* loc,
rtems_rfs_inode_handle* inode)
{
1f730: e92d4010 push {r4, lr} <== NOT EXECUTED
1f734: e591300c ldr r3, [r1, #12] <== NOT EXECUTED
1f738: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
1f73c: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
1f740: 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))
1f744: e2013a0f and r3, r1, #61440 ; 0xf000 <== NOT EXECUTED
1f748: 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;
1f74c: e3a02000 mov r2, #0 <== NOT EXECUTED
1f750: e5802008 str r2, [r0, #8] <== NOT EXECUTED
if (RTEMS_RFS_S_ISDIR (mode))
loc->handlers = rtems_rfs_rtems_handlers (dir);
1f754: 059f304c ldreq r3, [pc, #76] ; 1f7a8 <rtems_rfs_rtems_set_handlers+0x78><== NOT EXECUTED
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;
if (RTEMS_RFS_S_ISDIR (mode))
1f758: 0a00000b beq 1f78c <rtems_rfs_rtems_set_handlers+0x5c> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (dir);
else if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK(mode))
1f75c: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
1f760: 13530a06 cmpne r3, #24576 ; 0x6000 <== NOT EXECUTED
1f764: 13a04000 movne r4, #0 <== NOT EXECUTED
1f768: 03a04001 moveq r4, #1 <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (device);
1f76c: 059f3038 ldreq r3, [pc, #56] ; 1f7ac <rtems_rfs_rtems_set_handlers+0x7c><== 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))
1f770: 0a000005 beq 1f78c <rtems_rfs_rtems_set_handlers+0x5c> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (device);
else if (RTEMS_RFS_S_ISLNK (mode))
1f774: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
1f778: 059f3030 ldreq r3, [pc, #48] ; 1f7b0 <rtems_rfs_rtems_set_handlers+0x80><== NOT EXECUTED
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);
else if (RTEMS_RFS_S_ISLNK (mode))
1f77c: 0a000002 beq 1f78c <rtems_rfs_rtems_set_handlers+0x5c> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (link);
else if (RTEMS_RFS_S_ISREG (mode))
1f780: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
1f784: 1a000003 bne 1f798 <rtems_rfs_rtems_set_handlers+0x68> <== NOT EXECUTED
loc->handlers = rtems_rfs_rtems_handlers (file);
1f788: e59f3024 ldr r3, [pc, #36] ; 1f7b4 <rtems_rfs_rtems_set_handlers+0x84><== NOT EXECUTED
1f78c: e5803008 str r3, [r0, #8] <== NOT EXECUTED
1f790: e3a00001 mov r0, #1 <== NOT EXECUTED
1f794: e8bd8010 pop {r4, pc} <== NOT EXECUTED
else
{
printf ("rtems-rfs: mode type unknown: %04x\n", mode);
1f798: e59f0018 ldr r0, [pc, #24] ; 1f7b8 <rtems_rfs_rtems_set_handlers+0x88><== NOT EXECUTED
1f79c: eb008c67 bl 42940 <printf> <== NOT EXECUTED
1f7a0: e1a00004 mov r0, r4 <== NOT EXECUTED
return false;
}
return true;
}
1f7a4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0001e5f0 <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;
1e5f0: 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)
{
1e5f4: 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);
1e5f8: 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);
1e5fc: e593507c ldr r5, [r3, #124] ; 0x7c <== NOT EXECUTED
rc = rtems_rfs_fs_close(fs);
1e600: eb0060e0 bl 36988 <rtems_rfs_fs_close> <== NOT EXECUTED
1e604: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_rfs_mutex_destroy (&rtems->access);
1e608: e1a00005 mov r0, r5 <== NOT EXECUTED
1e60c: eb006a27 bl 38eb0 <rtems_rfs_mutex_destroy> <== NOT EXECUTED
free (rtems);
1e610: e1a00005 mov r0, r5 <== NOT EXECUTED
1e614: ebffa426 bl 76b4 <free> <== NOT EXECUTED
return rtems_rfs_rtems_error ("shutdown: close", rc);
1e618: eb007f6a bl 3e3c8 <__errno> <== NOT EXECUTED
1e61c: e3540000 cmp r4, #0 <== NOT EXECUTED
1e620: e5804000 str r4, [r0] <== NOT EXECUTED
}
1e624: 01a00004 moveq r0, r4 <== NOT EXECUTED
1e628: 13e00000 mvnne r0, #0 <== NOT EXECUTED
1e62c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0001ec68 <rtems_rfs_rtems_stat>:
*/
int
rtems_rfs_rtems_stat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
1ec68: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1ec6c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
1ec70: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1ec74: e5906000 ldr r6, [r0] <== NOT EXECUTED
*/
int
rtems_rfs_rtems_stat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
1ec78: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
int rc;
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);
1ec7c: e1a00005 mov r0, r5 <== NOT EXECUTED
*/
int
rtems_rfs_rtems_stat (rtems_filesystem_location_info_t* pathloc,
struct stat* buf)
{
1ec80: e1a04001 mov r4, r1 <== NOT EXECUTED
int rc;
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);
1ec84: ebfffd50 bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1ec88: e1a00005 mov r0, r5 <== NOT EXECUTED
1ec8c: e1a01006 mov r1, r6 <== NOT EXECUTED
1ec90: e1a0200d mov r2, sp <== NOT EXECUTED
1ec94: e3a03001 mov r3, #1 <== NOT EXECUTED
1ec98: eb0065c9 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
1ec9c: e2507000 subs r7, r0, #0 <== NOT EXECUTED
1eca0: 0a000004 beq 1ecb8 <rtems_rfs_rtems_stat+0x50> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1eca4: e1a00005 mov r0, r5 <== NOT EXECUTED
1eca8: ebfffd4c bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("stat: opening inode", rc);
1ecac: eb007dc5 bl 3e3c8 <__errno> <== NOT EXECUTED
1ecb0: e5807000 str r7, [r0] <== NOT EXECUTED
1ecb4: ea000089 b 1eee0 <rtems_rfs_rtems_stat+0x278> <== 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);
1ecb8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
}
mode = rtems_rfs_inode_get_mode (&inode);
if (RTEMS_RFS_S_ISCHR (mode) || RTEMS_RFS_S_ISBLK (mode))
1ecbc: e5d23003 ldrb r3, [r2, #3] <== NOT EXECUTED
1ecc0: e5d20002 ldrb r0, [r2, #2] <== NOT EXECUTED
1ecc4: e1830400 orr r0, r3, r0, lsl #8 <== NOT EXECUTED
1ecc8: e2003a0f and r3, r0, #61440 ; 0xf000 <== NOT EXECUTED
1eccc: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
1ecd0: 13530a06 cmpne r3, #24576 ; 0x6000 <== NOT EXECUTED
1ecd4: 1a000011 bne 1ed20 <rtems_rfs_rtems_stat+0xb8> <== 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]);
1ecd8: e282301c add r3, r2, #28 <== NOT EXECUTED
1ecdc: e5d38005 ldrb r8, [r3, #5] <== NOT EXECUTED
rtems_device_minor_number _minor
)
{
union __rtems_dev_t temp;
temp.__overlay.major = _major;
1ece0: e5d2101c ldrb r1, [r2, #28] <== NOT EXECUTED
1ece4: e5d3c004 ldrb ip, [r3, #4] <== NOT EXECUTED
1ece8: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
1ecec: e5d3e001 ldrb lr, [r3, #1] <== NOT EXECUTED
1ecf0: e5d37007 ldrb r7, [r3, #7] <== NOT EXECUTED
1ecf4: e1a08808 lsl r8, r8, #16 <== NOT EXECUTED
1ecf8: e1888c0c orr r8, r8, ip, lsl #24 <== NOT EXECUTED
1ecfc: e1822c01 orr r2, r2, r1, lsl #24 <== NOT EXECUTED
1ed00: e5d3c006 ldrb ip, [r3, #6] <== NOT EXECUTED
1ed04: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
1ed08: e182280e orr r2, r2, lr, lsl #16 <== NOT EXECUTED
1ed0c: e1883007 orr r3, r8, r7 <== NOT EXECUTED
1ed10: e183340c orr r3, r3, ip, lsl #8 <== NOT EXECUTED
1ed14: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
{
buf->st_rdev =
1ed18: e5842018 str r2, [r4, #24] <== NOT EXECUTED
1ed1c: e584301c str r3, [r4, #28] <== NOT EXECUTED
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);
1ed20: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
1ed24: e893000c ldm r3, {r2, r3} <== NOT EXECUTED
buf->st_ino = ino;
1ed28: 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);
1ed2c: e884000c stm r4, {r2, r3} <== NOT EXECUTED
buf->st_ino = ino;
buf->st_mode = rtems_rfs_rtems_mode (mode);
1ed30: eb00027d bl 1f72c <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);
1ed34: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1ed38: e584000c str r0, [r4, #12] <== NOT EXECUTED
1ed3c: e5d31000 ldrb r1, [r3] <== NOT EXECUTED
1ed40: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
1ed44: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
1ed48: e59f11ac ldr r1, [pc, #428] ; 1eefc <rtems_rfs_rtems_stat+0x294><== NOT EXECUTED
1ed4c: e1520001 cmp r2, r1 <== NOT EXECUTED
1ed50: 03a02000 moveq r2, #0 <== NOT EXECUTED
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
1ed54: e1c421b0 strh r2, [r4, #16] <== NOT EXECUTED
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
1ed58: e5d31006 ldrb r1, [r3, #6] <== NOT EXECUTED
1ed5c: e5d32007 ldrb r2, [r3, #7] <== NOT EXECUTED
1ed60: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
1ed64: e1c421b2 strh r2, [r4, #18] <== NOT EXECUTED
buf->st_gid = rtems_rfs_inode_get_gid (&inode);
1ed68: e5d31007 ldrb r1, [r3, #7] <== NOT EXECUTED
1ed6c: e5d30004 ldrb r0, [r3, #4] <== NOT EXECUTED
1ed70: e5d32005 ldrb r2, [r3, #5] <== NOT EXECUTED
1ed74: e1813c00 orr r3, r1, r0, lsl #24 <== NOT EXECUTED
1ed78: e1833802 orr r3, r3, r2, lsl #16 <== NOT EXECUTED
1ed7c: e1a03823 lsr r3, r3, #16 <== 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);
1ed80: e1a01006 mov r1, r6 <== NOT EXECUTED
buf->st_dev = rtems_rfs_fs_device (fs);
buf->st_ino = ino;
buf->st_mode = rtems_rfs_rtems_mode (mode);
buf->st_nlink = rtems_rfs_inode_get_links (&inode);
buf->st_uid = rtems_rfs_inode_get_uid (&inode);
buf->st_gid = rtems_rfs_inode_get_gid (&inode);
1ed84: 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);
1ed88: e1a00005 mov r0, r5 <== NOT EXECUTED
1ed8c: eb005c4d bl 35ec8 <rtems_rfs_file_get_shared> <== NOT EXECUTED
if (shared)
1ed90: e2501000 subs r1, r0, #0 <== NOT EXECUTED
1ed94: e594000c ldr r0, [r4, #12] <== NOT EXECUTED
1ed98: 0a000012 beq 1ede8 <rtems_rfs_rtems_stat+0x180> <== NOT EXECUTED
{
buf->st_atime = rtems_rfs_file_shared_get_atime (shared);
1ed9c: e591308c ldr r3, [r1, #140] ; 0x8c <== NOT EXECUTED
1eda0: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
buf->st_mtime = rtems_rfs_file_shared_get_mtime (shared);
1eda4: e5913090 ldr r3, [r1, #144] ; 0x90 <== NOT EXECUTED
1eda8: e5843030 str r3, [r4, #48] ; 0x30 <== NOT EXECUTED
buf->st_ctime = rtems_rfs_file_shared_get_ctime (shared);
1edac: e5913094 ldr r3, [r1, #148] ; 0x94 <== NOT EXECUTED
1edb0: 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))
1edb4: e2000a0f and r0, r0, #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);
1edb8: e5913084 ldr r3, [r1, #132] ; 0x84 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
1edbc: e3500a0a cmp r0, #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);
1edc0: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
buf->st_size = rtems_rfs_file_shared_get_block_offset (shared);
1edc4: 01d138b8 ldrheq r3, [r1, #136] ; 0x88 <== NOT EXECUTED
1edc8: 05843020 streq r3, [r4, #32] <== NOT EXECUTED
1edcc: 03a03000 moveq r3, #0 <== NOT EXECUTED
1edd0: 05843024 streq r3, [r4, #36] ; 0x24 <== NOT EXECUTED
1edd4: 0a000036 beq 1eeb4 <rtems_rfs_rtems_stat+0x24c> <== 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);
1edd8: e1a00005 mov r0, r5 <== NOT EXECUTED
1eddc: e2811084 add r1, r1, #132 ; 0x84 <== NOT EXECUTED
1ede0: eb005495 bl 3403c <rtems_rfs_block_get_size> <== NOT EXECUTED
1ede4: ea000030 b 1eeac <rtems_rfs_rtems_stat+0x244> <== 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);
1ede8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1edec: 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);
1edf0: e5d2c003 ldrb ip, [r2, #3] <== NOT EXECUTED
1edf4: e5d3e010 ldrb lr, [r3, #16] <== NOT EXECUTED
1edf8: e5d26001 ldrb r6, [r2, #1] <== NOT EXECUTED
1edfc: e18cec0e orr lr, ip, lr, lsl #24 <== NOT EXECUTED
1ee00: e5d2c002 ldrb ip, [r2, #2] <== NOT EXECUTED
1ee04: e18e2806 orr r2, lr, r6, lsl #16 <== NOT EXECUTED
1ee08: e182240c orr r2, r2, ip, lsl #8 <== NOT EXECUTED
1ee0c: 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);
1ee10: e2832014 add r2, r3, #20 <== NOT EXECUTED
buf->st_mtime = rtems_rfs_inode_get_mtime (&inode);
1ee14: e5d2c003 ldrb ip, [r2, #3] <== NOT EXECUTED
1ee18: e5d3e014 ldrb lr, [r3, #20] <== NOT EXECUTED
1ee1c: e5d26001 ldrb r6, [r2, #1] <== NOT EXECUTED
1ee20: e18cec0e orr lr, ip, lr, lsl #24 <== NOT EXECUTED
1ee24: e5d2c002 ldrb ip, [r2, #2] <== NOT EXECUTED
1ee28: e18e2806 orr r2, lr, r6, lsl #16 <== NOT EXECUTED
1ee2c: e182240c orr r2, r2, ip, lsl #8 <== NOT EXECUTED
1ee30: 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);
1ee34: e2832018 add r2, r3, #24 <== NOT EXECUTED
buf->st_ctime = rtems_rfs_inode_get_ctime (&inode);
1ee38: e5d2c003 ldrb ip, [r2, #3] <== NOT EXECUTED
1ee3c: e5d3e018 ldrb lr, [r3, #24] <== NOT EXECUTED
1ee40: e5d26001 ldrb r6, [r2, #1] <== NOT EXECUTED
1ee44: e18cec0e orr lr, ip, lr, lsl #24 <== NOT EXECUTED
1ee48: e5d2c002 ldrb ip, [r2, #2] <== NOT EXECUTED
1ee4c: e18e2806 orr r2, lr, r6, lsl #16 <== NOT EXECUTED
1ee50: e182240c orr r2, r2, ip, lsl #8 <== NOT EXECUTED
1ee54: 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);
1ee58: e283200c add r2, r3, #12 <== NOT EXECUTED
buf->st_blocks = rtems_rfs_inode_get_block_count (&inode);
1ee5c: e5d2c003 ldrb ip, [r2, #3] <== NOT EXECUTED
1ee60: e5d3e00c ldrb lr, [r3, #12] <== NOT EXECUTED
1ee64: e5d26001 ldrb r6, [r2, #1] <== NOT EXECUTED
1ee68: e18cec0e orr lr, ip, lr, lsl #24 <== NOT EXECUTED
1ee6c: e5d2c002 ldrb ip, [r2, #2] <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
1ee70: e2000a0f and r0, r0, #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);
1ee74: e18e2806 orr r2, lr, r6, lsl #16 <== NOT EXECUTED
1ee78: e182240c orr r2, r2, ip, lsl #8 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
1ee7c: e3500a0a cmp r0, #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);
1ee80: e5842044 str r2, [r4, #68] ; 0x44 <== NOT EXECUTED
if (S_ISLNK (buf->st_mode))
1ee84: 1a000005 bne 1eea0 <rtems_rfs_rtems_stat+0x238> <== NOT EXECUTED
buf->st_size = rtems_rfs_inode_get_block_offset (&inode);
1ee88: e5d3200b ldrb r2, [r3, #11] <== NOT EXECUTED
1ee8c: e5d3300a ldrb r3, [r3, #10] <== NOT EXECUTED
1ee90: e1823403 orr r3, r2, r3, lsl #8 <== NOT EXECUTED
1ee94: e5843020 str r3, [r4, #32] <== NOT EXECUTED
1ee98: e5841024 str r1, [r4, #36] ; 0x24 <== NOT EXECUTED
1ee9c: ea000004 b 1eeb4 <rtems_rfs_rtems_stat+0x24c> <== NOT EXECUTED
else
buf->st_size = rtems_rfs_inode_get_size (fs, &inode);
1eea0: e1a00005 mov r0, r5 <== NOT EXECUTED
1eea4: e1a0100d mov r1, sp <== NOT EXECUTED
1eea8: eb00645f bl 3802c <rtems_rfs_inode_get_size> <== NOT EXECUTED
1eeac: e5840020 str r0, [r4, #32] <== NOT EXECUTED
1eeb0: e5841024 str r1, [r4, #36] ; 0x24 <== NOT EXECUTED
}
buf->st_blksize = rtems_rfs_fs_block_size (fs);
1eeb4: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
1eeb8: e1a00005 mov r0, r5 <== 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);
1eebc: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
1eec0: e1a0100d mov r1, sp <== NOT EXECUTED
1eec4: eb00651b bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
1eec8: e2504000 subs r4, r0, #0 <== NOT EXECUTED
1eecc: da000005 ble 1eee8 <rtems_rfs_rtems_stat+0x280> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1eed0: e1a00005 mov r0, r5 <== NOT EXECUTED
1eed4: ebfffcc1 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("stat: closing inode", rc);
1eed8: eb007d3a bl 3e3c8 <__errno> <== NOT EXECUTED
1eedc: e5804000 str r4, [r0] <== NOT EXECUTED
1eee0: e3e00000 mvn r0, #0 <== NOT EXECUTED
1eee4: ea000002 b 1eef4 <rtems_rfs_rtems_stat+0x28c> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1eee8: e1a00005 mov r0, r5 <== NOT EXECUTED
1eeec: ebfffcbb bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1eef0: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
1eef4: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
1eef8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
0001e7ec <rtems_rfs_rtems_statvfs>:
* @return int
*/
int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
1e7ec: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1e7f0: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
1e7f4: e5935034 ldr r5, [r3, #52] ; 0x34 <== NOT EXECUTED
* @return int
*/
int
rtems_rfs_rtems_statvfs (rtems_filesystem_location_info_t* pathloc,
struct statvfs* sb)
{
1e7f8: 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);
1e7fc: e1a0200d mov r2, sp <== NOT EXECUTED
1e800: e28d1004 add r1, sp, #4 <== NOT EXECUTED
1e804: e1a00005 mov r0, r5 <== NOT EXECUTED
1e808: eb0064d7 bl 37b6c <rtems_rfs_group_usage> <== NOT EXECUTED
sb->f_bsize = rtems_rfs_fs_block_size (fs);
1e80c: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
1e810: e5843000 str r3, [r4] <== NOT EXECUTED
sb->f_frsize = rtems_rfs_fs_media_block_size (fs);
1e814: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
1e818: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED
1e81c: e5842004 str r2, [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;
1e820: 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);
1e824: e5951010 ldr r1, [r5, #16] <== 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);
1e828: e593c01c ldr ip, [r3, #28] <== NOT EXECUTED
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;
sb->f_favail = sb->f_ffree;
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
1e82c: e59f304c ldr r3, [pc, #76] ; 1e880 <rtems_rfs_rtems_statvfs+0x94><== 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;
1e830: e0622001 rsb r2, r2, r1 <== 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;
1e834: 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;
1e838: e5842028 str r2, [r4, #40] ; 0x28 <== NOT EXECUTED
sb->f_fsid = RTEMS_RFS_SB_MAGIC;
1e83c: 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);
1e840: e5841020 str r1, [r4, #32] <== NOT EXECUTED
sb->f_ffree = rtems_rfs_fs_inodes (fs) - inodes;
1e844: 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);
1e848: e5953000 ldr r3, [r5] <== NOT EXECUTED
1e84c: 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;
1e850: 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);
1e854: 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;
1e858: 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);
1e85c: 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);
1e860: 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);
1e864: e584c008 str ip, [r4, #8] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
sb->f_bavail = sb->f_bfree;
1e868: 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);
1e86c: e584000c str r0, [r4, #12] <== NOT EXECUTED
sb->f_bfree = rtems_rfs_fs_blocks (fs) - blocks;
1e870: e5843010 str r3, [r4, #16] <== NOT EXECUTED
1e874: e5840014 str r0, [r4, #20] <== NOT EXECUTED
sb->f_bavail = sb->f_bfree;
1e878: 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;
}
1e87c: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
0001ef6c <rtems_rfs_rtems_symlink>:
int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
1ef6c: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}<== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
1ef70: 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)
{
1ef74: e1a08001 mov r8, r1 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
1ef78: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
int
rtems_rfs_rtems_symlink (rtems_filesystem_location_info_t* parent_loc,
const char* link_name,
const char* node_name)
{
1ef7c: e1a09002 mov r9, r2 <== 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);
1ef80: e5905000 ldr r5, [r0] <== NOT EXECUTED
uid_t uid;
gid_t gid;
int rc;
#if defined(RTEMS_POSIX_API)
uid = geteuid ();
1ef84: eb0019bc bl 2567c <geteuid> <== NOT EXECUTED
1ef88: e1a07000 mov r7, r0 <== NOT EXECUTED
gid = getegid ();
1ef8c: eb0019b5 bl 25668 <getegid> <== NOT EXECUTED
1ef90: e1a06000 mov r6, r0 <== NOT EXECUTED
#else
uid = 0;
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
1ef94: e1a00004 mov r0, r4 <== NOT EXECUTED
1ef98: ebfffc8b bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
1ef9c: e1a00009 mov r0, r9 <== NOT EXECUTED
1efa0: eb009816 bl 45000 <strlen> <== NOT EXECUTED
1efa4: e1a0a000 mov sl, r0 <== NOT EXECUTED
link_name, strlen (link_name),
1efa8: e1a00008 mov r0, r8 <== NOT EXECUTED
1efac: eb009813 bl 45000 <strlen> <== NOT EXECUTED
gid = 0;
#endif
rtems_rfs_rtems_lock (fs);
rc = rtems_rfs_symlink (fs, node_name, strlen (node_name),
1efb0: e1a01009 mov r1, r9 <== NOT EXECUTED
1efb4: e58d0000 str r0, [sp] <== NOT EXECUTED
1efb8: e1a0200a mov r2, sl <== NOT EXECUTED
1efbc: e1a03008 mov r3, r8 <== NOT EXECUTED
1efc0: e1a00004 mov r0, r4 <== NOT EXECUTED
1efc4: e58d500c str r5, [sp, #12] <== NOT EXECUTED
1efc8: e58d7004 str r7, [sp, #4] <== NOT EXECUTED
1efcc: e58d6008 str r6, [sp, #8] <== NOT EXECUTED
1efd0: eb00665d bl 3894c <rtems_rfs_symlink> <== NOT EXECUTED
link_name, strlen (link_name),
uid, gid, parent);
if (rc)
1efd4: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1efd8: 0a000005 beq 1eff4 <rtems_rfs_rtems_symlink+0x88> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1efdc: e1a00004 mov r0, r4 <== NOT EXECUTED
1efe0: ebfffc7e bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("symlink: linking", rc);
1efe4: eb007cf7 bl 3e3c8 <__errno> <== NOT EXECUTED
1efe8: e5805000 str r5, [r0] <== NOT EXECUTED
1efec: e3e00000 mvn r0, #0 <== NOT EXECUTED
1eff0: ea000002 b 1f000 <rtems_rfs_rtems_symlink+0x94> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1eff4: e1a00004 mov r0, r4 <== NOT EXECUTED
1eff8: ebfffc78 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1effc: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
1f000: e28dd010 add sp, sp, #16 <== NOT EXECUTED
1f004: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
0001ea18 <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);
1ea18: 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)
{
1ea1c: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (parent_loc);
1ea20: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
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);
1ea24: 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);
1ea28: e5907000 ldr r7, [r0] <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (loc);
1ea2c: e5916000 ldr r6, [r1] <== NOT EXECUTED
uint32_t doff = rtems_rfs_rtems_get_pathloc_doff (loc);
int rc;
rtems_rfs_rtems_lock (fs);
1ea30: e1a00004 mov r0, r4 <== NOT EXECUTED
1ea34: ebfffde4 bl 1e1cc <rtems_rfs_rtems_lock> <== 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);
1ea38: e1a03005 mov r3, r5 <== NOT EXECUTED
1ea3c: e3a0c000 mov ip, #0 <== NOT EXECUTED
1ea40: e1a01007 mov r1, r7 <== NOT EXECUTED
1ea44: e1a02006 mov r2, r6 <== NOT EXECUTED
1ea48: e1a00004 mov r0, r4 <== NOT EXECUTED
1ea4c: e58dc000 str ip, [sp] <== NOT EXECUTED
1ea50: eb00683d bl 38b4c <rtems_rfs_unlink> <== NOT EXECUTED
if (rc)
1ea54: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1ea58: 0a000005 beq 1ea74 <rtems_rfs_rtems_unlink+0x5c> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1ea5c: e1a00004 mov r0, r4 <== NOT EXECUTED
1ea60: ebfffdde bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("unlink: unlink inode", rc);
1ea64: eb007e57 bl 3e3c8 <__errno> <== NOT EXECUTED
1ea68: e5805000 str r5, [r0] <== NOT EXECUTED
1ea6c: e3e00000 mvn r0, #0 <== NOT EXECUTED
1ea70: ea000002 b 1ea80 <rtems_rfs_rtems_unlink+0x68> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1ea74: e1a00004 mov r0, r4 <== NOT EXECUTED
1ea78: ebfffdd8 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1ea7c: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
1ea80: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0001e1e0 <rtems_rfs_rtems_unlock>:
/**
* Unlock the RFS file system.
*/
static inline void
rtems_rfs_rtems_unlock (rtems_rfs_file_system* fs)
{
1e1e0: e92d4010 push {r4, lr} <== NOT EXECUTED
rtems_rfs_rtems_private* rtems = rtems_rfs_fs_user (fs);
1e1e4: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1e1e8: eb005b32 bl 34eb8 <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);
1e1ec: e5940000 ldr r0, [r4] <== NOT EXECUTED
rtems_rfs_mutex_unlock (&rtems->access);
}
1e1f0: e8bd4010 pop {r4, lr} <== NOT EXECUTED
1e1f4: eaffb5f7 b b9d8 <rtems_semaphore_release> <== NOT EXECUTED
0001e434 <rtems_rfs_rtems_utime>:
int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
1e434: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
1e438: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED
1e43c: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
1e440: e5908000 ldr r8, [r0] <== NOT EXECUTED
int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
1e444: e24dd028 sub sp, sp, #40 ; 0x28 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
1e448: e1a00004 mov r0, r4 <== NOT EXECUTED
int
rtems_rfs_rtems_utime(rtems_filesystem_location_info_t* pathloc,
time_t atime,
time_t mtime)
{
1e44c: e1a06001 mov r6, r1 <== NOT EXECUTED
1e450: e1a05002 mov r5, r2 <== NOT EXECUTED
rtems_rfs_file_system* fs = rtems_rfs_rtems_pathloc_dev (pathloc);
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
rtems_rfs_inode_handle inode;
int rc;
rtems_rfs_rtems_lock (fs);
1e454: ebffff5c bl 1e1cc <rtems_rfs_rtems_lock> <== NOT EXECUTED
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1e458: e1a01008 mov r1, r8 <== NOT EXECUTED
1e45c: e1a00004 mov r0, r4 <== NOT EXECUTED
1e460: e1a0200d mov r2, sp <== NOT EXECUTED
1e464: e3a03001 mov r3, #1 <== NOT EXECUTED
1e468: eb0067d5 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
1e46c: 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);
1e470: e1a0700d mov r7, sp <== NOT EXECUTED
if (rc)
1e474: 0a000004 beq 1e48c <rtems_rfs_rtems_utime+0x58> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e478: e1a00004 mov r0, r4 <== NOT EXECUTED
1e47c: ebffff57 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("utime: read inode", rc);
1e480: eb007fd0 bl 3e3c8 <__errno> <== NOT EXECUTED
1e484: e5808000 str r8, [r0] <== NOT EXECUTED
1e488: ea000020 b 1e510 <rtems_rfs_rtems_utime+0xdc> <== 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);
1e48c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e490: e1a02c26 lsr r2, r6, #24 <== NOT EXECUTED
1e494: e5c32010 strb r2, [r3, #16] <== NOT EXECUTED
1e498: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e49c: e1a02826 lsr r2, r6, #16 <== NOT EXECUTED
1e4a0: e5c32011 strb r2, [r3, #17] <== NOT EXECUTED
1e4a4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e4a8: e1a02426 lsr r2, r6, #8 <== NOT EXECUTED
1e4ac: e5c32012 strb r2, [r3, #18] <== NOT EXECUTED
1e4b0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e4b4: 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);
1e4b8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e4bc: e1a02c25 lsr r2, r5, #24 <== NOT EXECUTED
1e4c0: e5c32014 strb r2, [r3, #20] <== NOT EXECUTED
1e4c4: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e4c8: e1a02825 lsr r2, r5, #16 <== NOT EXECUTED
1e4cc: e5c32015 strb r2, [r3, #21] <== NOT EXECUTED
1e4d0: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
1e4d4: e1a02425 lsr r2, r5, #8 <== NOT EXECUTED
1e4d8: e5c32016 strb r2, [r3, #22] <== NOT EXECUTED
1e4dc: 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);
1e4e0: e1a0100d mov r1, sp <== NOT EXECUTED
1e4e4: e5c35017 strb r5, [r3, #23] <== NOT EXECUTED
1e4e8: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
1e4ec: e3a03001 mov r3, #1 <== NOT EXECUTED
1e4f0: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
1e4f4: eb00678f bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc)
1e4f8: e2505000 subs r5, r0, #0 <== NOT EXECUTED
1e4fc: 0a000005 beq 1e518 <rtems_rfs_rtems_utime+0xe4> <== NOT EXECUTED
{
rtems_rfs_rtems_unlock (fs);
1e500: e1a00004 mov r0, r4 <== NOT EXECUTED
1e504: ebffff35 bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
return rtems_rfs_rtems_error ("utime: closing inode", rc);
1e508: eb007fae bl 3e3c8 <__errno> <== NOT EXECUTED
1e50c: e5805000 str r5, [r0] <== NOT EXECUTED
1e510: e3e00000 mvn r0, #0 <== NOT EXECUTED
1e514: ea000002 b 1e524 <rtems_rfs_rtems_utime+0xf0> <== NOT EXECUTED
}
rtems_rfs_rtems_unlock (fs);
1e518: e1a00004 mov r0, r4 <== NOT EXECUTED
1e51c: ebffff2f bl 1e1e0 <rtems_rfs_rtems_unlock> <== NOT EXECUTED
1e520: e1a00005 mov r0, r5 <== NOT EXECUTED
return 0;
}
1e524: e28dd028 add sp, sp, #40 ; 0x28 <== NOT EXECUTED
1e528: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00036ea0 <rtems_rfs_rup_quotient>:
* "quotient = dividend / divisor"
*/
int
rtems_rfs_rup_quotient (uint32_t dividend, uint32_t divisor)
{
if (dividend == 0)
36ea0: 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)
{
36ea4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
if (dividend == 0)
36ea8: 03a00001 moveq r0, #1 <== NOT EXECUTED
36eac: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) <== NOT EXECUTED
return 1;
return ((dividend - 1) / divisor) + 1;
36eb0: e2400001 sub r0, r0, #1 <== NOT EXECUTED
36eb4: eb007d12 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
36eb8: e2800001 add r0, r0, #1 <== NOT EXECUTED
}
36ebc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000202e4 <rtems_rfs_shell_block>:
uint8_t* data;
bool state;
int b;
int rc;
if (argc <= 1)
202e4: e3510001 cmp r1, #1 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_block (rtems_rfs_file_system* fs, int argc, char *argv[])
{
202e8: e92d41ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
202ec: e1a04000 mov r4, r0 <== NOT EXECUTED
uint8_t* data;
bool state;
int b;
int rc;
if (argc <= 1)
202f0: ca000002 bgt 20300 <rtems_rfs_shell_block+0x1c> <== NOT EXECUTED
{
printf ("error: no block number provided\n");
202f4: e59f018c ldr r0, [pc, #396] ; 20488 <rtems_rfs_shell_block+0x1a4><== NOT EXECUTED
202f8: eb008a35 bl 42bd4 <puts> <== NOT EXECUTED
202fc: ea00003e b 203fc <rtems_rfs_shell_block+0x118> <== NOT EXECUTED
return 1;
}
block = strtoul (argv[1], 0, 0);
20300: e3a01000 mov r1, #0 <== NOT EXECUTED
20304: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
20308: e1a02001 mov r2, r1 <== NOT EXECUTED
2030c: eb009857 bl 46470 <strtoul> <== NOT EXECUTED
20310: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
20314: e3a01000 mov r1, #0 <== NOT EXECUTED
20318: e1a02001 mov r2, r1 <== NOT EXECUTED
2031c: e1a06000 mov r6, r0 <== NOT EXECUTED
20320: e5930000 ldr r0, [r3] <== NOT EXECUTED
20324: ebffad65 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
20328: e1a00004 mov r0, r4 <== NOT EXECUTED
2032c: e3a01000 mov r1, #0 <== NOT EXECUTED
20330: e1a02006 mov r2, r6 <== NOT EXECUTED
20334: e28d300f add r3, sp, #15 <== NOT EXECUTED
20338: eb005e30 bl 37c00 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
if (rc > 0)
2033c: e2505000 subs r5, r0, #0 <== NOT EXECUTED
20340: da000008 ble 20368 <rtems_rfs_shell_block+0x84> <== NOT EXECUTED
{
rtems_rfs_shell_unlock_rfs (fs);
20344: e1a00004 mov r0, r4 <== NOT EXECUTED
20348: ebfffdcb bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
2034c: e1a00005 mov r0, r5 <== NOT EXECUTED
20350: eb00919e bl 449d0 <strerror> <== NOT EXECUTED
20354: e1a01006 mov r1, r6 <== NOT EXECUTED
20358: e1a03000 mov r3, r0 <== NOT EXECUTED
2035c: e1a02005 mov r2, r5 <== NOT EXECUTED
20360: e59f0124 ldr r0, [pc, #292] ; 2048c <rtems_rfs_shell_block+0x1a8><== NOT EXECUTED
20364: ea000023 b 203f8 <rtems_rfs_shell_block+0x114> <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
20368: e5dd100f ldrb r1, [sp, #15] <== NOT EXECUTED
2036c: e59f311c ldr r3, [pc, #284] ; 20490 <rtems_rfs_shell_block+0x1ac><== NOT EXECUTED
20370: e3510000 cmp r1, #0 <== NOT EXECUTED
20374: e59f2118 ldr r2, [pc, #280] ; 20494 <rtems_rfs_shell_block+0x1b0><== NOT EXECUTED
20378: e1a01006 mov r1, r6 <== NOT EXECUTED
2037c: 01a02003 moveq r2, r3 <== NOT EXECUTED
20380: e59f0110 ldr r0, [pc, #272] ; 20498 <rtems_rfs_shell_block+0x1b4><== NOT EXECUTED
20384: eb00896d bl 42940 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
20388: e3a05000 mov r5, #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);
2038c: e3a03001 mov r3, #1 <== NOT EXECUTED
20390: e1a02006 mov r2, r6 <== NOT EXECUTED
20394: e1a00004 mov r0, r4 <== NOT EXECUTED
20398: e1a0100d mov r1, sp <== NOT EXECUTED
2039c: e5cd5000 strb r5, [sp] <== NOT EXECUTED
handle->bnum = 0;
203a0: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
handle->buffer = NULL;
203a4: e58d5008 str r5, [sp, #8] <== NOT EXECUTED
203a8: eb00535c bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
203ac: e2508000 subs r8, r0, #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);
203b0: d59d3008 ldrle r3, [sp, #8] <== 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);
203b4: e1a0700d mov r7, sp <== 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);
203b8: d5936020 ldrle r6, [r3, #32] <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
rc = rtems_rfs_buffer_handle_request (fs, &buffer, block, true);
if (rc > 0)
203bc: da000020 ble 20444 <rtems_rfs_shell_block+0x160> <== 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);
203c0: e1a0100d mov r1, sp <== NOT EXECUTED
203c4: e1a00004 mov r0, r4 <== NOT EXECUTED
203c8: eb00530b bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
203cc: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
203d0: e58d5008 str r5, [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;
203d4: e5cd5000 strb r5, [sp] <== NOT EXECUTED
handle->bnum = 0;
203d8: e58d5004 str r5, [sp, #4] <== NOT EXECUTED
203dc: ebfffda6 bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
203e0: e1a00008 mov r0, r8 <== NOT EXECUTED
203e4: eb009179 bl 449d0 <strerror> <== NOT EXECUTED
203e8: e1a03000 mov r3, r0 <== NOT EXECUTED
203ec: e59f00a8 ldr r0, [pc, #168] ; 2049c <rtems_rfs_shell_block+0x1b8><== NOT EXECUTED
203f0: e1a01006 mov r1, r6 <== NOT EXECUTED
203f4: e1a02008 mov r2, r8 <== NOT EXECUTED
203f8: eb008950 bl 42940 <printf> <== NOT EXECUTED
203fc: e3a00001 mov r0, #1 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
20400: ea00001e b 20480 <rtems_rfs_shell_block+0x19c> <== NOT EXECUTED
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
b++, data++)
{
int mod = b % 16;
if (mod == 0)
20404: e215300f ands r3, r5, #15 <== NOT EXECUTED
20408: 1a000006 bne 20428 <rtems_rfs_shell_block+0x144> <== NOT EXECUTED
{
if (b)
2040c: e3550000 cmp r5, #0 <== NOT EXECUTED
printf ("\n");
20410: 13a0000a movne r0, #10 <== NOT EXECUTED
20414: 1b0089be blne 42b14 <putchar> <== NOT EXECUTED
printf ("%04x ", b);
20418: e1a01005 mov r1, r5 <== NOT EXECUTED
2041c: e59f007c ldr r0, [pc, #124] ; 204a0 <rtems_rfs_shell_block+0x1bc><== NOT EXECUTED
20420: eb008946 bl 42940 <printf> <== NOT EXECUTED
20424: ea000002 b 20434 <rtems_rfs_shell_block+0x150> <== NOT EXECUTED
}
if (mod == 8)
20428: e3530008 cmp r3, #8 <== NOT EXECUTED
printf (" ");
2042c: 03a00020 moveq r0, #32 <== NOT EXECUTED
20430: 0b0089b7 bleq 42b14 <putchar> <== NOT EXECUTED
printf ("%02x ", *data);
20434: e7d61005 ldrb r1, [r6, r5] <== NOT EXECUTED
20438: e59f0064 ldr r0, [pc, #100] ; 204a4 <rtems_rfs_shell_block+0x1c0><== NOT EXECUTED
2043c: eb00893f bl 42940 <printf> <== NOT EXECUTED
return 1;
}
for (b = 0, data = rtems_rfs_buffer_data (&buffer);
b < rtems_rfs_fs_block_size (fs);
b++, data++)
20440: e2855001 add r5, r5, #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);
20444: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED
20448: e1550003 cmp r5, r3 <== NOT EXECUTED
2044c: 3affffec bcc 20404 <rtems_rfs_shell_block+0x120> <== NOT EXECUTED
if (mod == 8)
printf (" ");
printf ("%02x ", *data);
}
printf ("\n");
20450: e3a0000a mov r0, #10 <== NOT EXECUTED
20454: eb0089ae bl 42b14 <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);
20458: e1a00004 mov r0, r4 <== NOT EXECUTED
2045c: e1a0100d mov r1, sp <== NOT EXECUTED
20460: eb0052e5 bl 34ffc <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);
20464: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->dirty = false;
20468: e3a04000 mov r4, #0 <== NOT EXECUTED
2046c: e5cd4000 strb r4, [sp] <== NOT EXECUTED
handle->bnum = 0;
20470: e58d4004 str r4, [sp, #4] <== NOT EXECUTED
handle->buffer = NULL;
20474: e58d4008 str r4, [sp, #8] <== NOT EXECUTED
20478: ebfffd7f bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2047c: e1a00004 mov r0, r4 <== NOT EXECUTED
return 0;
}
20480: e28dd010 add sp, sp, #16 <== NOT EXECUTED
20484: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000204a8 <rtems_rfs_shell_data>:
return rc;
}
static int
rtems_rfs_shell_data (rtems_rfs_file_system* fs, int argc, char *argv[])
{
204a8: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
204ac: e1a04000 mov r4, r0 <== NOT EXECUTED
size_t blocks;
size_t inodes;
int bpcent;
int ipcent;
printf ("RFS Filesystem Data\n");
204b0: e59f01a8 ldr r0, [pc, #424] ; 20660 <rtems_rfs_shell_data+0x1b8><== NOT EXECUTED
204b4: eb0089c6 bl 42bd4 <puts> <== NOT EXECUTED
printf (" flags: %08" PRIx32 "\n", fs->flags);
204b8: e5941000 ldr r1, [r4] <== NOT EXECUTED
204bc: e59f01a0 ldr r0, [pc, #416] ; 20664 <rtems_rfs_shell_data+0x1bc><== NOT EXECUTED
204c0: eb00891e bl 42940 <printf> <== NOT EXECUTED
#if 0
printf (" device: %08lx\n", rtems_rfs_fs_device (fs));
#endif
printf (" blocks: %zu\n", rtems_rfs_fs_blocks (fs));
204c4: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
204c8: e59f0198 ldr r0, [pc, #408] ; 20668 <rtems_rfs_shell_data+0x1c0><== NOT EXECUTED
204cc: eb00891b bl 42940 <printf> <== NOT EXECUTED
printf (" block size: %zu\n", rtems_rfs_fs_block_size (fs));
204d0: e5941008 ldr r1, [r4, #8] <== NOT EXECUTED
204d4: e59f0190 ldr r0, [pc, #400] ; 2066c <rtems_rfs_shell_data+0x1c4><== NOT EXECUTED
204d8: eb008918 bl 42940 <printf> <== NOT EXECUTED
printf (" size: %" PRIu64 "\n", rtems_rfs_fs_size (fs));
204dc: e1a00004 mov r0, r4 <== NOT EXECUTED
204e0: eb005919 bl 3694c <rtems_rfs_fs_size> <== NOT EXECUTED
204e4: e1a02001 mov r2, r1 <== NOT EXECUTED
204e8: e1a01000 mov r1, r0 <== NOT EXECUTED
204ec: e59f017c ldr r0, [pc, #380] ; 20670 <rtems_rfs_shell_data+0x1c8><== NOT EXECUTED
204f0: eb008912 bl 42940 <printf> <== NOT EXECUTED
printf (" media block size: %" PRIu32 "\n", rtems_rfs_fs_media_block_size (fs));
204f4: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
204f8: e59f0174 ldr r0, [pc, #372] ; 20674 <rtems_rfs_shell_data+0x1cc><== NOT EXECUTED
204fc: e5931024 ldr r1, [r3, #36] ; 0x24 <== NOT EXECUTED
20500: eb00890e bl 42940 <printf> <== NOT EXECUTED
printf (" media size: %" PRIu64 "\n", rtems_rfs_fs_media_size (fs));
20504: e1a00004 mov r0, r4 <== NOT EXECUTED
20508: eb005916 bl 36968 <rtems_rfs_fs_media_size> <== NOT EXECUTED
2050c: e1a02001 mov r2, r1 <== NOT EXECUTED
20510: e1a01000 mov r1, r0 <== NOT EXECUTED
20514: e59f015c ldr r0, [pc, #348] ; 20678 <rtems_rfs_shell_data+0x1d0><== NOT EXECUTED
20518: eb008908 bl 42940 <printf> <== NOT EXECUTED
printf (" inodes: %" PRIu32 "\n", rtems_rfs_fs_inodes (fs));
2051c: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
20520: e59f0154 ldr r0, [pc, #340] ; 2067c <rtems_rfs_shell_data+0x1d4><== NOT EXECUTED
20524: eb008905 bl 42940 <printf> <== NOT EXECUTED
printf (" bad blocks: %" PRIu32 "\n", fs->bad_blocks);
20528: e5941014 ldr r1, [r4, #20] <== NOT EXECUTED
2052c: e59f014c ldr r0, [pc, #332] ; 20680 <rtems_rfs_shell_data+0x1d8><== NOT EXECUTED
20530: eb008902 bl 42940 <printf> <== NOT EXECUTED
printf (" max. name length: %" PRIu32 "\n", rtems_rfs_fs_max_name (fs));
20534: e5941018 ldr r1, [r4, #24] <== NOT EXECUTED
20538: e59f0144 ldr r0, [pc, #324] ; 20684 <rtems_rfs_shell_data+0x1dc><== NOT EXECUTED
2053c: eb0088ff bl 42940 <printf> <== NOT EXECUTED
printf (" groups: %d\n", fs->group_count);
20540: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
20544: e59f013c ldr r0, [pc, #316] ; 20688 <rtems_rfs_shell_data+0x1e0><== NOT EXECUTED
20548: eb0088fc bl 42940 <printf> <== NOT EXECUTED
printf (" group blocks: %zd\n", fs->group_blocks);
2054c: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED
20550: e59f0134 ldr r0, [pc, #308] ; 2068c <rtems_rfs_shell_data+0x1e4><== NOT EXECUTED
20554: eb0088f9 bl 42940 <printf> <== NOT EXECUTED
printf (" group inodes: %zd\n", fs->group_inodes);
20558: e5941028 ldr r1, [r4, #40] ; 0x28 <== NOT EXECUTED
2055c: e59f012c ldr r0, [pc, #300] ; 20690 <rtems_rfs_shell_data+0x1e8><== NOT EXECUTED
20560: eb0088f6 bl 42940 <printf> <== NOT EXECUTED
printf (" inodes per block: %zd\n", fs->inodes_per_block);
20564: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED
20568: e59f0124 ldr r0, [pc, #292] ; 20694 <rtems_rfs_shell_data+0x1ec><== NOT EXECUTED
2056c: eb0088f3 bl 42940 <printf> <== NOT EXECUTED
printf (" blocks per block: %zd\n", fs->blocks_per_block);
20570: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED
20574: e59f011c ldr r0, [pc, #284] ; 20698 <rtems_rfs_shell_data+0x1f0><== NOT EXECUTED
20578: eb0088f0 bl 42940 <printf> <== NOT EXECUTED
printf (" singly blocks: %zd\n", fs->block_map_singly_blocks);
2057c: e5941034 ldr r1, [r4, #52] ; 0x34 <== NOT EXECUTED
20580: e59f0114 ldr r0, [pc, #276] ; 2069c <rtems_rfs_shell_data+0x1f4><== NOT EXECUTED
20584: eb0088ed bl 42940 <printf> <== NOT EXECUTED
printf (" doublly blocks: %zd\n", fs->block_map_doubly_blocks);
20588: e5941038 ldr r1, [r4, #56] ; 0x38 <== NOT EXECUTED
2058c: e59f010c ldr r0, [pc, #268] ; 206a0 <rtems_rfs_shell_data+0x1f8><== NOT EXECUTED
20590: eb0088ea bl 42940 <printf> <== NOT EXECUTED
printf (" max. held buffers: %" PRId32 "\n", fs->max_held_buffers);
20594: e594103c ldr r1, [r4, #60] ; 0x3c <== NOT EXECUTED
20598: e59f0104 ldr r0, [pc, #260] ; 206a4 <rtems_rfs_shell_data+0x1fc><== NOT EXECUTED
2059c: eb0088e7 bl 42940 <printf> <== NOT EXECUTED
205a0: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
205a4: e3a01000 mov r1, #0 <== NOT EXECUTED
205a8: e5930000 ldr r0, [r3] <== NOT EXECUTED
205ac: e1a02001 mov r2, r1 <== NOT EXECUTED
205b0: ebffacc2 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rtems_rfs_group_usage (fs, &blocks, &inodes);
205b4: e1a0200d mov r2, sp <== NOT EXECUTED
205b8: e28d1004 add r1, sp, #4 <== NOT EXECUTED
205bc: e1a00004 mov r0, r4 <== NOT EXECUTED
205c0: eb005d69 bl 37b6c <rtems_rfs_group_usage> <== NOT EXECUTED
rtems_rfs_shell_unlock_rfs (fs);
205c4: e1a00004 mov r0, r4 <== NOT EXECUTED
205c8: ebfffd2b bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
bpcent = (blocks * 1000) / rtems_rfs_fs_blocks (fs);
205cc: e59d5004 ldr r5, [sp, #4] <== NOT EXECUTED
205d0: e3a07ffa mov r7, #1000 ; 0x3e8 <== NOT EXECUTED
205d4: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED
205d8: e0000597 mul r0, r7, r5 <== NOT EXECUTED
205dc: eb00d748 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
205e0: e1a06000 mov r6, r0 <== NOT EXECUTED
ipcent = (inodes * 1000) / rtems_rfs_fs_inodes (fs);
205e4: e59d0000 ldr r0, [sp] <== NOT EXECUTED
205e8: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED
205ec: e0000097 mul r0, r7, r0 <== NOT EXECUTED
205f0: eb00d743 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
printf (" blocks used: %zd (%d.%d%%)\n",
205f4: e3a0100a mov r1, #10 <== 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);
205f8: e1a04000 mov r4, r0 <== NOT EXECUTED
printf (" blocks used: %zd (%d.%d%%)\n",
205fc: e1a00006 mov r0, r6 <== NOT EXECUTED
20600: eb00d783 bl 56414 <__aeabi_idiv> <== NOT EXECUTED
20604: e3a0100a mov r1, #10 <== NOT EXECUTED
20608: e1a07000 mov r7, r0 <== NOT EXECUTED
2060c: e1a00006 mov r0, r6 <== NOT EXECUTED
20610: eb00d802 bl 56620 <__modsi3> <== NOT EXECUTED
20614: e1a02007 mov r2, r7 <== NOT EXECUTED
20618: e1a03000 mov r3, r0 <== NOT EXECUTED
2061c: e1a01005 mov r1, r5 <== NOT EXECUTED
20620: e59f0080 ldr r0, [pc, #128] ; 206a8 <rtems_rfs_shell_data+0x200><== NOT EXECUTED
20624: eb0088c5 bl 42940 <printf> <== NOT EXECUTED
blocks, bpcent / 10, bpcent % 10);
printf (" inodes used: %zd (%d.%d%%)\n",
20628: e1a00004 mov r0, r4 <== NOT EXECUTED
2062c: e3a0100a mov r1, #10 <== NOT EXECUTED
20630: eb00d777 bl 56414 <__aeabi_idiv> <== NOT EXECUTED
20634: e3a0100a mov r1, #10 <== NOT EXECUTED
20638: e1a05000 mov r5, r0 <== NOT EXECUTED
2063c: e1a00004 mov r0, r4 <== NOT EXECUTED
20640: eb00d7f6 bl 56620 <__modsi3> <== NOT EXECUTED
20644: e1a02005 mov r2, r5 <== NOT EXECUTED
20648: e1a03000 mov r3, r0 <== NOT EXECUTED
2064c: e59d1000 ldr r1, [sp] <== NOT EXECUTED
20650: e59f0054 ldr r0, [pc, #84] ; 206ac <rtems_rfs_shell_data+0x204><== NOT EXECUTED
20654: eb0088b9 bl 42940 <printf> <== NOT EXECUTED
inodes, ipcent / 10, ipcent % 10);
return 0;
}
20658: e3a00000 mov r0, #0 <== NOT EXECUTED
2065c: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
00020034 <rtems_rfs_shell_dir>:
return 0;
}
static int
rtems_rfs_shell_dir (rtems_rfs_file_system* fs, int argc, char *argv[])
{
20034: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
bool state;
int entry;
int b;
int rc;
if (argc <= 1)
20038: e3510001 cmp r1, #1 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_dir (rtems_rfs_file_system* fs, int argc, char *argv[])
{
2003c: e24dd020 sub sp, sp, #32 <== NOT EXECUTED
20040: e1a05000 mov r5, r0 <== NOT EXECUTED
bool state;
int entry;
int b;
int rc;
if (argc <= 1)
20044: ca000002 bgt 20054 <rtems_rfs_shell_dir+0x20> <== NOT EXECUTED
{
printf ("error: no block number provided\n");
20048: e59f0268 ldr r0, [pc, #616] ; 202b8 <rtems_rfs_shell_dir+0x284><== NOT EXECUTED
2004c: eb008ae0 bl 42bd4 <puts> <== NOT EXECUTED
20050: ea00003c b 20148 <rtems_rfs_shell_dir+0x114> <== NOT EXECUTED
return 1;
}
block = strtoul (argv[1], 0, 0);
20054: e3a01000 mov r1, #0 <== NOT EXECUTED
20058: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
2005c: e1a02001 mov r2, r1 <== NOT EXECUTED
20060: eb009902 bl 46470 <strtoul> <== NOT EXECUTED
20064: e595307c ldr r3, [r5, #124] ; 0x7c <== NOT EXECUTED
20068: e3a01000 mov r1, #0 <== NOT EXECUTED
2006c: e1a02001 mov r2, r1 <== NOT EXECUTED
20070: e1a04000 mov r4, r0 <== NOT EXECUTED
20074: e5930000 ldr r0, [r3] <== NOT EXECUTED
20078: ebffae10 bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
rtems_rfs_shell_lock_rfs (fs);
rc = rtems_rfs_group_bitmap_test (fs, false, block, &state);
2007c: e1a00005 mov r0, r5 <== NOT EXECUTED
20080: e3a01000 mov r1, #0 <== NOT EXECUTED
20084: e1a02004 mov r2, r4 <== NOT EXECUTED
20088: e28d301f add r3, sp, #31 <== NOT EXECUTED
2008c: eb005edb bl 37c00 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
if (rc > 0)
20090: e2506000 subs r6, r0, #0 <== NOT EXECUTED
20094: da000008 ble 200bc <rtems_rfs_shell_dir+0x88> <== NOT EXECUTED
{
rtems_rfs_shell_unlock_rfs (fs);
20098: e1a00005 mov r0, r5 <== NOT EXECUTED
2009c: ebfffe76 bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: testing block state: block=%" PRIu32 ": (%d) %s\n",
200a0: e1a00006 mov r0, r6 <== NOT EXECUTED
200a4: eb009249 bl 449d0 <strerror> <== NOT EXECUTED
200a8: e1a01004 mov r1, r4 <== NOT EXECUTED
200ac: e1a03000 mov r3, r0 <== NOT EXECUTED
200b0: e1a02006 mov r2, r6 <== NOT EXECUTED
200b4: e59f0200 ldr r0, [pc, #512] ; 202bc <rtems_rfs_shell_dir+0x288><== NOT EXECUTED
200b8: ea000021 b 20144 <rtems_rfs_shell_dir+0x110> <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
}
printf (" %5" PRIu32 ": block %s\n", block, state ? "allocated" : "free");
200bc: e5dd101f ldrb r1, [sp, #31] <== NOT EXECUTED
200c0: e59f31f8 ldr r3, [pc, #504] ; 202c0 <rtems_rfs_shell_dir+0x28c><== NOT EXECUTED
200c4: e3510000 cmp r1, #0 <== NOT EXECUTED
200c8: e59f21f4 ldr r2, [pc, #500] ; 202c4 <rtems_rfs_shell_dir+0x290><== NOT EXECUTED
200cc: e1a01004 mov r1, r4 <== NOT EXECUTED
200d0: 01a02003 moveq r2, r3 <== NOT EXECUTED
200d4: e59f01ec ldr r0, [pc, #492] ; 202c8 <rtems_rfs_shell_dir+0x294><== 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);
200d8: e28d6010 add r6, sp, #16 <== 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");
200dc: eb008a17 bl 42940 <printf> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
200e0: 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);
200e4: e1a00005 mov r0, r5 <== NOT EXECUTED
200e8: e1a01006 mov r1, r6 <== NOT EXECUTED
200ec: e1a02004 mov r2, r4 <== NOT EXECUTED
200f0: e3a03001 mov r3, #1 <== NOT EXECUTED
200f4: e5cd8010 strb r8, [sp, #16] <== NOT EXECUTED
handle->bnum = 0;
200f8: e58d8014 str r8, [sp, #20] <== NOT EXECUTED
handle->buffer = NULL;
200fc: e58d8018 str r8, [sp, #24] <== NOT EXECUTED
20100: eb005406 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
20104: e2507000 subs r7, r0, #0 <== NOT EXECUTED
20108: da000010 ble 20150 <rtems_rfs_shell_dir+0x11c> <== 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);
2010c: e1a01006 mov r1, r6 <== NOT EXECUTED
20110: e1a00005 mov r0, r5 <== NOT EXECUTED
20114: eb0053b8 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
{
rtems_rfs_buffer_handle_close (fs, &buffer);
rtems_rfs_shell_unlock_rfs (fs);
20118: e1a00005 mov r0, r5 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
2011c: 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;
20120: e5cd8010 strb r8, [sp, #16] <== NOT EXECUTED
handle->bnum = 0;
20124: e58d8014 str r8, [sp, #20] <== NOT EXECUTED
20128: ebfffe53 bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: requesting buffer handle: block=%" PRIu32 ": (%d) %s\n",
2012c: e1a00007 mov r0, r7 <== NOT EXECUTED
20130: eb009226 bl 449d0 <strerror> <== NOT EXECUTED
20134: e1a03000 mov r3, r0 <== NOT EXECUTED
20138: e59f018c ldr r0, [pc, #396] ; 202cc <rtems_rfs_shell_dir+0x298><== NOT EXECUTED
2013c: e1a01004 mov r1, r4 <== NOT EXECUTED
20140: e1a02007 mov r2, r7 <== NOT EXECUTED
20144: eb0089fd bl 42940 <printf> <== NOT EXECUTED
20148: e3a00001 mov r0, #1 <== NOT EXECUTED
block, rc, strerror (rc));
return 1;
2014c: ea000057 b 202b0 <rtems_rfs_shell_dir+0x27c> <== NOT EXECUTED
}
b = 0;
entry = 1;
data = rtems_rfs_buffer_data (&buffer);
20150: e59d3018 ldr r3, [sp, #24] <== NOT EXECUTED
20154: e3a07001 mov r7, #1 <== NOT EXECUTED
20158: e5934020 ldr r4, [r3, #32] <== NOT EXECUTED
int c;
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
2015c: e59f916c ldr r9, [pc, #364] ; 202d0 <rtems_rfs_shell_dir+0x29c><== 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))
20160: ea000044 b 20278 <rtems_rfs_shell_dir+0x244> <== NOT EXECUTED
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
elength = rtems_rfs_dir_entry_length (data);
20164: e5d43009 ldrb r3, [r4, #9] <== NOT EXECUTED
20168: e5d46008 ldrb r6, [r4, #8] <== NOT EXECUTED
2016c: e1836406 orr r6, r3, r6, lsl #8 <== NOT EXECUTED
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20170: e1560009 cmp r6, r9 <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
20174: e5d40000 ldrb r0, [r4] <== NOT EXECUTED
20178: e5d41001 ldrb r1, [r4, #1] <== NOT EXECUTED
2017c: e5d42002 ldrb r2, [r4, #2] <== NOT EXECUTED
20180: e5d43003 ldrb r3, [r4, #3] <== NOT EXECUTED
elength = rtems_rfs_dir_entry_length (data);
if (elength == RTEMS_RFS_DIR_ENTRY_EMPTY)
20184: 0a00003f beq 20288 <rtems_rfs_shell_dir+0x254> <== NOT EXECUTED
break;
if ((elength < RTEMS_RFS_DIR_ENTRY_SIZE) ||
20188: e3560009 cmp r6, #9 <== NOT EXECUTED
2018c: da000002 ble 2019c <rtems_rfs_shell_dir+0x168> <== NOT EXECUTED
(elength >= rtems_rfs_fs_max_name (fs)))
20190: e595c018 ldr ip, [r5, #24] <== NOT EXECUTED
20194: e156000c cmp r6, ip <== NOT EXECUTED
20198: 3a000003 bcc 201ac <rtems_rfs_shell_dir+0x178> <== NOT EXECUTED
{
printf (" %5d: entry length appears corrupt: %d\n", entry, elength);
2019c: e1a01007 mov r1, r7 <== NOT EXECUTED
201a0: e1a02006 mov r2, r6 <== NOT EXECUTED
201a4: e59f0128 ldr r0, [pc, #296] ; 202d4 <rtems_rfs_shell_dir+0x2a0><== NOT EXECUTED
201a8: ea000009 b 201d4 <rtems_rfs_shell_dir+0x1a0> <== NOT EXECUTED
rtems_rfs_ino eino;
int elength;
int length;
int c;
eino = rtems_rfs_dir_entry_ino (data);
201ac: e1833c00 orr r3, r3, r0, lsl #24 <== NOT EXECUTED
201b0: e1833801 orr r3, r3, r1, lsl #16 <== 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)))
201b4: e1933402 orrs r3, r3, r2, lsl #8 <== NOT EXECUTED
201b8: 0a000002 beq 201c8 <rtems_rfs_shell_dir+0x194> <== NOT EXECUTED
201bc: e5952010 ldr r2, [r5, #16] <== NOT EXECUTED
201c0: e1530002 cmp r3, r2 <== NOT EXECUTED
201c4: 3a000004 bcc 201dc <rtems_rfs_shell_dir+0x1a8> <== NOT EXECUTED
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
201c8: e59f0108 ldr r0, [pc, #264] ; 202d8 <rtems_rfs_shell_dir+0x2a4><== NOT EXECUTED
201cc: e1a01007 mov r1, r7 <== NOT EXECUTED
201d0: e1a02003 mov r2, r3 <== NOT EXECUTED
201d4: eb0089d9 bl 42940 <printf> <== NOT EXECUTED
break;
201d8: ea00002a b 20288 <rtems_rfs_shell_dir+0x254> <== NOT EXECUTED
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
201dc: e5d4c005 ldrb ip, [r4, #5] <== NOT EXECUTED
201e0: e5d42004 ldrb r2, [r4, #4] <== NOT EXECUTED
201e4: e5d41007 ldrb r1, [r4, #7] <== NOT EXECUTED
201e8: e1a0c80c lsl ip, ip, #16 <== NOT EXECUTED
201ec: e18ccc02 orr ip, ip, r2, lsl #24 <== NOT EXECUTED
201f0: e5d42006 ldrb r2, [r4, #6] <== NOT EXECUTED
201f4: e18cc001 orr ip, ip, r1 <== NOT EXECUTED
201f8: e18cc402 orr ip, ip, r2, lsl #8 <== NOT EXECUTED
{
printf (" %5d: entry ino appears corrupt: ino=%" PRId32 "\n", entry, eino);
break;
}
length = elength - RTEMS_RFS_DIR_ENTRY_SIZE;
201fc: e246a00a sub sl, r6, #10 <== NOT EXECUTED
printf (" %5d: %04x inode=%-6" PRIu32 " hash=%08" PRIx32 " name[%03u]=",
20200: e1a02008 mov r2, r8 <== NOT EXECUTED
20204: e59f00d0 ldr r0, [pc, #208] ; 202dc <rtems_rfs_shell_dir+0x2a8><== NOT EXECUTED
20208: e1a01007 mov r1, r7 <== NOT EXECUTED
2020c: e58dc000 str ip, [sp] <== NOT EXECUTED
20210: e58da004 str sl, [sp, #4] <== NOT EXECUTED
20214: e3a0b000 mov fp, #0 <== NOT EXECUTED
20218: eb0089c8 bl 42940 <printf> <== NOT EXECUTED
2021c: e35a0032 cmp sl, #50 ; 0x32 <== NOT EXECUTED
20220: b1a0200a movlt r2, sl <== NOT EXECUTED
20224: a3a02032 movge r2, #50 ; 0x32 <== NOT EXECUTED
20228: e1a03004 mov r3, r4 <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
2022c: ea000006 b 2024c <rtems_rfs_shell_dir+0x218> <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
20230: e5d30009 ldrb r0, [r3, #9] <== NOT EXECUTED
20234: e58d200c str r2, [sp, #12] <== NOT EXECUTED
20238: e58d3008 str r3, [sp, #8] <== NOT EXECUTED
2023c: eb008a34 bl 42b14 <putchar> <== NOT EXECUTED
length);
if (length > 50)
length = 50;
for (c = 0; c < length; c++)
20240: e59d3008 ldr r3, [sp, #8] <== NOT EXECUTED
20244: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
20248: e28bb001 add fp, fp, #1 <== NOT EXECUTED
2024c: e15b0002 cmp fp, r2 <== NOT EXECUTED
20250: e2833001 add r3, r3, #1 <== NOT EXECUTED
20254: bafffff5 blt 20230 <rtems_rfs_shell_dir+0x1fc> <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
20258: e152000a cmp r2, sl <== NOT EXECUTED
printf ("...");
2025c: b59f007c ldrlt r0, [pc, #124] ; 202e0 <rtems_rfs_shell_dir+0x2ac><== NOT EXECUTED
20260: bb0089b6 bllt 42940 <printf> <== NOT EXECUTED
printf ("\n");
20264: e3a0000a mov r0, #10 <== NOT EXECUTED
20268: eb008a29 bl 42b14 <putchar> <== NOT EXECUTED
b += elength;
data += elength;
2026c: e0844006 add r4, r4, r6 <== NOT EXECUTED
printf ("%c", data[RTEMS_RFS_DIR_ENTRY_SIZE + c]);
if (length < elength - RTEMS_RFS_DIR_ENTRY_SIZE)
printf ("...");
printf ("\n");
b += elength;
20270: e0888006 add r8, r8, r6 <== NOT EXECUTED
data += elength;
entry++;
20274: e2877001 add r7, r7, #1 <== 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))
20278: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
2027c: e243300b sub r3, r3, #11 <== NOT EXECUTED
20280: e1580003 cmp r8, r3 <== NOT EXECUTED
20284: 3affffb6 bcc 20164 <rtems_rfs_shell_dir+0x130> <== 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);
20288: e28d1010 add r1, sp, #16 <== NOT EXECUTED
2028c: e1a00005 mov r0, r5 <== NOT EXECUTED
20290: eb005359 bl 34ffc <rtems_rfs_buffer_handle_release> <== NOT EXECUTED
handle->dirty = false;
20294: 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);
20298: e1a00005 mov r0, r5 <== NOT EXECUTED
2029c: e5cd4010 strb r4, [sp, #16] <== NOT EXECUTED
handle->bnum = 0;
202a0: e58d4014 str r4, [sp, #20] <== NOT EXECUTED
handle->buffer = NULL;
202a4: e58d4018 str r4, [sp, #24] <== NOT EXECUTED
202a8: ebfffdf3 bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
202ac: e1a00004 mov r0, r4 <== NOT EXECUTED
return 0;
}
202b0: e28dd020 add sp, sp, #32 <== NOT EXECUTED
202b4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001fec8 <rtems_rfs_shell_group>:
int g;
start = 0;
end = fs->group_count - 1;
switch (argc)
1fec8: e3510002 cmp r1, #2 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_group (rtems_rfs_file_system* fs, int argc, char *argv[])
{
1fecc: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED
1fed0: e1a04000 mov r4, r0 <== NOT EXECUTED
1fed4: e1a07002 mov r7, r2 <== NOT EXECUTED
int start;
int end;
int g;
start = 0;
end = fs->group_count - 1;
1fed8: e5905020 ldr r5, [r0, #32] <== NOT EXECUTED
switch (argc)
1fedc: 0a000004 beq 1fef4 <rtems_rfs_shell_group+0x2c> <== NOT EXECUTED
1fee0: e3510003 cmp r1, #3 <== NOT EXECUTED
1fee4: 0a000009 beq 1ff10 <rtems_rfs_shell_group+0x48> <== NOT EXECUTED
1fee8: e3510001 cmp r1, #1 <== NOT EXECUTED
1feec: 1a000012 bne 1ff3c <rtems_rfs_shell_group+0x74> <== NOT EXECUTED
1fef0: ea000014 b 1ff48 <rtems_rfs_shell_group+0x80> <== NOT EXECUTED
{
case 1:
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
1fef4: e3a01000 mov r1, #0 <== NOT EXECUTED
1fef8: e5920004 ldr r0, [r2, #4] <== NOT EXECUTED
1fefc: e1a02001 mov r2, r1 <== NOT EXECUTED
1ff00: eb00995a bl 46470 <strtoul> <== NOT EXECUTED
1ff04: e1a05000 mov r5, r0 <== NOT EXECUTED
1ff08: e1a06000 mov r6, r0 <== NOT EXECUTED
break;
1ff0c: ea00000f b 1ff50 <rtems_rfs_shell_group+0x88> <== NOT EXECUTED
case 3:
start = strtoul (argv[1], 0, 0);
1ff10: e3a01000 mov r1, #0 <== NOT EXECUTED
1ff14: e1a02001 mov r2, r1 <== NOT EXECUTED
1ff18: e5970004 ldr r0, [r7, #4] <== NOT EXECUTED
1ff1c: eb009953 bl 46470 <strtoul> <== NOT EXECUTED
end = strtoul (argv[2], 0, 0);
1ff20: e3a01000 mov r1, #0 <== NOT EXECUTED
break;
case 2:
start = end = strtoul (argv[1], 0, 0);
break;
case 3:
start = strtoul (argv[1], 0, 0);
1ff24: e1a06000 mov r6, r0 <== NOT EXECUTED
end = strtoul (argv[2], 0, 0);
1ff28: e1a02001 mov r2, r1 <== NOT EXECUTED
1ff2c: e5970008 ldr r0, [r7, #8] <== NOT EXECUTED
1ff30: eb00994e bl 46470 <strtoul> <== NOT EXECUTED
1ff34: e1a05000 mov r5, r0 <== NOT EXECUTED
break;
1ff38: ea000004 b 1ff50 <rtems_rfs_shell_group+0x88> <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
1ff3c: e59f00e4 ldr r0, [pc, #228] ; 20028 <rtems_rfs_shell_group+0x160><== NOT EXECUTED
1ff40: eb008b23 bl 42bd4 <puts> <== NOT EXECUTED
1ff44: ea00000c b 1ff7c <rtems_rfs_shell_group+0xb4> <== NOT EXECUTED
int start;
int end;
int g;
start = 0;
end = fs->group_count - 1;
1ff48: e2455001 sub r5, r5, #1 <== NOT EXECUTED
1ff4c: e3a06000 mov r6, #0 <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
return 1;
}
if ((start < 0) || (end < 0) ||
1ff50: e1a01fa6 lsr r1, r6, #31 <== NOT EXECUTED
1ff54: e1911fa5 orrs r1, r1, r5, lsr #31 <== NOT EXECUTED
1ff58: 1a000004 bne 1ff70 <rtems_rfs_shell_group+0xa8> <== NOT EXECUTED
(start >= fs->group_count) || (end >= fs->group_count))
1ff5c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
default:
printf ("error: too many arguments.\n");
return 1;
}
if ((start < 0) || (end < 0) ||
1ff60: e1560003 cmp r6, r3 <== NOT EXECUTED
1ff64: aa000001 bge 1ff70 <rtems_rfs_shell_group+0xa8> <== NOT EXECUTED
1ff68: e1550003 cmp r5, r3 <== NOT EXECUTED
1ff6c: ba000004 blt 1ff84 <rtems_rfs_shell_group+0xbc> <== NOT EXECUTED
(start >= fs->group_count) || (end >= fs->group_count))
{
printf ("error: group out of range (0->%d).\n", fs->group_count);
1ff70: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED
1ff74: e59f00b0 ldr r0, [pc, #176] ; 2002c <rtems_rfs_shell_group+0x164><== NOT EXECUTED
1ff78: eb008a70 bl 42940 <printf> <== NOT EXECUTED
1ff7c: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
1ff80: ea000026 b 20020 <rtems_rfs_shell_group+0x158> <== NOT EXECUTED
1ff84: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
1ff88: e1a02001 mov r2, r1 <== NOT EXECUTED
1ff8c: e5930000 ldr r0, [r3] <== NOT EXECUTED
1ff90: ebffae4a bl b8c0 <rtems_semaphore_obtain> <== NOT EXECUTED
1ff94: e3a03050 mov r3, #80 ; 0x50 <== NOT EXECUTED
1ff98: e0070693 mul r7, r3, r6 <== NOT EXECUTED
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
1ff9c: ea00001a b 2000c <rtems_rfs_shell_group+0x144> <== NOT EXECUTED
{
rtems_rfs_group* group = &fs->groups[g];
1ffa0: e594801c ldr r8, [r4, #28] <== NOT EXECUTED
1ffa4: e0882007 add r2, r8, r7 <== NOT EXECUTED
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
1ffa8: e592a004 ldr sl, [r2, #4] <== NOT EXECUTED
1ffac: e5923018 ldr r3, [r2, #24] <== 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",
1ffb0: e3a00064 mov r0, #100 ; 0x64 <== NOT EXECUTED
for (g = start; g <= end; g++)
{
rtems_rfs_group* group = &fs->groups[g];
size_t blocks;
size_t inodes;
blocks = group->size - rtems_rfs_bitmap_map_free (&group->block_bitmap);
1ffb4: e063300a rsb r3, r3, sl <== 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",
1ffb8: e0000093 mul r0, r3, r0 <== NOT EXECUTED
1ffbc: e1a0100a mov r1, sl <== 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);
1ffc0: e592903c ldr r9, [r2, #60] ; 0x3c <== NOT EXECUTED
1ffc4: e594b028 ldr fp, [r4, #40] ; 0x28 <== NOT EXECUTED
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
1ffc8: e58d3000 str r3, [sp] <== NOT EXECUTED
1ffcc: eb00d8cc bl 56304 <__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);
1ffd0: e069900b rsb r9, r9, fp <== NOT EXECUTED
printf (" %4d: base=%-7" PRIu32 " size=%-6zu blocks=%-5zu (%3zu%%) inode=%-5zu (%3zu%%)\n",
1ffd4: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
1ffd8: e3a00064 mov r0, #100 ; 0x64 <== NOT EXECUTED
1ffdc: e1a0100b mov r1, fp <== NOT EXECUTED
1ffe0: e0000099 mul r0, r9, r0 <== NOT EXECUTED
1ffe4: e58d9008 str r9, [sp, #8] <== NOT EXECUTED
1ffe8: eb00d8c5 bl 56304 <__aeabi_uidiv> <== NOT EXECUTED
1ffec: e58d000c str r0, [sp, #12] <== NOT EXECUTED
1fff0: e1a01006 mov r1, r6 <== NOT EXECUTED
1fff4: e7982007 ldr r2, [r8, r7] <== NOT EXECUTED
1fff8: e1a0300a mov r3, sl <== NOT EXECUTED
1fffc: e59f002c ldr r0, [pc, #44] ; 20030 <rtems_rfs_shell_group+0x168><== NOT EXECUTED
20000: eb008a4e bl 42940 <printf> <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (g = start; g <= end; g++)
20004: e2866001 add r6, r6, #1 <== NOT EXECUTED
20008: e2877050 add r7, r7, #80 ; 0x50 <== NOT EXECUTED
2000c: e1560005 cmp r6, r5 <== NOT EXECUTED
20010: daffffe2 ble 1ffa0 <rtems_rfs_shell_group+0xd8> <== NOT EXECUTED
g, group->base, group->size,
blocks, (blocks * 100) / group->size,
inodes, (inodes * 100) / fs->group_inodes);
}
rtems_rfs_shell_unlock_rfs (fs);
20014: e1a00004 mov r0, r4 <== NOT EXECUTED
20018: ebfffe97 bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
2001c: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
20020: e28dd010 add sp, sp, #16 <== NOT EXECUTED
20024: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001fa94 <rtems_rfs_shell_inode>:
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
1fa94: 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;
1fa98: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
1fa9c: e1a04000 mov r4, r0 <== NOT EXECUTED
bool have_end;
int arg;
int b;
int rc;
total = fs->group_inodes * fs->group_count;
1faa0: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED
1faa4: e0070390 mul r7, r0, r3 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
1faa8: 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;
1faac: e3a06000 mov r6, #0 <== NOT EXECUTED
1fab0: e247b001 sub fp, r7, #1 <== NOT EXECUTED
1fab4: e3a08001 mov r8, #1 <== NOT EXECUTED
return 0;
}
static int
rtems_rfs_shell_inode (rtems_rfs_file_system* fs, int argc, char *argv[])
{
1fab8: e58d1018 str r1, [sp, #24] <== NOT EXECUTED
1fabc: e58d201c str r2, [sp, #28] <== NOT EXECUTED
int b;
int rc;
total = fs->group_inodes * fs->group_count;
start = RTEMS_RFS_ROOT_INO;
end = total - 1;
1fac0: e1a0500b mov r5, fp <== NOT EXECUTED
1fac4: e1a0a006 mov sl, r6 <== NOT EXECUTED
1fac8: e58d600c str r6, [sp, #12] <== NOT EXECUTED
1facc: e58d6010 str r6, [sp, #16] <== NOT EXECUTED
1fad0: e58d6014 str r6, [sp, #20] <== NOT EXECUTED
1fad4: e1a09008 mov r9, r8 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
1fad8: ea000029 b 1fb84 <rtems_rfs_shell_inode+0xf0> <== NOT EXECUTED
{
if (argv[arg][0] == '-')
1fadc: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
1fae0: e7910108 ldr r0, [r1, r8, lsl #2] <== NOT EXECUTED
1fae4: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
1fae8: e353002d cmp r3, #45 ; 0x2d <== NOT EXECUTED
1faec: 1a00000d bne 1fb28 <rtems_rfs_shell_inode+0x94> <== NOT EXECUTED
{
switch (argv[arg][1])
1faf0: e5d03001 ldrb r3, [r0, #1] <== NOT EXECUTED
1faf4: e3530065 cmp r3, #101 ; 0x65 <== NOT EXECUTED
1faf8: 03a02001 moveq r2, #1 <== NOT EXECUTED
1fafc: 058d2010 streq r2, [sp, #16] <== NOT EXECUTED
1fb00: 0a00001e beq 1fb80 <rtems_rfs_shell_inode+0xec> <== NOT EXECUTED
1fb04: e3530066 cmp r3, #102 ; 0x66 <== NOT EXECUTED
1fb08: 03a01001 moveq r1, #1 <== NOT EXECUTED
1fb0c: 058d100c streq r1, [sp, #12] <== NOT EXECUTED
1fb10: 0a00001a beq 1fb80 <rtems_rfs_shell_inode+0xec> <== NOT EXECUTED
1fb14: e3530061 cmp r3, #97 ; 0x61 <== NOT EXECUTED
1fb18: 1a000006 bne 1fb38 <rtems_rfs_shell_inode+0xa4> <== NOT EXECUTED
1fb1c: e3a03001 mov r3, #1 <== NOT EXECUTED
1fb20: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
1fb24: ea000015 b 1fb80 <rtems_rfs_shell_inode+0xec> <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
1fb28: e3560000 cmp r6, #0 <== NOT EXECUTED
1fb2c: 0a000005 beq 1fb48 <rtems_rfs_shell_inode+0xb4> <== NOT EXECUTED
1fb30: e35a0000 cmp sl, #0 <== NOT EXECUTED
1fb34: 0a000005 beq 1fb50 <rtems_rfs_shell_inode+0xbc> <== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
1fb38: e1a01000 mov r1, r0 <== NOT EXECUTED
1fb3c: e59f0340 ldr r0, [pc, #832] ; 1fe84 <rtems_rfs_shell_inode+0x3f0><== NOT EXECUTED
1fb40: eb008b7e bl 42940 <printf> <== NOT EXECUTED
break;
}
}
else
{
if (have_end && have_start)
1fb44: ea00000d b 1fb80 <rtems_rfs_shell_inode+0xec> <== NOT EXECUTED
printf ("warning: option ignored: %s\n", argv[arg]);
else if (!have_start)
1fb48: e35a0000 cmp sl, #0 <== NOT EXECUTED
1fb4c: 1a000006 bne 1fb6c <rtems_rfs_shell_inode+0xd8> <== NOT EXECUTED
{
start = end = strtoul (argv[arg], 0, 0);
1fb50: e3a01000 mov r1, #0 <== NOT EXECUTED
1fb54: e1a02001 mov r2, r1 <== NOT EXECUTED
1fb58: eb009a44 bl 46470 <strtoul> <== NOT EXECUTED
1fb5c: e3a0a001 mov sl, #1 <== NOT EXECUTED
1fb60: e1a05000 mov r5, r0 <== NOT EXECUTED
1fb64: e1a09000 mov r9, r0 <== NOT EXECUTED
1fb68: ea000004 b 1fb80 <rtems_rfs_shell_inode+0xec> <== NOT EXECUTED
have_start = true;
}
else
{
end = strtoul (argv[arg], 0, 0);
1fb6c: e1a01006 mov r1, r6 <== NOT EXECUTED
1fb70: e1a02006 mov r2, r6 <== NOT EXECUTED
1fb74: eb009a3d bl 46470 <strtoul> <== NOT EXECUTED
1fb78: e3a06001 mov r6, #1 <== NOT EXECUTED
1fb7c: e1a05000 mov r5, r0 <== NOT EXECUTED
show_all = false;
error_check_only = false;
forced = false;
have_start = have_end = false;
for (arg = 1; arg < argc; arg++)
1fb80: e2888001 add r8, r8, #1 <== NOT EXECUTED
1fb84: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
1fb88: e1580002 cmp r8, r2 <== NOT EXECUTED
1fb8c: baffffd2 blt 1fadc <rtems_rfs_shell_inode+0x48> <== NOT EXECUTED
have_end = true;
}
}
}
if ((start >= total) || (end >= total))
1fb90: e1590007 cmp r9, r7 <== NOT EXECUTED
1fb94: 31550007 cmpcc r5, r7 <== NOT EXECUTED
1fb98: 33a01000 movcc r1, #0 <== NOT EXECUTED
1fb9c: 23a01001 movcs r1, #1 <== NOT EXECUTED
1fba0: 3a000003 bcc 1fbb4 <rtems_rfs_shell_inode+0x120> <== NOT EXECUTED
{
printf ("error: inode out of range (0->%" PRId32 ").\n", total - 1);
1fba4: e1a0100b mov r1, fp <== NOT EXECUTED
1fba8: e59f02d8 ldr r0, [pc, #728] ; 1fe88 <rtems_rfs_shell_inode+0x3f4><== NOT EXECUTED
1fbac: eb008b63 bl 42940 <printf> <== NOT EXECUTED
1fbb0: ea000018 b 1fc18 <rtems_rfs_shell_inode+0x184> <== 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);
1fbb4: e594307c ldr r3, [r4, #124] ; 0x7c <== NOT EXECUTED
1fbb8: e1a02001 mov r2, r1 <== NOT EXECUTED
1fbbc: e5930000 ldr r0, [r3] <== NOT EXECUTED
1fbc0: ebffaf3e bl b8c0 <rtems_semaphore_obtain> <== 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);
1fbc4: 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);
1fbc8: e28d7020 add r7, sp, #32 <== 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)
1fbcc: e59fb2b8 ldr fp, [pc, #696] ; 1fe8c <rtems_rfs_shell_inode+0x3f8><== NOT EXECUTED
1fbd0: e1a08005 mov r8, r5 <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (ino = start; ino <= end; ino++)
1fbd4: ea0000a3 b 1fe68 <rtems_rfs_shell_inode+0x3d4> <== NOT EXECUTED
{
rtems_rfs_inode_handle inode;
bool allocated;
rc = rtems_rfs_group_bitmap_test (fs, true, ino, &allocated);
1fbd8: e1a00004 mov r0, r4 <== NOT EXECUTED
1fbdc: e3a01001 mov r1, #1 <== NOT EXECUTED
1fbe0: e1a02009 mov r2, r9 <== NOT EXECUTED
1fbe4: e1a0300a mov r3, sl <== NOT EXECUTED
1fbe8: eb006004 bl 37c00 <rtems_rfs_group_bitmap_test> <== NOT EXECUTED
if (rc > 0)
1fbec: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1fbf0: da00000a ble 1fc20 <rtems_rfs_shell_inode+0x18c> <== NOT EXECUTED
{
rtems_rfs_shell_unlock_rfs (fs);
1fbf4: e1a00004 mov r0, r4 <== NOT EXECUTED
1fbf8: ebffff9f bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: testing inode state: ino=%" PRIu32 ": (%d) %s\n",
1fbfc: e1a00006 mov r0, r6 <== NOT EXECUTED
1fc00: eb009372 bl 449d0 <strerror> <== NOT EXECUTED
1fc04: e1a03000 mov r3, r0 <== NOT EXECUTED
1fc08: e59f0280 ldr r0, [pc, #640] ; 1fe90 <rtems_rfs_shell_inode+0x3fc><== NOT EXECUTED
1fc0c: e1a01009 mov r1, r9 <== NOT EXECUTED
1fc10: e1a02006 mov r2, r6 <== NOT EXECUTED
1fc14: eb008b49 bl 42940 <printf> <== NOT EXECUTED
1fc18: e3a00001 mov r0, #1 <== NOT EXECUTED
ino, rc, strerror (rc));
return 1;
1fc1c: ea000096 b 1fe7c <rtems_rfs_shell_inode+0x3e8> <== NOT EXECUTED
}
if (show_all || allocated)
1fc20: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED
1fc24: e3530000 cmp r3, #0 <== NOT EXECUTED
1fc28: 1a000002 bne 1fc38 <rtems_rfs_shell_inode+0x1a4> <== NOT EXECUTED
1fc2c: e5dd304b ldrb r3, [sp, #75] ; 0x4b <== NOT EXECUTED
1fc30: e3530000 cmp r3, #0 <== NOT EXECUTED
1fc34: 0a00008a beq 1fe64 <rtems_rfs_shell_inode+0x3d0> <== NOT EXECUTED
{
uint16_t mode;
bool error;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
1fc38: e1a00004 mov r0, r4 <== NOT EXECUTED
1fc3c: e1a01009 mov r1, r9 <== NOT EXECUTED
1fc40: e1a02007 mov r2, r7 <== NOT EXECUTED
1fc44: e3a03001 mov r3, #1 <== NOT EXECUTED
1fc48: eb0061dd bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
1fc4c: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1fc50: da000008 ble 1fc78 <rtems_rfs_shell_inode+0x1e4> <== NOT EXECUTED
{
rtems_rfs_shell_unlock_rfs (fs);
1fc54: e1a00004 mov r0, r4 <== NOT EXECUTED
1fc58: ebffff87 bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: opening inode handle: ino=%" PRIu32 ": (%d) %s\n",
1fc5c: e1a00006 mov r0, r6 <== NOT EXECUTED
1fc60: eb00935a bl 449d0 <strerror> <== NOT EXECUTED
1fc64: e1a01009 mov r1, r9 <== NOT EXECUTED
1fc68: e1a03000 mov r3, r0 <== NOT EXECUTED
1fc6c: e1a02006 mov r2, r6 <== NOT EXECUTED
1fc70: e59f021c ldr r0, [pc, #540] ; 1fe94 <rtems_rfs_shell_inode+0x400><== NOT EXECUTED
1fc74: eaffffe6 b 1fc14 <rtems_rfs_shell_inode+0x180> <== 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);
1fc78: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
error = false;
mode = rtems_rfs_inode_get_mode (&inode);
if (error_check_only)
1fc7c: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
1fc80: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
1fc84: e5d35002 ldrb r5, [r3, #2] <== NOT EXECUTED
1fc88: e3510000 cmp r1, #0 <== NOT EXECUTED
1fc8c: e1825405 orr r5, r2, r5, lsl #8 <== NOT EXECUTED
1fc90: 0a000009 beq 1fcbc <rtems_rfs_shell_inode+0x228> <== NOT EXECUTED
{
if (!RTEMS_RFS_S_ISDIR (mode) &&
1fc94: e2053a0f and r3, r5, #61440 ; 0xf000 <== NOT EXECUTED
1fc98: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
1fc9c: 13530901 cmpne r3, #16384 ; 0x4000 <== NOT EXECUTED
1fca0: 0a000061 beq 1fe2c <rtems_rfs_shell_inode+0x398> <== NOT EXECUTED
1fca4: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
1fca8: 0a00005f beq 1fe2c <rtems_rfs_shell_inode+0x398> <== NOT EXECUTED
1fcac: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
1fcb0: 0a00005d beq 1fe2c <rtems_rfs_shell_inode+0x398> <== NOT EXECUTED
}
#endif
}
}
if (!error_check_only || error)
1fcb4: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
1fcb8: 0a00005b beq 1fe2c <rtems_rfs_shell_inode+0x398> <== NOT EXECUTED
{
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
1fcbc: e5ddc04b ldrb ip, [sp, #75] ; 0x4b <== NOT EXECUTED
1fcc0: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED
1fcc4: e35c0000 cmp ip, #0 <== NOT EXECUTED
1fcc8: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
1fccc: 13a0c041 movne ip, #65 ; 0x41 <== NOT EXECUTED
1fcd0: 03a0c046 moveq ip, #70 ; 0x46 <== NOT EXECUTED
1fcd4: e0030392 mul r3, r2, r3 <== NOT EXECUTED
1fcd8: e59f01b8 ldr r0, [pc, #440] ; 1fe98 <rtems_rfs_shell_inode+0x404><== NOT EXECUTED
1fcdc: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
1fce0: e1a01009 mov r1, r9 <== NOT EXECUTED
1fce4: e58dc000 str ip, [sp] <== NOT EXECUTED
1fce8: eb008b14 bl 42940 <printf> <== NOT EXECUTED
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
1fcec: e5dd304b ldrb r3, [sp, #75] ; 0x4b <== NOT EXECUTED
1fcf0: e3530000 cmp r3, #0 <== NOT EXECUTED
1fcf4: 1a000005 bne 1fd10 <rtems_rfs_shell_inode+0x27c> <== NOT EXECUTED
1fcf8: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
1fcfc: e3520000 cmp r2, #0 <== NOT EXECUTED
1fd00: 1a000002 bne 1fd10 <rtems_rfs_shell_inode+0x27c> <== NOT EXECUTED
printf (" --\n");
1fd04: e59f0190 ldr r0, [pc, #400] ; 1fe9c <rtems_rfs_shell_inode+0x408><== NOT EXECUTED
1fd08: eb008bb1 bl 42bd4 <puts> <== NOT EXECUTED
printf (" %5" PRIu32 ": pos=%06" PRIu32 ":%04zx %c ",
ino, rtems_rfs_buffer_bnum (&inode.buffer),
inode.offset * RTEMS_RFS_INODE_SIZE,
allocated ? 'A' : 'F');
if (!allocated && !forced)
1fd0c: ea000046 b 1fe2c <rtems_rfs_shell_inode+0x398> <== NOT EXECUTED
printf (" --\n");
else
{
const char* type;
type = "UKN";
if (RTEMS_RFS_S_ISDIR (mode))
1fd10: e2053a0f and r3, r5, #61440 ; 0xf000 <== NOT EXECUTED
1fd14: e3530901 cmp r3, #16384 ; 0x4000 <== NOT EXECUTED
1fd18: 059f3180 ldreq r3, [pc, #384] ; 1fea0 <rtems_rfs_shell_inode+0x40c><== NOT EXECUTED
1fd1c: 0a00000d beq 1fd58 <rtems_rfs_shell_inode+0x2c4> <== NOT EXECUTED
type = "DIR";
else if (RTEMS_RFS_S_ISCHR (mode))
1fd20: e3530a02 cmp r3, #8192 ; 0x2000 <== NOT EXECUTED
1fd24: 059f3178 ldreq r3, [pc, #376] ; 1fea4 <rtems_rfs_shell_inode+0x410><== NOT EXECUTED
1fd28: 0a00000a beq 1fd58 <rtems_rfs_shell_inode+0x2c4> <== NOT EXECUTED
type = "CHR";
else if (RTEMS_RFS_S_ISBLK (mode))
1fd2c: e3530a06 cmp r3, #24576 ; 0x6000 <== NOT EXECUTED
1fd30: 059f3170 ldreq r3, [pc, #368] ; 1fea8 <rtems_rfs_shell_inode+0x414><== NOT EXECUTED
1fd34: 0a000007 beq 1fd58 <rtems_rfs_shell_inode+0x2c4> <== NOT EXECUTED
type = "BLK";
else if (RTEMS_RFS_S_ISREG (mode))
1fd38: e3530902 cmp r3, #32768 ; 0x8000 <== NOT EXECUTED
1fd3c: 059f3168 ldreq r3, [pc, #360] ; 1feac <rtems_rfs_shell_inode+0x418><== NOT EXECUTED
1fd40: 0a000004 beq 1fd58 <rtems_rfs_shell_inode+0x2c4> <== NOT EXECUTED
type = "REG";
else if (RTEMS_RFS_S_ISLNK (mode))
1fd44: e59f2164 ldr r2, [pc, #356] ; 1feb0 <rtems_rfs_shell_inode+0x41c><== NOT EXECUTED
1fd48: e59f1164 ldr r1, [pc, #356] ; 1feb4 <rtems_rfs_shell_inode+0x420><== NOT EXECUTED
1fd4c: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
1fd50: 01a01002 moveq r1, r2 <== NOT EXECUTED
1fd54: e1a03001 mov r3, r1 <== 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);
1fd58: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED
type = "LNK";
printf ("links=%03i mode=%04x (%s/%03o) bo=%04u bc=%04" PRIu32 " b=[",
1fd5c: e1a02b05 lsl r2, r5, #22 <== NOT EXECUTED
1fd60: e1a02b22 lsr r2, r2, #22 <== NOT EXECUTED
1fd64: e5d0e000 ldrb lr, [r0] <== NOT EXECUTED
1fd68: e5d01001 ldrb r1, [r0, #1] <== NOT EXECUTED
1fd6c: e58d2000 str r2, [sp] <== NOT EXECUTED
1fd70: e5d0c00a ldrb ip, [r0, #10] <== NOT EXECUTED
1fd74: e5d0200b ldrb r2, [r0, #11] <== NOT EXECUTED
1fd78: e182240c orr r2, r2, ip, lsl #8 <== NOT EXECUTED
1fd7c: 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);
1fd80: e280200c add r2, r0, #12 <== NOT EXECUTED
1fd84: e5d2c003 ldrb ip, [r2, #3] <== NOT EXECUTED
1fd88: e5d0600c ldrb r6, [r0, #12] <== NOT EXECUTED
1fd8c: e5d20001 ldrb r0, [r2, #1] <== 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);
1fd90: e181140e orr r1, r1, lr, lsl #8 <== NOT EXECUTED
1fd94: e5d22002 ldrb r2, [r2, #2] <== NOT EXECUTED
1fd98: e18c6c06 orr r6, ip, r6, lsl #24 <== NOT EXECUTED
1fd9c: e186c800 orr ip, r6, r0, lsl #16 <== NOT EXECUTED
1fda0: e151000b cmp r1, fp <== NOT EXECUTED
1fda4: e18cc402 orr ip, ip, r2, lsl #8 <== NOT EXECUTED
1fda8: 03a01000 moveq r1, #0 <== NOT EXECUTED
1fdac: e1a02005 mov r2, r5 <== NOT EXECUTED
1fdb0: e59f0100 ldr r0, [pc, #256] ; 1feb8 <rtems_rfs_shell_inode+0x424><== NOT EXECUTED
1fdb4: e58dc008 str ip, [sp, #8] <== NOT EXECUTED
1fdb8: eb008ae0 bl 42940 <printf> <== NOT EXECUTED
1fdbc: e3a05000 mov r5, #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]);
1fdc0: e59d202c ldr r2, [sp, #44] ; 0x2c <== NOT EXECUTED
1fdc4: 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));
1fdc8: e0823005 add r3, r2, r5 <== NOT EXECUTED
1fdcc: e7d21005 ldrb r1, [r2, r5] <== NOT EXECUTED
1fdd0: e5d32003 ldrb r2, [r3, #3] <== NOT EXECUTED
1fdd4: e5d30001 ldrb r0, [r3, #1] <== NOT EXECUTED
1fdd8: e1822c01 orr r2, r2, r1, lsl #24 <== NOT EXECUTED
1fddc: e5d31002 ldrb r1, [r3, #2] <== NOT EXECUTED
1fde0: e1823800 orr r3, r2, r0, lsl #16 <== NOT EXECUTED
1fde4: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED
1fde8: e2855004 add r5, r5, #4 <== NOT EXECUTED
1fdec: e59f00c8 ldr r0, [pc, #200] ; 1febc <rtems_rfs_shell_inode+0x428><== NOT EXECUTED
1fdf0: eb008ad2 bl 42940 <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++)
1fdf4: e3550010 cmp r5, #16 <== NOT EXECUTED
1fdf8: 1afffff0 bne 1fdc0 <rtems_rfs_shell_inode+0x32c> <== NOT EXECUTED
1fdfc: e59d302c ldr r3, [sp, #44] ; 0x2c <== NOT EXECUTED
1fe00: 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));
1fe04: e5d30011 ldrb r0, [r3, #17] <== NOT EXECUTED
1fe08: e5d31010 ldrb r1, [r3, #16] <== NOT EXECUTED
1fe0c: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
1fe10: e5d32013 ldrb r2, [r3, #19] <== NOT EXECUTED
1fe14: e1800c01 orr r0, r0, r1, lsl #24 <== NOT EXECUTED
1fe18: e5d31012 ldrb r1, [r3, #18] <== NOT EXECUTED
1fe1c: e1803002 orr r3, r0, r2 <== NOT EXECUTED
1fe20: e1831401 orr r1, r3, r1, lsl #8 <== NOT EXECUTED
1fe24: e59f0094 ldr r0, [pc, #148] ; 1fec0 <rtems_rfs_shell_inode+0x42c><== NOT EXECUTED
1fe28: eb008ac4 bl 42940 <printf> <== NOT EXECUTED
}
}
rc = rtems_rfs_inode_close (fs, &inode);
1fe2c: e1a00004 mov r0, r4 <== NOT EXECUTED
1fe30: e1a01007 mov r1, r7 <== NOT EXECUTED
1fe34: eb00613f bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
1fe38: e2506000 subs r6, r0, #0 <== NOT EXECUTED
1fe3c: da000008 ble 1fe64 <rtems_rfs_shell_inode+0x3d0> <== NOT EXECUTED
{
rtems_rfs_shell_unlock_rfs (fs);
1fe40: e1a00004 mov r0, r4 <== NOT EXECUTED
1fe44: ebffff0c bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
printf ("error: closing inode handle: ino=%" PRIu32 ": (%d) %s\n",
1fe48: e1a00006 mov r0, r6 <== NOT EXECUTED
1fe4c: eb0092df bl 449d0 <strerror> <== NOT EXECUTED
1fe50: e1a01009 mov r1, r9 <== NOT EXECUTED
1fe54: e1a03000 mov r3, r0 <== NOT EXECUTED
1fe58: e1a02006 mov r2, r6 <== NOT EXECUTED
1fe5c: e59f0060 ldr r0, [pc, #96] ; 1fec4 <rtems_rfs_shell_inode+0x430><== NOT EXECUTED
1fe60: eaffff6b b 1fc14 <rtems_rfs_shell_inode+0x180> <== NOT EXECUTED
return 1;
}
rtems_rfs_shell_lock_rfs (fs);
for (ino = start; ino <= end; ino++)
1fe64: e2899001 add r9, r9, #1 <== NOT EXECUTED
1fe68: e1590008 cmp r9, r8 <== NOT EXECUTED
1fe6c: 9affff59 bls 1fbd8 <rtems_rfs_shell_inode+0x144> <== NOT EXECUTED
return 1;
}
}
}
rtems_rfs_shell_unlock_rfs (fs);
1fe70: e1a00004 mov r0, r4 <== NOT EXECUTED
1fe74: ebffff00 bl 1fa7c <rtems_rfs_shell_unlock_rfs> <== NOT EXECUTED
1fe78: e3a00000 mov r0, #0 <== NOT EXECUTED
return 0;
}
1fe7c: e28dd04c add sp, sp, #76 ; 0x4c <== NOT EXECUTED
1fe80: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0001fa7c <rtems_rfs_shell_unlock_rfs>:
/**
* Unlock the file system.
*/
static void
rtems_rfs_shell_unlock_rfs (rtems_rfs_file_system* fs)
{
1fa7c: 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);
1fa80: e590407c ldr r4, [r0, #124] ; 0x7c <== NOT EXECUTED
rtems_rfs_buffers_release (fs);
1fa84: eb00550b bl 34eb8 <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);
1fa88: e5940000 ldr r0, [r4] <== NOT EXECUTED
#if __rtems__
rtems_rfs_rtems_unlock (fs);
#endif
}
1fa8c: e8bd4010 pop {r4, lr} <== NOT EXECUTED
1fa90: eaffafd0 b b9d8 <rtems_semaphore_release> <== NOT EXECUTED
0001f840 <rtems_rfs_shell_usage>:
}
void
rtems_rfs_shell_usage (const char* arg)
{
1f840: e92d4010 push {r4, lr} <== NOT EXECUTED
printf ("%s: RFS debugger\n", arg);
1f844: e1a01000 mov r1, r0 <== NOT EXECUTED
}
void
rtems_rfs_shell_usage (const char* arg)
{
1f848: e1a04000 mov r4, r0 <== NOT EXECUTED
printf ("%s: RFS debugger\n", arg);
1f84c: e59f0038 ldr r0, [pc, #56] ; 1f88c <rtems_rfs_shell_usage+0x4c><== NOT EXECUTED
1f850: eb008c3a bl 42940 <printf> <== NOT EXECUTED
printf (" %s [-hl] <path> <command>\n", arg);
1f854: e1a01004 mov r1, r4 <== NOT EXECUTED
1f858: e59f0030 ldr r0, [pc, #48] ; 1f890 <rtems_rfs_shell_usage+0x50><== NOT EXECUTED
1f85c: eb008c37 bl 42940 <printf> <== NOT EXECUTED
printf (" where:\n");
1f860: e59f002c ldr r0, [pc, #44] ; 1f894 <rtems_rfs_shell_usage+0x54><== NOT EXECUTED
1f864: eb008cda bl 42bd4 <puts> <== NOT EXECUTED
printf (" path: Path to the mounted RFS file system\n");
1f868: e59f0028 ldr r0, [pc, #40] ; 1f898 <rtems_rfs_shell_usage+0x58><== NOT EXECUTED
1f86c: eb008cd8 bl 42bd4 <puts> <== NOT EXECUTED
printf (" command: A debugger command. See -l for a list plus help.\n");
1f870: e59f0024 ldr r0, [pc, #36] ; 1f89c <rtems_rfs_shell_usage+0x5c><== NOT EXECUTED
1f874: eb008cd6 bl 42bd4 <puts> <== NOT EXECUTED
printf (" -h: This help\n");
1f878: e59f0020 ldr r0, [pc, #32] ; 1f8a0 <rtems_rfs_shell_usage+0x60><== NOT EXECUTED
1f87c: eb008cd4 bl 42bd4 <puts> <== NOT EXECUTED
printf (" -l: The debugger command list.\n");
1f880: e59f001c ldr r0, [pc, #28] ; 1f8a4 <rtems_rfs_shell_usage+0x64><== NOT EXECUTED
}
1f884: 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");
1f888: ea008cd1 b 42bd4 <puts> <== NOT EXECUTED
0003894c <rtems_rfs_symlink>:
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
3894c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
38950: e24dd0a0 sub sp, sp, #160 ; 0xa0 <== NOT EXECUTED
38954: e59d80c4 ldr r8, [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))
38958: e5902008 ldr r2, [r0, #8] <== NOT EXECUTED
3895c: e1580002 cmp r8, r2 <== NOT EXECUTED
const char* link,
int link_length,
uid_t uid,
gid_t gid,
rtems_rfs_ino parent)
{
38960: e1a04000 mov r4, r0 <== NOT EXECUTED
38964: e1a05001 mov r5, r1 <== NOT EXECUTED
38968: e1a0b003 mov fp, r3 <== NOT EXECUTED
3896c: e1dd6cb8 ldrh r6, [sp, #200] ; 0xc8 <== NOT EXECUTED
38970: e1dd7cbc ldrh r7, [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))
38974: 23a0a05b movcs sl, #91 ; 0x5b <== NOT EXECUTED
38978: 2a00006f bcs 38b3c <rtems_rfs_symlink+0x1f0> <== NOT EXECUTED
return ENAMETOOLONG;
rc = rtems_rfs_inode_create (fs, parent, name, strlen (name),
3897c: e1a00001 mov r0, r1 <== NOT EXECUTED
38980: eb00319e bl 45000 <strlen> <== NOT EXECUTED
38984: e59fc1bc ldr ip, [pc, #444] ; 38b48 <rtems_rfs_symlink+0x1fc><== NOT EXECUTED
38988: e1a03000 mov r3, r0 <== NOT EXECUTED
3898c: e1a02005 mov r2, r5 <== NOT EXECUTED
38990: e58dc000 str ip, [sp] <== NOT EXECUTED
38994: e59d10d0 ldr r1, [sp, #208] ; 0xd0 <== NOT EXECUTED
38998: e28dc09c add ip, sp, #156 ; 0x9c <== NOT EXECUTED
3899c: e3a05001 mov r5, #1 <== NOT EXECUTED
389a0: e1a00004 mov r0, r4 <== NOT EXECUTED
389a4: e98d10e0 stmib sp, {r5, r6, r7, ip} <== NOT EXECUTED
389a8: ebfffee7 bl 3854c <rtems_rfs_inode_create> <== NOT EXECUTED
RTEMS_RFS_S_SYMLINK,
1, uid, gid, &ino);
if (rc > 0)
389ac: e250a000 subs sl, r0, #0 <== NOT EXECUTED
389b0: ca000061 bgt 38b3c <rtems_rfs_symlink+0x1f0> <== NOT EXECUTED
return rc;
rc = rtems_rfs_inode_open (fs, ino, &inode, true);
389b4: e28d6064 add r6, sp, #100 ; 0x64 <== NOT EXECUTED
389b8: e1a00004 mov r0, r4 <== NOT EXECUTED
389bc: e59d109c ldr r1, [sp, #156] ; 0x9c <== NOT EXECUTED
389c0: e1a02006 mov r2, r6 <== NOT EXECUTED
389c4: e1a03005 mov r3, r5 <== NOT EXECUTED
389c8: ebfffe7d bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc > 0)
389cc: e250a000 subs sl, r0, #0 <== NOT EXECUTED
389d0: ca000059 bgt 38b3c <rtems_rfs_symlink+0x1f0> <== 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)
389d4: e3580013 cmp r8, #19 <== NOT EXECUTED
389d8: 8a000013 bhi 38a2c <rtems_rfs_symlink+0xe0> <== NOT EXECUTED
{
memset (inode.node->data.name, 0, RTEMS_RFS_INODE_DATA_NAME_SIZE);
389dc: e59d0070 ldr r0, [sp, #112] ; 0x70 <== NOT EXECUTED
389e0: e3a01000 mov r1, #0 <== NOT EXECUTED
389e4: e3a02014 mov r2, #20 <== NOT EXECUTED
389e8: e280001c add r0, r0, #28 <== NOT EXECUTED
389ec: eb0023ac bl 418a4 <memset> <== NOT EXECUTED
memcpy (inode.node->data.name, link, link_length);
389f0: e59d0070 ldr r0, [sp, #112] ; 0x70 <== NOT EXECUTED
389f4: e1a02008 mov r2, r8 <== NOT EXECUTED
389f8: e1a0100b mov r1, fp <== NOT EXECUTED
389fc: e280001c add r0, r0, #28 <== NOT EXECUTED
38a00: eb002320 bl 41688 <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);
38a04: e59d2070 ldr r2, [sp, #112] ; 0x70 <== NOT EXECUTED
38a08: e3a03000 mov r3, #0 <== NOT EXECUTED
38a0c: e5c2300c strb r3, [r2, #12] <== NOT EXECUTED
38a10: e59d2070 ldr r2, [sp, #112] ; 0x70 <== NOT EXECUTED
38a14: e5c2300d strb r3, [r2, #13] <== NOT EXECUTED
38a18: e59d2070 ldr r2, [sp, #112] ; 0x70 <== NOT EXECUTED
38a1c: e5c2300e strb r3, [r2, #14] <== NOT EXECUTED
38a20: e59d2070 ldr r2, [sp, #112] ; 0x70 <== NOT EXECUTED
38a24: e5c2300f strb r3, [r2, #15] <== NOT EXECUTED
38a28: ea000036 b 38b08 <rtems_rfs_symlink+0x1bc> <== 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);
38a2c: e28d7014 add r7, sp, #20 <== NOT EXECUTED
38a30: e1a00004 mov r0, r4 <== NOT EXECUTED
38a34: e1a01006 mov r1, r6 <== NOT EXECUTED
38a38: e1a02007 mov r2, r7 <== NOT EXECUTED
38a3c: ebfff0a7 bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
38a40: e250a000 subs sl, r0, #0 <== NOT EXECUTED
38a44: ca00002b bgt 38af8 <rtems_rfs_symlink+0x1ac> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_grow (fs, &map, 1, &block);
38a48: e1a02005 mov r2, r5 <== NOT EXECUTED
38a4c: e1a00004 mov r0, r4 <== NOT EXECUTED
38a50: e1a01007 mov r1, r7 <== NOT EXECUTED
38a54: e28d3098 add r3, sp, #152 ; 0x98 <== NOT EXECUTED
38a58: ebffef42 bl 34768 <rtems_rfs_block_map_grow> <== NOT EXECUTED
if (rc > 0)
38a5c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
38a60: ca00000b bgt 38a94 <rtems_rfs_symlink+0x148> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
38a64: e3a05000 mov r5, #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);
38a68: e28d908c add r9, sp, #140 ; 0x8c <== NOT EXECUTED
38a6c: e1a00004 mov r0, r4 <== NOT EXECUTED
38a70: e1a01009 mov r1, r9 <== NOT EXECUTED
38a74: e59d2098 ldr r2, [sp, #152] ; 0x98 <== NOT EXECUTED
38a78: e1a03005 mov r3, r5 <== NOT EXECUTED
38a7c: e5cd508c strb r5, [sp, #140] ; 0x8c <== NOT EXECUTED
handle->bnum = 0;
38a80: e58d5090 str r5, [sp, #144] ; 0x90 <== NOT EXECUTED
handle->buffer = NULL;
38a84: e58d5094 str r5, [sp, #148] ; 0x94 <== NOT EXECUTED
38a88: ebfff1a4 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
38a8c: e250a000 subs sl, r0, #0 <== NOT EXECUTED
38a90: da000003 ble 38aa4 <rtems_rfs_symlink+0x158> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
38a94: e1a01007 mov r1, r7 <== NOT EXECUTED
38a98: e1a00004 mov r0, r4 <== NOT EXECUTED
38a9c: ebfff01d bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
38aa0: ea000014 b 38af8 <rtems_rfs_symlink+0x1ac> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
38aa4: e59d3094 ldr r3, [sp, #148] ; 0x94 <== NOT EXECUTED
38aa8: e593a020 ldr sl, [r3, #32] <== NOT EXECUTED
memset (data, 0xff, rtems_rfs_fs_block_size (fs));
38aac: e3a010ff mov r1, #255 ; 0xff <== NOT EXECUTED
38ab0: e1a0000a mov r0, sl <== NOT EXECUTED
38ab4: e5942008 ldr r2, [r4, #8] <== NOT EXECUTED
38ab8: eb002379 bl 418a4 <memset> <== NOT EXECUTED
memcpy (data, link, link_length);
38abc: e1a02008 mov r2, r8 <== NOT EXECUTED
38ac0: e1a0000a mov r0, sl <== NOT EXECUTED
38ac4: e1a0100b mov r1, fp <== NOT EXECUTED
38ac8: eb0022ee bl 41688 <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);
38acc: e1a01009 mov r1, r9 <== NOT EXECUTED
38ad0: e1a00004 mov r0, r4 <== NOT EXECUTED
38ad4: ebfff148 bl 34ffc <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);
38ad8: e1a01007 mov r1, r7 <== NOT EXECUTED
38adc: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
38ae0: e58d5094 str r5, [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;
38ae4: e5cd508c strb r5, [sp, #140] ; 0x8c <== NOT EXECUTED
handle->bnum = 0;
38ae8: e58d5090 str r5, [sp, #144] ; 0x90 <== NOT EXECUTED
38aec: ebfff009 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
38af0: e250a000 subs sl, r0, #0 <== NOT EXECUTED
38af4: da000003 ble 38b08 <rtems_rfs_symlink+0x1bc> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
38af8: e1a00004 mov r0, r4 <== NOT EXECUTED
38afc: e1a01006 mov r1, r6 <== NOT EXECUTED
38b00: ebfffe0c bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
38b04: ea00000c b 38b3c <rtems_rfs_symlink+0x1f0> <== 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);
38b08: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
}
}
rtems_rfs_inode_set_block_offset (&inode, link_length);
38b0c: e1a08808 lsl r8, r8, #16 <== NOT EXECUTED
38b10: e1a02c28 lsr r2, r8, #24 <== NOT EXECUTED
38b14: e5c3200a strb r2, [r3, #10] <== NOT EXECUTED
38b18: e59d3070 ldr r3, [sp, #112] ; 0x70 <== NOT EXECUTED
38b1c: e1a08828 lsr r8, r8, #16 <== NOT EXECUTED
38b20: e5c3800b strb r8, [r3, #11] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
38b24: e1a00004 mov r0, r4 <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38b28: e3a03001 mov r3, #1 <== NOT EXECUTED
38b2c: e28d1064 add r1, sp, #100 ; 0x64 <== NOT EXECUTED
38b30: e5cd3074 strb r3, [sp, #116] ; 0x74 <== NOT EXECUTED
38b34: ebfffdff bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
38b38: e1a0a000 mov sl, r0 <== NOT EXECUTED
return rc;
}
38b3c: e1a0000a mov r0, sl <== NOT EXECUTED
38b40: e28dd0a0 add sp, sp, #160 ; 0xa0 <== NOT EXECUTED
38b44: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000387ac <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)
{
387ac: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
387b0: 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);
387b4: e28d5054 add r5, 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)
{
387b8: e1a08002 mov r8, r2 <== NOT EXECUTED
387bc: 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);
387c0: e1a02005 mov r2, r5 <== NOT EXECUTED
387c4: 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)
{
387c8: e1a04000 mov r4, r0 <== NOT EXECUTED
387cc: e59d90b0 ldr r9, [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);
387d0: ebfffefb bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
387d4: e250b000 subs fp, r0, #0 <== NOT EXECUTED
387d8: 1a000058 bne 38940 <rtems_rfs_symlink_read+0x194> <== 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);
387dc: e59d1060 ldr r1, [sp, #96] ; 0x60 <== NOT EXECUTED
return rc;
if (!RTEMS_RFS_S_ISLNK (rtems_rfs_inode_get_mode (&inode)))
387e0: e5d13002 ldrb r3, [r1, #2] <== NOT EXECUTED
387e4: e1a03403 lsl r3, r3, #8 <== NOT EXECUTED
387e8: e2033a0f and r3, r3, #61440 ; 0xf000 <== NOT EXECUTED
387ec: e3530a0a cmp r3, #40960 ; 0xa000 <== NOT EXECUTED
387f0: 1a000005 bne 3880c <rtems_rfs_symlink_read+0x60> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
387f4: e5d1200a ldrb r2, [r1, #10] <== NOT EXECUTED
387f8: e5d1300b ldrb r3, [r1, #11] <== NOT EXECUTED
387fc: e1832402 orr r2, r3, r2, lsl #8 <== NOT EXECUTED
if (size < *length)
38800: e1560002 cmp r6, r2 <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return EINVAL;
}
*length = rtems_rfs_inode_get_block_offset (&inode);
38804: e5892000 str r2, [r9] <== NOT EXECUTED
if (size < *length)
38808: 2a000004 bcs 38820 <rtems_rfs_symlink_read+0x74> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
3880c: e1a00004 mov r0, r4 <== NOT EXECUTED
38810: e1a01005 mov r1, r5 <== NOT EXECUTED
38814: ebfffec7 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
38818: e3a0b016 mov fp, #22 <== NOT EXECUTED
return EINVAL;
3881c: ea000047 b 38940 <rtems_rfs_symlink_read+0x194> <== 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);
38820: e281300c add r3, r1, #12 <== NOT EXECUTED
}
if (rtems_rfs_inode_get_block_count (&inode) == 0)
38824: e5d30003 ldrb r0, [r3, #3] <== NOT EXECUTED
38828: e5d1c00c ldrb ip, [r1, #12] <== NOT EXECUTED
3882c: e5d3e001 ldrb lr, [r3, #1] <== NOT EXECUTED
38830: e180cc0c orr ip, r0, ip, lsl #24 <== NOT EXECUTED
38834: e5d30002 ldrb r0, [r3, #2] <== NOT EXECUTED
38838: e18c380e orr r3, ip, lr, lsl #16 <== NOT EXECUTED
3883c: e1930400 orrs r0, r3, r0, lsl #8 <== NOT EXECUTED
38840: 1a000003 bne 38854 <rtems_rfs_symlink_read+0xa8> <== NOT EXECUTED
{
memcpy (path, inode.node->data.name, *length);
38844: e281101c add r1, r1, #28 <== NOT EXECUTED
38848: e1a00008 mov r0, r8 <== NOT EXECUTED
3884c: eb00238d bl 41688 <memcpy> <== NOT EXECUTED
38850: ea000033 b 38924 <rtems_rfs_symlink_read+0x178> <== 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);
38854: e28d7004 add r7, sp, #4 <== NOT EXECUTED
38858: e1a00004 mov r0, r4 <== NOT EXECUTED
3885c: e1a01005 mov r1, r5 <== NOT EXECUTED
38860: e1a02007 mov r2, r7 <== NOT EXECUTED
38864: ebfff11d bl 34ce0 <rtems_rfs_block_map_open> <== NOT EXECUTED
if (rc > 0)
38868: e250b000 subs fp, r0, #0 <== NOT EXECUTED
3886c: ca000028 bgt 38914 <rtems_rfs_symlink_read+0x168> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
return rc;
}
rc = rtems_rfs_block_map_seek (fs, &map, 0, &block);
38870: e28dc088 add ip, sp, #136 ; 0x88 <== NOT EXECUTED
38874: e1a00004 mov r0, r4 <== NOT EXECUTED
38878: e1a01007 mov r1, r7 <== NOT EXECUTED
3887c: e3a02000 mov r2, #0 <== NOT EXECUTED
38880: e3a03000 mov r3, #0 <== NOT EXECUTED
38884: e58dc000 str ip, [sp] <== NOT EXECUTED
38888: ebffee7a bl 34278 <rtems_rfs_block_map_seek> <== NOT EXECUTED
if (rc > 0)
3888c: e250b000 subs fp, r0, #0 <== NOT EXECUTED
38890: ca00000b bgt 388c4 <rtems_rfs_symlink_read+0x118> <== NOT EXECUTED
*/
static inline int
rtems_rfs_buffer_handle_open (rtems_rfs_file_system* fs,
rtems_rfs_buffer_handle* handle)
{
handle->dirty = false;
38894: e3a06000 mov r6, #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);
38898: e28da07c add sl, sp, #124 ; 0x7c <== NOT EXECUTED
3889c: e1a00004 mov r0, r4 <== NOT EXECUTED
388a0: e1a0100a mov r1, sl <== NOT EXECUTED
388a4: e59d2088 ldr r2, [sp, #136] ; 0x88 <== NOT EXECUTED
388a8: e1a03006 mov r3, r6 <== NOT EXECUTED
388ac: e5cd607c strb r6, [sp, #124] ; 0x7c <== NOT EXECUTED
handle->bnum = 0;
388b0: e58d6080 str r6, [sp, #128] ; 0x80 <== NOT EXECUTED
handle->buffer = NULL;
388b4: e58d6084 str r6, [sp, #132] ; 0x84 <== NOT EXECUTED
388b8: ebfff218 bl 35120 <rtems_rfs_buffer_handle_request> <== NOT EXECUTED
if (rc > 0)
388bc: e250b000 subs fp, r0, #0 <== NOT EXECUTED
388c0: da000003 ble 388d4 <rtems_rfs_symlink_read+0x128> <== NOT EXECUTED
{
rtems_rfs_block_map_close (fs, &map);
388c4: e1a01007 mov r1, r7 <== NOT EXECUTED
388c8: e1a00004 mov r0, r4 <== NOT EXECUTED
388cc: ebfff091 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
388d0: ea00000f b 38914 <rtems_rfs_symlink_read+0x168> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &inode);
return rc;
}
data = rtems_rfs_buffer_data (&buffer);
memcpy (path, data, *length);
388d4: e59d3084 ldr r3, [sp, #132] ; 0x84 <== NOT EXECUTED
388d8: e5992000 ldr r2, [r9] <== NOT EXECUTED
388dc: e5931020 ldr r1, [r3, #32] <== NOT EXECUTED
388e0: e1a00008 mov r0, r8 <== NOT EXECUTED
388e4: eb002367 bl 41688 <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);
388e8: e1a0100a mov r1, sl <== NOT EXECUTED
388ec: e1a00004 mov r0, r4 <== NOT EXECUTED
388f0: ebfff1c1 bl 34ffc <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);
388f4: e1a01007 mov r1, r7 <== NOT EXECUTED
388f8: e1a00004 mov r0, r4 <== NOT EXECUTED
handle->dirty = false;
handle->bnum = 0;
handle->buffer = NULL;
388fc: e58d6084 str r6, [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;
38900: e5cd607c strb r6, [sp, #124] ; 0x7c <== NOT EXECUTED
handle->bnum = 0;
38904: e58d6080 str r6, [sp, #128] ; 0x80 <== NOT EXECUTED
38908: ebfff082 bl 34b18 <rtems_rfs_block_map_close> <== NOT EXECUTED
if (rc > 0)
3890c: e250b000 subs fp, r0, #0 <== NOT EXECUTED
38910: da000003 ble 38924 <rtems_rfs_symlink_read+0x178> <== NOT EXECUTED
{
rtems_rfs_inode_close (fs, &inode);
38914: e1a00004 mov r0, r4 <== NOT EXECUTED
38918: e1a01005 mov r1, r5 <== NOT EXECUTED
3891c: ebfffe85 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
38920: ea000006 b 38940 <rtems_rfs_symlink_read+0x194> <== NOT EXECUTED
}
}
path[*length] = '\0';
38924: e5993000 ldr r3, [r9] <== NOT EXECUTED
38928: e3a02000 mov r2, #0 <== NOT EXECUTED
3892c: e7c82003 strb r2, [r8, r3] <== NOT EXECUTED
rc = rtems_rfs_inode_close (fs, &inode);
38930: e1a00004 mov r0, r4 <== NOT EXECUTED
38934: e28d1054 add r1, sp, #84 ; 0x54 <== NOT EXECUTED
38938: ebfffe7e bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
3893c: e1a0b000 mov fp, r0 <== NOT EXECUTED
return rc;
}
38940: e1a0000b mov r0, fp <== NOT EXECUTED
38944: e28dd08c add sp, sp, #140 ; 0x8c <== NOT EXECUTED
38948: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00038b4c <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)
{
38b4c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
38b50: e24dd050 sub sp, sp, #80 ; 0x50 <== NOT EXECUTED
38b54: e1a07002 mov r7, r2 <== NOT EXECUTED
38b58: e1a0a001 mov sl, r1 <== NOT EXECUTED
38b5c: e1a0b003 mov fp, 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);
38b60: e1a01002 mov r1, r2 <== NOT EXECUTED
38b64: e3a03001 mov r3, #1 <== NOT EXECUTED
38b68: 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)
{
38b6c: e1a04000 mov r4, r0 <== NOT EXECUTED
38b70: e59d8074 ldr r8, [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);
38b74: ebfffe12 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
38b78: e2509000 subs r9, 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);
38b7c: e1a0500d mov r5, sp <== NOT EXECUTED
if (rc)
38b80: 1a00006f bne 38d44 <rtems_rfs_unlink+0x1f8> <== 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);
38b84: 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));
38b88: e5d36002 ldrb r6, [r3, #2] <== NOT EXECUTED
38b8c: e1a06406 lsl r6, r6, #8 <== NOT EXECUTED
38b90: e2066a0f and r6, r6, #61440 ; 0xf000 <== NOT EXECUTED
38b94: e3560901 cmp r6, #16384 ; 0x4000 <== NOT EXECUTED
38b98: 13a06000 movne r6, #0 <== NOT EXECUTED
38b9c: 03a06001 moveq r6, #1 <== NOT EXECUTED
if (dir)
38ba0: e3560000 cmp r6, #0 <== NOT EXECUTED
38ba4: 0a00000e beq 38be4 <rtems_rfs_unlink+0x98> <== NOT EXECUTED
{
switch (dir_mode)
38ba8: e3580000 cmp r8, #0 <== NOT EXECUTED
38bac: 0a000002 beq 38bbc <rtems_rfs_unlink+0x70> <== NOT EXECUTED
38bb0: e3580001 cmp r8, #1 <== NOT EXECUTED
38bb4: 1a00000a bne 38be4 <rtems_rfs_unlink+0x98> <== NOT EXECUTED
38bb8: ea000004 b 38bd0 <rtems_rfs_unlink+0x84> <== 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);
38bbc: e1a00004 mov r0, r4 <== NOT EXECUTED
38bc0: e1a0100d mov r1, sp <== NOT EXECUTED
38bc4: ebfffddb bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
38bc8: e3a09015 mov r9, #21 <== NOT EXECUTED
return EISDIR;
38bcc: ea00005c b 38d44 <rtems_rfs_unlink+0x1f8> <== NOT EXECUTED
case rtems_rfs_unlink_dir_if_empty:
rc = rtems_rfs_dir_empty (fs, &target_inode);
38bd0: e1a00004 mov r0, r4 <== NOT EXECUTED
38bd4: e1a0100d mov r1, sp <== NOT EXECUTED
38bd8: ebfff1da bl 35348 <rtems_rfs_dir_empty> <== NOT EXECUTED
if (rc > 0)
38bdc: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38be0: ca000047 bgt 38d04 <rtems_rfs_unlink+0x1b8> <== NOT EXECUTED
default:
break;
}
}
rc = rtems_rfs_inode_open (fs, parent, &parent_inode, true);
38be4: e28d5028 add r5, sp, #40 ; 0x28 <== NOT EXECUTED
38be8: e1a0100a mov r1, sl <== NOT EXECUTED
38bec: e1a00004 mov r0, r4 <== NOT EXECUTED
38bf0: e1a02005 mov r2, r5 <== NOT EXECUTED
38bf4: e3a03001 mov r3, #1 <== NOT EXECUTED
38bf8: ebfffdf1 bl 383c4 <rtems_rfs_inode_open> <== NOT EXECUTED
if (rc)
38bfc: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38c00: 1a00003f bne 38d04 <rtems_rfs_unlink+0x1b8> <== 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);
38c04: e1a02007 mov r2, r7 <== NOT EXECUTED
38c08: e1a0300b mov r3, fp <== NOT EXECUTED
38c0c: e1a00004 mov r0, r4 <== NOT EXECUTED
38c10: e1a01005 mov r1, r5 <== NOT EXECUTED
38c14: ebfff2d8 bl 3577c <rtems_rfs_dir_del_entry> <== NOT EXECUTED
if (rc > 0)
38c18: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38c1c: ca000035 bgt 38cf8 <rtems_rfs_unlink+0x1ac> <== 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);
38c20: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
38c24: e5d31000 ldrb r1, [r3] <== NOT EXECUTED
38c28: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED
38c2c: e1822401 orr r2, r2, r1, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
38c30: e59f1118 ldr r1, [pc, #280] ; 38d50 <rtems_rfs_unlink+0x204><== NOT EXECUTED
38c34: e1520001 cmp r2, r1 <== NOT EXECUTED
38c38: 0a00000b beq 38c6c <rtems_rfs_unlink+0x120> <== 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)
38c3c: e3520001 cmp r2, #1 <== NOT EXECUTED
38c40: 9a000009 bls 38c6c <rtems_rfs_unlink+0x120> <== NOT EXECUTED
{
links--;
38c44: e2422001 sub r2, r2, #1 <== NOT EXECUTED
38c48: e1a02802 lsl r2, r2, #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);
38c4c: e1a01c22 lsr r1, r2, #24 <== NOT EXECUTED
38c50: e5c31000 strb r1, [r3] <== NOT EXECUTED
38c54: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED
38c58: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED
38c5c: e5c32001 strb r2, [r3, #1] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38c60: e3a03001 mov r3, #1 <== NOT EXECUTED
38c64: e5cd3010 strb r3, [sp, #16] <== NOT EXECUTED
38c68: ea00001b b 38cdc <rtems_rfs_unlink+0x190> <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
38c6c: e1a0100d mov r1, sp <== NOT EXECUTED
38c70: e1a00004 mov r0, r4 <== NOT EXECUTED
38c74: ebfffe05 bl 38490 <rtems_rfs_inode_delete> <== NOT EXECUTED
if (rc > 0)
38c78: e2509000 subs r9, r0, #0 <== NOT EXECUTED
else
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
38c7c: e1a0500d mov r5, sp <== NOT EXECUTED
if (rc > 0)
{
if (rtems_rfs_trace (RTEMS_RFS_TRACE_UNLINK))
printf ("rtems-rfs: unlink: inode-del failed: %d: %s\n",
rc, strerror (rc));
rtems_rfs_inode_close (fs, &parent_inode);
38c80: c1a00004 movgt r0, r4 <== NOT EXECUTED
38c84: c28d1028 addgt r1, sp, #40 ; 0x28 <== NOT EXECUTED
{
/*
* Erasing the inode releases all blocks attached to it.
*/
rc = rtems_rfs_inode_delete (fs, &target_inode);
if (rc > 0)
38c88: ca00001c bgt 38d00 <rtems_rfs_unlink+0x1b4> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &parent_inode);
rtems_rfs_inode_close (fs, &target_inode);
return rc;
}
if (dir)
38c8c: e3560000 cmp r6, #0 <== NOT EXECUTED
38c90: 0a000011 beq 38cdc <rtems_rfs_unlink+0x190> <== 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);
38c94: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
38c98: e5d21000 ldrb r1, [r2] <== NOT EXECUTED
38c9c: e5d23001 ldrb r3, [r2, #1] <== NOT EXECUTED
38ca0: e1833401 orr r3, r3, r1, lsl #8 <== NOT EXECUTED
if (links == 0xffff)
38ca4: e59f10a4 ldr r1, [pc, #164] ; 38d50 <rtems_rfs_unlink+0x204><== NOT EXECUTED
38ca8: e1530001 cmp r3, r1 <== NOT EXECUTED
38cac: 03a03000 moveq r3, #0 <== NOT EXECUTED
38cb0: 0a000003 beq 38cc4 <rtems_rfs_unlink+0x178> <== NOT EXECUTED
{
links = rtems_rfs_inode_get_links (&parent_inode);
if (links > 1)
38cb4: e3530001 cmp r3, #1 <== NOT EXECUTED
links--;
38cb8: 82433001 subhi r3, r3, #1 <== NOT EXECUTED
38cbc: 81a03803 lslhi r3, r3, #16 <== NOT EXECUTED
38cc0: 81a03823 lsrhi r3, r3, #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);
38cc4: e1a01423 lsr r1, r3, #8 <== NOT EXECUTED
38cc8: e5c21000 strb r1, [r2] <== NOT EXECUTED
38ccc: e59d2034 ldr r2, [sp, #52] ; 0x34 <== NOT EXECUTED
38cd0: e5c23001 strb r3, [r2, #1] <== NOT EXECUTED
rtems_rfs_buffer_mark_dirty (&handle->buffer);
38cd4: e3a03001 mov r3, #1 <== NOT EXECUTED
38cd8: e5cd3038 strb r3, [sp, #56] ; 0x38 <== NOT EXECUTED
rtems_rfs_inode_set_links (&parent_inode, links);
}
}
rc = rtems_rfs_inode_time_stamp_now (&parent_inode, true, true);
38cdc: e3a01001 mov r1, #1 <== NOT EXECUTED
38ce0: e28d5028 add r5, sp, #40 ; 0x28 <== NOT EXECUTED
38ce4: e1a00005 mov r0, r5 <== NOT EXECUTED
38ce8: e1a02001 mov r2, r1 <== NOT EXECUTED
38cec: ebfffce0 bl 38074 <rtems_rfs_inode_time_stamp_now> <== NOT EXECUTED
if (rc > 0)
38cf0: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38cf4: da000005 ble 38d10 <rtems_rfs_unlink+0x1c4> <== 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);
38cf8: e1a01005 mov r1, r5 <== NOT EXECUTED
38cfc: e1a00004 mov r0, r4 <== NOT EXECUTED
38d00: ebfffd8c bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
rtems_rfs_inode_close (fs, &target_inode);
38d04: e1a00004 mov r0, r4 <== NOT EXECUTED
38d08: e1a0100d mov r1, sp <== NOT EXECUTED
38d0c: ea000006 b 38d2c <rtems_rfs_unlink+0x1e0> <== NOT EXECUTED
return rc;
}
rc = rtems_rfs_inode_close (fs, &parent_inode);
38d10: e1a01005 mov r1, r5 <== NOT EXECUTED
38d14: e1a00004 mov r0, r4 <== NOT EXECUTED
38d18: ebfffd86 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
if (rc > 0)
38d1c: e2509000 subs r9, r0, #0 <== NOT EXECUTED
38d20: e1a0100d mov r1, sp <== NOT EXECUTED
38d24: da000002 ble 38d34 <rtems_rfs_unlink+0x1e8> <== 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);
38d28: e1a00004 mov r0, r4 <== NOT EXECUTED
38d2c: ebfffd81 bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
return rc;
38d30: ea000003 b 38d44 <rtems_rfs_unlink+0x1f8> <== NOT EXECUTED
}
rc = rtems_rfs_inode_close (fs, &target_inode);
38d34: e1a00004 mov r0, r4 <== NOT EXECUTED
38d38: e1a0100d mov r1, sp <== NOT EXECUTED
38d3c: ebfffd7d bl 38338 <rtems_rfs_inode_close> <== NOT EXECUTED
38d40: e1a09000 mov r9, 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;
}
38d44: e1a00009 mov r0, r9 <== NOT EXECUTED
38d48: e28dd050 add sp, sp, #80 ; 0x50 <== NOT EXECUTED
38d4c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000206b0 <rtems_shell_debugrfs>:
printf (" -l: The debugger command list.\n");
}
int
rtems_shell_debugrfs (int argc, char *argv[])
{
206b0: e92d45f0 push {r4, r5, r6, r7, r8, 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>" }
};
206b4: e59fe20c ldr lr, [pc, #524] ; 208c8 <rtems_shell_debugrfs+0x218><== NOT EXECUTED
printf (" -l: The debugger command list.\n");
}
int
rtems_shell_debugrfs (int argc, char *argv[])
{
206b8: e1a05000 mov r5, r0 <== NOT EXECUTED
206bc: e24dd08c sub sp, sp, #140 ; 0x8c <== NOT EXECUTED
206c0: e1a04001 mov r4, 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>" }
};
206c4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
206c8: e28dc004 add ip, sp, #4 <== NOT EXECUTED
206cc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
206d0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
206d4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
206d8: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED
206dc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED
206e0: e89e0007 ldm lr, {r0, r1, r2} <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
206e4: e3550001 cmp r5, #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>" }
};
206e8: e88c0007 stm ip, {r0, r1, r2} <== NOT EXECUTED
int arg;
int t;
for (arg = 1; arg < argc; arg++)
206ec: da000029 ble 20798 <rtems_shell_debugrfs+0xe8> <== NOT EXECUTED
{
if (argv[arg][0] != '-')
206f0: e5947004 ldr r7, [r4, #4] <== NOT EXECUTED
206f4: e5d73000 ldrb r3, [r7] <== NOT EXECUTED
206f8: e353002d cmp r3, #45 ; 0x2d <== NOT EXECUTED
206fc: 1a000023 bne 20790 <rtems_shell_debugrfs+0xe0> <== NOT EXECUTED
break;
switch (argv[arg][1])
20700: e5d73001 ldrb r3, [r7, #1] <== NOT EXECUTED
20704: e3530068 cmp r3, #104 ; 0x68 <== NOT EXECUTED
20708: 0a000004 beq 20720 <rtems_shell_debugrfs+0x70> <== NOT EXECUTED
2070c: e353006c cmp r3, #108 ; 0x6c <== 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]);
20710: 11a01007 movne r1, r7 <== NOT EXECUTED
20714: 159f01b0 ldrne r0, [pc, #432] ; 208cc <rtems_shell_debugrfs+0x21c><== NOT EXECUTED
for (arg = 1; arg < argc; arg++)
{
if (argv[arg][0] != '-')
break;
switch (argv[arg][1])
20718: 1a000066 bne 208b8 <rtems_shell_debugrfs+0x208> <== NOT EXECUTED
2071c: ea000002 b 2072c <rtems_shell_debugrfs+0x7c> <== NOT EXECUTED
{
case 'h':
rtems_rfs_shell_usage (argv[0]);
20720: e5940000 ldr r0, [r4] <== NOT EXECUTED
20724: ebfffc45 bl 1f840 <rtems_rfs_shell_usage> <== NOT EXECUTED
20728: ea000016 b 20788 <rtems_shell_debugrfs+0xd8> <== NOT EXECUTED
return 0;
case 'l':
printf ("%s: commands are:\n", argv[0]);
2072c: e5941000 ldr r1, [r4] <== NOT EXECUTED
20730: e59f0198 ldr r0, [pc, #408] ; 208d0 <rtems_shell_debugrfs+0x220><== NOT EXECUTED
20734: eb008881 bl 42940 <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);
20738: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED
2073c: e59d200c ldr r2, [sp, #12] <== NOT EXECUTED
20740: e59f018c ldr r0, [pc, #396] ; 208d4 <rtems_shell_debugrfs+0x224><== NOT EXECUTED
20744: eb00887d bl 42940 <printf> <== NOT EXECUTED
20748: e59d1010 ldr r1, [sp, #16] <== NOT EXECUTED
2074c: e59d2018 ldr r2, [sp, #24] <== NOT EXECUTED
20750: e59f017c ldr r0, [pc, #380] ; 208d4 <rtems_shell_debugrfs+0x224><== NOT EXECUTED
20754: eb008879 bl 42940 <printf> <== NOT EXECUTED
20758: e59d101c ldr r1, [sp, #28] <== NOT EXECUTED
2075c: e59d2024 ldr r2, [sp, #36] ; 0x24 <== NOT EXECUTED
20760: e59f016c ldr r0, [pc, #364] ; 208d4 <rtems_shell_debugrfs+0x224><== NOT EXECUTED
20764: eb008875 bl 42940 <printf> <== NOT EXECUTED
20768: e59d1028 ldr r1, [sp, #40] ; 0x28 <== NOT EXECUTED
2076c: e59d2030 ldr r2, [sp, #48] ; 0x30 <== NOT EXECUTED
20770: e59f015c ldr r0, [pc, #348] ; 208d4 <rtems_shell_debugrfs+0x224><== NOT EXECUTED
20774: eb008871 bl 42940 <printf> <== NOT EXECUTED
20778: e59f0154 ldr r0, [pc, #340] ; 208d4 <rtems_shell_debugrfs+0x224><== NOT EXECUTED
2077c: e59d1034 ldr r1, [sp, #52] ; 0x34 <== NOT EXECUTED
20780: e59d203c ldr r2, [sp, #60] ; 0x3c <== NOT EXECUTED
20784: eb00886d bl 42940 <printf> <== NOT EXECUTED
20788: e3a00000 mov r0, #0 <== NOT EXECUTED
2078c: ea00004b b 208c0 <rtems_shell_debugrfs+0x210> <== NOT EXECUTED
printf ("error: unknown option: %s\n", argv[arg]);
return 1;
}
}
if ((argc - arg) < 2)
20790: e3550002 cmp r5, #2 <== NOT EXECUTED
20794: 1a000002 bne 207a4 <rtems_shell_debugrfs+0xf4> <== NOT EXECUTED
printf ("error: you need at least a path and command, try %s -h\n", argv[0]);
20798: e5941000 ldr r1, [r4] <== NOT EXECUTED
2079c: e59f0134 ldr r0, [pc, #308] ; 208d8 <rtems_shell_debugrfs+0x228><== NOT EXECUTED
207a0: ea000044 b 208b8 <rtems_shell_debugrfs+0x208> <== NOT EXECUTED
rtems_rfs_get_fs (const char* path, rtems_rfs_file_system** fs)
{
struct statvfs sb;
int rc;
rc = statvfs (path, &sb);
207a4: e1a00007 mov r0, r7 <== NOT EXECUTED
207a8: e28d1040 add r1, sp, #64 ; 0x40 <== NOT EXECUTED
207ac: eb00195f bl 26d30 <statvfs> <== NOT EXECUTED
if (rc < 0)
207b0: e3500000 cmp r0, #0 <== NOT EXECUTED
207b4: aa00000a bge 207e4 <rtems_shell_debugrfs+0x134> <== NOT EXECUTED
{
printf ("error: cannot statvfs path: %s: (%d) %s\n",
207b8: eb007702 bl 3e3c8 <__errno> <== NOT EXECUTED
207bc: e5904000 ldr r4, [r0] <== NOT EXECUTED
207c0: eb007700 bl 3e3c8 <__errno> <== NOT EXECUTED
207c4: e5900000 ldr r0, [r0] <== NOT EXECUTED
207c8: eb009080 bl 449d0 <strerror> <== NOT EXECUTED
207cc: e1a01007 mov r1, r7 <== NOT EXECUTED
207d0: e1a03000 mov r3, r0 <== NOT EXECUTED
207d4: e1a02004 mov r2, r4 <== NOT EXECUTED
207d8: e59f00fc ldr r0, [pc, #252] ; 208dc <rtems_shell_debugrfs+0x22c><== NOT EXECUTED
207dc: eb008857 bl 42940 <printf> <== NOT EXECUTED
207e0: ea000035 b 208bc <rtems_shell_debugrfs+0x20c> <== NOT EXECUTED
path, errno, strerror (errno));
return -1;
}
if (sb.f_fsid != RTEMS_RFS_SB_MAGIC)
207e4: e59d206c ldr r2, [sp, #108] ; 0x6c <== NOT EXECUTED
207e8: e59f30f0 ldr r3, [pc, #240] ; 208e0 <rtems_shell_debugrfs+0x230><== NOT EXECUTED
207ec: e1520003 cmp r2, r3 <== NOT EXECUTED
{
printf ("error: path '%s' is not on an RFS file system\n", path);
207f0: 11a01007 movne r1, r7 <== NOT EXECUTED
207f4: 159f00e8 ldrne r0, [pc, #232] ; 208e4 <rtems_shell_debugrfs+0x234><== 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)
207f8: 1a00002e bne 208b8 <rtems_shell_debugrfs+0x208> <== 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);
207fc: e1a00007 mov r0, r7 <== NOT EXECUTED
20800: eb0091fe bl 45000 <strlen> <== NOT EXECUTED
20804: e28d6078 add r6, sp, #120 ; 0x78 <== NOT EXECUTED
20808: e1a01000 mov r1, r0 <== NOT EXECUTED
2080c: e3a02000 mov r2, #0 <== NOT EXECUTED
20810: e1a00007 mov r0, r7 <== NOT EXECUTED
20814: e1a03006 mov r3, r6 <== NOT EXECUTED
20818: e3a0c001 mov ip, #1 <== NOT EXECUTED
2081c: e58dc000 str ip, [sp] <== NOT EXECUTED
20820: ebff9b85 bl 763c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
*fs = rtems_rfs_rtems_pathloc_dev (&pathloc);
rtems_filesystem_freenode (&pathloc);
20824: 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);
20828: e59d2088 ldr r2, [sp, #136] ; 0x88 <== NOT EXECUTED
rtems_filesystem_freenode (&pathloc);
2082c: 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);
20830: e1a07000 mov r7, r0 <== NOT EXECUTED
*fs = rtems_rfs_rtems_pathloc_dev (&pathloc);
20834: e5928034 ldr r8, [r2, #52] ; 0x34 <== NOT EXECUTED
rtems_filesystem_freenode (&pathloc);
20838: 0a000004 beq 20850 <rtems_shell_debugrfs+0x1a0> <== NOT EXECUTED
2083c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
20840: e3530000 cmp r3, #0 <== NOT EXECUTED
20844: 11a00006 movne r0, r6 <== NOT EXECUTED
20848: 11a0e00f movne lr, pc <== NOT EXECUTED
2084c: 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)
20850: e3570000 cmp r7, #0 <== NOT EXECUTED
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
20854: 02844008 addeq r4, r4, #8 <== 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)
20858: 01a06007 moveq r6, r7 <== NOT EXECUTED
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
2085c: 028da004 addeq sl, sp, #4 <== 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)
20860: 1a000015 bne 208bc <rtems_shell_debugrfs+0x20c> <== NOT EXECUTED
{
for (t = 0; t < (sizeof (table) / sizeof (const rtems_rfs_shell_cmd)); t++)
if (strcmp (argv[arg + 1], table[t].name) == 0)
20864: e79a1007 ldr r1, [sl, r7] <== NOT EXECUTED
20868: e5940000 ldr r0, [r4] <== NOT EXECUTED
2086c: eb008f7b bl 44660 <strcmp> <== NOT EXECUTED
20870: e3500000 cmp r0, #0 <== NOT EXECUTED
20874: e287700c add r7, r7, #12 <== NOT EXECUTED
20878: 1a000009 bne 208a4 <rtems_shell_debugrfs+0x1f4> <== NOT EXECUTED
return table[t].handler (fs, argc - 2, argv + 2);
2087c: e3a02003 mov r2, #3 <== NOT EXECUTED
20880: e0030692 mul r3, r2, r6 <== NOT EXECUTED
20884: e28d208c add r2, sp, #140 ; 0x8c <== NOT EXECUTED
20888: e0823103 add r3, r2, r3, lsl #2 <== NOT EXECUTED
2088c: e1a00008 mov r0, r8 <== NOT EXECUTED
20890: e2451002 sub r1, r5, #2 <== NOT EXECUTED
20894: e1a02004 mov r2, r4 <== NOT EXECUTED
20898: e1a0e00f mov lr, pc <== NOT EXECUTED
2089c: e513f084 ldr pc, [r3, #-132] ; 0x84 <== NOT EXECUTED
208a0: ea000006 b 208c0 <rtems_shell_debugrfs+0x210> <== 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++)
208a4: e2866001 add r6, r6, #1 <== NOT EXECUTED
208a8: e3560005 cmp r6, #5 <== NOT EXECUTED
208ac: 1affffec bne 20864 <rtems_shell_debugrfs+0x1b4> <== 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]);
208b0: e5941000 ldr r1, [r4] <== NOT EXECUTED
208b4: e59f002c ldr r0, [pc, #44] ; 208e8 <rtems_shell_debugrfs+0x238><== NOT EXECUTED
208b8: eb008820 bl 42940 <printf> <== NOT EXECUTED
208bc: e3a00001 mov r0, #1 <== NOT EXECUTED
}
}
return 1;
}
208c0: e28dd08c add sp, sp, #140 ; 0x8c <== NOT EXECUTED
208c4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
0001f8a8 <rtems_shell_rfs_format>:
return 1;
}
int
rtems_shell_rfs_format (int argc, char* argv[])
{
1f8a8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED
1f8ac: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
1f8b0: e1a07000 mov r7, r0 <== NOT EXECUTED
1f8b4: e1a06001 mov r6, r1 <== NOT EXECUTED
rtems_rfs_format_config config;
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
1f8b8: e1a0000d mov r0, sp <== NOT EXECUTED
1f8bc: e3a01000 mov r1, #0 <== NOT EXECUTED
1f8c0: e3a02018 mov r2, #24 <== NOT EXECUTED
1f8c4: e3a04001 mov r4, #1 <== NOT EXECUTED
1f8c8: eb0087f5 bl 418a4 <memset> <== NOT EXECUTED
1f8cc: e3a05000 mov r5, #0 <== NOT EXECUTED
if (argv[arg][0] == '-')
{
switch (argv[arg][1])
{
case 'v':
config.verbose = true;
1f8d0: e1a08004 mov r8, r4 <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
1f8d4: ea000049 b 1fa00 <rtems_shell_rfs_format+0x158> <== NOT EXECUTED
{
if (argv[arg][0] == '-')
1f8d8: e7961104 ldr r1, [r6, r4, lsl #2] <== NOT EXECUTED
1f8dc: e5d13000 ldrb r3, [r1] <== NOT EXECUTED
1f8e0: e353002d cmp r3, #45 ; 0x2d <== NOT EXECUTED
1f8e4: 1a00003e bne 1f9e4 <rtems_shell_rfs_format+0x13c> <== NOT EXECUTED
{
switch (argv[arg][1])
1f8e8: e5d13001 ldrb r3, [r1, #1] <== NOT EXECUTED
1f8ec: e3530069 cmp r3, #105 ; 0x69 <== NOT EXECUTED
1f8f0: 0a000023 beq 1f984 <rtems_shell_rfs_format+0xdc> <== NOT EXECUTED
1f8f4: 8a000004 bhi 1f90c <rtems_shell_rfs_format+0x64> <== NOT EXECUTED
1f8f8: e3530049 cmp r3, #73 ; 0x49 <== NOT EXECUTED
1f8fc: 0a00002a beq 1f9ac <rtems_shell_rfs_format+0x104> <== NOT EXECUTED
1f900: e3530062 cmp r3, #98 ; 0x62 <== NOT EXECUTED
1f904: 1a000034 bne 1f9dc <rtems_shell_rfs_format+0x134> <== NOT EXECUTED
1f908: ea000013 b 1f95c <rtems_shell_rfs_format+0xb4> <== NOT EXECUTED
1f90c: e3530073 cmp r3, #115 ; 0x73 <== NOT EXECUTED
1f910: 0a000006 beq 1f930 <rtems_shell_rfs_format+0x88> <== NOT EXECUTED
1f914: e3530076 cmp r3, #118 ; 0x76 <== NOT EXECUTED
1f918: 0a000002 beq 1f928 <rtems_shell_rfs_format+0x80> <== NOT EXECUTED
1f91c: e353006f cmp r3, #111 ; 0x6f <== NOT EXECUTED
1f920: 1a00002d bne 1f9dc <rtems_shell_rfs_format+0x134> <== NOT EXECUTED
1f924: ea000022 b 1f9b4 <rtems_shell_rfs_format+0x10c> <== NOT EXECUTED
{
case 'v':
config.verbose = true;
1f928: e5cd8015 strb r8, [sp, #21] <== NOT EXECUTED
1f92c: ea000008 b 1f954 <rtems_shell_rfs_format+0xac> <== NOT EXECUTED
break;
case 's':
arg++;
1f930: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
1f934: e1540007 cmp r4, r7 <== NOT EXECUTED
{
printf ("error: block size needs an argument\n");
1f938: a59f011c ldrge r0, [pc, #284] ; 1fa5c <rtems_shell_rfs_format+0x1b4><== NOT EXECUTED
1f93c: aa000034 bge 1fa14 <rtems_shell_rfs_format+0x16c> <== NOT EXECUTED
return 1;
}
config.block_size = strtoul (argv[arg], 0, 0);
1f940: e3a01000 mov r1, #0 <== NOT EXECUTED
1f944: e7960104 ldr r0, [r6, r4, lsl #2] <== NOT EXECUTED
1f948: e1a02001 mov r2, r1 <== NOT EXECUTED
1f94c: eb009ac7 bl 46470 <strtoul> <== NOT EXECUTED
1f950: e58d0000 str r0, [sp] <== NOT EXECUTED
1f954: e1a01005 mov r1, r5 <== NOT EXECUTED
break;
1f958: ea000026 b 1f9f8 <rtems_shell_rfs_format+0x150> <== NOT EXECUTED
case 'b':
arg++;
1f95c: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
1f960: e1540007 cmp r4, r7 <== NOT EXECUTED
{
printf ("error: group block count needs an argument\n");
1f964: a59f00f4 ldrge r0, [pc, #244] ; 1fa60 <rtems_shell_rfs_format+0x1b8><== NOT EXECUTED
1f968: aa000029 bge 1fa14 <rtems_shell_rfs_format+0x16c> <== NOT EXECUTED
return 1;
}
config.group_blocks = strtoul (argv[arg], 0, 0);
1f96c: e3a01000 mov r1, #0 <== NOT EXECUTED
1f970: e7960104 ldr r0, [r6, r4, lsl #2] <== NOT EXECUTED
1f974: e1a02001 mov r2, r1 <== NOT EXECUTED
1f978: eb009abc bl 46470 <strtoul> <== NOT EXECUTED
1f97c: e58d0004 str r0, [sp, #4] <== NOT EXECUTED
1f980: eafffff3 b 1f954 <rtems_shell_rfs_format+0xac> <== NOT EXECUTED
break;
case 'i':
arg++;
1f984: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
1f988: e1540007 cmp r4, r7 <== NOT EXECUTED
{
printf ("error: group inode count needs an argument\n");
1f98c: a59f00d0 ldrge r0, [pc, #208] ; 1fa64 <rtems_shell_rfs_format+0x1bc><== NOT EXECUTED
1f990: aa00001f bge 1fa14 <rtems_shell_rfs_format+0x16c> <== NOT EXECUTED
return 1;
}
config.group_inodes = strtoul (argv[arg], 0, 0);
1f994: e3a01000 mov r1, #0 <== NOT EXECUTED
1f998: e7960104 ldr r0, [r6, r4, lsl #2] <== NOT EXECUTED
1f99c: e1a02001 mov r2, r1 <== NOT EXECUTED
1f9a0: eb009ab2 bl 46470 <strtoul> <== NOT EXECUTED
1f9a4: e58d0008 str r0, [sp, #8] <== NOT EXECUTED
1f9a8: eaffffe9 b 1f954 <rtems_shell_rfs_format+0xac> <== NOT EXECUTED
break;
case 'I':
config.initialise_inodes = true;
1f9ac: e5cd8014 strb r8, [sp, #20] <== NOT EXECUTED
1f9b0: eaffffe7 b 1f954 <rtems_shell_rfs_format+0xac> <== NOT EXECUTED
break;
case 'o':
arg++;
1f9b4: e2844001 add r4, r4, #1 <== NOT EXECUTED
if (arg >= argc)
1f9b8: e1540007 cmp r4, r7 <== NOT EXECUTED
{
printf ("error: inode percentage overhead needs an argument\n");
1f9bc: a59f00a4 ldrge r0, [pc, #164] ; 1fa68 <rtems_shell_rfs_format+0x1c0><== NOT EXECUTED
1f9c0: aa000013 bge 1fa14 <rtems_shell_rfs_format+0x16c> <== NOT EXECUTED
return 1;
}
config.inode_overhead = strtoul (argv[arg], 0, 0);
1f9c4: e3a01000 mov r1, #0 <== NOT EXECUTED
1f9c8: e7960104 ldr r0, [r6, r4, lsl #2] <== NOT EXECUTED
1f9cc: e1a02001 mov r2, r1 <== NOT EXECUTED
1f9d0: eb009aa6 bl 46470 <strtoul> <== NOT EXECUTED
1f9d4: e58d000c str r0, [sp, #12] <== NOT EXECUTED
1f9d8: eaffffdd b 1f954 <rtems_shell_rfs_format+0xac> <== NOT EXECUTED
break;
default:
printf ("error: invalid option: %s\n", argv[arg]);
1f9dc: e59f0088 ldr r0, [pc, #136] ; 1fa6c <rtems_shell_rfs_format+0x1c4><== NOT EXECUTED
1f9e0: ea000002 b 1f9f0 <rtems_shell_rfs_format+0x148> <== NOT EXECUTED
return 1;
}
}
else
{
if (!driver)
1f9e4: e3550000 cmp r5, #0 <== NOT EXECUTED
1f9e8: 0a000002 beq 1f9f8 <rtems_shell_rfs_format+0x150> <== NOT EXECUTED
driver = argv[arg];
else
{
printf ("error: only one driver name allowed: %s\n", argv[arg]);
1f9ec: e59f007c ldr r0, [pc, #124] ; 1fa70 <rtems_shell_rfs_format+0x1c8><== NOT EXECUTED
1f9f0: eb008bd2 bl 42940 <printf> <== NOT EXECUTED
1f9f4: ea000015 b 1fa50 <rtems_shell_rfs_format+0x1a8> <== NOT EXECUTED
const char* driver = NULL;
int arg;
memset (&config, 0, sizeof (rtems_rfs_format_config));
for (arg = 1; arg < argc; arg++)
1f9f8: e2844001 add r4, r4, #1 <== NOT EXECUTED
1f9fc: e1a05001 mov r5, r1 <== NOT EXECUTED
1fa00: e1540007 cmp r4, r7 <== NOT EXECUTED
1fa04: baffffb3 blt 1f8d8 <rtems_shell_rfs_format+0x30> <== NOT EXECUTED
return 1;
}
}
}
if (!driver) {
1fa08: e3550000 cmp r5, #0 <== NOT EXECUTED
1fa0c: 1a000002 bne 1fa1c <rtems_shell_rfs_format+0x174> <== NOT EXECUTED
printf ("error: no driver name provided\n");
1fa10: e59f005c ldr r0, [pc, #92] ; 1fa74 <rtems_shell_rfs_format+0x1cc><== NOT EXECUTED
1fa14: eb008c6e bl 42bd4 <puts> <== NOT EXECUTED
1fa18: ea00000c b 1fa50 <rtems_shell_rfs_format+0x1a8> <== NOT EXECUTED
return 1;
}
if (rtems_rfs_format (driver, &config) < 0)
1fa1c: e1a00005 mov r0, r5 <== NOT EXECUTED
1fa20: e1a0100d mov r1, sp <== NOT EXECUTED
1fa24: eb005d43 bl 36f38 <rtems_rfs_format> <== NOT EXECUTED
1fa28: e3500000 cmp r0, #0 <== NOT EXECUTED
1fa2c: a3a00000 movge r0, #0 <== NOT EXECUTED
1fa30: aa000007 bge 1fa54 <rtems_shell_rfs_format+0x1ac> <== NOT EXECUTED
{
printf ("error: format of %s failed: %s\n",
1fa34: eb007a63 bl 3e3c8 <__errno> <== NOT EXECUTED
1fa38: e5900000 ldr r0, [r0] <== NOT EXECUTED
1fa3c: eb0093e3 bl 449d0 <strerror> <== NOT EXECUTED
1fa40: e1a01005 mov r1, r5 <== NOT EXECUTED
1fa44: e1a02000 mov r2, r0 <== NOT EXECUTED
1fa48: e59f0028 ldr r0, [pc, #40] ; 1fa78 <rtems_shell_rfs_format+0x1d0><== NOT EXECUTED
1fa4c: eb008bbb bl 42940 <printf> <== NOT EXECUTED
1fa50: e3a00001 mov r0, #1 <== NOT EXECUTED
driver, strerror (errno));
return 1;
}
return 0;
}
1fa54: e28dd018 add sp, sp, #24 <== NOT EXECUTED
1fa58: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
00005e58 <rtems_stack_checker_is_blown>:
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
5e58: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
5e5c: e59f307c ldr r3, [pc, #124] ; 5ee0 <rtems_stack_checker_is_blown+0x88>
5e60: e5933000 ldr r3, [r3]
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5e64: e59300c8 ldr r0, [r3, #200] ; 0xc8
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
{
5e68: e28db008 add fp, sp, #8
)
{
#if defined(__GNUC__)
void *sp = __builtin_frame_address(0);
if ( sp < the_stack->area ) {
5e6c: e15b0000 cmp fp, r0
5e70: 33a04000 movcc r4, #0
5e74: 3a000004 bcc 5e8c <rtems_stack_checker_is_blown+0x34>
}
/*
* Check if blown
*/
bool rtems_stack_checker_is_blown( void )
5e78: e59340c4 ldr r4, [r3, #196] ; 0xc4
5e7c: e0804004 add r4, r0, r4
5e80: e15b0004 cmp fp, r4
5e84: 83a04000 movhi r4, #0
5e88: 93a04001 movls r4, #1
/*
* The stack checker must be initialized before the pattern is there
* to check.
*/
if ( Stack_check_Initialized ) {
5e8c: e59f3050 ldr r3, [pc, #80] ; 5ee4 <rtems_stack_checker_is_blown+0x8c>
5e90: e5933000 ldr r3, [r3]
5e94: e3530000 cmp r3, #0
5e98: 03a01001 moveq r1, #1
5e9c: 0a000005 beq 5eb8 <rtems_stack_checker_is_blown+0x60>
pattern_ok = (!memcmp(
5ea0: e59f1040 ldr r1, [pc, #64] ; 5ee8 <rtems_stack_checker_is_blown+0x90>
5ea4: e2800008 add r0, r0, #8
5ea8: e3a02010 mov r2, #16
5eac: eb00edcb bl 415e0 <memcmp>
5eb0: e2701001 rsbs r1, r0, #1
5eb4: 33a01000 movcc r1, #0
}
/*
* The Stack Pointer and the Pattern Area are OK so return false.
*/
if ( sp_ok && pattern_ok )
5eb8: e3540000 cmp r4, #0
5ebc: 0a000002 beq 5ecc <rtems_stack_checker_is_blown+0x74>
5ec0: e3510000 cmp r1, #0
5ec4: 13a00000 movne r0, #0
5ec8: 18bd8810 popne {r4, fp, pc}
return false;
/*
* Let's report as much as we can.
*/
Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
5ecc: e59f300c ldr r3, [pc, #12] ; 5ee0 <rtems_stack_checker_is_blown+0x88><== NOT EXECUTED
5ed0: e5930000 ldr r0, [r3] <== NOT EXECUTED
5ed4: ebffffb4 bl 5dac <Stack_check_report_blown_task> <== NOT EXECUTED
5ed8: e3a00001 mov r0, #1 <== NOT EXECUTED
return true;
}
5edc: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
00005d9c <rtems_stack_checker_report_usage>:
void rtems_stack_checker_report_usage( void )
{
rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
5d9c: e59f1004 ldr r1, [pc, #4] ; 5da8 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED
5da0: e3a00000 mov r0, #0 <== NOT EXECUTED
5da4: eaffffe3 b 5d38 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
00005d38 <rtems_stack_checker_report_usage_with_plugin>:
void rtems_stack_checker_report_usage_with_plugin(
void *context,
rtems_printk_plugin_t print
)
{
5d38: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
print_context = context;
5d3c: e59f4048 ldr r4, [pc, #72] ; 5d8c <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
)
{
5d40: e1a05001 mov r5, r1 <== NOT EXECUTED
5d44: e1a06000 mov r6, r0 <== NOT EXECUTED
print_context = context;
print_handler = print;
5d48: 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;
5d4c: e5840008 str r0, [r4, #8] <== NOT EXECUTED
print_handler = print;
(*print)( context, "Stack usage by thread\n");
5d50: e59f1038 ldr r1, [pc, #56] ; 5d90 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED
5d54: e1a0e00f mov lr, pc <== NOT EXECUTED
5d58: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
5d5c: e59f1030 ldr r1, [pc, #48] ; 5d94 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED
5d60: e1a00006 mov r0, r6 <== NOT EXECUTED
5d64: e1a0e00f mov lr, pc <== NOT EXECUTED
5d68: 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 );
5d6c: e59f0024 ldr r0, [pc, #36] ; 5d98 <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED
5d70: eb001c15 bl cdcc <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */
Stack_check_Dump_threads_usage((Thread_Control *) -1);
5d74: e3e00000 mvn r0, #0 <== NOT EXECUTED
5d78: ebffff9f bl 5bfc <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
5d7c: e3a03000 mov r3, #0 <== NOT EXECUTED
print_handler = NULL;
5d80: 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;
5d84: e5843008 str r3, [r4, #8] <== NOT EXECUTED
print_handler = NULL;
}
5d88: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000ae28 <rtems_string_to_double>:
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ae28: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr}
double result;
char *end;
if ( !n )
ae2c: e2516000 subs r6, r1, #0
rtems_status_code rtems_string_to_double (
const char *s,
double *n,
char **endptr
)
{
ae30: e1a07000 mov r7, r0
ae34: e1a08002 mov r8, r2
double result;
char *end;
if ( !n )
ae38: 03a00009 moveq r0, #9
ae3c: 0a00002e beq aefc <rtems_string_to_double+0xd4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
ae40: eb000b52 bl db90 <__errno>
ae44: e3a03000 mov r3, #0
ae48: e5803000 str r3, [r0]
*n = 0;
ae4c: e3a04000 mov r4, #0
ae50: e3a03000 mov r3, #0
ae54: e8860018 stm r6, {r3, r4}
result = strtod( s, &end );
ae58: e1a00007 mov r0, r7
ae5c: e1a0100d mov r1, sp
ae60: eb0016c8 bl 10988 <strtod>
if ( endptr )
ae64: e3580000 cmp r8, #0
*endptr = end;
ae68: 159d3000 ldrne r3, [sp]
ae6c: 15883000 strne r3, [r8]
if ( end == s )
ae70: e59d3000 ldr r3, [sp]
ae74: e1530007 cmp r3, r7
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtod( s, &end );
ae78: e1a04000 mov r4, r0
ae7c: e1a05001 mov r5, r1
if ( endptr )
*endptr = end;
if ( end == s )
ae80: 03a0000b moveq r0, #11
ae84: 0a00001c beq aefc <rtems_string_to_double+0xd4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
ae88: eb000b40 bl db90 <__errno>
ae8c: e5903000 ldr r3, [r0]
ae90: e3530022 cmp r3, #34 ; 0x22
ae94: 1a000014 bne aeec <rtems_string_to_double+0xc4>
ae98: e1a00004 mov r0, r4
ae9c: e1a01005 mov r1, r5
aea0: e3a02000 mov r2, #0
aea4: e3a03000 mov r3, #0
aea8: ebffdf4f bl 2bec <__cmpdf2>
aeac: e3500000 cmp r0, #0
aeb0: 0a000010 beq aef8 <rtems_string_to_double+0xd0>
aeb4: e1a00004 mov r0, r4
aeb8: e1a01005 mov r1, r5
aebc: e3e02000 mvn r2, #0
aec0: e59f3038 ldr r3, [pc, #56] ; af00 <rtems_string_to_double+0xd8>
aec4: ebffdf44 bl 2bdc <__gedf2>
aec8: e3500000 cmp r0, #0
aecc: ca000009 bgt aef8 <rtems_string_to_double+0xd0>
aed0: e1a00004 mov r0, r4 <== NOT EXECUTED
aed4: e1a01005 mov r1, r5 <== NOT EXECUTED
aed8: e3e02000 mvn r2, #0 <== NOT EXECUTED
aedc: e3e03601 mvn r3, #1048576 ; 0x100000 <== NOT EXECUTED
aee0: ebffdf3f bl 2be4 <__ledf2> <== NOT EXECUTED
aee4: e3500000 cmp r0, #0 <== NOT EXECUTED
aee8: ba000002 blt aef8 <rtems_string_to_double+0xd0> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL )))
return RTEMS_INVALID_NUMBER;
*n = result;
aeec: e8860030 stm r6, {r4, r5}
aef0: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
aef4: ea000000 b aefc <rtems_string_to_double+0xd4>
aef8: e3a0000a mov r0, #10
}
aefc: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc}
0000af04 <rtems_string_to_float>:
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
af04: e92d40f1 push {r0, r4, r5, r6, r7, lr}
float result;
char *end;
if ( !n )
af08: e2514000 subs r4, r1, #0
rtems_status_code rtems_string_to_float (
const char *s,
float *n,
char **endptr
)
{
af0c: e1a05000 mov r5, r0
af10: e1a07002 mov r7, r2
float result;
char *end;
if ( !n )
af14: 03a00009 moveq r0, #9
af18: 0a000026 beq afb8 <rtems_string_to_float+0xb4>
return RTEMS_INVALID_ADDRESS;
errno = 0;
af1c: eb000b1b bl db90 <__errno>
af20: e3a03000 mov r3, #0
af24: e5803000 str r3, [r0]
*n = 0;
af28: e3a03000 mov r3, #0
af2c: e5843000 str r3, [r4]
result = strtof( s, &end );
af30: e1a00005 mov r0, r5
af34: e1a0100d mov r1, sp
af38: eb00167f bl 1093c <strtof>
if ( endptr )
af3c: e3570000 cmp r7, #0
*endptr = end;
af40: 159d3000 ldrne r3, [sp]
af44: 15873000 strne r3, [r7]
if ( end == s )
af48: e59d3000 ldr r3, [sp]
af4c: e1530005 cmp r3, r5
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtof( s, &end );
af50: e1a06000 mov r6, r0
if ( endptr )
*endptr = end;
if ( end == s )
af54: 03a0000b moveq r0, #11
af58: 0a000016 beq afb8 <rtems_string_to_float+0xb4>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
af5c: eb000b0b bl db90 <__errno>
af60: e5903000 ldr r3, [r0]
af64: e3530022 cmp r3, #34 ; 0x22
af68: 1a00000e bne afa8 <rtems_string_to_float+0xa4>
af6c: e1a00006 mov r0, r6
af70: e3a01000 mov r1, #0
af74: ebffdf67 bl 2d18 <__cmpsf2>
af78: e3500000 cmp r0, #0
af7c: 0a00000c beq afb4 <rtems_string_to_float+0xb0>
af80: e1a00006 mov r0, r6
af84: e59f1030 ldr r1, [pc, #48] ; afbc <rtems_string_to_float+0xb8>
af88: ebffdf5e bl 2d08 <__gesf2>
af8c: e3500000 cmp r0, #0
af90: ca000007 bgt afb4 <rtems_string_to_float+0xb0>
af94: e1a00006 mov r0, r6 <== NOT EXECUTED
af98: e3e01502 mvn r1, #8388608 ; 0x800000 <== NOT EXECUTED
af9c: ebffdf5b bl 2d10 <__lesf2> <== NOT EXECUTED
afa0: e3500000 cmp r0, #0 <== NOT EXECUTED
afa4: ba000002 blt afb4 <rtems_string_to_float+0xb0> <== NOT EXECUTED
(( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF )))
return RTEMS_INVALID_NUMBER;
*n = result;
afa8: e5846000 str r6, [r4]
afac: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
afb0: ea000000 b afb8 <rtems_string_to_float+0xb4>
afb4: e3a0000a mov r0, #10
}
afb8: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
0001c2b0 <rtems_string_to_int>:
const char *s,
int *n,
char **endptr,
int base
)
{
1c2b0: e92d40f1 push {r0, r4, r5, r6, r7, lr}
long result;
char *end;
if ( !n )
1c2b4: e2514000 subs r4, r1, #0
const char *s,
int *n,
char **endptr,
int base
)
{
1c2b8: e1a05000 mov r5, r0
1c2bc: e1a06002 mov r6, r2
1c2c0: e1a07003 mov r7, r3
long result;
char *end;
if ( !n )
1c2c4: 03a00009 moveq r0, #9
1c2c8: 0a00001c beq 1c340 <rtems_string_to_int+0x90>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1c2cc: eb00883d bl 3e3c8 <__errno>
1c2d0: e3a03000 mov r3, #0
1c2d4: e5803000 str r3, [r0]
*n = 0;
result = strtol( s, &end, base );
1c2d8: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
1c2dc: e5843000 str r3, [r4]
result = strtol( s, &end, base );
1c2e0: e1a00005 mov r0, r5
1c2e4: e1a0100d mov r1, sp
1c2e8: eb00a743 bl 45ffc <strtol>
if ( endptr )
1c2ec: e3560000 cmp r6, #0
*endptr = end;
1c2f0: 159d3000 ldrne r3, [sp]
1c2f4: 15863000 strne r3, [r6]
if ( end == s )
1c2f8: e59d3000 ldr r3, [sp]
1c2fc: e1530005 cmp r3, r5
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtol( s, &end, base );
1c300: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
1c304: 03a0000b moveq r0, #11
1c308: 0a00000c beq 1c340 <rtems_string_to_int+0x90>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1c30c: eb00882d bl 3e3c8 <__errno>
1c310: e5903000 ldr r3, [r0]
1c314: e3530022 cmp r3, #34 ; 0x22
1c318: 1a000004 bne 1c330 <rtems_string_to_int+0x80>
1c31c: e3770106 cmn r7, #-2147483647 ; 0x80000001
1c320: 13570000 cmpne r7, #0
1c324: 0a000004 beq 1c33c <rtems_string_to_int+0x8c>
1c328: e3570102 cmp r7, #-2147483648 ; 0x80000000 <== NOT EXECUTED
1c32c: 0a000002 beq 1c33c <rtems_string_to_int+0x8c> <== NOT EXECUTED
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1c330: e5847000 str r7, [r4]
1c334: e3a00000 mov r0, #0
return RTEMS_SUCCESSFUL;
1c338: ea000000 b 1c340 <rtems_string_to_int+0x90>
1c33c: e3a0000a mov r0, #10
}
1c340: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
0001c34c <rtems_string_to_unsigned_char>:
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
1c34c: e92d40f1 push {r0, r4, r5, r6, r7, lr}
unsigned long result;
char *end;
if ( !n )
1c350: e2514000 subs r4, r1, #0
const char *s,
unsigned char *n,
char **endptr,
int base
)
{
1c354: e1a05000 mov r5, r0
1c358: e1a06002 mov r6, r2
1c35c: e1a07003 mov r7, r3
unsigned long result;
char *end;
if ( !n )
1c360: 03a00009 moveq r0, #9
1c364: 0a00001e beq 1c3e4 <rtems_string_to_unsigned_char+0x98>
return RTEMS_INVALID_ADDRESS;
errno = 0;
1c368: eb008816 bl 3e3c8 <__errno>
1c36c: e3a03000 mov r3, #0
1c370: e5803000 str r3, [r0]
*n = 0;
result = strtoul( s, &end, base );
1c374: e1a02007 mov r2, r7
if ( !n )
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
1c378: e5c43000 strb r3, [r4]
result = strtoul( s, &end, base );
1c37c: e1a00005 mov r0, r5
1c380: e1a0100d mov r1, sp
1c384: eb00a839 bl 46470 <strtoul>
if ( endptr )
1c388: e3560000 cmp r6, #0
*endptr = end;
1c38c: 159d3000 ldrne r3, [sp]
1c390: 15863000 strne r3, [r6]
if ( end == s )
1c394: e59d3000 ldr r3, [sp]
1c398: e1530005 cmp r3, r5
return RTEMS_INVALID_ADDRESS;
errno = 0;
*n = 0;
result = strtoul( s, &end, base );
1c39c: e1a07000 mov r7, r0
if ( endptr )
*endptr = end;
if ( end == s )
1c3a0: 03a0000b moveq r0, #11
1c3a4: 0a00000e beq 1c3e4 <rtems_string_to_unsigned_char+0x98>
return RTEMS_NOT_DEFINED;
if ( ( errno == ERANGE ) &&
1c3a8: eb008806 bl 3e3c8 <__errno>
1c3ac: e5903000 ldr r3, [r0]
1c3b0: e3530022 cmp r3, #34 ; 0x22
1c3b4: 1a000002 bne 1c3c4 <rtems_string_to_unsigned_char+0x78>
1c3b8: e2473001 sub r3, r7, #1 <== NOT EXECUTED
1c3bc: e3730003 cmn r3, #3 <== NOT EXECUTED
1c3c0: 8a000006 bhi 1c3e0 <rtems_string_to_unsigned_char+0x94> <== NOT EXECUTED
(( result == 0 ) || ( result == ULONG_MAX )))
return RTEMS_INVALID_NUMBER;
#if (UCHAR_MAX < ULONG_MAX)
if ( result > UCHAR_MAX ) {
1c3c4: e35700ff cmp r7, #255 ; 0xff
errno = ERANGE;
return RTEMS_INVALID_NUMBER;
}
#endif
*n = result;
1c3c8: 95c47000 strbls r7, [r4]
1c3cc: 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 ) {
1c3d0: 9a000003 bls 1c3e4 <rtems_string_to_unsigned_char+0x98>
errno = ERANGE;
1c3d4: eb0087fb bl 3e3c8 <__errno> <== NOT EXECUTED
1c3d8: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED
1c3dc: e5803000 str r3, [r0] <== NOT EXECUTED
1c3e0: e3a0000a mov r0, #10 <== NOT EXECUTED
#endif
*n = result;
return RTEMS_SUCCESSFUL;
}
1c3e4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
000042c4 <rtems_termios_baud_to_index>:
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
42c4: e3500009 cmp r0, #9
42c8: 012fff1e bxeq lr
42cc: ca000016 bgt 432c <rtems_termios_baud_to_index+0x68>
42d0: e3500004 cmp r0, #4
42d4: 012fff1e bxeq lr
42d8: ca00000a bgt 4308 <rtems_termios_baud_to_index+0x44>
42dc: e3500001 cmp r0, #1
42e0: 012fff1e bxeq lr
42e4: ca000002 bgt 42f4 <rtems_termios_baud_to_index+0x30>
42e8: e3500000 cmp r0, #0
42ec: 012fff1e bxeq lr
42f0: ea000030 b 43b8 <rtems_termios_baud_to_index+0xf4>
42f4: e3500002 cmp r0, #2 <== NOT EXECUTED
42f8: 012fff1e bxeq lr <== NOT EXECUTED
42fc: e3500003 cmp r0, #3 <== NOT EXECUTED
4300: 1a00002c bne 43b8 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
4304: e12fff1e bx lr <== NOT EXECUTED
4308: e3500006 cmp r0, #6 <== NOT EXECUTED
430c: 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;
4310: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4314: b12fff1e bxlt lr <== NOT EXECUTED
4318: e3500007 cmp r0, #7 <== NOT EXECUTED
431c: 012fff1e bxeq lr <== NOT EXECUTED
4320: e3500008 cmp r0, #8 <== NOT EXECUTED
4324: 1a000023 bne 43b8 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
4328: e12fff1e bx lr <== NOT EXECUTED
432c: e350000e cmp r0, #14 <== NOT EXECUTED
4330: 012fff1e bxeq lr <== NOT EXECUTED
4334: ca000008 bgt 435c <rtems_termios_baud_to_index+0x98> <== NOT EXECUTED
4338: e350000b cmp r0, #11 <== NOT EXECUTED
433c: 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;
4340: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4344: b12fff1e bxlt lr <== NOT EXECUTED
4348: e350000c cmp r0, #12 <== NOT EXECUTED
434c: 012fff1e bxeq lr <== NOT EXECUTED
4350: e350000d cmp r0, #13 <== NOT EXECUTED
4354: 1a000017 bne 43b8 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
4358: e12fff1e bx lr <== NOT EXECUTED
435c: e59f305c ldr r3, [pc, #92] ; 43c0 <rtems_termios_baud_to_index+0xfc><== NOT EXECUTED
4360: 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;
4364: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4368: 012fff1e bxeq lr <== NOT EXECUTED
436c: ca000005 bgt 4388 <rtems_termios_baud_to_index+0xc4> <== NOT EXECUTED
4370: e350000f cmp r0, #15 <== NOT EXECUTED
4374: 012fff1e bxeq lr <== NOT EXECUTED
4378: e2433001 sub r3, r3, #1 <== NOT EXECUTED
437c: e1500003 cmp r0, r3 <== NOT EXECUTED
4380: 1a00000c bne 43b8 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
4384: ea000007 b 43a8 <rtems_termios_baud_to_index+0xe4> <== NOT EXECUTED
4388: e59f3034 ldr r3, [pc, #52] ; 43c4 <rtems_termios_baud_to_index+0x100><== NOT EXECUTED
438c: 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;
4390: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud
)
{
int baud_index;
switch (termios_baud) {
4394: 012fff1e bxeq lr <== NOT EXECUTED
4398: e2833001 add r3, r3, #1 <== NOT EXECUTED
439c: e1500003 cmp r0, r3 <== NOT EXECUTED
43a0: 1a000004 bne 43b8 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED
43a4: ea000001 b 43b0 <rtems_termios_baud_to_index+0xec> <== 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;
43a8: e3a00010 mov r0, #16 <== NOT EXECUTED
case B57600: baud_index = 16; break;
43ac: e12fff1e bx lr <== NOT EXECUTED
case B115200: baud_index = 17; break;
case B230400: baud_index = 18; break;
43b0: e3a00013 mov r0, #19 <== NOT EXECUTED
case B460800: baud_index = 19; break;
43b4: e12fff1e bx lr <== NOT EXECUTED
43b8: e3e00000 mvn r0, #0
default: baud_index = -1; break;
}
return baud_index;
}
43bc: e12fff1e bx lr
00002e0c <rtems_termios_bufsize>:
int cbufsize,
int raw_input,
int raw_output
)
{
rtems_termios_cbufsize = cbufsize;
2e0c: e59f3008 ldr r3, [pc, #8] ; 2e1c <rtems_termios_bufsize+0x10><== NOT EXECUTED
2e10: 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;
}
2e14: e3a00000 mov r0, #0 <== NOT EXECUTED
2e18: e12fff1e bx lr <== NOT EXECUTED
00004204 <rtems_termios_close>:
{
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);
4204: e59f2180 ldr r2, [pc, #384] ; 438c <rtems_termios_close+0x188>
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4208: e5903000 ldr r3, [r0]
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
420c: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_close (void *arg)
{
4210: e92d4030 push {r4, r5, lr}
4214: e1a05000 mov r5, 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);
4218: e5920000 ldr r0, [r2]
421c: e1a02001 mov r2, r1
rtems_status_code
rtems_termios_close (void *arg)
{
rtems_libio_open_close_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
4220: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
4224: eb0003dc bl 519c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
4228: e3500000 cmp r0, #0
422c: 1a000022 bne 42bc <rtems_termios_close+0xb8>
rtems_fatal_error_occurred (sc);
if (--tty->refcount == 0) {
4230: e5943008 ldr r3, [r4, #8]
4234: e2433001 sub r3, r3, #1
4238: e3530000 cmp r3, #0
423c: e5843008 str r3, [r4, #8]
4240: 1a00004c bne 4378 <rtems_termios_close+0x174>
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
4244: e59420cc ldr r2, [r4, #204] ; 0xcc
4248: e59f3140 ldr r3, [pc, #320] ; 4390 <rtems_termios_close+0x18c>
424c: e0833282 add r3, r3, r2, lsl #5
4250: e5931004 ldr r1, [r3, #4]
4254: e3510000 cmp r1, #0
4258: 0a000003 beq 426c <rtems_termios_close+0x68>
/*
* call discipline-specific close
*/
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
425c: e1a00004 mov r0, r4 <== NOT EXECUTED
4260: e1a0e00f mov lr, pc <== NOT EXECUTED
4264: e12fff11 bx r1 <== NOT EXECUTED
4268: ea000006 b 4288 <rtems_termios_close+0x84> <== NOT EXECUTED
}
else {
/*
* default: just flush output buffer
*/
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
426c: e5940018 ldr r0, [r4, #24]
4270: e1a02001 mov r2, r1
4274: eb0003c8 bl 519c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
4278: e3500000 cmp r0, #0
427c: 1a00000e bne 42bc <rtems_termios_close+0xb8>
rtems_fatal_error_occurred (sc);
}
drainOutput (tty);
4280: e1a00004 mov r0, r4
4284: ebfffe05 bl 3aa0 <drainOutput>
}
if (tty->device.outputUsesInterrupts
4288: e59430b4 ldr r3, [r4, #180] ; 0xb4
428c: e3530002 cmp r3, #2
4290: 1a00000a bne 42c0 <rtems_termios_close+0xbc>
== TERMIOS_TASK_DRIVEN) {
/*
* send "terminate" to I/O tasks
*/
sc = rtems_event_send(
4294: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED
4298: e3a01001 mov r1, #1 <== NOT EXECUTED
429c: eb0002ab bl 4d50 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId,
TERMIOS_RX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
42a0: e3500000 cmp r0, #0 <== NOT EXECUTED
42a4: 1a000004 bne 42bc <rtems_termios_close+0xb8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_event_send(
42a8: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED
42ac: e3a01001 mov r1, #1 <== NOT EXECUTED
42b0: eb0002a6 bl 4d50 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId,
TERMIOS_TX_TERMINATE_EVENT);
if (sc != RTEMS_SUCCESSFUL)
42b4: e3500000 cmp r0, #0 <== NOT EXECUTED
42b8: 0a000000 beq 42c0 <rtems_termios_close+0xbc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
42bc: eb00053a bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
}
if (tty->device.lastClose)
42c0: e594309c ldr r3, [r4, #156] ; 0x9c
42c4: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
42c8: 11a02005 movne r2, r5
42cc: 1284000c addne r0, r4, #12
42d0: 18900003 ldmne r0, {r0, r1}
42d4: 11a0e00f movne lr, pc
42d8: 112fff13 bxne r3
if (tty->forw == NULL) {
42dc: e894000c ldm r4, {r2, r3}
42e0: e3520000 cmp r2, #0
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
}
}
else {
tty->forw->back = tty->back;
42e4: 15823004 strne r3, [r2, #4]
if (sc != RTEMS_SUCCESSFUL)
rtems_fatal_error_occurred (sc);
}
if (tty->device.lastClose)
(*tty->device.lastClose)(tty->major, tty->minor, arg);
if (tty->forw == NULL) {
42e8: 1a000003 bne 42fc <rtems_termios_close+0xf8>
rtems_termios_ttyTail = tty->back;
42ec: e59f10a0 ldr r1, [pc, #160] ; 4394 <rtems_termios_close+0x190>
if ( rtems_termios_ttyTail != NULL ) {
42f0: e3530000 cmp r3, #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;
42f4: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) {
rtems_termios_ttyTail->forw = NULL;
42f8: 15832000 strne r2, [r3]
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
42fc: e5942004 ldr r2, [r4, #4]
4300: e5943000 ldr r3, [r4]
4304: e3520000 cmp r2, #0
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
}
}
else {
tty->back->forw = tty->forw;
4308: 15823000 strne r3, [r2]
}
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
430c: 1a000003 bne 4320 <rtems_termios_close+0x11c>
rtems_termios_ttyHead = tty->forw;
4310: e59f1080 ldr r1, [pc, #128] ; 4398 <rtems_termios_close+0x194>
if ( rtems_termios_ttyHead != NULL ) {
4314: e3530000 cmp r3, #0
}
else {
tty->forw->back = tty->back;
}
if (tty->back == NULL) {
rtems_termios_ttyHead = tty->forw;
4318: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) {
rtems_termios_ttyHead->back = NULL;
431c: 15832004 strne r2, [r3, #4]
}
}
else {
tty->back->forw = tty->forw;
}
rtems_semaphore_delete (tty->isem);
4320: e5940014 ldr r0, [r4, #20]
4324: eb000375 bl 5100 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
4328: e5940018 ldr r0, [r4, #24]
432c: eb000373 bl 5100 <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
4330: e594008c ldr r0, [r4, #140] ; 0x8c
4334: eb000371 bl 5100 <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
4338: e59430a0 ldr r3, [r4, #160] ; 0xa0
433c: e3530000 cmp r3, #0
4340: 0a000002 beq 4350 <rtems_termios_close+0x14c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
4344: e59430b4 ldr r3, [r4, #180] ; 0xb4
4348: e3530002 cmp r3, #2
434c: 1a000001 bne 4358 <rtems_termios_close+0x154>
rtems_semaphore_delete (tty->rawInBuf.Semaphore);
4350: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
4354: eb000369 bl 5100 <rtems_semaphore_delete> <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
4358: e5940058 ldr r0, [r4, #88] ; 0x58
435c: ebfff6db bl 1ed0 <free>
free (tty->rawOutBuf.theBuf);
4360: e594007c ldr r0, [r4, #124] ; 0x7c
4364: ebfff6d9 bl 1ed0 <free>
free (tty->cbuf);
4368: e594001c ldr r0, [r4, #28]
436c: ebfff6d7 bl 1ed0 <free>
free (tty);
4370: e1a00004 mov r0, r4
4374: ebfff6d5 bl 1ed0 <free>
}
rtems_semaphore_release (rtems_termios_ttyMutex);
4378: e59f300c ldr r3, [pc, #12] ; 438c <rtems_termios_close+0x188>
437c: e5930000 ldr r0, [r3]
4380: eb0003cb bl 52b4 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
4384: e3a00000 mov r0, #0
4388: e8bd8030 pop {r4, r5, pc}
00003008 <rtems_termios_dequeue_characters>:
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
3008: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
300c: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
3010: e08c1001 add r1, ip, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3014: 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)
{
3018: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc;
/*
* sum up character count already sent
*/
tty->t_dqlen += len;
301c: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3020: 1a000005 bne 303c <rtems_termios_dequeue_characters+0x34> <== NOT EXECUTED
/*
* send wake up to transmitter task
*/
sc = rtems_event_send(tty->txTaskId,
3024: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED
3028: e1a01002 mov r1, r2 <== NOT EXECUTED
302c: eb000747 bl 4d50 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT);
if (sc != RTEMS_SUCCESSFUL)
3030: e3500000 cmp r0, #0 <== NOT EXECUTED
3034: 0a00000c beq 306c <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3038: eb0009db bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else if (tty->t_line == PPPDISC ) {
303c: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED
3040: e3530005 cmp r3, #5 <== NOT EXECUTED
3044: 1a000006 bne 3064 <rtems_termios_dequeue_characters+0x5c> <== NOT EXECUTED
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
3048: e59f3024 ldr r3, [pc, #36] ; 3074 <rtems_termios_dequeue_characters+0x6c><== NOT EXECUTED
304c: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED
3050: e3530000 cmp r3, #0 <== NOT EXECUTED
3054: 0a000004 beq 306c <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
3058: e1a0e00f mov lr, pc <== NOT EXECUTED
305c: e12fff13 bx r3 <== NOT EXECUTED
3060: ea000001 b 306c <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */
}
else {
return rtems_termios_refill_transmitter(tty);
}
}
3064: 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);
3068: eaffff6f b 2e2c <rtems_termios_refill_transmitter> <== NOT EXECUTED
}
}
306c: e3a00000 mov r0, #0 <== NOT EXECUTED
3070: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00003078 <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)
{
3078: e92d4ff7 push {r0, r1, r2, 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) {
307c: e59f32b8 ldr r3, [pc, #696] ; 333c <rtems_termios_enqueue_raw_characters+0x2c4><== 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)
{
3080: e1a04000 mov r4, r0 <== 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) {
3084: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED
3088: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED
308c: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED
3090: 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)
{
3094: e1a0b001 mov fp, r1 <== 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);
3098: 11a05002 movne r5, r2 <== NOT EXECUTED
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
309c: 11a07003 movne r7, r3 <== 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);
30a0: 13a06000 movne r6, #0 <== 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) {
30a4: 1a00000e bne 30e4 <rtems_termios_enqueue_raw_characters+0x6c><== 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);
30a8: e1a08002 mov r8, r2 <== NOT EXECUTED
30ac: e2843030 add r3, r4, #48 ; 0x30 <== 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,
30b0: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED
30b4: e58d2008 str r2, [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);
30b8: e58d3004 str r3, [sp, #4] <== NOT EXECUTED
30bc: e1a09006 mov r9, r6 <== NOT EXECUTED
30c0: e1a05006 mov r5, r6 <== NOT EXECUTED
30c4: ea000091 b 3310 <rtems_termios_enqueue_raw_characters+0x298><== NOT EXECUTED
rtems_interrupt_level level;
if (rtems_termios_linesw[tty->t_line].l_rint != NULL) {
while (len--) {
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
30c8: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
30cc: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED
30d0: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED
30d4: e1a0e00f mov lr, pc <== NOT EXECUTED
30d8: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED
30dc: e2866001 add r6, r6, #1 <== NOT EXECUTED
30e0: e2455001 sub r5, r5, #1 <== 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--) {
30e4: e3550000 cmp r5, #0 <== NOT EXECUTED
c = *buf++;
rtems_termios_linesw[tty->t_line].l_rint(c,tty);
30e8: e1a01004 mov r1, r4 <== 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--) {
30ec: 1afffff5 bne 30c8 <rtems_termios_enqueue_raw_characters+0x50><== NOT EXECUTED
}
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
30f0: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
30f4: e3530000 cmp r3, #0 <== NOT EXECUTED
30f8: 1a00008c bne 3330 <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED
30fc: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
3100: e3530000 cmp r3, #0 <== NOT EXECUTED
3104: 0a000089 beq 3330 <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
3108: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
310c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
3110: e1a0e00f mov lr, pc <== NOT EXECUTED
3114: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
3118: e3a03001 mov r3, #1 <== NOT EXECUTED
311c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
3120: ea000083 b 3334 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED
while (len--) {
c = *buf++;
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
3124: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3128: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
}
return 0;
}
while (len--) {
c = *buf++;
312c: e7dba006 ldrb sl, [fp, r6] <== NOT EXECUTED
/* FIXME: implement IXANY: any character restarts output */
/* if incoming XON/XOFF controls outgoing stream: */
if (tty->flow_ctrl & FL_MDXON) {
3130: 0a00000f beq 3174 <rtems_termios_enqueue_raw_characters+0xfc><== NOT EXECUTED
/* if received char is V_STOP and V_START (both are equal value) */
if (c == tty->termios.c_cc[VSTOP]) {
3134: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED
3138: e152000a cmp r2, sl <== NOT EXECUTED
313c: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED
3140: 1a000007 bne 3164 <rtems_termios_enqueue_raw_characters+0xec><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
3144: e1530002 cmp r3, r2 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */
/* then toggle "stop output" status */
tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
3148: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
314c: 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;
3150: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
}
else {
/* VSTOP received (other code than VSTART) */
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
3154: 13833010 orrne r3, r3, #16 <== NOT EXECUTED
3158: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
}
}
tty->rawInBufDropped += dropped;
rtems_semaphore_release (tty->rawInBuf.Semaphore);
return dropped;
315c: e3a09001 mov r9, #1 <== NOT EXECUTED
3160: ea000005 b 317c <rtems_termios_enqueue_raw_characters+0x104><== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
3164: e153000a cmp r3, sl <== NOT EXECUTED
/* VSTART received */
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
3168: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
316c: 03c33010 biceq r3, r3, #16 <== NOT EXECUTED
/* stop output */
tty->flow_ctrl |= FL_ORCVXOF;
}
flow_rcv = true;
}
else if (c == tty->termios.c_cc[VSTART]) {
3170: 0afffff8 beq 3158 <rtems_termios_enqueue_raw_characters+0xe0><== NOT EXECUTED
/* restart output */
tty->flow_ctrl &= ~FL_ORCVXOF;
flow_rcv = true;
}
}
if (flow_rcv) {
3174: e3590000 cmp r9, #0 <== NOT EXECUTED
3178: 0a000015 beq 31d4 <rtems_termios_enqueue_raw_characters+0x15c><== NOT EXECUTED
/* restart output according to FL_ORCVXOF flag */
if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) {
317c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3180: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED
3184: e3530020 cmp r3, #32 <== NOT EXECUTED
3188: 1a00005e bne 3308 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
318c: e10f7000 mrs r7, CPSR <== NOT EXECUTED
3190: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED
3194: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
3198: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
319c: 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;
31a0: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
31a4: 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;
31a8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
31ac: 0a000006 beq 31cc <rtems_termios_enqueue_raw_characters+0x154><== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1);
31b0: 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,
31b4: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
31b8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
31bc: e0811003 add r1, r1, r3 <== NOT EXECUTED
31c0: e3a02001 mov r2, #1 <== NOT EXECUTED
31c4: e1a0e00f mov lr, pc <== NOT EXECUTED
31c8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
31cc: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
31d0: ea00004c b 3308 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
else {
newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
31d4: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED
31d8: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
31dc: e2800001 add r0, r0, #1 <== NOT EXECUTED
31e0: eb00535d bl 17f5c <__umodsi3> <== NOT EXECUTED
31e4: e1a07000 mov r7, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
31e8: e10f2000 mrs r2, CPSR <== NOT EXECUTED
31ec: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED
31f0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
31f4: e58d2000 str r2, [sp] <== NOT EXECUTED
/* if chars_in_buffer > highwater */
rtems_interrupt_disable(level);
if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
31f8: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
31fc: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED
3200: e0630000 rsb r0, r3, r0 <== NOT EXECUTED
3204: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
3208: e0800007 add r0, r0, r7 <== NOT EXECUTED
320c: eb005352 bl 17f5c <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
3210: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED
3214: e1500003 cmp r0, r3 <== NOT EXECUTED
3218: 9a000025 bls 32b4 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
321c: 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)
3220: e3130001 tst r3, #1 <== NOT EXECUTED
3224: 1a000022 bne 32b4 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
% tty->rawInBuf.Size)
> tty->highwater) &&
!(tty->flow_ctrl & FL_IREQXOF)) {
/* incoming data stream should be stopped */
tty->flow_ctrl |= FL_IREQXOF;
3228: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
322c: e3833001 orr r3, r3, #1 <== NOT EXECUTED
3230: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
3234: e59f3104 ldr r3, [pc, #260] ; 3340 <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED
3238: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
323c: e0023003 and r3, r2, r3 <== NOT EXECUTED
3240: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED
3244: 1a00000e bne 3284 <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
== (FL_MDXOF ) ){
if ((tty->flow_ctrl & FL_OSTOP) ||
3248: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
324c: e3130020 tst r3, #32 <== NOT EXECUTED
3250: 1a000002 bne 3260 <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
3254: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3258: e3530000 cmp r3, #0 <== NOT EXECUTED
325c: 1a000014 bne 32b4 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
/* if tx is stopped due to XOFF or out of data */
/* call write function here */
tty->flow_ctrl |= FL_ISNTXOF;
3260: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3264: e3833002 orr r3, r3, #2 <== NOT EXECUTED
3268: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
326c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3270: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
3274: e3a02001 mov r2, #1 <== NOT EXECUTED
3278: e1a0e00f mov lr, pc <== NOT EXECUTED
327c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3280: ea00000b b 32b4 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]),
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
3284: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3288: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED
328c: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED
3290: 1a000007 bne 32b4 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
3294: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
3298: 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;
329c: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
32a0: e3530000 cmp r3, #0 <== NOT EXECUTED
1);
}
}
else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
== (FL_MDRTS ) ) {
tty->flow_ctrl |= FL_IRTSOFF;
32a4: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */
if (tty->device.stopRemoteTx != NULL) {
tty->device.stopRemoteTx(tty->minor);
32a8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
32ac: 11a0e00f movne lr, pc <== NOT EXECUTED
32b0: 112fff13 bxne r3 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
32b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED
32b8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
32bc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
32c0: e1570003 cmp r7, r3 <== NOT EXECUTED
dropped++;
32c4: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
}
}
/* reenable interrupts */
rtems_interrupt_enable(level);
if (newTail == tty->rawInBuf.Head) {
32c8: 0a00000e beq 3308 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
32cc: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
32d0: e7c3a007 strb sl, [r3, r7] <== 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 )) {
32d4: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
32d8: e3530000 cmp r3, #0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) {
dropped++;
}
else {
tty->rawInBuf.theBuf[newTail] = c;
tty->rawInBuf.Tail = newTail;
32dc: e5847060 str r7, [r4, #96] ; 0x60 <== NOT EXECUTED
/*
* check to see if rcv wakeup callback was set
*/
if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) {
32e0: 1a000008 bne 3308 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
32e4: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED
32e8: e3530000 cmp r3, #0 <== NOT EXECUTED
32ec: 0a000005 beq 3308 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
32f0: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED
32f4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED
32f8: e1a0e00f mov lr, pc <== NOT EXECUTED
32fc: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
3300: e3a02001 mov r2, #1 <== NOT EXECUTED
3304: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED
3308: e2866001 add r6, r6, #1 <== NOT EXECUTED
330c: e2488001 sub r8, r8, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
return 0;
}
while (len--) {
3310: e3580000 cmp r8, #0 <== NOT EXECUTED
3314: 1affff82 bne 3124 <rtems_termios_enqueue_raw_characters+0xac><== NOT EXECUTED
tty->tty_rcvwakeup = 1;
}
}
}
}
tty->rawInBufDropped += dropped;
3318: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED
331c: e0833005 add r3, r3, r5 <== NOT EXECUTED
3320: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
3324: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED
3328: eb0007e1 bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
332c: ea000000 b 3334 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED
3330: e3a05000 mov r5, #0 <== NOT EXECUTED
}
3334: e1a00005 mov r0, r5 <== NOT EXECUTED
3338: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
00003e5c <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;
3e5c: e5903000 ldr r3, [r0]
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer;
rtems_status_code sc;
args->ioctl_return = 0;
3e60: e3a01000 mov r1, #0
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
3e64: e92d41f0 push {r4, r5, r6, r7, r8, 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;
3e68: 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;
3e6c: e5934034 ldr r4, [r3, #52] ; 0x34
}
}
rtems_status_code
rtems_termios_ioctl (void *arg)
{
3e70: e1a05000 mov r5, 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);
3e74: e1a02001 mov r2, r1
3e78: e5940018 ldr r0, [r4, #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;
3e7c: e5957008 ldr r7, [r5, #8]
rtems_status_code sc;
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3e80: eb0004c5 bl 519c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3e84: e2506000 subs r6, r0, #0
3e88: 1a0000d7 bne 41ec <rtems_termios_ioctl+0x390>
args->ioctl_return = sc;
return sc;
}
switch (args->command) {
3e8c: e5953004 ldr r3, [r5, #4]
3e90: e3530004 cmp r3, #4
3e94: 0a0000ab beq 4148 <rtems_termios_ioctl+0x2ec>
3e98: 8a000005 bhi 3eb4 <rtems_termios_ioctl+0x58>
3e9c: e3530002 cmp r3, #2
3ea0: 0a000029 beq 3f4c <rtems_termios_ioctl+0xf0>
3ea4: 8a0000a0 bhi 412c <rtems_termios_ioctl+0x2d0>
3ea8: e3530001 cmp r3, #1
3eac: 1a000010 bne 3ef4 <rtems_termios_ioctl+0x98>
3eb0: ea00001b b 3f24 <rtems_termios_ioctl+0xc8>
3eb4: e59f233c ldr r2, [pc, #828] ; 41f8 <rtems_termios_ioctl+0x39c><== NOT EXECUTED
3eb8: e1530002 cmp r3, r2 <== NOT EXECUTED
3ebc: 0a0000bd beq 41b8 <rtems_termios_ioctl+0x35c> <== NOT EXECUTED
3ec0: 8a000002 bhi 3ed0 <rtems_termios_ioctl+0x74> <== NOT EXECUTED
3ec4: e3530005 cmp r3, #5 <== NOT EXECUTED
3ec8: 1a000009 bne 3ef4 <rtems_termios_ioctl+0x98> <== NOT EXECUTED
3ecc: ea000099 b 4138 <rtems_termios_ioctl+0x2dc> <== NOT EXECUTED
3ed0: e59f2324 ldr r2, [pc, #804] ; 41fc <rtems_termios_ioctl+0x3a0><== NOT EXECUTED
3ed4: e1530002 cmp r3, r2 <== NOT EXECUTED
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
}
break;
case TIOCGETD:
*(int*)(args->buffer)=tty->t_line;
3ed8: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED
3edc: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED
3ee0: 05832000 streq r2, [r3] <== 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) {
3ee4: 0a0000be beq 41e4 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
3ee8: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED
3eec: e1530002 cmp r3, r2 <== NOT EXECUTED
3ef0: 0a000098 beq 4158 <rtems_termios_ioctl+0x2fc> <== NOT EXECUTED
default:
if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
3ef4: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED
3ef8: e59f3300 ldr r3, [pc, #768] ; 4200 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED
3efc: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
3f00: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED
3f04: e3530000 cmp r3, #0 <== NOT EXECUTED
3f08: 03a0600a moveq r6, #10 <== NOT EXECUTED
3f0c: 0a0000b4 beq 41e4 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
3f10: e1a00004 mov r0, r4 <== NOT EXECUTED
3f14: e1a01005 mov r1, r5 <== NOT EXECUTED
3f18: e1a0e00f mov lr, pc <== NOT EXECUTED
3f1c: e12fff13 bx r3 <== NOT EXECUTED
3f20: ea0000a2 b 41b0 <rtems_termios_ioctl+0x354> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER;
}
break;
case RTEMS_IO_GET_ATTRIBUTES:
*(struct termios *)args->buffer = tty->termios;
3f24: e5957008 ldr r7, [r5, #8]
3f28: e284c030 add ip, r4, #48 ; 0x30
3f2c: e8bc000f ldm ip!, {r0, r1, r2, r3}
3f30: e1a0e007 mov lr, r7
3f34: e8ae000f stmia lr!, {r0, r1, r2, r3}
3f38: e8bc000f ldm ip!, {r0, r1, r2, r3}
3f3c: e8ae000f stmia lr!, {r0, r1, r2, r3}
3f40: e59c3000 ldr r3, [ip]
3f44: e58e3000 str r3, [lr]
break;
3f48: ea0000a5 b 41e4 <rtems_termios_ioctl+0x388>
case RTEMS_IO_SET_ATTRIBUTES:
tty->termios = *(struct termios *)args->buffer;
3f4c: e595e008 ldr lr, [r5, #8]
3f50: e8be000f ldm lr!, {r0, r1, r2, r3}
3f54: e284c030 add ip, r4, #48 ; 0x30
3f58: e8ac000f stmia ip!, {r0, r1, r2, r3}
3f5c: e8be000f ldm lr!, {r0, r1, r2, r3}
3f60: 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) &&
3f64: e59420b8 ldr r2, [r4, #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;
3f68: 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) &&
3f6c: 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;
3f70: 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) &&
3f74: 0a000019 beq 3fe0 <rtems_termios_ioctl+0x184>
3f78: e5943030 ldr r3, [r4, #48] ; 0x30
3f7c: e3130b01 tst r3, #1024 ; 0x400
3f80: 1a000016 bne 3fe0 <rtems_termios_ioctl+0x184>
!(tty->termios.c_iflag & IXON)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
3f84: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3f88: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED
3f8c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */
if (tty->flow_ctrl & FL_OSTOP) {
3f90: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3f94: e3130020 tst r3, #32 <== NOT EXECUTED
3f98: 0a000010 beq 3fe0 <rtems_termios_ioctl+0x184> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
3f9c: e10f7000 mrs r7, CPSR <== NOT EXECUTED
3fa0: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED
3fa4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */
rtems_interrupt_disable(level);
tty->flow_ctrl &= ~FL_OSTOP;
3fa8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3fac: e5942094 ldr r2, [r4, #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;
3fb0: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3fb4: 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;
3fb8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */
if (tty->rawOutBufState != rob_idle) {
3fbc: 0a000006 beq 3fdc <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* if chars available, call write function... */
(*tty->device.write)(tty->minor,
&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3fc0: 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,
3fc4: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3fc8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3fcc: e0811003 add r1, r1, r3 <== NOT EXECUTED
3fd0: e3a02001 mov r2, #1 <== NOT EXECUTED
3fd4: e1a0e00f mov lr, pc <== NOT EXECUTED
3fd8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3fdc: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED
/* reenable interrupts */
rtems_interrupt_enable(level);
}
}
/* check for incoming XON/XOFF flow control switched off */
if (( tty->flow_ctrl & FL_MDXOF) &&
3fe0: e59430b8 ldr r3, [r4, #184] ; 0xb8
3fe4: e3130b01 tst r3, #1024 ; 0x400
3fe8: 0a000008 beq 4010 <rtems_termios_ioctl+0x1b4>
3fec: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED
3ff0: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED
3ff4: 1a000005 bne 4010 <rtems_termios_ioctl+0x1b4> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDXOF);
3ff8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3ffc: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED
4000: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* FIXME: what happens, if we had sent XOFF but not yet XON? */
tty->flow_ctrl &= ~(FL_ISNTXOF);
4004: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4008: e3c33002 bic r3, r3, #2 <== NOT EXECUTED
400c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
}
/* check for incoming RTS/CTS flow control switched off */
if (( tty->flow_ctrl & FL_MDRTS) &&
4010: e59430b8 ldr r3, [r4, #184] ; 0xb8
4014: e3130c01 tst r3, #256 ; 0x100
4018: 0a000010 beq 4060 <rtems_termios_ioctl+0x204>
401c: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED
4020: e3530000 cmp r3, #0 <== NOT EXECUTED
4024: ba00000d blt 4060 <rtems_termios_ioctl+0x204> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) {
/* clear related flags in flow_ctrl */
tty->flow_ctrl &= ~(FL_MDRTS);
4028: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
402c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED
4030: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */
if ((tty->flow_ctrl & FL_IRTSOFF) &&
4034: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4038: e3130004 tst r3, #4 <== NOT EXECUTED
403c: 0a000004 beq 4054 <rtems_termios_ioctl+0x1f8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
4040: e59430b0 ldr r3, [r4, #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) &&
4044: e3530000 cmp r3, #0 <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
tty->device.startRemoteTx(tty->minor);
4048: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
404c: 11a0e00f movne lr, pc <== NOT EXECUTED
4050: 112fff13 bxne r3 <== NOT EXECUTED
}
tty->flow_ctrl &= ~(FL_IRTSOFF);
4054: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
4058: e3c33004 bic r3, r3, #4 <== NOT EXECUTED
405c: e58430b8 str r3, [r4, #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) {
4060: e5943038 ldr r3, [r4, #56] ; 0x38
4064: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
4068: b59430b8 ldrlt r3, [r4, #184] ; 0xb8
406c: b3833c01 orrlt r3, r3, #256 ; 0x100
4070: b58430b8 strlt r3, [r4, #184] ; 0xb8
}
/* check for incoming XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXOFF) {
4074: e5943030 ldr r3, [r4, #48] ; 0x30
4078: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
407c: 159430b8 ldrne r3, [r4, #184] ; 0xb8
4080: 13833b01 orrne r3, r3, #1024 ; 0x400
4084: 158430b8 strne r3, [r4, #184] ; 0xb8
}
/* check for outgoing XON/XOF flow control switched on */
if (tty->termios.c_iflag & IXON) {
4088: e5943030 ldr r3, [r4, #48] ; 0x30
408c: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
4090: 159430b8 ldrne r3, [r4, #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) {
4094: e594703c ldr r7, [r4, #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;
4098: 13833c02 orrne r3, r3, #512 ; 0x200
409c: 158430b8 strne r3, [r4, #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) {
40a0: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
40a4: 13a03000 movne r3, #0
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) {
40a8: 1a000014 bne 4100 <rtems_termios_ioctl+0x2a4>
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;
40ac: e5d48046 ldrb r8, [r4, #70] ; 0x46
40b0: eb0002a5 bl 4b4c <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] *
40b4: e3a0100a mov r1, #10
40b8: e0000098 mul r0, r8, r0
40bc: eb004f12 bl 17d0c <__aeabi_uidiv>
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
40c0: e5d43046 ldrb r3, [r4, #70] ; 0x46
40c4: e3530000 cmp r3, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->vtimeTicks = tty->termios.c_cc[VTIME] *
40c8: e5840054 str r0, [r4, #84] ; 0x54
40cc: e5d42047 ldrb r2, [r4, #71] ; 0x47
rtems_clock_get_ticks_per_second() / 10;
if (tty->termios.c_cc[VTIME]) {
40d0: 0a000006 beq 40f0 <rtems_termios_ioctl+0x294>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
40d4: e3520000 cmp r2, #0 <== NOT EXECUTED
40d8: 01a02000 moveq r2, r0 <== NOT EXECUTED
40dc: 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;
40e0: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks;
if (tty->termios.c_cc[VMIN])
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
40e4: e5842074 str r2, [r4, #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;
40e8: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED
40ec: ea000006 b 410c <rtems_termios_ioctl+0x2b0> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
40f0: e3520000 cmp r2, #0
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
}
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
40f4: 03a03001 moveq r3, #1
40f8: 0584306c streq r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
40fc: 0a000002 beq 410c <rtems_termios_ioctl+0x2b0>
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
4100: e5843074 str r3, [r4, #116] ; 0x74
else
tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks;
}
else {
if (tty->termios.c_cc[VMIN]) {
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
4104: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
4108: e5843070 str r3, [r4, #112] ; 0x70
else {
tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
}
}
}
if (tty->device.setAttributes)
410c: e59430a8 ldr r3, [r4, #168] ; 0xa8
4110: e3530000 cmp r3, #0
4114: 0a000032 beq 41e4 <rtems_termios_ioctl+0x388>
(*tty->device.setAttributes)(tty->minor, &tty->termios);
4118: e5940010 ldr r0, [r4, #16]
411c: e2841030 add r1, r4, #48 ; 0x30
4120: e1a0e00f mov lr, pc
4124: e12fff13 bx r3
4128: ea00002d b 41e4 <rtems_termios_ioctl+0x388>
break;
case RTEMS_IO_TCDRAIN:
drainOutput (tty);
412c: e1a00004 mov r0, r4
4130: ebfffe5a bl 3aa0 <drainOutput>
break;
4134: ea00002a b 41e4 <rtems_termios_ioctl+0x388>
case RTEMS_IO_SNDWAKEUP:
tty->tty_snd = *wakeup;
4138: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
413c: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED
4140: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED
break;
4144: ea000026 b 41e4 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP:
tty->tty_rcv = *wakeup;
4148: e897000c ldm r7, {r2, r3} <== NOT EXECUTED
414c: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED
4150: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED
break;
4154: ea000022 b 41e4 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
#if 1 /* FIXME */
case TIOCSETD:
/*
* close old line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
4158: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED
415c: e59f309c ldr r3, [pc, #156] ; 4200 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED
4160: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED
4164: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED
4168: e3530000 cmp r3, #0 <== NOT EXECUTED
416c: 0a000003 beq 4180 <rtems_termios_ioctl+0x324> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
4170: e1a00004 mov r0, r4 <== NOT EXECUTED
4174: e1a0e00f mov lr, pc <== NOT EXECUTED
4178: e12fff13 bx r3 <== NOT EXECUTED
417c: e1a06000 mov r6, r0 <== NOT EXECUTED
}
tty->t_line=*(int*)(args->buffer);
4180: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED
4184: 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) {
4188: e59f3070 ldr r3, [pc, #112] ; 4200 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED
418c: e7933282 ldr r3, [r3, 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 */
4190: e3a01000 mov r1, #0 <== NOT EXECUTED
/*
* open new line discipline
*/
if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
4194: 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 */
4198: e58410d0 str r1, [r4, #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);
419c: e58420cc str r2, [r4, #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) {
41a0: 0a00000f beq 41e4 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
41a4: e1a00004 mov r0, r4 <== NOT EXECUTED
41a8: e1a0e00f mov lr, pc <== NOT EXECUTED
41ac: e12fff13 bx r3 <== NOT EXECUTED
41b0: e1a06000 mov r6, r0 <== NOT EXECUTED
41b4: ea00000a b 41e4 <rtems_termios_ioctl+0x388> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line;
break;
#endif
case FIONREAD:
{
int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
41b8: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED
41bc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
41c0: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
41c4: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED
41c8: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */
*(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
41cc: e2842020 add r2, r4, #32 <== NOT EXECUTED
41d0: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED
41d4: e0411002 sub r1, r1, r2 <== NOT EXECUTED
41d8: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED
41dc: e0813003 add r3, r1, r3 <== NOT EXECUTED
41e0: e5823000 str r3, [r2] <== NOT EXECUTED
}
break;
}
rtems_semaphore_release (tty->osem);
41e4: e5940018 ldr r0, [r4, #24]
41e8: eb000431 bl 52b4 <rtems_semaphore_release>
args->ioctl_return = sc;
41ec: e585600c str r6, [r5, #12]
return sc;
}
41f0: e1a00006 mov r0, r6
41f4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000439c <rtems_termios_open>:
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
439c: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr}
43a0: e1a08002 mov r8, r2
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
43a4: e59f23e0 ldr r2, [pc, #992] ; 478c <rtems_termios_open+0x3f0>
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43a8: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
43ac: e3a01000 mov r1, #0
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43b0: e1a09000 mov r9, r0
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
43b4: e5920000 ldr r0, [r2]
43b8: e1a02001 mov r2, r1
rtems_device_major_number major,
rtems_device_minor_number minor,
void *arg,
const rtems_termios_callbacks *callbacks
)
{
43bc: e1a0b003 mov fp, r3
struct rtems_termios_tty *tty;
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
43c0: eb000375 bl 519c <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43c4: e2506000 subs r6, r0, #0
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
43c8: 059f33c0 ldreq r3, [pc, #960] ; 4790 <rtems_termios_open+0x3f4>
43cc: 05935000 ldreq r5, [r3]
/*
* See if the device has already been opened
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
43d0: 0a000007 beq 43f4 <rtems_termios_open+0x58>
43d4: ea0000e2 b 4764 <rtems_termios_open+0x3c8> <== NOT EXECUTED
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
if ((tty->major == major) && (tty->minor == minor))
43d8: e595300c ldr r3, [r5, #12]
43dc: e1530009 cmp r3, r9
43e0: 1a000002 bne 43f0 <rtems_termios_open+0x54>
43e4: e5953010 ldr r3, [r5, #16]
43e8: e153000a cmp r3, sl
43ec: 0a0000bb beq 46e0 <rtems_termios_open+0x344>
*/
sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
RTEMS_WAIT, RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
return sc;
for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
43f0: e5955000 ldr r5, [r5]
43f4: e3550000 cmp r5, #0
43f8: 1afffff6 bne 43d8 <rtems_termios_open+0x3c>
43fc: ea0000da b 476c <rtems_termios_open+0x3d0>
return RTEMS_NO_MEMORY;
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
4400: e59f738c ldr r7, [pc, #908] ; 4794 <rtems_termios_open+0x3f8>
4404: e5973004 ldr r3, [r7, #4]
4408: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
440c: e5950064 ldr r0, [r5, #100] ; 0x64
4410: ebfff77a bl 2200 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
4414: e3500000 cmp r0, #0
}
/*
* allocate raw input buffer
*/
tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
4418: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) {
441c: 1a000006 bne 443c <rtems_termios_open+0xa0>
free(tty);
4420: e1a00005 mov r0, r5 <== NOT EXECUTED
4424: ebfff6a9 bl 1ed0 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
4428: e59f335c ldr r3, [pc, #860] ; 478c <rtems_termios_open+0x3f0><== NOT EXECUTED
442c: e5930000 ldr r0, [r3] <== NOT EXECUTED
4430: eb00039f bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
4434: e3a0601a mov r6, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
4438: ea0000c9 b 4764 <rtems_termios_open+0x3c8> <== NOT EXECUTED
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
443c: e5973008 ldr r3, [r7, #8]
4440: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
4444: e5950088 ldr r0, [r5, #136] ; 0x88
4448: ebfff76c bl 2200 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
444c: e3500000 cmp r0, #0
}
/*
* allocate raw output buffer
*/
tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
4450: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) {
4454: 0a000006 beq 4474 <rtems_termios_open+0xd8>
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
4458: e5970000 ldr r0, [r7]
445c: ebfff767 bl 2200 <malloc>
if (tty->cbuf == NULL) {
4460: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY;
}
/*
* allocate cooked buffer
*/
tty->cbuf = malloc (CBUFSIZE);
4464: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) {
4468: 1a000004 bne 4480 <rtems_termios_open+0xe4>
free((void *)(tty->rawOutBuf.theBuf));
446c: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED
4470: ebfff696 bl 1ed0 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
4474: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED
4478: ebfff694 bl 1ed0 <free> <== NOT EXECUTED
447c: eaffffe7 b 4420 <rtems_termios_open+0x84> <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
4480: e59f3308 ldr r3, [pc, #776] ; 4790 <rtems_termios_open+0x3f4>
4484: e5932000 ldr r2, [r3]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
4488: e3a03000 mov r3, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
448c: e3520000 cmp r2, #0
/*
* link tty
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
4490: e885000c stm r5, {r2, r3}
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
4494: 15825004 strne r5, [r2, #4]
return RTEMS_NO_MEMORY;
}
/*
* Initialize wakeup callbacks
*/
tty->tty_snd.sw_pfn = NULL;
4498: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
449c: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
44a0: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
44a4: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
44a8: e58530e4 str r3, [r5, #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)
44ac: e59f32e4 ldr r3, [pc, #740] ; 4798 <rtems_termios_open+0x3fc>
44b0: e5932000 ldr r2, [r3]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44b4: e59f72d8 ldr r7, [pc, #728] ; 4794 <rtems_termios_open+0x3f8>
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)
44b8: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
44bc: 05834000 streq r4, [r3]
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
44c0: e59f22c8 ldr r2, [pc, #712] ; 4790 <rtems_termios_open+0x3f4>
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44c4: e5d7300c ldrb r3, [r7, #12]
44c8: e59f02cc ldr r0, [pc, #716] ; 479c <rtems_termios_open+0x400>
*/
tty->forw = rtems_termios_ttyHead;
tty->back = NULL;
if (rtems_termios_ttyHead != NULL)
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
44cc: e5824000 str r4, [r2]
tty->major = major;
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44d0: e1830000 orr r0, r3, r0
rtems_termios_ttyHead->back = tty;
rtems_termios_ttyHead = tty;
if (rtems_termios_ttyTail == NULL)
rtems_termios_ttyTail = tty;
tty->minor = minor;
44d4: e584a010 str sl, [r4, #16]
tty->major = major;
44d8: e584900c str r9, [r4, #12]
/*
* Set up mutex semaphores
*/
sc = rtems_semaphore_create (
44dc: e284c014 add ip, r4, #20
44e0: e3a03000 mov r3, #0
44e4: e3a01001 mov r1, #1
44e8: e3a02054 mov r2, #84 ; 0x54
44ec: e58dc000 str ip, [sp]
44f0: eb000297 bl 4f54 <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)
44f4: e2503000 subs r3, r0, #0
44f8: 1a000095 bne 4754 <rtems_termios_open+0x3b8>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
44fc: e5d7200c ldrb r2, [r7, #12]
4500: e59f0298 ldr r0, [pc, #664] ; 47a0 <rtems_termios_open+0x404>
4504: e284c018 add ip, r4, #24
4508: e1820000 orr r0, r2, r0
450c: e3a01001 mov r1, #1
4510: e3a02054 mov r2, #84 ; 0x54
4514: e58dc000 str ip, [sp]
4518: eb00028d bl 4f54 <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)
451c: e2501000 subs r1, r0, #0
4520: 1a00008b bne 4754 <rtems_termios_open+0x3b8>
rtems_fatal_error_occurred (sc);
sc = rtems_semaphore_create (
4524: e5d7300c ldrb r3, [r7, #12]
4528: e59f0274 ldr r0, [pc, #628] ; 47a4 <rtems_termios_open+0x408>
452c: e284c08c add ip, r4, #140 ; 0x8c
4530: e1830000 orr r0, r3, r0
4534: e3a02020 mov r2, #32
4538: e1a03001 mov r3, r1
453c: e58dc000 str ip, [sp]
4540: eb000283 bl 4f54 <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)
4544: e250e000 subs lr, r0, #0
4548: 1a000081 bne 4754 <rtems_termios_open+0x3b8>
tty->rawOutBufState = rob_idle;
/*
* Set callbacks
*/
tty->device = *callbacks;
454c: e8bb000f ldm fp!, {r0, r1, r2, r3}
4550: e284c098 add ip, r4, #152 ; 0x98
4554: e8ac000f stmia ip!, {r0, r1, r2, r3}
4558: e89b000f ldm fp, {r0, r1, r2, r3}
455c: e88c000f stm ip, {r0, r1, r2, r3}
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4560: e59430b4 ldr r3, [r4, #180] ; 0xb4
4564: 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;
4568: e584e094 str lr, [r4, #148] ; 0x94
tty->device = *callbacks;
/*
* Create I/O tasks
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
456c: 1a000017 bne 45d0 <rtems_termios_open+0x234>
sc = rtems_task_create (
4570: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED
4574: e59f022c ldr r0, [pc, #556] ; 47a8 <rtems_termios_open+0x40c><== NOT EXECUTED
4578: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED
457c: e1830000 orr r0, r3, r0 <== NOT EXECUTED
4580: e3a0100a mov r1, #10 <== NOT EXECUTED
4584: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
4588: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
458c: e58de000 str lr, [sp] <== NOT EXECUTED
4590: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
4594: eb00036d bl 5350 <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)
4598: e250e000 subs lr, r0, #0 <== NOT EXECUTED
459c: 1a00006c bne 4754 <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_create (
45a0: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED
45a4: e59f0200 ldr r0, [pc, #512] ; 47ac <rtems_termios_open+0x410><== NOT EXECUTED
45a8: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED
45ac: e1830000 orr r0, r3, r0 <== NOT EXECUTED
45b0: e3a01009 mov r1, #9 <== NOT EXECUTED
45b4: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED
45b8: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED
45bc: e58de000 str lr, [sp] <== NOT EXECUTED
45c0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED
45c4: eb000361 bl 5350 <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)
45c8: e3500000 cmp r0, #0 <== NOT EXECUTED
45cc: 1a000060 bne 4754 <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
}
if ((tty->device.pollRead == NULL) ||
45d0: e59430a0 ldr r3, [r4, #160] ; 0xa0
45d4: e3530000 cmp r3, #0
45d8: 0a000002 beq 45e8 <rtems_termios_open+0x24c>
(tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
45dc: e59430b4 ldr r3, [r4, #180] ; 0xb4
45e0: e3530002 cmp r3, #2
45e4: 1a00000b bne 4618 <rtems_termios_open+0x27c>
sc = rtems_semaphore_create (
45e8: e59f31a4 ldr r3, [pc, #420] ; 4794 <rtems_termios_open+0x3f8><== NOT EXECUTED
45ec: e59f01bc ldr r0, [pc, #444] ; 47b0 <rtems_termios_open+0x414><== NOT EXECUTED
45f0: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED
45f4: e3a01000 mov r1, #0 <== NOT EXECUTED
45f8: e1830000 orr r0, r3, r0 <== NOT EXECUTED
45fc: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED
4600: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED
4604: e1a03001 mov r3, r1 <== NOT EXECUTED
4608: e58dc000 str ip, [sp] <== NOT EXECUTED
460c: eb000250 bl 4f54 <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)
4610: e3500000 cmp r0, #0 <== NOT EXECUTED
4614: 1a00004e bne 4754 <rtems_termios_open+0x3b8> <== NOT EXECUTED
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';
4618: 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;
461c: e58430b8 str r3, [r4, #184] ; 0xb8
/*
* set low/highwater mark for XON/XOFF support
*/
tty->lowwater = tty->rawInBuf.Size * 1/2;
4620: e5941064 ldr r1, [r4, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
4624: e594c064 ldr ip, [r4, #100] ; 0x64
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;
tty->termios.c_cc[VINTR] = '\003';
4628: e3a02003 mov r2, #3
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;
462c: e0000c92 mul r0, r2, ip
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;
tty->termios.c_cc[VINTR] = '\003';
tty->termios.c_cc[VQUIT] = '\034';
4630: e3a0c01c mov ip, #28
4634: e5c4c042 strb ip, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
4638: e28cc063 add ip, ip, #99 ; 0x63
463c: e5c4c043 strb ip, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
4640: e3a0c015 mov ip, #21
4644: e5c4c044 strb ip, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
4648: e3a0c004 mov ip, #4
464c: e5c4c045 strb ip, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000';
tty->termios.c_cc[VEOL2] = '\000';
tty->termios.c_cc[VSTART] = '\021';
4650: e28cc00d add ip, ip, #13
4654: e5c4c049 strb ip, [r4, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
4658: e28cc002 add ip, ip, #2
465c: e5c4c04a strb ip, [r4, #74] ; 0x4a
tty->termios.c_cc[VSUSP] = '\032';
4660: e28cc007 add ip, ip, #7
4664: e5c4c04b strb ip, [r4, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
4668: e3a0c012 mov ip, #18
466c: e5c4c04d strb ip, [r4, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
4670: e3a0c00f mov ip, #15
4674: e5c4c04e strb ip, [r4, #78] ; 0x4e
tty->termios.c_cc[VWERASE] = '\027';
4678: e28cc008 add ip, ip, #8
467c: e5c4c04f strb ip, [r4, #79] ; 0x4f
tty->termios.c_cc[VLNEXT] = '\026';
4680: e3a0c016 mov ip, #22
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';
4684: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
4688: e5c43051 strb r3, [r4, #81] ; 0x51
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';
468c: e5c4c050 strb ip, [r4, #80] ; 0x50
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;
tty->termios.c_cc[VINTR] = '\003';
4690: e5c42041 strb r2, [r4, #65] ; 0x41
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
4694: e59f30f8 ldr r3, [pc, #248] ; 4794 <rtems_termios_open+0x3f8>
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;
4698: e1a00120 lsr r0, r0, #2
/*
* Bump name characer
*/
if (c++ == 'z')
469c: e5d3200c ldrb r2, [r3, #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;
46a0: e58400c0 str r0, [r4, #192] ; 0xc0
}
/*
* Set default parameters
*/
tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
46a4: e59f0108 ldr r0, [pc, #264] ; 47b4 <rtems_termios_open+0x418>
46a8: e5840030 str r0, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
46ac: e59f0104 ldr r0, [pc, #260] ; 47b8 <rtems_termios_open+0x41c>
46b0: e5840034 str r0, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
46b4: e59f0100 ldr r0, [pc, #256] ; 47bc <rtems_termios_open+0x420>
46b8: e5840038 str r0, [r4, #56] ; 0x38
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
46bc: e59f00fc ldr r0, [pc, #252] ; 47c0 <rtems_termios_open+0x424>
tty->lowwater = tty->rawInBuf.Size * 1/2;
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
46c0: e352007a cmp r2, #122 ; 0x7a
/* 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;
46c4: e1a010a1 lsr r1, r1, #1
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
46c8: e2822001 add r2, r2, #1
* 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;
46cc: e584003c str r0, [r4, #60] ; 0x3c
/* 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;
46d0: e58410bc str r1, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4;
/*
* Bump name characer
*/
if (c++ == 'z')
46d4: e5c3200c strb r2, [r3, #12]
c = 'a';
46d8: 03a02061 moveq r2, #97 ; 0x61
46dc: 05c3200c strbeq r2, [r3, #12]
}
args->iop->data1 = tty;
if (!tty->refcount++) {
46e0: e5953008 ldr r3, [r5, #8]
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
46e4: e5982000 ldr r2, [r8]
if (!tty->refcount++) {
46e8: e3530000 cmp r3, #0
46ec: e2833001 add r3, r3, #1
*/
if (c++ == 'z')
c = 'a';
}
args->iop->data1 = tty;
46f0: e5825034 str r5, [r2, #52] ; 0x34
if (!tty->refcount++) {
46f4: e5853008 str r3, [r5, #8]
46f8: 1a000016 bne 4758 <rtems_termios_open+0x3bc>
if (tty->device.firstOpen)
46fc: e5953098 ldr r3, [r5, #152] ; 0x98
4700: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
4704: 11a00009 movne r0, r9
4708: 11a0100a movne r1, sl
470c: 11a02008 movne r2, r8
4710: 11a0e00f movne lr, pc
4714: 112fff13 bxne r3
/*
* start I/O tasks, if needed
*/
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
4718: e59530b4 ldr r3, [r5, #180] ; 0xb4
471c: e3530002 cmp r3, #2
4720: 1a00000c bne 4758 <rtems_termios_open+0x3bc>
sc = rtems_task_start(tty->rxTaskId,
4724: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED
4728: e59f1094 ldr r1, [pc, #148] ; 47c4 <rtems_termios_open+0x428><== NOT EXECUTED
472c: e1a02005 mov r2, r5 <== NOT EXECUTED
4730: eb0003ab bl 55e4 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
4734: e3500000 cmp r0, #0 <== NOT EXECUTED
4738: 1a000005 bne 4754 <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
sc = rtems_task_start(tty->txTaskId,
473c: e1a02005 mov r2, r5 <== NOT EXECUTED
4740: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED
4744: e59f107c ldr r1, [pc, #124] ; 47c8 <rtems_termios_open+0x42c><== NOT EXECUTED
4748: eb0003a5 bl 55e4 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon,
(rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)
474c: e3500000 cmp r0, #0 <== NOT EXECUTED
4750: 0a000000 beq 4758 <rtems_termios_open+0x3bc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
4754: eb000414 bl 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
}
}
rtems_semaphore_release (rtems_termios_ttyMutex);
4758: e59f302c ldr r3, [pc, #44] ; 478c <rtems_termios_open+0x3f0>
475c: e5930000 ldr r0, [r3]
4760: eb0002d3 bl 52b4 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL;
}
4764: e1a00006 mov r0, r6
4768: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
476c: e3a00001 mov r0, #1
4770: e3a010e8 mov r1, #232 ; 0xe8
4774: ebfff54d bl 1cb0 <calloc>
if (tty == NULL) {
4778: e3500000 cmp r0, #0
static char c = 'a';
/*
* Create a new device
*/
tty = calloc (1, sizeof (struct rtems_termios_tty));
477c: e1a05000 mov r5, r0
4780: e1a04000 mov r4, r0
if (tty == NULL) {
4784: 1affff1d bne 4400 <rtems_termios_open+0x64>
4788: eaffff26 b 4428 <rtems_termios_open+0x8c> <== NOT EXECUTED
00003344 <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) {
3344: e59230b4 ldr r3, [r2, #180] ; 0xb4
3348: e3530000 cmp r3, #0
* Send characters to device-specific code
*/
void
rtems_termios_puts (
const void *_buf, int len, struct rtems_termios_tty *tty)
{
334c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
3350: e1a04002 mov r4, r2
3354: e1a0a000 mov sl, r0
3358: e1a06001 mov r6, r1
const unsigned char *buf = _buf;
unsigned int newHead;
rtems_interrupt_level level;
rtems_status_code sc;
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
335c: 1a000005 bne 3378 <rtems_termios_puts+0x34>
(*tty->device.write)(tty->minor, (void *)buf, len);
3360: e1a01000 mov r1, r0
3364: e1a02006 mov r2, r6
3368: e5940010 ldr r0, [r4, #16]
336c: e1a0e00f mov lr, pc
3370: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
3374: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
}
newHead = tty->rawOutBuf.Head;
3378: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED
337c: e3a07000 mov r7, #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;
3380: e3a09002 mov r9, #2 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
3384: e3a0b001 mov fp, #1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
3388: ea00002b b 343c <rtems_termios_puts+0xf8> <== NOT EXECUTED
* len -= ncopy
*
* To minimize latency, the memcpy should be done
* with interrupts enabled.
*/
newHead = (newHead + 1) % tty->rawOutBuf.Size;
338c: e2850001 add r0, r5, #1 <== NOT EXECUTED
3390: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
3394: eb0052f0 bl 17f5c <__umodsi3> <== NOT EXECUTED
3398: e1a05000 mov r5, r0 <== NOT EXECUTED
339c: ea000007 b 33c0 <rtems_termios_puts+0x7c> <== NOT EXECUTED
rtems_interrupt_disable (level);
while (newHead == tty->rawOutBuf.Tail) {
tty->rawOutBufState = rob_wait;
33a0: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED
33a4: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
rtems_interrupt_enable (level);
sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
33a8: e3a01000 mov r1, #0 <== NOT EXECUTED
33ac: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED
33b0: e1a02001 mov r2, r1 <== NOT EXECUTED
33b4: eb000778 bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT,
RTEMS_NO_TIMEOUT);
if (sc != RTEMS_SUCCESSFUL)
33b8: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
33bc: 1b0008fa blne 57ac <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
33c0: e10f8000 mrs r8, CPSR <== NOT EXECUTED
33c4: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED
33c8: 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) {
33cc: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
33d0: e1550003 cmp r5, r3 <== NOT EXECUTED
33d4: 0afffff1 beq 33a0 <rtems_termios_puts+0x5c> <== 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++;
33d8: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
33dc: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED
33e0: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED
33e4: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead;
if (tty->rawOutBufState == rob_idle) {
33e8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
33ec: 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;
33f0: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
33f4: 1a00000d bne 3430 <rtems_termios_puts+0xec> <== NOT EXECUTED
/* check, whether XOFF has been received */
if (!(tty->flow_ctrl & FL_ORCVXOF)) {
33f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
33fc: e3130010 tst r3, #16 <== 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;
3400: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3404: 13833020 orrne r3, r3, #32 <== NOT EXECUTED
3408: 158430b8 strne r3, [r4, #184] ; 0xb8 <== 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)) {
340c: 1a000006 bne 342c <rtems_termios_puts+0xe8> <== NOT EXECUTED
(*tty->device.write)(tty->minor,
(char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3410: 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,
3414: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED
3418: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
341c: e0811003 add r1, r1, r3 <== NOT EXECUTED
3420: e3a02001 mov r2, #1 <== NOT EXECUTED
3424: e1a0e00f mov lr, pc <== NOT EXECUTED
3428: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
}
else {
/* remember that output has been stopped due to flow ctrl*/
tty->flow_ctrl |= FL_OSTOP;
}
tty->rawOutBufState = rob_busy;
342c: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
3430: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
}
rtems_interrupt_enable (level);
len--;
3434: e2466001 sub r6, r6, #1 <== NOT EXECUTED
3438: e2877001 add r7, r7, #1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) {
(*tty->device.write)(tty->minor, (void *)buf, len);
return;
}
newHead = tty->rawOutBuf.Head;
while (len) {
343c: e3560000 cmp r6, #0 <== NOT EXECUTED
3440: 1affffd1 bne 338c <rtems_termios_puts+0x48> <== NOT EXECUTED
3444: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00003b0c <rtems_termios_read>:
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3b0c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3b10: e5903000 ldr r3, [r0]
return RTEMS_SUCCESSFUL;
}
rtems_status_code
rtems_termios_read (void *arg)
{
3b14: e1a05000 mov r5, r0
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
3b18: 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);
3b1c: 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;
3b20: e595300c ldr r3, [r5, #12]
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3b24: e5940014 ldr r0, [r4, #20]
3b28: 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;
3b2c: e5957010 ldr r7, [r5, #16]
char *buffer = args->buffer;
3b30: e58d3000 str r3, [sp]
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3b34: eb000598 bl 519c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3b38: e2506000 subs r6, r0, #0
3b3c: 1a0000c1 bne 3e48 <rtems_termios_read+0x33c>
return sc;
if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
3b40: e59420cc ldr r2, [r4, #204] ; 0xcc
3b44: e59f3304 ldr r3, [pc, #772] ; 3e50 <rtems_termios_read+0x344>
3b48: e0833282 add r3, r3, r2, lsl #5
3b4c: e5933008 ldr r3, [r3, #8]
3b50: e3530000 cmp r3, #0
3b54: 0a000005 beq 3b70 <rtems_termios_read+0x64>
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3b58: e1a01005 mov r1, r5 <== NOT EXECUTED
3b5c: e1a00004 mov r0, r4 <== NOT EXECUTED
3b60: e1a0e00f mov lr, pc <== NOT EXECUTED
3b64: e12fff13 bx r3 <== NOT EXECUTED
3b68: e1a06000 mov r6, r0 <== NOT EXECUTED
3b6c: ea0000b1 b 3e38 <rtems_termios_read+0x32c> <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
3b70: e5942024 ldr r2, [r4, #36] ; 0x24
3b74: e5943020 ldr r3, [r4, #32]
3b78: e1520003 cmp r2, r3
3b7c: 1a00009a bne 3dec <rtems_termios_read+0x2e0>
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
3b80: e59420a0 ldr r2, [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;
3b84: e5943028 ldr r3, [r4, #40] ; 0x28
if (tty->device.pollRead != NULL
3b88: e3520000 cmp r2, #0
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
tty->read_start_column = tty->column;
3b8c: e584302c str r3, [r4, #44] ; 0x2c
tty->tty_rcvwakeup = 0;
rtems_semaphore_release (tty->isem);
return sc;
}
if (tty->cindex == tty->ccount) {
tty->cindex = tty->ccount = 0;
3b90: e5846020 str r6, [r4, #32]
3b94: e5846024 str r6, [r4, #36] ; 0x24
tty->read_start_column = tty->column;
if (tty->device.pollRead != NULL
3b98: 0a00003b beq 3c8c <rtems_termios_read+0x180>
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
3b9c: e59430b4 ldr r3, [r4, #180] ; 0xb4
3ba0: e3530000 cmp r3, #0
3ba4: 1a000038 bne 3c8c <rtems_termios_read+0x180>
static rtems_status_code
fillBufferPoll (struct rtems_termios_tty *tty)
{
int n;
if (tty->termios.c_lflag & ICANON) {
3ba8: e594303c ldr r3, [r4, #60] ; 0x3c
3bac: e3130002 tst r3, #2
3bb0: 0a00000d beq 3bec <rtems_termios_read+0xe0>
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
3bb4: e5940010 ldr r0, [r4, #16]
3bb8: e1a0e00f mov lr, pc
3bbc: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
3bc0: e3500000 cmp r0, #0
rtems_task_wake_after (1);
}
else {
if (siproc (n, tty))
3bc4: e1a01004 mov r1, r4
3bc8: e20000ff and r0, r0, #255 ; 0xff
int n;
if (tty->termios.c_lflag & ICANON) {
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
if (n < 0) {
3bcc: aa000002 bge 3bdc <rtems_termios_read+0xd0>
rtems_task_wake_after (1);
3bd0: e3a00001 mov r0, #1
3bd4: eb00069a bl 5644 <rtems_task_wake_after>
3bd8: eafffff5 b 3bb4 <rtems_termios_read+0xa8>
}
else {
if (siproc (n, tty))
3bdc: ebffff67 bl 3980 <siproc> <== NOT EXECUTED
3be0: e3500000 cmp r0, #0 <== NOT EXECUTED
3be4: 0afffff2 beq 3bb4 <rtems_termios_read+0xa8> <== NOT EXECUTED
3be8: ea00007f b 3dec <rtems_termios_read+0x2e0> <== NOT EXECUTED
}
}
}
else {
rtems_interval then, now;
then = rtems_clock_get_ticks_since_boot();
3bec: eb0003de bl 4b6c <rtems_clock_get_ticks_since_boot>
3bf0: e1a08000 mov r8, r0
for (;;) {
n = (*tty->device.pollRead)(tty->minor);
3bf4: e5940010 ldr r0, [r4, #16]
3bf8: e1a0e00f mov lr, pc
3bfc: e594f0a0 ldr pc, [r4, #160] ; 0xa0
if (n < 0) {
3c00: e3500000 cmp r0, #0
3c04: aa000013 bge 3c58 <rtems_termios_read+0x14c>
if (tty->termios.c_cc[VMIN]) {
3c08: e5d43047 ldrb r3, [r4, #71] ; 0x47
3c0c: e3530000 cmp r3, #0
3c10: e5d43046 ldrb r3, [r4, #70] ; 0x46
3c14: 0a000005 beq 3c30 <rtems_termios_read+0x124>
if (tty->termios.c_cc[VTIME] && tty->ccount) {
3c18: e3530000 cmp r3, #0
3c1c: 0a00000a beq 3c4c <rtems_termios_read+0x140>
3c20: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED
3c24: e3530000 cmp r3, #0 <== NOT EXECUTED
3c28: 0a000007 beq 3c4c <rtems_termios_read+0x140> <== NOT EXECUTED
3c2c: ea000001 b 3c38 <rtems_termios_read+0x12c> <== NOT EXECUTED
break;
}
}
}
else {
if (!tty->termios.c_cc[VTIME])
3c30: e3530000 cmp r3, #0 <== NOT EXECUTED
3c34: 0a00006c beq 3dec <rtems_termios_read+0x2e0> <== NOT EXECUTED
break;
now = rtems_clock_get_ticks_since_boot();
3c38: eb0003cb bl 4b6c <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
3c3c: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED
3c40: e0680000 rsb r0, r8, r0 <== NOT EXECUTED
3c44: e1500003 cmp r0, r3 <== NOT EXECUTED
3c48: 8a000067 bhi 3dec <rtems_termios_read+0x2e0> <== NOT EXECUTED
break;
}
}
rtems_task_wake_after (1);
3c4c: e3a00001 mov r0, #1
3c50: eb00067b bl 5644 <rtems_task_wake_after>
3c54: eaffffe6 b 3bf4 <rtems_termios_read+0xe8>
}
else {
siproc (n, tty);
3c58: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
3c5c: e1a01004 mov r1, r4 <== NOT EXECUTED
3c60: ebffff46 bl 3980 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3c64: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
3c68: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3c6c: e1520003 cmp r2, r3 <== NOT EXECUTED
3c70: aa00005d bge 3dec <rtems_termios_read+0x2e0> <== NOT EXECUTED
break;
if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
3c74: e3530000 cmp r3, #0 <== NOT EXECUTED
3c78: 0affffdd beq 3bf4 <rtems_termios_read+0xe8> <== NOT EXECUTED
3c7c: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED
3c80: e3530000 cmp r3, #0 <== NOT EXECUTED
3c84: 0affffda beq 3bf4 <rtems_termios_read+0xe8> <== NOT EXECUTED
3c88: eaffffd7 b 3bec <rtems_termios_read+0xe0> <== 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;
3c8c: e5948074 ldr r8, [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,
3c90: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED
3c94: e3a0a001 mov sl, #1 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3c98: e59f91b4 ldr r9, [pc, #436] ; 3e54 <rtems_termios_read+0x348><== NOT EXECUTED
3c9c: ea000041 b 3da8 <rtems_termios_read+0x29c> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) {
unsigned char c;
unsigned int newHead;
newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
3ca0: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED
3ca4: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
3ca8: e2800001 add r0, r0, #1 <== NOT EXECUTED
3cac: eb0050aa bl 17f5c <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
3cb0: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
3cb4: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
3cb8: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
3cbc: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
3cc0: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED
3cc4: e0823003 add r3, r2, r3 <== NOT EXECUTED
3cc8: e0600003 rsb r0, r0, r3 <== NOT EXECUTED
3ccc: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED
3cd0: eb0050a1 bl 17f5c <__umodsi3> <== NOT EXECUTED
3cd4: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED
3cd8: e1500003 cmp r0, r3 <== NOT EXECUTED
3cdc: 2a00001f bcs 3d60 <rtems_termios_read+0x254> <== NOT EXECUTED
% tty->rawInBuf.Size)
< tty->lowwater) {
tty->flow_ctrl &= ~FL_IREQXOF;
3ce0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3ce4: e3c33001 bic r3, r3, #1 <== NOT EXECUTED
3ce8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */
if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
3cec: e59f3164 ldr r3, [pc, #356] ; 3e58 <rtems_termios_read+0x34c><== NOT EXECUTED
3cf0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
3cf4: e59f015c ldr r0, [pc, #348] ; 3e58 <rtems_termios_read+0x34c><== NOT EXECUTED
3cf8: e0023003 and r3, r2, r3 <== NOT EXECUTED
3cfc: e1530000 cmp r3, r0 <== NOT EXECUTED
3d00: 1a00000b bne 3d34 <rtems_termios_read+0x228> <== NOT EXECUTED
3d04: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
3d08: e3530000 cmp r3, #0 <== NOT EXECUTED
3d0c: 0a000002 beq 3d1c <rtems_termios_read+0x210> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF))
&& ((tty->rawOutBufState == rob_idle)
|| (tty->flow_ctrl & FL_OSTOP))) {
3d10: 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))
3d14: e3130020 tst r3, #32 <== NOT EXECUTED
3d18: 0a000005 beq 3d34 <rtems_termios_read+0x228> <== 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,
3d1c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
3d20: e1a0100b mov r1, fp <== NOT EXECUTED
3d24: e3a02001 mov r2, #1 <== NOT EXECUTED
3d28: e1a0e00f mov lr, pc <== NOT EXECUTED
3d2c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
3d30: ea00000a b 3d60 <rtems_termios_read+0x254> <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]),
1);
}
else if (tty->flow_ctrl & FL_MDRTS) {
3d34: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
3d38: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED
3d3c: 0a000007 beq 3d60 <rtems_termios_read+0x254> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
3d40: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
3d44: 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;
3d48: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
3d4c: 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;
3d50: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */
if (tty->device.startRemoteTx != NULL) {
tty->device.startRemoteTx(tty->minor);
3d54: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED
3d58: 11a0e00f movne lr, pc <== NOT EXECUTED
3d5c: 112fff13 bxne r3 <== NOT EXECUTED
}
}
}
/* continue processing new character */
if (tty->termios.c_lflag & ICANON) {
3d60: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
3d64: e3130002 tst r3, #2 <== NOT EXECUTED
3d68: 0a000005 beq 3d84 <rtems_termios_read+0x278> <== NOT EXECUTED
if (siproc (c, tty))
3d6c: e1a00008 mov r0, r8 <== NOT EXECUTED
3d70: e1a01004 mov r1, r4 <== NOT EXECUTED
3d74: ebffff01 bl 3980 <siproc> <== NOT EXECUTED
3d78: e3500000 cmp r0, #0 <== NOT EXECUTED
3d7c: 1a000007 bne 3da0 <rtems_termios_read+0x294> <== NOT EXECUTED
3d80: ea000007 b 3da4 <rtems_termios_read+0x298> <== NOT EXECUTED
wait = 0;
}
else {
siproc (c, tty);
3d84: e1a00008 mov r0, r8 <== NOT EXECUTED
3d88: e1a01004 mov r1, r4 <== NOT EXECUTED
3d8c: ebfffefb bl 3980 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3d90: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED
3d94: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3d98: e1520003 cmp r2, r3 <== NOT EXECUTED
3d9c: ba000000 blt 3da4 <rtems_termios_read+0x298> <== NOT EXECUTED
3da0: e3a0a000 mov sl, #0 <== NOT EXECUTED
wait = 0;
}
timeout = tty->rawInBufSemaphoreTimeout;
3da4: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) {
/*
* Process characters read from raw queue
*/
while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3da8: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED
3dac: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
3db0: e1520003 cmp r2, r3 <== NOT EXECUTED
3db4: 0a000004 beq 3dcc <rtems_termios_read+0x2c0> <== NOT EXECUTED
3db8: e5993000 ldr r3, [r9] <== NOT EXECUTED
3dbc: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
3dc0: e2433001 sub r3, r3, #1 <== NOT EXECUTED
3dc4: e1520003 cmp r2, r3 <== NOT EXECUTED
3dc8: baffffb4 blt 3ca0 <rtems_termios_read+0x194> <== NOT EXECUTED
}
/*
* Wait for characters
*/
if ( wait ) {
3dcc: e35a0000 cmp sl, #0 <== NOT EXECUTED
3dd0: 0a000005 beq 3dec <rtems_termios_read+0x2e0> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
3dd4: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED
3dd8: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
3ddc: e1a02008 mov r2, r8 <== NOT EXECUTED
3de0: eb0004ed bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions,
timeout);
if (sc != RTEMS_SUCCESSFUL)
3de4: e3500000 cmp r0, #0 <== NOT EXECUTED
3de8: 0affffee beq 3da8 <rtems_termios_read+0x29c> <== NOT EXECUTED
{
rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout;
rtems_status_code sc;
int wait = (int)1;
while ( wait ) {
3dec: e3a03000 mov r3, #0 <== NOT EXECUTED
3df0: ea000007 b 3e14 <rtems_termios_read+0x308> <== NOT EXECUTED
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
*buffer++ = tty->cbuf[tty->cindex++];
3df4: e594101c ldr r1, [r4, #28] <== NOT EXECUTED
3df8: e59d0000 ldr r0, [sp] <== NOT EXECUTED
3dfc: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED
3e00: e2822001 add r2, r2, #1 <== NOT EXECUTED
3e04: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED
3e08: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
count--;
3e0c: e2477001 sub r7, r7, #1 <== NOT EXECUTED
3e10: e2833001 add r3, r3, #1 <== NOT EXECUTED
else
sc = fillBufferQueue (tty);
if (sc != RTEMS_SUCCESSFUL)
tty->cindex = tty->ccount = 0;
}
while (count && (tty->cindex < tty->ccount)) {
3e14: e3570000 cmp r7, #0 <== NOT EXECUTED
3e18: 0a000003 beq 3e2c <rtems_termios_read+0x320> <== NOT EXECUTED
3e1c: e2841020 add r1, r4, #32 <== NOT EXECUTED
3e20: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED
3e24: e1520001 cmp r2, r1 <== NOT EXECUTED
3e28: bafffff1 blt 3df4 <rtems_termios_read+0x2e8> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++];
count--;
}
args->bytes_moved = args->count - count;
3e2c: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED
3e30: e0677003 rsb r7, r7, r3 <== NOT EXECUTED
3e34: e5857018 str r7, [r5, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3e38: e3a03000 mov r3, #0 <== NOT EXECUTED
3e3c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3e40: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED
3e44: eb00051a bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
return sc;
}
3e48: e1a00006 mov r0, r6 <== NOT EXECUTED
3e4c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00002e2c <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))
2e2c: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED
2e30: e59f31c8 ldr r3, [pc, #456] ; 3000 <rtems_termios_refill_transmitter+0x1d4><== NOT EXECUTED
2e34: e0023003 and r3, r2, r3 <== NOT EXECUTED
2e38: e59f21c4 ldr r2, [pc, #452] ; 3004 <rtems_termios_refill_transmitter+0x1d8><== NOT EXECUTED
2e3c: 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)
{
2e40: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
2e44: 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))
2e48: 1a00000c bne 2e80 <rtems_termios_refill_transmitter+0x54> <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) {
/* XOFF should be sent now... */
(*tty->device.write)(tty->minor,
2e4c: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED
2e50: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED
2e54: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
2e58: e1a0e00f mov lr, pc <== NOT EXECUTED
2e5c: 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 (
2e60: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2e64: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2e68: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2e6c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2e70: 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--;
2e74: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2e78: e3811002 orr r1, r1, #2 <== NOT EXECUTED
2e7c: ea00000f b 2ec0 <rtems_termios_refill_transmitter+0x94> <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
2e80: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED
2e84: e2033003 and r3, r3, #3 <== NOT EXECUTED
2e88: e3530002 cmp r3, #2 <== NOT EXECUTED
2e8c: 1a000010 bne 2ed4 <rtems_termios_refill_transmitter+0xa8> <== 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,
2e90: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED
2e94: e3a02001 mov r2, #1 <== NOT EXECUTED
2e98: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED
2e9c: e1a0e00f mov lr, pc <== NOT EXECUTED
2ea0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
2ea4: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2ea8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2eac: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1);
rtems_interrupt_disable(level);
tty->t_dqlen--;
2eb0: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2eb4: 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--;
2eb8: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2ebc: e3c11002 bic r1, r1, #2 <== NOT EXECUTED
2ec0: 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--;
2ec4: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2ec8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
2ecc: e3a05001 mov r5, #1 <== NOT EXECUTED
2ed0: ea000048 b 2ff8 <rtems_termios_refill_transmitter+0x1cc> <== NOT EXECUTED
rtems_interrupt_enable(level);
nToSend = 1;
}
else {
if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2ed4: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED
2ed8: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED
2edc: e1520003 cmp r2, r3 <== NOT EXECUTED
2ee0: 1a000005 bne 2efc <rtems_termios_refill_transmitter+0xd0> <== NOT EXECUTED
/*
* buffer was empty
*/
if (tty->rawOutBufState == rob_wait) {
2ee4: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED
2ee8: e3530002 cmp r3, #2 <== NOT EXECUTED
/*
* this should never happen...
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2eec: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED
2ef0: 0b0008ef bleq 52b4 <rtems_semaphore_release> <== NOT EXECUTED
2ef4: e3a05000 mov r5, #0 <== NOT EXECUTED
2ef8: ea00003e b 2ff8 <rtems_termios_refill_transmitter+0x1cc> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
2efc: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2f00: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2f04: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
tty->t_dqlen = 0;
2f08: e3a02000 mov r2, #0 <== NOT EXECUTED
}
return 0;
}
rtems_interrupt_disable(level);
len = tty->t_dqlen;
2f0c: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
2f10: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2f14: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level);
newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
2f18: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED
2f1c: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED
2f20: e0800003 add r0, r0, r3 <== NOT EXECUTED
2f24: eb00540c bl 17f5c <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
if (tty->rawOutBufState == rob_wait) {
2f28: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED
2f2c: 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;
2f30: e1a06000 mov r6, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
2f34: e5840084 str r0, [r4, #132] ; 0x84 <== NOT EXECUTED
if (tty->rawOutBufState == rob_wait) {
/*
* wake up any pending writer task
*/
rtems_semaphore_release (tty->rawOutBuf.Semaphore);
2f38: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED
2f3c: 0b0008dc bleq 52b4 <rtems_semaphore_release> <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
2f40: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
2f44: e1560003 cmp r6, r3 <== NOT EXECUTED
2f48: 1a00000a bne 2f78 <rtems_termios_refill_transmitter+0x14c> <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2f4c: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2f50: e3a05000 mov r5, #0 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2f54: e3530000 cmp r3, #0 <== NOT EXECUTED
}
if (newTail == tty->rawOutBuf.Head) {
/*
* Buffer has become empty
*/
tty->rawOutBufState = rob_idle;
2f58: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
nToSend = 0;
/*
* check to see if snd wakeup callback was set
*/
if ( tty->tty_snd.sw_pfn != NULL) {
2f5c: 01a05003 moveq r5, r3 <== NOT EXECUTED
2f60: 0a000023 beq 2ff4 <rtems_termios_refill_transmitter+0x1c8> <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2f64: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED
2f68: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED
2f6c: e1a0e00f mov lr, pc <== NOT EXECUTED
2f70: e12fff13 bx r3 <== NOT EXECUTED
2f74: ea00001e b 2ff4 <rtems_termios_refill_transmitter+0x1c8> <== NOT EXECUTED
}
}
/* check, whether output should stop due to received XOFF */
else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
2f78: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
2f7c: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED
2f80: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED
2f84: 1a00000a bne 2fb4 <rtems_termios_refill_transmitter+0x188> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void )
{
uint32_t arm_switch_reg;
uint32_t level;
asm volatile (
2f88: e10f3000 mrs r3, CPSR <== NOT EXECUTED
2f8c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED
2f90: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
== (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;
2f94: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
2f98: e3822020 orr r2, r2, #32 <== NOT EXECUTED
2f9c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
2fa0: e3a02001 mov r2, #1 <== NOT EXECUTED
2fa4: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level )
{
ARM_SWITCH_REGISTERS;
asm volatile (
2fa8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
2fac: e3a05000 mov r5, #0 <== NOT EXECUTED
2fb0: ea00000f b 2ff4 <rtems_termios_refill_transmitter+0x1c8> <== NOT EXECUTED
}
else {
/*
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
2fb4: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED
2fb8: e1560003 cmp r6, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
2fbc: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED
else
nToSend = tty->rawOutBuf.Head - newTail;
2fc0: 95945080 ldrls r5, [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)) {
2fc4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
* Buffer not empty, start tranmitter
*/
if (newTail > tty->rawOutBuf.Head)
nToSend = tty->rawOutBuf.Size - newTail;
else
nToSend = tty->rawOutBuf.Head - newTail;
2fc8: e0665005 rsb r5, r6, r5 <== 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)) {
2fcc: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
(*tty->device.write)(tty->minor,
2fd0: 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)) {
2fd4: 13a05001 movne r5, #1 <== NOT EXECUTED
nToSend = 1;
}
tty->rawOutBufState = rob_busy; /*apm*/
2fd8: e3a03001 mov r3, #1 <== NOT EXECUTED
2fdc: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2fe0: e0811006 add r1, r1, r6 <== NOT EXECUTED
2fe4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
2fe8: e1a02005 mov r2, r5 <== NOT EXECUTED
2fec: e1a0e00f mov lr, pc <== NOT EXECUTED
2ff0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail],
nToSend);
}
tty->rawOutBuf.Tail = newTail; /*apm*/
2ff4: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED
}
return nToSend;
}
2ff8: e1a00005 mov r0, r5 <== NOT EXECUTED
2ffc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00004838 <rtems_termios_rxdaemon>:
/*
* this task actually processes any receive events
*/
static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument)
{
4838: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED
483c: e1a04000 mov r4, r0 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4840: e3a05000 mov r5, #0 <== NOT EXECUTED
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
4844: e28d6007 add r6, sp, #7 <== NOT EXECUTED
char c_buf;
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4848: e1a0300d mov r3, sp <== NOT EXECUTED
484c: e3a01002 mov r1, #2 <== NOT EXECUTED
4850: e3a02000 mov r2, #0 <== NOT EXECUTED
4854: e3a00003 mov r0, #3 <== NOT EXECUTED
4858: eb0000e0 bl 4be0 <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) {
485c: e59d3000 ldr r3, [sp] <== NOT EXECUTED
4860: e3130001 tst r3, #1 <== NOT EXECUTED
4864: 0a000003 beq 4878 <rtems_termios_rxdaemon+0x40> <== NOT EXECUTED
tty->rxTaskId = 0;
4868: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
486c: e1a00005 mov r0, r5 <== NOT EXECUTED
4870: eb000308 bl 5498 <rtems_task_delete> <== NOT EXECUTED
4874: eafffff3 b 4848 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4878: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED
487c: e1a0e00f mov lr, pc <== NOT EXECUTED
4880: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
4884: e3700001 cmn r0, #1 <== NOT EXECUTED
}
else {
/*
* do something
*/
c = tty->device.pollRead(tty->minor);
4888: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
488c: 0affffed beq 4848 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
rtems_termios_enqueue_raw_characters (
4890: e1a00004 mov r0, r4 <== NOT EXECUTED
4894: e1a01006 mov r1, r6 <== NOT EXECUTED
4898: e3a02001 mov r2, #1 <== NOT EXECUTED
c = tty->device.pollRead(tty->minor);
if (c != EOF) {
/*
* pollRead did call enqueue on its own
*/
c_buf = c;
489c: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
48a0: ebfff9f4 bl 3078 <rtems_termios_enqueue_raw_characters> <== NOT EXECUTED
48a4: eaffffe7 b 4848 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
00002e20 <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);
2e20: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED
2e24: e3a01002 mov r1, #2 <== NOT EXECUTED
2e28: ea0007c8 b 4d50 <rtems_event_send> <== NOT EXECUTED
000047cc <rtems_termios_txdaemon>:
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
47cc: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
47d0: e59f705c ldr r7, [pc, #92] ; 4834 <rtems_termios_txdaemon+0x68><== NOT EXECUTED
/*
* this task actually processes any transmit events
*/
static rtems_task rtems_termios_txdaemon(rtems_task_argument argument)
{
47d4: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) {
/*
* wait for rtems event
*/
rtems_event_receive((TERMIOS_TX_START_EVENT |
47d8: e3a05000 mov r5, #0 <== NOT EXECUTED
47dc: e1a0300d mov r3, sp <== NOT EXECUTED
47e0: e3a01002 mov r1, #2 <== NOT EXECUTED
47e4: e3a02000 mov r2, #0 <== NOT EXECUTED
47e8: e3a00003 mov r0, #3 <== NOT EXECUTED
47ec: eb0000fb bl 4be0 <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) {
47f0: e59d3000 ldr r3, [sp] <== NOT EXECUTED
47f4: 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);
47f8: 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) {
47fc: 0a000003 beq 4810 <rtems_termios_txdaemon+0x44> <== NOT EXECUTED
tty->txTaskId = 0;
4800: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
4804: e1a00005 mov r0, r5 <== NOT EXECUTED
4808: eb000322 bl 5498 <rtems_task_delete> <== NOT EXECUTED
480c: eafffff2 b 47dc <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
}
else {
/*
* call any line discipline start function
*/
if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
4810: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED
4814: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED
4818: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED
481c: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
4820: 11a0e00f movne lr, pc <== NOT EXECUTED
4824: 112fff13 bxne r3 <== NOT EXECUTED
}
/*
* try to push further characters to device
*/
rtems_termios_refill_transmitter(tty);
4828: e1a00004 mov r0, r4 <== NOT EXECUTED
482c: ebfff97e bl 2e2c <rtems_termios_refill_transmitter> <== NOT EXECUTED
4830: eaffffe9 b 47dc <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
000039e0 <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;
39e0: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
39e4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg;
struct rtems_termios_tty *tty = args->iop->data1;
39e8: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
39ec: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty);
}
rtems_status_code
rtems_termios_write (void *arg)
{
39f0: e1a04000 mov r4, 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);
39f4: e1a02001 mov r2, r1
39f8: e5950018 ldr r0, [r5, #24]
39fc: eb0005e6 bl 519c <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3a00: e2506000 subs r6, r0, #0
3a04: 1a000022 bne 3a94 <rtems_termios_write+0xb4>
return sc;
if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
3a08: e59520cc ldr r2, [r5, #204] ; 0xcc
3a0c: e59f3088 ldr r3, [pc, #136] ; 3a9c <rtems_termios_write+0xbc>
3a10: e0833282 add r3, r3, r2, lsl #5
3a14: e593300c ldr r3, [r3, #12]
3a18: e3530000 cmp r3, #0
3a1c: 0a000005 beq 3a38 <rtems_termios_write+0x58>
sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
3a20: e1a01004 mov r1, r4 <== NOT EXECUTED
3a24: e1a00005 mov r0, r5 <== NOT EXECUTED
3a28: e1a0e00f mov lr, pc <== NOT EXECUTED
3a2c: e12fff13 bx r3 <== NOT EXECUTED
3a30: e1a06000 mov r6, r0 <== NOT EXECUTED
3a34: ea000014 b 3a8c <rtems_termios_write+0xac> <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
return sc;
}
if (tty->termios.c_oflag & OPOST) {
3a38: e5953034 ldr r3, [r5, #52] ; 0x34
3a3c: e3130001 tst r3, #1
uint32_t count = args->count;
3a40: 15948010 ldrne r8, [r4, #16]
char *buffer = args->buffer;
3a44: 1594a00c ldrne sl, [r4, #12]
3a48: 11a07006 movne r7, r6
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) {
3a4c: 1a000004 bne 3a64 <rtems_termios_write+0x84>
3a50: ea000007 b 3a74 <rtems_termios_write+0x94> <== NOT EXECUTED
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
oproc (*buffer++, tty);
3a54: e7da0007 ldrb r0, [sl, r7]
3a58: ebfffe7a bl 3448 <oproc>
3a5c: e2877001 add r7, r7, #1
3a60: e2488001 sub r8, r8, #1
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
3a64: e3580000 cmp r8, #0
oproc (*buffer++, tty);
3a68: e1a01005 mov r1, r5
return sc;
}
if (tty->termios.c_oflag & OPOST) {
uint32_t count = args->count;
char *buffer = args->buffer;
while (count--)
3a6c: 1afffff8 bne 3a54 <rtems_termios_write+0x74>
3a70: ea000003 b 3a84 <rtems_termios_write+0xa4>
oproc (*buffer++, tty);
args->bytes_moved = args->count;
}
else {
rtems_termios_puts (args->buffer, args->count, tty);
3a74: e284000c add r0, r4, #12 <== NOT EXECUTED
3a78: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED
3a7c: e1a02005 mov r2, r5 <== NOT EXECUTED
3a80: ebfffe2f bl 3344 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
3a84: e5943010 ldr r3, [r4, #16]
3a88: e5843018 str r3, [r4, #24]
}
rtems_semaphore_release (tty->osem);
3a8c: e5950018 ldr r0, [r5, #24]
3a90: eb000607 bl 52b4 <rtems_semaphore_release>
return sc;
}
3a94: e1a00006 mov r0, r6
3a98: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
000064b0 <rtems_verror>:
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
64b0: 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)
64b4: e2107202 ands r7, r0, #536870912 ; 0x20000000 <== NOT EXECUTED
static int rtems_verror(
rtems_error_code_t error_flag,
const char *printf_format,
va_list arglist
)
{
64b8: e1a06000 mov r6, r0 <== NOT EXECUTED
64bc: e1a09001 mov r9, r1 <== NOT EXECUTED
64c0: e1a04002 mov r4, r2 <== NOT EXECUTED
int local_errno = 0;
int chars_written = 0;
rtems_status_code status;
if (error_flag & RTEMS_ERROR_PANIC)
64c4: 0a00000d beq 6500 <rtems_verror+0x50> <== NOT EXECUTED
{
if (rtems_panic_in_progress++)
64c8: e59f3160 ldr r3, [pc, #352] ; 6630 <rtems_verror+0x180> <== NOT EXECUTED
64cc: e5932000 ldr r2, [r3] <== NOT EXECUTED
64d0: e3520000 cmp r2, #0 <== NOT EXECUTED
64d4: e2822001 add r2, r2, #1 <== NOT EXECUTED
64d8: e5832000 str r2, [r3] <== NOT EXECUTED
64dc: 0a000003 beq 64f0 <rtems_verror+0x40> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 );
}
}
#endif
_Thread_Dispatch_disable_level += 1;
64e0: e59f314c ldr r3, [pc, #332] ; 6634 <rtems_verror+0x184> <== NOT EXECUTED
64e4: e5932000 ldr r2, [r3] <== NOT EXECUTED
64e8: e2822001 add r2, r2, #1 <== NOT EXECUTED
64ec: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */
/* don't aggravate things */
if (rtems_panic_in_progress > 2)
64f0: e59f3138 ldr r3, [pc, #312] ; 6630 <rtems_verror+0x180> <== NOT EXECUTED
64f4: e5933000 ldr r3, [r3] <== NOT EXECUTED
64f8: e3530002 cmp r3, #2 <== NOT EXECUTED
64fc: ca000049 bgt 6628 <rtems_verror+0x178> <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
6500: e59f3130 ldr r3, [pc, #304] ; 6638 <rtems_verror+0x188> <== NOT EXECUTED
6504: e5933000 ldr r3, [r3] <== NOT EXECUTED
6508: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED
650c: eb00359e bl 13b8c <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK;
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
6510: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED
return 0;
}
(void) fflush(stdout); /* in case stdout/stderr same */
status = error_flag & ~RTEMS_ERROR_MASK;
6514: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
6518: 0a000001 beq 6524 <rtems_verror+0x74> <== NOT EXECUTED
local_errno = errno;
651c: eb0034a7 bl 137c0 <__errno> <== NOT EXECUTED
6520: e5905000 ldr r5, [r0] <== 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);
6524: e59fa10c ldr sl, [pc, #268] ; 6638 <rtems_verror+0x188> <== NOT EXECUTED
6528: e59a3000 ldr r3, [sl] <== NOT EXECUTED
652c: e1a02004 mov r2, r4 <== NOT EXECUTED
6530: e1a01009 mov r1, r9 <== NOT EXECUTED
6534: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
6538: eb004db9 bl 19c24 <vfprintf> <== NOT EXECUTED
if (status)
653c: e3580000 cmp r8, #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);
6540: e1a04000 mov r4, r0 <== NOT EXECUTED
if (status)
6544: 0a000008 beq 656c <rtems_verror+0xbc> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
6548: e59a3000 ldr r3, [sl] <== NOT EXECUTED
654c: e1a00008 mov r0, r8 <== NOT EXECUTED
6550: e593800c ldr r8, [r3, #12] <== NOT EXECUTED
6554: ebffffd1 bl 64a0 <rtems_status_text> <== NOT EXECUTED
6558: e59f10dc ldr r1, [pc, #220] ; 663c <rtems_verror+0x18c> <== NOT EXECUTED
655c: e1a02000 mov r2, r0 <== NOT EXECUTED
6560: e1a00008 mov r0, r8 <== NOT EXECUTED
6564: eb003646 bl 13e84 <fprintf> <== NOT EXECUTED
6568: e0844000 add r4, r4, r0 <== NOT EXECUTED
if (local_errno)
656c: e3550000 cmp r5, #0 <== NOT EXECUTED
6570: 0a000015 beq 65cc <rtems_verror+0x11c> <== NOT EXECUTED
{
if ((local_errno > 0) && *strerror(local_errno))
6574: da00000d ble 65b0 <rtems_verror+0x100> <== NOT EXECUTED
6578: e1a00005 mov r0, r5 <== NOT EXECUTED
657c: eb003953 bl 14ad0 <strerror> <== NOT EXECUTED
6580: e5d03000 ldrb r3, [r0] <== NOT EXECUTED
6584: e3530000 cmp r3, #0 <== NOT EXECUTED
6588: 0a000008 beq 65b0 <rtems_verror+0x100> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
658c: e59f30a4 ldr r3, [pc, #164] ; 6638 <rtems_verror+0x188> <== NOT EXECUTED
6590: e5933000 ldr r3, [r3] <== NOT EXECUTED
6594: e1a00005 mov r0, r5 <== NOT EXECUTED
6598: e593800c ldr r8, [r3, #12] <== NOT EXECUTED
659c: eb00394b bl 14ad0 <strerror> <== NOT EXECUTED
65a0: e59f1098 ldr r1, [pc, #152] ; 6640 <rtems_verror+0x190> <== NOT EXECUTED
65a4: e1a02000 mov r2, r0 <== NOT EXECUTED
65a8: e1a00008 mov r0, r8 <== NOT EXECUTED
65ac: ea000004 b 65c4 <rtems_verror+0x114> <== NOT EXECUTED
else
chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
65b0: e59f3080 ldr r3, [pc, #128] ; 6638 <rtems_verror+0x188> <== NOT EXECUTED
65b4: e5933000 ldr r3, [r3] <== NOT EXECUTED
65b8: e59f1084 ldr r1, [pc, #132] ; 6644 <rtems_verror+0x194> <== NOT EXECUTED
65bc: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
65c0: e1a02005 mov r2, r5 <== NOT EXECUTED
65c4: eb00362e bl 13e84 <fprintf> <== NOT EXECUTED
65c8: e0844000 add r4, r4, r0 <== NOT EXECUTED
}
chars_written += fprintf(stderr, "\n");
65cc: e59f8064 ldr r8, [pc, #100] ; 6638 <rtems_verror+0x188> <== NOT EXECUTED
65d0: e5983000 ldr r3, [r8] <== NOT EXECUTED
65d4: e59f106c ldr r1, [pc, #108] ; 6648 <rtems_verror+0x198> <== NOT EXECUTED
65d8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
65dc: eb003628 bl 13e84 <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
65e0: e5983000 ldr r3, [r8] <== 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");
65e4: e1a0a000 mov sl, r0 <== NOT EXECUTED
(void) fflush(stderr);
65e8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED
65ec: eb003566 bl 13b8c <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
65f0: e3160203 tst r6, #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");
65f4: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED
(void) fflush(stderr);
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
65f8: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{
if (error_flag & RTEMS_ERROR_PANIC)
65fc: e3570000 cmp r7, #0 <== NOT EXECUTED
6600: 0a000004 beq 6618 <rtems_verror+0x168> <== NOT EXECUTED
{
rtems_error(0, "fatal error, exiting");
6604: e3a00000 mov r0, #0 <== NOT EXECUTED
6608: e59f103c ldr r1, [pc, #60] ; 664c <rtems_verror+0x19c> <== NOT EXECUTED
660c: eb00001b bl 6680 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
6610: e1a00005 mov r0, r5 <== NOT EXECUTED
6614: eb0002f2 bl 71e4 <_exit> <== NOT EXECUTED
}
else
{
rtems_error(0, "fatal error, aborting");
6618: e59f1030 ldr r1, [pc, #48] ; 6650 <rtems_verror+0x1a0> <== NOT EXECUTED
661c: e1a00007 mov r0, r7 <== NOT EXECUTED
6620: eb000016 bl 6680 <rtems_error> <== NOT EXECUTED
abort();
6624: eb00345c bl 1379c <abort> <== NOT EXECUTED
6628: e3a00000 mov r0, #0 <== NOT EXECUTED
}
}
return chars_written;
}
662c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
000256fc <scanInt>:
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
256fc: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr}
25700: e3a04000 mov r4, #0
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
25704: e59fb0d4 ldr fp, [pc, #212] ; 257e0 <scanInt+0xe4>
limit++;
continue;
}
sign = 1;
}
if (!isdigit(c))
25708: e59f90d4 ldr r9, [pc, #212] ; 257e4 <scanInt+0xe8>
/*
* Extract an integer value from the database
*/
static int
scanInt(FILE *fp, int *val)
{
2570c: e58d1000 str r1, [sp]
25710: e1a05000 mov r5, r0
25714: e3e08102 mvn r8, #-2147483648 ; 0x80000000
25718: e1a07004 mov r7, r4
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
if ((i > (limit / 10))
2571c: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX;
int sign = 0;
int d;
for (;;) {
c = getc(fp);
25720: e5953004 ldr r3, [r5, #4]
25724: e2433001 sub r3, r3, #1
25728: e3530000 cmp r3, #0
2572c: e5853004 str r3, [r5, #4]
25730: a5953000 ldrge r3, [r5]
25734: a4d36001 ldrbge r6, [r3], #1
25738: a5853000 strge r3, [r5]
2573c: aa000003 bge 25750 <scanInt+0x54>
25740: e59b0000 ldr r0, [fp] <== NOT EXECUTED
25744: e1a01005 mov r1, r5 <== NOT EXECUTED
25748: eb0078a0 bl 439d0 <__srget_r> <== NOT EXECUTED
2574c: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
25750: e356003a cmp r6, #58 ; 0x3a
25754: 0a000019 beq 257c0 <scanInt+0xc4>
break;
if (sign == 0) {
25758: e3540000 cmp r4, #0
2575c: 1a000004 bne 25774 <scanInt+0x78>
if (c == '-') {
25760: e356002d cmp r6, #45 ; 0x2d
sign = -1;
limit++;
25764: 02888001 addeq r8, r8, #1
25768: 03e04000 mvneq r4, #0
for (;;) {
c = getc(fp);
if (c == ':')
break;
if (sign == 0) {
if (c == '-') {
2576c: 0affffeb beq 25720 <scanInt+0x24>
sign = -1;
limit++;
continue;
25770: e3a04001 mov r4, #1
}
sign = 1;
}
if (!isdigit(c))
25774: e5993000 ldr r3, [r9]
25778: e0833006 add r3, r3, r6
2577c: e5d33001 ldrb r3, [r3, #1]
25780: e3130004 tst r3, #4
25784: 0a000013 beq 257d8 <scanInt+0xdc>
return 0;
d = c - '0';
if ((i > (limit / 10))
25788: e1a00008 mov r0, r8
2578c: e3a0100a mov r1, #10
25790: eb00c2db bl 56304 <__aeabi_uidiv>
25794: e1570000 cmp r7, r0
25798: 8a00000e bhi 257d8 <scanInt+0xdc>
}
sign = 1;
}
if (!isdigit(c))
return 0;
d = c - '0';
2579c: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10))
257a0: 1a000004 bne 257b8 <scanInt+0xbc>
257a4: e1a00008 mov r0, r8 <== NOT EXECUTED
257a8: e3a0100a mov r1, #10 <== NOT EXECUTED
257ac: eb00c368 bl 56554 <__umodsi3> <== NOT EXECUTED
257b0: e1560000 cmp r6, r0 <== NOT EXECUTED
257b4: 8a000007 bhi 257d8 <scanInt+0xdc> <== NOT EXECUTED
|| ((i == (limit / 10)) && (d > (limit % 10))))
return 0;
i = i * 10 + d;
257b8: e027679a mla r7, sl, r7, r6
257bc: eaffffd7 b 25720 <scanInt+0x24>
}
if (sign == 0)
257c0: e3540000 cmp r4, #0
return 0;
*val = i * sign;
257c4: 10030497 mulne r3, r7, r4
257c8: 159d2000 ldrne r2, [sp]
257cc: 13a00001 movne r0, #1
257d0: 15823000 strne r3, [r2]
return 1;
257d4: 1a000000 bne 257dc <scanInt+0xe0>
257d8: e3a00000 mov r0, #0 <== NOT EXECUTED
}
257dc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000257e8 <scanString>:
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
257e8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
257ec: e1a04002 mov r4, r2
int c;
*name = *bufp;
257f0: 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)
{
257f4: e59d6018 ldr r6, [sp, #24]
int c;
*name = *bufp;
257f8: e5812000 str r2, [r1]
for (;;) {
c = getc(fp);
257fc: e59f70c0 ldr r7, [pc, #192] ; 258c4 <scanString+0xdc>
/*
* Extract a string value from the database
*/
static int
scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag)
{
25800: e1a05000 mov r5, r0
25804: e1a08003 mov r8, r3
int c;
*name = *bufp;
for (;;) {
c = getc(fp);
25808: e5953004 ldr r3, [r5, #4]
2580c: e2433001 sub r3, r3, #1
25810: e3530000 cmp r3, #0
25814: e5853004 str r3, [r5, #4]
25818: a5953000 ldrge r3, [r5]
2581c: a4d30001 ldrbge r0, [r3], #1
25820: a5853000 strge r3, [r5]
25824: b5970000 ldrlt r0, [r7]
25828: b1a01005 movlt r1, r5
2582c: bb007867 bllt 439d0 <__srget_r>
if (c == ':') {
25830: e350003a cmp r0, #58 ; 0x3a
25834: 1a000002 bne 25844 <scanString+0x5c>
if (nlFlag)
25838: e3560000 cmp r6, #0
2583c: 0a000013 beq 25890 <scanString+0xa8>
25840: ea00001d b 258bc <scanString+0xd4> <== NOT EXECUTED
return 0;
break;
}
if (c == '\n') {
25844: e350000a cmp r0, #10
25848: 1a000002 bne 25858 <scanString+0x70>
if (!nlFlag)
2584c: e3560000 cmp r6, #0
25850: 1a00000e bne 25890 <scanString+0xa8>
25854: ea000018 b 258bc <scanString+0xd4> <== NOT EXECUTED
return 0;
break;
}
if (c == EOF)
25858: e3700001 cmn r0, #1
2585c: 0a000016 beq 258bc <scanString+0xd4>
return 0;
if (*nleft < 2)
25860: e5983000 ldr r3, [r8]
25864: e3530001 cmp r3, #1
25868: 9a000013 bls 258bc <scanString+0xd4>
return 0;
**bufp = c;
2586c: e5943000 ldr r3, [r4]
25870: e5c30000 strb r0, [r3]
++(*bufp);
25874: e5942000 ldr r2, [r4]
--(*nleft);
25878: e5983000 ldr r3, [r8]
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
2587c: e2822001 add r2, r2, #1
--(*nleft);
25880: e2433001 sub r3, r3, #1
if (c == EOF)
return 0;
if (*nleft < 2)
return 0;
**bufp = c;
++(*bufp);
25884: e5842000 str r2, [r4]
--(*nleft);
25888: e5883000 str r3, [r8]
}
2588c: eaffffdd b 25808 <scanString+0x20>
**bufp = '\0';
25890: e5943000 ldr r3, [r4]
25894: e3a02000 mov r2, #0
25898: e5c32000 strb r2, [r3]
++(*bufp);
2589c: e5942000 ldr r2, [r4]
--(*nleft);
258a0: e5983000 ldr r3, [r8]
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
258a4: e2822001 add r2, r2, #1
--(*nleft);
258a8: e2433001 sub r3, r3, #1
**bufp = c;
++(*bufp);
--(*nleft);
}
**bufp = '\0';
++(*bufp);
258ac: e5842000 str r2, [r4]
--(*nleft);
258b0: e5883000 str r3, [r8]
258b4: e3a00001 mov r0, #1
return 1;
258b8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
258bc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
258c0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000258c8 <scangr>:
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
258c8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
258cc: e24dd014 sub sp, sp, #20
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
258d0: e28d6008 add r6, sp, #8
258d4: e28d5004 add r5, sp, #4
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
258d8: e58d2008 str r2, [sp, #8]
258dc: e58d3004 str r3, [sp, #4]
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
258e0: e3a08000 mov r8, #0
258e4: e1a02006 mov r2, r6
258e8: e1a03005 mov r3, r5
258ec: e58d8000 str r8, [sp]
FILE *fp,
struct group *grp,
char *buffer,
size_t bufsize
)
{
258f0: e1a07000 mov r7, r0
258f4: e1a04001 mov r4, r1
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
258f8: ebffffba bl 257e8 <scanString>
258fc: e1500008 cmp r0, r8
25900: 0a00003b beq 259f4 <scangr+0x12c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
25904: e1a00007 mov r0, r7
25908: e2841004 add r1, r4, #4
2590c: e1a02006 mov r2, r6
25910: e1a03005 mov r3, r5
25914: e58d8000 str r8, [sp]
25918: ebffffb2 bl 257e8 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2591c: e1500008 cmp r0, r8
25920: 0a000033 beq 259f4 <scangr+0x12c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
25924: e1a00007 mov r0, r7
25928: e28d1010 add r1, sp, #16
2592c: ebffff72 bl 256fc <scanInt>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25930: e1500008 cmp r0, r8
25934: 0a00002e beq 259f4 <scangr+0x12c>
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
25938: e1a03005 mov r3, r5
2593c: e28d100c add r1, sp, #12
25940: e1a00007 mov r0, r7
25944: e1a02006 mov r2, r6
25948: e3a05001 mov r5, #1
2594c: e58d5000 str r5, [sp]
25950: ebffffa4 bl 257e8 <scanString>
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25954: e1500008 cmp r0, r8
|| !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &grgid)
|| !scanString(fp, &grmem, &buffer, &bufsize, 1))
return 0;
grp->gr_gid = grgid;
25958: 11dd31b0 ldrhne r3, [sp, #16]
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2595c: 159d100c ldrne 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;
25960: 11c430b8 strhne r3, [r4, #8]
{
int grgid;
char *grmem, *cp;
int memcount;
if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
25964: 1a000003 bne 25978 <scangr+0xb0>
25968: ea000021 b 259f4 <scangr+0x12c> <== NOT EXECUTED
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',')
2596c: e352002c cmp r2, #44 ; 0x2c
memcount++;
25970: 02855001 addeq r5, r5, #1
25974: e2888001 add r8, r8, #1
grp->gr_gid = grgid;
/*
* Determine number of members
*/
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
25978: e7d12008 ldrb r2, [r1, r8]
2597c: e3520000 cmp r2, #0
25980: 1afffff9 bne 2596c <scangr+0xa4>
}
/*
* Hack to produce (hopefully) a suitably-aligned array of pointers
*/
if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
25984: e1a05105 lsl r5, r5, #2
25988: e59d3004 ldr r3, [sp, #4]
2598c: e2855013 add r5, r5, #19
25990: e1530005 cmp r3, r5
25994: 3a000016 bcc 259f4 <scangr+0x12c>
return 0;
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
25998: e59d3008 ldr r3, [sp, #8]
2599c: e283300f add r3, r3, #15
259a0: e3c3300f bic r3, r3, #15
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
259a4: 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);
259a8: e584300c str r3, [r4, #12]
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
259ac: e59d300c ldr r3, [sp, #12]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
if(*cp == ',') {
*cp = '\0';
259b0: e1a00002 mov r0, r2
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
259b4: e2833001 add r3, r3, #1
259b8: e2822001 add r2, r2, #1
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
259bc: ea000005 b 259d8 <scangr+0x110>
if(*cp == ',') {
259c0: e351002c cmp r1, #44 ; 0x2c
*cp = '\0';
259c4: 05430001 strbeq r0, [r3, #-1]
grp->gr_mem[memcount++] = cp + 1;
259c8: 0594100c ldreq r1, [r4, #12]
259cc: 07813102 streq r3, [r1, r2, lsl #2]
259d0: 02822001 addeq r2, r2, #1
259d4: e2833001 add r3, r3, #1
/*
* Fill in pointer array
*/
grp->gr_mem[0] = grmem;
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
259d8: e5531001 ldrb r1, [r3, #-1]
259dc: e3510000 cmp r1, #0
259e0: 1afffff6 bne 259c0 <scangr+0xf8>
if(*cp == ',') {
*cp = '\0';
grp->gr_mem[memcount++] = cp + 1;
}
}
grp->gr_mem[memcount] = NULL;
259e4: e594300c ldr r3, [r4, #12]
259e8: e3a00001 mov r0, #1
259ec: e7831102 str r1, [r3, r2, lsl #2]
return 1;
259f0: ea000000 b 259f8 <scangr+0x130>
259f4: e3a00000 mov r0, #0 <== NOT EXECUTED
}
259f8: e28dd014 add sp, sp, #20
259fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00025a3c <scanpw>:
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
25a3c: e92d41f0 push {r4, r5, r6, r7, r8, lr}
25a40: e24dd014 sub sp, sp, #20
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25a44: e28d7008 add r7, sp, #8
25a48: e28d6004 add r6, sp, #4
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
25a4c: e58d2008 str r2, [sp, #8]
25a50: e58d3004 str r3, [sp, #4]
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25a54: e3a08000 mov r8, #0
25a58: e1a02007 mov r2, r7
25a5c: e1a03006 mov r3, r6
25a60: e58d8000 str r8, [sp]
FILE *fp,
struct passwd *pwd,
char *buffer,
size_t bufsize
)
{
25a64: e1a05000 mov r5, r0
25a68: e1a04001 mov r4, r1
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25a6c: ebffff5d bl 257e8 <scanString>
25a70: e1500008 cmp r0, r8
25a74: 0a000038 beq 25b5c <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
25a78: e1a00005 mov r0, r5
25a7c: e2841004 add r1, r4, #4
25a80: e1a02007 mov r2, r7
25a84: e1a03006 mov r3, r6
25a88: e58d8000 str r8, [sp]
25a8c: ebffff55 bl 257e8 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25a90: e1500008 cmp r0, r8
25a94: 0a000030 beq 25b5c <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
25a98: e1a00005 mov r0, r5
25a9c: e28d1010 add r1, sp, #16
25aa0: ebffff15 bl 256fc <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25aa4: e1500008 cmp r0, r8
25aa8: 0a00002b beq 25b5c <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
25aac: e1a00005 mov r0, r5
25ab0: e28d100c add r1, sp, #12
25ab4: ebffff10 bl 256fc <scanInt>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25ab8: e1500008 cmp r0, r8
25abc: 0a000026 beq 25b5c <scanpw+0x120>
|| !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
|| !scanInt(fp, &pwuid)
|| !scanInt(fp, &pwgid)
|| !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
25ac0: e1a00005 mov r0, r5
25ac4: e284100c add r1, r4, #12
25ac8: e1a02007 mov r2, r7
25acc: e1a03006 mov r3, r6
25ad0: e58d8000 str r8, [sp]
25ad4: ebffff43 bl 257e8 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25ad8: e1500008 cmp r0, r8
25adc: 0a00001e beq 25b5c <scanpw+0x120>
|| !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)
25ae0: e1a00005 mov r0, r5
25ae4: e2841010 add r1, r4, #16
25ae8: e1a02007 mov r2, r7
25aec: e1a03006 mov r3, r6
25af0: e58d8000 str r8, [sp]
25af4: ebffff3b bl 257e8 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25af8: e1500008 cmp r0, r8
25afc: 0a000016 beq 25b5c <scanpw+0x120>
|| !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)
25b00: e1a00005 mov r0, r5
25b04: e2841014 add r1, r4, #20
25b08: e1a02007 mov r2, r7
25b0c: e1a03006 mov r3, r6
25b10: e58d8000 str r8, [sp]
25b14: ebffff33 bl 257e8 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25b18: e1500008 cmp r0, r8
25b1c: 0a00000e beq 25b5c <scanpw+0x120>
|| !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))
25b20: e1a00005 mov r0, r5
25b24: e1a02007 mov r2, r7
25b28: e1a03006 mov r3, r6
25b2c: e3a05001 mov r5, #1
25b30: e2841018 add r1, r4, #24
25b34: e58d5000 str r5, [sp]
25b38: ebffff2a bl 257e8 <scanString>
size_t bufsize
)
{
int pwuid, pwgid;
if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
25b3c: e1500008 cmp r0, r8
25b40: 0a000005 beq 25b5c <scanpw+0x120>
|| !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;
25b44: e1dd30bc ldrh r3, [sp, #12]
25b48: e1c430ba strh r3, [r4, #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;
25b4c: e1dd31b0 ldrh r3, [sp, #16]
pwd->pw_gid = pwgid;
25b50: e1a00005 mov r0, r5
|| !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;
25b54: e1c430b8 strh r3, [r4, #8]
pwd->pw_gid = pwgid;
return 1;
25b58: ea000000 b 25b60 <scanpw+0x124>
25b5c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
25b60: e28dd014 add sp, sp, #20
25b64: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000256a4 <setgid>:
int setgid(
gid_t gid
)
{
_POSIX_types_Gid = gid;
256a4: e59f300c ldr r3, [pc, #12] ; 256b8 <setgid+0x14> <== NOT EXECUTED
256a8: e5933000 ldr r3, [r3] <== NOT EXECUTED
256ac: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED
return 0;
}
256b0: e3a00000 mov r0, #0 <== NOT EXECUTED
256b4: e12fff1e bx lr <== NOT EXECUTED
00025c6c <setgrent>:
return NULL;
return &grent;
}
void setgrent(void)
{
25c6c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
25c70: ebffffcb bl 25ba4 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
25c74: e59f3020 ldr r3, [pc, #32] ; 25c9c <setgrent+0x30> <== NOT EXECUTED
25c78: e5930000 ldr r0, [r3] <== NOT EXECUTED
25c7c: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(group_fp);
25c80: 1b00621d blne 3e4fc <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
25c84: e59f0014 ldr r0, [pc, #20] ; 25ca0 <setgrent+0x34> <== NOT EXECUTED
25c88: e59f1014 ldr r1, [pc, #20] ; 25ca4 <setgrent+0x38> <== NOT EXECUTED
25c8c: eb00643d bl 3ed88 <fopen> <== NOT EXECUTED
25c90: e59f3004 ldr r3, [pc, #4] ; 25c9c <setgrent+0x30> <== NOT EXECUTED
25c94: e5830000 str r0, [r3] <== NOT EXECUTED
}
25c98: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00025e3c <setpwent>:
return NULL;
return &pwent;
}
void setpwent(void)
{
25e3c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
25e40: ebffff57 bl 25ba4 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
25e44: e59f3020 ldr r3, [pc, #32] ; 25e6c <setpwent+0x30> <== NOT EXECUTED
25e48: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED
25e4c: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(passwd_fp);
25e50: 1b0061a9 blne 3e4fc <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
25e54: e59f0014 ldr r0, [pc, #20] ; 25e70 <setpwent+0x34> <== NOT EXECUTED
25e58: e59f1014 ldr r1, [pc, #20] ; 25e74 <setpwent+0x38> <== NOT EXECUTED
25e5c: eb0063c9 bl 3ed88 <fopen> <== NOT EXECUTED
25e60: e59f3004 ldr r3, [pc, #4] ; 25e6c <setpwent+0x30> <== NOT EXECUTED
25e64: e5830004 str r0, [r3, #4] <== NOT EXECUTED
}
25e68: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
000077d4 <setuid>:
int setuid(
uid_t uid
)
{
_POSIX_types_Uid = uid;
77d4: e59f300c ldr r3, [pc, #12] ; 77e8 <setuid+0x14> <== NOT EXECUTED
77d8: e5933000 ldr r3, [r3] <== NOT EXECUTED
77dc: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED
return 0;
}
77e0: e3a00000 mov r0, #0 <== NOT EXECUTED
77e4: e12fff1e bx lr <== NOT EXECUTED
00003980 <siproc>:
int i;
/*
* Obtain output semaphore if character will be echoed
*/
if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
3980: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED
3984: e59f3050 ldr r3, [pc, #80] ; 39dc <siproc+0x5c> <== NOT EXECUTED
3988: e0023003 and r3, r2, r3 <== NOT EXECUTED
398c: e3530000 cmp r3, #0 <== NOT EXECUTED
/*
* Process input character, with semaphore.
*/
static int
siproc (unsigned char c, struct rtems_termios_tty *tty)
{
3990: e92d4030 push {r4, r5, lr} <== NOT EXECUTED
3994: e1a04001 mov r4, r1 <== NOT EXECUTED
3998: 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)) {
399c: 0a00000b beq 39d0 <siproc+0x50> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
39a0: e3a01000 mov r1, #0 <== NOT EXECUTED
39a4: e1a02001 mov r2, r1 <== NOT EXECUTED
39a8: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
39ac: eb0005fa bl 519c <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
39b0: e1a01004 mov r1, r4 <== NOT EXECUTED
39b4: e1a00005 mov r0, r5 <== NOT EXECUTED
39b8: ebffff8b bl 37ec <iproc> <== NOT EXECUTED
39bc: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
39c0: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED
39c4: eb00063a bl 52b4 <rtems_semaphore_release> <== NOT EXECUTED
}
else {
i = iproc (c, tty);
}
return i;
}
39c8: e1a00005 mov r0, r5 <== NOT EXECUTED
39cc: e8bd8030 pop {r4, r5, pc} <== 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);
39d0: e1a00005 mov r0, r5 <== NOT EXECUTED
}
return i;
}
39d4: 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);
39d8: eaffff83 b 37ec <iproc> <== NOT EXECUTED
00008e34 <stat>:
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
8e34: e92d4070 push {r4, r5, r6, lr}
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
8e38: e2515000 subs r5, r1, #0
int _STAT_NAME(
const char *path,
struct stat *buf
)
{
8e3c: e24dd018 sub sp, sp, #24
8e40: e1a06000 mov r6, r0
/*
* Check to see if we were passed a valid pointer.
*/
if ( !buf )
8e44: 1a000002 bne 8e54 <stat+0x20>
rtems_set_errno_and_return_minus_one( EFAULT );
8e48: eb00d55e bl 3e3c8 <__errno>
8e4c: e3a0300e mov r3, #14
8e50: ea000018 b 8eb8 <stat+0x84>
status = rtems_filesystem_evaluate_path( path, strlen( path ),
8e54: eb00f069 bl 45000 <strlen>
8e58: e28d4004 add r4, sp, #4
8e5c: e1a01000 mov r1, r0
8e60: e3a0c001 mov ip, #1
8e64: e1a00006 mov r0, r6
8e68: e3a02000 mov r2, #0
8e6c: e1a03004 mov r3, r4
8e70: e58dc000 str ip, [sp]
8e74: ebfff9f0 bl 763c <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS );
if ( status != 0 )
8e78: e2501000 subs r1, r0, #0
8e7c: 1a00000e bne 8ebc <stat+0x88>
return -1;
if ( !loc.handlers->fstat_h ){
8e80: e59d300c ldr r3, [sp, #12]
8e84: e5933018 ldr r3, [r3, #24]
8e88: e3530000 cmp r3, #0
8e8c: 1a00000c bne 8ec4 <stat+0x90>
rtems_filesystem_freenode( &loc );
8e90: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
8e94: e3530000 cmp r3, #0 <== NOT EXECUTED
8e98: 0a000004 beq 8eb0 <stat+0x7c> <== NOT EXECUTED
8e9c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
8ea0: e3530000 cmp r3, #0 <== NOT EXECUTED
8ea4: 11a00004 movne r0, r4 <== NOT EXECUTED
8ea8: 11a0e00f movne lr, pc <== NOT EXECUTED
8eac: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
8eb0: eb00d544 bl 3e3c8 <__errno> <== NOT EXECUTED
8eb4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
8eb8: e5803000 str r3, [r0]
8ebc: e3e05000 mvn r5, #0
8ec0: ea000010 b 8f08 <stat+0xd4>
/*
* Zero out the stat structure so the various support
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
8ec4: e3a02048 mov r2, #72 ; 0x48
8ec8: e1a00005 mov r0, r5
8ecc: eb00e274 bl 418a4 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
8ed0: e1a01005 mov r1, r5
8ed4: e59d300c ldr r3, [sp, #12]
8ed8: e1a00004 mov r0, r4
8edc: e1a0e00f mov lr, pc
8ee0: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
8ee4: e59d3010 ldr r3, [sp, #16]
8ee8: e3530000 cmp r3, #0
* versions of stat don't have to.
*/
memset( buf, 0, sizeof(struct stat) );
status = (*loc.handlers->fstat_h)( &loc, buf );
8eec: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
8ef0: 0a000004 beq 8f08 <stat+0xd4>
8ef4: e593301c ldr r3, [r3, #28]
8ef8: e3530000 cmp r3, #0
8efc: 11a00004 movne r0, r4
8f00: 11a0e00f movne lr, pc
8f04: 112fff13 bxne r3
return status;
}
8f08: e1a00005 mov r0, r5
8f0c: e28dd018 add sp, sp, #24
8f10: e8bd8070 pop {r4, r5, r6, pc}
00026d30 <statvfs>:
#include <sys/statvfs.h>
int
statvfs (const char *path, struct statvfs *sb)
{
26d30: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
26d34: e24dd018 sub sp, sp, #24 <== NOT EXECUTED
26d38: e1a05001 mov r5, r1 <== NOT EXECUTED
26d3c: 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 ) )
26d40: eb0078ae bl 45000 <strlen> <== NOT EXECUTED
26d44: e28d4004 add r4, sp, #4 <== NOT EXECUTED
26d48: e1a01000 mov r1, r0 <== NOT EXECUTED
26d4c: e3a0c001 mov ip, #1 <== NOT EXECUTED
26d50: e1a00006 mov r0, r6 <== NOT EXECUTED
26d54: e3a02000 mov r2, #0 <== NOT EXECUTED
26d58: e1a03004 mov r3, r4 <== NOT EXECUTED
26d5c: e58dc000 str ip, [sp] <== NOT EXECUTED
26d60: ebff8235 bl 763c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
26d64: e2501000 subs r1, r0, #0 <== NOT EXECUTED
26d68: 1a000007 bne 26d8c <statvfs+0x5c> <== NOT EXECUTED
return -1;
mt_entry = loc.mt_entry;
26d6c: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED
fs_mount_root = &mt_entry->mt_fs_root;
26d70: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED
26d74: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED
26d78: e3530000 cmp r3, #0 <== NOT EXECUTED
26d7c: 1a000004 bne 26d94 <statvfs+0x64> <== NOT EXECUTED
if ( !fs_mount_root->ops->statvfs_h )
rtems_set_errno_and_return_minus_one( ENOTSUP );
26d80: eb005d90 bl 3e3c8 <__errno> <== NOT EXECUTED
26d84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
26d88: e5803000 str r3, [r0] <== NOT EXECUTED
26d8c: e3e05000 mvn r5, #0 <== NOT EXECUTED
26d90: ea000010 b 26dd8 <statvfs+0xa8> <== NOT EXECUTED
memset (sb, 0, sizeof (struct statvfs));
26d94: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED
26d98: e1a00005 mov r0, r5 <== NOT EXECUTED
26d9c: eb006ac0 bl 418a4 <memset> <== NOT EXECUTED
result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb );
26da0: e1a01005 mov r1, r5 <== NOT EXECUTED
26da4: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED
26da8: e286001c add r0, r6, #28 <== NOT EXECUTED
26dac: e1a0e00f mov lr, pc <== NOT EXECUTED
26db0: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
26db4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED
26db8: 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 );
26dbc: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
26dc0: 0a000004 beq 26dd8 <statvfs+0xa8> <== NOT EXECUTED
26dc4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
26dc8: e3530000 cmp r3, #0 <== NOT EXECUTED
26dcc: 11a00004 movne r0, r4 <== NOT EXECUTED
26dd0: 11a0e00f movne lr, pc <== NOT EXECUTED
26dd4: 112fff13 bxne r3 <== NOT EXECUTED
return result;
}
26dd8: e1a00005 mov r0, r5 <== NOT EXECUTED
26ddc: e28dd018 add sp, sp, #24 <== NOT EXECUTED
26de0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00026e30 <symlink>:
int symlink(
const char *actualpath,
const char *sympath
)
{
26e30: e92d4070 push {r4, r5, r6, lr}
26e34: e1a05001 mov r5, r1
26e38: e24dd01c sub sp, sp, #28
26e3c: 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 );
26e40: e28d1018 add r1, sp, #24
26e44: e1a00005 mov r0, r5
26e48: e1a0200d mov r2, sp
26e4c: ebff8833 bl 8f20 <rtems_filesystem_get_start_loc>
if ( !loc.ops->evalformake_h ) {
26e50: e59d300c ldr r3, [sp, #12]
26e54: e5933004 ldr r3, [r3, #4]
26e58: 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 );
26e5c: e1a0400d mov r4, sp
if ( !loc.ops->evalformake_h ) {
26e60: 0a000010 beq 26ea8 <symlink+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
}
result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
26e64: e59d0018 ldr r0, [sp, #24]
26e68: e1a0100d mov r1, sp
26e6c: e0850000 add r0, r5, r0
26e70: e28d2014 add r2, sp, #20
26e74: e1a0e00f mov lr, pc
26e78: e12fff13 bx r3
if ( result != 0 )
26e7c: e3500000 cmp r0, #0
26e80: 1a00000b bne 26eb4 <symlink+0x84>
return -1;
if ( !loc.ops->symlink_h ) {
26e84: e59d200c ldr r2, [sp, #12]
26e88: e5923038 ldr r3, [r2, #56] ; 0x38
26e8c: e3530000 cmp r3, #0
26e90: 1a000009 bne 26ebc <symlink+0x8c>
rtems_filesystem_freenode( &loc );
26e94: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
26e98: e3530000 cmp r3, #0 <== NOT EXECUTED
26e9c: 11a0000d movne r0, sp <== NOT EXECUTED
26ea0: 11a0e00f movne lr, pc <== NOT EXECUTED
26ea4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
26ea8: eb005d46 bl 3e3c8 <__errno> <== NOT EXECUTED
26eac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
26eb0: e5803000 str r3, [r0] <== NOT EXECUTED
26eb4: e3e05000 mvn r5, #0
26eb8: ea00000d b 26ef4 <symlink+0xc4>
}
result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
26ebc: e1a01006 mov r1, r6
26ec0: e1a0000d mov r0, sp
26ec4: e59d2014 ldr r2, [sp, #20]
26ec8: e1a0e00f mov lr, pc
26ecc: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
26ed0: e59d300c ldr r3, [sp, #12]
26ed4: 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);
26ed8: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc );
26edc: 0a000004 beq 26ef4 <symlink+0xc4>
26ee0: e593301c ldr r3, [r3, #28]
26ee4: e3530000 cmp r3, #0
26ee8: 11a0000d movne r0, sp
26eec: 11a0e00f movne lr, pc
26ef0: 112fff13 bxne r3
return result;
}
26ef4: e1a00005 mov r0, r5
26ef8: e28dd01c add sp, sp, #28
26efc: e8bd8070 pop {r4, r5, r6, pc}
00011114 <tcsetattr>:
int fd,
int opt,
struct termios *tp
)
{
switch (opt) {
11114: e3510000 cmp r1, #0
int tcsetattr(
int fd,
int opt,
struct termios *tp
)
{
11118: e92d4030 push {r4, r5, lr}
1111c: e1a04002 mov r4, r2
11120: e1a05000 mov r5, r0
switch (opt) {
11124: 0a00000a beq 11154 <tcsetattr+0x40>
11128: e3510001 cmp r1, #1 <== NOT EXECUTED
1112c: 0a000003 beq 11140 <tcsetattr+0x2c> <== NOT EXECUTED
default:
rtems_set_errno_and_return_minus_one( ENOTSUP );
11130: eb001501 bl 1653c <__errno> <== NOT EXECUTED
11134: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
11138: e5803000 str r3, [r0] <== NOT EXECUTED
1113c: ea000009 b 11168 <tcsetattr+0x54> <== NOT EXECUTED
case TCSADRAIN:
if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
11140: e3a01003 mov r1, #3 <== NOT EXECUTED
11144: e3a02000 mov r2, #0 <== NOT EXECUTED
11148: eb001065 bl 152e4 <ioctl> <== NOT EXECUTED
1114c: e3500000 cmp r0, #0 <== NOT EXECUTED
11150: ba000004 blt 11168 <tcsetattr+0x54> <== NOT EXECUTED
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
11154: e1a00005 mov r0, r5
11158: e1a02004 mov r2, r4
1115c: e3a01002 mov r1, #2
}
}
11160: e8bd4030 pop {r4, r5, lr}
return -1;
/*
* Fall through to....
*/
case TCSANOW:
return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
11164: ea00105e b 152e4 <ioctl>
}
}
11168: e3e00000 mvn r0, #0 <== NOT EXECUTED
1116c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000d68c <unlink>:
#include <rtems/seterr.h>
int unlink(
const char *path
)
{
d68c: e92d4070 push {r4, r5, r6, lr}
d690: e24dd030 sub sp, sp, #48 ; 0x30
d694: e1a06000 mov r6, r0
/*
* Get the node to be unlinked. Find the parent path first.
*/
parentpathlen = rtems_filesystem_dirname ( path );
d698: ebffd1a7 bl 1d3c <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
d69c: e2504000 subs r4, r0, #0
d6a0: e28d3018 add r3, sp, #24
d6a4: 1a000005 bne d6c0 <unlink+0x34>
rtems_filesystem_get_start_loc( path, &i, &parentloc );
d6a8: e1a02003 mov r2, r3
d6ac: e1a00006 mov r0, r6
d6b0: e28d102c add r1, sp, #44 ; 0x2c
d6b4: ebffd5a3 bl 2d48 <rtems_filesystem_get_start_loc>
d6b8: e1a05004 mov r5, r4
d6bc: ea000008 b d6e4 <unlink+0x58>
else {
result = rtems_filesystem_evaluate_path( path, parentpathlen,
d6c0: e3a0c000 mov ip, #0
d6c4: e1a00006 mov r0, r6
d6c8: e1a01004 mov r1, r4
d6cc: e3a02002 mov r2, #2
d6d0: e58dc000 str ip, [sp]
d6d4: ebffd1df bl 1e58 <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE,
&parentloc,
false );
if ( result != 0 )
d6d8: e3500000 cmp r0, #0
d6dc: 1a000072 bne d8ac <unlink+0x220>
d6e0: e3a05001 mov r5, #1
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
d6e4: e28de018 add lr, sp, #24
d6e8: e8be000f ldm lr!, {r0, r1, r2, r3}
d6ec: e28dc004 add ip, sp, #4
d6f0: e8ac000f stmia ip!, {r0, r1, r2, r3}
d6f4: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
d6f8: e0864004 add r4, r6, r4
/*
* Start from the parent to find the node that should be under it.
*/
loc = parentloc;
d6fc: e58c3000 str r3, [ip]
name = path + parentpathlen;
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
d700: e1a00004 mov r0, r4
d704: eb0007fb bl f6f8 <strlen>
d708: e1a01000 mov r1, r0
d70c: e1a00004 mov r0, r4
d710: ebffd179 bl 1cfc <rtems_filesystem_prefix_separators>
d714: e0846000 add r6, r4, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
d718: e1a00006 mov r0, r6
d71c: eb0007f5 bl f6f8 <strlen>
d720: e28d4004 add r4, sp, #4
d724: e3a0c000 mov ip, #0
d728: e1a01000 mov r1, r0
d72c: e1a0200c mov r2, ip
d730: e1a00006 mov r0, r6
d734: e1a03004 mov r3, r4
d738: e58dc000 str ip, [sp]
d73c: ebffd18d bl 1d78 <rtems_filesystem_evaluate_relative_path>
0, &loc, false );
if ( result != 0 ) {
d740: e3500000 cmp r0, #0
d744: 0a00000b beq d778 <unlink+0xec>
if ( free_parentloc )
d748: e3550000 cmp r5, #0
d74c: 0a000056 beq d8ac <unlink+0x220>
rtems_filesystem_freenode( &parentloc );
d750: e59d3024 ldr r3, [sp, #36] ; 0x24
d754: e3530000 cmp r3, #0
d758: 0a000053 beq d8ac <unlink+0x220>
d75c: e593301c ldr r3, [r3, #28]
d760: e3530000 cmp r3, #0
d764: 0a000050 beq d8ac <unlink+0x220>
d768: e28d0018 add r0, sp, #24
d76c: e1a0e00f mov lr, pc
d770: e12fff13 bx r3
d774: ea00004c b d8ac <unlink+0x220>
return -1;
}
if ( !loc.ops->node_type_h ) {
d778: e59d2010 ldr r2, [sp, #16]
d77c: e5923010 ldr r3, [r2, #16]
d780: e3530000 cmp r3, #0
d784: 0a00001c beq d7fc <unlink+0x170>
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 ) {
d788: e1a00004 mov r0, r4
d78c: e1a0e00f mov lr, pc
d790: e12fff13 bx r3
d794: e3500001 cmp r0, #1
d798: e59d2010 ldr r2, [sp, #16]
d79c: 1a000013 bne d7f0 <unlink+0x164>
rtems_filesystem_freenode( &loc );
d7a0: e3520000 cmp r2, #0
d7a4: 0a000004 beq d7bc <unlink+0x130>
d7a8: e592301c ldr r3, [r2, #28]
d7ac: e3530000 cmp r3, #0
d7b0: 11a00004 movne r0, r4
d7b4: 11a0e00f movne lr, pc
d7b8: 112fff13 bxne r3
if ( free_parentloc )
d7bc: e3550000 cmp r5, #0
d7c0: 0a000007 beq d7e4 <unlink+0x158>
rtems_filesystem_freenode( &parentloc );
d7c4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
d7c8: e3530000 cmp r3, #0 <== NOT EXECUTED
d7cc: 0a000004 beq d7e4 <unlink+0x158> <== NOT EXECUTED
d7d0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
d7d4: e3530000 cmp r3, #0 <== NOT EXECUTED
d7d8: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
d7dc: 11a0e00f movne lr, pc <== NOT EXECUTED
d7e0: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
d7e4: eb0003be bl e6e4 <__errno>
d7e8: e3a03015 mov r3, #21
d7ec: ea000013 b d840 <unlink+0x1b4>
}
if ( !loc.ops->unlink_h ) {
d7f0: e592300c ldr r3, [r2, #12]
d7f4: e3530000 cmp r3, #0
d7f8: 1a000012 bne d848 <unlink+0x1bc>
rtems_filesystem_freenode( &loc );
d7fc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
d800: e3530000 cmp r3, #0 <== NOT EXECUTED
d804: 11a00004 movne r0, r4 <== NOT EXECUTED
d808: 11a0e00f movne lr, pc <== NOT EXECUTED
d80c: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
d810: e3550000 cmp r5, #0 <== NOT EXECUTED
d814: 0a000007 beq d838 <unlink+0x1ac> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
d818: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED
d81c: e3530000 cmp r3, #0 <== NOT EXECUTED
d820: 0a000004 beq d838 <unlink+0x1ac> <== NOT EXECUTED
d824: e593301c ldr r3, [r3, #28] <== NOT EXECUTED
d828: e3530000 cmp r3, #0 <== NOT EXECUTED
d82c: 128d0018 addne r0, sp, #24 <== NOT EXECUTED
d830: 11a0e00f movne lr, pc <== NOT EXECUTED
d834: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
d838: eb0003a9 bl e6e4 <__errno> <== NOT EXECUTED
d83c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
d840: e5803000 str r3, [r0]
d844: ea000018 b d8ac <unlink+0x220>
}
result = (*loc.ops->unlink_h)( &parentloc, &loc );
d848: e28d0018 add r0, sp, #24
d84c: e1a01004 mov r1, r4
d850: e1a0e00f mov lr, pc
d854: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
d858: e59d3010 ldr r3, [sp, #16]
d85c: 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 );
d860: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc );
d864: 0a000004 beq d87c <unlink+0x1f0>
d868: e593301c ldr r3, [r3, #28]
d86c: e3530000 cmp r3, #0
d870: 11a00004 movne r0, r4
d874: 11a0e00f movne lr, pc
d878: 112fff13 bxne r3
if ( free_parentloc )
d87c: e3550000 cmp r5, #0
d880: 0a00000a beq d8b0 <unlink+0x224>
rtems_filesystem_freenode( &parentloc );
d884: e59d3024 ldr r3, [sp, #36] ; 0x24
d888: e3530000 cmp r3, #0
d88c: 0a000007 beq d8b0 <unlink+0x224>
d890: e593301c ldr r3, [r3, #28]
d894: e3530000 cmp r3, #0
d898: 0a000004 beq d8b0 <unlink+0x224>
d89c: e28d0018 add r0, sp, #24
d8a0: e1a0e00f mov lr, pc
d8a4: e12fff13 bx r3
d8a8: ea000000 b d8b0 <unlink+0x224>
d8ac: e3e06000 mvn r6, #0
return result;
}
d8b0: e1a00006 mov r0, r6
d8b4: e28dd030 add sp, sp, #48 ; 0x30
d8b8: e8bd8070 pop {r4, r5, r6, pc}
00026f88 <unmount>:
*/
int unmount(
const char *path
)
{
26f88: e92d4030 push {r4, r5, lr}
26f8c: e24dd018 sub sp, sp, #24
26f90: 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 ) )
26f94: eb007819 bl 45000 <strlen>
26f98: e28d4004 add r4, sp, #4
26f9c: e1a01000 mov r1, r0
26fa0: e3a0c001 mov ip, #1
26fa4: e1a00005 mov r0, r5
26fa8: e3a02000 mov r2, #0
26fac: e1a03004 mov r3, r4
26fb0: e58dc000 str ip, [sp]
26fb4: ebff81a0 bl 763c <rtems_filesystem_evaluate_path>
26fb8: e3500000 cmp r0, #0
26fbc: 1a00005b bne 27130 <unmount+0x1a8>
return -1;
mt_entry = loc.mt_entry;
26fc0: e59d5014 ldr r5, [sp, #20]
fs_mount_loc = &mt_entry->mt_point_node;
fs_root_loc = &mt_entry->mt_fs_root;
26fc4: e59d3004 ldr r3, [sp, #4]
26fc8: e595201c ldr r2, [r5, #28]
26fcc: e1520003 cmp r2, r3
26fd0: e59d3010 ldr r3, [sp, #16]
26fd4: 0a000009 beq 27000 <unmount+0x78>
/*
* 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 );
26fd8: e3530000 cmp r3, #0
26fdc: 0a000004 beq 26ff4 <unmount+0x6c>
26fe0: e593301c ldr r3, [r3, #28]
26fe4: e3530000 cmp r3, #0
26fe8: 11a00004 movne r0, r4
26fec: 11a0e00f movne lr, pc
26ff0: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
26ff4: eb005cf3 bl 3e3c8 <__errno>
26ff8: e3a0300d mov r3, #13
26ffc: ea000021 b 27088 <unmount+0x100>
/*
* Free the loc node and just use the nodes from the mt_entry .
*/
rtems_filesystem_freenode( &loc );
27000: e3530000 cmp r3, #0
27004: 0a000004 beq 2701c <unmount+0x94>
27008: e593301c ldr r3, [r3, #28]
2700c: e3530000 cmp r3, #0
27010: 11a00004 movne r0, r4
27014: 11a0e00f movne lr, pc
27018: 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;
2701c: e5953014 ldr r3, [r5, #20]
27020: e5933028 ldr r3, [r3, #40] ; 0x28
27024: e3530000 cmp r3, #0
27028: 0a000003 beq 2703c <unmount+0xb4>
fs_root_loc = &mt_entry->mt_fs_root;
2702c: e5953028 ldr r3, [r5, #40] ; 0x28
27030: e593302c ldr r3, [r3, #44] ; 0x2c
27034: e3530000 cmp r3, #0
27038: 1a000002 bne 27048 <unmount+0xc0>
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 );
2703c: eb005ce1 bl 3e3c8 <__errno> <== NOT EXECUTED
27040: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
27044: ea00000f b 27088 <unmount+0x100> <== NOT EXECUTED
* 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 )
27048: e59f30ec ldr r3, [pc, #236] ; 2713c <unmount+0x1b4>
2704c: e5933000 ldr r3, [r3]
27050: e5933014 ldr r3, [r3, #20]
27054: e1530005 cmp r3, r5
27058: 0a000008 beq 27080 <unmount+0xf8>
/*
* Verify there are no file systems below the path specified
*/
if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point,
2705c: e59f00dc ldr r0, [pc, #220] ; 27140 <unmount+0x1b8>
27060: e595102c ldr r1, [r5, #44] ; 0x2c
27064: ebff83fb bl 8058 <rtems_filesystem_mount_iterate>
27068: e3500000 cmp r0, #0
2706c: 1a000003 bne 27080 <unmount+0xf8>
* 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 )
27070: e1a00005 mov r0, r5
27074: ebff8261 bl 7a00 <rtems_libio_is_open_files_in_fs>
27078: e3500001 cmp r0, #1
2707c: 1a000003 bne 27090 <unmount+0x108>
rtems_set_errno_and_return_minus_one( EBUSY );
27080: eb005cd0 bl 3e3c8 <__errno>
27084: e3a03010 mov r3, #16
27088: e5803000 str r3, [r0]
2708c: ea000027 b 27130 <unmount+0x1a8>
* 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 )
27090: e5953014 ldr r3, [r5, #20]
27094: e1a00005 mov r0, r5
27098: e1a0e00f mov lr, pc
2709c: e593f028 ldr pc, [r3, #40] ; 0x28
270a0: e2504000 subs r4, r0, #0
270a4: 1a000021 bne 27130 <unmount+0x1a8>
* 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){
270a8: e5953028 ldr r3, [r5, #40] ; 0x28
270ac: e1a00005 mov r0, r5
270b0: e1a0e00f mov lr, pc
270b4: e593f02c ldr pc, [r3, #44] ; 0x2c
270b8: e2501000 subs r1, r0, #0
270bc: 0a000007 beq 270e0 <unmount+0x158>
if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
270c0: e1a00005 mov r0, r5 <== NOT EXECUTED
270c4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED
270c8: e1a0e00f mov lr, pc <== NOT EXECUTED
270cc: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED
270d0: e3500000 cmp r0, #0 <== NOT EXECUTED
270d4: 0a000015 beq 27130 <unmount+0x1a8> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
270d8: e1a00004 mov r0, r4 <== NOT EXECUTED
270dc: ebff93c8 bl c004 <rtems_fatal_error_occurred> <== 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 );
270e0: e59f405c ldr r4, [pc, #92] ; 27144 <unmount+0x1bc>
270e4: e1a02001 mov r2, r1
270e8: e5940000 ldr r0, [r4]
270ec: ebff91f3 bl b8c0 <rtems_semaphore_obtain>
*/
RTEMS_INLINE_ROUTINE void rtems_chain_extract(
rtems_chain_node *the_node
)
{
_Chain_Extract( the_node );
270f0: e1a00005 mov r0, r5
270f4: ebff94e4 bl c48c <_Chain_Extract>
}
static inline void rtems_libio_unlock( void )
{
rtems_semaphore_release( rtems_libio_semaphore );
270f8: e5940000 ldr r0, [r4]
270fc: ebff9235 bl b9d8 <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 );
27100: e5953014 ldr r3, [r5, #20]
27104: e3530000 cmp r3, #0
27108: 0a000004 beq 27120 <unmount+0x198>
2710c: e593301c ldr r3, [r3, #28]
27110: e3530000 cmp r3, #0
27114: 12850008 addne r0, r5, #8
27118: 11a0e00f movne lr, pc
2711c: 112fff13 bxne r3
free( mt_entry );
27120: e1a00005 mov r0, r5
27124: ebff8162 bl 76b4 <free>
27128: e3a00000 mov r0, #0
return 0;
2712c: ea000000 b 27134 <unmount+0x1ac>
27130: e3e00000 mvn r0, #0
}
27134: e28dd018 add sp, sp, #24
27138: e8bd8030 pop {r4, r5, pc}
00027148 <utime>:
int utime(
const char *path,
const struct utimbuf *times
)
{
27148: e92d4070 push {r4, r5, r6, lr}
2714c: e24dd018 sub sp, sp, #24
27150: e1a05001 mov r5, r1
27154: 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 ) )
27158: eb0077a8 bl 45000 <strlen>
2715c: e28d4004 add r4, sp, #4
27160: e1a01000 mov r1, r0
27164: e3a0c001 mov ip, #1
27168: e1a00006 mov r0, r6
2716c: e3a02000 mov r2, #0
27170: e1a03004 mov r3, r4
27174: e58dc000 str ip, [sp]
27178: ebff812f bl 763c <rtems_filesystem_evaluate_path>
2717c: e3500000 cmp r0, #0
27180: 1a00000b bne 271b4 <utime+0x6c>
return -1;
if ( !temp_loc.ops->utime_h ){
27184: e59d2010 ldr r2, [sp, #16]
27188: e5923030 ldr r3, [r2, #48] ; 0x30
2718c: e3530000 cmp r3, #0
27190: 1a000009 bne 271bc <utime+0x74>
rtems_filesystem_freenode( &temp_loc );
27194: e592301c ldr r3, [r2, #28] <== NOT EXECUTED
27198: e3530000 cmp r3, #0 <== NOT EXECUTED
2719c: 11a00004 movne r0, r4 <== NOT EXECUTED
271a0: 11a0e00f movne lr, pc <== NOT EXECUTED
271a4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
271a8: eb005c86 bl 3e3c8 <__errno> <== NOT EXECUTED
271ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
271b0: e5803000 str r3, [r0] <== NOT EXECUTED
271b4: e3e05000 mvn r5, #0
271b8: ea00000c b 271f0 <utime+0xa8>
}
result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
271bc: e8950006 ldm r5, {r1, r2}
271c0: e1a00004 mov r0, r4
271c4: e1a0e00f mov lr, pc
271c8: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
271cc: e59d3010 ldr r3, [sp, #16]
271d0: 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 );
271d4: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc );
271d8: 0a000004 beq 271f0 <utime+0xa8>
271dc: e593301c ldr r3, [r3, #28]
271e0: e3530000 cmp r3, #0
271e4: 11a00004 movne r0, r4
271e8: 11a0e00f movne lr, pc
271ec: 112fff13 bxne r3
return result;
}
271f0: e1a00005 mov r0, r5
271f4: e28dd018 add sp, sp, #24
271f8: e8bd8070 pop {r4, r5, r6, pc}
0001a498 <write>:
)
{
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a498: e59f30b0 ldr r3, [pc, #176] ; 1a550 <write+0xb8>
1a49c: e5933000 ldr r3, [r3]
1a4a0: e1500003 cmp r0, r3
ssize_t write(
int fd,
const void *buffer,
size_t count
)
{
1a4a4: e92d4070 push {r4, r5, r6, lr}
1a4a8: e1a05001 mov r5, r1
ssize_t rc;
rtems_libio_t *iop;
rtems_libio_check_fd( fd );
1a4ac: 2a00000f bcs 1a4f0 <write+0x58>
iop = rtems_libio_iop( fd );
1a4b0: e59f309c ldr r3, [pc, #156] ; 1a554 <write+0xbc>
1a4b4: e5934000 ldr r4, [r3]
1a4b8: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
1a4bc: e5943014 ldr r3, [r4, #20]
1a4c0: e3130c01 tst r3, #256 ; 0x100
1a4c4: 0a000009 beq 1a4f0 <write+0x58>
rtems_libio_check_buffer( buffer );
1a4c8: e3510000 cmp r1, #0
1a4cc: 1a000002 bne 1a4dc <write+0x44>
1a4d0: ebffd083 bl e6e4 <__errno> <== NOT EXECUTED
1a4d4: e3a03016 mov r3, #22 <== NOT EXECUTED
1a4d8: ea00000d b 1a514 <write+0x7c> <== NOT EXECUTED
rtems_libio_check_count( count );
1a4dc: e3520000 cmp r2, #0
1a4e0: 01a00002 moveq r0, r2
1a4e4: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
1a4e8: e3130004 tst r3, #4
1a4ec: 1a000002 bne 1a4fc <write+0x64>
1a4f0: ebffd07b bl e6e4 <__errno> <== NOT EXECUTED
1a4f4: e3a03009 mov r3, #9 <== NOT EXECUTED
1a4f8: ea000005 b 1a514 <write+0x7c> <== NOT EXECUTED
/*
* Now process the write() request.
*/
if ( !iop->handlers->write_h )
1a4fc: e594303c ldr r3, [r4, #60] ; 0x3c
1a500: e593300c ldr r3, [r3, #12]
1a504: e3530000 cmp r3, #0
1a508: 1a000004 bne 1a520 <write+0x88>
rtems_set_errno_and_return_minus_one( ENOTSUP );
1a50c: ebffd074 bl e6e4 <__errno> <== NOT EXECUTED
1a510: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1a514: e5803000 str r3, [r0] <== NOT EXECUTED
1a518: e3e00000 mvn r0, #0 <== NOT EXECUTED
1a51c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
1a520: e1a00004 mov r0, r4
1a524: e1a0e00f mov lr, pc
1a528: e12fff13 bx r3
if ( rc > 0 )
1a52c: e3500000 cmp r0, #0
1a530: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
1a534: e284600c add r6, r4, #12
1a538: e8960060 ldm r6, {r5, r6}
1a53c: e0952000 adds r2, r5, r0
1a540: e0a63fc0 adc r3, r6, r0, asr #31
1a544: e584200c str r2, [r4, #12]
1a548: e5843010 str r3, [r4, #16]
return rc;
}
1a54c: e8bd8070 pop {r4, r5, r6, pc}
00005b6c <writev>:
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
5b6c: e59f3158 ldr r3, [pc, #344] ; 5ccc <writev+0x160>
5b70: e5933000 ldr r3, [r3]
5b74: e1500003 cmp r0, r3
ssize_t writev(
int fd,
const struct iovec *iov,
int iovcnt
)
{
5b78: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr}
5b7c: e1a08002 mov r8, r2
int bytes;
rtems_libio_t *iop;
ssize_t old;
bool all_zeros;
rtems_libio_check_fd( fd );
5b80: 2a000007 bcs 5ba4 <writev+0x38>
iop = rtems_libio_iop( fd );
5b84: e59f3144 ldr r3, [pc, #324] ; 5cd0 <writev+0x164>
5b88: e5936000 ldr r6, [r3]
5b8c: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
5b90: e5963014 ldr r3, [r6, #20]
5b94: e3130c01 tst r3, #256 ; 0x100
5b98: 0a000001 beq 5ba4 <writev+0x38>
rtems_libio_check_permissions_with_error( iop, LIBIO_FLAGS_WRITE, EBADF );
5b9c: e3130004 tst r3, #4
5ba0: 1a000002 bne 5bb0 <writev+0x44>
5ba4: eb0026f4 bl f77c <__errno>
5ba8: e3a03009 mov r3, #9
5bac: ea000020 b 5c34 <writev+0xc8>
/*
* Argument validation on IO vector
*/
if ( !iov )
5bb0: e3510000 cmp r1, #0
5bb4: 0a00001c beq 5c2c <writev+0xc0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt <= 0 )
5bb8: e3520000 cmp r2, #0
5bbc: da00001a ble 5c2c <writev+0xc0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( iovcnt > IOV_MAX )
5bc0: e3520b01 cmp r2, #1024 ; 0x400
5bc4: ca000018 bgt 5c2c <writev+0xc0>
rtems_set_errno_and_return_minus_one( EINVAL );
if ( !iop->handlers->write_h )
5bc8: e596303c ldr r3, [r6, #60] ; 0x3c
5bcc: e593300c ldr r3, [r3, #12]
5bd0: e3530000 cmp r3, #0
5bd4: 1a000002 bne 5be4 <writev+0x78>
rtems_set_errno_and_return_minus_one( ENOTSUP );
5bd8: eb0026e7 bl f77c <__errno> <== NOT EXECUTED
5bdc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5be0: ea000013 b 5c34 <writev+0xc8> <== NOT EXECUTED
5be4: e3a03000 mov r3, #0
5be8: e1a05001 mov r5, r1
5bec: e1a02001 mov r2, r1
5bf0: e1a04003 mov r4, r3
5bf4: e3a07001 mov r7, #1
* entering the write loop.
*/
all_zeros = true;
for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) {
if ( !iov[v].iov_base )
5bf8: e5921000 ldr r1, [r2]
5bfc: e3510000 cmp r1, #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++ ) {
5c00: e2833001 add r3, r3, #1
if ( !iov[v].iov_base )
5c04: 0a000008 beq 5c2c <writev+0xc0>
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 )
5c08: e5920004 ldr r0, [r2, #4]
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
5c0c: e0841000 add r1, r4, r0
if ( total < old || total > SSIZE_MAX )
5c10: e1510004 cmp r1, r4
5c14: a3a04000 movge r4, #0
5c18: b3a04001 movlt r4, #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 )
5c1c: e3500000 cmp r0, #0
5c20: 13a07000 movne r7, #0
all_zeros = false;
/* check for wrap */
old = total;
total += iov[v].iov_len;
if ( total < old || total > SSIZE_MAX )
5c24: e1944fa1 orrs r4, r4, r1, lsr #31
5c28: 0a000003 beq 5c3c <writev+0xd0>
rtems_set_errno_and_return_minus_one( EINVAL );
5c2c: eb0026d2 bl f77c <__errno>
5c30: e3a03016 mov r3, #22
5c34: e5803000 str r3, [r0]
5c38: ea000011 b 5c84 <writev+0x118>
* 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++ ) {
5c3c: e1530008 cmp r3, r8
5c40: e2822008 add r2, r2, #8
5c44: b1a04001 movlt r4, r1
5c48: baffffea blt 5bf8 <writev+0x8c>
}
/*
* A writev with all zeros is supposed to have no effect per OpenGroup.
*/
if ( all_zeros == true ) {
5c4c: e3570000 cmp r7, #0
5c50: 1a00001b bne 5cc4 <writev+0x158>
5c54: e1a04007 mov r4, r7
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
5c58: e5952004 ldr r2, [r5, #4]
5c5c: e3520000 cmp r2, #0
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5c60: e2877001 add r7, r7, #1
/* all zero lengths has no effect */
if ( iov[v].iov_len == 0 )
5c64: 0a000013 beq 5cb8 <writev+0x14c>
continue;
bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
5c68: e5951000 ldr r1, [r5]
5c6c: e596303c ldr r3, [r6, #60] ; 0x3c
5c70: e1a00006 mov r0, r6
5c74: e1a0e00f mov lr, pc
5c78: e593f00c ldr pc, [r3, #12]
if ( bytes < 0 )
5c7c: e3500000 cmp r0, #0
5c80: aa000001 bge 5c8c <writev+0x120>
5c84: e3e04000 mvn r4, #0
5c88: ea00000d b 5cc4 <writev+0x158>
return -1;
if ( bytes > 0 ) {
5c8c: 0a000006 beq 5cac <writev+0x140>
iop->offset += bytes;
5c90: e286c00c add ip, r6, #12
5c94: e89c1800 ldm ip, {fp, ip}
5c98: e09b2000 adds r2, fp, r0
5c9c: e0ac3fc0 adc r3, ip, r0, asr #31
5ca0: e586200c str r2, [r6, #12]
5ca4: e5863010 str r3, [r6, #16]
total += bytes;
5ca8: e0844000 add r4, r4, r0
}
if (bytes != iov[ v ].iov_len)
5cac: e5953004 ldr r3, [r5, #4]
5cb0: e1500003 cmp r0, r3
5cb4: 1a000002 bne 5cc4 <writev+0x158>
}
/*
* Now process the writev().
*/
for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5cb8: e1570008 cmp r7, r8
5cbc: e2855008 add r5, r5, #8
5cc0: baffffe4 blt 5c58 <writev+0xec>
if (bytes != iov[ v ].iov_len)
break;
}
return total;
}
5cc4: e1a00004 mov r0, r4
5cc8: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}