Annotated Report
00008138 <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 ) {
8138: e5903000 ldr r3, [r0] 813c: 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;
8140: e5903010 ldr r3, [r0, #16]
switch( node->type ) {
8144: 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;
8148: e5933034 ldr r3, [r3, #52] ; 0x34
switch( node->type ) {
814c: e3520006 cmp r2, #6 8150: 979ff102 ldrls pc, [pc, r2, lsl #2]
8154: ea000010 b 819c <IMFS_Set_handlers+0x64> <== NOT EXECUTED 8158: 00008174 .word 0x00008174 <== NOT EXECUTED 815c: 0000817c .word 0x0000817c <== NOT EXECUTED 8160: 00008184 .word 0x00008184 <== NOT EXECUTED 8164: 00008184 .word 0x00008184 <== NOT EXECUTED 8168: 0000818c .word 0x0000818c <== NOT EXECUTED 816c: 0000818c .word 0x0000818c <== NOT EXECUTED 8170: 00008194 .word 0x00008194 <== NOT EXECUTED
case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers;
8174: e593300c ldr r3, [r3, #12] 8178: ea000006 b 8198 <IMFS_Set_handlers+0x60>
break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers;
817c: e59f3020 ldr r3, [pc, #32] ; 81a4 <IMFS_Set_handlers+0x6c> 8180: ea000004 b 8198 <IMFS_Set_handlers+0x60>
break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers;
8184: e59f301c ldr r3, [pc, #28] ; 81a8 <IMFS_Set_handlers+0x70> 8188: ea000002 b 8198 <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;
818c: e5933008 ldr r3, [r3, #8] 8190: ea000000 b 8198 <IMFS_Set_handlers+0x60>
break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers;
8194: e59f3010 ldr r3, [pc, #16] ; 81ac <IMFS_Set_handlers+0x74> 8198: e5803008 str r3, [r0, #8]
break; } return 0; }
819c: e3a00000 mov r0, #0 81a0: e12fff1e bx lr
0000cba0 <IMFS_chown>: int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) {
cba0: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} cba4: e1a02802 lsl r2, r2, #16 cba8: 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;
cbac: e5904000 ldr r4, [r0]
int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) {
cbb0: e1a07821 lsr r7, r1, #16 cbb4: 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();
cbb8: eb000448 bl dce0 <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
cbbc: e1d453bc ldrh r5, [r4, #60] ; 0x3c cbc0: e3500000 cmp r0, #0 cbc4: 11550000 cmpne r5, r0 cbc8: 03a05000 moveq r5, #0 cbcc: 13a05001 movne r5, #1
cbd0: 0a000004 beq cbe8 <IMFS_chown+0x48> rtems_set_errno_and_return_minus_one( EPERM );
cbd4: eb0014b4 bl 11eac <__errno> <== NOT EXECUTED cbd8: e3a03001 mov r3, #1 <== NOT EXECUTED cbdc: e5803000 str r3, [r0] <== NOT EXECUTED cbe0: e3e00000 mvn r0, #0 <== NOT EXECUTED cbe4: ea000007 b cc08 <IMFS_chown+0x68> <== NOT EXECUTED
#endif jnode->st_uid = owner;
cbe8: e1c473bc strh r7, [r4, #60] ; 0x3c
jnode->st_gid = group;
cbec: e1c463be strh r6, [r4, #62] ; 0x3e
IMFS_update_ctime( jnode );
cbf0: e1a0000d mov r0, sp cbf4: e1a01005 mov r1, r5 cbf8: ebffd896 bl 2e58 <gettimeofday> cbfc: e59d3000 ldr r3, [sp] cc00: e5843048 str r3, [r4, #72] ; 0x48 cc04: e1a00005 mov r0, r5
return 0; }
cc08: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc}
0000b668 <IMFS_create_node>: IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
b668: 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 )
b66c: e2504000 subs r4, r0, #0
IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) {
b670: e1a05001 mov r5, r1 b674: e59d6014 ldr r6, [sp, #20] b678: e1a01002 mov r1, r2
IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL )
b67c: 01a07004 moveq r7, r4
b680: 0a000041 beq b78c <IMFS_create_node+0x124> return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask );
b684: e59f2108 ldr r2, [pc, #264] ; b794 <IMFS_create_node+0x12c> b688: e5922000 ldr r2, [r2] b68c: e592202c ldr r2, [r2, #44] ; 0x2c b690: e1a00005 mov r0, r5 b694: e1c32002 bic r2, r3, r2 b698: ebffffc4 bl b5b0 <IMFS_allocate_node>
if ( !node )
b69c: e2507000 subs r7, r0, #0
b6a0: 0a000039 beq b78c <IMFS_create_node+0x124> return NULL; /* * Set the type specific information */ switch (type) {
b6a4: e2455001 sub r5, r5, #1 b6a8: e3550006 cmp r5, #6 b6ac: 979ff105 ldrls pc, [pc, r5, lsl #2]
b6b0: ea000025 b b74c <IMFS_create_node+0xe4> <== NOT EXECUTED b6b4: 0000b6d0 .word 0x0000b6d0 <== NOT EXECUTED b6b8: 0000b6f4 .word 0x0000b6f4 <== NOT EXECUTED b6bc: 0000b6ec .word 0x0000b6ec <== NOT EXECUTED b6c0: 0000b6ec .word 0x0000b6ec <== NOT EXECUTED b6c4: 0000b71c .word 0x0000b71c <== NOT EXECUTED b6c8: 0000b704 .word 0x0000b704 <== NOT EXECUTED b6cc: 0000b740 .word 0x0000b740 <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
b6d0: e2872054 add r2, r7, #84 ; 0x54
the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain);
b6d4: e2873050 add r3, r7, #80 ; 0x50
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
b6d8: e5872050 str r2, [r7, #80] ; 0x50
the_chain->permanent_null = NULL;
b6dc: e3a02000 mov r2, #0 b6e0: e5872054 str r2, [r7, #84] ; 0x54
the_chain->last = _Chain_Head(the_chain);
b6e4: e5873058 str r3, [r7, #88] ; 0x58 b6e8: ea00001c b b760 <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;
b6ec: e5963000 ldr r3, [r6] b6f0: ea000013 b b744 <IMFS_create_node+0xdc>
break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor;
b6f4: 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;
b6f8: e5963000 ldr r3, [r6]
node->info.device.minor = info->device.minor;
b6fc: e5872054 str r2, [r7, #84] ; 0x54 b700: ea00000f b b744 <IMFS_create_node+0xdc>
break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0;
b704: e3a03000 mov r3, #0 <== NOT EXECUTED b708: e3a02000 mov r2, #0 <== NOT EXECUTED b70c: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED b710: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED
node->info.linearfile.direct = 0;
b714: e3a03000 mov r3, #0 <== NOT EXECUTED b718: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED
case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0;
b71c: 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;
b720: e3a01000 mov r1, #0 b724: e3a02000 mov r2, #0 b728: e5871050 str r1, [r7, #80] ; 0x50 b72c: e5872054 str r2, [r7, #84] ; 0x54
node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0;
b730: 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;
b734: e5873058 str r3, [r7, #88] ; 0x58
node->info.file.doubly_indirect = 0;
b738: e587305c str r3, [r7, #92] ; 0x5c
node->info.file.triply_indirect = 0; break;
b73c: ea000007 b b760 <IMFS_create_node+0xf8>
case IMFS_FIFO: node->info.fifo.pipe = NULL;
b740: e3a03000 mov r3, #0 b744: e5873050 str r3, [r7, #80] ; 0x50
break;
b748: ea000004 b b760 <IMFS_create_node+0xf8>
default: assert(0);
b74c: e59f0044 ldr r0, [pc, #68] ; b798 <IMFS_create_node+0x130> <== NOT EXECUTED b750: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED b754: e59f2040 ldr r2, [pc, #64] ; b79c <IMFS_create_node+0x134> <== NOT EXECUTED b758: e59f3040 ldr r3, [pc, #64] ; b7a0 <IMFS_create_node+0x138> <== NOT EXECUTED b75c: ebfff5ee bl 8f1c <__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;
b760: e5943010 ldr r3, [r4, #16] b764: e5932034 ldr r2, [r3, #52] ; 0x34
node->Parent = parent; node->st_ino = ++fs_info->ino_count;
b768: e5923004 ldr r3, [r2, #4]
} /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access;
b76c: e5940000 ldr r0, [r4]
fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count;
b770: e2833001 add r3, r3, #1 b774: 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;
b778: e5870008 str r0, [r7, #8]
node->st_ino = ++fs_info->ino_count;
b77c: e5873038 str r3, [r7, #56] ; 0x38
RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node );
b780: e2800050 add r0, r0, #80 ; 0x50 b784: e1a01007 mov r1, r7 b788: ebffe704 bl 53a0 <_Chain_Append>
rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; }
b78c: e1a00007 mov r0, r7 b790: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003dd8 <IMFS_dump_directory>: rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory );
3dd8: e3500000 cmp r0, #0
void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) {
3ddc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 3de0: e1a05001 mov r5, r1
rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory );
3de4: 059f00a4 ldreq r0, [pc, #164] ; 3e90 <IMFS_dump_directory+0xb8> 3de8: 03a01084 moveq r1, #132 ; 0x84 3dec: 059f20a0 ldreq r2, [pc, #160] ; 3e94 <IMFS_dump_directory+0xbc> 3df0: 059f30a0 ldreq r3, [pc, #160] ; 3e98 <IMFS_dump_directory+0xc0>
3df4: 0a000005 beq 3e10 <IMFS_dump_directory+0x38> assert( level >= 0 );
3df8: e3510000 cmp r1, #0
3dfc: aa000004 bge 3e14 <IMFS_dump_directory+0x3c>
3e00: e59f0088 ldr r0, [pc, #136] ; 3e90 <IMFS_dump_directory+0xb8><== NOT EXECUTED 3e04: e59f2088 ldr r2, [pc, #136] ; 3e94 <IMFS_dump_directory+0xbc><== NOT EXECUTED 3e08: e59f308c ldr r3, [pc, #140] ; 3e9c <IMFS_dump_directory+0xc4><== NOT EXECUTED 3e0c: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 3e10: eb000212 bl 4660 <__assert_func> <== NOT EXECUTED
assert( the_directory->type == IMFS_DIRECTORY );
3e14: e590304c ldr r3, [r0, #76] ; 0x4c 3e18: e3530001 cmp r3, #1 3e1c: 159f006c ldrne r0, [pc, #108] ; 3e90 <IMFS_dump_directory+0xb8> 3e20: 13a01088 movne r1, #136 ; 0x88 3e24: 159f2068 ldrne r2, [pc, #104] ; 3e94 <IMFS_dump_directory+0xbc> 3e28: 159f3070 ldrne r3, [pc, #112] ; 3ea0 <IMFS_dump_directory+0xc8>
3e2c: 1afffff7 bne 3e10 <IMFS_dump_directory+0x38> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
3e30: e280a054 add sl, r0, #84 ; 0x54
the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
3e34: 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, "...." );
3e38: e59f8064 ldr r8, [pc, #100] ; 3ea4 <IMFS_dump_directory+0xcc>
IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 );
3e3c: e2817001 add r7, r1, #1
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
3e40: ea00000f b 3e84 <IMFS_dump_directory+0xac>
!rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node;
3e44: e3a06000 mov r6, #0
for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." );
3e48: 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++ )
3e4c: e2866001 add r6, r6, #1
fprintf(stdout, "...." );
3e50: e5931008 ldr r1, [r3, #8] 3e54: e59f004c ldr r0, [pc, #76] ; 3ea8 <IMFS_dump_directory+0xd0> 3e58: eb003aa1 bl 128e4 <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++ )
3e5c: e1560005 cmp r6, r5
3e60: dafffff8 ble 3e48 <IMFS_dump_directory+0x70> fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode );
3e64: e1a00004 mov r0, r4 3e68: ebffff7e bl 3c68 <IMFS_print_jnode>
if ( the_jnode->type == IMFS_DIRECTORY )
3e6c: e594304c ldr r3, [r4, #76] ; 0x4c 3e70: e3530001 cmp r3, #1
IMFS_dump_directory( the_jnode, level + 1 );
3e74: 01a00004 moveq r0, r4 3e78: 01a01007 moveq r1, r7 3e7c: 0bffffd5 bleq 3dd8 <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 ) {
3e80: e5944000 ldr r4, [r4]
assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first;
3e84: e154000a cmp r4, sl
3e88: 1affffed bne 3e44 <IMFS_dump_directory+0x6c> fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } }
3e8c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00008340 <IMFS_eval_path>: const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
8340: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8344: e24dd040 sub sp, sp, #64 ; 0x40 8348: e1a04003 mov r4, r3 834c: e1a0a000 mov sl, r0 8350: e1a06001 mov r6, r1 8354: e58d2000 str r2, [sp]
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
8358: e5935000 ldr r5, [r3] 835c: e3a09001 mov r9, #1 8360: e3a07000 mov r7, #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 );
8364: e28d8004 add r8, sp, #4
/* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
8368: ea000054 b 84c0 <IMFS_eval_path+0x180>
type = IMFS_get_token( &pathname[i], pathnamelen, token, &len );
836c: e28d303c add r3, sp, #60 ; 0x3c 8370: e08a0007 add r0, sl, r7 8374: e1a01006 mov r1, r6 8378: e1a02008 mov r2, r8 837c: eb0001e7 bl 8b20 <IMFS_get_token>
pathnamelen -= len; i += len; if ( !pathloc->node_access )
8380: e5943000 ldr r3, [r4] 8384: 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 );
8388: e1a09000 mov r9, r0
pathnamelen -= len;
838c: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len; if ( !pathloc->node_access ) 8390: 0a000042 beq 84a0 <IMFS_eval_path+0x160> rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH )
8394: e3500000 cmp r0, #0
8398: 0a000006 beq 83b8 <IMFS_eval_path+0x78> if ( node->type == IMFS_DIRECTORY )
839c: e595104c ldr r1, [r5, #76] ; 0x4c 83a0: e3510001 cmp r1, #1
83a4: 1a000003 bne 83b8 <IMFS_eval_path+0x78> if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
83a8: e1a00004 mov r0, r4 83ac: ebffff7f bl 81b0 <IMFS_evaluate_permission> 83b0: e3500000 cmp r0, #0
83b4: 0a000068 beq 855c <IMFS_eval_path+0x21c> rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) {
83b8: 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;
83bc: 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;
83c0: 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;
83c4: e5945000 ldr r5, [r4]
switch( type ) { 83c8: 0a000013 beq 841c <IMFS_eval_path+0xdc>
83cc: e3590004 cmp r9, #4
83d0: 0a000037 beq 84b4 <IMFS_eval_path+0x174>
83d4: e3590002 cmp r9, #2
83d8: 1a000038 bne 84c0 <IMFS_eval_path+0x180> case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
83dc: e59f2194 ldr r2, [pc, #404] ; 8578 <IMFS_eval_path+0x238> 83e0: e5923000 ldr r3, [r2] 83e4: e5933018 ldr r3, [r3, #24] 83e8: e1550003 cmp r5, r3
83ec: 0a000033 beq 84c0 <IMFS_eval_path+0x180> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) {
83f0: e594e010 ldr lr, [r4, #16]
/* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access ==
83f4: e59e301c ldr r3, [lr, #28] 83f8: e1550003 cmp r5, r3
*/ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node;
83fc: 028ee008 addeq lr, lr, #8
8400: 0a000038 beq 84e8 <IMFS_eval_path+0x1a8> pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent )
8404: e5955008 ldr r5, [r5, #8] 8408: e3550000 cmp r5, #0
840c: 1a000026 bne 84ac <IMFS_eval_path+0x16c> rtems_set_errno_and_return_minus_one( ENOENT );
8410: eb001253 bl cd64 <__errno> 8414: e5809000 str r9, [r0] 8418: ea000052 b 8568 <IMFS_eval_path+0x228>
case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) {
841c: e595304c ldr r3, [r5, #76] ; 0x4c 8420: e3530003 cmp r3, #3
8424: 1a000006 bne 8444 <IMFS_eval_path+0x104> IMFS_evaluate_hard_link( pathloc, 0 );
8428: e1a00004 mov r0, r4 842c: e3a01000 mov r1, #0 8430: ebffff71 bl 81fc <IMFS_evaluate_hard_link>
node = pathloc->node_access;
8434: e5945000 ldr r5, [r4]
if ( !node )
8438: e3550000 cmp r5, #0
843c: 1a000009 bne 8468 <IMFS_eval_path+0x128>
8440: ea00000b b 8474 <IMFS_eval_path+0x134> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) {
8444: e3530004 cmp r3, #4
8448: 1a000006 bne 8468 <IMFS_eval_path+0x128> result = IMFS_evaluate_sym_link( pathloc, 0 );
844c: e1a00004 mov r0, r4 8450: e3a01000 mov r1, #0 8454: ebffff7f bl 8258 <IMFS_evaluate_sym_link>
node = pathloc->node_access; if ( result == -1 )
8458: 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 );
845c: e1a0b000 mov fp, r0
node = pathloc->node_access;
8460: e5945000 ldr r5, [r4]
if ( result == -1 ) 8464: 0a000040 beq 856c <IMFS_eval_path+0x22c> /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
8468: e595304c ldr r3, [r5, #76] ; 0x4c 846c: e3530001 cmp r3, #1
8470: 0a000002 beq 8480 <IMFS_eval_path+0x140> rtems_set_errno_and_return_minus_one( ENOTDIR );
8474: eb00123a bl cd64 <__errno> 8478: e3a03014 mov r3, #20 847c: ea000038 b 8564 <IMFS_eval_path+0x224>
/* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) {
8480: e595e05c ldr lr, [r5, #92] ; 0x5c 8484: e35e0000 cmp lr, #0
8488: 1a000015 bne 84e4 <IMFS_eval_path+0x1a4> /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
848c: e1a00005 mov r0, r5 8490: e1a01008 mov r1, r8 8494: eb000179 bl 8a80 <IMFS_find_match_in_dir>
if ( !node )
8498: e2505000 subs r5, r0, #0
849c: 1a000002 bne 84ac <IMFS_eval_path+0x16c> rtems_set_errno_and_return_minus_one( ENOENT );
84a0: eb00122f bl cd64 <__errno> 84a4: e3a03002 mov r3, #2 84a8: ea00002d b 8564 <IMFS_eval_path+0x224>
/* * Set the node access to the point we have found. */ pathloc->node_access = node;
84ac: e5845000 str r5, [r4] 84b0: ea000002 b 84c0 <IMFS_eval_path+0x180>
case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
84b4: eb00122a bl cd64 <__errno> 84b8: e3a0305b mov r3, #91 ; 0x5b 84bc: ea000028 b 8564 <IMFS_eval_path+0x224>
/* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) {
84c0: e3590004 cmp r9, #4 84c4: 13590000 cmpne r9, #0
84c8: 1affffa7 bne 836c <IMFS_eval_path+0x2c> * 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 ) {
84cc: e595304c ldr r3, [r5, #76] ; 0x4c 84d0: e3530001 cmp r3, #1
84d4: 1a000018 bne 853c <IMFS_eval_path+0x1fc> if ( node->info.directory.mt_fs != NULL ) {
84d8: e595e05c ldr lr, [r5, #92] ; 0x5c 84dc: e35e0000 cmp lr, #0
84e0: 0a000015 beq 853c <IMFS_eval_path+0x1fc> newloc = node->info.directory.mt_fs->mt_fs_root;
84e4: e28ee01c add lr, lr, #28 84e8: e8be000f ldm lr!, {r0, r1, r2, r3} 84ec: e28dc028 add ip, sp, #40 ; 0x28 84f0: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
84f4: e28d5028 add r5, sp, #40 ; 0x28 84f8: e8b5000f ldm r5!, {r0, r1, r2, r3} 84fc: e1a05004 mov r5, r4
* 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 ) { newloc = node->info.directory.mt_fs->mt_fs_root;
8500: e59ee000 ldr lr, [lr]
*pathloc = newloc;
8504: e8a5000f stmia r5!, {r0, r1, r2, r3}
return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8508: e59d103c ldr r1, [sp, #60] ; 0x3c
*/ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc;
850c: e585e000 str lr, [r5]
* NOTE: The behavior of stat() on a mount point appears to be questionable. */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root;
8510: e58ce000 str lr, [ip]
*pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len],
8514: e0610007 rsb r0, r1, r7 8518: e08a0000 add r0, sl, r0 851c: e0861001 add r1, r6, r1 8520: e59d2000 ldr r2, [sp] 8524: e1a03004 mov r3, r4 8528: e594c00c ldr ip, [r4, #12] 852c: e1a0e00f mov lr, pc 8530: e59cf000 ldr pc, [ip] 8534: e1a0b000 mov fp, r0 8538: ea00000b b 856c <IMFS_eval_path+0x22c>
flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
853c: e1a00004 mov r0, r4 8540: ebfffefc bl 8138 <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) )
8544: e59d1000 ldr r1, [sp]
flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc );
8548: e1a0b000 mov fp, r0
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) )
854c: e1a00004 mov r0, r4 8550: ebffff16 bl 81b0 <IMFS_evaluate_permission> 8554: e3500000 cmp r0, #0
8558: 1a000003 bne 856c <IMFS_eval_path+0x22c> rtems_set_errno_and_return_minus_one( EACCES );
855c: eb001200 bl cd64 <__errno> 8560: e3a0300d mov r3, #13 8564: e5803000 str r3, [r0] 8568: e3e0b000 mvn fp, #0
return result; }
856c: e1a0000b mov r0, fp 8570: e28dd040 add sp, sp, #64 ; 0x40 8574: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
00008630 <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 */ ) {
8630: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8634: e24dd040 sub sp, sp, #64 ; 0x40 8638: e1a04001 mov r4, r1
/* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access;
863c: 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 */ ) {
8640: e58d2000 str r2, [sp] 8644: e1a07000 mov r7, r0
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
8648: eb0015b6 bl dd28 <strlen>
case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access )
864c: e59fa224 ldr sl, [pc, #548] ; 8878 <IMFS_evaluate_for_make+0x248>
node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path );
8650: e3a05000 mov r5, #0 8654: e1a08000 mov r8, r0
* Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len );
8658: e1a01008 mov r1, r8 865c: e28d303c add r3, sp, #60 ; 0x3c 8660: e0870005 add r0, r7, r5 8664: e28d2004 add r2, sp, #4 8668: eb00012c bl 8b20 <IMFS_get_token>
pathlen -= len; i += len; if ( !pathloc->node_access )
866c: e5943000 ldr r3, [r4]
*/ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len;
8670: e59db03c ldr fp, [sp, #60] ; 0x3c
i += len; if ( !pathloc->node_access )
8674: 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 );
8678: e1a09000 mov r9, r0
pathlen -= len;
867c: e06b8008 rsb r8, fp, r8
i += len; if ( !pathloc->node_access ) 8680: 0a000060 beq 8808 <IMFS_evaluate_for_make+0x1d8> /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH )
8684: e3500000 cmp r0, #0
8688: 0a000006 beq 86a8 <IMFS_evaluate_for_make+0x78> if ( node->type == IMFS_DIRECTORY )
868c: e596104c ldr r1, [r6, #76] ; 0x4c 8690: e3510001 cmp r1, #1
8694: 1a000003 bne 86a8 <IMFS_evaluate_for_make+0x78> if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) )
8698: e1a00004 mov r0, r4 869c: ebfffec3 bl 81b0 <IMFS_evaluate_permission> 86a0: e3500000 cmp r0, #0
86a4: 0a00006c beq 885c <IMFS_evaluate_for_make+0x22c> rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access;
86a8: e5943000 ldr r3, [r4]
while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len;
86ac: e085500b add r5, r5, fp
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;
86b0: e1a06003 mov r6, r3
switch( type ) {
86b4: e3590004 cmp r9, #4 86b8: 979ff109 ldrls pc, [pc, r9, lsl #2]
86bc: eaffffe5 b 8658 <IMFS_evaluate_for_make+0x28> <== NOT EXECUTED 86c0: 000087c4 .word 0x000087c4 <== NOT EXECUTED 86c4: 00008658 .word 0x00008658 <== NOT EXECUTED 86c8: 000086d4 .word 0x000086d4 <== NOT EXECUTED 86cc: 00008708 .word 0x00008708 <== NOT EXECUTED 86d0: 000087d0 .word 0x000087d0 <== 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 )
86d4: e59a2000 ldr r2, [sl] 86d8: e5922018 ldr r2, [r2, #24] 86dc: e1530002 cmp r3, r2
86e0: 0affffdc beq 8658 <IMFS_evaluate_for_make+0x28> /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){
86e4: e594e010 ldr lr, [r4, #16] 86e8: e59e201c ldr r2, [lr, #28] 86ec: e1530002 cmp r3, r2
if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node;
86f0: 028ee008 addeq lr, lr, #8
86f4: 0a000018 beq 875c <IMFS_evaluate_for_make+0x12c> *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent )
86f8: e5936008 ldr r6, [r3, #8] 86fc: e3560000 cmp r6, #0
8700: 1a00002d bne 87bc <IMFS_evaluate_for_make+0x18c>
8704: ea00003f b 8808 <IMFS_evaluate_for_make+0x1d8>
pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) {
8708: e593304c ldr r3, [r3, #76] ; 0x4c 870c: e3530003 cmp r3, #3
8710: 0a000001 beq 871c <IMFS_evaluate_for_make+0xec> result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) {
8714: e3530004 cmp r3, #4
8718: 1a000005 bne 8734 <IMFS_evaluate_for_make+0x104> result = IMFS_evaluate_link( pathloc, 0 );
871c: e1a00004 mov r0, r4 8720: e3a01000 mov r1, #0 8724: ebffff94 bl 857c <IMFS_evaluate_link>
if ( result == -1 )
8728: e3700001 cmn r0, #1
if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 );
872c: e1a06000 mov r6, r0
if ( result == -1 ) 8730: 0a00004d beq 886c <IMFS_evaluate_for_make+0x23c> return -1; } node = pathloc->node_access;
8734: e5940000 ldr r0, [r4]
if ( !node )
8738: e3500000 cmp r0, #0
873c: 0a00003e beq 883c <IMFS_evaluate_for_make+0x20c> /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY )
8740: e590304c ldr r3, [r0, #76] ; 0x4c 8744: e3530001 cmp r3, #1
8748: 1a00003b bne 883c <IMFS_evaluate_for_make+0x20c> /* * If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) {
874c: e590e05c ldr lr, [r0, #92] ; 0x5c 8750: e35e0000 cmp lr, #0
8754: 0a000014 beq 87ac <IMFS_evaluate_for_make+0x17c> newloc = node->info.directory.mt_fs->mt_fs_root;
8758: e28ee01c add lr, lr, #28 875c: e8be000f ldm lr!, {r0, r1, r2, r3} 8760: e28dc028 add ip, sp, #40 ; 0x28 8764: e8ac000f stmia ip!, {r0, r1, r2, r3}
*pathloc = newloc;
8768: e28d6028 add r6, sp, #40 ; 0x28 876c: e8b6000f ldm r6!, {r0, r1, r2, r3} 8770: e1a06004 mov r6, r4
* If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root;
8774: e59ee000 ldr lr, [lr]
*pathloc = newloc;
8778: e8a6000f stmia r6!, {r0, r1, r2, r3}
return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
877c: e59d303c ldr r3, [sp, #60] ; 0x3c
* new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc;
8780: e586e000 str lr, [r6]
* If we are at a node that is a mount point. Set loc to the * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root;
8784: e58ce000 str lr, [ip]
*pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name );
8788: e0635005 rsb r5, r3, r5 878c: e0870005 add r0, r7, r5 8790: e1a01004 mov r1, r4 8794: e59d2000 ldr r2, [sp] 8798: e594300c ldr r3, [r4, #12] 879c: e1a0e00f mov lr, pc 87a0: e593f004 ldr pc, [r3, #4] 87a4: e1a06000 mov r6, r0 87a8: ea00002f b 886c <IMFS_evaluate_for_make+0x23c>
/* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token );
87ac: e28d1004 add r1, sp, #4 87b0: eb0000b2 bl 8a80 <IMFS_find_match_in_dir>
/* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node )
87b4: e2506000 subs r6, r0, #0
87b8: 0a000007 beq 87dc <IMFS_evaluate_for_make+0x1ac> done = true; else pathloc->node_access = node;
87bc: e5846000 str r6, [r4] 87c0: eaffffa4 b 8658 <IMFS_evaluate_for_make+0x28>
break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST );
87c4: eb001166 bl cd64 <__errno> 87c8: e3a03011 mov r3, #17 87cc: ea000024 b 8864 <IMFS_evaluate_for_make+0x234>
break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG );
87d0: eb001163 bl cd64 <__errno> 87d4: e3a0305b mov r3, #91 ; 0x5b 87d8: ea000021 b 8864 <IMFS_evaluate_for_make+0x234>
case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ];
87dc: e59d303c ldr r3, [sp, #60] ; 0x3c 87e0: e59d2000 ldr r2, [sp] 87e4: e0633005 rsb r3, r3, r5 87e8: e0873003 add r3, r7, r3 87ec: e5823000 str r3, [r2] 87f0: e0875005 add r5, r7, 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++) {
87f4: ea000006 b 8814 <IMFS_evaluate_for_make+0x1e4>
if ( !IMFS_is_separator( path[ i ] ) )
87f8: e353005c cmp r3, #92 ; 0x5c 87fc: 1353002f cmpne r3, #47 ; 0x2f
/* * 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++) {
8800: e2855001 add r5, r5, #1
if ( !IMFS_is_separator( path[ i ] ) ) 8804: 0a000002 beq 8814 <IMFS_evaluate_for_make+0x1e4> rtems_set_errno_and_return_minus_one( ENOENT );
8808: eb001155 bl cd64 <__errno> 880c: e3a03002 mov r3, #2 8810: ea000013 b 8864 <IMFS_evaluate_for_make+0x234>
/* * 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++) {
8814: e5d53000 ldrb r3, [r5] 8818: e3530000 cmp r3, #0
881c: 1afffff5 bne 87f8 <IMFS_evaluate_for_make+0x1c8> /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc );
8820: e1a00004 mov r0, r4 8824: ebfffe43 bl 8138 <IMFS_Set_handlers>
/* * The returned node must be a directory */ node = pathloc->node_access;
8828: e5943000 ldr r3, [r4] 882c: e593304c ldr r3, [r3, #76] ; 0x4c 8830: e3530001 cmp r3, #1
/* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc );
8834: e1a06000 mov r6, r0
/* * The returned node must be a directory */ node = pathloc->node_access; 8838: 0a000002 beq 8848 <IMFS_evaluate_for_make+0x218> if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR );
883c: eb001148 bl cd64 <__errno> 8840: e3a03014 mov r3, #20 8844: ea000006 b 8864 <IMFS_evaluate_for_make+0x234>
/* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) )
8848: e1a00004 mov r0, r4 884c: e3a01003 mov r1, #3 8850: ebfffe56 bl 81b0 <IMFS_evaluate_permission> 8854: e3500000 cmp r0, #0
8858: 1a000003 bne 886c <IMFS_evaluate_for_make+0x23c> rtems_set_errno_and_return_minus_one( EACCES );
885c: eb001140 bl cd64 <__errno> 8860: e3a0300d mov r3, #13 8864: e5803000 str r3, [r0] 8868: e3e06000 mvn r6, #0
return result; }
886c: e1a00006 mov r0, r6 8870: e28dd040 add sp, sp, #64 ; 0x40 8874: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
000081fc <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;
81fc: e5903000 ldr r3, [r0]
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK )
8200: e593204c ldr r2, [r3, #76] ; 0x4c 8204: e3520003 cmp r2, #3
int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8208: e92d4030 push {r4, r5, lr} 820c: e1a04000 mov r4, r0 8210: e1a05001 mov r5, r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000);
8214: 159f0038 ldrne r0, [pc, #56] ; 8254 <IMFS_evaluate_hard_link+0x58> 8218: 1bfff3a6 blne 50b8 <rtems_fatal_error_occurred>
/* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node;
821c: e5933050 ldr r3, [r3, #80] ; 0x50 8220: e5803000 str r3, [r0]
IMFS_Set_handlers( node );
8224: ebffffc3 bl 8138 <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
8228: e1a00004 mov r0, r4 822c: e1a01005 mov r1, r5 8230: ebffffde bl 81b0 <IMFS_evaluate_permission> 8234: e3500000 cmp r0, #0 8238: 13a00000 movne r0, #0 823c: 18bd8030 popne {r4, r5, pc}
rtems_set_errno_and_return_minus_one( EACCES );
8240: eb0012c7 bl cd64 <__errno> <== NOT EXECUTED 8244: e3a0300d mov r3, #13 <== NOT EXECUTED 8248: e5803000 str r3, [r0] <== NOT EXECUTED 824c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return result; }
8250: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00008258 <IMFS_evaluate_sym_link>: int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8258: e92d4070 push {r4, r5, r6, lr}
IMFS_jnode_t *jnode = node->node_access;
825c: e590e000 ldr lr, [r0]
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK )
8260: e59e304c ldr r3, [lr, #76] ; 0x4c 8264: e3530004 cmp r3, #4
int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) {
8268: e1a04000 mov r4, r0 826c: e1a05001 mov r5, r1
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000);
8270: 159f00bc ldrne r0, [pc, #188] ; 8334 <IMFS_evaluate_sym_link+0xdc>
/* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8274: 1a000003 bne 8288 <IMFS_evaluate_sym_link+0x30> rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent )
8278: e59e3008 ldr r3, [lr, #8] 827c: e3530000 cmp r3, #0
8280: 1a000001 bne 828c <IMFS_evaluate_sym_link+0x34> rtems_fatal_error_occurred( 0xBAD00000 );
8284: e59f00ac ldr r0, [pc, #172] ; 8338 <IMFS_evaluate_sym_link+0xe0><== NOT EXECUTED 8288: ebfff38a bl 50b8 <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;
828c: e5843000 str r3, [r4]
rtems_filesystem_get_sym_start_loc(
8290: e59e3050 ldr r3, [lr, #80] ; 0x50 8294: e5d33000 ldrb r3, [r3] 8298: e353002f cmp r3, #47 ; 0x2f 829c: 1353005c cmpne r3, #92 ; 0x5c 82a0: 13a06000 movne r6, #0 82a4: 03a06001 moveq r6, #1
82a8: 0a000001 beq 82b4 <IMFS_evaluate_sym_link+0x5c>
82ac: e3530000 cmp r3, #0
82b0: 1a000008 bne 82d8 <IMFS_evaluate_sym_link+0x80>
82b4: e59f3080 ldr r3, [pc, #128] ; 833c <IMFS_evaluate_sym_link+0xe4> 82b8: e593c000 ldr ip, [r3] 82bc: e28cc018 add ip, ip, #24 82c0: e8bc000f ldm ip!, {r0, r1, r2, r3} 82c4: e1a06004 mov r6, r4 82c8: e8a6000f stmia r6!, {r0, r1, r2, r3} 82cc: e59c2000 ldr r2, [ip] 82d0: e5862000 str r2, [r6] 82d4: e3a06001 mov r6, #1
* Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ),
82d8: e59e3050 ldr r3, [lr, #80] ; 0x50 82dc: e0836006 add r6, r3, r6 82e0: e1a00006 mov r0, r6 82e4: eb00168f bl dd28 <strlen>
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
82e8: e1a02005 mov r2, r5
&jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ),
82ec: e1a01000 mov r1, r0
/* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path(
82f0: e1a03004 mov r3, r4 82f4: e1a00006 mov r0, r6 82f8: eb000010 bl 8340 <IMFS_eval_path> 82fc: e1a06000 mov r6, r0
strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node );
8300: e1a00004 mov r0, r4 8304: ebffff8b bl 8138 <IMFS_Set_handlers>
/* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) )
8308: e1a00004 mov r0, r4 830c: e1a01005 mov r1, r5 8310: ebffffa6 bl 81b0 <IMFS_evaluate_permission> 8314: e3500000 cmp r0, #0
8318: 1a000003 bne 832c <IMFS_evaluate_sym_link+0xd4> rtems_set_errno_and_return_minus_one( EACCES );
831c: eb001290 bl cd64 <__errno> <== NOT EXECUTED 8320: e3a0300d mov r3, #13 <== NOT EXECUTED 8324: e5803000 str r3, [r0] <== NOT EXECUTED 8328: e3e06000 mvn r6, #0 <== NOT EXECUTED
return result; }
832c: e1a00006 mov r0, r6 8330: e8bd8070 pop {r4, r5, r6, pc}
0000b7a4 <IMFS_fchmod>: int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
b7a4: 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;
b7a8: e5904000 ldr r4, [r0]
int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) {
b7ac: e1a06001 mov r6, r1
/* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid();
b7b0: ebfff665 bl 914c <geteuid>
if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) )
b7b4: e1d453bc ldrh r5, [r4, #60] ; 0x3c b7b8: e3500000 cmp r0, #0 b7bc: 11550000 cmpne r5, r0 b7c0: 03a05000 moveq r5, #0 b7c4: 13a05001 movne r5, #1
b7c8: 0a000004 beq b7e0 <IMFS_fchmod+0x3c> rtems_set_errno_and_return_minus_one( EPERM );
b7cc: eb000564 bl cd64 <__errno> <== NOT EXECUTED b7d0: e3a03001 mov r3, #1 <== NOT EXECUTED b7d4: e5803000 str r3, [r0] <== NOT EXECUTED b7d8: e3e00000 mvn r0, #0 <== NOT EXECUTED b7dc: ea00000c b b814 <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);
b7e0: e5943030 ldr r3, [r4, #48] ; 0x30 b7e4: e1a06a06 lsl r6, r6, #20 b7e8: e3c33eff bic r3, r3, #4080 ; 0xff0 b7ec: e3c3300f bic r3, r3, #15 b7f0: e1a06a26 lsr r6, r6, #20 b7f4: e1866003 orr r6, r6, r3 b7f8: e5846030 str r6, [r4, #48] ; 0x30
IMFS_update_ctime( jnode );
b7fc: e1a0000d mov r0, sp b800: e1a01005 mov r1, r5 b804: ebfff655 bl 9160 <gettimeofday> b808: e59d3000 ldr r3, [sp] b80c: e5843048 str r3, [r4, #72] ; 0x48 b810: e1a00005 mov r0, r5
return 0; }
b814: e8bd807c pop {r2, r3, r4, r5, r6, pc}
000089dc <IMFS_fifo_close>: } int IMFS_fifo_close( rtems_libio_t *iop ) {
89dc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
89e0: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
int err = pipe_release(&JNODE2PIPE(jnode), iop);
89e4: e1a01000 mov r1, r0 <== NOT EXECUTED
} int IMFS_fifo_close( rtems_libio_t *iop ) {
89e8: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop);
89ec: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 89f0: eb0009cd bl b12c <pipe_release> <== NOT EXECUTED
if (! err) {
89f4: e2506000 subs r6, r0, #0 <== NOT EXECUTED 89f8: 1a00000c bne 8a30 <IMFS_fifo_close+0x54> <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_OPEN;
89fc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8a00: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 8a04: 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)
8a08: e1a00004 mov r0, r4 <== NOT EXECUTED 8a0c: eb0001fd bl 9208 <rtems_libio_is_file_open> <== NOT EXECUTED 8a10: e3500000 cmp r0, #0 <== NOT EXECUTED 8a14: 1a00000a bne 8a44 <IMFS_fifo_close+0x68> <== NOT EXECUTED 8a18: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 8a1c: e3530000 cmp r3, #0 <== NOT EXECUTED 8a20: 1a000007 bne 8a44 <IMFS_fifo_close+0x68> <== NOT EXECUTED
free(jnode);
8a24: e1a00004 mov r0, r4 <== NOT EXECUTED 8a28: ebffe3c6 bl 1948 <free> <== NOT EXECUTED 8a2c: ea000004 b 8a44 <IMFS_fifo_close+0x68> <== NOT EXECUTED
} IMFS_FIFO_RETURN(err);
8a30: aa000003 bge 8a44 <IMFS_fifo_close+0x68> <== NOT EXECUTED 8a34: eb0010ca bl cd64 <__errno> <== NOT EXECUTED 8a38: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 8a3c: e5806000 str r6, [r0] <== NOT EXECUTED 8a40: e3e06000 mvn r6, #0 <== NOT EXECUTED
}
8a44: e1a00006 mov r0, r6 <== NOT EXECUTED 8a48: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
000088c4 <IMFS_fifo_ioctl>: void *buffer ) { int err; if (command == FIONBIO) {
88c4: e59f3068 ldr r3, [pc, #104] ; 8934 <IMFS_fifo_ioctl+0x70> <== NOT EXECUTED 88c8: e1510003 cmp r1, r3 <== NOT EXECUTED
int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) {
88cc: e92d4010 push {r4, lr} <== NOT EXECUTED 88d0: e1a03000 mov r3, r0 <== NOT EXECUTED
int err; if (command == FIONBIO) {
88d4: 1a00000b bne 8908 <IMFS_fifo_ioctl+0x44> <== NOT EXECUTED
if (buffer == NULL)
88d8: e3520000 cmp r2, #0 <== NOT EXECUTED 88dc: 03e0400d mvneq r4, #13 <== NOT EXECUTED 88e0: 0a00000d beq 891c <IMFS_fifo_ioctl+0x58> <== NOT EXECUTED
err = -EFAULT; else { if (*(int *)buffer)
88e4: e5924000 ldr r4, [r2] <== NOT EXECUTED 88e8: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 88ec: e3540000 cmp r4, #0 <== NOT EXECUTED
iop->flags |= LIBIO_FLAGS_NO_DELAY;
88f0: 13822001 orrne r2, r2, #1 <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
88f4: 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;
88f8: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 88fc: 13a04000 movne r4, #0 <== NOT EXECUTED
else iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
8900: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 8904: ea000008 b 892c <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED
return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop);
8908: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 890c: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 8910: eb00091b bl ad84 <pipe_ioctl> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
8914: e2504000 subs r4, r0, #0 <== NOT EXECUTED 8918: aa000003 bge 892c <IMFS_fifo_ioctl+0x68> <== NOT EXECUTED 891c: eb001110 bl cd64 <__errno> <== NOT EXECUTED 8920: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 8924: e5804000 str r4, [r0] <== NOT EXECUTED 8928: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
892c: e1a00004 mov r0, r4 <== NOT EXECUTED 8930: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000887c <IMFS_fifo_lseek>: rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
887c: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED
off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop);
8880: e58d0000 str r0, [sp] <== NOT EXECUTED 8884: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 8888: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 888c: eb000922 bl ad1c <pipe_lseek> <== NOT EXECUTED 8890: e1a03000 mov r3, r0 <== NOT EXECUTED 8894: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
8898: 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);
889c: e1a05000 mov r5, r0 <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
88a0: aa000004 bge 88b8 <IMFS_fifo_lseek+0x3c> <== NOT EXECUTED 88a4: eb00112e bl cd64 <__errno> <== NOT EXECUTED 88a8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 88ac: e5805000 str r5, [r0] <== NOT EXECUTED 88b0: e3e03000 mvn r3, #0 <== NOT EXECUTED 88b4: e3e04000 mvn r4, #0 <== NOT EXECUTED
}
88b8: e1a01004 mov r1, r4 <== NOT EXECUTED 88bc: e1a00003 mov r0, r3 <== NOT EXECUTED 88c0: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED
0000898c <IMFS_fifo_read>: ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
898c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
8990: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) {
8994: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop);
8998: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 899c: eb000910 bl ade4 <pipe_read> <== NOT EXECUTED
if (err > 0)
89a0: e2505000 subs r5, r0, #0 <== NOT EXECUTED 89a4: da000005 ble 89c0 <IMFS_fifo_read+0x34> <== NOT EXECUTED
IMFS_update_atime(jnode);
89a8: e1a0000d mov r0, sp <== NOT EXECUTED 89ac: e3a01000 mov r1, #0 <== NOT EXECUTED 89b0: eb0001ea bl 9160 <gettimeofday> <== NOT EXECUTED 89b4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 89b8: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 89bc: ea000004 b 89d4 <IMFS_fifo_read+0x48> <== NOT EXECUTED
IMFS_FIFO_RETURN(err);
89c0: 0a000003 beq 89d4 <IMFS_fifo_read+0x48> <== NOT EXECUTED 89c4: eb0010e6 bl cd64 <__errno> <== NOT EXECUTED 89c8: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 89cc: e5805000 str r5, [r0] <== NOT EXECUTED 89d0: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
89d4: e1a00005 mov r0, r5 <== NOT EXECUTED 89d8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00008938 <IMFS_fifo_write>: ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
8938: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info;
893c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED
ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) {
8940: e1a03000 mov r3, r0 <== NOT EXECUTED
IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop);
8944: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 8948: eb000981 bl af54 <pipe_write> <== NOT EXECUTED
if (err > 0) {
894c: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8950: da000006 ble 8970 <IMFS_fifo_write+0x38> <== NOT EXECUTED
IMFS_mtime_ctime_update(jnode);
8954: e1a0000d mov r0, sp <== NOT EXECUTED 8958: e3a01000 mov r1, #0 <== NOT EXECUTED 895c: eb0001ff bl 9160 <gettimeofday> <== NOT EXECUTED 8960: e59d3000 ldr r3, [sp] <== NOT EXECUTED 8964: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 8968: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 896c: ea000004 b 8984 <IMFS_fifo_write+0x4c> <== NOT EXECUTED
} IMFS_FIFO_RETURN(err);
8970: 0a000003 beq 8984 <IMFS_fifo_write+0x4c> <== NOT EXECUTED 8974: eb0010fa bl cd64 <__errno> <== NOT EXECUTED 8978: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 897c: e5805000 str r5, [r0] <== NOT EXECUTED 8980: e3e05000 mvn r5, #0 <== NOT EXECUTED
}
8984: e1a00005 mov r0, r5 <== NOT EXECUTED 8988: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
0000d750 <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 ) {
d750: 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;
d754: e1a0c000 mov ip, r0 d758: 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 ) {
d75c: e1a05000 mov r5, r0 d760: 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;
d764: e8bc000f ldm ip!, {r0, r1, r2, r3} d768: e1a0e00d mov lr, sp d76c: e8ae000f stmia lr!, {r0, r1, r2, r3} d770: e59c3000 ldr r3, [ip] d774: e58e3000 str r3, [lr]
/* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL;
d778: e3a03000 mov r3, #0 d77c: e585301c str r3, [r5, #28]
do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
d780: e1a0500d mov r5, sp d784: e1a0000d mov r0, sp
temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode;
d788: e58d4000 str r4, [sp]
*/ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent;
d78c: e5946008 ldr r6, [r4, #8]
loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc );
d790: ebfffd9a bl ce00 <IMFS_Set_handlers>
if ( jnode->type != IMFS_DIRECTORY ) {
d794: e594204c ldr r2, [r4, #76] ; 0x4c d798: e3520001 cmp r2, #1
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
d79c: e2843054 add r3, r4, #84 ; 0x54
d7a0: 1a000002 bne d7b0 <IMFS_fsunmount+0x60>
d7a4: e5942050 ldr r2, [r4, #80] ; 0x50 d7a8: e1520003 cmp r2, r3
d7ac: 1a000005 bne d7c8 <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 );
d7b0: e3a00000 mov r0, #0 d7b4: e1a0100d mov r1, sp d7b8: ebffd3fa bl 27a8 <IMFS_unlink>
if (result != 0)
d7bc: e3500000 cmp r0, #0
d7c0: 1a00000c bne d7f8 <IMFS_fsunmount+0xa8>
d7c4: e1a04006 mov r4, r6
return -1; jnode = next; } if ( jnode != NULL ) {
d7c8: e3540000 cmp r4, #0
d7cc: 0a00000b beq d800 <IMFS_fsunmount+0xb0> if ( jnode->type == IMFS_DIRECTORY ) {
d7d0: e594304c ldr r3, [r4, #76] ; 0x4c d7d4: e3530001 cmp r3, #1
d7d8: 1affffe9 bne d784 <IMFS_fsunmount+0x34>
d7dc: e5943050 ldr r3, [r4, #80] ; 0x50 d7e0: e2842054 add r2, r4, #84 ; 0x54 d7e4: e1530002 cmp r3, r2
d7e8: 0affffe5 beq d784 <IMFS_fsunmount+0x34> if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL);
d7ec: e2534000 subs r4, r3, #0
d7f0: 1affffe3 bne d784 <IMFS_fsunmount+0x34>
d7f4: ea000001 b d800 <IMFS_fsunmount+0xb0> <== NOT EXECUTED d7f8: e3e00000 mvn r0, #0 <== NOT EXECUTED d7fc: ea000000 b d804 <IMFS_fsunmount+0xb4> <== NOT EXECUTED
d800: e3a00000 mov r0, #0
return 0; }
d804: e28dd014 add sp, sp, #20 d808: e8bd8070 pop {r4, r5, r6, pc}
00008be8 <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,
8be8: e59fc0d4 ldr ip, [pc, #212] ; 8cc4 <IMFS_initialize_support+0xdc> 8bec: 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 ) {
8bf0: e92d41f0 push {r4, r5, r6, r7, r8, lr} 8bf4: e1a08002 mov r8, r2 8bf8: e1a06003 mov r6, r3 8bfc: e1a04000 mov r4, r0 8c00: 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,
8c04: e3a02000 mov r2, #0 8c08: 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) {
8c0c: e153000c cmp r3, ip 8c10: e2822001 add r2, r2, #1
8c14: 0a000003 beq 8c28 <IMFS_initialize_support+0x40>
8c18: e3520006 cmp r2, #6 8c1c: e1a03083 lsl r3, r3, #1
8c20: 1afffff9 bne 8c0c <IMFS_initialize_support+0x24>
8c24: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED
if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid)
8c28: e59f5098 ldr r5, [pc, #152] ; 8cc8 <IMFS_initialize_support+0xe0> 8c2c: 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();
8c30: eb000a7c bl b628 <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;
8c34: e59fe090 ldr lr, [pc, #144] ; 8ccc <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();
8c38: 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;
8c3c: e8be000f ldm lr!, {r0, r1, r2, r3} 8c40: e284c038 add ip, r4, #56 ; 0x38 8c44: e8ac000f stmia ip!, {r0, r1, r2, r3} 8c48: e8be000f ldm lr!, {r0, r1, r2, r3} 8c4c: e8ac000f stmia ip!, {r0, r1, r2, r3} 8c50: 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;
8c54: e5847028 str r7, [r4, #40] ; 0x28
temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS;
8c58: 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;
8c5c: 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 ) );
8c60: e3a00001 mov r0, #1 8c64: e3a01010 mov r1, #16 8c68: eb0000bc bl 8f60 <calloc>
if ( !fs_info ) {
8c6c: e3500000 cmp r0, #0
8c70: 1a000006 bne 8c90 <IMFS_initialize_support+0xa8> free(temp_mt_entry->mt_fs_root.node_access);
8c74: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 8c78: ebffe332 bl 1948 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
8c7c: eb001038 bl cd64 <__errno> <== NOT EXECUTED 8c80: e3a0300c mov r3, #12 <== NOT EXECUTED 8c84: e5803000 str r3, [r0] <== NOT EXECUTED 8c88: e3e00000 mvn r0, #0 <== NOT EXECUTED 8c8c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8c90: 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;
8c94: e594101c ldr r1, [r4, #28]
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; fs_info->ino_count = 1;
8c98: e3a03001 mov r3, #1
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8c9c: e880000c stm r0, {r2, r3}
fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers;
8ca0: 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;
8ca4: e5808008 str r8, [r0, #8]
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8ca8: 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;
8cac: 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;
8cb0: e5813038 str r3, [r1, #56] ; 0x38
/* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++;
8cb4: 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();
8cb8: eb000819 bl ad24 <rtems_pipe_initialize> 8cbc: e3a00000 mov r0, #0
return 0; }
8cc0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
000024b0 <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 */ ) {
24b0: e92d4070 push {r4, r5, r6, lr}
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
24b4: 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 */ ) {
24b8: e24dd048 sub sp, sp, #72 ; 0x48
int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access;
24bc: e58d3028 str r3, [sp, #40] ; 0x28
if ( info.hard_link.link_node->st_nlink >= LINK_MAX )
24c0: e1d333b4 ldrh r3, [r3, #52] ; 0x34 24c4: 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 */ ) {
24c8: e1a05001 mov r5, r1 24cc: 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 ) 24d0: 9a000002 bls 24e0 <IMFS_link+0x30> rtems_set_errno_and_return_minus_one( EMLINK );
24d4: eb003e74 bl 11eac <__errno> 24d8: e3a0301f mov r3, #31 24dc: ea000012 b 252c <IMFS_link+0x7c>
/* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i );
24e0: e1a00002 mov r0, r2 24e4: eb004249 bl 12e10 <strlen> 24e8: e28d4004 add r4, sp, #4 24ec: e1a01000 mov r1, r0 24f0: e1a02004 mov r2, r4 24f4: e28d3044 add r3, sp, #68 ; 0x44 24f8: e1a00006 mov r0, r6 24fc: eb002cea bl d8ac <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(
2500: e28dc028 add ip, sp, #40 ; 0x28 2504: e1a00005 mov r0, r5 2508: e1a02004 mov r2, r4 250c: e3a01003 mov r1, #3 2510: e59f3054 ldr r3, [pc, #84] ; 256c <IMFS_link+0xbc> 2514: e58dc000 str ip, [sp] 2518: eb0029e9 bl ccc4 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node )
251c: e3500000 cmp r0, #0
2520: 1a000004 bne 2538 <IMFS_link+0x88> rtems_set_errno_and_return_minus_one( ENOMEM );
2524: eb003e60 bl 11eac <__errno> <== NOT EXECUTED 2528: e3a0300c mov r3, #12 <== NOT EXECUTED
252c: e5803000 str r3, [r0] 2530: e3e00000 mvn r0, #0 2534: ea00000a b 2564 <IMFS_link+0xb4>
/* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++;
2538: e59d3028 ldr r3, [sp, #40] ; 0x28 253c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 2540: e2822001 add r2, r2, #1 2544: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( info.hard_link.link_node );
2548: e28d003c add r0, sp, #60 ; 0x3c 254c: e3a01000 mov r1, #0 2550: eb000240 bl 2e58 <gettimeofday> 2554: e59d203c ldr r2, [sp, #60] ; 0x3c 2558: e59d3028 ldr r3, [sp, #40] ; 0x28 255c: e5832048 str r2, [r3, #72] ; 0x48 2560: e3a00000 mov r0, #0
return 0; }
2564: e28dd048 add sp, sp, #72 ; 0x48 2568: e8bd8070 pop {r4, r5, r6, pc}
000102a0 <IMFS_memfile_addblock>: ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode );
102a0: e2503000 subs r3, r0, #0
MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) {
102a4: e92d4030 push {r4, r5, lr}
block_p memory; block_p *block_entry_ptr; assert( the_jnode );
102a8: 059f0060 ldreq r0, [pc, #96] ; 10310 <IMFS_memfile_addblock+0x70> 102ac: 059f1060 ldreq r1, [pc, #96] ; 10314 <IMFS_memfile_addblock+0x74> 102b0: 059f2060 ldreq r2, [pc, #96] ; 10318 <IMFS_memfile_addblock+0x78> 102b4: 059f3060 ldreq r3, [pc, #96] ; 1031c <IMFS_memfile_addblock+0x7c>
102b8: 0a000006 beq 102d8 <IMFS_memfile_addblock+0x38> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
102bc: e593304c ldr r3, [r3, #76] ; 0x4c 102c0: e3530005 cmp r3, #5
102c4: 0a000004 beq 102dc <IMFS_memfile_addblock+0x3c>
102c8: e59f0040 ldr r0, [pc, #64] ; 10310 <IMFS_memfile_addblock+0x70><== NOT EXECUTED 102cc: e59f104c ldr r1, [pc, #76] ; 10320 <IMFS_memfile_addblock+0x80><== NOT EXECUTED 102d0: e59f2040 ldr r2, [pc, #64] ; 10318 <IMFS_memfile_addblock+0x78><== NOT EXECUTED 102d4: e59f3048 ldr r3, [pc, #72] ; 10324 <IMFS_memfile_addblock+0x84><== NOT EXECUTED 102d8: ebfff607 bl dafc <__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 );
102dc: e3a02001 mov r2, #1 102e0: ebfffeab bl fd94 <IMFS_memfile_get_block_pointer>
if ( *block_entry_ptr )
102e4: e5904000 ldr r4, [r0] 102e8: 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 );
102ec: e1a05000 mov r5, r0
if ( *block_entry_ptr )
102f0: 13a00000 movne r0, #0 102f4: 18bd8030 popne {r4, r5, pc}
#if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block();
102f8: ebfffe98 bl fd60 <memfile_alloc_block>
if ( !memory )
102fc: e3500000 cmp r0, #0
return 1; *block_entry_ptr = memory;
10300: 15850000 strne r0, [r5]
fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory )
10304: 03a00001 moveq r0, #1
return 1; *block_entry_ptr = memory;
10308: 11a00004 movne r0, r4
return 0; }
1030c: e8bd8030 pop {r4, r5, pc}
00010328 <IMFS_memfile_extend>: MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
10328: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
1032c: e2504000 subs r4, r0, #0
MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) {
10330: e1a05001 mov r5, r1 10334: e1a06002 mov r6, r2
/* * Perform internal consistency checks */ assert( the_jnode );
10338: 059f0134 ldreq r0, [pc, #308] ; 10474 <IMFS_memfile_extend+0x14c> 1033c: 059f1134 ldreq r1, [pc, #308] ; 10478 <IMFS_memfile_extend+0x150> 10340: 059f2134 ldreq r2, [pc, #308] ; 1047c <IMFS_memfile_extend+0x154> 10344: 059f3134 ldreq r3, [pc, #308] ; 10480 <IMFS_memfile_extend+0x158>
10348: 0a000006 beq 10368 <IMFS_memfile_extend+0x40> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
1034c: e594304c ldr r3, [r4, #76] ; 0x4c 10350: e3530005 cmp r3, #5
10354: 0a000004 beq 1036c <IMFS_memfile_extend+0x44>
10358: e59f0114 ldr r0, [pc, #276] ; 10474 <IMFS_memfile_extend+0x14c><== NOT EXECUTED 1035c: e59f1120 ldr r1, [pc, #288] ; 10484 <IMFS_memfile_extend+0x15c><== NOT EXECUTED 10360: e59f2114 ldr r2, [pc, #276] ; 1047c <IMFS_memfile_extend+0x154><== NOT EXECUTED 10364: e59f311c ldr r3, [pc, #284] ; 10488 <IMFS_memfile_extend+0x160><== NOT EXECUTED 10368: ebfff5e3 bl dafc <__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 )
1036c: e59f3118 ldr r3, [pc, #280] ; 1048c <IMFS_memfile_extend+0x164> 10370: e593b000 ldr fp, [r3] 10374: e1a0312b lsr r3, fp, #2 10378: e2832001 add r2, r3, #1 1037c: e0010293 mul r1, r3, r2 10380: e2811001 add r1, r1, #1 10384: e0020193 mul r2, r3, r1 10388: e3a03000 mov r3, #0 1038c: e1530006 cmp r3, r6 10390: e2422001 sub r2, r2, #1 10394: e003029b mul r3, fp, r2
10398: ca000005 bgt 103b4 <IMFS_memfile_extend+0x8c> 1039c: 1a000001 bne 103a8 <IMFS_memfile_extend+0x80>
103a0: e1530005 cmp r3, r5
103a4: 8a000002 bhi 103b4 <IMFS_memfile_extend+0x8c> rtems_set_errno_and_return_minus_one( EINVAL );
103a8: eb0006bf bl 11eac <__errno> <== NOT EXECUTED 103ac: e3a03016 mov r3, #22 <== NOT EXECUTED 103b0: ea000025 b 1044c <IMFS_memfile_extend+0x124> <== NOT EXECUTED
if ( new_length <= the_jnode->info.file.size )
103b4: e5948054 ldr r8, [r4, #84] ; 0x54 103b8: e1560008 cmp r6, r8 103bc: e5947050 ldr r7, [r4, #80] ; 0x50
103c0: ca000002 bgt 103d0 <IMFS_memfile_extend+0xa8> 103c4: 1a000028 bne 1046c <IMFS_memfile_extend+0x144>
103c8: e1550007 cmp r5, r7
103cc: 9a000026 bls 1046c <IMFS_memfile_extend+0x144> /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
103d0: e1a0cfcb asr ip, fp, #31 103d4: e1a0300c mov r3, ip 103d8: e1a0200b mov r2, fp 103dc: e1a00005 mov r0, r5 103e0: e1a01006 mov r1, r6 103e4: e58dc000 str ip, [sp] 103e8: eb002f1d bl 1c064 <__divdi3>
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
103ec: e59dc000 ldr ip, [sp] 103f0: e1a01008 mov r1, r8
/* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK;
103f4: e1a0a000 mov sl, r0
old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK;
103f8: e1a0200b mov r2, fp 103fc: e1a00007 mov r0, r7 10400: e1a0300c mov r3, ip 10404: eb002f16 bl 1c064 <__divdi3> 10408: e1a08000 mov r8, r0 1040c: e1a07000 mov r7, r0
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10410: ea000011 b 1045c <IMFS_memfile_extend+0x134>
if ( IMFS_memfile_addblock( the_jnode, block ) ) {
10414: e1a00004 mov r0, r4 10418: e1a01007 mov r1, r7 1041c: ebffff9f bl 102a0 <IMFS_memfile_addblock> 10420: e3500000 cmp r0, #0
10424: 0a00000b beq 10458 <IMFS_memfile_extend+0x130>
10428: ea000003 b 1043c <IMFS_memfile_extend+0x114> <== NOT EXECUTED
for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block );
1042c: e1a01007 mov r1, r7 <== NOT EXECUTED 10430: e1a00004 mov r0, r4 <== NOT EXECUTED 10434: ebfffefa bl 10024 <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-- ) {
10438: e2477001 sub r7, r7, #1 <== NOT EXECUTED 1043c: e1570008 cmp r7, r8 <== NOT EXECUTED 10440: 2afffff9 bcs 1042c <IMFS_memfile_extend+0x104> <== NOT EXECUTED
IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC );
10444: eb000698 bl 11eac <__errno> <== NOT EXECUTED 10448: e3a0301c mov r3, #28 <== NOT EXECUTED 1044c: e5803000 str r3, [r0] <== NOT EXECUTED 10450: e3e00000 mvn r0, #0 <== NOT EXECUTED 10454: ea000005 b 10470 <IMFS_memfile_extend+0x148> <== NOT EXECUTED
/* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) {
10458: e2877001 add r7, r7, #1 1045c: e157000a cmp r7, sl
10460: 9affffeb bls 10414 <IMFS_memfile_extend+0xec> /* * Set the new length of the file. */ the_jnode->info.file.size = new_length;
10464: e5846054 str r6, [r4, #84] ; 0x54 10468: e5845050 str r5, [r4, #80] ; 0x50 1046c: e3a00000 mov r0, #0
return 0; }
10470: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc}
0000fd94 <IMFS_memfile_get_block_pointer>: #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
fd94: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
fd98: e2504000 subs r4, r0, #0
#endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) {
fd9c: e1a06001 mov r6, r1 fda0: e1a08002 mov r8, r2
/* * Perform internal consistency checks */ assert( the_jnode );
fda4: 059f01e8 ldreq r0, [pc, #488] ; ff94 <IMFS_memfile_get_block_pointer+0x200> fda8: 03a01fe2 moveq r1, #904 ; 0x388 fdac: 059f21e4 ldreq r2, [pc, #484] ; ff98 <IMFS_memfile_get_block_pointer+0x204> fdb0: 059f31e4 ldreq r3, [pc, #484] ; ff9c <IMFS_memfile_get_block_pointer+0x208>
fdb4: 0a000006 beq fdd4 <IMFS_memfile_get_block_pointer+0x40> if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE );
fdb8: e594304c ldr r3, [r4, #76] ; 0x4c fdbc: e3530005 cmp r3, #5
fdc0: 0a000004 beq fdd8 <IMFS_memfile_get_block_pointer+0x44>
fdc4: e59f01c8 ldr r0, [pc, #456] ; ff94 <IMFS_memfile_get_block_pointer+0x200><== NOT EXECUTED fdc8: e59f21c8 ldr r2, [pc, #456] ; ff98 <IMFS_memfile_get_block_pointer+0x204><== NOT EXECUTED fdcc: e59f31cc ldr r3, [pc, #460] ; ffa0 <IMFS_memfile_get_block_pointer+0x20c><== NOT EXECUTED fdd0: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED fdd4: ebfff748 bl dafc <__assert_func> <== NOT EXECUTED
/* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) {
fdd8: e59f31c4 ldr r3, [pc, #452] ; ffa4 <IMFS_memfile_get_block_pointer+0x210> fddc: e5935000 ldr r5, [r3] fde0: e1a05125 lsr r5, r5, #2 fde4: e2453001 sub r3, r5, #1 fde8: e1510003 cmp r1, r3
fdec: 8a00000e bhi fe2c <IMFS_memfile_get_block_pointer+0x98> fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) {
fdf0: e3520000 cmp r2, #0
if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect;
fdf4: e5940058 ldr r0, [r4, #88] ; 0x58
if ( malloc_it ) { fdf8: 0a000007 beq fe1c <IMFS_memfile_get_block_pointer+0x88> if ( !p ) {
fdfc: e3500000 cmp r0, #0
fe00: 1a000003 bne fe14 <IMFS_memfile_get_block_pointer+0x80> p = memfile_alloc_block();
fe04: ebffffd5 bl fd60 <memfile_alloc_block>
if ( !p )
fe08: e3500000 cmp r0, #0
fe0c: 0a00005e beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> return 0; info->indirect = p;
fe10: e5840058 str r0, [r4, #88] ; 0x58
} return &info->indirect[ my_block ];
fe14: e5940058 ldr r0, [r4, #88] ; 0x58 fe18: ea000001 b fe24 <IMFS_memfile_get_block_pointer+0x90>
} if ( !p )
fe1c: e3500000 cmp r0, #0
fe20: 0a000059 beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> return 0; return &info->indirect[ my_block ];
fe24: e0800106 add r0, r0, r6, lsl #2 fe28: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
/* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) {
fe2c: e2852001 add r2, r5, #1 <== NOT EXECUTED fe30: e0030295 mul r3, r5, r2 <== NOT EXECUTED fe34: e2432001 sub r2, r3, #1 <== NOT EXECUTED fe38: e1510002 cmp r1, r2 <== NOT EXECUTED fe3c: 8a00001b bhi feb0 <IMFS_memfile_get_block_pointer+0x11c> <== NOT EXECUTED
#if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT;
fe40: e0656001 rsb r6, r5, r1 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
fe44: e1a00006 mov r0, r6 <== NOT EXECUTED fe48: e1a01005 mov r1, r5 <== NOT EXECUTED fe4c: eb002dd7 bl 1b5b0 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
fe50: e1a01005 mov r1, r5 <== NOT EXECUTED
fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
fe54: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
fe58: e1a00006 mov r0, r6 <== NOT EXECUTED fe5c: eb002d3f bl 1b360 <__aeabi_uidiv> <== NOT EXECUTED
p = info->doubly_indirect; if ( malloc_it ) {
fe60: 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;
fe64: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->doubly_indirect;
fe68: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( malloc_it ) {
fe6c: 0a000009 beq fe98 <IMFS_memfile_get_block_pointer+0x104> <== NOT EXECUTED
if ( !p ) {
fe70: e3530000 cmp r3, #0 <== NOT EXECUTED fe74: 1a000003 bne fe88 <IMFS_memfile_get_block_pointer+0xf4> <== NOT EXECUTED
p = memfile_alloc_block();
fe78: ebffffb8 bl fd60 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
fe7c: e2503000 subs r3, r0, #0 <== NOT EXECUTED fe80: 0a000041 beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; info->doubly_indirect = p;
fe84: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED
} p1 = (block_p *)p[ doubly ];
fe88: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED fe8c: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
fe90: e3500000 cmp r0, #0 <== NOT EXECUTED fe94: ea00002e b ff54 <IMFS_memfile_get_block_pointer+0x1c0> <== NOT EXECUTED
} return (block_p *)&p1[ singly ]; } if ( !p )
fe98: e3530000 cmp r3, #0 <== NOT EXECUTED fe9c: 0a00003a beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; p = (block_p *)p[ doubly ];
fea0: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED
if ( !p )
fea4: e3500000 cmp r0, #0 <== NOT EXECUTED fea8: 1a000035 bne ff84 <IMFS_memfile_get_block_pointer+0x1f0> <== NOT EXECUTED feac: ea000036 b ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
#endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) {
feb0: e2831001 add r1, r3, #1 <== NOT EXECUTED feb4: e0020195 mul r2, r5, r1 <== NOT EXECUTED feb8: e2422001 sub r2, r2, #1 <== NOT EXECUTED febc: e1560002 cmp r6, r2 <== NOT EXECUTED fec0: 8a000031 bhi ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
my_block -= FIRST_TRIPLY_INDIRECT;
fec4: e0636006 rsb r6, r3, r6 <== NOT EXECUTED
singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
fec8: e1a01005 mov r1, r5 <== NOT EXECUTED fecc: e1a00006 mov r0, r6 <== NOT EXECUTED fed0: eb002db6 bl 1b5b0 <__umodsi3> <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
fed4: e1a01005 mov r1, r5 <== NOT EXECUTED
*/ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS;
fed8: e1a0a000 mov sl, r0 <== NOT EXECUTED
doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS;
fedc: e1a00006 mov r0, r6 <== NOT EXECUTED fee0: eb002d1e bl 1b360 <__aeabi_uidiv> <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
fee4: 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;
fee8: e1a06000 mov r6, r0 <== NOT EXECUTED
triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS;
feec: eb002d1b bl 1b360 <__aeabi_uidiv> <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
fef0: 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;
fef4: e1a07000 mov r7, r0 <== NOT EXECUTED
doubly %= IMFS_MEMFILE_BLOCK_SLOTS;
fef8: e1a00006 mov r0, r6 <== NOT EXECUTED fefc: eb002dab bl 1b5b0 <__umodsi3> <== NOT EXECUTED
p = info->triply_indirect; if ( malloc_it ) {
ff00: 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;
ff04: e1a05000 mov r5, r0 <== NOT EXECUTED
p = info->triply_indirect;
ff08: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED
if ( malloc_it ) {
ff0c: 0a000016 beq ff6c <IMFS_memfile_get_block_pointer+0x1d8> <== NOT EXECUTED
if ( !p ) {
ff10: e3530000 cmp r3, #0 <== NOT EXECUTED ff14: 1a000003 bne ff28 <IMFS_memfile_get_block_pointer+0x194> <== NOT EXECUTED
p = memfile_alloc_block();
ff18: ebffff90 bl fd60 <memfile_alloc_block> <== NOT EXECUTED
if ( !p )
ff1c: e2503000 subs r3, r0, #0 <== NOT EXECUTED ff20: 0a000019 beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; info->triply_indirect = p;
ff24: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED
} p1 = (block_p *) p[ triply ];
ff28: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 ) {
ff2c: e3520000 cmp r2, #0 <== NOT EXECUTED
if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ];
ff30: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED
if ( !p1 ) {
ff34: 1a000003 bne ff48 <IMFS_memfile_get_block_pointer+0x1b4> <== NOT EXECUTED
p1 = memfile_alloc_block();
ff38: ebffff88 bl fd60 <memfile_alloc_block> <== NOT EXECUTED
if ( !p1 )
ff3c: e2502000 subs r2, r0, #0 <== NOT EXECUTED ff40: 0a000011 beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
return 0; p[ triply ] = (block_p) p1;
ff44: e5872000 str r2, [r7] <== NOT EXECUTED
} p2 = (block_p *)p1[ doubly ];
ff48: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED ff4c: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED
if ( !p2 ) {
ff50: e3500000 cmp r0, #0 <== NOT EXECUTED ff54: 1a00000a bne ff84 <IMFS_memfile_get_block_pointer+0x1f0> <== NOT EXECUTED
p2 = memfile_alloc_block();
ff58: ebffff80 bl fd60 <memfile_alloc_block> <== NOT EXECUTED
if ( !p2 )
ff5c: e3500000 cmp r0, #0 <== NOT EXECUTED
return 0; p1[ doubly ] = (block_p) p2;
ff60: 15850000 strne r0, [r5] <== NOT EXECUTED
} p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 )
ff64: 1a000006 bne ff84 <IMFS_memfile_get_block_pointer+0x1f0> <== NOT EXECUTED ff68: ea000007 b ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p )
ff6c: e3530000 cmp r3, #0 <== NOT EXECUTED ff70: 0a000005 beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== 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 ];
ff74: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED
if ( !p1 )
ff78: e3530000 cmp r3, #0 <== NOT EXECUTED ff7c: 0a000002 beq ff8c <IMFS_memfile_get_block_pointer+0x1f8> <== NOT EXECUTED
p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ];
ff80: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED ff84: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED ff88: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED ff8c: e3a00000 mov r0, #0 <== NOT EXECUTED
/* * This means the requested block number is out of range. */ return 0; }
ff90: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
000108b0 <IMFS_memfile_read>: IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
108b0: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
108b4: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) {
108b8: e1a06003 mov r6, r3 108bc: e1a08001 mov r8, r1 108c0: e1a09002 mov r9, r2 108c4: e59d7030 ldr r7, [sp, #48] ; 0x30
/* * Perform internal consistency checks */ assert( the_jnode );
108c8: 059f024c ldreq r0, [pc, #588] ; 10b1c <IMFS_memfile_read+0x26c> 108cc: 03a01f93 moveq r1, #588 ; 0x24c 108d0: 059f2248 ldreq r2, [pc, #584] ; 10b20 <IMFS_memfile_read+0x270> 108d4: 059f3248 ldreq r3, [pc, #584] ; 10b24 <IMFS_memfile_read+0x274>
108d8: 0a000007 beq 108fc <IMFS_memfile_read+0x4c> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ||
108dc: e594304c ldr r3, [r4, #76] ; 0x4c 108e0: e2432005 sub r2, r3, #5 108e4: e3520001 cmp r2, #1
108e8: 9a000004 bls 10900 <IMFS_memfile_read+0x50>
108ec: e59f0228 ldr r0, [pc, #552] ; 10b1c <IMFS_memfile_read+0x26c><== NOT EXECUTED 108f0: e59f1230 ldr r1, [pc, #560] ; 10b28 <IMFS_memfile_read+0x278><== NOT EXECUTED 108f4: e59f2224 ldr r2, [pc, #548] ; 10b20 <IMFS_memfile_read+0x270><== NOT EXECUTED 108f8: e59f322c ldr r3, [pc, #556] ; 10b2c <IMFS_memfile_read+0x27c><== NOT EXECUTED 108fc: ebfff47e bl dafc <__assert_func> <== NOT EXECUTED
/* * Error checks on arguments */ assert( dest );
10900: e3560000 cmp r6, #0 10904: 059f0210 ldreq r0, [pc, #528] ; 10b1c <IMFS_memfile_read+0x26c> 10908: 059f1220 ldreq r1, [pc, #544] ; 10b30 <IMFS_memfile_read+0x280> 1090c: 059f220c ldreq r2, [pc, #524] ; 10b20 <IMFS_memfile_read+0x270> 10910: 059f321c ldreq r3, [pc, #540] ; 10b34 <IMFS_memfile_read+0x284>
10914: 0afffff8 beq 108fc <IMFS_memfile_read+0x4c> /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length )
10918: e3570000 cmp r7, #0
1091c: 1a000004 bne 10934 <IMFS_memfile_read+0x84> rtems_set_errno_and_return_minus_one( EINVAL );
10920: eb000561 bl 11eac <__errno> <== NOT EXECUTED 10924: e3a03016 mov r3, #22 <== NOT EXECUTED 10928: e5803000 str r3, [r0] <== NOT EXECUTED 1092c: e3e07000 mvn r7, #0 <== NOT EXECUTED 10930: ea000077 b 10b14 <IMFS_memfile_read+0x264> <== NOT EXECUTED
/* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) {
10934: e3530006 cmp r3, #6
10938: 1a000012 bne 10988 <IMFS_memfile_read+0xd8> unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start))
1093c: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED 10940: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED 10944: e1a0200a mov r2, sl <== NOT EXECUTED 10948: e1a0300b mov r3, fp <== NOT EXECUTED 1094c: e3a01000 mov r1, #0 <== NOT EXECUTED 10950: e0522008 subs r2, r2, r8 <== NOT EXECUTED 10954: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED 10958: e1510003 cmp r1, r3 <== 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;
1095c: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED
if (my_length > (the_jnode->info.linearfile.size - start))
10960: ca000002 bgt 10970 <IMFS_memfile_read+0xc0> <== NOT EXECUTED 10964: 1a000002 bne 10974 <IMFS_memfile_read+0xc4> <== NOT EXECUTED 10968: e1570002 cmp r7, r2 <== NOT EXECUTED 1096c: 9a000000 bls 10974 <IMFS_memfile_read+0xc4> <== NOT EXECUTED
my_length = the_jnode->info.linearfile.size - start;
10970: e068700a rsb r7, r8, sl <== NOT EXECUTED
memcpy(dest, &file_ptr[start], my_length);
10974: e0811008 add r1, r1, r8 <== NOT EXECUTED 10978: e1a00006 mov r0, r6 <== NOT EXECUTED 1097c: e1a02007 mov r2, r7 <== NOT EXECUTED 10980: eb000757 bl 126e4 <memcpy> <== NOT EXECUTED 10984: ea00005d b 10b00 <IMFS_memfile_read+0x250> <== 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 )
10988: e5943054 ldr r3, [r4, #84] ; 0x54 1098c: e3a02000 mov r2, #0 10990: e1520003 cmp r2, r3 10994: 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;
10998: e1a03001 mov r3, r1
if ( last_byte > the_jnode->info.file.size )
1099c: e0872001 add r2, r7, r1
109a0: ca000004 bgt 109b8 <IMFS_memfile_read+0x108> 109a4: 1a000001 bne 109b0 <IMFS_memfile_read+0x100>
109a8: e1520005 cmp r2, r5
109ac: 8a000001 bhi 109b8 <IMFS_memfile_read+0x108>
109b0: e1a05007 mov r5, r7 109b4: ea000000 b 109bc <IMFS_memfile_read+0x10c>
my_length = the_jnode->info.file.size - start;
109b8: e0635005 rsb r5, r3, r5
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
109bc: e59f3174 ldr r3, [pc, #372] ; 10b38 <IMFS_memfile_read+0x288> 109c0: e593a000 ldr sl, [r3] 109c4: e1a0b00a mov fp, sl 109c8: e1a0cfcb asr ip, fp, #31 109cc: e1a0300c mov r3, ip 109d0: e1a00008 mov r0, r8 109d4: e1a0200b mov r2, fp 109d8: e1a01009 mov r1, r9 109dc: e58dc000 str ip, [sp] 109e0: eb002ec9 bl 1c50c <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
109e4: e59dc000 ldr ip, [sp]
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
109e8: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
109ec: e1a01009 mov r1, r9 109f0: e1a00008 mov r0, r8 109f4: e1a0200b mov r2, fp 109f8: e1a0300c mov r3, ip 109fc: eb002d98 bl 1c064 <__divdi3>
if ( start_offset ) {
10a00: 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;
10a04: e1a08000 mov r8, r0
if ( start_offset ) { 10a08: 0a000013 beq 10a5c <IMFS_memfile_read+0x1ac> 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 );
10a0c: e1a00004 mov r0, r4 10a10: e1a01008 mov r1, r8 10a14: e3a02000 mov r2, #0 10a18: ebfffcdd bl fd94 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
10a1c: e3500000 cmp r0, #0 10a20: 059f00f4 ldreq r0, [pc, #244] ; 10b1c <IMFS_memfile_read+0x26c> 10a24: 059f1110 ldreq r1, [pc, #272] ; 10b3c <IMFS_memfile_read+0x28c>
10a28: 0a00002c beq 10ae0 <IMFS_memfile_read+0x230> if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
10a2c: 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;
10a30: e067a00a rsb sl, r7, sl 10a34: e155000a cmp r5, sl 10a38: 31a0a005 movcc sl, r5
to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); assert( block_ptr ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy );
10a3c: e0811007 add r1, r1, r7 10a40: e1a00006 mov r0, r6 10a44: e1a0200a mov r2, sl 10a48: eb000725 bl 126e4 <memcpy>
dest += to_copy;
10a4c: e086600a add r6, r6, sl
block++;
10a50: e2888001 add r8, r8, #1
my_length -= to_copy;
10a54: e06a5005 rsb r5, sl, r5 10a58: e1a0700a mov r7, sl
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10a5c: e59f30d4 ldr r3, [pc, #212] ; 10b38 <IMFS_memfile_read+0x288>
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10a60: e1a09003 mov r9, r3
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
10a64: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
10a68: ea00000f b 10aac <IMFS_memfile_read+0x1fc>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10a6c: e1a00004 mov r0, r4 10a70: e1a01008 mov r1, r8 10a74: e3a02000 mov r2, #0 10a78: ebfffcc5 bl fd94 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
10a7c: e3500000 cmp r0, #0 10a80: 059f0094 ldreq r0, [pc, #148] ; 10b1c <IMFS_memfile_read+0x26c> 10a84: 059f10b4 ldreq r1, [pc, #180] ; 10b40 <IMFS_memfile_read+0x290>
10a88: 0a000014 beq 10ae0 <IMFS_memfile_read+0x230> if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy );
10a8c: e5901000 ldr r1, [r0] 10a90: e1a0200a mov r2, sl 10a94: e1a00006 mov r0, r6 10a98: eb000711 bl 126e4 <memcpy>
dest += to_copy;
10a9c: e086600a add r6, r6, sl
block++;
10aa0: e2888001 add r8, r8, #1
my_length -= to_copy;
10aa4: e06a5005 rsb r5, sl, r5
copied += to_copy;
10aa8: 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 ) {
10aac: e5993000 ldr r3, [r9] 10ab0: e1550003 cmp r5, r3
10ab4: 2affffec bcs 10a6c <IMFS_memfile_read+0x1bc> * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) {
10ab8: e3550000 cmp r5, #0
10abc: 0a00000f beq 10b00 <IMFS_memfile_read+0x250> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10ac0: e1a01008 mov r1, r8 10ac4: e1a00004 mov r0, r4 10ac8: e3a02000 mov r2, #0 10acc: ebfffcb0 bl fd94 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
10ad0: e2503000 subs r3, r0, #0
10ad4: 1a000004 bne 10aec <IMFS_memfile_read+0x23c>
10ad8: e59f003c ldr r0, [pc, #60] ; 10b1c <IMFS_memfile_read+0x26c><== NOT EXECUTED 10adc: e59f1060 ldr r1, [pc, #96] ; 10b44 <IMFS_memfile_read+0x294><== NOT EXECUTED 10ae0: e59f2038 ldr r2, [pc, #56] ; 10b20 <IMFS_memfile_read+0x270><== NOT EXECUTED 10ae4: e59f305c ldr r3, [pc, #92] ; 10b48 <IMFS_memfile_read+0x298><== NOT EXECUTED 10ae8: eaffff83 b 108fc <IMFS_memfile_read+0x4c> <== NOT EXECUTED
if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length );
10aec: e1a00006 mov r0, r6 10af0: e5931000 ldr r1, [r3] 10af4: e1a02005 mov r2, r5 10af8: eb0006f9 bl 126e4 <memcpy>
copied += my_length;
10afc: e0857007 add r7, r5, r7
} IMFS_update_atime( the_jnode );
10b00: e28d0004 add r0, sp, #4 10b04: e3a01000 mov r1, #0 10b08: ebffc8d2 bl 2e58 <gettimeofday> 10b0c: e59d3004 ldr r3, [sp, #4] 10b10: e5843040 str r3, [r4, #64] ; 0x40
return copied; }
10b14: e1a00007 mov r0, r7 10b18: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00010070 <IMFS_memfile_remove>: */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) {
10070: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
10074: e2504000 subs r4, r0, #0 10078: 059f012c ldreq r0, [pc, #300] ; 101ac <IMFS_memfile_remove+0x13c> 1007c: 059f112c ldreq r1, [pc, #300] ; 101b0 <IMFS_memfile_remove+0x140> 10080: 059f212c ldreq r2, [pc, #300] ; 101b4 <IMFS_memfile_remove+0x144> 10084: 059f312c ldreq r3, [pc, #300] ; 101b8 <IMFS_memfile_remove+0x148>
10088: 0a000006 beq 100a8 <IMFS_memfile_remove+0x38> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
1008c: e594304c ldr r3, [r4, #76] ; 0x4c 10090: e3530005 cmp r3, #5
10094: 0a000004 beq 100ac <IMFS_memfile_remove+0x3c>
10098: e59f010c ldr r0, [pc, #268] ; 101ac <IMFS_memfile_remove+0x13c><== NOT EXECUTED 1009c: e59f1118 ldr r1, [pc, #280] ; 101bc <IMFS_memfile_remove+0x14c><== NOT EXECUTED 100a0: e59f210c ldr r2, [pc, #268] ; 101b4 <IMFS_memfile_remove+0x144><== NOT EXECUTED 100a4: e59f3114 ldr r3, [pc, #276] ; 101c0 <IMFS_memfile_remove+0x150><== NOT EXECUTED 100a8: ebfff693 bl dafc <__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;
100ac: e59f2110 ldr r2, [pc, #272] ; 101c4 <IMFS_memfile_remove+0x154>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
100b0: 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;
100b4: e5925000 ldr r5, [r2]
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
100b8: 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;
100bc: e1a05125 lsr r5, r5, #2
*/ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free );
100c0: 12840058 addne r0, r4, #88 ; 0x58 100c4: 11a01005 movne r1, r5 100c8: 1bffffb6 blne ffa8 <memfile_free_blocks_in_table>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
100cc: e594305c ldr r3, [r4, #92] ; 0x5c 100d0: e3530000 cmp r3, #0 100d4: 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++ ) {
100d8: 159f70e4 ldrne r7, [pc, #228] ; 101c4 <IMFS_memfile_remove+0x154>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 100dc: 1a000008 bne 10104 <IMFS_memfile_remove+0x94>
100e0: ea00000d b 1011c <IMFS_memfile_remove+0xac>
} if ( info->doubly_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { if ( info->doubly_indirect[i] ) {
100e4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 100e8: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED 100ec: e3520000 cmp r2, #0 <== NOT EXECUTED 100f0: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED
memfile_free_blocks_in_table(
100f4: 10830000 addne r0, r3, r0 <== NOT EXECUTED 100f8: 11a01005 movne r1, r5 <== NOT EXECUTED 100fc: 1bffffa9 blne ffa8 <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++ ) {
10100: e2866001 add r6, r6, #1 <== NOT EXECUTED 10104: e5973000 ldr r3, [r7] <== NOT EXECUTED 10108: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED 1010c: 3afffff4 bcc 100e4 <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 );
10110: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 10114: e1a01005 mov r1, r5 <== NOT EXECUTED 10118: ebffffa2 bl ffa8 <memfile_free_blocks_in_table> <== NOT EXECUTED
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
1011c: e5943060 ldr r3, [r4, #96] ; 0x60 10120: e3530000 cmp r3, #0 10124: 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++ ) {
10128: 159fa094 ldrne sl, [pc, #148] ; 101c4 <IMFS_memfile_remove+0x154>
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; 1012c: 1a000016 bne 1018c <IMFS_memfile_remove+0x11c>
10130: ea00001b b 101a4 <IMFS_memfile_remove+0x134>
} if ( info->triply_indirect ) { for ( i=0 ; i<IMFS_MEMFILE_BLOCK_SLOTS ; i++ ) { p = (block_p *) info->triply_indirect[i];
10134: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 10138: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED
if ( !p ) /* ensure we have a valid pointer */
1013c: e3570000 cmp r7, #0 <== NOT EXECUTED
* + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file;
10140: 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 */
10144: 0a000013 beq 10198 <IMFS_memfile_remove+0x128> <== NOT EXECUTED 10148: e3a08000 mov r8, #0 <== NOT EXECUTED 1014c: ea000006 b 1016c <IMFS_memfile_remove+0xfc> <== NOT EXECUTED
break; for ( j=0 ; j<IMFS_MEMFILE_BLOCK_SLOTS ; j++ ) { if ( p[j] ) {
10150: e5973000 ldr r3, [r7] <== NOT EXECUTED 10154: e3530000 cmp r3, #0 <== NOT EXECUTED
memfile_free_blocks_in_table( (block_p **)&p[j], to_free);
10158: 11a00007 movne r0, r7 <== NOT EXECUTED 1015c: 11a01005 movne r1, r5 <== NOT EXECUTED 10160: 1bffff90 blne ffa8 <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++ ) {
10164: e2888001 add r8, r8, #1 <== NOT EXECUTED 10168: e2877004 add r7, r7, #4 <== NOT EXECUTED 1016c: e59a3000 ldr r3, [sl] <== NOT EXECUTED 10170: e1580123 cmp r8, r3, lsr #2 <== NOT EXECUTED 10174: 3afffff5 bcc 10150 <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(
10178: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 1017c: e1a01005 mov r1, r5 <== NOT EXECUTED 10180: e0800009 add r0, r0, r9 <== NOT EXECUTED 10184: ebffff87 bl ffa8 <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++ ) {
10188: e2866001 add r6, r6, #1 <== NOT EXECUTED 1018c: e59a3000 ldr r3, [sl] <== NOT EXECUTED 10190: e1560123 cmp r6, r3, lsr #2 <== NOT EXECUTED 10194: 3affffe6 bcc 10134 <IMFS_memfile_remove+0xc4> <== NOT EXECUTED
} } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table(
10198: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 1019c: e1a01005 mov r1, r5 <== NOT EXECUTED 101a0: ebffff80 bl ffa8 <memfile_free_blocks_in_table> <== NOT EXECUTED
(block_p **)&info->triply_indirect, to_free ); } return 0; }
101a4: e3a00000 mov r0, #0 101a8: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00010024 <IMFS_memfile_remove_block>: MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) {
10024: 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 );
10028: e3a02000 mov r2, #0 <== NOT EXECUTED 1002c: ebffff58 bl fd94 <IMFS_memfile_get_block_pointer> <== NOT EXECUTED
assert( block_ptr );
10030: e2503000 subs r3, r0, #0 <== NOT EXECUTED 10034: 059f0024 ldreq r0, [pc, #36] ; 10060 <IMFS_memfile_remove_block+0x3c><== NOT EXECUTED 10038: 059f1024 ldreq r1, [pc, #36] ; 10064 <IMFS_memfile_remove_block+0x40><== NOT EXECUTED 1003c: 059f2024 ldreq r2, [pc, #36] ; 10068 <IMFS_memfile_remove_block+0x44><== NOT EXECUTED 10040: 059f3024 ldreq r3, [pc, #36] ; 1006c <IMFS_memfile_remove_block+0x48><== NOT EXECUTED 10044: 0bfff6ac bleq dafc <__assert_func> <== NOT EXECUTED
if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0;
10048: 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;
1004c: e5930000 ldr r0, [r3] <== NOT EXECUTED
*block_ptr = 0;
10050: e5832000 str r2, [r3] <== NOT EXECUTED
memfile_free_block( ptr );
10054: ebffff39 bl fd40 <memfile_free_block> <== NOT EXECUTED
} return 1; }
10058: e3a00001 mov r0, #1 <== NOT EXECUTED 1005c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00010580 <IMFS_memfile_write>: IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
10580: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Perform internal consistency checks */ assert( the_jnode );
10584: e2504000 subs r4, r0, #0
IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) {
10588: e1a08001 mov r8, r1 1058c: e1a0a002 mov sl, r2 10590: e1a06003 mov r6, r3 10594: e59d5030 ldr r5, [sp, #48] ; 0x30
/* * Perform internal consistency checks */ assert( the_jnode );
10598: 059f0204 ldreq r0, [pc, #516] ; 107a4 <IMFS_memfile_write+0x224> 1059c: 059f1204 ldreq r1, [pc, #516] ; 107a8 <IMFS_memfile_write+0x228> 105a0: 059f2204 ldreq r2, [pc, #516] ; 107ac <IMFS_memfile_write+0x22c> 105a4: 059f3204 ldreq r3, [pc, #516] ; 107b0 <IMFS_memfile_write+0x230>
105a8: 0a000006 beq 105c8 <IMFS_memfile_write+0x48> if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE );
105ac: e594304c ldr r3, [r4, #76] ; 0x4c 105b0: e3530005 cmp r3, #5
105b4: 0a000004 beq 105cc <IMFS_memfile_write+0x4c>
105b8: e59f01e4 ldr r0, [pc, #484] ; 107a4 <IMFS_memfile_write+0x224><== NOT EXECUTED 105bc: e59f11f0 ldr r1, [pc, #496] ; 107b4 <IMFS_memfile_write+0x234><== NOT EXECUTED 105c0: e59f21e4 ldr r2, [pc, #484] ; 107ac <IMFS_memfile_write+0x22c><== NOT EXECUTED 105c4: e59f31ec ldr r3, [pc, #492] ; 107b8 <IMFS_memfile_write+0x238><== NOT EXECUTED 105c8: ebfff54b bl dafc <__assert_func> <== NOT EXECUTED
/* * Error check arguments */ assert( source );
105cc: e3560000 cmp r6, #0 105d0: 059f01cc ldreq r0, [pc, #460] ; 107a4 <IMFS_memfile_write+0x224> 105d4: 059f11e0 ldreq r1, [pc, #480] ; 107bc <IMFS_memfile_write+0x23c> 105d8: 059f21cc ldreq r2, [pc, #460] ; 107ac <IMFS_memfile_write+0x22c> 105dc: 059f31dc ldreq r3, [pc, #476] ; 107c0 <IMFS_memfile_write+0x240>
105e0: 0afffff8 beq 105c8 <IMFS_memfile_write+0x48> /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length )
105e4: e3550000 cmp r5, #0
105e8: 1a000002 bne 105f8 <IMFS_memfile_write+0x78> rtems_set_errno_and_return_minus_one( EINVAL );
105ec: eb00062e bl 11eac <__errno> <== NOT EXECUTED 105f0: e3a03016 mov r3, #22 <== NOT EXECUTED 105f4: ea00000e b 10634 <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 ) {
105f8: e5943054 ldr r3, [r4, #84] ; 0x54 105fc: e3530000 cmp r3, #0 10600: e0851001 add r1, r5, r1
10604: ba000003 blt 10618 <IMFS_memfile_write+0x98> 10608: 1a00000c bne 10640 <IMFS_memfile_write+0xc0>
1060c: e5943050 ldr r3, [r4, #80] ; 0x50 10610: e1530001 cmp r3, r1
10614: 2a000009 bcs 10640 <IMFS_memfile_write+0xc0> status = IMFS_memfile_extend( the_jnode, last_byte );
10618: e1a00004 mov r0, r4 1061c: e3a02000 mov r2, #0 10620: ebffff40 bl 10328 <IMFS_memfile_extend>
if ( status )
10624: e3500000 cmp r0, #0
10628: 0a000004 beq 10640 <IMFS_memfile_write+0xc0> rtems_set_errno_and_return_minus_one( ENOSPC );
1062c: eb00061e bl 11eac <__errno> <== NOT EXECUTED 10630: e3a0301c mov r3, #28 <== NOT EXECUTED 10634: e5803000 str r3, [r0] <== NOT EXECUTED 10638: e3e07000 mvn r7, #0 <== NOT EXECUTED 1063c: ea000056 b 1079c <IMFS_memfile_write+0x21c> <== NOT EXECUTED
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
10640: e59f317c ldr r3, [pc, #380] ; 107c4 <IMFS_memfile_write+0x244> 10644: e5939000 ldr r9, [r3] 10648: e1a0b009 mov fp, r9 1064c: e1a0cfcb asr ip, fp, #31 10650: e1a0300c mov r3, ip 10654: e1a00008 mov r0, r8 10658: e1a0200b mov r2, fp 1065c: e1a0100a mov r1, sl 10660: e58dc000 str ip, [sp] 10664: eb002fa8 bl 1c50c <__moddi3>
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10668: e59dc000 ldr ip, [sp]
/* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK;
1066c: e1a07000 mov r7, r0
block = start / IMFS_MEMFILE_BYTES_PER_BLOCK;
10670: e1a0100a mov r1, sl 10674: e1a00008 mov r0, r8 10678: e1a0200b mov r2, fp 1067c: e1a0300c mov r3, ip 10680: eb002e77 bl 1c064 <__divdi3>
if ( start_offset ) {
10684: 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;
10688: e1a08000 mov r8, r0
if ( start_offset ) { 1068c: 0a000013 beq 106e0 <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 );
10690: e1a01008 mov r1, r8 10694: e1a00004 mov r0, r4 10698: e3a02000 mov r2, #0 1069c: ebfffdbc bl fd94 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
106a0: e3500000 cmp r0, #0 106a4: 059f00f8 ldreq r0, [pc, #248] ; 107a4 <IMFS_memfile_write+0x224> 106a8: 03a01fc7 moveq r1, #796 ; 0x31c
106ac: 0a00002c beq 10764 <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 );
106b0: 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;
106b4: e067a009 rsb sl, r7, r9 106b8: e15a0005 cmp sl, r5 106bc: 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 );
106c0: e0800007 add r0, r0, r7 106c4: e1a01006 mov r1, r6 106c8: e1a0200a mov r2, sl 106cc: eb000804 bl 126e4 <memcpy>
src += to_copy;
106d0: e086600a add r6, r6, sl
block++;
106d4: e2888001 add r8, r8, #1
my_length -= to_copy;
106d8: e06a5005 rsb r5, sl, r5
copied += to_copy;
106dc: e1a0700a mov r7, sl
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
106e0: e59f30dc ldr r3, [pc, #220] ; 107c4 <IMFS_memfile_write+0x244>
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
106e4: e1a09003 mov r9, r3
/* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK;
106e8: e593a000 ldr sl, [r3]
while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) {
106ec: ea00000f b 10730 <IMFS_memfile_write+0x1b0>
block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
106f0: e1a00004 mov r0, r4 106f4: e1a01008 mov r1, r8 106f8: e3a02000 mov r2, #0 106fc: ebfffda4 bl fd94 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
10700: e3500000 cmp r0, #0 10704: 059f0098 ldreq r0, [pc, #152] ; 107a4 <IMFS_memfile_write+0x224> 10708: 03a01e33 moveq r1, #816 ; 0x330
1070c: 0a000014 beq 10764 <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 );
10710: e1a01006 mov r1, r6 10714: e5900000 ldr r0, [r0] 10718: e1a0200a mov r2, sl 1071c: eb0007f0 bl 126e4 <memcpy>
src += to_copy;
10720: e086600a add r6, r6, sl
block++;
10724: e2888001 add r8, r8, #1
my_length -= to_copy;
10728: 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(
1072c: 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 ) {
10730: e5993000 ldr r3, [r9] 10734: e1550003 cmp r5, r3
10738: 2affffec bcs 106f0 <IMFS_memfile_write+0x170> */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) {
1073c: e3550000 cmp r5, #0
10740: 0a00000f beq 10784 <IMFS_memfile_write+0x204> block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 );
10744: e1a01008 mov r1, r8 10748: e1a00004 mov r0, r4 1074c: e3a02000 mov r2, #0 10750: ebfffd8f bl fd94 <IMFS_memfile_get_block_pointer>
assert( block_ptr );
10754: e3500000 cmp r0, #0
10758: 1a000004 bne 10770 <IMFS_memfile_write+0x1f0>
1075c: e59f0040 ldr r0, [pc, #64] ; 107a4 <IMFS_memfile_write+0x224><== NOT EXECUTED 10760: e59f1060 ldr r1, [pc, #96] ; 107c8 <IMFS_memfile_write+0x248><== NOT EXECUTED 10764: e59f2040 ldr r2, [pc, #64] ; 107ac <IMFS_memfile_write+0x22c><== NOT EXECUTED 10768: e59f305c ldr r3, [pc, #92] ; 107cc <IMFS_memfile_write+0x24c><== NOT EXECUTED 1076c: eaffff95 b 105c8 <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 );
10770: e5900000 ldr r0, [r0] 10774: e1a01006 mov r1, r6 10778: e1a02005 mov r2, r5 1077c: eb0007d8 bl 126e4 <memcpy>
my_length = 0; copied += to_copy;
10780: e0877005 add r7, r7, r5
} IMFS_mtime_ctime_update( the_jnode );
10784: e28d0004 add r0, sp, #4 10788: e3a01000 mov r1, #0 1078c: ebffc9b1 bl 2e58 <gettimeofday> 10790: e59d3004 ldr r3, [sp, #4] 10794: e5843048 str r3, [r4, #72] ; 0x48 10798: e5843044 str r3, [r4, #68] ; 0x44
return copied; }
1079c: e1a00007 mov r0, r7 107a0: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00008cd0 <IMFS_mknod>: const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) {
8cd0: e92d40f0 push {r4, r5, r6, r7, lr} 8cd4: e24dd040 sub sp, sp, #64 ; 0x40 8cd8: e1a04001 mov r4, r1 8cdc: e1a07000 mov r7, r0 8ce0: e1a06002 mov r6, r2 8ce4: 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 );
8ce8: eb00140e bl dd28 <strlen> 8cec: e28d303c add r3, sp, #60 ; 0x3c 8cf0: e1a01000 mov r1, r0 8cf4: e28d2004 add r2, sp, #4 8cf8: e1a00007 mov r0, r7 8cfc: ebffff87 bl 8b20 <IMFS_get_token>
/* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) )
8d00: e2043a0f and r3, r4, #61440 ; 0xf000 8d04: e3530901 cmp r3, #16384 ; 0x4000
8d08: 0a00000e beq 8d48 <IMFS_mknod+0x78> type = IMFS_DIRECTORY; else if ( S_ISREG(mode) )
8d0c: e3530902 cmp r3, #32768 ; 0x8000 8d10: 03a01005 moveq r1, #5
8d14: 0a00000c beq 8d4c <IMFS_mknod+0x7c> type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) {
8d18: e3530a06 cmp r3, #24576 ; 0x6000 8d1c: 13530a02 cmpne r3, #8192 ; 0x2000
type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor );
8d20: 058d6028 streq r6, [sp, #40] ; 0x28 8d24: 058d502c streq r5, [sp, #44] ; 0x2c 8d28: 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) ) { 8d2c: 0a000006 beq 8d4c <IMFS_mknod+0x7c> type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode))
8d30: e3530a01 cmp r3, #4096 ; 0x1000 8d34: 03a01007 moveq r1, #7
8d38: 0a000003 beq 8d4c <IMFS_mknod+0x7c> type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL );
8d3c: eb001008 bl cd64 <__errno> <== NOT EXECUTED 8d40: e3a03016 mov r3, #22 <== NOT EXECUTED 8d44: ea00000b b 8d78 <IMFS_mknod+0xa8> <== NOT EXECUTED
8d48: 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(
8d4c: e28dc028 add ip, sp, #40 ; 0x28 8d50: e59d0054 ldr r0, [sp, #84] ; 0x54 8d54: e1a03004 mov r3, r4 8d58: e28d2004 add r2, sp, #4 8d5c: e58dc000 str ip, [sp] 8d60: eb000a40 bl b668 <IMFS_create_node>
new_name, mode, &info ); if ( !new_node )
8d64: e3500000 cmp r0, #0 8d68: 13a00000 movne r0, #0
8d6c: 1a000003 bne 8d80 <IMFS_mknod+0xb0> rtems_set_errno_and_return_minus_one( ENOMEM );
8d70: eb000ffb bl cd64 <__errno> <== NOT EXECUTED 8d74: e3a0300c mov r3, #12 <== NOT EXECUTED 8d78: e5803000 str r3, [r0] <== NOT EXECUTED 8d7c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return 0; }
8d80: e28dd040 add sp, sp, #64 ; 0x40 8d84: e8bd80f0 pop {r4, r5, r6, r7, pc}
00002628 <IMFS_mount>: rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
2628: e5903008 ldr r3, [r0, #8]
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
262c: e593204c ldr r2, [r3, #76] ; 0x4c 2630: e3520001 cmp r2, #1
#include <rtems/seterr.h> int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
2634: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2638: 0a000004 beq 2650 <IMFS_mount+0x28> rtems_set_errno_and_return_minus_one( ENOTDIR );
263c: eb003e1a bl 11eac <__errno> <== NOT EXECUTED 2640: e3a03014 mov r3, #20 <== NOT EXECUTED 2644: e5803000 str r3, [r0] <== NOT EXECUTED 2648: e3e00000 mvn r0, #0 <== NOT EXECUTED 264c: 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;
2650: e583005c str r0, [r3, #92] ; 0x5c 2654: e3a00000 mov r0, #0
return 0; }
2658: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00003c68 <IMFS_print_jnode>: */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) {
3c68: e92d4030 push {r4, r5, lr}
assert( the_jnode );
3c6c: e2504000 subs r4, r0, #0 3c70: 059f0130 ldreq r0, [pc, #304] ; 3da8 <IMFS_print_jnode+0x140> 3c74: 03a01038 moveq r1, #56 ; 0x38 3c78: 059f212c ldreq r2, [pc, #300] ; 3dac <IMFS_print_jnode+0x144> 3c7c: 059f312c ldreq r3, [pc, #300] ; 3db0 <IMFS_print_jnode+0x148>
3c80: 0a00002f beq 3d44 <IMFS_print_jnode+0xdc> fprintf(stdout, "%s", the_jnode->name );
3c84: e59f5128 ldr r5, [pc, #296] ; 3db4 <IMFS_print_jnode+0x14c> 3c88: e5953000 ldr r3, [r5] 3c8c: e284000c add r0, r4, #12 3c90: e5931008 ldr r1, [r3, #8] 3c94: eb003b12 bl 128e4 <fputs>
switch( the_jnode->type ) {
3c98: e594204c ldr r2, [r4, #76] ; 0x4c 3c9c: e2423001 sub r3, r2, #1 3ca0: e3530006 cmp r3, #6 3ca4: 979ff103 ldrls pc, [pc, r3, lsl #2]
3ca8: ea000034 b 3d80 <IMFS_print_jnode+0x118> <== NOT EXECUTED 3cac: 00003cc8 .word 0x00003cc8 <== NOT EXECUTED 3cb0: 00003cdc .word 0x00003cdc <== NOT EXECUTED 3cb4: 00003d24 .word 0x00003d24 <== NOT EXECUTED 3cb8: 00003d48 .word 0x00003d48 <== NOT EXECUTED 3cbc: 00003d0c .word 0x00003d0c <== NOT EXECUTED 3cc0: 00003cf0 .word 0x00003cf0 <== NOT EXECUTED 3cc4: 00003d64 .word 0x00003d64 <== NOT EXECUTED
case IMFS_DIRECTORY: fprintf(stdout, "/" );
3cc8: e5953000 ldr r3, [r5] 3ccc: e3a0002f mov r0, #47 ; 0x2f 3cd0: e5931008 ldr r1, [r3, #8] 3cd4: eb003abd bl 127d0 <fputc>
break;
3cd8: ea00002f b 3d9c <IMFS_print_jnode+0x134>
case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")",
3cdc: e5952000 ldr r2, [r5] 3ce0: e5943054 ldr r3, [r4, #84] ; 0x54 3ce4: e5920008 ldr r0, [r2, #8] 3ce8: e59f10c8 ldr r1, [pc, #200] ; 3db8 <IMFS_print_jnode+0x150> 3cec: ea000003 b 3d00 <IMFS_print_jnode+0x98>
the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)",
3cf0: e5952000 ldr r2, [r5] <== NOT EXECUTED 3cf4: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3cf8: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 3cfc: e59f10b8 ldr r1, [pc, #184] ; 3dbc <IMFS_print_jnode+0x154><== NOT EXECUTED
3d00: e5942050 ldr r2, [r4, #80] ; 0x50 3d04: eb003a95 bl 12760 <fprintf>
(uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break;
3d08: ea000023 b 3d9c <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 ")",
3d0c: e5953000 ldr r3, [r5] 3d10: e5942050 ldr r2, [r4, #80] ; 0x50 3d14: e5930008 ldr r0, [r3, #8] 3d18: e59f10a0 ldr r1, [pc, #160] ; 3dc0 <IMFS_print_jnode+0x158> 3d1c: eb003a8f bl 12760 <fprintf>
(uint32_t)the_jnode->info.file.size ); #endif break;
3d20: ea00001d b 3d9c <IMFS_print_jnode+0x134>
case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" );
3d24: e5953000 ldr r3, [r5] <== NOT EXECUTED 3d28: e59f0094 ldr r0, [pc, #148] ; 3dc4 <IMFS_print_jnode+0x15c><== NOT EXECUTED 3d2c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 3d30: eb003aeb bl 128e4 <fputs> <== NOT EXECUTED
assert(0);
3d34: e59f006c ldr r0, [pc, #108] ; 3da8 <IMFS_print_jnode+0x140><== NOT EXECUTED 3d38: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 3d3c: e59f2068 ldr r2, [pc, #104] ; 3dac <IMFS_print_jnode+0x144><== NOT EXECUTED 3d40: e59f3080 ldr r3, [pc, #128] ; 3dc8 <IMFS_print_jnode+0x160><== NOT EXECUTED 3d44: eb000245 bl 4660 <__assert_func> <== NOT EXECUTED
break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" );
3d48: e5953000 ldr r3, [r5] <== NOT EXECUTED 3d4c: e59f0070 ldr r0, [pc, #112] ; 3dc4 <IMFS_print_jnode+0x15c><== NOT EXECUTED 3d50: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 3d54: eb003ae2 bl 128e4 <fputs> <== NOT EXECUTED
assert(0);
3d58: e59f0048 ldr r0, [pc, #72] ; 3da8 <IMFS_print_jnode+0x140> <== NOT EXECUTED 3d5c: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 3d60: eafffff5 b 3d3c <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" );
3d64: e5953000 ldr r3, [r5] <== NOT EXECUTED 3d68: e59f005c ldr r0, [pc, #92] ; 3dcc <IMFS_print_jnode+0x164> <== NOT EXECUTED 3d6c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 3d70: eb003adb bl 128e4 <fputs> <== NOT EXECUTED
assert(0);
3d74: e59f002c ldr r0, [pc, #44] ; 3da8 <IMFS_print_jnode+0x140> <== NOT EXECUTED 3d78: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 3d7c: eaffffee b 3d3c <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break; default: fprintf(stdout, " bad type %d\n", the_jnode->type );
3d80: e5953000 ldr r3, [r5] <== NOT EXECUTED 3d84: e59f1044 ldr r1, [pc, #68] ; 3dd0 <IMFS_print_jnode+0x168> <== NOT EXECUTED 3d88: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3d8c: eb003a73 bl 12760 <fprintf> <== NOT EXECUTED
assert(0);
3d90: e59f0010 ldr r0, [pc, #16] ; 3da8 <IMFS_print_jnode+0x140> <== NOT EXECUTED 3d94: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 3d98: eaffffe7 b 3d3c <IMFS_print_jnode+0xd4> <== NOT EXECUTED
break; } puts("");
3d9c: e59f0030 ldr r0, [pc, #48] ; 3dd4 <IMFS_print_jnode+0x16c>
}
3da0: e8bd4030 pop {r4, r5, lr}
default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts("");
3da4: ea00419a b 14414 <puts>
00002668 <IMFS_readlink>: ) { IMFS_jnode_t *node; int i; node = loc->node_access;
2668: e5903000 ldr r3, [r0]
if ( node->type != IMFS_SYM_LINK )
266c: e593004c ldr r0, [r3, #76] ; 0x4c 2670: e3500004 cmp r0, #4
int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) {
2674: e52de004 push {lr} ; (str lr, [sp, #-4]!)
IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK )
2678: 03a00000 moveq r0, #0
267c: 0a000006 beq 269c <IMFS_readlink+0x34> rtems_set_errno_and_return_minus_one( EINVAL );
2680: eb003e09 bl 11eac <__errno> <== NOT EXECUTED 2684: e3a03016 mov r3, #22 <== NOT EXECUTED 2688: e5803000 str r3, [r0] <== NOT EXECUTED 268c: e3e00000 mvn r0, #0 <== NOT EXECUTED 2690: 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];
2694: 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++ )
2698: e2800001 add r0, r0, #1 269c: e1500002 cmp r0, r2 26a0: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 26a4: e593c050 ldr ip, [r3, #80] ; 0x50 26a8: e7dcc000 ldrb ip, [ip, r0] 26ac: e35c0000 cmp ip, #0
26b0: 1afffff7 bne 2694 <IMFS_readlink+0x2c> buf[i] = node->info.sym_link.name[i]; return i; }
26b4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00008e3c <IMFS_stat>: { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access;
8e3c: e5903000 ldr r3, [r0]
switch ( the_jnode->type ) {
8e40: e593204c ldr r2, [r3, #76] ; 0x4c 8e44: e2422002 sub r2, r2, #2
int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
8e48: e92d4800 push {fp, lr}
IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) {
8e4c: e3520005 cmp r2, #5 8e50: 979ff102 ldrls pc, [pc, r2, lsl #2]
8e54: ea000012 b 8ea4 <IMFS_stat+0x68> <== NOT EXECUTED 8e58: 00008e70 .word 0x00008e70 <== NOT EXECUTED 8e5c: 00008ea4 .word 0x00008ea4 <== NOT EXECUTED 8e60: 00008e90 .word 0x00008e90 <== NOT EXECUTED 8e64: 00008e84 .word 0x00008e84 <== NOT EXECUTED 8e68: 00008e84 .word 0x00008e84 <== NOT EXECUTED 8e6c: 00008e90 .word 0x00008e90 <== NOT EXECUTED
case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor );
8e70: e2832050 add r2, r3, #80 ; 0x50 8e74: e8921004 ldm r2, {r2, ip} 8e78: e581c01c str ip, [r1, #28] 8e7c: e5812018 str r2, [r1, #24]
break;
8e80: ea00000c b 8eb8 <IMFS_stat+0x7c>
case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size;
8e84: e283c050 add ip, r3, #80 ; 0x50 8e88: e89c1800 ldm ip, {fp, ip} 8e8c: ea000001 b 8e98 <IMFS_stat+0x5c>
case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0;
8e90: e3a0b000 mov fp, #0 <== NOT EXECUTED 8e94: e3a0c000 mov ip, #0 <== NOT EXECUTED
8e98: e581b020 str fp, [r1, #32] 8e9c: e581c024 str ip, [r1, #36] ; 0x24
break;
8ea0: ea000004 b 8eb8 <IMFS_stat+0x7c>
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
8ea4: eb000fae bl cd64 <__errno> <== NOT EXECUTED 8ea8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 8eac: e5803000 str r3, [r0] <== NOT EXECUTED 8eb0: e3e00000 mvn r0, #0 <== NOT EXECUTED 8eb4: e8bd8800 pop {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;
8eb8: e5932030 ldr r2, [r3, #48] ; 0x30 8ebc: e581200c str r2, [r1, #12]
buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino;
8ec0: e5932038 ldr r2, [r3, #56] ; 0x38 8ec4: 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;
8ec8: e5932040 ldr r2, [r3, #64] ; 0x40 8ecc: 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 );
8ed0: e5902010 ldr r2, [r0, #16]
buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
8ed4: e1d3c3b4 ldrh ip, [r3, #52] ; 0x34
* The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
8ed8: e5922034 ldr r2, [r2, #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;
8edc: e5930044 ldr r0, [r3, #68] ; 0x44
* The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance );
8ee0: e5922000 ldr r2, [r2]
buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink;
8ee4: e1c1c1b0 strh ip, [r1, #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;
8ee8: e5810030 str r0, [r1, #48] ; 0x30
/* * 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 =
8eec: e5812004 str r2, [r1, #4]
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;
8ef0: e1d323bc ldrh r2, [r3, #60] ; 0x3c
buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime;
8ef4: e5930048 ldr r0, [r3, #72] ; 0x48
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;
8ef8: e1c121b2 strh r2, [r1, #18]
buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime;
8efc: e5810038 str r0, [r1, #56] ; 0x38
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;
8f00: 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 =
8f04: e59f000c ldr r0, [pc, #12] ; 8f18 <IMFS_stat+0xdc>
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;
8f08: e1c131b4 strh r3, [r1, #20]
/* * 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 =
8f0c: e5810000 str r0, [r1]
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;
8f10: e3a00000 mov r0, #0
return 0; }
8f14: e8bd8800 pop {fp, pc}
00002714 <IMFS_symlink>: int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
2714: e92d40f0 push {r4, r5, r6, r7, lr} 2718: e1a05000 mov r5, r0 271c: 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 );
2720: e1a00002 mov r0, r2
int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) {
2724: e1a07002 mov r7, r2 2728: 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 );
272c: eb0041b7 bl 12e10 <strlen> 2730: e28d4004 add r4, sp, #4 2734: e1a01000 mov r1, r0 2738: e1a02004 mov r2, r4 273c: e28d303c add r3, sp, #60 ; 0x3c 2740: e1a00007 mov r0, r7 2744: eb002c58 bl d8ac <IMFS_get_token>
/* * Duplicate link name */ info.sym_link.name = strdup(link_name);
2748: e1a00006 mov r0, r6 274c: eb00419b bl 12dc0 <strdup>
if (info.sym_link.name == NULL) {
2750: 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);
2754: e58d0028 str r0, [sp, #40] ; 0x28
if (info.sym_link.name == NULL) { 2758: 0a00000b beq 278c <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(
275c: e28dc028 add ip, sp, #40 ; 0x28 2760: e1a00005 mov r0, r5 2764: e1a02004 mov r2, r4 2768: e3a01004 mov r1, #4 276c: e59f3030 ldr r3, [pc, #48] ; 27a4 <IMFS_symlink+0x90> 2770: e58dc000 str ip, [sp] 2774: eb002952 bl ccc4 <IMFS_create_node>
new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) {
2778: e3500000 cmp r0, #0 277c: 13a00000 movne r0, #0
2780: 1a000005 bne 279c <IMFS_symlink+0x88> free(info.sym_link.name);
2784: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 2788: eb000189 bl 2db4 <free> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one(ENOMEM);
278c: eb003dc6 bl 11eac <__errno> <== NOT EXECUTED 2790: e3a0300c mov r3, #12 <== NOT EXECUTED 2794: e5803000 str r3, [r0] <== NOT EXECUTED 2798: e3e00000 mvn r0, #0 <== NOT EXECUTED
} return 0; }
279c: e28dd040 add sp, sp, #64 ; 0x40 27a0: e8bd80f0 pop {r4, r5, r6, r7, pc}
000027a8 <IMFS_unlink>: int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
27a8: 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;
27ac: e5915000 ldr r5, [r1]
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) {
27b0: e595304c ldr r3, [r5, #76] ; 0x4c 27b4: e3530003 cmp r3, #3
int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) {
27b8: e24dd01c sub sp, sp, #28 27bc: e1a04001 mov r4, r1 27c0: e1a06000 mov r6, r0
/* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 27c4: 1a000025 bne 2860 <IMFS_unlink+0xb8> if ( !node->info.hard_link.link_node )
27c8: e595e050 ldr lr, [r5, #80] ; 0x50 27cc: e35e0000 cmp lr, #0
27d0: 1a000003 bne 27e4 <IMFS_unlink+0x3c> rtems_set_errno_and_return_minus_one( EINVAL );
27d4: eb003db4 bl 11eac <__errno> <== NOT EXECUTED 27d8: e3a03016 mov r3, #22 <== NOT EXECUTED 27dc: e5803000 str r3, [r0] <== NOT EXECUTED 27e0: ea000014 b 2838 <IMFS_unlink+0x90> <== NOT EXECUTED
the_link = *loc;
27e4: e1a07001 mov r7, r1 27e8: e8b7000f ldm r7!, {r0, r1, r2, r3} 27ec: e1a0c00d mov ip, sp 27f0: e8ac000f stmia ip!, {r0, r1, r2, r3}
the_link.node_access = node->info.hard_link.link_node;
27f4: e28d801c add r8, sp, #28 27f8: 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;
27fc: e5973000 ldr r3, [r7]
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
2800: 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;
2804: e58c3000 str r3, [ip]
the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link );
2808: eb00297c bl ce00 <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)
280c: e5953050 ldr r3, [r5, #80] ; 0x50 2810: e1d323b4 ldrh r2, [r3, #52] ; 0x34 2814: e3520001 cmp r2, #1
2818: 1a000008 bne 2840 <IMFS_unlink+0x98> { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link );
281c: e1a0100d mov r1, sp 2820: e1a00006 mov r0, r6 2824: e59d3008 ldr r3, [sp, #8] 2828: e1a0e00f mov lr, pc 282c: e593f034 ldr pc, [r3, #52] ; 0x34
if ( result != 0 )
2830: e3500000 cmp r0, #0
2834: 0a000009 beq 2860 <IMFS_unlink+0xb8>
2838: e3e00000 mvn r0, #0 283c: ea00000c b 2874 <IMFS_unlink+0xcc>
return -1; } else { node->info.hard_link.link_node->st_nlink --;
2840: e2422001 sub r2, r2, #1 2844: e1c323b4 strh r2, [r3, #52] ; 0x34
IMFS_update_ctime( node->info.hard_link.link_node );
2848: e28d0014 add r0, sp, #20 284c: e3a01000 mov r1, #0 2850: eb000180 bl 2e58 <gettimeofday> 2854: e5953050 ldr r3, [r5, #80] ; 0x50 2858: e59d2014 ldr r2, [sp, #20] 285c: e5832048 str r2, [r3, #72] ; 0x48
/* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc );
2860: e1a00006 mov r0, r6 2864: e1a01004 mov r1, r4 2868: e5943008 ldr r3, [r4, #8] 286c: e1a0e00f mov lr, pc 2870: e593f034 ldr pc, [r3, #52] ; 0x34
return result; }
2874: e28dd01c add sp, sp, #28 2878: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000287c <IMFS_unmount>: rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access;
287c: e5903008 ldr r3, [r0, #8]
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY )
2880: e593204c ldr r2, [r3, #76] ; 0x4c 2884: e3520001 cmp r2, #1
#include <rtems/seterr.h> int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) {
2888: e52de004 push {lr} ; (str lr, [sp, #-4]!)
/* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 288c: 0a000002 beq 289c <IMFS_unmount+0x20> rtems_set_errno_and_return_minus_one( ENOTDIR );
2890: eb003d85 bl 11eac <__errno> <== NOT EXECUTED 2894: e3a03014 mov r3, #20 <== NOT EXECUTED 2898: ea000004 b 28b0 <IMFS_unmount+0x34> <== NOT EXECUTED
/* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL )
289c: e593205c ldr r2, [r3, #92] ; 0x5c 28a0: e3520000 cmp r2, #0
28a4: 1a000004 bne 28bc <IMFS_unmount+0x40> rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */
28a8: eb003d7f bl 11eac <__errno> <== NOT EXECUTED 28ac: e3a03016 mov r3, #22 <== NOT EXECUTED 28b0: e5803000 str r3, [r0] <== NOT EXECUTED 28b4: e3e00000 mvn r0, #0 <== NOT EXECUTED 28b8: 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;
28bc: e3a00000 mov r0, #0 28c0: e583005c str r0, [r3, #92] ; 0x5c
return 0; }
28c4: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001b28 <RTEMS_Malloc_Initialize>: #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) {
1b28: e59f30c8 ldr r3, [pc, #200] ; 1bf8 <RTEMS_Malloc_Initialize+0xd0> 1b2c: e5933000 ldr r3, [r3] 1b30: e3530000 cmp r3, #0
void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) {
1b34: e92d4070 push {r4, r5, r6, lr} 1b38: e1a04000 mov r4, r0 1b3c: e1a05001 mov r5, r1 1b40: e1a06002 mov r6, r2
/* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)();
1b44: 11a0e00f movne lr, pc 1b48: 1593f000 ldrne pc, [r3]
} /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize();
1b4c: ebffffe1 bl 1ad8 <malloc_deferred_frees_initialize>
/* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) {
1b50: e59f30a4 ldr r3, [pc, #164] ; 1bfc <RTEMS_Malloc_Initialize+0xd4> 1b54: e5933000 ldr r3, [r3] 1b58: e3530000 cmp r3, #0
1b5c: 0a000006 beq 1b7c <RTEMS_Malloc_Initialize+0x54> void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)(
1b60: e1a00004 mov r0, r4 <== NOT EXECUTED 1b64: e1a01006 mov r1, r6 <== NOT EXECUTED 1b68: e1a0e00f mov lr, pc <== NOT EXECUTED 1b6c: e593f000 ldr pc, [r3] <== NOT EXECUTED
heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin;
1b70: e0845005 add r5, r4, r5 <== NOT EXECUTED 1b74: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 1b78: 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 (
1b7c: e59f307c ldr r3, [pc, #124] ; 1c00 <RTEMS_Malloc_Initialize+0xd8> 1b80: e5d31000 ldrb r1, [r3] 1b84: e3510000 cmp r1, #0
1b88: 1a000005 bne 1ba4 <RTEMS_Malloc_Initialize+0x7c> !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace()
1b8c: e59f3070 ldr r3, [pc, #112] ; 1c04 <RTEMS_Malloc_Initialize+0xdc> 1b90: e5d33028 ldrb r3, [r3, #40] ; 0x28 1b94: e3530000 cmp r3, #0
) { memset( heap_begin, 0, heap_size );
1b98: 11a00004 movne r0, r4 1b9c: 11a02005 movne r2, r5 1ba0: 1b002eb9 blne d68c <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 ) {
1ba4: e59f3054 ldr r3, [pc, #84] ; 1c00 <RTEMS_Malloc_Initialize+0xd8> 1ba8: e5d33000 ldrb r3, [r3] 1bac: e3530000 cmp r3, #0
1bb0: 1a000008 bne 1bd8 <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 );
1bb4: e59f304c ldr r3, [pc, #76] ; 1c08 <RTEMS_Malloc_Initialize+0xe0> 1bb8: e1a01004 mov r1, r4 1bbc: e5930000 ldr r0, [r3] 1bc0: e1a02005 mov r2, r5 1bc4: e3a03004 mov r3, #4 1bc8: eb000f1f bl 584c <_Heap_Initialize>
RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) {
1bcc: e3500000 cmp r0, #0
rtems_fatal_error_occurred( RTEMS_NO_MEMORY );
1bd0: 0280001a addeq r0, r0, #26 1bd4: 0b000d37 bleq 50b8 <rtems_fatal_error_occurred>
} } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) );
1bd8: e59f3028 ldr r3, [pc, #40] ; 1c08 <RTEMS_Malloc_Initialize+0xe0> 1bdc: e59f4028 ldr r4, [pc, #40] ; 1c0c <RTEMS_Malloc_Initialize+0xe4> 1be0: e5930000 ldr r0, [r3] 1be4: e5945000 ldr r5, [r4] 1be8: eb0011f8 bl 63d0 <_Protected_heap_Get_size> 1bec: e0800005 add r0, r0, r5 1bf0: e5840000 str r0, [r4]
printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif }
1bf4: e8bd8070 pop {r4, r5, r6, pc}
0000134c <Stack_check_Dump_threads_usage>: static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) {
134c: 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 )
1350: e250a000 subs sl, r0, #0 <== NOT EXECUTED 1354: 0a000043 beq 1468 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
return; if ( !print_handler )
1358: e59f310c ldr r3, [pc, #268] ; 146c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED 135c: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 1360: e3570000 cmp r7, #0 <== NOT EXECUTED 1364: 0a00003f beq 1468 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) {
1368: e37a0001 cmn sl, #1 <== NOT EXECUTED
} else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers );
136c: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED
current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack;
1370: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED
/* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) {
1374: 1a000005 bne 1390 <Stack_check_Dump_threads_usage+0x44> <== NOT EXECUTED
if (Stack_check_Interrupt_stack.area) {
1378: e59f40f0 ldr r4, [pc, #240] ; 1470 <Stack_check_Dump_threads_usage+0x124><== NOT EXECUTED 137c: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 1380: e3530000 cmp r3, #0 <== NOT EXECUTED 1384: 13a06000 movne r6, #0 <== NOT EXECUTED 1388: 11a0a006 movne sl, r6 <== NOT EXECUTED 138c: 0a000035 beq 1468 <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);
1390: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 1394: e2899010 add r9, r9, #16 <== NOT EXECUTED
size = Stack_check_usable_stack_size(stack);
1398: e2455010 sub r5, r5, #16 <== NOT EXECUTED
high_water_mark = Stack_check_find_high_water_mark(low, size);
139c: e1a00009 mov r0, r9 <== NOT EXECUTED 13a0: e1a01005 mov r1, r5 <== NOT EXECUTED 13a4: ebffffda bl 1314 <Stack_check_find_high_water_mark> <== NOT EXECUTED
if ( high_water_mark )
13a8: e2508000 subs r8, r0, #0 <== NOT EXECUTED
used = Stack_check_Calculate_used( low, size, high_water_mark );
13ac: 10899005 addne r9, r9, r5 <== NOT EXECUTED 13b0: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED
else used = 0; if ( the_thread ) {
13b4: e35a0000 cmp sl, #0 <== NOT EXECUTED 13b8: e59f30ac ldr r3, [pc, #172] ; 146c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED 13bc: 0a00000c beq 13f4 <Stack_check_Dump_threads_usage+0xa8> <== NOT EXECUTED
(*print_handler)(
13c0: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 13c4: e28d2008 add r2, sp, #8 <== NOT EXECUTED 13c8: e1a0000a mov r0, sl <== NOT EXECUTED 13cc: e3a01005 mov r1, #5 <== NOT EXECUTED 13d0: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 13d4: eb000d87 bl 49f8 <rtems_object_get_name> <== NOT EXECUTED 13d8: e1a0200a mov r2, sl <== NOT EXECUTED 13dc: e1a03000 mov r3, r0 <== NOT EXECUTED 13e0: e59f108c ldr r1, [pc, #140] ; 1474 <Stack_check_Dump_threads_usage+0x128><== NOT EXECUTED 13e4: e1a00009 mov r0, r9 <== NOT EXECUTED 13e8: e1a0e00f mov lr, pc <== NOT EXECUTED 13ec: e12fff17 bx r7 <== NOT EXECUTED 13f0: ea000004 b 1408 <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 );
13f4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 13f8: e59f1078 ldr r1, [pc, #120] ; 1478 <Stack_check_Dump_threads_usage+0x12c><== NOT EXECUTED 13fc: e3e02000 mvn r2, #0 <== NOT EXECUTED 1400: e1a0e00f mov lr, pc <== NOT EXECUTED 1404: e12fff17 bx r7 <== NOT EXECUTED
} (*print_handler)(
1408: e5943000 ldr r3, [r4] <== NOT EXECUTED 140c: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 1410: e59f4054 ldr r4, [pc, #84] ; 146c <Stack_check_Dump_threads_usage+0x120><== NOT EXECUTED 1414: e58d6000 str r6, [sp] <== NOT EXECUTED 1418: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 141c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 1420: e0823003 add r3, r2, r3 <== NOT EXECUTED 1424: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 1428: e59f104c ldr r1, [pc, #76] ; 147c <Stack_check_Dump_threads_usage+0x130><== NOT EXECUTED 142c: e1a0e00f mov lr, pc <== NOT EXECUTED 1430: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) {
1434: e5943000 ldr r3, [r4] <== NOT EXECUTED 1438: e3530000 cmp r3, #0 <== NOT EXECUTED 143c: 1a000004 bne 1454 <Stack_check_Dump_threads_usage+0x108> <== NOT EXECUTED
(*print_handler)( print_context, "Unavailable\n" );
1440: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 1444: e59f1034 ldr r1, [pc, #52] ; 1480 <Stack_check_Dump_threads_usage+0x134><== NOT EXECUTED 1448: e1a0e00f mov lr, pc <== NOT EXECUTED 144c: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 1450: ea000004 b 1468 <Stack_check_Dump_threads_usage+0x11c> <== NOT EXECUTED
} else { (*print_handler)( print_context, "%8" PRId32 "\n", used );
1454: e1a02008 mov r2, r8 <== NOT EXECUTED 1458: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 145c: e59f1020 ldr r1, [pc, #32] ; 1484 <Stack_check_Dump_threads_usage+0x138><== NOT EXECUTED 1460: e1a0e00f mov lr, pc <== NOT EXECUTED 1464: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED
} }
1468: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED
00001314 <Stack_check_find_high_water_mark>: /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS;
1314: e2800010 add r0, r0, #16 <== NOT EXECUTED
for (ebase = base + length; base < ebase; base++)
1318: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 131c: e0801001 add r1, r0, r1 <== NOT EXECUTED
if (*base != U32_PATTERN)
1320: e59f3020 ldr r3, [pc, #32] ; 1348 <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++)
1324: ea000003 b 1338 <Stack_check_find_high_water_mark+0x24> <== NOT EXECUTED
if (*base != U32_PATTERN)
1328: e5902000 ldr r2, [r0] <== NOT EXECUTED 132c: e1520003 cmp r2, r3 <== NOT EXECUTED 1330: 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++)
1334: e2800004 add r0, r0, #4 <== NOT EXECUTED 1338: e1500001 cmp r0, r1 <== NOT EXECUTED 133c: 3afffff9 bcc 1328 <Stack_check_find_high_water_mark+0x14> <== NOT EXECUTED 1340: e3a00000 mov r0, #0 <== NOT EXECUTED
if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; }
1344: e12fff1e bx lr <== NOT EXECUTED
00005aa4 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
5aa4: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 5aa8: e1a04001 mov r4, r1 5aac: 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 ) ) {
5ab0: e1a0100d mov r1, sp 5ab4: e1a00004 mov r0, r4
pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) {
5ab8: e1a08002 mov r8, r2 5abc: 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 ) ) {
5ac0: eb00006f bl 5c84 <_POSIX_Mutex_Get> 5ac4: e3500000 cmp r0, #0
5ac8: 0a000032 beq 5b98 <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1;
5acc: e59f30d0 ldr r3, [pc, #208] ; 5ba4 <_POSIX_Condition_variables_Wait_support+0x100> 5ad0: e5932000 ldr r2, [r3] 5ad4: e2422001 sub r2, r2, #1 5ad8: e5832000 str r2, [r3]
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
5adc: e1a0100d mov r1, sp 5ae0: e1a00006 mov r0, r6 5ae4: ebffff7c bl 58dc <_POSIX_Condition_variables_Get>
switch ( location ) {
5ae8: e59d3000 ldr r3, [sp] 5aec: e3530000 cmp r3, #0
return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location );
5af0: e1a0a000 mov sl, r0
switch ( location ) { 5af4: 1a000027 bne 5b98 <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) {
5af8: e5903014 ldr r3, [r0, #20] 5afc: e3530000 cmp r3, #0
5b00: 0a000004 beq 5b18 <_POSIX_Condition_variables_Wait_support+0x74>
5b04: e5942000 ldr r2, [r4] 5b08: e1530002 cmp r3, r2
5b0c: 0a000001 beq 5b18 <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch();
5b10: eb000bd9 bl 8a7c <_Thread_Enable_dispatch> 5b14: ea00001f b 5b98 <_POSIX_Condition_variables_Wait_support+0xf4>
return EINVAL; } (void) pthread_mutex_unlock( mutex );
5b18: e1a00004 mov r0, r4 5b1c: eb0000de bl 5e9c <pthread_mutex_unlock>
_Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) {
5b20: e3570000 cmp r7, #0
5b24: 1a000015 bne 5b80 <_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;
5b28: e59f5078 ldr r5, [pc, #120] ; 5ba8 <_POSIX_Condition_variables_Wait_support+0x104>
return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex;
5b2c: e5942000 ldr r2, [r4]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
5b30: e5953000 ldr r3, [r5]
return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex;
5b34: e58a2014 str r2, [sl, #20]
_Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0;
5b38: e5837034 str r7, [r3, #52] ; 0x34
_Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond;
5b3c: 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;
5b40: e28a2018 add r2, sl, #24
_Thread_Executing->Wait.id = *cond;
5b44: 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;
5b48: 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;
5b4c: e5832044 str r2, [r3, #68] ; 0x44
_Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout );
5b50: e1a00002 mov r0, r2 5b54: e58a1048 str r1, [sl, #72] ; 0x48 5b58: e59f204c ldr r2, [pc, #76] ; 5bac <_POSIX_Condition_variables_Wait_support+0x108> 5b5c: e1a01008 mov r1, r8 5b60: eb000cfe bl 8f60 <_Thread_queue_Enqueue_with_handler>
_Thread_Enable_dispatch();
5b64: eb000bc4 bl 8a7c <_Thread_Enable_dispatch>
/* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code;
5b68: e5953000 ldr r3, [r5] 5b6c: e5935034 ldr r5, [r3, #52] ; 0x34
if ( status && status != ETIMEDOUT )
5b70: e3550074 cmp r5, #116 ; 0x74 5b74: 13550000 cmpne r5, #0
5b78: 0a000002 beq 5b88 <_POSIX_Condition_variables_Wait_support+0xe4>
5b7c: ea000006 b 5b9c <_POSIX_Condition_variables_Wait_support+0xf8><== NOT EXECUTED
return status; } else { _Thread_Enable_dispatch();
5b80: eb000bbd bl 8a7c <_Thread_Enable_dispatch> 5b84: e3a05074 mov r5, #116 ; 0x74
/* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex );
5b88: e1a00004 mov r0, r4 5b8c: eb0000a3 bl 5e20 <pthread_mutex_lock>
if ( mutex_status )
5b90: e3500000 cmp r0, #0
5b94: 0a000000 beq 5b9c <_POSIX_Condition_variables_Wait_support+0xf8>
5b98: e3a05016 mov r5, #22
case OBJECTS_ERROR: break; } return EINVAL; }
5b9c: e1a00005 mov r0, r5 5ba0: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc}
00006f2c <_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 ) {
6f2c: 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;
6f30: e5913014 ldr r3, [r1, #20]
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
6f34: e281503c add r5, r1, #60 ; 0x3c 6f38: e5815038 str r5, [r1, #56] ; 0x38
the_chain->permanent_null = NULL;
6f3c: e3a05000 mov r5, #0
the_chain->last = _Chain_Head(the_chain);
6f40: 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 ) )
6f44: 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 ];
6f48: 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;
6f4c: e581503c str r5, [r1, #60] ; 0x3c 6f50: e285500c add r5, r5, #12
the_chain->last = _Chain_Head(the_chain);
6f54: e581c040 str ip, [r1, #64] ; 0x40
block_state = the_thread_queue->state;
6f58: 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 ];
6f5c: 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;
6f60: 159f8154 ldrne r8, [pc, #340] ; 70bc <_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 ) ) 6f64: 1a000023 bne 6ff8 <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
6f68: e28c8004 add r8, ip, #4
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
6f6c: e10f5000 mrs r5, CPSR 6f70: e3854080 orr r4, r5, #128 ; 0x80 6f74: 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;
6f78: e3e06000 mvn r6, #0 6f7c: e59c4000 ldr r4, [ip]
while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) {
6f80: ea00000b b 6fb4 <_Thread_queue_Enqueue_priority+0x88>
search_priority = search_thread->current_priority;
6f84: e5946014 ldr r6, [r4, #20]
if ( priority <= search_priority )
6f88: e1530006 cmp r3, r6
6f8c: 9a00000a bls 6fbc <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile (
6f90: e10fa000 mrs sl, CPSR 6f94: e129f005 msr CPSR_fc, r5 6f98: 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) ) {
6f9c: e594a010 ldr sl, [r4, #16] 6fa0: e117000a tst r7, sl
6fa4: 1a000001 bne 6fb0 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
6fa8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 6fac: eaffffee b 6f6c <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED
_ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next;
6fb0: 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 ) ) {
6fb4: e1540008 cmp r4, r8
6fb8: 1afffff1 bne 6f84 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state !=
6fbc: e590c030 ldr ip, [r0, #48] ; 0x30 6fc0: 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 ) ) {
6fc4: e1a0c005 mov ip, r5
} search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 6fc8: 1a000038 bne 70b0 <_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 )
6fcc: 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;
6fd0: e3a03000 mov r3, #0 6fd4: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority ) 6fd8: 0a00002a beq 7088 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous;
6fdc: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
6fe0: e5814000 str r4, [r1]
the_node->previous = previous_node;
6fe4: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
6fe8: 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;
6fec: e5831000 str r1, [r3]
search_node->previous = the_node;
6ff0: e5841004 str r1, [r4, #4]
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level );
6ff4: ea000021 b 7080 <_Thread_queue_Enqueue_priority+0x154>
return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1;
6ff8: e5d86000 ldrb r6, [r8] 6ffc: e2866001 add r6, r6, #1
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
7000: e10f5000 mrs r5, CPSR 7004: e3854080 orr r4, r5, #128 ; 0x80 7008: e129f004 msr CPSR_fc, r4
_ISR_Disable( level ); search_thread = (Thread_Control *) header->last;
700c: e59c4008 ldr r4, [ip, #8]
while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) {
7010: ea00000b b 7044 <_Thread_queue_Enqueue_priority+0x118>
search_priority = search_thread->current_priority;
7014: e5946014 ldr r6, [r4, #20]
if ( priority >= search_priority )
7018: e1530006 cmp r3, r6
701c: 2a00000a bcs 704c <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile (
7020: e10fa000 mrs sl, CPSR 7024: e129f005 msr CPSR_fc, r5 7028: 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) ) {
702c: e594a010 ldr sl, [r4, #16] 7030: e117000a tst r7, sl
7034: 1a000001 bne 7040 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
7038: e129f005 msr CPSR_fc, r5 703c: eaffffed b 6ff8 <_Thread_queue_Enqueue_priority+0xcc>
_ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *)
7040: 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 ) ) {
7044: e154000c cmp r4, ip
7048: 1afffff1 bne 7014 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state !=
704c: e590c030 ldr ip, [r0, #48] ; 0x30 7050: 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 ) ) {
7054: e1a0c005 mov ip, r5
} search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 7058: 1a000014 bne 70b0 <_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 )
705c: 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;
7060: e3a03000 mov r3, #0 7064: e5803030 str r3, [r0, #48] ; 0x30
if ( priority == search_priority ) 7068: 0a000006 beq 7088 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next;
706c: e5943000 ldr r3, [r4]
the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node;
7070: e8810018 stm r1, {r3, r4}
search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
7074: 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;
7078: e5841000 str r1, [r4]
next_node->previous = the_node;
707c: e5831004 str r1, [r3, #4] 7080: e129f005 msr CPSR_fc, r5 7084: ea000007 b 70a8 <_Thread_queue_Enqueue_priority+0x17c> 7088: 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;
708c: e5943004 ldr r3, [r4, #4]
the_node = (Chain_Node *) the_thread; the_node->next = search_node;
7090: e5814000 str r4, [r1]
the_node->previous = previous_node;
7094: e5813004 str r3, [r1, #4]
previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue;
7098: 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;
709c: e5831000 str r1, [r3]
search_node->previous = the_node;
70a0: e5841004 str r1, [r4, #4] 70a4: e129f00c msr CPSR_fc, ip 70a8: e3a00001 mov r0, #1
the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED;
70ac: 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;
70b0: e582c000 str ip, [r2]
return the_thread_queue->sync_state;
70b4: e5900030 ldr r0, [r0, #48] ; 0x30
}
70b8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00014a24 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
14a24: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 14a28: e24dd020 sub sp, sp, #32 14a2c: e28d3014 add r3, sp, #20 14a30: 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;
14a34: e3a09000 mov r9, #0
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
14a38: e283a004 add sl, r3, #4 14a3c: 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);
14a40: e58d301c str r3, [sp, #28]
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
14a44: e2802008 add r2, r0, #8
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14a48: e2803040 add r3, r0, #64 ; 0x40
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
14a4c: e58da014 str sl, [sp, #20]
the_chain->permanent_null = NULL;
14a50: e58d9018 str r9, [sp, #24]
*/ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain);
14a54: e58d8008 str r8, [sp, #8]
the_chain->permanent_null = NULL;
14a58: e58d900c str r9, [sp, #12]
the_chain->last = _Chain_Head(the_chain);
14a5c: e58d5010 str r5, [sp, #16]
static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog );
14a60: e58d2004 str r2, [sp, #4]
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14a64: e58d3000 str r3, [sp]
* @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) {
14a68: e1a04000 mov r4, r0
*/ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a6c: 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 );
14a70: 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;
14a74: e28d2014 add r2, sp, #20 14a78: 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;
14a7c: e59f2168 ldr r2, [pc, #360] ; 14bec <_Timer_server_Body+0x1c8> 14a80: e5923000 ldr r3, [r2]
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot;
14a84: e594103c ldr r1, [r4, #60] ; 0x3c
watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a88: e1a02005 mov r2, r5 14a8c: e0611003 rsb r1, r1, r3
/* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot;
14a90: e584303c str r3, [r4, #60] ; 0x3c
_Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain );
14a94: e1a0000b mov r0, fp 14a98: eb00106c bl 18c50 <_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();
14a9c: e59f314c ldr r3, [pc, #332] ; 14bf0 <_Timer_server_Body+0x1cc>
Watchdog_Interval last_snapshot = watchdogs->last_snapshot;
14aa0: 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();
14aa4: 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 ) {
14aa8: e1560002 cmp r6, r2
14aac: 9a000004 bls 14ac4 <_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 );
14ab0: e0621006 rsb r1, r2, r6 14ab4: e1a00007 mov r0, r7 14ab8: e1a02005 mov r2, r5 14abc: eb001063 bl 18c50 <_Watchdog_Adjust_to_chain> 14ac0: ea000003 b 14ad4 <_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 );
14ac4: 30662002 rsbcc r2, r6, r2 14ac8: 31a00007 movcc r0, r7 14acc: 33a01001 movcc r1, #1 14ad0: 3b001036 blcc 18bb0 <_Watchdog_Adjust>
} watchdogs->last_snapshot = snapshot;
14ad4: 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 );
14ad8: e5940078 ldr r0, [r4, #120] ; 0x78 14adc: eb00023b bl 153d0 <_Chain_Get>
if ( timer == NULL ) {
14ae0: e2501000 subs r1, r0, #0
14ae4: 0a00000a beq 14b14 <_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 ) {
14ae8: e5913038 ldr r3, [r1, #56] ; 0x38 14aec: e3530001 cmp r3, #1
_Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker );
14af0: 02811010 addeq r1, r1, #16 14af4: 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 ) { 14af8: 0a000003 beq 14b0c <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) {
14afc: e3530003 cmp r3, #3
14b00: 1afffff4 bne 14ad8 <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker );
14b04: e2811010 add r1, r1, #16 14b08: e1a00007 mov r0, r7 14b0c: eb00107c bl 18d04 <_Watchdog_Insert> 14b10: eafffff0 b 14ad8 <_Timer_server_Body+0xb4>
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
14b14: e10f3000 mrs r3, CPSR 14b18: e3832080 orr r2, r3, #128 ; 0x80 14b1c: e129f002 msr CPSR_fc, r2
* body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) {
14b20: e59d2014 ldr r2, [sp, #20] 14b24: e152000a cmp r2, sl
14b28: 1a000005 bne 14b44 <_Timer_server_Body+0x120> ts->insert_chain = NULL;
14b2c: e5841078 str r1, [r4, #120] ; 0x78
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
14b30: 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 ) ) {
14b34: e59d3008 ldr r3, [sp, #8] 14b38: e1530008 cmp r3, r8
14b3c: 1a000002 bne 14b4c <_Timer_server_Body+0x128>
14b40: ea000015 b 14b9c <_Timer_server_Body+0x178>
14b44: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 14b48: eaffffcb b 14a7c <_Timer_server_Body+0x58> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
14b4c: e10f2000 mrs r2, CPSR 14b50: e3823080 orr r3, r2, #128 ; 0x80 14b54: e129f003 msr CPSR_fc, r3
*/ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain));
14b58: e59d3008 ldr r3, [sp, #8]
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain))
14b5c: e1530008 cmp r3, r8
14b60: 0a00000b beq 14b94 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next;
14b64: 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 ) {
14b68: e3530000 cmp r3, #0
the_chain->first = new_first;
14b6c: e58d1008 str r1, [sp, #8]
new_first->previous = _Chain_Head(the_chain);
14b70: e5815004 str r5, [r1, #4]
14b74: 0a000006 beq 14b94 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE;
14b78: e5839008 str r9, [r3, #8]
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
14b7c: 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 );
14b80: e2830020 add r0, r3, #32 14b84: e8900003 ldm r0, {r0, r1} 14b88: e1a0e00f mov lr, pc 14b8c: e593f01c ldr pc, [r3, #28]
}
14b90: eaffffed b 14b4c <_Timer_server_Body+0x128> 14b94: e129f002 msr CPSR_fc, r2 14b98: eaffffb5 b 14a74 <_Timer_server_Body+0x50>
} else { ts->active = false;
14b9c: e5c4907c strb r9, [r4, #124] ; 0x7c 14ba0: e59f304c ldr r3, [pc, #76] ; 14bf4 <_Timer_server_Body+0x1d0> 14ba4: e5932000 ldr r2, [r3] 14ba8: e2822001 add r2, r2, #1 14bac: e5832000 str r2, [r3]
/* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING );
14bb0: e3a01008 mov r1, #8 14bb4: e5940000 ldr r0, [r4] 14bb8: eb000d9f bl 1823c <_Thread_Set_state>
_Timer_server_Reset_interval_system_watchdog( ts );
14bbc: e1a00004 mov r0, r4 14bc0: ebffff6b bl 14974 <_Timer_server_Reset_interval_system_watchdog>
_Timer_server_Reset_tod_system_watchdog( ts );
14bc4: e1a00004 mov r0, r4 14bc8: ebffff7f bl 149cc <_Timer_server_Reset_tod_system_watchdog>
_Thread_Enable_dispatch();
14bcc: eb000b01 bl 177d8 <_Thread_Enable_dispatch>
ts->active = true;
14bd0: e3a03001 mov r3, #1 14bd4: 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 );
14bd8: e59d0004 ldr r0, [sp, #4] 14bdc: eb0010a1 bl 18e68 <_Watchdog_Remove>
static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog );
14be0: e59d0000 ldr r0, [sp] 14be4: eb00109f bl 18e68 <_Watchdog_Remove> 14be8: eaffffa1 b 14a74 <_Timer_server_Body+0x50>
00017ef4 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL();
17ef4: e1a04000 mov r4, r0 17ef8: eb000228 bl 187a0 <___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();
17efc: ebffffe0 bl 17e84 <libc_wrapup>
rtems_shutdown_executive(status);
17f00: e1a00004 mov r0, r4 17f04: eb00003b bl 17ff8 <rtems_shutdown_executive>
17f08: eafffffe b 17f08 <_exit+0x14> <== NOT EXECUTED
0000297c <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg );
297c: e1a00001 mov r0, r1 <== NOT EXECUTED 2980: e1a01002 mov r1, r2 <== NOT EXECUTED 2984: e1a02003 mov r2, r3 <== NOT EXECUTED 2988: eaffff8b b 27bc <fcntl> <== NOT EXECUTED
0000b8e4 <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); }
b8e4: e3a00001 mov r0, #1 <== NOT EXECUTED b8e8: e12fff1e bx lr <== NOT EXECUTED
000091b8 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp );
91b8: eaffffe8 b 9160 <gettimeofday> <== NOT EXECUTED
00003488 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new );
3488: e1a00001 mov r0, r1 <== NOT EXECUTED 348c: e1a01002 mov r1, r2 <== NOT EXECUTED 3490: eaffff68 b 3238 <link> <== NOT EXECUTED
00017fdc <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size );
17fdc: e1a00001 mov r0, r1 <== NOT EXECUTED 17fe0: e1a01002 mov r1, r2 <== NOT EXECUTED 17fe4: ea00000e b 18024 <realloc> <== NOT EXECUTED
00005e18 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
5e18: e92d40f0 push {r4, r5, r6, r7, lr}
/* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old );
5e1c: e1a00001 mov r0, r1
int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) {
5e20: e24dd044 sub sp, sp, #68 ; 0x44 5e24: e1a05001 mov r5, r1 5e28: e1a06002 mov r6, r2
/* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old );
5e2c: ebfffaf6 bl 4a0c <rtems_filesystem_dirname>
if ( old_parent_pathlen == 0 )
5e30: e2507000 subs r7, r0, #0
5e34: 1a000019 bne 5ea0 <_rename_r+0x88> rtems_filesystem_get_start_loc( old, &i, &old_parent_loc );
5e38: e5d53000 ldrb r3, [r5] 5e3c: e353002f cmp r3, #47 ; 0x2f 5e40: 1353005c cmpne r3, #92 ; 0x5c
5e44: 0a000001 beq 5e50 <_rename_r+0x38>
5e48: e3530000 cmp r3, #0
5e4c: 1a000009 bne 5e78 <_rename_r+0x60>
5e50: e59f33a4 ldr r3, [pc, #932] ; 61fc <_rename_r+0x3e4> <== NOT EXECUTED 5e54: e593e000 ldr lr, [r3] <== NOT EXECUTED 5e58: e28ee018 add lr, lr, #24 <== NOT EXECUTED 5e5c: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 5e60: e28dc018 add ip, sp, #24 <== NOT EXECUTED 5e64: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 5e68: e59e3000 ldr r3, [lr] <== NOT EXECUTED 5e6c: e3a04000 mov r4, #0 <== NOT EXECUTED 5e70: e58c3000 str r3, [ip] <== NOT EXECUTED 5e74: ea000013 b 5ec8 <_rename_r+0xb0> <== NOT EXECUTED
5e78: e59f337c ldr r3, [pc, #892] ; 61fc <_rename_r+0x3e4> 5e7c: e593e000 ldr lr, [r3] 5e80: e28ee004 add lr, lr, #4 5e84: e8be000f ldm lr!, {r0, r1, r2, r3} 5e88: e28dc018 add ip, sp, #24 5e8c: e8ac000f stmia ip!, {r0, r1, r2, r3} 5e90: e59e3000 ldr r3, [lr] 5e94: e1a04007 mov r4, r7 5e98: e58c3000 str r3, [ip] 5e9c: ea000009 b 5ec8 <_rename_r+0xb0>
else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen,
5ea0: e3a0c000 mov ip, #0 5ea4: e1a00005 mov r0, r5 5ea8: e1a01007 mov r1, r7 5eac: e3a02002 mov r2, #2 5eb0: e28d3018 add r3, sp, #24 5eb4: e58dc000 str ip, [sp] 5eb8: ebfffb1b bl 4b2c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 )
5ebc: e3500000 cmp r0, #0
5ec0: 1a0000c9 bne 61ec <_rename_r+0x3d4>
5ec4: e3a04001 mov r4, #1
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
5ec8: e28de018 add lr, sp, #24 5ecc: e8be000f ldm lr!, {r0, r1, r2, r3} 5ed0: e28dc02c add ip, sp, #44 ; 0x2c 5ed4: e8ac000f stmia ip!, {r0, r1, r2, r3} 5ed8: e59e3000 ldr r3, [lr]
name = old + old_parent_pathlen;
5edc: e0855007 add r5, r5, r7
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc;
5ee0: e58c3000 str r3, [ip]
name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
5ee4: e1a00005 mov r0, r5
/* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen;
5ee8: e58d5040 str r5, [sp, #64] ; 0x40
name += rtems_filesystem_prefix_separators( name, strlen( name ) );
5eec: eb003c92 bl 1513c <strlen> 5ef0: e1a01000 mov r1, r0 5ef4: e1a00005 mov r0, r5 5ef8: ebfffab7 bl 49dc <rtems_filesystem_prefix_separators> 5efc: e0855000 add r5, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
5f00: e1a00005 mov r0, r5
* Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
5f04: e58d5040 str r5, [sp, #64] ; 0x40
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
5f08: eb003c8b bl 1513c <strlen> 5f0c: e3a0c000 mov ip, #0 5f10: e1a01000 mov r1, r0 5f14: e1a0200c mov r2, ip 5f18: e1a00005 mov r0, r5 5f1c: e28d302c add r3, sp, #44 ; 0x2c 5f20: e58dc000 str ip, [sp] 5f24: ebfffac8 bl 4a4c <rtems_filesystem_evaluate_relative_path>
0, &old_loc, false ); if ( result != 0 ) {
5f28: e3500000 cmp r0, #0
5f2c: 0a000009 beq 5f58 <_rename_r+0x140> if ( free_old_parentloc )
5f30: e3540000 cmp r4, #0
5f34: 0a0000ac beq 61ec <_rename_r+0x3d4> rtems_filesystem_freenode( &old_parent_loc );
5f38: e59d3024 ldr r3, [sp, #36] ; 0x24 5f3c: e3530000 cmp r3, #0
5f40: 0a0000a9 beq 61ec <_rename_r+0x3d4>
5f44: e593301c ldr r3, [r3, #28] 5f48: e3530000 cmp r3, #0 5f4c: 128d0018 addne r0, sp, #24
5f50: 0a0000a5 beq 61ec <_rename_r+0x3d4>
5f54: ea00003f b 6058 <_rename_r+0x240>
/* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc );
5f58: e5d63000 ldrb r3, [r6] 5f5c: e353002f cmp r3, #47 ; 0x2f 5f60: 1353005c cmpne r3, #92 ; 0x5c 5f64: 13a05000 movne r5, #0 5f68: 03a05001 moveq r5, #1
5f6c: 0a000001 beq 5f78 <_rename_r+0x160>
5f70: e3530000 cmp r3, #0
5f74: 1a000009 bne 5fa0 <_rename_r+0x188>
5f78: e59f327c ldr r3, [pc, #636] ; 61fc <_rename_r+0x3e4> 5f7c: e593e000 ldr lr, [r3] 5f80: e28ee018 add lr, lr, #24 5f84: e8be000f ldm lr!, {r0, r1, r2, r3} 5f88: e28dc004 add ip, sp, #4 5f8c: e8ac000f stmia ip!, {r0, r1, r2, r3} 5f90: e59e3000 ldr r3, [lr] 5f94: e3a00001 mov r0, #1 5f98: e58c3000 str r3, [ip] 5f9c: ea000008 b 5fc4 <_rename_r+0x1ac> 5fa0: e59f3254 ldr r3, [pc, #596] ; 61fc <_rename_r+0x3e4> 5fa4: e593e000 ldr lr, [r3] 5fa8: e28ee004 add lr, lr, #4 5fac: e8be000f ldm lr!, {r0, r1, r2, r3} 5fb0: e28dc004 add ip, sp, #4 5fb4: e8ac000f stmia ip!, {r0, r1, r2, r3} 5fb8: e59e3000 ldr r3, [lr] 5fbc: e58c3000 str r3, [ip] 5fc0: e1a00005 mov r0, r5
if ( !new_parent_loc.ops->evalformake_h ) {
5fc4: e59d3010 ldr r3, [sp, #16] 5fc8: e5933004 ldr r3, [r3, #4] 5fcc: e3530000 cmp r3, #0
5fd0: 0a00004c beq 6108 <_rename_r+0x2f0> rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name );
5fd4: e28d5004 add r5, sp, #4 5fd8: e0860000 add r0, r6, r0 5fdc: e1a01005 mov r1, r5 5fe0: e28d2040 add r2, sp, #64 ; 0x40 5fe4: e1a0e00f mov lr, pc 5fe8: e12fff13 bx r3
if ( result != 0 ) {
5fec: e3500000 cmp r0, #0
5ff0: 0a00001b beq 6064 <_rename_r+0x24c> rtems_filesystem_freenode( &new_parent_loc );
5ff4: e59d3010 ldr r3, [sp, #16] 5ff8: e3530000 cmp r3, #0
5ffc: 0a000004 beq 6014 <_rename_r+0x1fc>
6000: e593301c ldr r3, [r3, #28] 6004: e3530000 cmp r3, #0 6008: 11a00005 movne r0, r5 600c: 11a0e00f movne lr, pc 6010: 112fff13 bxne r3
if ( free_old_parentloc )
6014: e3540000 cmp r4, #0
6018: 0a000007 beq 603c <_rename_r+0x224> rtems_filesystem_freenode( &old_parent_loc );
601c: e59d3024 ldr r3, [sp, #36] ; 0x24 6020: e3530000 cmp r3, #0
6024: 0a000004 beq 603c <_rename_r+0x224>
6028: e593301c ldr r3, [r3, #28] 602c: e3530000 cmp r3, #0 6030: 128d0018 addne r0, sp, #24 6034: 11a0e00f movne lr, pc 6038: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
603c: e59d3038 ldr r3, [sp, #56] ; 0x38 6040: e3530000 cmp r3, #0
6044: 0a000068 beq 61ec <_rename_r+0x3d4>
6048: e593301c ldr r3, [r3, #28] 604c: e3530000 cmp r3, #0
6050: 0a000065 beq 61ec <_rename_r+0x3d4>
6054: e28d002c add r0, sp, #44 ; 0x2c 6058: e1a0e00f mov lr, pc 605c: e12fff13 bx r3 6060: ea000061 b 61ec <_rename_r+0x3d4>
/* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) {
6064: e59d3014 ldr r3, [sp, #20] 6068: e59d2028 ldr r2, [sp, #40] ; 0x28 606c: e1520003 cmp r2, r3 6070: e59d3010 ldr r3, [sp, #16]
6074: 0a00001b beq 60e8 <_rename_r+0x2d0> rtems_filesystem_freenode( &new_parent_loc );
6078: e3530000 cmp r3, #0
607c: 0a000004 beq 6094 <_rename_r+0x27c>
6080: e593301c ldr r3, [r3, #28] 6084: e3530000 cmp r3, #0 6088: 11a00005 movne r0, r5 608c: 11a0e00f movne lr, pc 6090: 112fff13 bxne r3
if ( free_old_parentloc )
6094: e3540000 cmp r4, #0
6098: 0a000007 beq 60bc <_rename_r+0x2a4> rtems_filesystem_freenode( &old_parent_loc );
609c: e59d3024 ldr r3, [sp, #36] ; 0x24 60a0: e3530000 cmp r3, #0
60a4: 0a000004 beq 60bc <_rename_r+0x2a4>
60a8: e593301c ldr r3, [r3, #28] 60ac: e3530000 cmp r3, #0 60b0: 128d0018 addne r0, sp, #24 60b4: 11a0e00f movne lr, pc 60b8: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
60bc: e59d3038 ldr r3, [sp, #56] ; 0x38 60c0: e3530000 cmp r3, #0
60c4: 0a000004 beq 60dc <_rename_r+0x2c4>
60c8: e593301c ldr r3, [r3, #28] 60cc: e3530000 cmp r3, #0 60d0: 128d002c addne r0, sp, #44 ; 0x2c 60d4: 11a0e00f movne lr, pc 60d8: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
60dc: eb002f40 bl 11de4 <__errno> 60e0: e3a03012 mov r3, #18 60e4: ea00001b b 6158 <_rename_r+0x340>
} if ( !new_parent_loc.ops->rename_h ) {
60e8: e593c040 ldr ip, [r3, #64] ; 0x40 60ec: e35c0000 cmp ip, #0
60f0: 1a00001a bne 6160 <_rename_r+0x348> rtems_filesystem_freenode( &new_parent_loc );
60f4: e593301c ldr r3, [r3, #28] 60f8: e3530000 cmp r3, #0 60fc: 11a00005 movne r0, r5 6100: 11a0e00f movne lr, pc 6104: 112fff13 bxne r3
if ( free_old_parentloc )
6108: e3540000 cmp r4, #0
610c: 0a000007 beq 6130 <_rename_r+0x318> rtems_filesystem_freenode( &old_parent_loc );
6110: e59d3024 ldr r3, [sp, #36] ; 0x24 6114: e3530000 cmp r3, #0
6118: 0a000004 beq 6130 <_rename_r+0x318>
611c: e593301c ldr r3, [r3, #28] 6120: e3530000 cmp r3, #0 6124: 128d0018 addne r0, sp, #24 6128: 11a0e00f movne lr, pc 612c: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
6130: e59d3038 ldr r3, [sp, #56] ; 0x38 6134: e3530000 cmp r3, #0
6138: 0a000004 beq 6150 <_rename_r+0x338>
613c: e593301c ldr r3, [r3, #28] 6140: e3530000 cmp r3, #0 6144: 128d002c addne r0, sp, #44 ; 0x2c 6148: 11a0e00f movne lr, pc 614c: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTSUP );
6150: eb002f23 bl 11de4 <__errno> 6154: e3a03086 mov r3, #134 ; 0x86 6158: e5803000 str r3, [r0] 615c: ea000022 b 61ec <_rename_r+0x3d4>
} result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
6160: e59d3040 ldr r3, [sp, #64] ; 0x40 6164: e28d0018 add r0, sp, #24 6168: e28d102c add r1, sp, #44 ; 0x2c 616c: e1a02005 mov r2, r5 6170: e1a0e00f mov lr, pc 6174: e12fff1c bx ip
rtems_filesystem_freenode( &new_parent_loc );
6178: e59d3010 ldr r3, [sp, #16] 617c: e3530000 cmp r3, #0
rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name );
6180: e1a06000 mov r6, r0
rtems_filesystem_freenode( &new_parent_loc ); 6184: 0a000004 beq 619c <_rename_r+0x384>
6188: e593301c ldr r3, [r3, #28] 618c: e3530000 cmp r3, #0 6190: 11a00005 movne r0, r5 6194: 11a0e00f movne lr, pc 6198: 112fff13 bxne r3
if ( free_old_parentloc )
619c: e3540000 cmp r4, #0
61a0: 0a000007 beq 61c4 <_rename_r+0x3ac> rtems_filesystem_freenode( &old_parent_loc );
61a4: e59d3024 ldr r3, [sp, #36] ; 0x24 61a8: e3530000 cmp r3, #0
61ac: 0a000004 beq 61c4 <_rename_r+0x3ac>
61b0: e593301c ldr r3, [r3, #28] 61b4: e3530000 cmp r3, #0 61b8: 128d0018 addne r0, sp, #24 61bc: 11a0e00f movne lr, pc 61c0: 112fff13 bxne r3
rtems_filesystem_freenode( &old_loc );
61c4: e59d3038 ldr r3, [sp, #56] ; 0x38 61c8: e3530000 cmp r3, #0
61cc: 0a000007 beq 61f0 <_rename_r+0x3d8>
61d0: e593301c ldr r3, [r3, #28] 61d4: e3530000 cmp r3, #0
61d8: 0a000004 beq 61f0 <_rename_r+0x3d8>
61dc: e28d002c add r0, sp, #44 ; 0x2c 61e0: e1a0e00f mov lr, pc 61e4: e12fff13 bx r3 61e8: ea000000 b 61f0 <_rename_r+0x3d8> 61ec: e3e06000 mvn r6, #0
return result; }
61f0: e1a00006 mov r0, r6 61f4: e28dd044 add sp, sp, #68 ; 0x44 61f8: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003ee4 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf );
3ee4: e1a00001 mov r0, r1 <== NOT EXECUTED 3ee8: e1a01002 mov r1, r2 <== NOT EXECUTED 3eec: eaffffc4 b 3e04 <stat> <== NOT EXECUTED
0000c794 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path );
c794: e1a00001 mov r0, r1 <== NOT EXECUTED c798: eaffff5c b c510 <unlink> <== NOT EXECUTED
0000a818 <chdir>: #include <rtems/seterr.h> int chdir( const char *pathname ) {
a818: e92d4030 push {r4, r5, lr}
rtems_filesystem_location_info_t loc; int result; if ( !pathname )
a81c: e2505000 subs r5, r0, #0
#include <rtems/seterr.h> int chdir( const char *pathname ) {
a820: e24dd018 sub sp, sp, #24
rtems_filesystem_location_info_t loc; int result; if ( !pathname ) a824: 1a000002 bne a834 <chdir+0x1c> rtems_set_errno_and_return_minus_one( EFAULT );
a828: eb000ff2 bl e7f8 <__errno> a82c: e3a0300e mov r3, #14 a830: ea000025 b a8cc <chdir+0xb4>
/* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
a834: eb0013c8 bl f75c <strlen>
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
a838: e28d4004 add r4, sp, #4 a83c: e3a0c001 mov ip, #1
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true );
a840: e1a01000 mov r1, r0
rtems_set_errno_and_return_minus_one( EFAULT ); /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path(
a844: e1a0200c mov r2, ip a848: e1a00005 mov r0, r5 a84c: e1a03004 mov r3, r4 a850: e58dc000 str ip, [sp] a854: ebffddea bl 2004 <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 )
a858: e3500000 cmp r0, #0
a85c: 1a00001b bne a8d0 <chdir+0xb8> return -1; /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) {
a860: e59d2010 ldr r2, [sp, #16] a864: e5923010 ldr r3, [r2, #16] a868: e3530000 cmp r3, #0
a86c: 1a000007 bne a890 <chdir+0x78> rtems_filesystem_freenode( &loc );
a870: e592301c ldr r3, [r2, #28] <== NOT EXECUTED a874: e3530000 cmp r3, #0 <== NOT EXECUTED a878: 11a00004 movne r0, r4 <== NOT EXECUTED a87c: 11a0e00f movne lr, pc <== NOT EXECUTED a880: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
a884: eb000fdb bl e7f8 <__errno> <== NOT EXECUTED a888: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a88c: ea00000e b a8cc <chdir+0xb4> <== NOT EXECUTED
} if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
a890: e1a00004 mov r0, r4 a894: e1a0e00f mov lr, pc a898: e12fff13 bx r3 a89c: e3500001 cmp r0, #1
a8a0: 0a00000c beq a8d8 <chdir+0xc0> rtems_filesystem_freenode( &loc );
a8a4: e59d3010 ldr r3, [sp, #16] a8a8: e3530000 cmp r3, #0
a8ac: 0a000004 beq a8c4 <chdir+0xac>
a8b0: e593301c ldr r3, [r3, #28] a8b4: e3530000 cmp r3, #0 a8b8: 11a00004 movne r0, r4 a8bc: 11a0e00f movne lr, pc a8c0: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
a8c4: eb000fcb bl e7f8 <__errno> a8c8: e3a03014 mov r3, #20 a8cc: e5803000 str r3, [r0] a8d0: e3e00000 mvn r0, #0 a8d4: ea000012 b a924 <chdir+0x10c>
} rtems_filesystem_freenode( &rtems_filesystem_current );
a8d8: e59f304c ldr r3, [pc, #76] ; a92c <chdir+0x114> a8dc: e5930000 ldr r0, [r3] a8e0: e5903010 ldr r3, [r0, #16] a8e4: e3530000 cmp r3, #0
a8e8: 0a000004 beq a900 <chdir+0xe8>
a8ec: e593301c ldr r3, [r3, #28] a8f0: e3530000 cmp r3, #0 a8f4: 12800004 addne r0, r0, #4 a8f8: 11a0e00f movne lr, pc a8fc: 112fff13 bxne r3
rtems_filesystem_current = loc;
a900: e59f3024 ldr r3, [pc, #36] ; a92c <chdir+0x114> a904: e28d4004 add r4, sp, #4 a908: e593c000 ldr ip, [r3] a90c: e8b4000f ldm r4!, {r0, r1, r2, r3} a910: e28cc004 add ip, ip, #4 a914: e8ac000f stmia ip!, {r0, r1, r2, r3} a918: e5943000 ldr r3, [r4] a91c: e58c3000 str r3, [ip] a920: e3a00000 mov r0, #0
return 0; }
a924: e28dd018 add sp, sp, #24 a928: e8bd8030 pop {r4, r5, pc}
00003c50 <chmod>: int chmod( const char *path, mode_t mode ) {
3c50: e92d4070 push {r4, r5, r6, lr} 3c54: e24dd018 sub sp, sp, #24 3c58: e1a05001 mov r5, r1 3c5c: 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 );
3c60: eb003cee bl 13020 <strlen> 3c64: e28d4004 add r4, sp, #4 3c68: e1a01000 mov r1, r0 3c6c: e3a0c001 mov ip, #1 3c70: e1a00006 mov r0, r6 3c74: e3a02000 mov r2, #0 3c78: e1a03004 mov r3, r4 3c7c: e58dc000 str ip, [sp] 3c80: eb0000b4 bl 3f58 <rtems_filesystem_evaluate_path>
if ( status != 0 )
3c84: e3500000 cmp r0, #0
3c88: 1a00000d bne 3cc4 <chmod+0x74> return -1; if ( !loc.handlers ){
3c8c: e59d300c ldr r3, [sp, #12] 3c90: e3530000 cmp r3, #0
3c94: 1a00000c bne 3ccc <chmod+0x7c> rtems_filesystem_freenode( &loc );
3c98: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3c9c: e3530000 cmp r3, #0 <== NOT EXECUTED 3ca0: 0a000004 beq 3cb8 <chmod+0x68> <== NOT EXECUTED 3ca4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3ca8: e3530000 cmp r3, #0 <== NOT EXECUTED 3cac: 11a00004 movne r0, r4 <== NOT EXECUTED 3cb0: 11a0e00f movne lr, pc <== NOT EXECUTED 3cb4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EBADF );
3cb8: eb003572 bl 11288 <__errno> <== NOT EXECUTED 3cbc: e3a03009 mov r3, #9 <== NOT EXECUTED 3cc0: e5803000 str r3, [r0] <== NOT EXECUTED
3cc4: e3e05000 mvn r5, #0 3cc8: ea00001a b 3d38 <chmod+0xe8>
} if ( !loc.handlers->fchmod_h ){
3ccc: e593301c ldr r3, [r3, #28] 3cd0: e3530000 cmp r3, #0
3cd4: 1a00000a bne 3d04 <chmod+0xb4> rtems_filesystem_freenode( &loc );
3cd8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3cdc: e3530000 cmp r3, #0 <== NOT EXECUTED 3ce0: 0a000004 beq 3cf8 <chmod+0xa8> <== NOT EXECUTED 3ce4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3ce8: e3530000 cmp r3, #0 <== NOT EXECUTED 3cec: 11a00004 movne r0, r4 <== NOT EXECUTED 3cf0: 11a0e00f movne lr, pc <== NOT EXECUTED 3cf4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3cf8: eb003562 bl 11288 <__errno> <== NOT EXECUTED 3cfc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3d00: eaffffee b 3cc0 <chmod+0x70> <== NOT EXECUTED
} result = (*loc.handlers->fchmod_h)( &loc, mode );
3d04: e1a01005 mov r1, r5 3d08: e1a00004 mov r0, r4 3d0c: e1a0e00f mov lr, pc 3d10: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
3d14: e59d3010 ldr r3, [sp, #16] 3d18: 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 );
3d1c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 3d20: 0a000004 beq 3d38 <chmod+0xe8>
3d24: e593301c ldr r3, [r3, #28] 3d28: e3530000 cmp r3, #0 3d2c: 11a00004 movne r0, r4 3d30: 11a0e00f movne lr, pc 3d34: 112fff13 bxne r3
return result; }
3d38: e1a00005 mov r0, r5 3d3c: e28dd018 add sp, sp, #24 3d40: e8bd8070 pop {r4, r5, r6, pc}
00003d44 <chown>: int chown( const char *path, uid_t owner, gid_t group ) {
3d44: e92d40f0 push {r4, r5, r6, r7, lr} 3d48: e1a01801 lsl r1, r1, #16 3d4c: e24dd018 sub sp, sp, #24 3d50: e1a02802 lsl r2, r2, #16 3d54: e1a06821 lsr r6, r1, #16 3d58: e1a05822 lsr r5, r2, #16 3d5c: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) )
3d60: eb003cae bl 13020 <strlen> 3d64: e28d4004 add r4, sp, #4 3d68: e1a01000 mov r1, r0 3d6c: e3a0c001 mov ip, #1 3d70: e1a00007 mov r0, r7 3d74: e3a02000 mov r2, #0 3d78: e1a03004 mov r3, r4 3d7c: e58dc000 str ip, [sp] 3d80: eb000074 bl 3f58 <rtems_filesystem_evaluate_path> 3d84: e3500000 cmp r0, #0
3d88: 1a00000b bne 3dbc <chown+0x78> return -1; if ( !loc.ops->chown_h ) {
3d8c: e59d2010 ldr r2, [sp, #16] 3d90: e5923018 ldr r3, [r2, #24] 3d94: e3530000 cmp r3, #0
3d98: 1a000009 bne 3dc4 <chown+0x80> rtems_filesystem_freenode( &loc );
3d9c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 3da0: e3530000 cmp r3, #0 <== NOT EXECUTED 3da4: 11a00004 movne r0, r4 <== NOT EXECUTED 3da8: 11a0e00f movne lr, pc <== NOT EXECUTED 3dac: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3db0: eb003534 bl 11288 <__errno> <== NOT EXECUTED 3db4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3db8: e5803000 str r3, [r0] <== NOT EXECUTED
3dbc: e3e05000 mvn r5, #0 3dc0: ea00000d b 3dfc <chown+0xb8>
} result = (*loc.ops->chown_h)( &loc, owner, group );
3dc4: e1a02005 mov r2, r5 3dc8: e1a01006 mov r1, r6 3dcc: e1a00004 mov r0, r4 3dd0: e1a0e00f mov lr, pc 3dd4: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
3dd8: e59d3010 ldr r3, [sp, #16] 3ddc: 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 );
3de0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 3de4: 0a000004 beq 3dfc <chown+0xb8>
3de8: e593301c ldr r3, [r3, #28] 3dec: e3530000 cmp r3, #0 3df0: 11a00004 movne r0, r4 3df4: 11a0e00f movne lr, pc 3df8: 112fff13 bxne r3
return result; }
3dfc: e1a00005 mov r0, r5 3e00: e28dd018 add sp, sp, #24 3e04: e8bd80f0 pop {r4, r5, r6, r7, pc}
00001d24 <chroot>: #include <rtems/seterr.h> int chroot( const char *pathname ) {
1d24: 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) {
1d28: e59f50d4 ldr r5, [pc, #212] ; 1e04 <chroot+0xe0> 1d2c: e59f30d4 ldr r3, [pc, #212] ; 1e08 <chroot+0xe4> 1d30: e5954000 ldr r4, [r5] 1d34: e1540003 cmp r4, r3
#include <rtems/seterr.h> int chroot( const char *pathname ) {
1d38: e24dd018 sub sp, sp, #24 1d3c: 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) { 1d40: 1a000007 bne 1d64 <chroot+0x40> rtems_libio_set_private_env(); /* try to set a new private env*/
1d44: eb00052f bl 3208 <rtems_libio_set_private_env>
if (rtems_current_user_env == &rtems_global_user_env) /* not ok */
1d48: e5953000 ldr r3, [r5] 1d4c: e1530004 cmp r3, r4
1d50: 1a000003 bne 1d64 <chroot+0x40> rtems_set_errno_and_return_minus_one( ENOTSUP );
1d54: eb0032a7 bl e7f8 <__errno> <== NOT EXECUTED 1d58: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1d5c: e5803000 str r3, [r0] <== NOT EXECUTED 1d60: ea000008 b 1d88 <chroot+0x64> <== NOT EXECUTED
} result = chdir(pathname);
1d64: e1a00006 mov r0, r6 1d68: eb0022aa bl a818 <chdir>
if (result) {
1d6c: e250c000 subs ip, r0, #0
1d70: 0a000006 beq 1d90 <chroot+0x6c> rtems_set_errno_and_return_minus_one( errno );
1d74: eb00329f bl e7f8 <__errno> <== NOT EXECUTED 1d78: e1a04000 mov r4, r0 <== NOT EXECUTED 1d7c: eb00329d bl e7f8 <__errno> <== NOT EXECUTED 1d80: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d84: e5843000 str r3, [r4] <== NOT EXECUTED 1d88: e3e00000 mvn r0, #0 <== NOT EXECUTED 1d8c: ea00001a b 1dfc <chroot+0xd8> <== NOT EXECUTED
} /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) {
1d90: e1a0200c mov r2, ip 1d94: e59f0070 ldr r0, [pc, #112] ; 1e0c <chroot+0xe8> 1d98: e3a01001 mov r1, #1 1d9c: e28d3004 add r3, sp, #4 1da0: e58dc000 str ip, [sp] 1da4: eb000096 bl 2004 <rtems_filesystem_evaluate_path> 1da8: e3500000 cmp r0, #0
1dac: 1afffff0 bne 1d74 <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);
1db0: e59f304c ldr r3, [pc, #76] ; 1e04 <chroot+0xe0> 1db4: e5930000 ldr r0, [r3] 1db8: e5903024 ldr r3, [r0, #36] ; 0x24 1dbc: e3530000 cmp r3, #0
1dc0: 0a000004 beq 1dd8 <chroot+0xb4>
1dc4: e593301c ldr r3, [r3, #28] 1dc8: e3530000 cmp r3, #0 1dcc: 12800018 addne r0, r0, #24 1dd0: 11a0e00f movne lr, pc 1dd4: 112fff13 bxne r3
rtems_filesystem_root = loc;
1dd8: e59f3024 ldr r3, [pc, #36] ; 1e04 <chroot+0xe0> 1ddc: e28d4004 add r4, sp, #4 1de0: e593c000 ldr ip, [r3] 1de4: e8b4000f ldm r4!, {r0, r1, r2, r3} 1de8: e28cc018 add ip, ip, #24 1dec: e8ac000f stmia ip!, {r0, r1, r2, r3} 1df0: e5943000 ldr r3, [r4] 1df4: e58c3000 str r3, [ip] 1df8: e3a00000 mov r0, #0
return 0; }
1dfc: e28dd018 add sp, sp, #24 1e00: e8bd8070 pop {r4, r5, r6, pc}
00008050 <devFS_evaluate_path>: const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
8050: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access;
8054: e5935000 ldr r5, [r3]
if (!device_name_table)
8058: e3550000 cmp r5, #0
const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) {
805c: e1a04003 mov r4, r3 8060: e1a09000 mov r9, r0 8064: e1a08001 mov r8, r1
rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table)
8068: 13a06000 movne r6, #0
rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) {
806c: 159fa090 ldrne sl, [pc, #144] ; 8104 <devFS_evaluate_path+0xb4>
rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 8070: 1a000019 bne 80dc <devFS_evaluate_path+0x8c> rtems_set_errno_and_return_minus_one( EFAULT );
8074: eb0008eb bl a428 <__errno> <== NOT EXECUTED 8078: e3a0300e mov r3, #14 <== NOT EXECUTED 807c: e5803000 str r3, [r0] <== NOT EXECUTED 8080: e3e00000 mvn r0, #0 <== NOT EXECUTED 8084: 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)
8088: e5957000 ldr r7, [r5] 808c: e2571000 subs r1, r7, #0
8090: 0a00000f beq 80d4 <devFS_evaluate_path+0x84> continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
8094: eb000c99 bl b300 <strncmp> 8098: e3500000 cmp r0, #0
809c: 1a00000c bne 80d4 <devFS_evaluate_path+0x84> continue; if (device_name_table[i].device_name[pathnamelen] != '\0')
80a0: e7d70008 ldrb r0, [r7, r8] 80a4: e3500000 cmp r0, #0
80a8: 1a000009 bne 80d4 <devFS_evaluate_path+0x84> /* 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;
80ac: e59f3054 ldr r3, [pc, #84] ; 8108 <devFS_evaluate_path+0xb8> 80b0: e5933000 ldr r3, [r3] 80b4: e5933028 ldr r3, [r3, #40] ; 0x28 80b8: e5843010 str r3, [r4, #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;
80bc: e59f3048 ldr r3, [pc, #72] ; 810c <devFS_evaluate_path+0xbc> 80c0: e5843008 str r3, [r4, #8]
pathloc->ops = &devFS_ops;
80c4: e59f3044 ldr r3, [pc, #68] ; 8110 <devFS_evaluate_path+0xc0>
if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i];
80c8: e5845000 str r5, [r4]
pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops;
80cc: e584300c str r3, [r4, #12]
pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0;
80d0: 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++) {
80d4: e2866001 add r6, r6, #1 80d8: e2855014 add r5, r5, #20 80dc: e59a3000 ldr r3, [sl] 80e0: e1560003 cmp r6, r3
if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0)
80e4: e1a00009 mov r0, r9 80e8: e1a02008 mov r2, r8
/* 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++) { 80ec: 3affffe5 bcc 8088 <devFS_evaluate_path+0x38> pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT );
80f0: eb0008cc bl a428 <__errno> 80f4: e3a03002 mov r3, #2 80f8: e5803000 str r3, [r0] 80fc: e3e00000 mvn r0, #0
}
8100: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc}
00001234 <devFS_initialize>: int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) {
1234: 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(
1238: e59f7058 ldr r7, [pc, #88] ; 1298 <devFS_initialize+0x64> 123c: e5973000 ldr r3, [r7] 1240: e3a06014 mov r6, #20
int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) {
1244: 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(
1248: e0000396 mul r0, r6, r3 124c: eb001a53 bl 7ba0 <_Workspace_Allocate>
sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table)
1250: e2505000 subs r5, r0, #0
1254: 1a000004 bne 126c <devFS_initialize+0x38> rtems_set_errno_and_return_minus_one( ENOMEM );
1258: eb002472 bl a428 <__errno> <== NOT EXECUTED 125c: e3a0300c mov r3, #12 <== NOT EXECUTED 1260: e5803000 str r3, [r0] <== NOT EXECUTED 1264: e3e00000 mvn r0, #0 <== NOT EXECUTED 1268: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED
memset(
126c: e5972000 ldr r2, [r7] 1270: e3a01000 mov r1, #0 1274: e0020296 mul r2, r6, r2 1278: eb002698 bl ace0 <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;
127c: e59f3018 ldr r3, [pc, #24] ; 129c <devFS_initialize+0x68>
temp_mt_entry->mt_fs_root.ops = &devFS_ops;
1280: 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;
1284: 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;
1288: 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;
128c: 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;
1290: e3a00000 mov r0, #0
return 0; }
1294: e8bd80f0 pop {r4, r5, r6, r7, pc}
000012a0 <devFS_mknod>: const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) {
12a0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 12a4: 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') &&
12a8: e5d00000 ldrb r0, [r0] 12ac: e3500064 cmp r0, #100 ; 0x64
const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) {
12b0: e1a05001 mov r5, r1 12b4: e58d2000 str r2, [sp] 12b8: 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') && 12bc: 1a000008 bne 12e4 <devFS_mknod+0x44>
12c0: e5d43001 ldrb r3, [r4, #1] 12c4: e3530065 cmp r3, #101 ; 0x65
12c8: 1a000005 bne 12e4 <devFS_mknod+0x44> (path[2] == 'v') && (path[3] == '\0'))
12cc: e5d43002 ldrb r3, [r4, #2] 12d0: e3530076 cmp r3, #118 ; 0x76
12d4: 1a000002 bne 12e4 <devFS_mknod+0x44>
12d8: e5d40003 ldrb r0, [r4, #3] 12dc: e3500000 cmp r0, #0
12e0: 0a000039 beq 13cc <devFS_mknod+0x12c> return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode))
12e4: e205aa0f and sl, r5, #61440 ; 0xf000 12e8: e35a0a02 cmp sl, #8192 ; 0x2000 12ec: 135a0a06 cmpne sl, #24576 ; 0x6000 12f0: 03a0a000 moveq sl, #0 12f4: 13a0a001 movne sl, #1
12f8: 0a000002 beq 1308 <devFS_mknod+0x68> rtems_set_errno_and_return_minus_one( EINVAL );
12fc: eb002449 bl a428 <__errno> <== NOT EXECUTED 1300: e3a03016 mov r3, #22 <== NOT EXECUTED 1304: ea000008 b 132c <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;
1308: e59d3028 ldr r3, [sp, #40] ; 0x28 130c: e5936000 ldr r6, [r3]
if (!device_name_table)
1310: e3560000 cmp r6, #0 1314: 13e07000 mvnne r7, #0 1318: 11a0800a movne r8, sl
rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){
131c: 159fb0ac ldrne fp, [pc, #172] ; 13d0 <devFS_mknod+0x130>
1320: 1a000010 bne 1368 <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 );
1324: eb00243f bl a428 <__errno> <== NOT EXECUTED 1328: e3a0300e mov r3, #14 <== NOT EXECUTED 132c: e5803000 str r3, [r0] <== NOT EXECUTED 1330: e3e00000 mvn r0, #0 <== NOT EXECUTED 1334: ea000024 b 13cc <devFS_mknod+0x12c> <== NOT EXECUTED
for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL)
1338: e796300a ldr r3, [r6, sl] 133c: e2531000 subs r1, r3, #0
1340: 0a000005 beq 135c <devFS_mknod+0xbc> slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0)
1344: eb00270d bl af80 <strcmp> <== NOT EXECUTED 1348: e3500000 cmp r0, #0 <== NOT EXECUTED 134c: 1a000003 bne 1360 <devFS_mknod+0xc0> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EEXIST );
1350: eb002434 bl a428 <__errno> <== NOT EXECUTED 1354: e3a03011 mov r3, #17 <== NOT EXECUTED 1358: eafffff3 b 132c <devFS_mknod+0x8c> <== NOT EXECUTED
135c: 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++){
1360: e2888001 add r8, r8, #1 1364: e28aa014 add sl, sl, #20 1368: e59b3000 ldr r3, [fp] 136c: 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)
1370: 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++){ 1374: 3affffef bcc 1338 <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)
1378: e3770001 cmn r7, #1
137c: 1a000004 bne 1394 <devFS_mknod+0xf4> rtems_set_errno_and_return_minus_one( ENOMEM );
1380: eb002428 bl a428 <__errno> <== NOT EXECUTED 1384: e3a0300c mov r3, #12 <== NOT EXECUTED 1388: e5803000 str r3, [r0] <== NOT EXECUTED 138c: e1a00007 mov r0, r7 <== NOT EXECUTED 1390: ea00000d b 13cc <devFS_mknod+0x12c> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
1394: e10f8000 mrs r8, CPSR 1398: e3883080 orr r3, r8, #128 ; 0x80 139c: e129f003 msr CPSR_fc, r3
_ISR_Disable(level); device_name_table[slot].device_name = (char *)path;
13a0: e3a02014 mov r2, #20 13a4: e0030792 mul r3, r2, r7
device_name_table[slot].device_name_length = strlen(path);
13a8: 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;
13ac: e7864003 str r4, [r6, r3] 13b0: e0866003 add r6, r6, r3
device_name_table[slot].device_name_length = strlen(path);
13b4: eb0027b9 bl b2a0 <strlen>
device_name_table[slot].major = major;
13b8: e59d3000 ldr r3, [sp]
device_name_table[slot].minor = minor; device_name_table[slot].mode = mode;
13bc: 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);
13c0: e9860209 stmib r6, {r0, r3, r9}
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
13c4: e129f008 msr CPSR_fc, r8 13c8: e3a00000 mov r0, #0
device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; }
13cc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
00001450 <devFS_read>: ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) {
1450: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED 1454: e1a03000 mov r3, r0 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
1458: 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;
145c: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
1460: e3a02000 mov r2, #0 <== NOT EXECUTED 1464: e58d2018 str r2, [sp, #24] <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
1468: 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;
146c: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset;
1470: e283c00c add ip, r3, #12 <== NOT EXECUTED 1474: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer;
1478: e58d100c str r1, [sp, #12] <== NOT EXECUTED
args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read(
147c: e2820008 add r0, r2, #8 <== NOT EXECUTED 1480: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 1484: 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;
1488: 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;
148c: e58d3000 str r3, [sp] <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read(
1490: eb000f5b bl 5204 <rtems_io_read> <== NOT EXECUTED
np->major, np->minor, (void *) &args ); if ( status )
1494: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
1498: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
149c: 1b001b1c blne 8114 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved; }
14a0: e28dd01c add sp, sp, #28 <== NOT EXECUTED 14a4: e8bd8800 pop {fp, pc} <== NOT EXECUTED
000014a8 <devFS_stat>: struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access;
14a8: e5903000 ldr r3, [r0]
if (!the_dev)
14ac: e3530000 cmp r3, #0
int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) {
14b0: 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) 14b4: 1a000004 bne 14cc <devFS_stat+0x24> rtems_set_errno_and_return_minus_one( EFAULT );
14b8: eb0023da bl a428 <__errno> <== NOT EXECUTED 14bc: e3a0300e mov r3, #14 <== NOT EXECUTED 14c0: e5803000 str r3, [r0] <== NOT EXECUTED 14c4: e3e00000 mvn r0, #0 <== NOT EXECUTED 14c8: 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;
14cc: 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 );
14d0: e593200c ldr r2, [r3, #12]
rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major;
14d4: e5933008 ldr r3, [r3, #8] 14d8: e581201c str r2, [r1, #28]
buf->st_mode = the_dev->mode;
14dc: 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 );
14e0: e5813018 str r3, [r1, #24]
buf->st_mode = the_dev->mode;
14e4: e3a00000 mov r0, #0
return 0; }
14e8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
0000ac64 <device_read>: ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) {
ac64: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED
args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags;
ac68: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
ac6c: e280c00c add ip, r0, #12 <== NOT EXECUTED ac70: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags;
ac74: e58d3014 str r3, [sp, #20] <== NOT EXECUTED
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset;
ac78: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0;
ac7c: e3a03000 mov r3, #0 <== NOT EXECUTED
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count;
ac80: e58d2010 str r2, [sp, #16] <== NOT EXECUTED
args.flags = iop->flags; args.bytes_moved = 0;
ac84: e58d3018 str r3, [sp, #24] <== NOT EXECUTED
the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer;
ac88: e58d100c str r1, [sp, #12] <== NOT EXECUTED
rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop;
ac8c: e58d0000 str r0, [sp] <== NOT EXECUTED
{ rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
ac90: e5903038 ldr r3, [r0, #56] ; 0x38 <== NOT EXECUTED
args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read(
ac94: e1a0200d mov r2, sp <== NOT EXECUTED ac98: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED ac9c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED aca0: eb0004e8 bl c048 <rtems_io_read> <== NOT EXECUTED
the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status )
aca4: e3500000 cmp r0, #0 <== NOT EXECUTED
return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved;
aca8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED
the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status);
acac: 1b000603 blne c4c0 <rtems_deviceio_errno> <== NOT EXECUTED
return (ssize_t) args.bytes_moved; }
acb0: e28dd01c add sp, sp, #28 <== NOT EXECUTED acb4: e8bd8800 pop {fp, pc} <== NOT EXECUTED
00003368 <drainOutput>: drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3368: e59030b4 ldr r3, [r0, #180] ; 0xb4 336c: e3530000 cmp r3, #0
/* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) {
3370: e92d4030 push {r4, r5, lr} 3374: e1a04000 mov r4, r0
rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) {
3378: 08bd8030 popeq {r4, r5, pc}
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
337c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 3380: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 3384: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait;
3388: 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) {
338c: ea00000a b 33bc <drainOutput+0x54> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
3390: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
3394: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
3398: e3a01000 mov r1, #0 <== NOT EXECUTED 339c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 33a0: e1a02001 mov r2, r1 <== NOT EXECUTED 33a4: eb0005af bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
33a8: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
33ac: 1b000741 blne 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
33b0: e10f3000 mrs r3, CPSR <== NOT EXECUTED 33b4: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 33b8: 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) {
33bc: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 33c0: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 33c4: e1510002 cmp r1, r2 <== NOT EXECUTED 33c8: 1afffff0 bne 3390 <drainOutput+0x28> <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
33cc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 33d0: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000253c <dup2>: int dup2( int fildes, int fildes2 ) {
253c: e92d4070 push {r4, r5, r6, lr} 2540: e24dd048 sub sp, sp, #72 ; 0x48 2544: e1a04001 mov r4, r1
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
2548: e1a0100d mov r1, sp
int dup2( int fildes, int fildes2 ) {
254c: e1a06000 mov r6, r0
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
2550: eb00019b bl 2bc4 <fstat>
if ( status == -1 )
2554: e3700001 cmn r0, #1
/* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf );
2558: e1a0500d mov r5, sp
if ( status == -1 ) 255c: 0a000009 beq 2588 <dup2+0x4c> /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf );
2560: e1a0100d mov r1, sp 2564: e1a00004 mov r0, r4 2568: eb000195 bl 2bc4 <fstat>
if ( status == -1 )
256c: e3700001 cmn r0, #1
2570: 0a000004 beq 2588 <dup2+0x4c> /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 );
2574: e1a00006 mov r0, r6 <== NOT EXECUTED 2578: e1a02004 mov r2, r4 <== NOT EXECUTED 257c: e3a01000 mov r1, #0 <== NOT EXECUTED 2580: eb00008d bl 27bc <fcntl> <== NOT EXECUTED 2584: ea000000 b 258c <dup2+0x50> <== NOT EXECUTED
2588: e3e00000 mvn r0, #0
}
258c: e28dd048 add sp, sp, #72 ; 0x48 2590: e8bd8070 pop {r4, r5, r6, pc}
00002e68 <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')) {
2e68: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 2e6c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) {
2e70: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 2e74: e1a04001 mov r4, r1 <== NOT EXECUTED 2e78: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) {
2e7c: 0a000015 beq 2ed8 <echo+0x70> <== NOT EXECUTED 2e80: e59f305c ldr r3, [pc, #92] ; 2ee4 <echo+0x7c> <== NOT EXECUTED 2e84: e5933000 ldr r3, [r3] <== NOT EXECUTED 2e88: e0833000 add r3, r3, r0 <== NOT EXECUTED 2e8c: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 2e90: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2e94: 13a03001 movne r3, #1 <== NOT EXECUTED 2e98: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 2e9c: 0a00000d beq 2ed8 <echo+0x70> <== NOT EXECUTED 2ea0: e350000a cmp r0, #10 <== NOT EXECUTED 2ea4: 0a00000b beq 2ed8 <echo+0x70> <== NOT EXECUTED
char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40;
2ea8: 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] = '^';
2eac: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
2eb0: e1a0000d mov r0, sp <== NOT EXECUTED 2eb4: e3a01002 mov r1, #2 <== NOT EXECUTED 2eb8: 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;
2ebc: 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] = '^';
2ec0: e5cdc000 strb ip, [sp] <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty);
2ec4: ebffff4d bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
tty->column += 2;
2ec8: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2ecc: e2833002 add r3, r3, #2 <== NOT EXECUTED 2ed0: 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')) {
2ed4: ea000001 b 2ee0 <echo+0x78> <== NOT EXECUTED
echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty);
2ed8: e1a01004 mov r1, r4 <== NOT EXECUTED 2edc: ebffff8b bl 2d10 <oproc> <== NOT EXECUTED
} }
2ee0: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED
000020dc <endgrent>: group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL)
20dc: e59f300c ldr r3, [pc, #12] ; 20f0 <endgrent+0x14> <== NOT EXECUTED 20e0: e5930000 ldr r0, [r3] <== NOT EXECUTED 20e4: e3500000 cmp r0, #0 <== NOT EXECUTED 20e8: 012fff1e bxeq lr <== NOT EXECUTED
fclose(group_fp);
20ec: ea003362 b ee7c <fclose> <== NOT EXECUTED
000020f4 <endpwent>: passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL)
20f4: e59f300c ldr r3, [pc, #12] ; 2108 <endpwent+0x14> <== NOT EXECUTED 20f8: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 20fc: e3500000 cmp r0, #0 <== NOT EXECUTED 2100: 012fff1e bxeq lr <== NOT EXECUTED
fclose(passwd_fp);
2104: ea00335c b ee7c <fclose> <== NOT EXECUTED
00002ee8 <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)
2ee8: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 2eec: 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) {
2ef0: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 2ef4: e1a04000 mov r4, r0 <== NOT EXECUTED 2ef8: e1a07001 mov r7, r1 <== NOT EXECUTED
if (tty->ccount == 0)
2efc: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
return; if (lineFlag) {
2f00: e3510000 cmp r1, #0 <== NOT EXECUTED 2f04: 0a000062 beq 3094 <erase+0x1ac> <== NOT EXECUTED
if (!(tty->termios.c_lflag & ECHO)) {
2f08: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 2f0c: e2132008 ands r2, r3, #8 <== NOT EXECUTED
tty->ccount = 0;
2f10: 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)) {
2f14: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) {
2f18: e2133010 ands r3, r3, #16 <== NOT EXECUTED 2f1c: 1a00005c bne 3094 <erase+0x1ac> <== NOT EXECUTED
tty->ccount = 0;
2f20: e5803020 str r3, [r0, #32] <== NOT EXECUTED
echo (tty->termios.c_cc[VKILL], tty);
2f24: e1a01004 mov r1, r4 <== NOT EXECUTED 2f28: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 2f2c: ebffffcd bl 2e68 <echo> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK)
2f30: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2f34: e3130020 tst r3, #32 <== NOT EXECUTED
echo ('\n', tty);
2f38: 11a01004 movne r1, r4 <== NOT EXECUTED 2f3c: 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)
2f40: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2f44: ea00000c b 2f7c <erase+0x94> <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
2f48: e2411001 sub r1, r1, #1 <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2f4c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
2f50: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2f54: e594201c ldr r2, [r4, #28] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2f58: e3130008 tst r3, #8 <== NOT EXECUTED
echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount];
2f5c: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO) {
2f60: 0a000048 beq 3088 <erase+0x1a0> <== NOT EXECUTED
if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) {
2f64: e3570000 cmp r7, #0 <== NOT EXECUTED 2f68: 1a000005 bne 2f84 <erase+0x9c> <== NOT EXECUTED 2f6c: e3130010 tst r3, #16 <== NOT EXECUTED 2f70: 1a000003 bne 2f84 <erase+0x9c> <== NOT EXECUTED
echo (tty->termios.c_cc[VERASE], tty);
2f74: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2f78: e1a01004 mov r1, r4 <== NOT EXECUTED
} } if (!lineFlag) break; } }
2f7c: 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);
2f80: eaffffb8 b 2e68 <echo> <== NOT EXECUTED
} else if (c == '\t') {
2f84: e3550009 cmp r5, #9 <== NOT EXECUTED 2f88: 1a000020 bne 3010 <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)
2f8c: 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;
2f90: 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)) {
2f94: e596c000 ldr ip, [r6] <== NOT EXECUTED 2f98: e3a02000 mov r2, #0 <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
2f9c: ea00000d b 2fd8 <erase+0xf0> <== NOT EXECUTED
c = tty->cbuf[i++];
2fa0: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 2fa4: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED
if (c == '\t') {
2fa8: e3500009 cmp r0, #9 <== NOT EXECUTED
col = (col | 7) + 1; } else if (iscntrl (c)) {
2fac: 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;
2fb0: 03855007 orreq r5, r5, #7 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') {
2fb4: 0a000005 beq 2fd0 <erase+0xe8> <== NOT EXECUTED
col = (col | 7) + 1; } else if (iscntrl (c)) {
2fb8: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 2fbc: e3100020 tst r0, #32 <== NOT EXECUTED 2fc0: 0a000002 beq 2fd0 <erase+0xe8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOCTL)
2fc4: e3530000 cmp r3, #0 <== NOT EXECUTED
col += 2;
2fc8: 12855002 addne r5, r5, #2 <== NOT EXECUTED 2fcc: ea000000 b 2fd4 <erase+0xec> <== NOT EXECUTED
} else { col++;
2fd0: e2855001 add r5, r5, #1 <== NOT EXECUTED
/* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++];
2fd4: e2822001 add r2, r2, #1 <== NOT EXECUTED
int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) {
2fd8: e1520001 cmp r2, r1 <== NOT EXECUTED 2fdc: 1affffef bne 2fa0 <erase+0xb8> <== NOT EXECUTED 2fe0: ea000006 b 3000 <erase+0x118> <== NOT EXECUTED
/* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty);
2fe4: e59f00bc ldr r0, [pc, #188] ; 30a8 <erase+0x1c0> <== NOT EXECUTED 2fe8: e3a01001 mov r1, #1 <== NOT EXECUTED 2fec: e1a02004 mov r2, r4 <== NOT EXECUTED 2ff0: ebffff02 bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
tty->column--;
2ff4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2ff8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2ffc: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} /* * Back up over the tab */ while (tty->column > col) {
3000: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3004: e1530005 cmp r3, r5 <== NOT EXECUTED 3008: cafffff5 bgt 2fe4 <erase+0xfc> <== NOT EXECUTED 300c: ea00001d b 3088 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) {
3010: e5962000 ldr r2, [r6] <== NOT EXECUTED 3014: e2855001 add r5, r5, #1 <== NOT EXECUTED 3018: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 301c: e3120020 tst r2, #32 <== NOT EXECUTED 3020: 0a000009 beq 304c <erase+0x164> <== NOT EXECUTED 3024: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3028: 0a000007 beq 304c <erase+0x164> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
302c: e59f0078 ldr r0, [pc, #120] ; 30ac <erase+0x1c4> <== NOT EXECUTED 3030: e3a01003 mov r1, #3 <== NOT EXECUTED 3034: e1a02004 mov r2, r4 <== NOT EXECUTED 3038: ebfffef0 bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
303c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3040: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3044: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3048: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) {
304c: e5963000 ldr r3, [r6] <== NOT EXECUTED 3050: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 3054: e3130020 tst r3, #32 <== NOT EXECUTED 3058: 0a000002 beq 3068 <erase+0x180> <== NOT EXECUTED 305c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3060: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3064: 0a000007 beq 3088 <erase+0x1a0> <== NOT EXECUTED
rtems_termios_puts ("\b \b", 3, tty);
3068: e59f003c ldr r0, [pc, #60] ; 30ac <erase+0x1c4> <== NOT EXECUTED 306c: e3a01003 mov r1, #3 <== NOT EXECUTED 3070: e1a02004 mov r2, r4 <== NOT EXECUTED 3074: ebfffee1 bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
if (tty->column)
3078: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 307c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
3080: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3084: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED
} } } if (!lineFlag)
3088: e3570000 cmp r7, #0 <== NOT EXECUTED 308c: 1a000001 bne 3098 <erase+0x1b0> <== NOT EXECUTED 3090: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3094: e59f6014 ldr r6, [pc, #20] ; 30b0 <erase+0x1c8> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) {
3098: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 309c: e3510000 cmp r1, #0 <== NOT EXECUTED 30a0: 1affffa8 bne 2f48 <erase+0x60> <== NOT EXECUTED 30a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000027bc <fcntl>: int fcntl( int fd, int cmd, ... ) {
27bc: e92d000e push {r1, r2, r3} 27c0: e92d40f1 push {r0, r4, r5, r6, r7, lr}
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
27c4: e59f31a4 ldr r3, [pc, #420] ; 2970 <fcntl+0x1b4> 27c8: e5933000 ldr r3, [r3]
... ) { int ret; va_list ap; va_start( ap, cmd );
27cc: e28d201c add r2, sp, #28
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd );
27d0: e1500003 cmp r0, r3
... ) { int ret; va_list ap; va_start( ap, cmd );
27d4: e58d2000 str r2, [sp]
int fcntl( int fd, int cmd, ... ) {
27d8: e59d7018 ldr r7, [sp, #24]
int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 27dc: 2a000005 bcs 27f8 <fcntl+0x3c> iop = rtems_libio_iop( fd );
27e0: e59f118c ldr r1, [pc, #396] ; 2974 <fcntl+0x1b8> 27e4: e591c000 ldr ip, [r1] 27e8: e08c4300 add r4, ip, r0, lsl #6
rtems_libio_check_is_open(iop);
27ec: e5940014 ldr r0, [r4, #20] 27f0: e3100c01 tst r0, #256 ; 0x100
27f4: 1a000002 bne 2804 <fcntl+0x48>
27f8: eb0032ec bl f3b0 <__errno> <== NOT EXECUTED 27fc: e3a03009 mov r3, #9 <== NOT EXECUTED 2800: ea000045 b 291c <fcntl+0x160> <== NOT EXECUTED
/* * This switch should contain all the cases from POSIX. */ switch ( cmd ) {
2804: e3570009 cmp r7, #9 2808: 979ff107 ldrls pc, [pc, r7, lsl #2] 280c: ea000040 b 2914 <fcntl+0x158>
2810: 00002838 .word 0x00002838 <== NOT EXECUTED 2814: 000028a4 .word 0x000028a4 <== NOT EXECUTED 2818: 000028b0 .word 0x000028b0 <== NOT EXECUTED 281c: 000028d0 .word 0x000028d0 <== NOT EXECUTED 2820: 000028dc .word 0x000028dc <== NOT EXECUTED 2824: 00002908 .word 0x00002908 <== NOT EXECUTED 2828: 00002908 .word 0x00002908 <== NOT EXECUTED 282c: 00002908 .word 0x00002908 <== NOT EXECUTED 2830: 00002908 .word 0x00002908 <== NOT EXECUTED 2834: 00002908 .word 0x00002908 <== NOT EXECUTED
case F_DUPFD: /* dup */ fd2 = va_arg( ap, int );
2838: e5922000 ldr r2, [r2]
if ( fd2 )
283c: e3520000 cmp r2, #0
2840: 0a000003 beq 2854 <fcntl+0x98> diop = rtems_libio_iop( fd2 );
2844: e1520003 cmp r2, r3 <== NOT EXECUTED 2848: 23a0c000 movcs ip, #0 <== NOT EXECUTED 284c: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 2850: ea000002 b 2860 <fcntl+0xa4> <== NOT EXECUTED
else { /* allocate a file control block */ diop = rtems_libio_allocate();
2854: eb0001dc bl 2fcc <rtems_libio_allocate>
if ( diop == 0 ) {
2858: e250c000 subs ip, r0, #0
285c: 0a00003e beq 295c <fcntl+0x1a0> } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
2860: e2846018 add r6, r4, #24 2864: e8b6000f ldm r6!, {r0, r1, r2, r3} 2868: e28c5018 add r5, ip, #24 286c: e8a5000f stmia r5!, {r0, r1, r2, r3}
ret = (int) (diop - rtems_libio_iops);
2870: e59f30fc ldr r3, [pc, #252] ; 2974 <fcntl+0x1b8> 2874: e5933000 ldr r3, [r3]
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
2878: e5966000 ldr r6, [r6]
ret = -1; break; } } diop->handlers = iop->handlers;
287c: e594003c ldr r0, [r4, #60] ; 0x3c
diop->file_info = iop->file_info;
2880: e5941038 ldr r1, [r4, #56] ; 0x38
diop->flags = iop->flags;
2884: e5942014 ldr r2, [r4, #20]
diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops);
2888: e063300c rsb r3, r3, ip
} diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo;
288c: e5856000 str r6, [r5]
ret = -1; break; } } diop->handlers = iop->handlers;
2890: e58c003c str r0, [ip, #60] ; 0x3c
diop->file_info = iop->file_info;
2894: e58c1038 str r1, [ip, #56] ; 0x38
diop->flags = iop->flags;
2898: e58c2014 str r2, [ip, #20]
diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops);
289c: e1a05343 asr r5, r3, #6 28a0: ea00001f b 2924 <fcntl+0x168>
break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0);
28a4: e1a055a0 lsr r5, r0, #11 28a8: e2055001 and r5, r5, #1 28ac: ea00001e b 292c <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 ) )
28b0: e5925000 ldr r5, [r2] 28b4: e3550000 cmp r5, #0
iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC;
28b8: 13800b02 orrne r0, r0, #2048 ; 0x800
else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
28bc: 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;
28c0: 15840014 strne r0, [r4, #20]
else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC;
28c4: 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 ) ) 28c8: 0a000017 beq 292c <fcntl+0x170>
28cc: ea00000b b 2900 <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 );
28d0: eb000154 bl 2e28 <rtems_libio_to_fcntl_flags> 28d4: e1a05000 mov r5, r0 28d8: ea000011 b 2924 <fcntl+0x168>
break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) );
28dc: e5920000 ldr r0, [r2] 28e0: eb0001e6 bl 3080 <rtems_libio_fcntl_flags>
/* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask);
28e4: e5943014 ldr r3, [r4, #20] 28e8: e59f2088 ldr r2, [pc, #136] ; 2978 <fcntl+0x1bc> 28ec: e3c33c02 bic r3, r3, #512 ; 0x200 28f0: e0002002 and r2, r0, r2 28f4: e3c33001 bic r3, r3, #1 28f8: e1823003 orr r3, r2, r3 28fc: e5843014 str r3, [r4, #20] 2900: e3a05000 mov r5, #0 2904: ea000008 b 292c <fcntl+0x170>
errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP;
2908: eb0032a8 bl f3b0 <__errno> 290c: e3a03086 mov r3, #134 ; 0x86 2910: ea000001 b 291c <fcntl+0x160>
ret = -1; break; default: errno = EINVAL;
2914: eb0032a5 bl f3b0 <__errno> 2918: e3a03016 mov r3, #22 291c: e5803000 str r3, [r0] 2920: ea00000d b 295c <fcntl+0x1a0>
/* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) {
2924: e3550000 cmp r5, #0
2928: ba00000c blt 2960 <fcntl+0x1a4> if (iop->handlers->fcntl_h) {
292c: e594303c ldr r3, [r4, #60] ; 0x3c 2930: e5933030 ldr r3, [r3, #48] ; 0x30 2934: e3530000 cmp r3, #0
2938: 0a000008 beq 2960 <fcntl+0x1a4> int err = (*iop->handlers->fcntl_h)( cmd, iop );
293c: e1a01004 mov r1, r4 2940: e1a00007 mov r0, r7 2944: e1a0e00f mov lr, pc 2948: e12fff13 bx r3
if (err) {
294c: e2504000 subs r4, r0, #0
2950: 0a000002 beq 2960 <fcntl+0x1a4> errno = err;
2954: eb003295 bl f3b0 <__errno> <== NOT EXECUTED 2958: e5804000 str r4, [r0] <== NOT EXECUTED
295c: e3e05000 mvn r5, #0
va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; }
2960: e1a00005 mov r0, r5 2964: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 2968: e28dd00c add sp, sp, #12 296c: e12fff1e bx lr
0000b228 <fifo_open>: ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
b228: e59f3368 ldr r3, [pc, #872] ; b598 <fifo_open+0x370>
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
b22c: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr} b230: e1a08001 mov r8, r1
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
b234: e3a01000 mov r1, #0
*/ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) {
b238: e1a07000 mov r7, r0
) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore,
b23c: e1a02001 mov r2, r1 b240: e5930000 ldr r0, [r3] b244: ebffe607 bl 4a68 <rtems_semaphore_obtain> b248: e250a000 subs sl, r0, #0 b24c: 13e06003 mvnne r6, #3
b250: 1a0000ce bne b590 <fifo_open+0x368> RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep;
b254: e5974000 ldr r4, [r7] <== NOT EXECUTED
if (pipe == NULL) {
b258: e3540000 cmp r4, #0 <== NOT EXECUTED b25c: 1a00004f bne b3a0 <fifo_open+0x178> <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
b260: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED b264: ebffda69 bl 1c10 <malloc> <== NOT EXECUTED
if (pipe == NULL)
b268: e3500000 cmp r0, #0 <== NOT EXECUTED
{ static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t));
b26c: e1a05000 mov r5, r0 <== NOT EXECUTED b270: e1a04000 mov r4, r0 <== NOT EXECUTED
if (pipe == NULL)
b274: 03e0600b mvneq r6, #11 <== NOT EXECUTED b278: 0a000056 beq b3d8 <fifo_open+0x1b0> <== NOT EXECUTED
return err; memset(pipe, 0, sizeof(pipe_control_t));
b27c: e1a0100a mov r1, sl <== NOT EXECUTED b280: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED b284: eb000900 bl d68c <memset> <== NOT EXECUTED
pipe->Size = PIPE_BUF;
b288: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
b28c: e1a00003 mov r0, r3 <== NOT EXECUTED
pipe = malloc(sizeof(pipe_control_t)); if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF;
b290: e5853004 str r3, [r5, #4] <== NOT EXECUTED
pipe->Buffer = malloc(pipe->Size);
b294: ebffda5d bl 1c10 <malloc> <== NOT EXECUTED
if (! pipe->Buffer)
b298: 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);
b29c: e5850000 str r0, [r5] <== NOT EXECUTED
if (! pipe->Buffer)
b2a0: 03e0600b mvneq r6, #11 <== NOT EXECUTED b2a4: 0a00003a beq b394 <fifo_open+0x16c> <== NOT EXECUTED
goto err_buf; err = -EINTR; if (rtems_barrier_create(
b2a8: e59f62ec ldr r6, [pc, #748] ; b59c <fifo_open+0x374> <== NOT EXECUTED b2ac: e59f02ec ldr r0, [pc, #748] ; b5a0 <fifo_open+0x378> <== NOT EXECUTED b2b0: e5d63000 ldrb r3, [r6] <== NOT EXECUTED b2b4: e1a0100a mov r1, sl <== NOT EXECUTED b2b8: e1830000 orr r0, r3, r0 <== NOT EXECUTED b2bc: e1a0200a mov r2, sl <== NOT EXECUTED b2c0: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED b2c4: eb00025c bl bc3c <rtems_barrier_create> <== NOT EXECUTED b2c8: e2501000 subs r1, r0, #0 <== NOT EXECUTED b2cc: 1a00002d bne b388 <fifo_open+0x160> <== 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(
b2d0: e5d63000 ldrb r3, [r6] <== NOT EXECUTED b2d4: e59f02c8 ldr r0, [pc, #712] ; b5a4 <fifo_open+0x37c> <== NOT EXECUTED b2d8: e1a02001 mov r2, r1 <== NOT EXECUTED b2dc: e1830000 orr r0, r3, r0 <== NOT EXECUTED b2e0: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED b2e4: eb000254 bl bc3c <rtems_barrier_create> <== NOT EXECUTED b2e8: e2503000 subs r3, r0, #0 <== NOT EXECUTED b2ec: 1a000023 bne b380 <fifo_open+0x158> <== 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(
b2f0: e5d62000 ldrb r2, [r6] <== NOT EXECUTED b2f4: e59f02ac ldr r0, [pc, #684] ; b5a8 <fifo_open+0x380> <== NOT EXECUTED b2f8: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED b2fc: e1820000 orr r0, r2, r0 <== NOT EXECUTED b300: e3a01001 mov r1, #1 <== NOT EXECUTED b304: e3a02010 mov r2, #16 <== NOT EXECUTED b308: e58dc000 str ip, [sp] <== NOT EXECUTED b30c: ebffe543 bl 4820 <rtems_semaphore_create> <== NOT EXECUTED b310: e3500000 cmp r0, #0 <== NOT EXECUTED b314: 1a000017 bne b378 <fifo_open+0x150> <== NOT EXECUTED
RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *)
b318: e28d5004 add r5, sp, #4 <== NOT EXECUTED b31c: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED b320: e1a02005 mov r2, r5 <== NOT EXECUTED b324: e59f0280 ldr r0, [pc, #640] ; b5ac <fifo_open+0x384> <== NOT EXECUTED b328: ebffeb60 bl 60b0 <_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
b32c: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED b330: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED b334: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
b338: ebffed9a bl 69a8 <_Thread_Enable_dispatch> <== NOT EXECUTED b33c: e1a02005 mov r2, r5 <== NOT EXECUTED b340: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED b344: e59f0260 ldr r0, [pc, #608] ; b5ac <fifo_open+0x384> <== NOT EXECUTED b348: ebffeb58 bl 60b0 <_Objects_Get> <== NOT EXECUTED
_Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state
b34c: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED b350: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED b354: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED
|= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch();
b358: ebffed92 bl 69a8 <_Thread_Enable_dispatch> <== NOT EXECUTED
#ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z')
b35c: e5d63000 ldrb r3, [r6] <== NOT EXECUTED b360: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED b364: e2833001 add r3, r3, #1 <== NOT EXECUTED b368: e5c63000 strb r3, [r6] <== NOT EXECUTED
c = 'a';
b36c: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED b370: 05c63000 strbeq r3, [r6] <== NOT EXECUTED b374: ea000009 b b3a0 <fifo_open+0x178> <== NOT EXECUTED
return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier);
b378: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED b37c: eb00025c bl bcf4 <rtems_barrier_delete> <== NOT EXECUTED
err_wbar: rtems_barrier_delete(pipe->readBarrier);
b380: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED b384: eb00025a bl bcf4 <rtems_barrier_delete> <== NOT EXECUTED
err_rbar: free(pipe->Buffer);
b388: e5950000 ldr r0, [r5] <== NOT EXECUTED b38c: ebffd96d bl 1948 <free> <== NOT EXECUTED b390: e3e06003 mvn r6, #3 <== NOT EXECUTED
err_buf: free(pipe);
b394: e1a00005 mov r0, r5 <== NOT EXECUTED b398: ebffd96a bl 1948 <free> <== NOT EXECUTED b39c: ea00000d b b3d8 <fifo_open+0x1b0> <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
b3a0: e3a01000 mov r1, #0 <== NOT EXECUTED b3a4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b3a8: e1a02001 mov r2, r1 <== NOT EXECUTED b3ac: ebffe5ad bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
b3b0: e5973000 ldr r3, [r7] <== NOT EXECUTED
err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe))
b3b4: e3500000 cmp r0, #0 <== NOT EXECUTED b3b8: 01a06000 moveq r6, r0 <== NOT EXECUTED b3bc: 13e06003 mvnne r6, #3 <== NOT EXECUTED
err = -EINTR; if (*pipep == NULL) {
b3c0: e3530000 cmp r3, #0 <== NOT EXECUTED b3c4: 1a000003 bne b3d8 <fifo_open+0x1b0> <== NOT EXECUTED
if (err)
b3c8: e3560000 cmp r6, #0 <== NOT EXECUTED
pipe_free(pipe); else *pipep = pipe;
b3cc: 05874000 streq r4, [r7] <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe);
b3d0: 11a00004 movne r0, r4 <== NOT EXECUTED b3d4: 1bffff47 blne b0f8 <pipe_free> <== NOT EXECUTED
else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore);
b3d8: e59f31b8 ldr r3, [pc, #440] ; b598 <fifo_open+0x370> <== NOT EXECUTED b3dc: e5930000 ldr r0, [r3] <== NOT EXECUTED b3e0: ebffe5e6 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err)
b3e4: e3560000 cmp r6, #0 <== NOT EXECUTED b3e8: 1a000068 bne b590 <fifo_open+0x368> <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) {
b3ec: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED b3f0: e2023006 and r3, r2, #6 <== NOT EXECUTED b3f4: e3530004 cmp r3, #4 <== NOT EXECUTED
int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep;
b3f8: e5974000 ldr r4, [r7] <== NOT EXECUTED
switch (LIBIO_ACCMODE(iop)) {
b3fc: 0a000024 beq b494 <fifo_open+0x26c> <== NOT EXECUTED b400: e3530006 cmp r3, #6 <== NOT EXECUTED b404: 0a000046 beq b524 <fifo_open+0x2fc> <== NOT EXECUTED b408: e3530002 cmp r3, #2 <== NOT EXECUTED b40c: 1a000058 bne b574 <fifo_open+0x34c> <== NOT EXECUTED
case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
b410: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
b414: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
b418: e3530000 cmp r3, #0 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
b41c: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
b420: e2833001 add r3, r3, #1 <== NOT EXECUTED
return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++;
b424: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
b428: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
b42c: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED b430: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b434: 0b000246 bleq bd54 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Writers == 0) {
b438: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED b43c: e3530000 cmp r3, #0 <== NOT EXECUTED b440: 1a00004b bne b574 <fifo_open+0x34c> <== NOT EXECUTED
/* Not an error */ if (LIBIO_NODELAY(iop))
b444: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED b448: e3130001 tst r3, #1 <== NOT EXECUTED b44c: 1a000048 bne b574 <fifo_open+0x34c> <== NOT EXECUTED
break; prevCounter = pipe->writerCounter;
b450: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED
err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe);
b454: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b458: ebffe5c8 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
b45c: e3a01000 mov r1, #0 <== NOT EXECUTED b460: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED b464: eb000250 bl bdac <rtems_barrier_wait> <== NOT EXECUTED b468: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
b46c: 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))
b470: 1a000042 bne b580 <fifo_open+0x358> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
b474: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b478: ebffe57a bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED b47c: e3500000 cmp r0, #0 <== NOT EXECUTED b480: 1a00003e bne b580 <fifo_open+0x358> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->writerCounter);
b484: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED b488: e1550003 cmp r5, r3 <== NOT EXECUTED b48c: 0afffff0 beq b454 <fifo_open+0x22c> <== NOT EXECUTED b490: ea000037 b b574 <fifo_open+0x34c> <== NOT EXECUTED
} break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) {
b494: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b498: e3530000 cmp r3, #0 <== NOT EXECUTED b49c: 1a000002 bne b4ac <fifo_open+0x284> <== NOT EXECUTED b4a0: e3120001 tst r2, #1 <== NOT EXECUTED b4a4: 13e06005 mvnne r6, #5 <== NOT EXECUTED b4a8: 1a000035 bne b584 <fifo_open+0x35c> <== NOT EXECUTED
err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0)
b4ac: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
b4b0: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
b4b4: e3530000 cmp r3, #0 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
b4b8: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
b4bc: e2833001 add r3, r3, #1 <== NOT EXECUTED
if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++;
b4c0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
b4c4: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
b4c8: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b4cc: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b4d0: 0b00021f bleq bd54 <rtems_barrier_release> <== NOT EXECUTED
if (pipe->Readers == 0) {
b4d4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b4d8: e3530000 cmp r3, #0 <== NOT EXECUTED b4dc: 1a000024 bne b574 <fifo_open+0x34c> <== NOT EXECUTED
prevCounter = pipe->readerCounter;
b4e0: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED
err = -EINTR; do { PIPE_UNLOCK(pipe);
b4e4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b4e8: ebffe5a4 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
b4ec: e3a01000 mov r1, #0 <== NOT EXECUTED b4f0: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b4f4: eb00022c bl bdac <rtems_barrier_wait> <== NOT EXECUTED b4f8: e2501000 subs r1, r0, #0 <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
b4fc: e1a02001 mov r2, r1 <== NOT EXECUTED
if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe))
b500: 1a00001e bne b580 <fifo_open+0x358> <== NOT EXECUTED
goto out_error; if (! PIPE_LOCK(pipe))
b504: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b508: ebffe556 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED b50c: e3500000 cmp r0, #0 <== NOT EXECUTED b510: 1a00001a bne b580 <fifo_open+0x358> <== NOT EXECUTED
goto out_error; } while (prevCounter == pipe->readerCounter);
b514: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED b518: e1550003 cmp r5, r3 <== NOT EXECUTED b51c: 0afffff0 beq b4e4 <fifo_open+0x2bc> <== NOT EXECUTED b520: ea000013 b b574 <fifo_open+0x34c> <== NOT EXECUTED
} break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0)
b524: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
b528: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
b52c: e3530000 cmp r3, #0 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
b530: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Readers ++ == 0)
b534: e2833001 add r3, r3, #1 <== NOT EXECUTED
} while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++;
b538: e5842020 str r2, [r4, #32] <== NOT EXECUTED
if (pipe->Readers ++ == 0)
b53c: e5843010 str r3, [r4, #16] <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
b540: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED b544: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b548: 0b000201 bleq bd54 <rtems_barrier_release> <== NOT EXECUTED
pipe->writerCounter ++; if (pipe->Writers ++ == 0)
b54c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
b550: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
b554: e3530000 cmp r3, #0 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
b558: e2822001 add r2, r2, #1 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
b55c: e2833001 add r3, r3, #1 <== NOT EXECUTED
case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++;
b560: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
if (pipe->Writers ++ == 0)
b564: e5843014 str r3, [r4, #20] <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
b568: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b56c: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b570: 0b0001f7 bleq bd54 <rtems_barrier_release> <== NOT EXECUTED
break; } PIPE_UNLOCK(pipe);
b574: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b578: ebffe580 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
return 0;
b57c: ea000003 b b590 <fifo_open+0x368> <== NOT EXECUTED b580: e3e06003 mvn r6, #3 <== NOT EXECUTED
out_error: pipe_release(pipep, iop);
b584: e1a00007 mov r0, r7 <== NOT EXECUTED b588: e1a01008 mov r1, r8 <== NOT EXECUTED b58c: ebfffee6 bl b12c <pipe_release> <== NOT EXECUTED
return err; }
b590: e1a00006 mov r0, r6 b594: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc}
00008364 <file_systems_below_this_mountpoint>: /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
8364: e59f3030 ldr r3, [pc, #48] ; 839c <file_systems_below_this_mountpoint+0x38><== NOT EXECUTED 8368: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 836c: ea000006 b 838c <file_systems_below_this_mountpoint+0x28> <== NOT EXECUTED
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = ( rtems_filesystem_mount_table_entry_t * )the_node; if (the_mount_entry->mt_point_node.mt_entry == fs_root_loc->mt_entry ) {
8370: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 8374: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 8378: e15c0000 cmp ip, r0 <== NOT EXECUTED 837c: 1a000001 bne 8388 <file_systems_below_this_mountpoint+0x24><== NOT EXECUTED 8380: e3a00001 mov r0, #1 <== NOT EXECUTED 8384: e12fff1e bx lr <== NOT EXECUTED
* mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) {
8388: e5922000 ldr r2, [r2] <== NOT EXECUTED 838c: e1520003 cmp r2, r3 <== NOT EXECUTED 8390: 1afffff6 bne 8370 <file_systems_below_this_mountpoint+0xc> <== NOT EXECUTED 8394: e3a00000 mov r0, #0 <== NOT EXECUTED
return true; } } return false; }
8398: e12fff1e bx lr <== NOT EXECUTED
00002a10 <fpathconf>: { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd);
2a10: e59f3100 ldr r3, [pc, #256] ; 2b18 <fpathconf+0x108> 2a14: e5933000 ldr r3, [r3] 2a18: e1500003 cmp r0, r3
long fpathconf( int fd, int name ) {
2a1c: 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); 2a20: 2a000005 bcs 2a3c <fpathconf+0x2c> iop = rtems_libio_iop(fd);
2a24: e59f30f0 ldr r3, [pc, #240] ; 2b1c <fpathconf+0x10c> 2a28: e5933000 ldr r3, [r3] 2a2c: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2a30: e5903014 ldr r3, [r0, #20] 2a34: e3130c01 tst r3, #256 ; 0x100
2a38: 1a000002 bne 2a48 <fpathconf+0x38>
2a3c: eb00325b bl f3b0 <__errno> 2a40: e3a03009 mov r3, #9 2a44: ea000003 b 2a58 <fpathconf+0x48>
rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ);
2a48: e3130002 tst r3, #2
2a4c: 1a000004 bne 2a64 <fpathconf+0x54>
2a50: eb003256 bl f3b0 <__errno> <== NOT EXECUTED 2a54: e3a03016 mov r3, #22 <== NOT EXECUTED
2a58: e5803000 str r3, [r0] 2a5c: e3e00000 mvn r0, #0 2a60: e49df004 pop {pc} ; (ldr pc, [sp], #4)
/* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options;
2a64: e5903028 ldr r3, [r0, #40] ; 0x28
switch ( name ) {
2a68: e351000b cmp r1, #11 2a6c: 979ff101 ldrls pc, [pc, r1, lsl #2] 2a70: ea000023 b 2b04 <fpathconf+0xf4>
2a74: 00002aa4 .word 0x00002aa4 <== NOT EXECUTED 2a78: 00002aac .word 0x00002aac <== NOT EXECUTED 2a7c: 00002ab4 .word 0x00002ab4 <== NOT EXECUTED 2a80: 00002abc .word 0x00002abc <== NOT EXECUTED 2a84: 00002ac4 .word 0x00002ac4 <== NOT EXECUTED 2a88: 00002acc .word 0x00002acc <== NOT EXECUTED 2a8c: 00002ad4 .word 0x00002ad4 <== NOT EXECUTED 2a90: 00002adc .word 0x00002adc <== NOT EXECUTED 2a94: 00002ae4 .word 0x00002ae4 <== NOT EXECUTED 2a98: 00002aec .word 0x00002aec <== NOT EXECUTED 2a9c: 00002af4 .word 0x00002af4 <== NOT EXECUTED 2aa0: 00002afc .word 0x00002afc <== NOT EXECUTED
case _PC_LINK_MAX: return_value = the_limits->link_max;
2aa4: e5930038 ldr r0, [r3, #56] ; 0x38
break;
2aa8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_CANON: return_value = the_limits->max_canon;
2aac: e593003c ldr r0, [r3, #60] ; 0x3c
break;
2ab0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_MAX_INPUT: return_value = the_limits->max_input;
2ab4: e5930040 ldr r0, [r3, #64] ; 0x40
break;
2ab8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NAME_MAX: return_value = the_limits->name_max;
2abc: e5930044 ldr r0, [r3, #68] ; 0x44
break;
2ac0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PATH_MAX: return_value = the_limits->path_max;
2ac4: e5930048 ldr r0, [r3, #72] ; 0x48
break;
2ac8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PIPE_BUF: return_value = the_limits->pipe_buf;
2acc: e593004c ldr r0, [r3, #76] ; 0x4c
break;
2ad0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions;
2ad4: e5930054 ldr r0, [r3, #84] ; 0x54
break;
2ad8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc;
2adc: e5930058 ldr r0, [r3, #88] ; 0x58
break;
2ae0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_VDISABLE: return_value = the_limits->posix_vdisable;
2ae4: e5930064 ldr r0, [r3, #100] ; 0x64
break;
2ae8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_ASYNC_IO: return_value = the_limits->posix_async_io;
2aec: e5930050 ldr r0, [r3, #80] ; 0x50
break;
2af0: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_PRIO_IO: return_value = the_limits->posix_prio_io;
2af4: e593005c ldr r0, [r3, #92] ; 0x5c
break;
2af8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
case _PC_SYNC_IO: return_value = the_limits->posix_sync_io;
2afc: e5930060 ldr r0, [r3, #96] ; 0x60
break;
2b00: e49df004 pop {pc} ; (ldr pc, [sp], #4)
default: rtems_set_errno_and_return_minus_one( EINVAL );
2b04: eb003229 bl f3b0 <__errno> 2b08: e3a03016 mov r3, #22 2b0c: e5803000 str r3, [r0] 2b10: e3e00000 mvn r0, #0
break; } return return_value; }
2b14: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00001948 <free>: void free( void *ptr ) { MSBUMP(free_calls, 1);
1948: e59f3088 ldr r3, [pc, #136] ; 19d8 <free+0x90> 194c: e593200c ldr r2, [r3, #12] 1950: e92d4030 push {r4, r5, lr} 1954: e2822001 add r2, r2, #1
if ( !ptr )
1958: e2504000 subs r4, r0, #0
void free( void *ptr ) { MSBUMP(free_calls, 1);
195c: e583200c str r2, [r3, #12]
if ( !ptr )
1960: 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()) &&
1964: e59f3070 ldr r3, [pc, #112] ; 19dc <free+0x94> 1968: e5933000 ldr r3, [r3] 196c: e3530003 cmp r3, #3
1970: 1a000005 bne 198c <free+0x44>
1974: eb00004b bl 1aa8 <malloc_is_system_state_OK> 1978: e3500000 cmp r0, #0
197c: 1a000002 bne 198c <free+0x44> !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr);
1980: e1a00004 mov r0, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
1984: 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);
1988: ea000059 b 1af4 <malloc_deferred_free> <== NOT EXECUTED
#endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
198c: e59f304c ldr r3, [pc, #76] ; 19e0 <free+0x98> 1990: e5933000 ldr r3, [r3] 1994: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_free)(ptr);
1998: 11a00004 movne r0, r4 199c: 11a0e00f movne lr, pc 19a0: 1593f008 ldrne pc, [r3, #8]
if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) {
19a4: e59f5038 ldr r5, [pc, #56] ; 19e4 <free+0x9c> 19a8: e1a01004 mov r1, r4 19ac: e5950000 ldr r0, [r5] 19b0: eb001277 bl 6394 <_Protected_heap_Free> 19b4: e3500000 cmp r0, #0 19b8: 18bd8030 popne {r4, r5, pc}
printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin,
19bc: 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",
19c0: e59f0020 ldr r0, [pc, #32] ; 19e8 <free+0xa0> <== NOT EXECUTED 19c4: e2822018 add r2, r2, #24 <== NOT EXECUTED 19c8: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 19cc: e1a01004 mov r1, r4 <== NOT EXECUTED
RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } }
19d0: 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",
19d4: ea000320 b 265c <printk> <== NOT EXECUTED
00003100 <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
3100: e59f3058 ldr r3, [pc, #88] ; 3160 <free_user_env+0x60> <== NOT EXECUTED 3104: e1500003 cmp r0, r3 <== NOT EXECUTED
* NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) {
3108: e92d4010 push {r4, lr} <== NOT EXECUTED 310c: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env
3110: 08bd8010 popeq {r4, pc} <== NOT EXECUTED
#ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory);
3114: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 3118: e3530000 cmp r3, #0 <== NOT EXECUTED 311c: 0a000004 beq 3134 <free_user_env+0x34> <== NOT EXECUTED 3120: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3124: e3530000 cmp r3, #0 <== NOT EXECUTED 3128: 12800004 addne r0, r0, #4 <== NOT EXECUTED 312c: 11a0e00f movne lr, pc <== NOT EXECUTED 3130: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &env->root_directory);
3134: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 3138: e3530000 cmp r3, #0 <== NOT EXECUTED 313c: 0a000004 beq 3154 <free_user_env+0x54> <== NOT EXECUTED 3140: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3144: e3530000 cmp r3, #0 <== NOT EXECUTED 3148: 12840018 addne r0, r4, #24 <== NOT EXECUTED 314c: 11a0e00f movne lr, pc <== NOT EXECUTED 3150: 112fff13 bxne r3 <== NOT EXECUTED
free(env);
3154: e1a00004 mov r0, r4 <== NOT EXECUTED
} }
3158: e8bd4010 pop {r4, lr} <== NOT EXECUTED
&& --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env);
315c: eafffbdb b 20d0 <free> <== NOT EXECUTED
00017cb0 <fstat>: int fstat( int fd, struct stat *sbuf ) {
17cb0: e92d4030 push {r4, r5, lr}
/* * Check to see if we were passed a valid pointer. */ if ( !sbuf )
17cb4: e2515000 subs r5, r1, #0
17cb8: 1a000002 bne 17cc8 <fstat+0x18> rtems_set_errno_and_return_minus_one( EFAULT );
17cbc: ebffd428 bl cd64 <__errno> 17cc0: e3a0300e mov r3, #14 17cc4: ea000014 b 17d1c <fstat+0x6c>
/* * Now process the stat() request. */ iop = rtems_libio_iop( fd );
17cc8: e59f3080 ldr r3, [pc, #128] ; 17d50 <fstat+0xa0> 17ccc: e5933000 ldr r3, [r3] 17cd0: e1500003 cmp r0, r3
17cd4: 2a000008 bcs 17cfc <fstat+0x4c>
17cd8: e59f3074 ldr r3, [pc, #116] ; 17d54 <fstat+0xa4> 17cdc: e5934000 ldr r4, [r3] 17ce0: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop);
17ce4: e5943014 ldr r3, [r4, #20] 17ce8: e3130c01 tst r3, #256 ; 0x100
17cec: 0a000002 beq 17cfc <fstat+0x4c> if ( !iop->handlers )
17cf0: e594303c ldr r3, [r4, #60] ; 0x3c 17cf4: e3530000 cmp r3, #0
17cf8: 1a000002 bne 17d08 <fstat+0x58> rtems_set_errno_and_return_minus_one( EBADF );
17cfc: ebffd418 bl cd64 <__errno> 17d00: e3a03009 mov r3, #9 17d04: ea000004 b 17d1c <fstat+0x6c>
if ( !iop->handlers->fstat_h )
17d08: e5933018 ldr r3, [r3, #24] 17d0c: e3530000 cmp r3, #0
17d10: 1a000004 bne 17d28 <fstat+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
17d14: ebffd412 bl cd64 <__errno> <== NOT EXECUTED 17d18: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
17d1c: e5803000 str r3, [r0] 17d20: e3e00000 mvn r0, #0 17d24: 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) );
17d28: e3a01000 mov r1, #0 17d2c: e3a02048 mov r2, #72 ; 0x48 17d30: e1a00005 mov r0, r5 17d34: ebffd654 bl d68c <memset>
return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf );
17d38: e2840018 add r0, r4, #24 17d3c: e1a01005 mov r1, r5 17d40: e594303c ldr r3, [r4, #60] ; 0x3c 17d44: e1a0e00f mov lr, pc 17d48: e593f018 ldr pc, [r3, #24]
}
17d4c: e8bd8030 pop {r4, r5, pc}
00002c78 <fsync>: int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd );
2c78: e59f307c ldr r3, [pc, #124] ; 2cfc <fsync+0x84> 2c7c: e5933000 ldr r3, [r3] 2c80: e1500003 cmp r0, r3
#include <rtems/seterr.h> int fsync( int fd ) {
2c84: e52de004 push {lr} ; (str lr, [sp, #-4]!)
rtems_libio_t *iop; rtems_libio_check_fd( fd ); 2c88: 2a00000d bcs 2cc4 <fsync+0x4c> iop = rtems_libio_iop( fd );
2c8c: e59f306c ldr r3, [pc, #108] ; 2d00 <fsync+0x88> 2c90: e5933000 ldr r3, [r3] 2c94: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
2c98: e5903014 ldr r3, [r0, #20] 2c9c: e3130c01 tst r3, #256 ; 0x100
2ca0: 0a000007 beq 2cc4 <fsync+0x4c> rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
2ca4: e3130004 tst r3, #4
2ca8: 1a000002 bne 2cb8 <fsync+0x40>
2cac: eb0031bf bl f3b0 <__errno> 2cb0: e3a03016 mov r3, #22 2cb4: ea00000a b 2ce4 <fsync+0x6c>
/* * Now process the fsync(). */ if ( !iop->handlers )
2cb8: e590303c ldr r3, [r0, #60] ; 0x3c 2cbc: e3530000 cmp r3, #0
2cc0: 1a000002 bne 2cd0 <fsync+0x58> rtems_set_errno_and_return_minus_one( EBADF );
2cc4: eb0031b9 bl f3b0 <__errno> <== NOT EXECUTED 2cc8: e3a03009 mov r3, #9 <== NOT EXECUTED 2ccc: ea000004 b 2ce4 <fsync+0x6c> <== NOT EXECUTED
if ( !iop->handlers->fsync_h )
2cd0: e5933028 ldr r3, [r3, #40] ; 0x28 2cd4: e3530000 cmp r3, #0
2cd8: 1a000004 bne 2cf0 <fsync+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
2cdc: eb0031b3 bl f3b0 <__errno> 2ce0: e3a03086 mov r3, #134 ; 0x86 2ce4: e5803000 str r3, [r0] 2ce8: e3e00000 mvn r0, #0 2cec: e49df004 pop {pc} ; (ldr pc, [sp], #4)
return (*iop->handlers->fsync_h)( iop );
2cf0: e1a0e00f mov lr, pc 2cf4: e12fff13 bx r3
}
2cf8: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00009050 <ftruncate>: int ftruncate( int fd, off_t length ) {
9050: e92d4070 push {r4, r5, r6, lr}
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd );
9054: e59f30d4 ldr r3, [pc, #212] ; 9130 <ftruncate+0xe0> 9058: e5933000 ldr r3, [r3] 905c: e1500003 cmp r0, r3
int ftruncate( int fd, off_t length ) {
9060: e24dd014 sub sp, sp, #20 9064: e1a05001 mov r5, r1 9068: e1a06002 mov r6, r2
rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 906c: 2a000005 bcs 9088 <ftruncate+0x38> iop = rtems_libio_iop( fd );
9070: e59f30bc ldr r3, [pc, #188] ; 9134 <ftruncate+0xe4> 9074: e5934000 ldr r4, [r3] 9078: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
907c: e5943014 ldr r3, [r4, #20] 9080: e3130c01 tst r3, #256 ; 0x100
9084: 1a000002 bne 9094 <ftruncate+0x44>
9088: eb000f35 bl cd64 <__errno> <== NOT EXECUTED 908c: e3a03009 mov r3, #9 <== NOT EXECUTED 9090: ea00001c b 9108 <ftruncate+0xb8> <== NOT EXECUTED
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
9094: e284e018 add lr, r4, #24 9098: e8be000f ldm lr!, {r0, r1, r2, r3} 909c: e1a0c00d mov ip, sp 90a0: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
90a4: e5933010 ldr r3, [r3, #16]
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
90a8: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
90ac: e3530000 cmp r3, #0
/* * Make sure we are not working on a directory */ loc = iop->pathinfo;
90b0: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h ) 90b4: 0a000011 beq 9100 <ftruncate+0xb0> rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY )
90b8: e1a0000d mov r0, sp 90bc: e1a0e00f mov lr, pc 90c0: e12fff13 bx r3 90c4: e3500001 cmp r0, #1
90c8: 1a000002 bne 90d8 <ftruncate+0x88> rtems_set_errno_and_return_minus_one( EISDIR );
90cc: eb000f24 bl cd64 <__errno> 90d0: e3a03015 mov r3, #21 90d4: ea00000b b 9108 <ftruncate+0xb8>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
90d8: e5943014 ldr r3, [r4, #20] 90dc: e3130004 tst r3, #4
90e0: 1a000002 bne 90f0 <ftruncate+0xa0>
90e4: eb000f1e bl cd64 <__errno> <== NOT EXECUTED 90e8: e3a03016 mov r3, #22 <== NOT EXECUTED 90ec: ea000005 b 9108 <ftruncate+0xb8> <== NOT EXECUTED
if ( !iop->handlers->ftruncate_h )
90f0: e594303c ldr r3, [r4, #60] ; 0x3c 90f4: e5933020 ldr r3, [r3, #32] 90f8: e3530000 cmp r3, #0
90fc: 1a000004 bne 9114 <ftruncate+0xc4> rtems_set_errno_and_return_minus_one( ENOTSUP );
9100: eb000f17 bl cd64 <__errno> <== NOT EXECUTED 9104: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
9108: e5803000 str r3, [r0] 910c: e3e00000 mvn r0, #0 9110: ea000004 b 9128 <ftruncate+0xd8>
return (*iop->handlers->ftruncate_h)( iop, length );
9114: e1a00004 mov r0, r4 9118: e1a01005 mov r1, r5 911c: e1a02006 mov r2, r6 9120: e1a0e00f mov lr, pc 9124: e12fff13 bx r3
}
9128: e28dd014 add sp, sp, #20 912c: e8bd8070 pop {r4, r5, r6, pc}
0001bb50 <getdents>: /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
1bb50: e59f30a8 ldr r3, [pc, #168] ; 1bc00 <getdents+0xb0> 1bb54: e5933000 ldr r3, [r3] 1bb58: e1500003 cmp r0, r3 1bb5c: 359f30a0 ldrcc r3, [pc, #160] ; 1bc04 <getdents+0xb4>
int getdents( int dd_fd, char *dd_buf, int dd_len ) {
1bb60: e92d4070 push {r4, r5, r6, lr}
/* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd );
1bb64: 35934000 ldrcc r4, [r3] 1bb68: 23a04000 movcs r4, #0 1bb6c: 30844300 addcc r4, r4, r0, lsl #6
/* * Make sure we are working on a directory */ loc = iop->pathinfo;
1bb70: e284e018 add lr, r4, #24
int getdents( int dd_fd, char *dd_buf, int dd_len ) {
1bb74: e24dd014 sub sp, sp, #20 1bb78: e1a06001 mov r6, r1 1bb7c: e1a05002 mov r5, r2
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
1bb80: e8be000f ldm lr!, {r0, r1, r2, r3} 1bb84: e1a0c00d mov ip, sp 1bb88: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !loc.ops->node_type_h )
1bb8c: e5933010 ldr r3, [r3, #16]
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
1bb90: e59e2000 ldr r2, [lr]
if ( !loc.ops->node_type_h )
1bb94: e3530000 cmp r3, #0
iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo;
1bb98: e58c2000 str r2, [ip]
if ( !loc.ops->node_type_h ) 1bb9c: 0a00000d beq 1bbd8 <getdents+0x88> rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY )
1bba0: e1a0000d mov r0, sp 1bba4: e1a0e00f mov lr, pc 1bba8: e12fff13 bx r3 1bbac: e3500001 cmp r0, #1
1bbb0: 0a000004 beq 1bbc8 <getdents+0x78> rtems_set_errno_and_return_minus_one( ENOTDIR );
1bbb4: ebffce60 bl f53c <__errno> 1bbb8: e3a03014 mov r3, #20 1bbbc: e5803000 str r3, [r0] 1bbc0: e3e00000 mvn r0, #0 1bbc4: ea00000b b 1bbf8 <getdents+0xa8>
/* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h )
1bbc8: e594303c ldr r3, [r4, #60] ; 0x3c 1bbcc: e5933008 ldr r3, [r3, #8] 1bbd0: e3530000 cmp r3, #0
1bbd4: 1a000002 bne 1bbe4 <getdents+0x94> rtems_set_errno_and_return_minus_one( ENOTSUP );
1bbd8: ebffce57 bl f53c <__errno> <== NOT EXECUTED 1bbdc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1bbe0: eafffff5 b 1bbbc <getdents+0x6c> <== NOT EXECUTED
return (*iop->handlers->read_h)( iop, dd_buf, dd_len );
1bbe4: e1a00004 mov r0, r4 1bbe8: e1a01006 mov r1, r6 1bbec: e1a02005 mov r2, r5 1bbf0: e1a0e00f mov lr, pc 1bbf4: e12fff13 bx r3
}
1bbf8: e28dd014 add sp, sp, #20 1bbfc: e8bd8070 pop {r4, r5, r6, pc}
000026b8 <getgr_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
26b8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 26bc: e59da01c ldr sl, [sp, #28] 26c0: e1a06000 mov r6, r0 26c4: e1a07001 mov r7, r1 26c8: e1a04002 mov r4, r2 26cc: e1a08003 mov r8, r3
FILE *fp; int match; init_etc_passwd_group();
26d0: ebffffb7 bl 25b4 <init_etc_passwd_group>
if ((fp = fopen("/etc/group", "r")) == NULL) {
26d4: e59f00a4 ldr r0, [pc, #164] ; 2780 <getgr_r+0xc8> 26d8: e59f10a4 ldr r1, [pc, #164] ; 2784 <getgr_r+0xcc> 26dc: eb00339e bl f55c <fopen> 26e0: e2505000 subs r5, r0, #0
26e4: 1a000003 bne 26f8 <getgr_r+0x40> errno = EINVAL;
26e8: eb003196 bl ed48 <__errno> <== NOT EXECUTED 26ec: e3a03016 mov r3, #22 <== NOT EXECUTED 26f0: e5803000 str r3, [r0] <== NOT EXECUTED 26f4: ea00000c b 272c <getgr_r+0x74> <== NOT EXECUTED
return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) {
26f8: e1a01004 mov r1, r4 26fc: e1a02008 mov r2, r8 2700: e1a0300a mov r3, sl 2704: e1a00005 mov r0, r5 2708: ebfffef2 bl 22d8 <scangr> 270c: e3500000 cmp r0, #0
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0);
2710: e1a01006 mov r1, r6
if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 2714: 1a000006 bne 2734 <getgr_r+0x7c> errno = EINVAL;
2718: eb00318a bl ed48 <__errno> <== NOT EXECUTED 271c: e3a03016 mov r3, #22 <== NOT EXECUTED 2720: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
2724: e1a00005 mov r0, r5 <== NOT EXECUTED 2728: eb0031d3 bl ee7c <fclose> <== NOT EXECUTED 272c: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
2730: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
} if (name) {
2734: e3560000 cmp r6, #0
2738: 0a000004 beq 2750 <getgr_r+0x98> match = (strcmp(grp->gr_name, name) == 0);
273c: e5940000 ldr r0, [r4] 2740: eb0038ef bl 10b04 <strcmp> 2744: e2700001 rsbs r0, r0, #1 2748: 33a00000 movcc r0, #0 274c: ea000003 b 2760 <getgr_r+0xa8>
} else { match = (grp->gr_gid == gid);
2750: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 2754: e1500007 cmp r0, r7 <== NOT EXECUTED 2758: 13a00000 movne r0, #0 <== NOT EXECUTED 275c: 03a00001 moveq r0, #1 <== NOT EXECUTED
} if (match) {
2760: e3500000 cmp r0, #0
2764: 0affffe3 beq 26f8 <getgr_r+0x40> fclose(fp);
2768: e1a00005 mov r0, r5 276c: eb0031c2 bl ee7c <fclose>
*result = grp;
2770: e59d3020 ldr r3, [sp, #32] 2774: e3a00000 mov r0, #0 2778: e5834000 str r4, [r3]
} } fclose(fp); errno = EINVAL; return -1; }
277c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00002410 <getgrent>: return NULL; return p; } struct group *getgrent(void) {
2410: e92d4010 push {r4, lr} <== NOT EXECUTED
if (group_fp == NULL)
2414: e59f402c ldr r4, [pc, #44] ; 2448 <getgrent+0x38> <== NOT EXECUTED 2418: e5940000 ldr r0, [r4] <== NOT EXECUTED 241c: e3500000 cmp r0, #0 <== NOT EXECUTED 2420: 0a000006 beq 2440 <getgrent+0x30> <== NOT EXECUTED
return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf))
2424: e2841008 add r1, r4, #8 <== NOT EXECUTED 2428: e2842018 add r2, r4, #24 <== NOT EXECUTED 242c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2430: ebffffa8 bl 22d8 <scangr> <== NOT EXECUTED 2434: e3500000 cmp r0, #0 <== NOT EXECUTED 2438: 12840008 addne r0, r4, #8 <== NOT EXECUTED 243c: 18bd8010 popne {r4, pc} <== NOT EXECUTED 2440: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL; return &grent; }
2444: e8bd8010 pop {r4, pc} <== NOT EXECUTED
000027bc <getgrgid>: struct group *getgrgid( gid_t gid ) {
27bc: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
27c0: e59f1028 ldr r1, [pc, #40] ; 27f0 <getgrgid+0x34> <== NOT EXECUTED
} struct group *getgrgid( gid_t gid ) {
27c4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p))
27c8: e28dc004 add ip, sp, #4 <== NOT EXECUTED 27cc: e2812010 add r2, r1, #16 <== NOT EXECUTED 27d0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 27d4: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 27d8: e58dc000 str ip, [sp] <== NOT EXECUTED 27dc: ebffffe9 bl 2788 <getgrgid_r> <== NOT EXECUTED 27e0: e3500000 cmp r0, #0 <== NOT EXECUTED 27e4: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL; return p;
27e8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
27ec: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00002788 <getgrgid_r>: struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
2788: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 278c: e1a0c002 mov ip, r2 <== NOT EXECUTED 2790: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
2794: e58d3000 str r3, [sp] <== NOT EXECUTED
struct group *grp, char *buffer, size_t bufsize, struct group **result ) {
2798: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getgr_r(NULL, gid, grp, buffer, bufsize, result);
279c: e1a0300c mov r3, ip <== NOT EXECUTED 27a0: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 27a4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 27a8: e1a0200e mov r2, lr <== NOT EXECUTED 27ac: e3a00000 mov r0, #0 <== NOT EXECUTED 27b0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 27b4: ebffffbf bl 26b8 <getgr_r> <== NOT EXECUTED
}
27b8: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00002888 <getpw_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
2888: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 288c: e59da01c ldr sl, [sp, #28] 2890: e1a06000 mov r6, r0 2894: e1a07001 mov r7, r1 2898: e1a04002 mov r4, r2 289c: e1a08003 mov r8, r3
FILE *fp; int match; init_etc_passwd_group();
28a0: ebffff43 bl 25b4 <init_etc_passwd_group>
if ((fp = fopen("/etc/passwd", "r")) == NULL) {
28a4: e59f00a4 ldr r0, [pc, #164] ; 2950 <getpw_r+0xc8> 28a8: e59f10a4 ldr r1, [pc, #164] ; 2954 <getpw_r+0xcc> 28ac: eb00332a bl f55c <fopen> 28b0: e2505000 subs r5, r0, #0
28b4: 1a000003 bne 28c8 <getpw_r+0x40> errno = EINVAL;
28b8: eb003122 bl ed48 <__errno> <== NOT EXECUTED 28bc: e3a03016 mov r3, #22 <== NOT EXECUTED 28c0: e5803000 str r3, [r0] <== NOT EXECUTED 28c4: ea00000c b 28fc <getpw_r+0x74> <== NOT EXECUTED
return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) {
28c8: e1a01004 mov r1, r4 28cc: e1a02008 mov r2, r8 28d0: e1a0300a mov r3, sl 28d4: e1a00005 mov r0, r5 28d8: ebfffedb bl 244c <scanpw> 28dc: e3500000 cmp r0, #0
errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0);
28e0: e1a01006 mov r1, r6
if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 28e4: 1a000006 bne 2904 <getpw_r+0x7c> errno = EINVAL;
28e8: eb003116 bl ed48 <__errno> <== NOT EXECUTED 28ec: e3a03016 mov r3, #22 <== NOT EXECUTED 28f0: e5803000 str r3, [r0] <== NOT EXECUTED
fclose(fp);
28f4: e1a00005 mov r0, r5 <== NOT EXECUTED 28f8: eb00315f bl ee7c <fclose> <== NOT EXECUTED 28fc: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
2900: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
} if (name) {
2904: e3560000 cmp r6, #0
2908: 0a000004 beq 2920 <getpw_r+0x98> match = (strcmp(pwd->pw_name, name) == 0);
290c: e5940000 ldr r0, [r4] 2910: eb00387b bl 10b04 <strcmp> 2914: e2700001 rsbs r0, r0, #1 2918: 33a00000 movcc r0, #0 291c: ea000003 b 2930 <getpw_r+0xa8>
} else { match = (pwd->pw_uid == uid);
2920: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 2924: e1500007 cmp r0, r7 <== NOT EXECUTED 2928: 13a00000 movne r0, #0 <== NOT EXECUTED 292c: 03a00001 moveq r0, #1 <== NOT EXECUTED
} if (match) {
2930: e3500000 cmp r0, #0
2934: 0affffe3 beq 28c8 <getpw_r+0x40> fclose(fp);
2938: e1a00005 mov r0, r5 293c: eb00314e bl ee7c <fclose>
*result = pwd;
2940: e59d3020 ldr r3, [sp, #32] 2944: e3a00000 mov r0, #0 2948: e5834000 str r4, [r3]
} } fclose(fp); errno = EINVAL; return -1; }
294c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00002578 <getpwent>: return NULL; return p; } struct passwd *getpwent(void) {
2578: e92d4010 push {r4, lr} <== NOT EXECUTED
if (passwd_fp == NULL)
257c: e59f402c ldr r4, [pc, #44] ; 25b0 <getpwent+0x38> <== NOT EXECUTED 2580: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 2584: e3500000 cmp r0, #0 <== NOT EXECUTED 2588: 0a000006 beq 25a8 <getpwent+0x30> <== NOT EXECUTED
return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf))
258c: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 2590: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 2594: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 2598: ebffffab bl 244c <scanpw> <== NOT EXECUTED 259c: e3500000 cmp r0, #0 <== NOT EXECUTED 25a0: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 25a4: 18bd8010 popne {r4, pc} <== NOT EXECUTED 25a8: e3a00000 mov r0, #0 <== NOT EXECUTED
return NULL; return &pwent; }
25ac: e8bd8010 pop {r4, pc} <== NOT EXECUTED
0000298c <getpwuid>: struct passwd *getpwuid( uid_t uid ) {
298c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
2990: e59f1028 ldr r1, [pc, #40] ; 29c0 <getpwuid+0x34> <== NOT EXECUTED
} struct passwd *getpwuid( uid_t uid ) {
2994: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED
struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p))
2998: e28dc004 add ip, sp, #4 <== NOT EXECUTED 299c: e281201c add r2, r1, #28 <== NOT EXECUTED 29a0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 29a4: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 29a8: e58dc000 str ip, [sp] <== NOT EXECUTED 29ac: ebffffe9 bl 2958 <getpwuid_r> <== NOT EXECUTED 29b0: e3500000 cmp r0, #0 <== NOT EXECUTED 29b4: 13a00000 movne r0, #0 <== NOT EXECUTED
return NULL; return p;
29b8: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED
}
29bc: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00002958 <getpwuid_r>: struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
2958: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 295c: e1a0c002 mov ip, r2 <== NOT EXECUTED 2960: e1a0e001 mov lr, r1 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
2964: e58d3000 str r3, [sp] <== NOT EXECUTED
struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) {
2968: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED
return getpw_r(NULL, uid, pwd, buffer, bufsize, result);
296c: e1a0300c mov r3, ip <== NOT EXECUTED 2970: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 2974: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 2978: e1a0200e mov r2, lr <== NOT EXECUTED 297c: e3a00000 mov r0, #0 <== NOT EXECUTED 2980: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 2984: ebffffbf bl 2888 <getpw_r> <== NOT EXECUTED
}
2988: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED
00009160 <gettimeofday>: */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) {
9160: e92d4033 push {r0, r1, r4, r5, lr}
/* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) {
9164: e2504000 subs r4, r0, #0
9168: 1a000004 bne 9180 <gettimeofday+0x20> errno = EFAULT;
916c: eb000efc bl cd64 <__errno> <== NOT EXECUTED 9170: e3a0300e mov r3, #14 <== NOT EXECUTED 9174: e5803000 str r3, [r0] <== NOT EXECUTED 9178: e3e00000 mvn r0, #0 <== NOT EXECUTED
return -1;
917c: ea00000c b 91b4 <gettimeofday+0x54> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
9180: e10f5000 mrs r5, CPSR 9184: e3853080 orr r3, r5, #128 ; 0x80 9188: e129f003 msr CPSR_fc, r3
ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now );
918c: e1a0000d mov r0, sp 9190: eb00042b bl a244 <_TOD_Get>
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
9194: 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;
9198: e59d3000 ldr r3, [sp]
_ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec;
919c: e59d0004 ldr r0, [sp, #4]
useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds;
91a0: 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;
91a4: e5843000 str r3, [r4]
time->tv_usec = useconds;
91a8: eb0034b4 bl 16480 <__aeabi_idiv> 91ac: e5840004 str r0, [r4, #4] 91b0: 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; }
91b4: e8bd803c pop {r2, r3, r4, r5, pc}
000052c8 <ioctl>: int ioctl( int fd, ioctl_command_t command, ... ) {
52c8: e92d000e push {r1, r2, r3}
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd );
52cc: e59f3080 ldr r3, [pc, #128] ; 5354 <ioctl+0x8c> 52d0: e5933000 ldr r3, [r3] 52d4: e1500003 cmp r0, r3
int ioctl( int fd, ioctl_command_t command, ... ) {
52d8: e92d4001 push {r0, lr}
va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 52dc: 2a00000b bcs 5310 <ioctl+0x48> iop = rtems_libio_iop( fd );
52e0: e59f3070 ldr r3, [pc, #112] ; 5358 <ioctl+0x90> 52e4: e5933000 ldr r3, [r3] 52e8: e0830300 add r0, r3, r0, lsl #6
rtems_libio_check_is_open(iop);
52ec: e5903014 ldr r3, [r0, #20] 52f0: e3130c01 tst r3, #256 ; 0x100
52f4: 0a000005 beq 5310 <ioctl+0x48> /* * Now process the ioctl(). */ if ( !iop->handlers )
52f8: 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 *);
52fc: e28d2010 add r2, sp, #16
/* * Now process the ioctl(). */ if ( !iop->handlers )
5300: e3530000 cmp r3, #0
iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *);
5304: e58d2000 str r2, [sp] 5308: e59d200c ldr r2, [sp, #12]
/* * Now process the ioctl(). */ if ( !iop->handlers ) 530c: 1a000002 bne 531c <ioctl+0x54> rtems_set_errno_and_return_minus_one( EBADF );
5310: eb0033de bl 12290 <__errno> 5314: e3a03009 mov r3, #9 5318: ea000004 b 5330 <ioctl+0x68>
if ( !iop->handlers->ioctl_h )
531c: e5933010 ldr r3, [r3, #16] 5320: e3530000 cmp r3, #0
5324: 1a000004 bne 533c <ioctl+0x74> rtems_set_errno_and_return_minus_one( ENOTSUP );
5328: eb0033d8 bl 12290 <__errno> <== NOT EXECUTED 532c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
5330: e5803000 str r3, [r0] 5334: e3e00000 mvn r0, #0 5338: ea000002 b 5348 <ioctl+0x80>
rc = (*iop->handlers->ioctl_h)( iop, command, buffer );
533c: e59d1008 ldr r1, [sp, #8] 5340: e1a0e00f mov lr, pc 5344: e12fff13 bx r3
return rc; }
5348: e8bd4008 pop {r3, lr} 534c: e28dd00c add sp, sp, #12 5350: e12fff1e bx lr
000030b4 <iproc>: * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP)
30b4: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 30b8: e3130020 tst r3, #32 <== NOT EXECUTED
/* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) {
30bc: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 30c0: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f;
30c4: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED
if (tty->termios.c_iflag & IUCLC)
30c8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
/* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) {
30cc: e1a04001 mov r4, r1 <== NOT EXECUTED
if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC)
30d0: 0a000007 beq 30f4 <iproc+0x40> <== NOT EXECUTED
c = tolower (c);
30d4: e59f2164 ldr r2, [pc, #356] ; 3240 <iproc+0x18c> <== NOT EXECUTED 30d8: e5922000 ldr r2, [r2] <== NOT EXECUTED 30dc: e0822005 add r2, r2, r5 <== NOT EXECUTED 30e0: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 30e4: e2022003 and r2, r2, #3 <== NOT EXECUTED 30e8: e3520001 cmp r2, #1 <== NOT EXECUTED 30ec: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 30f0: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED
if (c == '\r') {
30f4: e355000d cmp r5, #13 <== NOT EXECUTED 30f8: 1a000005 bne 3114 <iproc+0x60> <== NOT EXECUTED
if (tty->termios.c_iflag & IGNCR)
30fc: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 3100: 1a00004c bne 3238 <iproc+0x184> <== NOT EXECUTED
return 0; if (tty->termios.c_iflag & ICRNL)
3104: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3108: 03a0500d moveq r5, #13 <== NOT EXECUTED 310c: 13a0500a movne r5, #10 <== NOT EXECUTED 3110: ea000007 b 3134 <iproc+0x80> <== NOT EXECUTED
c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) {
3114: e355000a cmp r5, #10 <== NOT EXECUTED 3118: 1a000003 bne 312c <iproc+0x78> <== NOT EXECUTED 311c: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 3120: 03a0500a moveq r5, #10 <== NOT EXECUTED 3124: 13a0500d movne r5, #13 <== NOT EXECUTED 3128: ea000001 b 3134 <iproc+0x80> <== NOT EXECUTED
c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) {
312c: e3550000 cmp r5, #0 <== NOT EXECUTED 3130: 0a00002e beq 31f0 <iproc+0x13c> <== NOT EXECUTED 3134: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3138: e3130002 tst r3, #2 <== NOT EXECUTED 313c: 0a00002b beq 31f0 <iproc+0x13c> <== NOT EXECUTED
if (c == tty->termios.c_cc[VERASE]) {
3140: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 3144: e1520005 cmp r2, r5 <== NOT EXECUTED
erase (tty, 0);
3148: 01a00004 moveq r0, r4 <== NOT EXECUTED 314c: 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]) {
3150: 0a000004 beq 3168 <iproc+0xb4> <== NOT EXECUTED
erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) {
3154: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 3158: e1520005 cmp r2, r5 <== NOT EXECUTED 315c: 1a000003 bne 3170 <iproc+0xbc> <== NOT EXECUTED
erase (tty, 1);
3160: e1a00004 mov r0, r4 <== NOT EXECUTED 3164: e3a01001 mov r1, #1 <== NOT EXECUTED 3168: ebffff5e bl 2ee8 <erase> <== NOT EXECUTED 316c: ea00002f b 3230 <iproc+0x17c> <== NOT EXECUTED
return 0; } else if (c == tty->termios.c_cc[VEOF]) {
3170: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 3174: e1520005 cmp r2, r5 <== NOT EXECUTED 3178: 0a00001a beq 31e8 <iproc+0x134> <== NOT EXECUTED
return 1; } else if (c == '\n') {
317c: e355000a cmp r5, #10 <== NOT EXECUTED 3180: 1a000009 bne 31ac <iproc+0xf8> <== NOT EXECUTED
if (tty->termios.c_lflag & (ECHO | ECHONL))
3184: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED
echo (c, tty);
3188: 11a00005 movne r0, r5 <== NOT EXECUTED 318c: 11a01004 movne r1, r4 <== NOT EXECUTED 3190: 1bffff34 blne 2e68 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
3194: e284101c add r1, r4, #28 <== NOT EXECUTED 3198: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 319c: e3a0000a mov r0, #10 <== NOT EXECUTED 31a0: e2832001 add r2, r3, #1 <== NOT EXECUTED 31a4: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 31a8: ea00000d b 31e4 <iproc+0x130> <== NOT EXECUTED
return 1; } else if ((c == tty->termios.c_cc[VEOL])
31ac: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 31b0: e1520005 cmp r2, r5 <== NOT EXECUTED 31b4: 0a000002 beq 31c4 <iproc+0x110> <== NOT EXECUTED
|| (c == tty->termios.c_cc[VEOL2])) {
31b8: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 31bc: e1520005 cmp r2, r5 <== NOT EXECUTED 31c0: 1a00000a bne 31f0 <iproc+0x13c> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
31c4: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
31c8: 11a00005 movne r0, r5 <== NOT EXECUTED 31cc: 11a01004 movne r1, r4 <== NOT EXECUTED 31d0: 1bffff24 blne 2e68 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
31d4: e284101c add r1, r4, #28 <== NOT EXECUTED 31d8: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 31dc: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 31e0: e2832001 add r2, r3, #1 <== NOT EXECUTED 31e4: e5842020 str r2, [r4, #32] <== NOT EXECUTED 31e8: e3a00001 mov r0, #1 <== NOT EXECUTED
return 1;
31ec: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
} /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) {
31f0: e59f304c ldr r3, [pc, #76] ; 3244 <iproc+0x190> <== NOT EXECUTED 31f4: e5933000 ldr r3, [r3] <== NOT EXECUTED 31f8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 31fc: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3200: e1520003 cmp r2, r3 <== NOT EXECUTED 3204: aa00000b bge 3238 <iproc+0x184> <== NOT EXECUTED
if (tty->termios.c_lflag & ECHO)
3208: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 320c: e3130008 tst r3, #8 <== NOT EXECUTED
echo (c, tty);
3210: 11a00005 movne r0, r5 <== NOT EXECUTED 3214: 11a01004 movne r1, r4 <== NOT EXECUTED 3218: 1bffff12 blne 2e68 <echo> <== NOT EXECUTED
tty->cbuf[tty->ccount++] = c;
321c: e284101c add r1, r4, #28 <== NOT EXECUTED 3220: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 3224: e2832001 add r2, r3, #1 <== NOT EXECUTED 3228: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 322c: e5842020 str r2, [r4, #32] <== NOT EXECUTED 3230: e3a00000 mov r0, #0 <== NOT EXECUTED 3234: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 3238: e3a00000 mov r0, #0 <== NOT EXECUTED
} return 0; }
323c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
00003238 <link>: int link( const char *existing, const char *new ) {
3238: e92d4030 push {r4, r5, lr} 323c: e24dd030 sub sp, sp, #48 ; 0x30 3240: e1a04001 mov r4, r1 3244: e1a05000 mov r5, r0
/* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ),
3248: eb00364b bl 10b7c <strlen> 324c: e3a0c001 mov ip, #1 3250: e1a01000 mov r1, r0 3254: e3a02000 mov r2, #0 3258: e1a00005 mov r0, r5 325c: e28d3018 add r3, sp, #24 3260: e58dc000 str ip, [sp] 3264: ebfffeab bl 2d18 <rtems_filesystem_evaluate_path>
0, &existing_loc, true ); if ( result != 0 )
3268: e3500000 cmp r0, #0
326c: 1a00002a bne 331c <link+0xe4> /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc );
3270: e5d43000 ldrb r3, [r4] 3274: e353002f cmp r3, #47 ; 0x2f 3278: 1353005c cmpne r3, #92 ; 0x5c 327c: 13a05000 movne r5, #0 3280: 03a05001 moveq r5, #1
3284: 0a000001 beq 3290 <link+0x58>
3288: e3530000 cmp r3, #0
328c: 1a000009 bne 32b8 <link+0x80>
3290: e59f31ec ldr r3, [pc, #492] ; 3484 <link+0x24c> 3294: e593e000 ldr lr, [r3] 3298: e28ee018 add lr, lr, #24 329c: e8be000f ldm lr!, {r0, r1, r2, r3} 32a0: e28dc004 add ip, sp, #4 32a4: e8ac000f stmia ip!, {r0, r1, r2, r3} 32a8: e59e3000 ldr r3, [lr] 32ac: e3a00001 mov r0, #1 32b0: e58c3000 str r3, [ip] 32b4: ea000008 b 32dc <link+0xa4> 32b8: e59f31c4 ldr r3, [pc, #452] ; 3484 <link+0x24c> 32bc: e593e000 ldr lr, [r3] 32c0: e28ee004 add lr, lr, #4 32c4: e8be000f ldm lr!, {r0, r1, r2, r3} 32c8: e28dc004 add ip, sp, #4 32cc: e8ac000f stmia ip!, {r0, r1, r2, r3} 32d0: e59e3000 ldr r3, [lr] 32d4: e58c3000 str r3, [ip] 32d8: e1a00005 mov r0, r5
if ( !parent_loc.ops->evalformake_h ) {
32dc: e59d3010 ldr r3, [sp, #16] 32e0: e5933004 ldr r3, [r3, #4] 32e4: e3530000 cmp r3, #0
32e8: 1a00000d bne 3324 <link+0xec> rtems_filesystem_freenode( &existing_loc );
32ec: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 32f0: e3530000 cmp r3, #0 <== NOT EXECUTED 32f4: 0a000005 beq 3310 <link+0xd8> <== NOT EXECUTED 32f8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 32fc: e3530000 cmp r3, #0 <== NOT EXECUTED 3300: 0a000002 beq 3310 <link+0xd8> <== NOT EXECUTED 3304: e28d0018 add r0, sp, #24 <== NOT EXECUTED 3308: e1a0e00f mov lr, pc <== NOT EXECUTED 330c: e12fff13 bx r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3310: eb003089 bl f53c <__errno> <== NOT EXECUTED 3314: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3318: e5803000 str r3, [r0] 331c: e3e05000 mvn r5, #0 3320: ea000054 b 3478 <link+0x240>
} result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start );
3324: e28d5004 add r5, sp, #4 3328: e0840000 add r0, r4, r0 332c: e1a01005 mov r1, r5 3330: e28d202c add r2, sp, #44 ; 0x2c 3334: e1a0e00f mov lr, pc 3338: e12fff13 bx r3
if ( result != 0 ) {
333c: e2504000 subs r4, r0, #0
3340: 0a00000a beq 3370 <link+0x138> rtems_filesystem_freenode( &existing_loc );
3344: e59d3024 ldr r3, [sp, #36] ; 0x24 3348: e3530000 cmp r3, #0
334c: 0a000004 beq 3364 <link+0x12c>
3350: e593301c ldr r3, [r3, #28] 3354: e3530000 cmp r3, #0 3358: 128d0018 addne r0, sp, #24 335c: 11a0e00f movne lr, pc 3360: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( result );
3364: eb003074 bl f53c <__errno> 3368: e5804000 str r4, [r0] 336c: eaffffea b 331c <link+0xe4>
/* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) {
3370: e59d3028 ldr r3, [sp, #40] ; 0x28 3374: e59d2014 ldr r2, [sp, #20] 3378: e1520003 cmp r2, r3
337c: 0a000012 beq 33cc <link+0x194> rtems_filesystem_freenode( &existing_loc );
3380: e59d3024 ldr r3, [sp, #36] ; 0x24 3384: e3530000 cmp r3, #0
3388: 0a000004 beq 33a0 <link+0x168>
338c: e593301c ldr r3, [r3, #28] 3390: e3530000 cmp r3, #0 3394: 128d0018 addne r0, sp, #24 3398: 11a0e00f movne lr, pc 339c: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
33a0: e59d3010 ldr r3, [sp, #16] 33a4: e3530000 cmp r3, #0
33a8: 0a000004 beq 33c0 <link+0x188>
33ac: e593301c ldr r3, [r3, #28] 33b0: e3530000 cmp r3, #0 33b4: 128d0004 addne r0, sp, #4 33b8: 11a0e00f movne lr, pc 33bc: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EXDEV );
33c0: eb00305d bl f53c <__errno> 33c4: e3a03012 mov r3, #18 33c8: eaffffd2 b 3318 <link+0xe0>
} if ( !parent_loc.ops->link_h ) {
33cc: e59d3010 ldr r3, [sp, #16] 33d0: e5933008 ldr r3, [r3, #8] 33d4: e3530000 cmp r3, #0
33d8: 1a00000f bne 341c <link+0x1e4> rtems_filesystem_freenode( &existing_loc );
33dc: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 33e0: e3530000 cmp r3, #0 <== NOT EXECUTED 33e4: 0a000004 beq 33fc <link+0x1c4> <== NOT EXECUTED 33e8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 33ec: e3530000 cmp r3, #0 <== NOT EXECUTED 33f0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 33f4: 11a0e00f movne lr, pc <== NOT EXECUTED 33f8: 112fff13 bxne r3 <== NOT EXECUTED
rtems_filesystem_freenode( &parent_loc );
33fc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3400: e3530000 cmp r3, #0 <== NOT EXECUTED 3404: 0affffc1 beq 3310 <link+0xd8> <== NOT EXECUTED 3408: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 340c: e3530000 cmp r3, #0 <== NOT EXECUTED 3410: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 3414: 1affffbb bne 3308 <link+0xd0> <== NOT EXECUTED 3418: eaffffbc b 3310 <link+0xd8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start );
341c: e28d4018 add r4, sp, #24 3420: e1a01005 mov r1, r5 3424: e1a00004 mov r0, r4 3428: e59d202c ldr r2, [sp, #44] ; 0x2c 342c: e1a0e00f mov lr, pc 3430: e12fff13 bx r3
rtems_filesystem_freenode( &existing_loc );
3434: e59d3024 ldr r3, [sp, #36] ; 0x24 3438: 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 );
343c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &existing_loc ); 3440: 0a000004 beq 3458 <link+0x220>
3444: e593301c ldr r3, [r3, #28] 3448: e3530000 cmp r3, #0 344c: 11a00004 movne r0, r4 3450: 11a0e00f movne lr, pc 3454: 112fff13 bxne r3
rtems_filesystem_freenode( &parent_loc );
3458: e59d3010 ldr r3, [sp, #16] 345c: e3530000 cmp r3, #0
3460: 0a000004 beq 3478 <link+0x240>
3464: e593301c ldr r3, [r3, #28] 3468: e3530000 cmp r3, #0 346c: 128d0004 addne r0, sp, #4 3470: 11a0e00f movne lr, pc 3474: 112fff13 bxne r3
return result; }
3478: e1a00005 mov r0, r5 347c: e28dd030 add sp, sp, #48 ; 0x30 3480: e8bd8030 pop {r4, r5, pc}
00017d6c <lseek>: { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd );
17d6c: e59fc0ec ldr ip, [pc, #236] ; 17e60 <lseek+0xf4> 17d70: e59cc000 ldr ip, [ip] 17d74: e150000c cmp r0, ip
off_t lseek( int fd, off_t offset, int whence ) {
17d78: e92d4870 push {r4, r5, r6, fp, lr}
rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17d7c: 2a000005 bcs 17d98 <lseek+0x2c> iop = rtems_libio_iop( fd );
17d80: e59fc0dc ldr ip, [pc, #220] ; 17e64 <lseek+0xf8> 17d84: e59c4000 ldr r4, [ip] 17d88: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open(iop);
17d8c: e5940014 ldr r0, [r4, #20] 17d90: e3100c01 tst r0, #256 ; 0x100
17d94: 1a000002 bne 17da4 <lseek+0x38>
17d98: ebffd3f1 bl cd64 <__errno> <== NOT EXECUTED 17d9c: e3a03009 mov r3, #9 <== NOT EXECUTED 17da0: ea00001c b 17e18 <lseek+0xac> <== NOT EXECUTED
/* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h )
17da4: e594003c ldr r0, [r4, #60] ; 0x3c 17da8: e5900014 ldr r0, [r0, #20] 17dac: e3500000 cmp r0, #0
17db0: 1a000002 bne 17dc0 <lseek+0x54> rtems_set_errno_and_return_minus_one( ENOTSUP );
17db4: ebffd3ea bl cd64 <__errno> <== NOT EXECUTED 17db8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17dbc: ea000015 b 17e18 <lseek+0xac> <== NOT EXECUTED
/* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) {
17dc0: e3530001 cmp r3, #1
/* * Now process the lseek(). */ old_offset = iop->offset;
17dc4: e284600c add r6, r4, #12 17dc8: e8960060 ldm r6, {r5, r6}
switch ( whence ) { 17dcc: 0a000006 beq 17dec <lseek+0x80>
17dd0: e3530002 cmp r3, #2
17dd4: 0a000007 beq 17df8 <lseek+0x8c>
17dd8: e3530000 cmp r3, #0
17ddc: 1a00000b bne 17e10 <lseek+0xa4> case SEEK_SET: iop->offset = offset;
17de0: e584100c str r1, [r4, #12] 17de4: e5842010 str r2, [r4, #16]
break;
17de8: ea00000e b 17e28 <lseek+0xbc>
case SEEK_CUR: iop->offset += offset;
17dec: e091b005 adds fp, r1, r5 17df0: e0a2c006 adc ip, r2, r6 17df4: ea000002 b 17e04 <lseek+0x98>
break; case SEEK_END: iop->offset = iop->size + offset;
17df8: e9941800 ldmib r4, {fp, ip} 17dfc: e09bb001 adds fp, fp, r1 17e00: e0acc002 adc ip, ip, r2 17e04: e584b00c str fp, [r4, #12] 17e08: e584c010 str ip, [r4, #16]
break;
17e0c: ea000005 b 17e28 <lseek+0xbc>
default: rtems_set_errno_and_return_minus_one( EINVAL );
17e10: ebffd3d3 bl cd64 <__errno> 17e14: e3a03016 mov r3, #22 17e18: e5803000 str r3, [r0] 17e1c: e3e02000 mvn r2, #0 17e20: e3e03000 mvn r3, #0 17e24: ea00000a b 17e54 <lseek+0xe8>
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
17e28: e594c03c ldr ip, [r4, #60] ; 0x3c 17e2c: e1a00004 mov r0, r4 17e30: e1a0e00f mov lr, pc 17e34: e59cf014 ldr pc, [ip, #20]
if ( status == (off_t) -1 )
17e38: e3700001 cmn r0, #1
/* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence );
17e3c: e1a02000 mov r2, r0 17e40: e1a03001 mov r3, r1
if ( status == (off_t) -1 ) 17e44: 1a000002 bne 17e54 <lseek+0xe8>
17e48: e3710001 cmn r1, #1
iop->offset = old_offset;
17e4c: 0584500c streq r5, [r4, #12] 17e50: 05846010 streq r6, [r4, #16]
/* * So if the operation failed, we have to restore iop->offset. */ return status; }
17e54: e1a01003 mov r1, r3 17e58: e1a00002 mov r0, r2 17e5c: e8bd8870 pop {r4, r5, r6, fp, pc}
00001c10 <malloc>: size_t size ) { void *return_this; MSBUMP(malloc_calls, 1);
1c10: e59f30d8 ldr r3, [pc, #216] ; 1cf0 <malloc+0xe0> 1c14: e5932004 ldr r2, [r3, #4] 1c18: e2822001 add r2, r2, #1 1c1c: e92d4070 push {r4, r5, r6, lr} 1c20: e5832004 str r2, [r3, #4] 1c24: e1a04000 mov r4, r0
/* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process();
1c28: ebffffb5 bl 1b04 <malloc_deferred_frees_process>
/* * Validate the parameters */ if ( !size )
1c2c: e3540000 cmp r4, #0
1c30: 0a00002b beq 1ce4 <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()) &&
1c34: e59f30b8 ldr r3, [pc, #184] ; 1cf4 <malloc+0xe4> 1c38: e5933000 ldr r3, [r3] 1c3c: e3530003 cmp r3, #3
1c40: 1a000002 bne 1c50 <malloc+0x40>
1c44: ebffff97 bl 1aa8 <malloc_is_system_state_OK> 1c48: e3500000 cmp r0, #0
1c4c: 0a000024 beq 1ce4 <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 );
1c50: e59f30a0 ldr r3, [pc, #160] ; 1cf8 <malloc+0xe8> 1c54: e3a02000 mov r2, #0 1c58: e5930000 ldr r0, [r3] 1c5c: e1a01004 mov r1, r4 1c60: e1a03002 mov r3, r2 1c64: eb0011b7 bl 6348 <_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 ) {
1c68: 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;
1c6c: 11a05006 movne r5, r6
* If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 1c70: 1a00000c bne 1ca8 <malloc+0x98> if (rtems_malloc_sbrk_helpers)
1c74: e59f3080 ldr r3, [pc, #128] ; 1cfc <malloc+0xec> 1c78: e5933000 ldr r3, [r3] 1c7c: e3530000 cmp r3, #0
1c80: 0a000004 beq 1c98 <malloc+0x88> return_this = (*rtems_malloc_sbrk_helpers->extend)( size );
1c84: e1a00004 mov r0, r4 <== NOT EXECUTED 1c88: e1a0e00f mov lr, pc <== NOT EXECUTED 1c8c: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED
if ( !return_this ) {
1c90: e2505000 subs r5, r0, #0 <== NOT EXECUTED 1c94: 1a000003 bne 1ca8 <malloc+0x98> <== NOT EXECUTED
errno = ENOMEM;
1c98: eb002c31 bl cd64 <__errno> 1c9c: e3a0300c mov r3, #12 1ca0: e5803000 str r3, [r0]
return (void *) 0;
1ca4: ea00000f b 1ce8 <malloc+0xd8>
} /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper )
1ca8: e59f3050 ldr r3, [pc, #80] ; 1d00 <malloc+0xf0> 1cac: e5933000 ldr r3, [r3] 1cb0: e3530000 cmp r3, #0
(*rtems_malloc_dirty_helper)( return_this, size );
1cb4: 11a01004 movne r1, r4 1cb8: 11a00005 movne r0, r5 1cbc: 11a0e00f movne lr, pc 1cc0: 1593f000 ldrne pc, [r3]
/* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers )
1cc4: e59f3038 ldr r3, [pc, #56] ; 1d04 <malloc+0xf4> 1cc8: e5933000 ldr r3, [r3] 1ccc: e3530000 cmp r3, #0
(*rtems_malloc_statistics_helpers->at_malloc)(return_this);
1cd0: 11a00005 movne r0, r5 1cd4: 11a0e00f movne lr, pc 1cd8: 1593f004 ldrne pc, [r3, #4] 1cdc: e1a06005 mov r6, r5 1ce0: ea000000 b 1ce8 <malloc+0xd8>
1ce4: e3a06000 mov r6, #0 <== NOT EXECUTED
if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; }
1ce8: e1a00006 mov r0, r6 1cec: e8bd8070 pop {r4, r5, r6, pc}
00001af4 <malloc_deferred_free>: } void malloc_deferred_free( void *pointer ) {
1af4: 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 );
1af8: e59f0000 ldr r0, [pc, #0] ; 1b00 <malloc_deferred_free+0xc><== NOT EXECUTED 1afc: ea000e27 b 53a0 <_Chain_Append> <== NOT EXECUTED
00001b04 <malloc_deferred_frees_process>: { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) {
1b04: 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)
1b08: ea000000 b 1b10 <malloc_deferred_frees_process+0xc>
free(to_be_freed);
1b0c: ebffff8d bl 1948 <free> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain );
1b10: e59f000c ldr r0, [pc, #12] ; 1b24 <malloc_deferred_frees_process+0x20> 1b14: eb000e2c bl 53cc <_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)
1b18: e3500000 cmp r0, #0
1b1c: 1afffffa bne 1b0c <malloc_deferred_frees_process+0x8> free(to_be_freed); }
1b20: e49df004 pop {pc} ; (ldr pc, [sp], #4)
00010490 <memfile_ftruncate>: int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) {
10490: e92d4013 push {r0, r1, r4, lr}
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
10494: 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 )
10498: e5943054 ldr r3, [r4, #84] ; 0x54 1049c: e1530002 cmp r3, r2
104a0: ba000003 blt 104b4 <memfile_ftruncate+0x24> 104a4: 1a000005 bne 104c0 <memfile_ftruncate+0x30>
104a8: e5943050 ldr r3, [r4, #80] ; 0x50 104ac: e1530001 cmp r3, r1
104b0: 2a000002 bcs 104c0 <memfile_ftruncate+0x30> return IMFS_memfile_extend( the_jnode, length );
104b4: e1a00004 mov r0, r4 <== NOT EXECUTED 104b8: ebffff9a bl 10328 <IMFS_memfile_extend> <== NOT EXECUTED 104bc: ea000008 b 104e4 <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;
104c0: e5841050 str r1, [r4, #80] ; 0x50 104c4: e5842054 str r2, [r4, #84] ; 0x54
iop->size = the_jnode->info.file.size;
104c8: e9800006 stmib r0, {r1, r2}
IMFS_update_atime( the_jnode );
104cc: e3a01000 mov r1, #0 104d0: e1a0000d mov r0, sp 104d4: ebffca5f bl 2e58 <gettimeofday> 104d8: e59d3000 ldr r3, [sp] 104dc: e5843040 str r3, [r4, #64] ; 0x40 104e0: e3a00000 mov r0, #0
return 0; }
104e4: e8bd801c pop {r2, r3, r4, pc}
000104e8 <memfile_lseek>: rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
104e8: e92d4030 push {r4, r5, lr}
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
104ec: e5905038 ldr r5, [r0, #56] ; 0x38
if (the_jnode->type == IMFS_LINEAR_FILE) {
104f0: e595304c ldr r3, [r5, #76] ; 0x4c 104f4: e3530006 cmp r3, #6
rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) {
104f8: e1a04000 mov r4, r0
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { 104fc: 1a00000b bne 10530 <memfile_lseek+0x48> if (iop->offset > the_jnode->info.linearfile.size)
10500: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED 10504: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED 10508: e1520003 cmp r2, r3 <== NOT EXECUTED 1050c: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED 10510: ca000003 bgt 10524 <memfile_lseek+0x3c> <== NOT EXECUTED 10514: 1a000014 bne 1056c <memfile_lseek+0x84> <== NOT EXECUTED 10518: e590100c ldr r1, [r0, #12] <== NOT EXECUTED 1051c: e1510002 cmp r1, r2 <== NOT EXECUTED 10520: 9a000011 bls 1056c <memfile_lseek+0x84> <== NOT EXECUTED
iop->offset = the_jnode->info.linearfile.size;
10524: e584200c str r2, [r4, #12] <== NOT EXECUTED 10528: e5843010 str r3, [r4, #16] <== NOT EXECUTED 1052c: ea00000e b 1056c <memfile_lseek+0x84> <== NOT EXECUTED
} else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset ))
10530: e1a00005 mov r0, r5 10534: e284200c add r2, r4, #12 10538: e8920006 ldm r2, {r1, r2} 1053c: ebffff79 bl 10328 <IMFS_memfile_extend> 10540: e3500000 cmp r0, #0
10544: 0a000005 beq 10560 <memfile_lseek+0x78> rtems_set_errno_and_return_minus_one( ENOSPC );
10548: eb000657 bl 11eac <__errno> <== NOT EXECUTED 1054c: e3a0301c mov r3, #28 <== NOT EXECUTED 10550: e5803000 str r3, [r0] <== NOT EXECUTED 10554: e3e04000 mvn r4, #0 <== NOT EXECUTED 10558: e3e03000 mvn r3, #0 <== NOT EXECUTED 1055c: ea000004 b 10574 <memfile_lseek+0x8c> <== NOT EXECUTED
iop->size = the_jnode->info.file.size;
10560: e2853050 add r3, r5, #80 ; 0x50 10564: e893000c ldm r3, {r2, r3} 10568: e984000c stmib r4, {r2, r3}
} return iop->offset;
1056c: e284400c add r4, r4, #12 10570: e8940018 ldm r4, {r3, r4}
}
10574: e1a01004 mov r1, r4 10578: e1a00003 mov r0, r3 1057c: e8bd8030 pop {r4, r5, pc}
0001080c <memfile_open>: the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND))
1080c: e5903014 ldr r3, [r0, #20] 10810: e3130f81 tst r3, #516 ; 0x204
rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) {
10814: e92d4031 push {r0, r4, r5, lr} 10818: e1a05000 mov r5, r0
IMFS_jnode_t *the_jnode; the_jnode = iop->file_info;
1081c: e5904038 ldr r4, [r0, #56] ; 0x38
/* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 10820: 0a000017 beq 10884 <memfile_open+0x78> && (the_jnode->type == IMFS_LINEAR_FILE)) {
10824: e594304c ldr r3, [r4, #76] ; 0x4c 10828: e3530006 cmp r3, #6
1082c: 1a000014 bne 10884 <memfile_open+0x78> uint32_t count = the_jnode->info.linearfile.size;
10830: 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;
10834: 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;
10838: e3a03005 mov r3, #5 <== NOT EXECUTED
the_jnode->info.file.size = 0;
1083c: e3a00000 mov r0, #0 <== NOT EXECUTED 10840: 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)
10844: 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;
10848: 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;
1084c: 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;
10850: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED
the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0;
10854: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED 10858: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED
the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0;
1085c: 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;
10860: 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)
10864: 0a000006 beq 10884 <memfile_open+0x78> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1))
10868: e1a02001 mov r2, r1 <== NOT EXECUTED 1086c: e1a01000 mov r1, r0 <== NOT EXECUTED 10870: e1a00004 mov r0, r4 <== NOT EXECUTED 10874: e58dc000 str ip, [sp] <== NOT EXECUTED 10878: ebffff40 bl 10580 <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)
1087c: e3700001 cmn r0, #1 <== NOT EXECUTED 10880: 0a000009 beq 108ac <memfile_open+0xa0> <== NOT EXECUTED
&& (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND)
10884: e5953014 ldr r3, [r5, #20] 10888: e3130c02 tst r3, #512 ; 0x200
iop->offset = the_jnode->info.file.size;
1088c: 12843050 addne r3, r4, #80 ; 0x50 10890: 1893000c ldmne r3, {r2, r3} 10894: 1585200c strne r2, [r5, #12] 10898: 15853010 strne r3, [r5, #16]
iop->size = the_jnode->info.file.size;
1089c: e2844050 add r4, r4, #80 ; 0x50 108a0: e8940018 ldm r4, {r3, r4} 108a4: e9850018 stmib r5, {r3, r4} 108a8: e3a00000 mov r0, #0
return 0; }
108ac: e8bd8038 pop {r3, r4, r5, pc}
00001d18 <mknod>: int mknod( const char *pathname, mode_t mode, dev_t dev ) {
1d18: e92d41f0 push {r4, r5, r6, r7, r8, lr}
rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) )
1d1c: e3110a0f tst r1, #61440 ; 0xf000
int mknod( const char *pathname, mode_t mode, dev_t dev ) {
1d20: e24dd01c sub sp, sp, #28 1d24: e1a05001 mov r5, r1 1d28: e1a06000 mov r6, r0 1d2c: e1a07002 mov r7, r2 1d30: e1a08003 mov r8, r3
rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 1d34: 1a000002 bne 1d44 <mknod+0x2c> rtems_set_errno_and_return_minus_one( EINVAL );
1d38: eb002c09 bl cd64 <__errno> <== NOT EXECUTED 1d3c: e3a03016 mov r3, #22 <== NOT EXECUTED 1d40: ea000020 b 1dc8 <mknod+0xb0> <== NOT EXECUTED
rtems_filesystem_get_start_loc( pathname, &i, &temp_loc );
1d44: e5d03000 ldrb r3, [r0] 1d48: e353002f cmp r3, #47 ; 0x2f 1d4c: 1353005c cmpne r3, #92 ; 0x5c 1d50: 13a04000 movne r4, #0 1d54: 03a04001 moveq r4, #1
1d58: 0a000001 beq 1d64 <mknod+0x4c>
1d5c: e3530000 cmp r3, #0
1d60: 1a000009 bne 1d8c <mknod+0x74>
1d64: e59f3100 ldr r3, [pc, #256] ; 1e6c <mknod+0x154> 1d68: e593e000 ldr lr, [r3] 1d6c: e28ee018 add lr, lr, #24 1d70: e8be000f ldm lr!, {r0, r1, r2, r3} 1d74: e28dc004 add ip, sp, #4 1d78: e8ac000f stmia ip!, {r0, r1, r2, r3} 1d7c: e59e3000 ldr r3, [lr] 1d80: e3a00001 mov r0, #1 1d84: e58c3000 str r3, [ip] 1d88: ea000008 b 1db0 <mknod+0x98> 1d8c: e59f30d8 ldr r3, [pc, #216] ; 1e6c <mknod+0x154> 1d90: e593e000 ldr lr, [r3] 1d94: e28ee004 add lr, lr, #4 1d98: e8be000f ldm lr!, {r0, r1, r2, r3} 1d9c: e28dc004 add ip, sp, #4 1da0: e8ac000f stmia ip!, {r0, r1, r2, r3} 1da4: e59e3000 ldr r3, [lr] 1da8: e58c3000 str r3, [ip] 1dac: e1a00004 mov r0, r4
if ( !temp_loc.ops->evalformake_h ) {
1db0: e59d3010 ldr r3, [sp, #16] 1db4: e5933004 ldr r3, [r3, #4] 1db8: e3530000 cmp r3, #0
1dbc: 1a000004 bne 1dd4 <mknod+0xbc> rtems_set_errno_and_return_minus_one( ENOTSUP );
1dc0: eb002be7 bl cd64 <__errno> <== NOT EXECUTED 1dc4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1dc8: e5803000 str r3, [r0] <== NOT EXECUTED
1dcc: e3e05000 mvn r5, #0 1dd0: ea000022 b 1e60 <mknod+0x148>
} result = (*temp_loc.ops->evalformake_h)(
1dd4: e28d4004 add r4, sp, #4 1dd8: e0860000 add r0, r6, r0 1ddc: e1a01004 mov r1, r4 1de0: e28d2018 add r2, sp, #24 1de4: e1a0e00f mov lr, pc 1de8: e12fff13 bx r3
&pathname[i], &temp_loc, &name_start ); if ( result != 0 )
1dec: e3500000 cmp r0, #0
1df0: 1afffff5 bne 1dcc <mknod+0xb4> return -1; if ( !temp_loc.ops->mknod_h ) {
1df4: e59d3010 ldr r3, [sp, #16] 1df8: e593c014 ldr ip, [r3, #20] 1dfc: e35c0000 cmp ip, #0
1e00: 1a000006 bne 1e20 <mknod+0x108> rtems_filesystem_freenode( &temp_loc );
1e04: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 1e08: e3530000 cmp r3, #0 <== NOT EXECUTED 1e0c: 0affffeb beq 1dc0 <mknod+0xa8> <== NOT EXECUTED 1e10: e1a00004 mov r0, r4 <== NOT EXECUTED 1e14: e1a0e00f mov lr, pc <== NOT EXECUTED 1e18: e12fff13 bx r3 <== NOT EXECUTED 1e1c: eaffffe7 b 1dc0 <mknod+0xa8> <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc );
1e20: e1a01005 mov r1, r5 1e24: e1a03008 mov r3, r8 1e28: e58d4000 str r4, [sp] 1e2c: e1a02007 mov r2, r7 1e30: e59d0018 ldr r0, [sp, #24] 1e34: e1a0e00f mov lr, pc 1e38: e12fff1c bx ip
rtems_filesystem_freenode( &temp_loc );
1e3c: e59d3010 ldr r3, [sp, #16] 1e40: 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 );
1e44: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc ); 1e48: 0a000004 beq 1e60 <mknod+0x148>
1e4c: e593301c ldr r3, [r3, #28] 1e50: e3530000 cmp r3, #0 1e54: 11a00004 movne r0, r4 1e58: 11a0e00f movne lr, pc 1e5c: 112fff13 bxne r3
return result; }
1e60: e1a00005 mov r0, r5 1e64: e28dd01c add sp, sp, #28 1e68: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00001e8c <mount>: const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) {
1e8c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr}
/* * Is there a file system operations table? */ if ( fs_ops == NULL ) {
1e90: e2517000 subs r7, r1, #0
const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) {
1e94: e24dd018 sub sp, sp, #24 1e98: e1a06000 mov r6, r0 1e9c: e1a09002 mov r9, r2 1ea0: e1a0b003 mov fp, r3 1ea4: e59da03c ldr sl, [sp, #60] ; 0x3c
/* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1ea8: 0a000001 beq 1eb4 <mount+0x28> /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY &&
1eac: e3520001 cmp r2, #1
1eb0: 9a000002 bls 1ec0 <mount+0x34> options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL;
1eb4: eb002baa bl cd64 <__errno> 1eb8: e3a03016 mov r3, #22 1ebc: ea000014 b 1f14 <mount+0x88>
return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) {
1ec0: e5975024 ldr r5, [r7, #36] ; 0x24 1ec4: e3550000 cmp r5, #0
1ec8: 1a000004 bne 1ee0 <mount+0x54> errno = ENOTSUP;
1ecc: eb002ba4 bl cd64 <__errno> <== NOT EXECUTED 1ed0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1ed4: e5803000 str r3, [r0] <== NOT EXECUTED 1ed8: e1a08005 mov r8, r5 <== NOT EXECUTED
goto cleanup_and_bail;
1edc: ea00006d b 2098 <mount+0x20c> <== NOT EXECUTED
/* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device )
1ee0: e3530000 cmp r3, #0 1ee4: 03a0006c moveq r0, #108 ; 0x6c
1ee8: 0a000002 beq 1ef8 <mount+0x6c> size += strlen( device ) + 1;
1eec: e1a00003 mov r0, r3 <== NOT EXECUTED 1ef0: eb002f8c bl dd28 <strlen> <== NOT EXECUTED 1ef4: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED
temp_mt_entry = malloc( size );
1ef8: ebffff44 bl 1c10 <malloc>
if ( !temp_mt_entry ) {
1efc: e3500000 cmp r0, #0
*/ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size );
1f00: e1a04000 mov r4, r0 1f04: e1a08000 mov r8, r0
if ( !temp_mt_entry ) { 1f08: 1a000003 bne 1f1c <mount+0x90> errno = ENOMEM;
1f0c: eb002b94 bl cd64 <__errno> <== NOT EXECUTED 1f10: e3a0300c mov r3, #12 <== NOT EXECUTED
1f14: e5803000 str r3, [r0] 1f18: ea00006a b 20c8 <mount+0x23c>
return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) {
1f1c: e35b0000 cmp fp, #0
errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options;
1f20: e5809030 str r9, [r0, #48] ; 0x30
if ( !temp_mt_entry ) { errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry;
1f24: e584002c str r0, [r4, #44] ; 0x2c
if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); } else temp_mt_entry->dev = 0;
1f28: 0580b068 streq fp, [r0, #104] ; 0x68
temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev = (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t );
1f2c: 1280306c addne r3, r0, #108 ; 0x6c
strcpy( temp_mt_entry->dev, device );
1f30: 11a00003 movne r0, r3 1f34: 11a0100b movne r1, fp
} temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { temp_mt_entry->dev =
1f38: 15843068 strne r3, [r4, #104] ; 0x68
(char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device );
1f3c: 1b002f3d blne dc38 <strcpy>
/* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) {
1f40: e35a0000 cmp sl, #0
1f44: 0a000035 beq 2020 <mount+0x194> if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
1f48: e1a0000a mov r0, sl 1f4c: eb002f75 bl dd28 <strlen>
* permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path(
1f50: e28d5004 add r5, sp, #4
mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 )
1f54: e1a01000 mov r1, r0
* permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path(
1f58: e3a0c001 mov ip, #1 1f5c: e1a0000a mov r0, sl 1f60: e3a02007 mov r2, #7 1f64: e1a03005 mov r3, r5 1f68: e58dc000 str ip, [sp] 1f6c: ebfffe42 bl 187c <rtems_filesystem_evaluate_path> 1f70: e3700001 cmn r0, #1
1f74: 0a000046 beq 2094 <mount+0x208> /* * Test for node_type_h */ if (!loc.ops->node_type_h) {
1f78: e59d3010 ldr r3, [sp, #16] 1f7c: e5933010 ldr r3, [r3, #16] 1f80: e3530000 cmp r3, #0
1f84: 1a000002 bne 1f94 <mount+0x108> errno = ENOTSUP;
1f88: eb002b75 bl cd64 <__errno> <== NOT EXECUTED 1f8c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1f90: ea000006 b 1fb0 <mount+0x124> <== NOT EXECUTED
/* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) {
1f94: e1a00005 mov r0, r5 1f98: e1a0e00f mov lr, pc 1f9c: e12fff13 bx r3 1fa0: e3500001 cmp r0, #1
1fa4: 0a000003 beq 1fb8 <mount+0x12c> errno = ENOTDIR;
1fa8: eb002b6d bl cd64 <__errno> 1fac: e3a03014 mov r3, #20 1fb0: e5803000 str r3, [r0]
goto cleanup_and_bail;
1fb4: ea000037 b 2098 <mount+0x20c>
/* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
1fb8: e59f2140 ldr r2, [pc, #320] ; 2100 <mount+0x274>
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
1fbc: e59d1004 ldr r1, [sp, #4]
/* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first;
1fc0: e4923004 ldr r3, [r2], #4 1fc4: ea000003 b 1fd8 <mount+0x14c>
!rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) { the_mount_entry = (rtems_filesystem_mount_table_entry_t *) the_node; if ( the_mount_entry->mt_fs_root.node_access == loc->node_access )
1fc8: e593001c ldr r0, [r3, #28] 1fcc: e1500001 cmp r0, r1
1fd0: 0a000003 beq 1fe4 <mount+0x158> * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) {
1fd4: e5933000 ldr r3, [r3]
*/ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null;
1fd8: e1530002 cmp r3, r2
1fdc: 1afffff9 bne 1fc8 <mount+0x13c>
1fe0: ea00003b b 20d4 <mount+0x248>
/* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY;
1fe4: eb002b5e bl cd64 <__errno> 1fe8: e3a03010 mov r3, #16 1fec: ea000001 b 1ff8 <mount+0x16c>
* This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){ errno = ENOTSUP;
1ff0: eb002b5b bl cd64 <__errno> <== NOT EXECUTED 1ff4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
1ff8: e5803000 str r3, [r0] 1ffc: e28d5004 add r5, sp, #4
goto cleanup_and_bail;
2000: ea000024 b 2098 <mount+0x20c>
} if ( loc.ops->mount_h( temp_mt_entry ) ) {
2004: e1a00004 mov r0, r4 2008: e1a0e00f mov lr, pc 200c: e12fff13 bx r3 2010: e3500000 cmp r0, #0 2014: e28d5004 add r5, sp, #4
2018: 0a000008 beq 2040 <mount+0x1b4>
201c: ea00001d b 2098 <mount+0x20c> <== NOT EXECUTED
* This is a mount of the base file system --> The * mt_point_node.node_access will be set to null to indicate that this * is the root of the entire file system. */ temp_mt_entry->mt_fs_root.node_access = NULL;
2020: e584a01c str sl, [r4, #28]
temp_mt_entry->mt_fs_root.handlers = NULL;
2024: e584a024 str sl, [r4, #36] ; 0x24
temp_mt_entry->mt_fs_root.ops = NULL;
2028: e584a028 str sl, [r4, #40] ; 0x28
temp_mt_entry->mt_point_node.node_access = NULL;
202c: e584a008 str sl, [r4, #8]
temp_mt_entry->mt_point_node.handlers = NULL;
2030: e584a010 str sl, [r4, #16]
temp_mt_entry->mt_point_node.ops = NULL;
2034: e584a014 str sl, [r4, #20]
temp_mt_entry->mt_point_node.mt_entry = NULL;
2038: e584a018 str sl, [r4, #24] 203c: e1a0500a mov r5, sl
} if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) {
2040: e1a00004 mov r0, r4 2044: e1a0e00f mov lr, pc 2048: e597f024 ldr pc, [r7, #36] ; 0x24 204c: e2507000 subs r7, r0, #0
2050: 0a000007 beq 2074 <mount+0x1e8> /* try to undo the mount operation */ if ( loc.ops->unmount_h ) {
2054: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 2058: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 205c: e3530000 cmp r3, #0 <== NOT EXECUTED 2060: 0a00000c beq 2098 <mount+0x20c> <== NOT EXECUTED
loc.ops->unmount_h( temp_mt_entry );
2064: e1a00004 mov r0, r4 <== NOT EXECUTED 2068: e1a0e00f mov lr, pc <== NOT EXECUTED 206c: e12fff13 bx r3 <== NOT EXECUTED 2070: ea000008 b 2098 <mount+0x20c> <== 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 );
2074: e59f0084 ldr r0, [pc, #132] ; 2100 <mount+0x274> 2078: e1a01004 mov r1, r4 207c: eb000cc7 bl 53a0 <_Chain_Append>
*/ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry )
2080: e3560000 cmp r6, #0 2084: 01a00006 moveq r0, r6
*mt_entry = temp_mt_entry;
2088: 15864000 strne r4, [r6] 208c: 11a00007 movne r0, r7 2090: ea00000d b 20cc <mount+0x240>
2094: e3a05000 mov r5, #0 <== NOT EXECUTED
return 0; cleanup_and_bail: free( temp_mt_entry );
2098: e1a00008 mov r0, r8 209c: ebfffe29 bl 1948 <free>
if ( loc_to_free )
20a0: e3550000 cmp r5, #0
20a4: 0a000007 beq 20c8 <mount+0x23c> rtems_filesystem_freenode( loc_to_free );
20a8: e595300c ldr r3, [r5, #12] 20ac: e3530000 cmp r3, #0
20b0: 0a000004 beq 20c8 <mount+0x23c>
20b4: e593301c ldr r3, [r3, #28] 20b8: e3530000 cmp r3, #0 20bc: 11a00005 movne r0, r5 20c0: 11a0e00f movne lr, pc 20c4: 112fff13 bxne r3 20c8: e3e00000 mvn r0, #0
return -1; }
20cc: e28dd018 add sp, sp, #24 20d0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
* traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops;
20d4: e59d2010 ldr r2, [sp, #16]
* 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. */ temp_mt_entry->mt_point_node.node_access = loc.node_access;
20d8: e5841008 str r1, [r4, #8]
temp_mt_entry->mt_point_node.handlers = loc.handlers;
20dc: e59d100c ldr r1, [sp, #12]
/* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( !loc.ops->mount_h ){
20e0: e5923020 ldr r3, [r2, #32]
* until the system is unmounted. It may be needed to correctly * traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers;
20e4: e5841010 str r1, [r4, #16]
temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
20e8: e59d1014 ldr r1, [sp, #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 ){
20ec: e3530000 cmp r3, #0
*/ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops; temp_mt_entry->mt_point_node.mt_entry = loc.mt_entry;
20f0: e5841018 str r1, [r4, #24]
* traverse the tree. */ temp_mt_entry->mt_point_node.node_access = loc.node_access; temp_mt_entry->mt_point_node.handlers = loc.handlers; temp_mt_entry->mt_point_node.ops = loc.ops;
20f4: 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 ){ 20f8: 1affffc1 bne 2004 <mount+0x178>
20fc: eaffffbb b 1ff0 <mount+0x164> <== NOT EXECUTED
00002174 <newlib_free_buffers>: */ int newlib_free_buffers( FILE *fp ) {
2174: e92d4010 push {r4, lr} 2178: e1a04000 mov r4, r0
switch ( fileno(fp) ) {
217c: eb002bf7 bl d160 <fileno> 2180: e3500002 cmp r0, #2
2184: 8a00000b bhi 21b8 <newlib_free_buffers+0x44> case 0: case 1: case 2: if (fp->_flags & __SMBF) {
2188: e1d430bc ldrh r3, [r4, #12] 218c: e3130080 tst r3, #128 ; 0x80
2190: 0a00000a beq 21c0 <newlib_free_buffers+0x4c> free( fp->_bf._base );
2194: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2198: ebfffdea bl 1948 <free> <== NOT EXECUTED
fp->_flags &= ~__SMBF;
219c: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
21a0: e3a03000 mov r3, #0 <== NOT EXECUTED
case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF;
21a4: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
21a8: e5843010 str r3, [r4, #16] <== NOT EXECUTED
case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF;
21ac: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED
fp->_bf._base = fp->_p = (unsigned char *) NULL;
21b0: e5843000 str r3, [r4] <== NOT EXECUTED 21b4: ea000001 b 21c0 <newlib_free_buffers+0x4c> <== NOT EXECUTED
} break; default: fclose(fp);
21b8: e1a00004 mov r0, r4 <== NOT EXECUTED 21bc: eb002b35 bl ce98 <fclose> <== NOT EXECUTED
} return 0; }
21c0: e3a00000 mov r0, #0 21c4: e8bd8010 pop {r4, pc}
000023e8 <open>: int open( const char *pathname, int flags, ... ) {
23e8: e92d000e push {r1, r2, r3} 23ec: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 23f0: e24dd01c sub sp, sp, #28 23f4: e59d503c ldr r5, [sp, #60] ; 0x3c
/* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1;
23f8: e2853001 add r3, r5, #1
if ( ( status & _FREAD ) == _FREAD )
23fc: e2138001 ands r8, r3, #1 2400: 13a08004 movne r8, #4
eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE )
2404: e3130002 tst r3, #2
eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int );
2408: 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;
240c: 13888002 orrne r8, r8, #2
int open( const char *pathname, int flags, ... ) {
2410: e1a06000 mov r6, r0
eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int );
2414: e58d3018 str r3, [sp, #24] 2418: 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();
241c: eb001bd2 bl 936c <rtems_libio_allocate>
if ( iop == 0 ) {
2420: e2504000 subs r4, r0, #0 2424: 03a05017 moveq r5, #23
2428: 0a000077 beq 260c <open+0x224> /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true );
242c: e1a00006 mov r0, r6 2430: eb002e3c bl dd28 <strlen>
/* * See if the file exists. */ status = rtems_filesystem_evaluate_path(
2434: e28d7004 add r7, sp, #4
pathname, strlen( pathname ), eval_flags, &loc, true );
2438: e1a01000 mov r1, r0
/* * See if the file exists. */ status = rtems_filesystem_evaluate_path(
243c: e1a02008 mov r2, r8 2440: e1a00006 mov r0, r6 2444: e3a08001 mov r8, #1 2448: e1a03007 mov r3, r7 244c: e58d8000 str r8, [sp] 2450: ebfffd09 bl 187c <rtems_filesystem_evaluate_path>
pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) {
2454: e3700001 cmn r0, #1
2458: 1a00001f bne 24dc <open+0xf4> if ( errno != ENOENT ) {
245c: eb002a40 bl cd64 <__errno> 2460: e5903000 ldr r3, [r0] 2464: e3530002 cmp r3, #2
2468: 1a00000a bne 2498 <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) ) {
246c: e215ac02 ands sl, r5, #512 ; 0x200 2470: 01a0700a moveq r7, sl 2474: 01a05003 moveq r5, r3
2478: 0a000056 beq 25d8 <open+0x1f0> rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL );
247c: e1a00006 mov r0, r6 2480: e3891902 orr r1, r9, #32768 ; 0x8000 2484: e3a02000 mov r2, #0 2488: e3a03000 mov r3, #0 248c: ebfffe21 bl 1d18 <mknod>
if ( rc ) {
2490: e250a000 subs sl, r0, #0
2494: 0a000003 beq 24a8 <open+0xc0> rc = errno;
2498: eb002a31 bl cd64 <__errno> 249c: e3a07000 mov r7, #0 24a0: e5905000 ldr r5, [r0]
goto done;
24a4: ea000049 b 25d0 <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 );
24a8: e1a00006 mov r0, r6 24ac: eb002e1d bl dd28 <strlen> 24b0: e1a03007 mov r3, r7 24b4: e1a01000 mov r1, r0 24b8: e1a0200a mov r2, sl 24bc: e1a00006 mov r0, r6 24c0: e58d8000 str r8, [sp] 24c4: ebfffcec bl 187c <rtems_filesystem_evaluate_path>
if ( status != 0 ) { /* The file did not exist */
24c8: e3500000 cmp r0, #0 24cc: 11a0700a movne r7, sl 24d0: 13a0500d movne r5, #13
24d4: 1a00003f bne 25d8 <open+0x1f0>
24d8: ea000003 b 24ec <open+0x104>
rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) {
24dc: e2053c0a and r3, r5, #2560 ; 0xa00 24e0: e3530c0a cmp r3, #2560 ; 0xa00 24e4: 03a05011 moveq r5, #17
24e8: 0a00003a beq 25d8 <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;
24ec: e28d701c add r7, sp, #28 24f0: e5373018 ldr r3, [r7, #-24]! 24f4: 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;
24f8: e59d300c ldr r3, [sp, #12]
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
24fc: e1a00005 mov r0, r5
/* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers;
2500: e584303c str r3, [r4, #60] ; 0x3c
iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags );
2504: e5948014 ldr r8, [r4, #20] 2508: eb001bc4 bl 9420 <rtems_libio_fcntl_flags> 250c: e180e008 orr lr, r0, r8
iop->pathinfo = loc;
2510: e8b7000f ldm r7!, {r0, r1, r2, r3} 2514: e284c018 add ip, r4, #24 2518: e8ac000f stmia ip!, {r0, r1, r2, r3}
if ( !iop->handlers || !iop->handlers->open_h ) {
251c: 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;
2520: e5972000 ldr r2, [r7]
if ( !iop->handlers || !iop->handlers->open_h ) {
2524: e3530000 cmp r3, #0
*/ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc;
2528: 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 );
252c: e584e014 str lr, [r4, #20]
iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 2530: 0a000041 beq 263c <open+0x254>
2534: e593c000 ldr ip, [r3] 2538: e35c0000 cmp ip, #0
253c: 0a00003e beq 263c <open+0x254> rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode );
2540: e1a01006 mov r1, r6 2544: e1a03009 mov r3, r9 2548: e1a00004 mov r0, r4 254c: e1a02005 mov r2, r5 2550: e1a0e00f mov lr, pc 2554: e12fff1c bx ip
if ( rc ) {
2558: e3500000 cmp r0, #0
255c: 0a000003 beq 2570 <open+0x188> rc = errno;
2560: eb0029ff bl cd64 <__errno> 2564: e28d7004 add r7, sp, #4 2568: e5905000 ldr r5, [r0]
goto done;
256c: ea000017 b 25d0 <open+0x1e8>
/* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) {
2570: e3150b01 tst r5, #1024 ; 0x400
2574: 0a000028 beq 261c <open+0x234> rc = ftruncate( iop - rtems_libio_iops, 0 );
2578: e59f30c8 ldr r3, [pc, #200] ; 2648 <open+0x260> 257c: e5930000 ldr r0, [r3] 2580: e0600004 rsb r0, r0, r4 2584: e1a00340 asr r0, r0, #6 2588: e3a01000 mov r1, #0 258c: e3a02000 mov r2, #0 2590: eb001aae bl 9050 <ftruncate>
if ( rc ) {
2594: e2505000 subs r5, r0, #0
2598: 0a00001f beq 261c <open+0x234> if(errno) rc = errno;
259c: eb0029f0 bl cd64 <__errno> <== NOT EXECUTED 25a0: e5903000 ldr r3, [r0] <== NOT EXECUTED 25a4: e3530000 cmp r3, #0 <== NOT EXECUTED 25a8: 0a000001 beq 25b4 <open+0x1cc> <== NOT EXECUTED 25ac: eb0029ec bl cd64 <__errno> <== NOT EXECUTED 25b0: e5905000 ldr r5, [r0] <== NOT EXECUTED
close( iop - rtems_libio_iops );
25b4: e59f308c ldr r3, [pc, #140] ; 2648 <open+0x260> <== NOT EXECUTED 25b8: e5933000 ldr r3, [r3] <== NOT EXECUTED 25bc: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 25c0: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 25c4: eb001a78 bl 8fac <close> <== NOT EXECUTED 25c8: e3a04000 mov r4, #0 <== NOT EXECUTED 25cc: e1a07004 mov r7, r4 <== NOT EXECUTED
*/ done: va_end(ap); if ( rc ) {
25d0: e3550000 cmp r5, #0
25d4: 0a000010 beq 261c <open+0x234> if ( iop )
25d8: e3540000 cmp r4, #0
rtems_libio_free( iop );
25dc: 11a00004 movne r0, r4 25e0: 1b001b4a blne 9310 <rtems_libio_free>
if ( loc_to_free )
25e4: e3570000 cmp r7, #0
25e8: 0a000007 beq 260c <open+0x224> rtems_filesystem_freenode( loc_to_free );
25ec: e597300c ldr r3, [r7, #12] 25f0: e3530000 cmp r3, #0
25f4: 0a000004 beq 260c <open+0x224>
25f8: e593301c ldr r3, [r3, #28] 25fc: e3530000 cmp r3, #0 2600: 11a00007 movne r0, r7 2604: 11a0e00f movne lr, pc 2608: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( rc );
260c: eb0029d4 bl cd64 <__errno> 2610: e5805000 str r5, [r0] 2614: e3e00000 mvn r0, #0 2618: ea000003 b 262c <open+0x244>
} return iop - rtems_libio_iops;
261c: e59f3024 ldr r3, [pc, #36] ; 2648 <open+0x260> 2620: e5930000 ldr r0, [r3] 2624: e0604004 rsb r4, r0, r4 2628: e1a00344 asr r0, r4, #6
}
262c: e28dd01c add sp, sp, #28 2630: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 2634: e28dd00c add sp, sp, #12 2638: 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;
263c: e28d7004 add r7, sp, #4 <== NOT EXECUTED 2640: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 2644: eaffffe3 b 25d8 <open+0x1f0> <== NOT EXECUTED
00002384 <open_dev_console>: int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) {
2384: e3a01000 mov r1, #0
/* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) {
2388: 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) {
238c: e59f0048 ldr r0, [pc, #72] ; 23dc <open_dev_console+0x58> 2390: e1a02001 mov r2, r1 2394: eb000013 bl 23e8 <open> 2398: e3700001 cmn r0, #1 239c: 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)
23a0: e59f0034 ldr r0, [pc, #52] ; 23dc <open_dev_console+0x58> 23a4: e3a01001 mov r1, #1 23a8: e3a02000 mov r2, #0 23ac: eb00000d bl 23e8 <open> 23b0: e3700001 cmn r0, #1
rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */
23b4: 059f0024 ldreq r0, [pc, #36] ; 23e0 <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) 23b8: 0a000006 beq 23d8 <open_dev_console+0x54> rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1)
23bc: e59f0018 ldr r0, [pc, #24] ; 23dc <open_dev_console+0x58> 23c0: e3a01001 mov r1, #1 23c4: e3a02000 mov r2, #0 23c8: eb000006 bl 23e8 <open> 23cc: e3700001 cmn r0, #1 23d0: 149df004 popne {pc} ; (ldrne pc, [sp], #4)
rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */
23d4: e59f0008 ldr r0, [pc, #8] ; 23e4 <open_dev_console+0x60> <== NOT EXECUTED 23d8: eb000b36 bl 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
00002d10 <oproc>: /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
2d10: e92d4011 push {r0, r4, lr}
int i; if (tty->termios.c_oflag & OPOST) {
2d14: e5913034 ldr r3, [r1, #52] ; 0x34 2d18: e3130001 tst r3, #1
/* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) {
2d1c: e1a04001 mov r4, r1 2d20: e5cd0000 strb r0, [sp]
int i; if (tty->termios.c_oflag & OPOST) { 2d24: 0a000047 beq 2e48 <oproc+0x138> switch (c) {
2d28: e5dd2000 ldrb r2, [sp] 2d2c: e2421008 sub r1, r2, #8 2d30: e3510005 cmp r1, #5 2d34: 979ff101 ldrls pc, [pc, r1, lsl #2] 2d38: ea00002e b 2df8 <oproc+0xe8>
2d3c: 00002de4 .word 0x00002de4 <== NOT EXECUTED 2d40: 00002db8 .word 0x00002db8 <== NOT EXECUTED 2d44: 00002d54 .word 0x00002d54 <== NOT EXECUTED 2d48: 00002df8 .word 0x00002df8 <== NOT EXECUTED 2d4c: 00002df8 .word 0x00002df8 <== NOT EXECUTED 2d50: 00002d80 .word 0x00002d80 <== NOT EXECUTED
case '\n': if (tty->termios.c_oflag & ONLRET)
2d54: e3130020 tst r3, #32
tty->column = 0;
2d58: 13a03000 movne r3, #0 2d5c: 15843028 strne r3, [r4, #40] ; 0x28
if (tty->termios.c_oflag & ONLCR) {
2d60: e5943034 ldr r3, [r4, #52] ; 0x34 2d64: e3130004 tst r3, #4
2d68: 0a000036 beq 2e48 <oproc+0x138> rtems_termios_puts ("\r", 1, tty);
2d6c: e59f00e8 ldr r0, [pc, #232] ; 2e5c <oproc+0x14c> 2d70: e3a01001 mov r1, #1 2d74: e1a02004 mov r2, r4 2d78: ebffffa0 bl 2c00 <rtems_termios_puts> 2d7c: ea00000b b 2db0 <oproc+0xa0>
tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0))
2d80: e3130010 tst r3, #16 <== NOT EXECUTED 2d84: 0a000002 beq 2d94 <oproc+0x84> <== NOT EXECUTED 2d88: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 2d8c: e3520000 cmp r2, #0 <== NOT EXECUTED 2d90: 0a000030 beq 2e58 <oproc+0x148> <== NOT EXECUTED
return; if (tty->termios.c_oflag & OCRNL) {
2d94: e2132008 ands r2, r3, #8 <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0;
2d98: 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) {
2d9c: 0a000029 beq 2e48 <oproc+0x138> <== NOT EXECUTED
c = '\n'; if (tty->termios.c_oflag & ONLRET)
2da0: 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';
2da4: e3a0300a mov r3, #10 <== NOT EXECUTED 2da8: e5cd3000 strb r3, [sp] <== NOT EXECUTED
if (tty->termios.c_oflag & ONLRET)
2dac: 0a000025 beq 2e48 <oproc+0x138> <== NOT EXECUTED
tty->column = 0;
2db0: e3a03000 mov r3, #0 2db4: ea000022 b 2e44 <oproc+0x134>
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
2db8: e5942028 ldr r2, [r4, #40] ; 0x28
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2dbc: e2033b06 and r3, r3, #6144 ; 0x1800
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
2dc0: e2021007 and r1, r2, #7
if ((tty->termios.c_oflag & TABDLY) == XTABS) {
2dc4: e3530b06 cmp r3, #6144 ; 0x1800
} tty->column = 0; break; case '\t': i = 8 - (tty->column & 7);
2dc8: e2611008 rsb r1, r1, #8 2dcc: e0813002 add r3, r1, r2
if ((tty->termios.c_oflag & TABDLY) == XTABS) { 2dd0: 1a00001b bne 2e44 <oproc+0x134> tty->column += i;
2dd4: e5843028 str r3, [r4, #40] ; 0x28
rtems_termios_puts ( " ", i, tty);
2dd8: e1a02004 mov r2, r4 2ddc: e59f007c ldr r0, [pc, #124] ; 2e60 <oproc+0x150> 2de0: ea00001b b 2e54 <oproc+0x144>
} tty->column += i; break; case '\b': if (tty->column > 0)
2de4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2de8: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->column--;
2dec: c2433001 subgt r3, r3, #1 <== NOT EXECUTED
} tty->column += i; break; case '\b': if (tty->column > 0)
2df0: ca000013 bgt 2e44 <oproc+0x134> <== NOT EXECUTED 2df4: ea000013 b 2e48 <oproc+0x138> <== NOT EXECUTED
tty->column--; break; default: if (tty->termios.c_oflag & OLCUC)
2df8: e3130002 tst r3, #2
2dfc: 0a000007 beq 2e20 <oproc+0x110> c = toupper(c);
2e00: e59f305c ldr r3, [pc, #92] ; 2e64 <oproc+0x154> <== NOT EXECUTED 2e04: e5933000 ldr r3, [r3] <== NOT EXECUTED 2e08: e0833002 add r3, r3, r2 <== NOT EXECUTED 2e0c: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 2e10: e2033003 and r3, r3, #3 <== NOT EXECUTED 2e14: e3530002 cmp r3, #2 <== NOT EXECUTED 2e18: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 2e1c: e5cd2000 strb r2, [sp] <== NOT EXECUTED
if (!iscntrl(c))
2e20: e59f303c ldr r3, [pc, #60] ; 2e64 <oproc+0x154> 2e24: e5932000 ldr r2, [r3] 2e28: e5dd3000 ldrb r3, [sp] 2e2c: e0823003 add r3, r2, r3 2e30: e5d33001 ldrb r3, [r3, #1] 2e34: e3130020 tst r3, #32
2e38: 1a000002 bne 2e48 <oproc+0x138> tty->column++;
2e3c: e5943028 ldr r3, [r4, #40] ; 0x28 2e40: e2833001 add r3, r3, #1 2e44: e5843028 str r3, [r4, #40] ; 0x28
break; } } rtems_termios_puts (&c, 1, tty);
2e48: e1a02004 mov r2, r4 2e4c: e1a0000d mov r0, sp 2e50: e3a01001 mov r1, #1 2e54: ebffff69 bl 2c00 <rtems_termios_puts>
}
2e58: e8bd8018 pop {r3, r4, pc}
0000c344 <pipe_create>: * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
c344: e92d4070 push {r4, r5, r6, lr} c348: 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)
c34c: e28d5004 add r5, sp, #4 c350: e3a0c001 mov ip, #1
* Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) {
c354: 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)
c358: e3a01003 mov r1, #3 c35c: e59f0140 ldr r0, [pc, #320] ; c4a4 <pipe_create+0x160> c360: e3a02007 mov r2, #7 c364: e1a03005 mov r3, r5 c368: e58dc000 str ip, [sp] c36c: ebffd542 bl 187c <rtems_filesystem_evaluate_path> c370: e3500000 cmp r0, #0
c374: 0a000009 beq c3a0 <pipe_create+0x5c> != 0) { if (errno != ENOENT)
c378: eb000279 bl cd64 <__errno> c37c: e5903000 ldr r3, [r0] c380: e3530002 cmp r3, #2
c384: 1a000043 bne c498 <pipe_create+0x154> return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0)
c388: e59f0114 ldr r0, [pc, #276] ; c4a4 <pipe_create+0x160> c38c: e59f1114 ldr r1, [pc, #276] ; c4a8 <pipe_create+0x164> c390: ebffd65c bl 1d08 <mkdir> c394: e3500000 cmp r0, #0
c398: 0a000008 beq c3c0 <pipe_create+0x7c>
c39c: ea00003d b c498 <pipe_create+0x154> <== NOT EXECUTED
return -1; } else rtems_filesystem_freenode(&loc);
c3a0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED c3a4: e3530000 cmp r3, #0 <== NOT EXECUTED c3a8: 0a000004 beq c3c0 <pipe_create+0x7c> <== NOT EXECUTED c3ac: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c3b0: e3530000 cmp r3, #0 <== NOT EXECUTED c3b4: 11a00005 movne r0, r5 <== NOT EXECUTED c3b8: 11a0e00f movne lr, pc <== NOT EXECUTED c3bc: 112fff13 bxne r3 <== NOT EXECUTED
/* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10);
c3c0: e28d5018 add r5, sp, #24 c3c4: e59f10e0 ldr r1, [pc, #224] ; c4ac <pipe_create+0x168> c3c8: e3a0200a mov r2, #10 c3cc: e1a00005 mov r0, r5 c3d0: eb000471 bl d59c <memcpy>
sprintf(fifopath + 10, "%04x", rtems_pipe_no ++);
c3d4: e59f30d4 ldr r3, [pc, #212] ; c4b0 <pipe_create+0x16c> c3d8: e1d3c0b0 ldrh ip, [r3] c3dc: e1a0200c mov r2, ip c3e0: e28cc001 add ip, ip, #1 c3e4: e59f10c8 ldr r1, [pc, #200] ; c4b4 <pipe_create+0x170> c3e8: e1c3c0b0 strh ip, [r3] c3ec: e285000a add r0, r5, #10 c3f0: eb00050f bl d834 <sprintf>
/* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) {
c3f4: e1a00005 mov r0, r5 c3f8: e3a01d06 mov r1, #384 ; 0x180 c3fc: eb00003f bl c500 <mkfifo> c400: e2506000 subs r6, r0, #0
c404: 0a000001 beq c410 <pipe_create+0xcc> if (errno != EEXIST){
c408: eb000255 bl cd64 <__errno> <== NOT EXECUTED c40c: ea000021 b c498 <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);
c410: e1a00005 mov r0, r5 c414: e3a01901 mov r1, #16384 ; 0x4000 c418: ebffd7f2 bl 23e8 <open>
if (filsdes[0] < 0) {
c41c: 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);
c420: e5840000 str r0, [r4]
if (filsdes[0] < 0) { c424: aa000003 bge c438 <pipe_create+0xf4> err = errno;
c428: eb00024d bl cd64 <__errno> c42c: 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);
c430: e1a00005 mov r0, r5 c434: ea000014 b c48c <pipe_create+0x148>
} else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]);
c438: e59f3078 ldr r3, [pc, #120] ; c4b8 <pipe_create+0x174> <== NOT EXECUTED c43c: e5933000 ldr r3, [r3] <== NOT EXECUTED c440: e1500003 cmp r0, r3 <== NOT EXECUTED c444: 359f3070 ldrcc r3, [pc, #112] ; c4bc <pipe_create+0x178> <== NOT EXECUTED c448: 35936000 ldrcc r6, [r3] <== NOT EXECUTED c44c: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED
iop->flags &= ~LIBIO_FLAGS_NO_DELAY;
c450: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED c454: e3c33001 bic r3, r3, #1 <== NOT EXECUTED c458: e5863014 str r3, [r6, #20] <== NOT EXECUTED
filsdes[1] = open(fifopath, O_WRONLY);
c45c: e28d0018 add r0, sp, #24 <== NOT EXECUTED c460: e3a01001 mov r1, #1 <== NOT EXECUTED c464: ebffd7df bl 23e8 <open> <== NOT EXECUTED
if (filsdes[1] < 0) {
c468: 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);
c46c: e5840004 str r0, [r4, #4] <== NOT EXECUTED
if (filsdes[1] < 0) {
c470: a3a06000 movge r6, #0 <== NOT EXECUTED c474: aa000003 bge c488 <pipe_create+0x144> <== NOT EXECUTED
err = errno;
c478: eb000239 bl cd64 <__errno> <== NOT EXECUTED c47c: e5906000 ldr r6, [r0] <== NOT EXECUTED
close(filsdes[0]);
c480: e5940000 ldr r0, [r4] <== NOT EXECUTED c484: ebfff2c8 bl 8fac <close> <== NOT EXECUTED
} unlink(fifopath);
c488: e28d0018 add r0, sp, #24 <== NOT EXECUTED
c48c: eb00001f bl c510 <unlink>
} rtems_set_errno_and_return_minus_one(err);
c490: eb000233 bl cd64 <__errno> c494: e5806000 str r6, [r0]
}
c498: e3e00000 mvn r0, #0 c49c: e28dd028 add sp, sp, #40 ; 0x28 c4a0: e8bd8070 pop {r4, r5, r6, pc}
0000b0f8 <pipe_free>: /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) {
b0f8: e92d4010 push {r4, lr} <== NOT EXECUTED b0fc: e1a04000 mov r4, r0 <== NOT EXECUTED
rtems_barrier_delete(pipe->readBarrier);
b100: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED b104: eb0002fa bl bcf4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_barrier_delete(pipe->writeBarrier);
b108: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b10c: eb0002f8 bl bcf4 <rtems_barrier_delete> <== NOT EXECUTED
rtems_semaphore_delete(pipe->Semaphore);
b110: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b114: ebffe62c bl 49cc <rtems_semaphore_delete> <== NOT EXECUTED
free(pipe->Buffer);
b118: e5940000 ldr r0, [r4] <== NOT EXECUTED b11c: ebffda09 bl 1948 <free> <== NOT EXECUTED
free(pipe);
b120: e1a00004 mov r0, r4 <== NOT EXECUTED
}
b124: 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);
b128: eaffda06 b 1948 <free> <== NOT EXECUTED
0000ad84 <pipe_ioctl>: uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) {
ad84: e59f3054 ldr r3, [pc, #84] ; ade0 <pipe_ioctl+0x5c> <== NOT EXECUTED ad88: e1510003 cmp r1, r3 <== NOT EXECUTED
pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) {
ad8c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED ad90: e1a04000 mov r4, r0 <== NOT EXECUTED ad94: e1a05002 mov r5, r2 <== NOT EXECUTED
if (cmd == FIONREAD) {
ad98: 13e00015 mvnne r0, #21 <== NOT EXECUTED ad9c: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
if (buffer == NULL)
ada0: e3520000 cmp r2, #0 <== NOT EXECUTED ada4: 03e0000d mvneq r0, #13 <== NOT EXECUTED ada8: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED
return -EFAULT; if (! PIPE_LOCK(pipe))
adac: e3a01000 mov r1, #0 <== NOT EXECUTED adb0: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED adb4: e1a02001 mov r2, r1 <== NOT EXECUTED adb8: ebffe72a bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED adbc: e2506000 subs r6, r0, #0 <== NOT EXECUTED adc0: 13e00003 mvnne r0, #3 <== NOT EXECUTED adc4: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED
return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
adc8: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
adcc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length;
add0: e5853000 str r3, [r5] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
add4: ebffe769 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED add8: e1a00006 mov r0, r6 <== NOT EXECUTED
return 0; } return -EINVAL; }
addc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000ad1c <pipe_lseek>: rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; }
ad1c: e3e0001c mvn r0, #28 <== NOT EXECUTED ad20: e12fff1e bx lr <== NOT EXECUTED
0000ade4 <pipe_read>: pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
ade4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED ade8: e1a09001 mov r9, r1 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
adec: e3a01000 mov r1, #0 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
adf0: e1a04000 mov r4, r0 <== NOT EXECUTED adf4: e1a05002 mov r5, r2 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
adf8: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED adfc: e1a02001 mov r2, r1 <== NOT EXECUTED
pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) {
ae00: e1a0a003 mov sl, r3 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
ae04: ebffe717 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED ae08: e2506000 subs r6, r0, #0 <== NOT EXECUTED ae0c: 13e06003 mvnne r6, #3 <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe);
ae10: 01a0b00d moveq fp, sp <== NOT EXECUTED
rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe))
ae14: 0a000045 beq af30 <pipe_read+0x14c> <== NOT EXECUTED ae18: ea00004b b af4c <pipe_read+0x168> <== NOT EXECUTED
return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0)
ae1c: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED ae20: e3530000 cmp r3, #0 <== NOT EXECUTED ae24: 0a000043 beq af38 <pipe_read+0x154> <== NOT EXECUTED
goto out_locked; if (LIBIO_NODELAY(iop)) {
ae28: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED ae2c: e2177001 ands r7, r7, #1 <== NOT EXECUTED ae30: 13e0700a mvnne r7, #10 <== NOT EXECUTED ae34: 1a000040 bne af3c <pipe_read+0x158> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++;
ae38: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED ae3c: e2833001 add r3, r3, #1 <== NOT EXECUTED ae40: e5843018 str r3, [r4, #24] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
ae44: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ae48: ebffe74c bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_READWAIT(pipe))
ae4c: e1a01007 mov r1, r7 <== NOT EXECUTED ae50: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED ae54: eb0003d4 bl bdac <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
ae58: e1a01007 mov r1, r7 <== NOT EXECUTED ae5c: 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))
ae60: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
ae64: 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))
ae68: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
ae6c: ebffe6fd bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED ae70: e3500000 cmp r0, #0 <== NOT EXECUTED ae74: 13e07003 mvnne r7, #3 <== NOT EXECUTED ae78: 1a000031 bne af44 <pipe_read+0x160> <== NOT EXECUTED
/* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
ae7c: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
ae80: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --;
ae84: e2433001 sub r3, r3, #1 <== NOT EXECUTED ae88: e5843018 str r3, [r4, #24] <== NOT EXECUTED
if (ret != 0)
ae8c: 1a00002a bne af3c <pipe_read+0x158> <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) {
ae90: e594200c ldr r2, [r4, #12] <== NOT EXECUTED ae94: e3520000 cmp r2, #0 <== NOT EXECUTED ae98: 0affffdf beq ae1c <pipe_read+0x38> <== NOT EXECUTED
goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start;
ae9c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED aea0: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED
if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length);
aea4: e0667005 rsb r7, r6, r5 <== NOT EXECUTED aea8: e1520007 cmp r2, r7 <== NOT EXECUTED aeac: 31a07002 movcc r7, r2 <== NOT EXECUTED
chunk1 = pipe->Size - pipe->Start;
aeb0: e0638008 rsb r8, r3, r8 <== NOT EXECUTED aeb4: e5941000 ldr r1, [r4] <== NOT EXECUTED
if (chunk > chunk1) {
aeb8: e1570008 cmp r7, r8 <== NOT EXECUTED aebc: 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);
aec0: d0811003 addle r1, r1, r3 <== NOT EXECUTED aec4: d1a02007 movle r2, r7 <== NOT EXECUTED
} /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) {
aec8: da000006 ble aee8 <pipe_read+0x104> <== NOT EXECUTED
memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1);
aecc: e0811003 add r1, r1, r3 <== NOT EXECUTED aed0: e1a02008 mov r2, r8 <== NOT EXECUTED aed4: eb0009b0 bl d59c <memcpy> <== NOT EXECUTED
memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1);
aed8: e0860008 add r0, r6, r8 <== NOT EXECUTED aedc: e5941000 ldr r1, [r4] <== NOT EXECUTED aee0: e0890000 add r0, r9, r0 <== NOT EXECUTED aee4: e0682007 rsb r2, r8, r7 <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk);
aee8: eb0009ab bl d59c <memcpy> <== NOT EXECUTED
pipe->Start += chunk;
aeec: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED aef0: e0870000 add r0, r7, r0 <== NOT EXECUTED aef4: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Start %= pipe->Size;
aef8: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED aefc: eb002daf bl 165c0 <__umodsi3> <== NOT EXECUTED
pipe->Length -= chunk;
af00: e594300c ldr r3, [r4, #12] <== NOT EXECUTED af04: e0673003 rsb r3, r7, r3 <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe))
af08: e3530000 cmp r3, #0 <== NOT EXECUTED
} else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size;
af0c: e5840008 str r0, [r4, #8] <== NOT EXECUTED
pipe->Length -= chunk;
af10: e584300c str r3, [r4, #12] <== NOT EXECUTED
/* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0;
af14: 05843008 streq r3, [r4, #8] <== NOT EXECUTED
if (pipe->waitingWriters > 0)
af18: e594301c ldr r3, [r4, #28] <== NOT EXECUTED af1c: e3530000 cmp r3, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe);
af20: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED af24: 11a0100d movne r1, sp <== NOT EXECUTED af28: 1b000389 blne bd54 <rtems_barrier_release> <== NOT EXECUTED
read += chunk;
af2c: e0866007 add r6, r6, r7 <== NOT EXECUTED
int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) {
af30: e1560005 cmp r6, r5 <== NOT EXECUTED af34: 3affffd5 bcc ae90 <pipe_read+0xac> <== NOT EXECUTED af38: e3a07000 mov r7, #0 <== NOT EXECUTED
PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe);
af3c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED af40: ebffe70e bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock: if (read > 0)
af44: e3560000 cmp r6, #0 <== NOT EXECUTED af48: d1a06007 movle r6, r7 <== NOT EXECUTED
return read; return ret; }
af4c: e1a00006 mov r0, r6 <== NOT EXECUTED af50: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
0000b12c <pipe_release>: */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
b12c: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED
pipe_control_t *pipe = *pipep;
b130: e5904000 ldr r4, [r0] <== NOT EXECUTED
*/ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
b134: e1a05001 mov r5, r1 <== NOT EXECUTED
pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore,
b138: e3a01000 mov r1, #0 <== NOT EXECUTED
*/ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) {
b13c: e1a06000 mov r6, r0 <== NOT EXECUTED
pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore,
b140: e1a02001 mov r2, r1 <== NOT EXECUTED b144: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b148: ebffe646 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL)
b14c: e3500000 cmp r0, #0 <== NOT EXECUTED b150: 1a000010 bne b198 <pipe_release+0x6c> <== NOT EXECUTED
rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop);
b154: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ)
b158: e3150002 tst r5, #2 <== NOT EXECUTED
pipe->Readers --;
b15c: 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);
b160: e2055006 and r5, r5, #6 <== NOT EXECUTED
if (mode & LIBIO_FLAGS_READ) pipe->Readers --;
b164: 12433001 subne r3, r3, #1 <== NOT EXECUTED b168: 15843010 strne r3, [r4, #16] <== NOT EXECUTED
if (mode & LIBIO_FLAGS_WRITE)
b16c: e3150004 tst r5, #4 <== NOT EXECUTED
pipe->Writers --;
b170: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED b174: 12433001 subne r3, r3, #1 <== NOT EXECUTED b178: 15843014 strne r3, [r4, #20] <== NOT EXECUTED
sc = rtems_semaphore_obtain(rtems_pipe_semaphore,
b17c: e59f30a0 ldr r3, [pc, #160] ; b224 <pipe_release+0xf8> <== NOT EXECUTED b180: e3a01000 mov r1, #0 <== NOT EXECUTED b184: e5930000 ldr r0, [r3] <== NOT EXECUTED b188: e1a02001 mov r2, r1 <== NOT EXECUTED b18c: ebffe635 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL)
b190: e3500000 cmp r0, #0 <== NOT EXECUTED b194: 0a000000 beq b19c <pipe_release+0x70> <== NOT EXECUTED
rtems_fatal_error_occurred(sc);
b198: ebffe7c6 bl 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
PIPE_UNLOCK(pipe);
b19c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b1a0: ebffe676 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (pipe->Readers == 0 && pipe->Writers == 0) {
b1a4: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b1a8: e3530000 cmp r3, #0 <== NOT EXECUTED b1ac: 1a000006 bne b1cc <pipe_release+0xa0> <== NOT EXECUTED b1b0: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED b1b4: e3570000 cmp r7, #0 <== NOT EXECUTED b1b8: 1a000003 bne b1cc <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);
b1bc: e1a00004 mov r0, r4 <== NOT EXECUTED b1c0: ebffffcc bl b0f8 <pipe_free> <== NOT EXECUTED
*pipep = NULL;
b1c4: 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) {
b1c8: ea000010 b b210 <pipe_release+0xe4> <== NOT EXECUTED
delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE)
b1cc: e2552004 subs r2, r5, #4 <== NOT EXECUTED b1d0: 13a02001 movne r2, #1 <== NOT EXECUTED b1d4: e3530000 cmp r3, #0 <== NOT EXECUTED b1d8: 13a02000 movne r2, #0 <== NOT EXECUTED b1dc: e3520000 cmp r2, #0 <== NOT EXECUTED
/* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe);
b1e0: 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)
b1e4: 1a000007 bne b208 <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)
b1e8: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED b1ec: e2553002 subs r3, r5, #2 <== NOT EXECUTED b1f0: 13a03001 movne r3, #1 <== NOT EXECUTED b1f4: e3520000 cmp r2, #0 <== NOT EXECUTED b1f8: 13a03000 movne r3, #0 <== NOT EXECUTED b1fc: e3530000 cmp r3, #0 <== NOT EXECUTED b200: 0a000002 beq b210 <pipe_release+0xe4> <== NOT EXECUTED
PIPE_WAKEUPREADERS(pipe);
b204: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED b208: e1a0100d mov r1, sp <== NOT EXECUTED b20c: eb0002d0 bl bd54 <rtems_barrier_release> <== NOT EXECUTED
rtems_semaphore_release(rtems_pipe_semaphore);
b210: e59f300c ldr r3, [pc, #12] ; b224 <pipe_release+0xf8> <== NOT EXECUTED b214: e5930000 ldr r0, [r3] <== NOT EXECUTED b218: ebffe658 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; }
b21c: e3a00000 mov r0, #0 <== NOT EXECUTED b220: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED
0000af54 <pipe_write>: pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
af54: 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)
af58: e2525000 subs r5, r2, #0 <== NOT EXECUTED
pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) {
af5c: e1a04000 mov r4, r0 <== NOT EXECUTED af60: e1a0b001 mov fp, r1 <== NOT EXECUTED af64: e1a08003 mov r8, r3 <== NOT EXECUTED
int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0)
af68: 01a06005 moveq r6, r5 <== NOT EXECUTED af6c: 0a00005f beq b0f0 <pipe_write+0x19c> <== NOT EXECUTED
return 0; if (! PIPE_LOCK(pipe))
af70: e3a01000 mov r1, #0 <== NOT EXECUTED af74: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED af78: e1a02001 mov r2, r1 <== NOT EXECUTED af7c: ebffe6b9 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED af80: e3500000 cmp r0, #0 <== NOT EXECUTED af84: 13e06003 mvnne r6, #3 <== NOT EXECUTED af88: 1a000058 bne b0f0 <pipe_write+0x19c> <== NOT EXECUTED
return -EINTR; if (pipe->Readers == 0) {
af8c: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED af90: e3560000 cmp r6, #0 <== NOT EXECUTED af94: 0a000022 beq b024 <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;
af98: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED af9c: e1550009 cmp r5, r9 <== NOT EXECUTED afa0: 91a09005 movls r9, r5 <== NOT EXECUTED afa4: 83a09001 movhi r9, #1 <== NOT EXECUTED afa8: e1a06000 mov r6, r0 <== NOT EXECUTED afac: ea000043 b b0c0 <pipe_write+0x16c> <== NOT EXECUTED
while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) {
afb0: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED afb4: e2177001 ands r7, r7, #1 <== NOT EXECUTED afb8: 13e0700a mvnne r7, #10 <== NOT EXECUTED afbc: 1a000042 bne b0cc <pipe_write+0x178> <== NOT EXECUTED
ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++;
afc0: e594301c ldr r3, [r4, #28] <== NOT EXECUTED afc4: e2833001 add r3, r3, #1 <== NOT EXECUTED afc8: e584301c str r3, [r4, #28] <== NOT EXECUTED
PIPE_UNLOCK(pipe);
afcc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED afd0: ebffe6ea bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
if (! PIPE_WRITEWAIT(pipe))
afd4: e1a01007 mov r1, r7 <== NOT EXECUTED afd8: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED afdc: eb000372 bl bdac <rtems_barrier_wait> <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
afe0: e1a01007 mov r1, r7 <== NOT EXECUTED afe4: 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))
afe8: e2507000 subs r7, r0, #0 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
afec: 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))
aff0: 13e07003 mvnne r7, #3 <== NOT EXECUTED
ret = -EINTR; if (! PIPE_LOCK(pipe)) {
aff4: ebffe69b bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED aff8: e3500000 cmp r0, #0 <== NOT EXECUTED affc: 13e07003 mvnne r7, #3 <== NOT EXECUTED b000: 1a000038 bne b0e8 <pipe_write+0x194> <== NOT EXECUTED
/* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
b004: e594301c ldr r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
b008: e3570000 cmp r7, #0 <== NOT EXECUTED
if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --;
b00c: e2433001 sub r3, r3, #1 <== NOT EXECUTED b010: e584301c str r3, [r4, #28] <== NOT EXECUTED
if (ret != 0)
b014: 1a00002c bne b0cc <pipe_write+0x178> <== NOT EXECUTED
goto out_locked; if (pipe->Readers == 0) {
b018: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b01c: e3530000 cmp r3, #0 <== NOT EXECUTED b020: 1a000001 bne b02c <pipe_write+0xd8> <== NOT EXECUTED b024: e3e0701f mvn r7, #31 <== NOT EXECUTED b028: ea000027 b b0cc <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) {
b02c: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED b030: e594200c ldr r2, [r4, #12] <== NOT EXECUTED b034: e062300a rsb r3, r2, sl <== NOT EXECUTED b038: e1530009 cmp r3, r9 <== NOT EXECUTED b03c: 3affffdb bcc afb0 <pipe_write+0x5c> <== NOT EXECUTED
goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe);
b040: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED b044: e1a0100a mov r1, sl <== NOT EXECUTED b048: e0820000 add r0, r2, r0 <== NOT EXECUTED
ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe));
b04c: e0667005 rsb r7, r6, r5 <== NOT EXECUTED b050: e1530007 cmp r3, r7 <== NOT EXECUTED b054: 31a07003 movcc r7, r3 <== NOT EXECUTED
chunk1 = pipe->Size - PIPE_WSTART(pipe);
b058: eb002d58 bl 165c0 <__umodsi3> <== NOT EXECUTED b05c: e5943000 ldr r3, [r4] <== NOT EXECUTED b060: e060a00a rsb sl, r0, sl <== NOT EXECUTED
if (chunk > chunk1) {
b064: e157000a cmp r7, sl <== NOT EXECUTED b068: 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);
b06c: d0830000 addle r0, r3, r0 <== NOT EXECUTED b070: d1a02007 movle r2, r7 <== NOT EXECUTED
} } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) {
b074: da000006 ble b094 <pipe_write+0x140> <== NOT EXECUTED
memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1);
b078: e1a0200a mov r2, sl <== NOT EXECUTED b07c: e0830000 add r0, r3, r0 <== NOT EXECUTED b080: eb000945 bl d59c <memcpy> <== NOT EXECUTED
memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1);
b084: e08a1006 add r1, sl, r6 <== NOT EXECUTED b088: e5940000 ldr r0, [r4] <== NOT EXECUTED b08c: e08b1001 add r1, fp, r1 <== NOT EXECUTED b090: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED
} else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk);
b094: eb000940 bl d59c <memcpy> <== NOT EXECUTED
pipe->Length += chunk;
b098: e594300c ldr r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0)
b09c: 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;
b0a0: e0833007 add r3, r3, r7 <== NOT EXECUTED
if (pipe->waitingReaders > 0)
b0a4: 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;
b0a8: e584300c str r3, [r4, #12] <== NOT EXECUTED
if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe);
b0ac: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED b0b0: 11a0100d movne r1, sp <== NOT EXECUTED b0b4: 1b000326 blne bd54 <rtems_barrier_release> <== NOT EXECUTED
written += chunk;
b0b8: e0866007 add r6, r6, r7 <== NOT EXECUTED b0bc: 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) {
b0c0: e1560005 cmp r6, r5 <== NOT EXECUTED b0c4: 3affffd8 bcc b02c <pipe_write+0xd8> <== NOT EXECUTED b0c8: e3a07000 mov r7, #0 <== NOT EXECUTED
/* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe);
b0cc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b0d0: ebffe6aa bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE)
b0d4: e3770020 cmn r7, #32 <== NOT EXECUTED b0d8: 1a000002 bne b0e8 <pipe_write+0x194> <== NOT EXECUTED
kill(getpid(), SIGPIPE);
b0dc: eb0001fe bl b8dc <getpid> <== NOT EXECUTED b0e0: e3a0100d mov r1, #13 <== NOT EXECUTED b0e4: eb000240 bl b9ec <kill> <== NOT EXECUTED
#endif if (written > 0)
b0e8: e3560000 cmp r6, #0 <== NOT EXECUTED b0ec: d1a06007 movle r6, r7 <== NOT EXECUTED
return written; return ret; }
b0f0: e1a00006 mov r0, r6 <== NOT EXECUTED b0f4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
00017f0c <read>: ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
17f0c: e59f30b0 ldr r3, [pc, #176] ; 17fc4 <read+0xb8> 17f10: e5933000 ldr r3, [r3] 17f14: e1500003 cmp r0, r3
ssize_t read( int fd, void *buffer, size_t count ) {
17f18: e92d4070 push {r4, r5, r6, lr} 17f1c: e1a05001 mov r5, r1
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17f20: 2a000005 bcs 17f3c <read+0x30> iop = rtems_libio_iop( fd );
17f24: e59f309c ldr r3, [pc, #156] ; 17fc8 <read+0xbc> 17f28: e5934000 ldr r4, [r3] 17f2c: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
17f30: e5943014 ldr r3, [r4, #20] 17f34: e3130c01 tst r3, #256 ; 0x100
17f38: 1a000002 bne 17f48 <read+0x3c>
17f3c: ebffd388 bl cd64 <__errno> 17f40: e3a03009 mov r3, #9 17f44: ea00000f b 17f88 <read+0x7c>
rtems_libio_check_buffer( buffer );
17f48: e3510000 cmp r1, #0
17f4c: 0a000004 beq 17f64 <read+0x58> rtems_libio_check_count( count );
17f50: e3520000 cmp r2, #0 17f54: 01a00002 moveq r0, r2 17f58: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
17f5c: e3130002 tst r3, #2
17f60: 1a000002 bne 17f70 <read+0x64>
17f64: ebffd37e bl cd64 <__errno> <== NOT EXECUTED 17f68: e3a03016 mov r3, #22 <== NOT EXECUTED 17f6c: ea000005 b 17f88 <read+0x7c> <== NOT EXECUTED
/* * Now process the read(). */ if ( !iop->handlers->read_h )
17f70: e594303c ldr r3, [r4, #60] ; 0x3c 17f74: e5933008 ldr r3, [r3, #8] 17f78: e3530000 cmp r3, #0
17f7c: 1a000004 bne 17f94 <read+0x88> rtems_set_errno_and_return_minus_one( ENOTSUP );
17f80: ebffd377 bl cd64 <__errno> <== NOT EXECUTED 17f84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
17f88: e5803000 str r3, [r0] 17f8c: e3e00000 mvn r0, #0 17f90: e8bd8070 pop {r4, r5, r6, pc}
rc = (*iop->handlers->read_h)( iop, buffer, count );
17f94: e1a00004 mov r0, r4 17f98: e1a0e00f mov lr, pc 17f9c: e12fff13 bx r3
if ( rc > 0 )
17fa0: e3500000 cmp r0, #0 17fa4: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
17fa8: e284600c add r6, r4, #12 17fac: e8960060 ldm r6, {r5, r6} 17fb0: e0952000 adds r2, r5, r0 17fb4: e0a63fc0 adc r3, r6, r0, asr #31 17fb8: e584200c str r2, [r4, #12] 17fbc: e5843010 str r3, [r4, #16]
return rc; }
17fc0: e8bd8070 pop {r4, r5, r6, pc}
00005100 <readlink>: ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
5100: e92d40f0 push {r4, r5, r6, r7, lr}
rtems_filesystem_location_info_t loc; int result; if (!buf)
5104: e2516000 subs r6, r1, #0
ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) {
5108: e24dd018 sub sp, sp, #24 510c: e1a05002 mov r5, r2 5110: e1a07000 mov r7, r0
rtems_filesystem_location_info_t loc; int result; if (!buf) 5114: 1a000002 bne 5124 <readlink+0x24> rtems_set_errno_and_return_minus_one( EFAULT );
5118: eb00305a bl 11288 <__errno> <== NOT EXECUTED 511c: e3a0300e mov r3, #14 <== NOT EXECUTED 5120: ea000028 b 51c8 <readlink+0xc8> <== NOT EXECUTED
result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ),
5124: eb0037bd bl 13020 <strlen> 5128: e28d4004 add r4, sp, #4 512c: e3a0c000 mov ip, #0 5130: e1a01000 mov r1, r0 5134: e1a0200c mov r2, ip 5138: e1a00007 mov r0, r7 513c: e1a03004 mov r3, r4 5140: e58dc000 str ip, [sp] 5144: ebfffb83 bl 3f58 <rtems_filesystem_evaluate_path>
0, &loc, false ); if ( result != 0 )
5148: e3500000 cmp r0, #0
514c: 1a00001e bne 51cc <readlink+0xcc> return -1; if ( !loc.ops->node_type_h ){
5150: e59d2010 ldr r2, [sp, #16] 5154: e5923010 ldr r3, [r2, #16] 5158: e3530000 cmp r3, #0
515c: 0a000012 beq 51ac <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 ){
5160: e1a00004 mov r0, r4 5164: e1a0e00f mov lr, pc 5168: e12fff13 bx r3 516c: e3500004 cmp r0, #4 5170: e59d2010 ldr r2, [sp, #16]
5174: 0a000009 beq 51a0 <readlink+0xa0> rtems_filesystem_freenode( &loc );
5178: e3520000 cmp r2, #0
517c: 0a000004 beq 5194 <readlink+0x94>
5180: e592301c ldr r3, [r2, #28] 5184: e3530000 cmp r3, #0 5188: 11a00004 movne r0, r4 518c: 11a0e00f movne lr, pc 5190: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EINVAL );
5194: eb00303b bl 11288 <__errno> 5198: e3a03016 mov r3, #22 519c: ea000009 b 51c8 <readlink+0xc8>
} if ( !loc.ops->readlink_h ){
51a0: e592303c ldr r3, [r2, #60] ; 0x3c 51a4: e3530000 cmp r3, #0
51a8: 1a000009 bne 51d4 <readlink+0xd4> rtems_filesystem_freenode( &loc );
51ac: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 51b0: e3530000 cmp r3, #0 <== NOT EXECUTED 51b4: 11a00004 movne r0, r4 <== NOT EXECUTED 51b8: 11a0e00f movne lr, pc <== NOT EXECUTED 51bc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
51c0: eb003030 bl 11288 <__errno> <== NOT EXECUTED 51c4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
51c8: e5803000 str r3, [r0] 51cc: e3e05000 mvn r5, #0 51d0: ea00000d b 520c <readlink+0x10c>
} result = (*loc.ops->readlink_h)( &loc, buf, bufsize );
51d4: e1a02005 mov r2, r5 51d8: e1a01006 mov r1, r6 51dc: e1a00004 mov r0, r4 51e0: e1a0e00f mov lr, pc 51e4: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
51e8: e59d3010 ldr r3, [sp, #16] 51ec: 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 );
51f0: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 51f4: 0a000004 beq 520c <readlink+0x10c>
51f8: e593301c ldr r3, [r3, #28] 51fc: e3530000 cmp r3, #0 5200: 11a00004 movne r0, r4 5204: 11a0e00f movne lr, pc 5208: 112fff13 bxne r3
return result; }
520c: e1a00005 mov r0, r5 5210: e28dd018 add sp, sp, #24 5214: e8bd80f0 pop {r4, r5, r6, r7, pc}
00003924 <readv>: int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd );
3924: e59f3144 ldr r3, [pc, #324] ; 3a70 <readv+0x14c> 3928: e5933000 ldr r3, [r3] 392c: e1500003 cmp r0, r3
ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) {
3930: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 3934: e1a08002 mov r8, r2
int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3938: 2a000005 bcs 3954 <readv+0x30> iop = rtems_libio_iop( fd );
393c: e59f3130 ldr r3, [pc, #304] ; 3a74 <readv+0x150> 3940: e5936000 ldr r6, [r3] 3944: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
3948: e5963014 ldr r3, [r6, #20] 394c: e3130c01 tst r3, #256 ; 0x100
3950: 1a000002 bne 3960 <readv+0x3c>
3954: eb002e30 bl f21c <__errno> <== NOT EXECUTED 3958: e3a03009 mov r3, #9 <== NOT EXECUTED 395c: ea00001d b 39d8 <readv+0xb4> <== NOT EXECUTED
rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ );
3960: e3130002 tst r3, #2
3964: 0a000019 beq 39d0 <readv+0xac> /* * Argument validation on IO vector */ if ( !iov )
3968: e3510000 cmp r1, #0
396c: 0a000017 beq 39d0 <readv+0xac> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
3970: e3520000 cmp r2, #0
3974: da000015 ble 39d0 <readv+0xac> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
3978: e3520b01 cmp r2, #1024 ; 0x400
397c: ca000013 bgt 39d0 <readv+0xac> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h )
3980: e596303c ldr r3, [r6, #60] ; 0x3c 3984: e5933008 ldr r3, [r3, #8] 3988: e3530000 cmp r3, #0
398c: 1a000002 bne 399c <readv+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
3990: eb002e21 bl f21c <__errno> <== NOT EXECUTED 3994: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3998: ea00000e b 39d8 <readv+0xb4> <== NOT EXECUTED
399c: e3a03000 mov r3, #0 39a0: e1a05001 mov r5, r1 39a4: e1a02001 mov r2, r1 39a8: e3a07001 mov r7, #1 39ac: e1a01003 mov r1, r3
all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base )
39b0: e5920000 ldr r0, [r2] 39b4: 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++ ) {
39b8: e2833001 add r3, r3, #1
ssize_t old; if ( !iov[v].iov_base ) 39bc: 0a000003 beq 39d0 <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;
39c0: e592c004 ldr ip, [r2, #4] 39c4: e081000c add r0, r1, ip
if ( total < old )
39c8: e1500001 cmp r0, r1
39cc: aa000003 bge 39e0 <readv+0xbc> rtems_set_errno_and_return_minus_one( EINVAL );
39d0: eb002e11 bl f21c <__errno> 39d4: e3a03016 mov r3, #22 39d8: e5803000 str r3, [r0] 39dc: ea000011 b 3a28 <readv+0x104>
if ( iov[v].iov_len )
39e0: e35c0000 cmp ip, #0 39e4: 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++ ) {
39e8: e1530008 cmp r3, r8 39ec: e2822008 add r2, r2, #8 39f0: b1a01000 movlt r1, r0
39f4: baffffed blt 39b0 <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 ) {
39f8: e3570000 cmp r7, #0 39fc: 13a04000 movne r4, #0
3a00: 1a000018 bne 3a68 <readv+0x144>
3a04: 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 );
3a08: e8950006 ldm r5, {r1, r2} 3a0c: e596303c ldr r3, [r6, #60] ; 0x3c 3a10: e1a00006 mov r0, r6 3a14: e1a0e00f mov lr, pc 3a18: e593f008 ldr pc, [r3, #8]
if ( bytes < 0 )
3a1c: e3500000 cmp r0, #0
} /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3a20: e2877001 add r7, r7, #1
bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3a24: aa000001 bge 3a30 <readv+0x10c>
3a28: e3e04000 mvn r4, #0 3a2c: ea00000d b 3a68 <readv+0x144>
return -1; if ( bytes > 0 ) { 3a30: 0a000006 beq 3a50 <readv+0x12c> iop->offset += bytes;
3a34: e286c00c add ip, r6, #12 3a38: e89c1800 ldm ip, {fp, ip} 3a3c: e09b2000 adds r2, fp, r0 3a40: e0ac3fc0 adc r3, ip, r0, asr #31 3a44: e586200c str r2, [r6, #12] 3a48: e5863010 str r3, [r6, #16]
total += bytes;
3a4c: e0844000 add r4, r4, r0
} if (bytes != iov[ v ].iov_len)
3a50: e5953004 ldr r3, [r5, #4] 3a54: e1500003 cmp r0, r3
3a58: 1a000002 bne 3a68 <readv+0x144> } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
3a5c: e1570008 cmp r7, r8 3a60: e2855008 add r5, r5, #8
3a64: baffffe7 blt 3a08 <readv+0xe4> if (bytes != iov[ v ].iov_len) break; } return total; }
3a68: e1a00004 mov r0, r4 3a6c: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}
00018024 <realloc>: { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
18024: e59f310c ldr r3, [pc, #268] ; 18138 <realloc+0x114>
/* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) {
18028: e59f210c ldr r2, [pc, #268] ; 1813c <realloc+0x118> 1802c: e592c000 ldr ip, [r2]
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
18030: 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())) {
18034: e35c0003 cmp ip, #3
{ uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1);
18038: e2822001 add r2, r2, #1 1803c: e92d40f1 push {r0, r4, r5, r6, r7, lr} 18040: e5832010 str r2, [r3, #16] 18044: e1a04000 mov r4, r0 18048: 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())) { 1804c: 1a000007 bne 18070 <realloc+0x4c> if (_Thread_Dispatch_disable_level > 0)
18050: e59f30e8 ldr r3, [pc, #232] ; 18140 <realloc+0x11c> 18054: e5933000 ldr r3, [r3] 18058: e3530000 cmp r3, #0
1805c: 1a000032 bne 1812c <realloc+0x108> return (void *) 0; if (_ISR_Nest_level > 0)
18060: e59f30dc ldr r3, [pc, #220] ; 18144 <realloc+0x120> 18064: e5933000 ldr r3, [r3] 18068: e3530000 cmp r3, #0
1806c: 1a00002e bne 1812c <realloc+0x108> } /* * Continue with realloc(). */ if ( !ptr )
18070: e3540000 cmp r4, #0
18074: 1a000003 bne 18088 <realloc+0x64> return malloc( size );
18078: e1a00005 mov r0, r5 1807c: ebffa6e3 bl 1c10 <malloc> 18080: e1a04000 mov r4, r0 18084: ea000029 b 18130 <realloc+0x10c>
if ( !size ) {
18088: e3550000 cmp r5, #0
1808c: 1a000003 bne 180a0 <realloc+0x7c> free( ptr );
18090: e1a00004 mov r0, r4 <== NOT EXECUTED 18094: ebffa62b bl 1948 <free> <== NOT EXECUTED 18098: e1a04005 mov r4, r5 <== NOT EXECUTED
return (void *) 0;
1809c: ea000023 b 18130 <realloc+0x10c> <== NOT EXECUTED
} if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) {
180a0: e59f60a0 ldr r6, [pc, #160] ; 18148 <realloc+0x124> 180a4: e1a01004 mov r1, r4 180a8: e5960000 ldr r0, [r6] 180ac: e1a0200d mov r2, sp 180b0: eb000055 bl 1820c <_Protected_heap_Get_block_size> 180b4: e2507000 subs r7, r0, #0
180b8: 1a000004 bne 180d0 <realloc+0xac> errno = EINVAL;
180bc: ebffd328 bl cd64 <__errno> 180c0: e3a03016 mov r3, #22 180c4: e5803000 str r3, [r0] 180c8: e1a04007 mov r4, r7
return (void *) 0;
180cc: ea000017 b 18130 <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 ) ) {
180d0: e5960000 ldr r0, [r6] 180d4: e1a01004 mov r1, r4 180d8: e1a02005 mov r2, r5 180dc: eb00005b bl 18250 <_Protected_heap_Resize_block> 180e0: e3500000 cmp r0, #0
180e4: 1a000011 bne 18130 <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 );
180e8: e1a00005 mov r0, r5 180ec: ebffa6c7 bl 1c10 <malloc>
MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
180f0: e59f3040 ldr r3, [pc, #64] ; 18138 <realloc+0x114> 180f4: e5932004 ldr r2, [r3, #4]
if ( !new_area ) {
180f8: e2506000 subs r6, r0, #0
* and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */
180fc: e2422001 sub r2, r2, #1 18100: e5832004 str r2, [r3, #4]
if ( !new_area ) { 18104: 0a000008 beq 1812c <realloc+0x108> return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size );
18108: e59d2000 ldr r2, [sp] 1810c: e1a01004 mov r1, r4 18110: e1550002 cmp r5, r2 18114: 31a02005 movcc r2, r5 18118: ebffd51f bl d59c <memcpy>
free( ptr );
1811c: e1a00004 mov r0, r4 18120: ebffa608 bl 1948 <free> 18124: e1a04006 mov r4, r6
return new_area;
18128: ea000000 b 18130 <realloc+0x10c> 1812c: e3a04000 mov r4, #0
}
18130: e1a00004 mov r0, r4 18134: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
00006200 <rmdir>: #include <rtems/seterr.h> int rmdir( const char *pathname ) {
6200: e92d4070 push {r4, r5, r6, lr} 6204: e24dd02c sub sp, sp, #44 ; 0x2c 6208: e1a06000 mov r6, r0
/* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname );
620c: ebfff9fe bl 4a0c <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
6210: e2505000 subs r5, r0, #0
6214: 1a000019 bne 6280 <rmdir+0x80> rtems_filesystem_get_start_loc( pathname, &i, &parentloc );
6218: e5d63000 ldrb r3, [r6] 621c: e353002f cmp r3, #47 ; 0x2f 6220: 1353005c cmpne r3, #92 ; 0x5c
6224: 0a000001 beq 6230 <rmdir+0x30>
6228: e3530000 cmp r3, #0 <== NOT EXECUTED 622c: 1a000009 bne 6258 <rmdir+0x58> <== NOT EXECUTED
6230: e59f325c ldr r3, [pc, #604] ; 6494 <rmdir+0x294> 6234: e593e000 ldr lr, [r3] 6238: e28ee018 add lr, lr, #24 623c: e8be000f ldm lr!, {r0, r1, r2, r3} 6240: e28dc018 add ip, sp, #24 6244: e8ac000f stmia ip!, {r0, r1, r2, r3} 6248: e59e3000 ldr r3, [lr] 624c: e3a04000 mov r4, #0 6250: e58c3000 str r3, [ip] 6254: ea000013 b 62a8 <rmdir+0xa8>
6258: e59f3234 ldr r3, [pc, #564] ; 6494 <rmdir+0x294> <== NOT EXECUTED 625c: e593e000 ldr lr, [r3] <== NOT EXECUTED 6260: e28ee004 add lr, lr, #4 <== NOT EXECUTED 6264: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 6268: e28dc018 add ip, sp, #24 <== NOT EXECUTED 626c: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 6270: e59e3000 ldr r3, [lr] <== NOT EXECUTED 6274: e1a04005 mov r4, r5 <== NOT EXECUTED 6278: e58c3000 str r3, [ip] <== NOT EXECUTED 627c: ea000009 b 62a8 <rmdir+0xa8> <== NOT EXECUTED
else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen,
6280: e3a0c000 mov ip, #0 6284: e1a00006 mov r0, r6 6288: e1a01005 mov r1, r5 628c: e3a02002 mov r2, #2 6290: e28d3018 add r3, sp, #24 6294: e58dc000 str ip, [sp] 6298: ebfffa23 bl 4b2c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
629c: e3500000 cmp r0, #0
62a0: 1a000077 bne 6484 <rmdir+0x284>
62a4: e3a04001 mov r4, #1
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
62a8: e28de018 add lr, sp, #24 62ac: e8be000f ldm lr!, {r0, r1, r2, r3} 62b0: e28dc004 add ip, sp, #4 62b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 62b8: e59e3000 ldr r3, [lr]
name = pathname + parentpathlen;
62bc: e0865005 add r5, r6, r5
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
62c0: e58c3000 str r3, [ip]
name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
62c4: e1a00005 mov r0, r5 62c8: eb003b9b bl 1513c <strlen> 62cc: e1a01000 mov r1, r0 62d0: e1a00005 mov r0, r5 62d4: ebfff9c0 bl 49dc <rtems_filesystem_prefix_separators> 62d8: e0856000 add r6, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
62dc: e1a00006 mov r0, r6 62e0: eb003b95 bl 1513c <strlen> 62e4: e28d5004 add r5, sp, #4 62e8: e3a0c000 mov ip, #0 62ec: e1a01000 mov r1, r0 62f0: e1a0200c mov r2, ip 62f4: e1a00006 mov r0, r6 62f8: e1a03005 mov r3, r5 62fc: e58dc000 str ip, [sp] 6300: ebfff9d1 bl 4a4c <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
6304: e3500000 cmp r0, #0
6308: 0a00000b beq 633c <rmdir+0x13c> if ( free_parentloc )
630c: e3540000 cmp r4, #0
6310: 0a00005b beq 6484 <rmdir+0x284> rtems_filesystem_freenode( &parentloc );
6314: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6318: e3530000 cmp r3, #0 <== NOT EXECUTED 631c: 0a000058 beq 6484 <rmdir+0x284> <== NOT EXECUTED 6320: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6324: e3530000 cmp r3, #0 <== NOT EXECUTED 6328: 0a000055 beq 6484 <rmdir+0x284> <== NOT EXECUTED 632c: e28d0018 add r0, sp, #24 <== NOT EXECUTED 6330: e1a0e00f mov lr, pc <== NOT EXECUTED 6334: e12fff13 bx r3 <== NOT EXECUTED 6338: ea000051 b 6484 <rmdir+0x284> <== NOT EXECUTED
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){
633c: e59d2010 ldr r2, [sp, #16] 6340: e5923010 ldr r3, [r2, #16] 6344: e3530000 cmp r3, #0
rtems_filesystem_freenode( &loc );
6348: 0592301c ldreq r3, [r2, #28]
/* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 634c: 0a000021 beq 63d8 <rmdir+0x1d8> 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 ){
6350: e1a00005 mov r0, r5 6354: e1a0e00f mov lr, pc 6358: e12fff13 bx r3 635c: e3500001 cmp r0, #1
6360: 0a000014 beq 63b8 <rmdir+0x1b8> rtems_filesystem_freenode( &loc );
6364: e59d3010 ldr r3, [sp, #16] 6368: e3530000 cmp r3, #0
636c: 0a000004 beq 6384 <rmdir+0x184>
6370: e593301c ldr r3, [r3, #28] 6374: e3530000 cmp r3, #0 6378: 11a00005 movne r0, r5 637c: 11a0e00f movne lr, pc 6380: 112fff13 bxne r3
if ( free_parentloc )
6384: e3540000 cmp r4, #0
6388: 0a000007 beq 63ac <rmdir+0x1ac> rtems_filesystem_freenode( &parentloc );
638c: e59d3024 ldr r3, [sp, #36] ; 0x24 6390: e3530000 cmp r3, #0
6394: 0a000004 beq 63ac <rmdir+0x1ac>
6398: e593301c ldr r3, [r3, #28] 639c: e3530000 cmp r3, #0 63a0: 128d0018 addne r0, sp, #24 63a4: 11a0e00f movne lr, pc 63a8: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( ENOTDIR );
63ac: eb002e8c bl 11de4 <__errno> 63b0: e3a03014 mov r3, #20 63b4: ea000017 b 6418 <rmdir+0x218>
/* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){
63b8: e59d300c ldr r3, [sp, #12] 63bc: e5933034 ldr r3, [r3, #52] ; 0x34 63c0: e3530000 cmp r3, #0
63c4: 1a000015 bne 6420 <rmdir+0x220> rtems_filesystem_freenode( &loc );
63c8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 63cc: e3530000 cmp r3, #0 <== NOT EXECUTED 63d0: 0a000004 beq 63e8 <rmdir+0x1e8> <== NOT EXECUTED 63d4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 63d8: e3530000 cmp r3, #0 <== NOT EXECUTED 63dc: 11a00005 movne r0, r5 <== NOT EXECUTED 63e0: 11a0e00f movne lr, pc <== NOT EXECUTED 63e4: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
63e8: e3540000 cmp r4, #0 <== NOT EXECUTED 63ec: 0a000007 beq 6410 <rmdir+0x210> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
63f0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 63f4: e3530000 cmp r3, #0 <== NOT EXECUTED 63f8: 0a000004 beq 6410 <rmdir+0x210> <== NOT EXECUTED 63fc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6400: e3530000 cmp r3, #0 <== NOT EXECUTED 6404: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 6408: 11a0e00f movne lr, pc <== NOT EXECUTED 640c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
6410: eb002e73 bl 11de4 <__errno> <== NOT EXECUTED 6414: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
6418: e5803000 str r3, [r0] 641c: ea000018 b 6484 <rmdir+0x284>
} result = (*loc.handlers->rmnod_h)( &parentloc, &loc );
6420: e28d0018 add r0, sp, #24 6424: e1a01005 mov r1, r5 6428: e1a0e00f mov lr, pc 642c: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
6430: e59d3010 ldr r3, [sp, #16] 6434: 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 );
6438: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc ); 643c: 0a000004 beq 6454 <rmdir+0x254>
6440: e593301c ldr r3, [r3, #28] 6444: e3530000 cmp r3, #0 6448: 11a00005 movne r0, r5 644c: 11a0e00f movne lr, pc 6450: 112fff13 bxne r3
if ( free_parentloc )
6454: e3540000 cmp r4, #0
6458: 0a00000a beq 6488 <rmdir+0x288> rtems_filesystem_freenode( &parentloc );
645c: e59d3024 ldr r3, [sp, #36] ; 0x24 6460: e3530000 cmp r3, #0
6464: 0a000007 beq 6488 <rmdir+0x288>
6468: e593301c ldr r3, [r3, #28] 646c: e3530000 cmp r3, #0
6470: 0a000004 beq 6488 <rmdir+0x288>
6474: e28d0018 add r0, sp, #24 6478: e1a0e00f mov lr, pc 647c: e12fff13 bx r3 6480: ea000000 b 6488 <rmdir+0x288> 6484: e3e06000 mvn r6, #0
return result; }
6488: e1a00006 mov r0, r6 648c: e28dd02c add sp, sp, #44 ; 0x2c 6490: e8bd8070 pop {r4, r5, r6, pc}
000127e0 <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; }
127e0: e59f0000 ldr r0, [pc, #0] ; 127e8 <rtems_assoc_name_bad+0x8><== NOT EXECUTED 127e4: e12fff1e bx lr <== NOT EXECUTED
0000f288 <rtems_assoc_name_by_local>: const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
f288: e92d4010 push {r4, lr} f28c: e1a04001 mov r4, r1
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
f290: eb000006 bl f2b0 <rtems_assoc_ptr_by_local>
if (nap)
f294: e3500000 cmp r0, #0
f298: 0a000001 beq f2a4 <rtems_assoc_name_by_local+0x1c> return nap->name; return rtems_assoc_name_bad(local_value); }
f29c: e5900000 ldr r0, [r0] f2a0: 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);
f2a4: e1a00004 mov r0, r4 <== NOT EXECUTED
}
f2a8: 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);
f2ac: ea000d4b b 127e0 <rtems_assoc_name_bad> <== NOT EXECUTED
0000c4ec <rtems_assoc_remote_by_local>: uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) {
c4ec: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value);
c4f0: eb0001fe bl ccf0 <rtems_assoc_ptr_by_local> <== NOT EXECUTED
if (nap)
c4f4: e3500000 cmp r0, #0 <== NOT EXECUTED
return nap->remote_value;
c4f8: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED
return 0; }
c4fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00001820 <rtems_bsp_cmdline_get_param>: size_t length ) { const char *p; if ( !name )
1820: e3500000 cmp r0, #0
const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) {
1824: e92d4070 push {r4, r5, r6, lr} 1828: e1a04001 mov r4, r1 182c: e1a05002 mov r5, r2
const char *p; if ( !name ) 1830: 0a00001c beq 18a8 <rtems_bsp_cmdline_get_param+0x88> return NULL; if ( !value )
1834: e3510000 cmp r1, #0
1838: 0a00001b beq 18ac <rtems_bsp_cmdline_get_param+0x8c> return NULL; if ( !length )
183c: e3520000 cmp r2, #0
1840: 0a000018 beq 18a8 <rtems_bsp_cmdline_get_param+0x88> return NULL; value[0] = '\0';
1844: e3a06000 mov r6, #0 1848: e5c16000 strb r6, [r1]
p = rtems_bsp_cmdline_get_param_raw( name );
184c: eb000018 bl 18b4 <rtems_bsp_cmdline_get_param_raw>
if ( !p )
1850: e3500000 cmp r0, #0
1854: 0a000013 beq 18a8 <rtems_bsp_cmdline_get_param+0x88> int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) {
1858: e2455001 sub r5, r5, #1
value[0] = '\0'; p = rtems_bsp_cmdline_get_param_raw( name ); if ( !p )
185c: e1a03006 mov r3, r6
if ( *p == '\"' ) { quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) break; value[i++] = *p++; value[i] = '\0';
1860: e1a01006 mov r1, r6 1864: ea000009 b 1890 <rtems_bsp_cmdline_get_param+0x70>
int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) { if ( *p == '\"' ) {
1868: e3520022 cmp r2, #34 ; 0x22
quotes++;
186c: 02866001 addeq r6, r6, #1
int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) { if ( *p == '\"' ) { 1870: 0a000003 beq 1884 <rtems_bsp_cmdline_get_param+0x64> quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' )
1874: e3160001 tst r6, #1
1878: 1a000001 bne 1884 <rtems_bsp_cmdline_get_param+0x64>
187c: e3520020 cmp r2, #32
1880: 0a000009 beq 18ac <rtems_bsp_cmdline_get_param+0x8c> break; value[i++] = *p++;
1884: e7c42003 strb r2, [r4, r3] 1888: e2833001 add r3, r3, #1
value[i] = '\0';
188c: e7c41003 strb r1, [r4, r3]
int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i<length-1; ) {
1890: e7d02003 ldrb r2, [r0, r3] 1894: e3520000 cmp r2, #0
1898: 0a000003 beq 18ac <rtems_bsp_cmdline_get_param+0x8c>
189c: e1530005 cmp r3, r5
18a0: 3afffff0 bcc 1868 <rtems_bsp_cmdline_get_param+0x48>
18a4: ea000000 b 18ac <rtems_bsp_cmdline_get_param+0x8c> <== NOT EXECUTED
18a8: e3a04000 mov r4, #0
return NULL; copy_string( p, value, length ); return value; }
18ac: e1a00004 mov r0, r4 18b0: e8bd8070 pop {r4, r5, r6, pc}
00002414 <rtems_cpu_usage_report_with_plugin>: void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) {
2414: 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 )
2418: e251a000 subs sl, r1, #0
void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) {
241c: e24dd040 sub sp, sp, #64 ; 0x40 2420: e1a08000 mov r8, r0
Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 2424: 0a000059 beq 2590 <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 );
2428: e28d4030 add r4, sp, #48 ; 0x30 242c: e1a00004 mov r0, r4
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2430: 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 );
2434: eb001339 bl 7120 <_TOD_Get_uptime>
_Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total );
2438: e1a01004 mov r1, r4 243c: e1a02005 mov r2, r5 2440: e59f0150 ldr r0, [pc, #336] ; 2598 <rtems_cpu_usage_report_with_plugin+0x184> 2444: eb001c4c bl 957c <_Timespec_Subtract>
} } } #endif (*print)(
2448: e1a00008 mov r0, r8 244c: e59f1148 ldr r1, [pc, #328] ; 259c <rtems_cpu_usage_report_with_plugin+0x188> 2450: e1a0e00f mov lr, pc 2454: e12fff1a bx sl 2458: e59f4140 ldr r4, [pc, #320] ; 25a0 <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 ) {
245c: e59fb140 ldr fp, [pc, #320] ; 25a4 <rtems_cpu_usage_report_with_plugin+0x190>
); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] )
2460: e5943004 ldr r3, [r4, #4] 2464: e3530000 cmp r3, #0
2468: 0a00003b beq 255c <rtems_cpu_usage_report_with_plugin+0x148> continue; information = _Objects_Information_table[ api_index ][ 1 ];
246c: e5936004 ldr r6, [r3, #4]
if ( information ) {
2470: e3560000 cmp r6, #0 2474: 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(
2478: 128d9018 addne r9, sp, #24 247c: 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 ) { 2480: 1a00002f bne 2544 <rtems_cpu_usage_report_with_plugin+0x130>
2484: ea000034 b 255c <rtems_cpu_usage_report_with_plugin+0x148> <== NOT EXECUTED
for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ];
2488: e596301c ldr r3, [r6, #28] 248c: e7934107 ldr r4, [r3, r7, lsl #2]
if ( !the_thread )
2490: e3540000 cmp r4, #0
2494: 0a000029 beq 2540 <rtems_cpu_usage_report_with_plugin+0x12c> continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name );
2498: e5940008 ldr r0, [r4, #8] 249c: eb000e90 bl 5ee4 <rtems_object_get_name>
(*print)(
24a0: e28d3008 add r3, sp, #8 24a4: e5942008 ldr r2, [r4, #8] 24a8: e1a00008 mov r0, r8 24ac: e59f10f4 ldr r1, [pc, #244] ; 25a8 <rtems_cpu_usage_report_with_plugin+0x194> 24b0: e1a0e00f mov lr, pc 24b4: 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;
24b8: e2843084 add r3, r4, #132 ; 0x84 24bc: e893000c ldm r3, {r2, r3} 24c0: e58d2020 str r2, [sp, #32] 24c4: e58d3024 str r3, [sp, #36] ; 0x24
if ( _Thread_Executing->Object.id == the_thread->Object.id ) {
24c8: e59b2000 ldr r2, [fp] 24cc: e5943008 ldr r3, [r4, #8] 24d0: e5922008 ldr r2, [r2, #8] 24d4: e1520003 cmp r2, r3
24d8: 1a000006 bne 24f8 <rtems_cpu_usage_report_with_plugin+0xe4> Timestamp_Control used; _Timestamp_Subtract(
24dc: e59f00c8 ldr r0, [pc, #200] ; 25ac <rtems_cpu_usage_report_with_plugin+0x198> 24e0: e28d1030 add r1, sp, #48 ; 0x30 24e4: e1a02009 mov r2, r9 24e8: eb001c23 bl 957c <_Timespec_Subtract>
&_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used );
24ec: e28d0020 add r0, sp, #32 24f0: e1a01009 mov r1, r9 24f4: eb001be5 bl 9490 <_Timespec_Add_to>
}; _Timestamp_Divide( &ran, &total, &ival, &fval );
24f8: e28d203c add r2, sp, #60 ; 0x3c 24fc: e28d3038 add r3, sp, #56 ; 0x38 2500: e28d0020 add r0, sp, #32 2504: e28d1028 add r1, sp, #40 ; 0x28 2508: eb001bf5 bl 94e4 <_Timespec_Divide>
/* * Print the information */ (*print)( context,
250c: e3a01ffa mov r1, #1000 ; 0x3e8 2510: e59d0024 ldr r0, [sp, #36] ; 0x24 2514: eb00641a bl 1b584 <__aeabi_uidiv> 2518: e59d203c ldr r2, [sp, #60] ; 0x3c 251c: e58d2000 str r2, [sp] 2520: e59d2038 ldr r2, [sp, #56] ; 0x38 2524: e1a03000 mov r3, r0 2528: e58d2004 str r2, [sp, #4] 252c: e1a00008 mov r0, r8 2530: e59f1078 ldr r1, [pc, #120] ; 25b0 <rtems_cpu_usage_report_with_plugin+0x19c> 2534: e59d2020 ldr r2, [sp, #32] 2538: e1a0e00f mov lr, pc 253c: 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++ ) {
2540: e2877001 add r7, r7, #1 2544: e1d631b0 ldrh r3, [r6, #16] 2548: 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 );
254c: e3a0100d mov r1, #13 2550: 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++ ) { 2554: 9affffcb bls 2488 <rtems_cpu_usage_report_with_plugin+0x74>
2558: e1a04005 mov r4, r5
" ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ;
255c: e59f3050 ldr r3, [pc, #80] ; 25b4 <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++ ) {
2560: e2844004 add r4, r4, #4
" ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ;
2564: e1540003 cmp r4, r3
2568: 1affffbc bne 2460 <rtems_cpu_usage_report_with_plugin+0x4c> } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)(
256c: e3a01ffa mov r1, #1000 ; 0x3e8 2570: e59d002c ldr r0, [sp, #44] ; 0x2c 2574: eb006402 bl 1b584 <__aeabi_uidiv> 2578: e59f1038 ldr r1, [pc, #56] ; 25b8 <rtems_cpu_usage_report_with_plugin+0x1a4> 257c: e1a03000 mov r3, r0 2580: e59d2028 ldr r2, [sp, #40] ; 0x28 2584: e1a00008 mov r0, r8 2588: e1a0e00f mov lr, pc 258c: e12fff1a bx sl
"-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif }
2590: e28dd040 add sp, sp, #64 ; 0x40 2594: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
0000c4c0 <rtems_deviceio_errno>: { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) {
c4c0: e92d4010 push {r4, lr} <== NOT EXECUTED c4c4: e1a01000 mov r1, r0 <== NOT EXECUTED
int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code)))
c4c8: e59f0018 ldr r0, [pc, #24] ; c4e8 <rtems_deviceio_errno+0x28><== NOT EXECUTED c4cc: eb000006 bl c4ec <rtems_assoc_remote_by_local> <== NOT EXECUTED c4d0: e2504000 subs r4, r0, #0 <== NOT EXECUTED c4d4: 0a000001 beq c4e0 <rtems_deviceio_errno+0x20> <== NOT EXECUTED
{ errno = rc;
c4d8: eb000221 bl cd64 <__errno> <== NOT EXECUTED c4dc: e5804000 str r4, [r0] <== NOT EXECUTED
return -1; } return -1; }
c4e0: e3e00000 mvn r0, #0 <== NOT EXECUTED c4e4: e8bd8010 pop {r4, pc} <== NOT EXECUTED
00006630 <rtems_error>: int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) {
6630: e92d000e push {r1, r2, r3} <== NOT EXECUTED 6634: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist; int chars_written; va_start(arglist, printf_format);
6638: e28d300c add r3, sp, #12 <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
663c: e1a02003 mov r2, r3 <== NOT EXECUTED 6640: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED
) { va_list arglist; int chars_written; va_start(arglist, printf_format);
6644: e58d3000 str r3, [sp] <== NOT EXECUTED
chars_written = rtems_verror(error_flag, printf_format, arglist);
6648: ebffff84 bl 6460 <rtems_verror> <== NOT EXECUTED
va_end(arglist); return chars_written; }
664c: e8bd4008 pop {r3, lr} <== NOT EXECUTED 6650: e28dd00c add sp, sp, #12 <== NOT EXECUTED 6654: e12fff1e bx lr <== NOT EXECUTED
0000187c <rtems_filesystem_evaluate_path>: int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
187c: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr}
/* * Verify Input parameters. */ if ( !pathname )
1880: e2505000 subs r5, r0, #0
int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
1884: e1a07001 mov r7, r1 1888: e1a06002 mov r6, r2 188c: e1a0c003 mov ip, r3 1890: e59da020 ldr sl, [sp, #32]
/* * Verify Input parameters. */ if ( !pathname ) 1894: 1a000002 bne 18a4 <rtems_filesystem_evaluate_path+0x28> rtems_set_errno_and_return_minus_one( EFAULT );
1898: eb002d31 bl cd64 <__errno> <== NOT EXECUTED 189c: e3a0300e mov r3, #14 <== NOT EXECUTED 18a0: ea000003 b 18b4 <rtems_filesystem_evaluate_path+0x38> <== NOT EXECUTED
if ( !pathloc )
18a4: e3530000 cmp r3, #0
18a8: 1a000004 bne 18c0 <rtems_filesystem_evaluate_path+0x44> rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
18ac: eb002d2c bl cd64 <__errno> <== NOT EXECUTED 18b0: e3a03005 mov r3, #5 <== NOT EXECUTED 18b4: e5803000 str r3, [r0] <== NOT EXECUTED
return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); }
18b8: e3e00000 mvn r0, #0 <== NOT EXECUTED 18bc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
/* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc );
18c0: e5d53000 ldrb r3, [r5] 18c4: e353002f cmp r3, #47 ; 0x2f 18c8: 1353005c cmpne r3, #92 ; 0x5c 18cc: 13a08000 movne r8, #0 18d0: 03a08001 moveq r8, #1
18d4: 0a000001 beq 18e0 <rtems_filesystem_evaluate_path+0x64>
18d8: e3530000 cmp r3, #0
18dc: 1a000009 bne 1908 <rtems_filesystem_evaluate_path+0x8c>
18e0: e59f305c ldr r3, [pc, #92] ; 1944 <rtems_filesystem_evaluate_path+0xc8> 18e4: e5934000 ldr r4, [r3] 18e8: e2844018 add r4, r4, #24 18ec: e8b4000f ldm r4!, {r0, r1, r2, r3} 18f0: e1a0800c mov r8, ip 18f4: e8a8000f stmia r8!, {r0, r1, r2, r3} 18f8: e5942000 ldr r2, [r4] 18fc: e5882000 str r2, [r8] 1900: e3a08001 mov r8, #1 1904: ea000007 b 1928 <rtems_filesystem_evaluate_path+0xac> 1908: e59f3034 ldr r3, [pc, #52] ; 1944 <rtems_filesystem_evaluate_path+0xc8> 190c: e5934000 ldr r4, [r3] 1910: e2844004 add r4, r4, #4 1914: e8b4000f ldm r4!, {r0, r1, r2, r3} 1918: e1a0900c mov r9, ip 191c: e8a9000f stmia r9!, {r0, r1, r2, r3} 1920: e5942000 ldr r2, [r4] 1924: e5892000 str r2, [r9]
/* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i],
1928: e0681007 rsb r1, r8, r7 192c: e0850008 add r0, r5, r8 1930: e1a02006 mov r2, r6 1934: e1a0300c mov r3, ip 1938: e58da020 str sl, [sp, #32]
pathnamelen - i, flags, pathloc, follow_link ); }
193c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr}
rtems_filesystem_get_start_loc( pathname, &i, pathloc ); /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i],
1940: eaffff95 b 179c <rtems_filesystem_evaluate_relative_path>
0000179c <rtems_filesystem_evaluate_relative_path>: /* * Verify Input parameters. */ if ( !pathname )
179c: e3500000 cmp r0, #0
int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) {
17a0: e92d4030 push {r4, r5, lr} 17a4: e1a05002 mov r5, r2 17a8: e1a04003 mov r4, r3
/* * Verify Input parameters. */ if ( !pathname ) 17ac: 1a000002 bne 17bc <rtems_filesystem_evaluate_relative_path+0x20> rtems_set_errno_and_return_minus_one( EFAULT );
17b0: eb002d6b bl cd64 <__errno> <== NOT EXECUTED 17b4: e3a0300e mov r3, #14 <== NOT EXECUTED 17b8: ea000027 b 185c <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc )
17bc: e3530000 cmp r3, #0
17c0: 1a000002 bne 17d0 <rtems_filesystem_evaluate_relative_path+0x34> rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */
17c4: eb002d66 bl cd64 <__errno> <== NOT EXECUTED 17c8: e3a03005 mov r3, #5 <== NOT EXECUTED 17cc: ea000022 b 185c <rtems_filesystem_evaluate_relative_path+0xc0><== NOT EXECUTED
if ( !pathloc->ops->evalpath_h )
17d0: e593c00c ldr ip, [r3, #12] 17d4: e59cc000 ldr ip, [ip] 17d8: e35c0000 cmp ip, #0
17dc: 0a00001c beq 1854 <rtems_filesystem_evaluate_relative_path+0xb8> rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc );
17e0: e1a0e00f mov lr, pc 17e4: e12fff1c bx ip
/* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) {
17e8: e59d200c ldr r2, [sp, #12] 17ec: e2703001 rsbs r3, r0, #1 17f0: 33a03000 movcc r3, #0 17f4: e3520000 cmp r2, #0 17f8: 03a03000 moveq r3, #0 17fc: e3530000 cmp r3, #0 1800: 08bd8030 popeq {r4, r5, pc}
if ( !pathloc->ops->node_type_h ){
1804: e594200c ldr r2, [r4, #12] 1808: e5923010 ldr r3, [r2, #16] 180c: e3530000 cmp r3, #0
1810: 0a00000a beq 1840 <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 );
1814: e1a00004 mov r0, r4 1818: e1a0e00f mov lr, pc 181c: e12fff13 bx r3
if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) ||
1820: e2400003 sub r0, r0, #3 1824: e3500001 cmp r0, #1 1828: 83a00000 movhi r0, #0 182c: 88bd8030 pophi {r4, r5, pc}
( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){
1830: e594200c ldr r2, [r4, #12] 1834: e5923034 ldr r3, [r2, #52] ; 0x34 1838: e3530000 cmp r3, #0
183c: 1a000009 bne 1868 <rtems_filesystem_evaluate_relative_path+0xcc> rtems_filesystem_freenode( pathloc );
1840: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 1844: e3530000 cmp r3, #0 <== NOT EXECUTED 1848: 11a00004 movne r0, r4 <== NOT EXECUTED 184c: 11a0e00f movne lr, pc <== NOT EXECUTED 1850: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
1854: eb002d42 bl cd64 <__errno> <== NOT EXECUTED 1858: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 185c: e5803000 str r3, [r0] <== NOT EXECUTED 1860: e3e00000 mvn r0, #0 <== NOT EXECUTED 1864: 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 );
1868: e1a00004 mov r0, r4 186c: e1a01005 mov r1, r5 1870: e1a0e00f mov lr, pc 1874: e12fff13 bx r3
} } return result; }
1878: e8bd8030 pop {r4, r5, pc}
000015fc <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 ) {
15fc: e92d40f0 push {r4, r5, r6, r7, lr}
/* * Set the default umask to "022". */ rtems_filesystem_umask = 022;
1600: e59f6100 ldr r6, [pc, #256] ; 1708 <rtems_filesystem_initialize+0x10c> 1604: e5963000 ldr r3, [r6] 1608: e3a02012 mov r2, #18 160c: e583202c str r2, [r3, #44] ; 0x2c
* configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) {
1610: e24dd01c sub sp, sp, #28
*/ rtems_filesystem_umask = 022; init_fs_mount_table();
1614: eb000215 bl 1e70 <init_fs_mount_table>
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 )
1618: e59f30ec ldr r3, [pc, #236] ; 170c <rtems_filesystem_initialize+0x110> 161c: e5933000 ldr r3, [r3] 1620: e3530000 cmp r3, #0
rtems_fatal_error_occurred( 0xABCD0001 );
1624: 059f00e4 ldreq r0, [pc, #228] ; 1710 <rtems_filesystem_initialize+0x114>
/* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1628: 0a000009 beq 1654 <rtems_filesystem_initialize+0x58> rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0];
162c: e59f30e0 ldr r3, [pc, #224] ; 1714 <rtems_filesystem_initialize+0x118> 1630: e5932000 ldr r2, [r3]
status = mount(
1634: e592300c ldr r3, [r2, #12] 1638: e58d3000 str r3, [sp] 163c: e28d0018 add r0, sp, #24 1640: e892000e ldm r2, {r1, r2, r3} 1644: eb000210 bl 1e8c <mount>
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 )
1648: e3700001 cmn r0, #1
164c: 1a000001 bne 1658 <rtems_filesystem_initialize+0x5c> rtems_fatal_error_occurred( 0xABCD0002 );
1650: e59f00c0 ldr r0, [pc, #192] ; 1718 <rtems_filesystem_initialize+0x11c><== NOT EXECUTED 1654: eb000e97 bl 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
1658: e59de018 ldr lr, [sp, #24]
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0;
165c: e5967000 ldr r7, [r6]
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
1660: e28ee01c add lr, lr, #28 1664: e8be000f ldm lr!, {r0, r1, r2, r3} 1668: e287c018 add ip, r7, #24 166c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1670: e59e3000 ldr r3, [lr]
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0;
1674: e3a05000 mov r5, #0
* * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1678: e28d4004 add r4, sp, #4
* set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root;
167c: e58c3000 str r3, [ip]
&entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0;
1680: e1c753b0 strh r5, [r7, #48] ; 0x30
* * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1684: e1a03004 mov r3, r4 1688: e3a01001 mov r1, #1 168c: e1a02005 mov r2, r5 1690: e59f0084 ldr r0, [pc, #132] ; 171c <rtems_filesystem_initialize+0x120>
rtems_filesystem_root = loc;
1694: e1a07004 mov r7, r4
* * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
1698: e58d5000 str r5, [sp] 169c: eb000076 bl 187c <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
16a0: e596c000 ldr ip, [r6] 16a4: e8b7000f ldm r7!, {r0, r1, r2, r3} 16a8: e28cc018 add ip, ip, #24 16ac: e8ac000f stmia ip!, {r0, r1, r2, r3} 16b0: e5973000 ldr r3, [r7]
/* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
16b4: e1a02005 mov r2, r5
* Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc;
16b8: e58c3000 str r3, [ip]
/* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
16bc: e3a01001 mov r1, #1 16c0: e1a03004 mov r3, r4 16c4: e59f0050 ldr r0, [pc, #80] ; 171c <rtems_filesystem_initialize+0x120> 16c8: e58d5000 str r5, [sp] 16cc: eb00006a bl 187c <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
16d0: e596c000 ldr ip, [r6] 16d4: e8b4000f ldm r4!, {r0, r1, r2, r3} 16d8: e28cc004 add ip, ip, #4 16dc: e8ac000f stmia ip!, {r0, r1, r2, r3} 16e0: 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);
16e4: e59f0034 ldr r0, [pc, #52] ; 1720 <rtems_filesystem_initialize+0x124>
/* 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;
16e8: 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);
16ec: e59f1030 ldr r1, [pc, #48] ; 1724 <rtems_filesystem_initialize+0x128> 16f0: eb000184 bl 1d08 <mkdir>
if ( status != 0 )
16f4: e1500005 cmp r0, r5
rtems_fatal_error_occurred( 0xABCD0003 );
16f8: 159f0028 ldrne r0, [pc, #40] ; 1728 <rtems_filesystem_initialize+0x12c>
* 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 ) 16fc: 1affffd4 bne 1654 <rtems_filesystem_initialize+0x58> * 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. */ }
1700: e28dd01c add sp, sp, #28 1704: e8bd80f0 pop {r4, r5, r6, r7, pc}
0000834c <rtems_filesystem_nodes_equal>: ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){
834c: e5903000 ldr r3, [r0] <== NOT EXECUTED 8350: e5910000 ldr r0, [r1] <== NOT EXECUTED
return ( loc1->node_access == loc2->node_access ); }
8354: e1530000 cmp r3, r0 <== NOT EXECUTED 8358: 13a00000 movne r0, #0 <== NOT EXECUTED 835c: 03a00001 moveq r0, #1 <== NOT EXECUTED 8360: e12fff1e bx lr <== NOT EXECUTED
000014bc <rtems_io_lookup_name>: rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) {
14bc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED 14c0: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 14c4: e1a05001 mov r5, r1 <== NOT EXECUTED 14c8: 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 );
14cc: eb003215 bl dd28 <strlen> <== NOT EXECUTED 14d0: e28d4004 add r4, sp, #4 <== NOT EXECUTED 14d4: e1a01000 mov r1, r0 <== NOT EXECUTED 14d8: e3a02000 mov r2, #0 <== NOT EXECUTED 14dc: e1a03004 mov r3, r4 <== NOT EXECUTED 14e0: e3a0c001 mov ip, #1 <== NOT EXECUTED 14e4: e1a00006 mov r0, r6 <== NOT EXECUTED 14e8: e58dc000 str ip, [sp] <== NOT EXECUTED 14ec: eb0000e2 bl 187c <rtems_filesystem_evaluate_path> <== NOT EXECUTED
the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) {
14f0: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED 14f4: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED 14f8: 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 );
14fc: e1a07000 mov r7, r0 <== NOT EXECUTED
the_jnode = loc.node_access;
1500: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED
if ( !loc.ops->node_type_h ) {
1504: 1a000009 bne 1530 <rtems_io_lookup_name+0x74> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1508: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 150c: e3530000 cmp r3, #0 <== NOT EXECUTED 1510: 11a00004 movne r0, r4 <== NOT EXECUTED 1514: 11a0e00f movne lr, pc <== NOT EXECUTED 1518: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
151c: eb002e10 bl cd64 <__errno> <== NOT EXECUTED 1520: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1524: e5803000 str r3, [r0] <== NOT EXECUTED 1528: e3e00000 mvn r0, #0 <== NOT EXECUTED 152c: ea000026 b 15cc <rtems_io_lookup_name+0x110> <== NOT EXECUTED
} node_type = (*loc.ops->node_type_h)( &loc );
1530: e1a00004 mov r0, r4 <== NOT EXECUTED 1534: e1a0e00f mov lr, pc <== NOT EXECUTED 1538: e12fff13 bx r3 <== NOT EXECUTED
if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) {
153c: e3570000 cmp r7, #0 <== NOT EXECUTED 1540: 03500002 cmpeq r0, #2 <== NOT EXECUTED 1544: 03a0a000 moveq sl, #0 <== NOT EXECUTED 1548: 13a0a001 movne sl, #1 <== NOT EXECUTED 154c: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED 1550: 0a000008 beq 1578 <rtems_io_lookup_name+0xbc> <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1554: e3570000 cmp r7, #0 <== NOT EXECUTED 1558: 0a000018 beq 15c0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED 155c: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 1560: e3530000 cmp r3, #0 <== NOT EXECUTED 1564: 0a000015 beq 15c0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED 1568: e1a00004 mov r0, r4 <== NOT EXECUTED 156c: e1a0e00f mov lr, pc <== NOT EXECUTED 1570: e12fff13 bx r3 <== NOT EXECUTED 1574: ea000011 b 15c0 <rtems_io_lookup_name+0x104> <== NOT EXECUTED
return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name;
1578: e5856000 str r6, [r5] <== NOT EXECUTED
device_info->device_name_length = strlen( name );
157c: e1a00006 mov r0, r6 <== NOT EXECUTED 1580: eb0031e8 bl dd28 <strlen> <== NOT EXECUTED 1584: e5850004 str r0, [r5, #4] <== NOT EXECUTED
device_info->major = the_jnode->info.device.major;
1588: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED 158c: e5853008 str r3, [r5, #8] <== NOT EXECUTED
device_info->minor = the_jnode->info.device.minor;
1590: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
1594: 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;
1598: e585300c str r3, [r5, #12] <== NOT EXECUTED
rtems_filesystem_freenode( &loc );
159c: 0a000009 beq 15c8 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED 15a0: e597301c ldr r3, [r7, #28] <== NOT EXECUTED 15a4: e3530000 cmp r3, #0 <== NOT EXECUTED 15a8: 0a000006 beq 15c8 <rtems_io_lookup_name+0x10c> <== NOT EXECUTED 15ac: e1a00004 mov r0, r4 <== NOT EXECUTED 15b0: e1a0e00f mov lr, pc <== NOT EXECUTED 15b4: e12fff13 bx r3 <== NOT EXECUTED 15b8: e1a0000a mov r0, sl <== NOT EXECUTED 15bc: ea000002 b 15cc <rtems_io_lookup_name+0x110> <== NOT EXECUTED 15c0: e3a0000d mov r0, #13 <== NOT EXECUTED 15c4: ea000000 b 15cc <rtems_io_lookup_name+0x110> <== NOT EXECUTED 15c8: e3a00000 mov r0, #0 <== NOT EXECUTED
return RTEMS_SUCCESSFUL; }
15cc: e28dd018 add sp, sp, #24 <== NOT EXECUTED 15d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED
000019ec <rtems_libio_init>: * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) {
19ec: e92d4011 push {r0, r4, lr}
rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0)
19f0: e59f4098 ldr r4, [pc, #152] ; 1a90 <rtems_libio_init+0xa4> 19f4: e5940000 ldr r0, [r4] 19f8: e3500000 cmp r0, #0
19fc: 0a000013 beq 1a50 <rtems_libio_init+0x64> { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops,
1a00: e3a01040 mov r1, #64 ; 0x40 1a04: eb001d55 bl 8f60 <calloc> 1a08: e59f3084 ldr r3, [pc, #132] ; 1a94 <rtems_libio_init+0xa8>
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL)
1a0c: 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,
1a10: e5830000 str r0, [r3]
sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY);
1a14: 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) 1a18: 0a000015 beq 1a74 <rtems_libio_init+0x88> rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops;
1a1c: e59f3074 ldr r3, [pc, #116] ; 1a98 <rtems_libio_init+0xac>
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1a20: 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;
1a24: e5830000 str r0, [r3]
for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++)
1a28: e3a03000 mov r3, #0 1a2c: ea000000 b 1a34 <rtems_libio_init+0x48>
iop->data1 = iop + 1;
1a30: 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++)
1a34: e2833001 add r3, r3, #1 1a38: e1530001 cmp r3, r1
iop->data1 = iop + 1;
1a3c: 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++)
1a40: e2800040 add r0, r0, #64 ; 0x40
1a44: 3afffff9 bcc 1a30 <rtems_libio_init+0x44> iop->data1 = iop + 1; iop->data1 = NULL;
1a48: e3a03000 mov r3, #0 1a4c: e5823034 str r3, [r2, #52] ; 0x34
/* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create(
1a50: e59fc044 ldr ip, [pc, #68] ; 1a9c <rtems_libio_init+0xb0> 1a54: e59f0044 ldr r0, [pc, #68] ; 1aa0 <rtems_libio_init+0xb4> 1a58: e3a01001 mov r1, #1 1a5c: e3a02054 mov r2, #84 ; 0x54 1a60: e3a03000 mov r3, #0 1a64: e58dc000 str ip, [sp] 1a68: eb000b6c bl 4820 <rtems_semaphore_create>
1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL )
1a6c: e3500000 cmp r0, #0
1a70: 0a000000 beq 1a78 <rtems_libio_init+0x8c> rtems_fatal_error_occurred( rc );
1a74: eb000d8f bl 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
/* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper)
1a78: e59f3024 ldr r3, [pc, #36] ; 1aa4 <rtems_libio_init+0xb8> 1a7c: e5933000 ldr r3, [r3] 1a80: e3530000 cmp r3, #0
(* rtems_fs_init_helper)();
1a84: 11a0e00f movne lr, pc 1a88: 112fff13 bxne r3
}
1a8c: e8bd8018 pop {r3, r4, pc}
00003208 <rtems_libio_set_private_env>: rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
3208: 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);
320c: e3a00000 mov r0, #0
rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) {
3210: 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);
3214: e1a01000 mov r1, r0 3218: e28d2018 add r2, sp, #24 321c: eb000a41 bl 5b28 <rtems_task_ident>
if (sc != RTEMS_SUCCESSFUL) return sc;
3220: e2508000 subs r8, r0, #0
3224: 1a00003f bne 3328 <rtems_libio_set_private_env+0x120> /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) {
3228: e59f4104 ldr r4, [pc, #260] ; 3334 <rtems_libio_set_private_env+0x12c> 322c: e59f3104 ldr r3, [pc, #260] ; 3338 <rtems_libio_set_private_env+0x130> 3230: e5942000 ldr r2, [r4] 3234: e1520003 cmp r2, r3
3238: 1a00000f bne 327c <rtems_libio_set_private_env+0x74> rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t));
323c: e2800048 add r0, r0, #72 ; 0x48 3240: ebfffd11 bl 268c <malloc>
if (!tmp)
3244: e2505000 subs r5, r0, #0 3248: 03a0801a moveq r8, #26
324c: 0a000035 beq 3328 <rtems_libio_set_private_env+0x120> #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);
3250: e1a00008 mov r0, r8 3254: e1a01004 mov r1, r4 3258: e59f20dc ldr r2, [pc, #220] ; 333c <rtems_libio_set_private_env+0x134> 325c: eb000a7e bl 5c5c <rtems_task_variable_add>
if (sc != RTEMS_SUCCESSFUL) {
3260: e2506000 subs r6, r0, #0
* not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp;
3264: 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) { 3268: 0a000003 beq 327c <rtems_libio_set_private_env+0x74> /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp);
326c: e1a00005 mov r0, r5 <== NOT EXECUTED 3270: ebfffb96 bl 20d0 <free> <== NOT EXECUTED 3274: e1a08006 mov r8, r6 <== NOT EXECUTED
return sc;
3278: ea00002a b 3328 <rtems_libio_set_private_env+0x120> <== NOT EXECUTED
} rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/
327c: e59f60b0 ldr r6, [pc, #176] ; 3334 <rtems_libio_set_private_env+0x12c> 3280: e5964000 ldr r4, [r6] 3284: e59f10ac ldr r1, [pc, #172] ; 3338 <rtems_libio_set_private_env+0x130> 3288: e3a02048 mov r2, #72 ; 0x48 328c: e1a00004 mov r0, r4 3290: eb002f66 bl f030 <memcpy>
rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
3294: e59f30a4 ldr r3, [pc, #164] ; 3340 <rtems_libio_set_private_env+0x138> 3298: e593e000 ldr lr, [r3]
} 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*/
329c: e59d3018 ldr r3, [sp, #24] 32a0: e1a0c004 mov ip, r4
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
32a4: e28ee01c add lr, lr, #28
} 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*/
32a8: e48c3018 str r3, [ip], #24
/* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
32ac: e8be000f ldm lr!, {r0, r1, r2, r3} 32b0: e8ac000f stmia ip!, {r0, r1, r2, r3} 32b4: e59e3000 ldr r3, [lr]
* code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
32b8: e28d4004 add r4, sp, #4 32bc: e3a05000 mov r5, #0
*rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC;
32c0: e58c3000 str r3, [ip]
* code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
32c4: e3a01001 mov r1, #1 32c8: e1a03004 mov r3, r4 32cc: e1a02005 mov r2, r5 32d0: e59f006c ldr r0, [pc, #108] ; 3344 <rtems_libio_set_private_env+0x13c>
rtems_filesystem_root = loc;
32d4: e1a07004 mov r7, r4
* code we must _not_ free the original locs because * what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
32d8: e58d5000 str r5, [sp] 32dc: ebfffb48 bl 2004 <rtems_filesystem_evaluate_path>
rtems_filesystem_root = loc;
32e0: e596c000 ldr ip, [r6] 32e4: e8b7000f ldm r7!, {r0, r1, r2, r3} 32e8: e28cc018 add ip, ip, #24 32ec: e8ac000f stmia ip!, {r0, r1, r2, r3} 32f0: e5973000 ldr r3, [r7]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
32f4: e1a02005 mov r2, r5
* what we are trying to do here is forking off * clones. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc;
32f8: e58c3000 str r3, [ip]
rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0);
32fc: e3a01001 mov r1, #1 3300: e1a03004 mov r3, r4 3304: e59f0038 ldr r0, [pc, #56] ; 3344 <rtems_libio_set_private_env+0x13c> 3308: e58d5000 str r5, [sp] 330c: ebfffb3c bl 2004 <rtems_filesystem_evaluate_path>
rtems_filesystem_current = loc;
3310: e596c000 ldr ip, [r6] 3314: e8b4000f ldm r4!, {r0, r1, r2, r3} 3318: e28cc004 add ip, ip, #4 331c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3320: e5973000 ldr r3, [r7] 3324: e58c3000 str r3, [ip]
return RTEMS_SUCCESSFUL; }
3328: e1a00008 mov r0, r8 332c: e28dd01c add sp, sp, #28 3330: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00003164 <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) {
3164: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 3168: 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);
316c: e3a00000 mov r0, #0 <== NOT EXECUTED 3170: e1a01000 mov r1, r0 <== NOT EXECUTED 3174: e1a0200d mov r2, sp <== NOT EXECUTED 3178: eb000a6a bl 5b28 <rtems_task_ident> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
317c: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3180: 1a00001b bne 31f4 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
if (rtems_current_user_env->task_id==current_task_id) {
3184: e59f1070 ldr r1, [pc, #112] ; 31fc <rtems_libio_share_private_env+0x98><== NOT EXECUTED 3188: e5914000 ldr r4, [r1] <== NOT EXECUTED 318c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3190: e5942000 ldr r2, [r4] <== NOT EXECUTED 3194: e1520003 cmp r2, r3 <== NOT EXECUTED 3198: 1a000004 bne 31b0 <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);
319c: eb000ad7 bl 5d00 <rtems_task_variable_delete> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL) return sc;
31a0: e2503000 subs r3, r0, #0 <== NOT EXECUTED 31a4: 1a000012 bne 31f4 <rtems_libio_share_private_env+0x90> <== NOT EXECUTED
free_user_env(tmp);
31a8: e1a00004 mov r0, r4 <== NOT EXECUTED 31ac: ebffffd3 bl 3100 <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,
31b0: e59f4044 ldr r4, [pc, #68] ; 31fc <rtems_libio_share_private_env+0x98><== NOT EXECUTED 31b4: e1a00005 mov r0, r5 <== NOT EXECUTED 31b8: e1a01004 mov r1, r4 <== NOT EXECUTED 31bc: e28d2004 add r2, sp, #4 <== NOT EXECUTED 31c0: eb000aeb bl 5d74 <rtems_task_variable_get> <== NOT EXECUTED
(void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL)
31c4: e2503000 subs r3, r0, #0 <== NOT EXECUTED 31c8: 1a000006 bne 31e8 <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);
31cc: e59f202c ldr r2, [pc, #44] ; 3200 <rtems_libio_share_private_env+0x9c><== NOT EXECUTED 31d0: e1a01004 mov r1, r4 <== NOT EXECUTED 31d4: eb000aa0 bl 5c5c <rtems_task_variable_add> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
31d8: 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;
31dc: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 31e0: 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)
31e4: 0a000002 beq 31f4 <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;
31e8: e59f1014 ldr r1, [pc, #20] ; 3204 <rtems_libio_share_private_env+0xa0><== NOT EXECUTED 31ec: e59f2008 ldr r2, [pc, #8] ; 31fc <rtems_libio_share_private_env+0x98><== NOT EXECUTED 31f0: e5821000 str r1, [r2] <== NOT EXECUTED
return sc; }
31f4: e1a00003 mov r0, r3 <== NOT EXECUTED 31f8: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED
00006604 <rtems_panic>: void rtems_panic( const char *printf_format, ... ) {
6604: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 6608: e92d4001 push {r0, lr} <== NOT EXECUTED
va_list arglist; va_start(arglist, printf_format);
660c: e28d300c add r3, sp, #12 <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6610: e1a02003 mov r2, r3 <== NOT EXECUTED 6614: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 6618: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED
... ) { va_list arglist; va_start(arglist, printf_format);
661c: e58d3000 str r3, [sp] <== NOT EXECUTED
(void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist);
6620: ebffff8e bl 6460 <rtems_verror> <== NOT EXECUTED
va_end(arglist); }
6624: e8bd4008 pop {r3, lr} <== NOT EXECUTED 6628: e28dd010 add sp, sp, #16 <== NOT EXECUTED 662c: e12fff1e bx lr <== NOT EXECUTED
0000ad24 <rtems_pipe_initialize>: /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured)
ad24: e59f3048 ldr r3, [pc, #72] ; ad74 <rtems_pipe_initialize+0x50> ad28: e5d33000 ldrb r3, [r3] ad2c: e3530000 cmp r3, #0
/* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) {
ad30: e92d4001 push {r0, lr}
if (!rtems_pipe_configured) ad34: 0a00000d beq ad70 <rtems_pipe_initialize+0x4c> return; if (rtems_pipe_semaphore)
ad38: e59fc038 ldr ip, [pc, #56] ; ad78 <rtems_pipe_initialize+0x54><== NOT EXECUTED ad3c: e59c3000 ldr r3, [ip] <== NOT EXECUTED ad40: e3530000 cmp r3, #0 <== NOT EXECUTED ad44: 1a000009 bne ad70 <rtems_pipe_initialize+0x4c> <== NOT EXECUTED
return; rtems_status_code sc; sc = rtems_semaphore_create(
ad48: e59f002c ldr r0, [pc, #44] ; ad7c <rtems_pipe_initialize+0x58><== NOT EXECUTED ad4c: e3a01001 mov r1, #1 <== NOT EXECUTED ad50: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED ad54: e58dc000 str ip, [sp] <== NOT EXECUTED ad58: ebffe6b0 bl 4820 <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)
ad5c: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
ad60: 1bffe8d4 blne 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
rtems_interval now; now = rtems_clock_get_ticks_since_boot();
ad64: ebffe5b2 bl 4434 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
rtems_pipe_no = now;
ad68: e59f3010 ldr r3, [pc, #16] ; ad80 <rtems_pipe_initialize+0x5c><== NOT EXECUTED ad6c: e1c300b0 strh r0, [r3] <== NOT EXECUTED
}
ad70: e8bd8008 pop {r3, pc}
000015a8 <rtems_stack_checker_is_blown>: /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
15a8: e92d4810 push {r4, fp, lr}
Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack;
15ac: e59f307c ldr r3, [pc, #124] ; 1630 <rtems_stack_checker_is_blown+0x88> 15b0: e5933000 ldr r3, [r3]
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
15b4: e59300c8 ldr r0, [r3, #200] ; 0xc8
/* * Check if blown */ bool rtems_stack_checker_is_blown( void ) {
15b8: e28db008 add fp, sp, #8
) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) {
15bc: e15b0000 cmp fp, r0 15c0: 33a04000 movcc r4, #0
15c4: 3a000004 bcc 15dc <rtems_stack_checker_is_blown+0x34> } /* * Check if blown */ bool rtems_stack_checker_is_blown( void )
15c8: e59340c4 ldr r4, [r3, #196] ; 0xc4 15cc: e0804004 add r4, r0, r4 15d0: e15b0004 cmp fp, r4 15d4: 83a04000 movhi r4, #0 15d8: 93a04001 movls r4, #1
/* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) {
15dc: e59f3050 ldr r3, [pc, #80] ; 1634 <rtems_stack_checker_is_blown+0x8c> 15e0: e5933000 ldr r3, [r3] 15e4: e3530000 cmp r3, #0 15e8: 03a01001 moveq r1, #1
15ec: 0a000005 beq 1608 <rtems_stack_checker_is_blown+0x60> pattern_ok = (!memcmp(
15f0: e59f1040 ldr r1, [pc, #64] ; 1638 <rtems_stack_checker_is_blown+0x90> 15f4: e2800008 add r0, r0, #8 15f8: e3a02010 mov r2, #16 15fc: eb002ff0 bl d5c4 <memcmp> 1600: e2701001 rsbs r1, r0, #1 1604: 33a01000 movcc r1, #0
} /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok )
1608: e3540000 cmp r4, #0
160c: 0a000002 beq 161c <rtems_stack_checker_is_blown+0x74>
1610: e3510000 cmp r1, #0 1614: 13a00000 movne r0, #0 1618: 18bd8810 popne {r4, fp, pc}
return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok );
161c: e59f300c ldr r3, [pc, #12] ; 1630 <rtems_stack_checker_is_blown+0x88><== NOT EXECUTED 1620: e5930000 ldr r0, [r3] <== NOT EXECUTED 1624: ebffffb4 bl 14fc <Stack_check_report_blown_task> <== NOT EXECUTED 1628: e3a00001 mov r0, #1 <== NOT EXECUTED
return true; }
162c: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED
000014ec <rtems_stack_checker_report_usage>: void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin );
14ec: e59f1004 ldr r1, [pc, #4] ; 14f8 <rtems_stack_checker_report_usage+0xc><== NOT EXECUTED 14f0: e3a00000 mov r0, #0 <== NOT EXECUTED 14f4: eaffffe3 b 1488 <rtems_stack_checker_report_usage_with_plugin><== NOT EXECUTED
00001488 <rtems_stack_checker_report_usage_with_plugin>: void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) {
1488: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED
print_context = context;
148c: e59f4048 ldr r4, [pc, #72] ; 14dc <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 ) {
1490: e1a05001 mov r5, r1 <== NOT EXECUTED 1494: e1a06000 mov r6, r0 <== NOT EXECUTED
print_context = context; print_handler = print;
1498: 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;
149c: e5840008 str r0, [r4, #8] <== NOT EXECUTED
print_handler = print; (*print)( context, "Stack usage by thread\n");
14a0: e59f1038 ldr r1, [pc, #56] ; 14e0 <rtems_stack_checker_report_usage_with_plugin+0x58><== NOT EXECUTED 14a4: e1a0e00f mov lr, pc <== NOT EXECUTED 14a8: e12fff15 bx r5 <== NOT EXECUTED
(*print)( context,
14ac: e59f1030 ldr r1, [pc, #48] ; 14e4 <rtems_stack_checker_report_usage_with_plugin+0x5c><== NOT EXECUTED 14b0: e1a00006 mov r0, r6 <== NOT EXECUTED 14b4: e1a0e00f mov lr, pc <== NOT EXECUTED 14b8: 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 );
14bc: e59f0024 ldr r0, [pc, #36] ; 14e8 <rtems_stack_checker_report_usage_with_plugin+0x60><== NOT EXECUTED 14c0: eb001226 bl 5d60 <rtems_iterate_over_all_threads> <== NOT EXECUTED
/* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1);
14c4: e3e00000 mvn r0, #0 <== NOT EXECUTED 14c8: ebffff9f bl 134c <Stack_check_Dump_threads_usage> <== NOT EXECUTED
print_context = NULL;
14cc: e3a03000 mov r3, #0 <== NOT EXECUTED
print_handler = NULL;
14d0: 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;
14d4: e5843008 str r3, [r4, #8] <== NOT EXECUTED
print_handler = NULL; }
14d8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
0000afec <rtems_string_to_pointer>: #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
afec: e92d40f1 push {r0, r4, r5, r6, r7, lr}
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
aff0: e2514000 subs r4, r1, #0
#if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) {
aff4: e1a05000 mov r5, r0 aff8: e1a06002 mov r6, r2
STRING_TO_INPUT_TYPE result; char *end; if ( !n )
affc: 03a00009 moveq r0, #9
b000: 0a000018 beq b068 <rtems_string_to_pointer+0x7c> return RTEMS_INVALID_ADDRESS; errno = 0;
b004: eb0009b1 bl d6d0 <__errno> b008: e3a03000 mov r3, #0 b00c: e5803000 str r3, [r0]
*n = 0;
b010: e5843000 str r3, [r4]
#ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 );
b014: e1a00005 mov r0, r5 b018: e1a0100d mov r1, sp b01c: e3a02010 mov r2, #16 b020: eb0016ae bl 10ae0 <strtoul>
#elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr )
b024: e3560000 cmp r6, #0
*endptr = end;
b028: 159d3000 ldrne r3, [sp] b02c: 15863000 strne r3, [r6]
/* nothing was converted */ if ( end == s )
b030: e59d3000 ldr r3, [sp] b034: e1530005 cmp r3, r5
*n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 );
b038: e1a07000 mov r7, r0
/* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s )
b03c: 03a0000b moveq r0, #11
b040: 0a000008 beq b068 <rtems_string_to_pointer+0x7c> return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE))
b044: e3770001 cmn r7, #1
b048: 1a000004 bne b060 <rtems_string_to_pointer+0x74>
b04c: eb00099f bl d6d0 <__errno> <== NOT EXECUTED b050: e5903000 ldr r3, [r0] <== NOT EXECUTED b054: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED b058: 03a0000a moveq r0, #10 <== NOT EXECUTED b05c: 0a000001 beq b068 <rtems_string_to_pointer+0x7c> <== NOT EXECUTED
if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result;
b060: e5847000 str r7, [r4] b064: e3a00000 mov r0, #0
#else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; }
b068: e8bd80f8 pop {r3, r4, r5, r6, r7, pc}
00003ba0 <rtems_termios_baud_to_index>: rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3ba0: e3500009 cmp r0, #9 3ba4: 012fff1e bxeq lr
3ba8: ca000016 bgt 3c08 <rtems_termios_baud_to_index+0x68>
3bac: e3500004 cmp r0, #4 3bb0: 012fff1e bxeq lr
3bb4: ca00000a bgt 3be4 <rtems_termios_baud_to_index+0x44>
3bb8: e3500001 cmp r0, #1 3bbc: 012fff1e bxeq lr
3bc0: ca000002 bgt 3bd0 <rtems_termios_baud_to_index+0x30>
3bc4: e3500000 cmp r0, #0 3bc8: 012fff1e bxeq lr 3bcc: ea000030 b 3c94 <rtems_termios_baud_to_index+0xf4>
3bd0: e3500002 cmp r0, #2 <== NOT EXECUTED 3bd4: 012fff1e bxeq lr <== NOT EXECUTED 3bd8: e3500003 cmp r0, #3 <== NOT EXECUTED 3bdc: 1a00002c bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3be0: e12fff1e bx lr <== NOT EXECUTED 3be4: e3500006 cmp r0, #6 <== NOT EXECUTED 3be8: 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;
3bec: b3a00005 movlt r0, #5 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3bf0: b12fff1e bxlt lr <== NOT EXECUTED 3bf4: e3500007 cmp r0, #7 <== NOT EXECUTED 3bf8: 012fff1e bxeq lr <== NOT EXECUTED 3bfc: e3500008 cmp r0, #8 <== NOT EXECUTED 3c00: 1a000023 bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c04: e12fff1e bx lr <== NOT EXECUTED 3c08: e350000e cmp r0, #14 <== NOT EXECUTED 3c0c: 012fff1e bxeq lr <== NOT EXECUTED 3c10: ca000008 bgt 3c38 <rtems_termios_baud_to_index+0x98> <== NOT EXECUTED 3c14: e350000b cmp r0, #11 <== NOT EXECUTED 3c18: 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;
3c1c: b3a0000a movlt r0, #10 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3c20: b12fff1e bxlt lr <== NOT EXECUTED 3c24: e350000c cmp r0, #12 <== NOT EXECUTED 3c28: 012fff1e bxeq lr <== NOT EXECUTED 3c2c: e350000d cmp r0, #13 <== NOT EXECUTED 3c30: 1a000017 bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c34: e12fff1e bx lr <== NOT EXECUTED 3c38: e59f305c ldr r3, [pc, #92] ; 3c9c <rtems_termios_baud_to_index+0xfc><== NOT EXECUTED 3c3c: 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;
3c40: 03a00011 moveq r0, #17 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3c44: 012fff1e bxeq lr <== NOT EXECUTED 3c48: ca000005 bgt 3c64 <rtems_termios_baud_to_index+0xc4> <== NOT EXECUTED 3c4c: e350000f cmp r0, #15 <== NOT EXECUTED 3c50: 012fff1e bxeq lr <== NOT EXECUTED 3c54: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3c58: e1500003 cmp r0, r3 <== NOT EXECUTED 3c5c: 1a00000c bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c60: ea000007 b 3c84 <rtems_termios_baud_to_index+0xe4> <== NOT EXECUTED 3c64: e59f3034 ldr r3, [pc, #52] ; 3ca0 <rtems_termios_baud_to_index+0x100><== NOT EXECUTED 3c68: 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;
3c6c: 03a00012 moveq r0, #18 <== NOT EXECUTED
rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) {
3c70: 012fff1e bxeq lr <== NOT EXECUTED 3c74: e2833001 add r3, r3, #1 <== NOT EXECUTED 3c78: e1500003 cmp r0, r3 <== NOT EXECUTED 3c7c: 1a000004 bne 3c94 <rtems_termios_baud_to_index+0xf4> <== NOT EXECUTED 3c80: ea000001 b 3c8c <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;
3c84: e3a00010 mov r0, #16 <== NOT EXECUTED
case B57600: baud_index = 16; break;
3c88: e12fff1e bx lr <== NOT EXECUTED
case B115200: baud_index = 17; break; case B230400: baud_index = 18; break;
3c8c: e3a00013 mov r0, #19 <== NOT EXECUTED
case B460800: baud_index = 19; break;
3c90: e12fff1e bx lr <== NOT EXECUTED
3c94: e3e00000 mvn r0, #0
default: baud_index = -1; break; } return baud_index; }
3c98: e12fff1e bx lr
000026c0 <rtems_termios_bufsize>: int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize;
26c0: e59f3008 ldr r3, [pc, #8] ; 26d0 <rtems_termios_bufsize+0x10><== NOT EXECUTED 26c4: 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; }
26c8: e3a00000 mov r0, #0 <== NOT EXECUTED 26cc: e12fff1e bx lr <== NOT EXECUTED
00003acc <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);
3acc: e59f2180 ldr r2, [pc, #384] ; 3c54 <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;
3ad0: e5903000 ldr r3, [r0]
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3ad4: e3a01000 mov r1, #0
} } rtems_status_code rtems_termios_close (void *arg) {
3ad8: e92d4030 push {r4, r5, lr} 3adc: 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);
3ae0: e5920000 ldr r0, [r2] 3ae4: 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;
3ae8: e5934034 ldr r4, [r3, #52] ; 0x34
rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3aec: eb0003dd bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
3af0: e3500000 cmp r0, #0
3af4: 1a000022 bne 3b84 <rtems_termios_close+0xb8> rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) {
3af8: e5943008 ldr r3, [r4, #8] 3afc: e2433001 sub r3, r3, #1 3b00: e3530000 cmp r3, #0 3b04: e5843008 str r3, [r4, #8]
3b08: 1a00004c bne 3c40 <rtems_termios_close+0x174> if (rtems_termios_linesw[tty->t_line].l_close != NULL) {
3b0c: e59420cc ldr r2, [r4, #204] ; 0xcc 3b10: e59f3140 ldr r3, [pc, #320] ; 3c58 <rtems_termios_close+0x18c> 3b14: e0833282 add r3, r3, r2, lsl #5 3b18: e5931004 ldr r1, [r3, #4] 3b1c: e3510000 cmp r1, #0
3b20: 0a000003 beq 3b34 <rtems_termios_close+0x68> /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3b24: e1a00004 mov r0, r4 <== NOT EXECUTED 3b28: e1a0e00f mov lr, pc <== NOT EXECUTED 3b2c: e12fff11 bx r1 <== NOT EXECUTED 3b30: ea000006 b 3b50 <rtems_termios_close+0x84> <== NOT EXECUTED
} else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3b34: e5940018 ldr r0, [r4, #24] 3b38: e1a02001 mov r2, r1 3b3c: eb0003c9 bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
3b40: e3500000 cmp r0, #0
3b44: 1a00000e bne 3b84 <rtems_termios_close+0xb8> rtems_fatal_error_occurred (sc); } drainOutput (tty);
3b48: e1a00004 mov r0, r4 3b4c: ebfffe05 bl 3368 <drainOutput>
} if (tty->device.outputUsesInterrupts
3b50: e59430b4 ldr r3, [r4, #180] ; 0xb4 3b54: e3530002 cmp r3, #2
3b58: 1a00000a bne 3b88 <rtems_termios_close+0xbc> == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send(
3b5c: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 3b60: e3a01001 mov r1, #1 <== NOT EXECUTED 3b64: eb0002ab bl 4618 <rtems_event_send> <== NOT EXECUTED
tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
3b68: e3500000 cmp r0, #0 <== NOT EXECUTED 3b6c: 1a000004 bne 3b84 <rtems_termios_close+0xb8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_event_send(
3b70: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3b74: e3a01001 mov r1, #1 <== NOT EXECUTED 3b78: eb0002a6 bl 4618 <rtems_event_send> <== NOT EXECUTED
tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL)
3b7c: e3500000 cmp r0, #0 <== NOT EXECUTED 3b80: 0a000000 beq 3b88 <rtems_termios_close+0xbc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
3b84: eb00054b bl 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
} if (tty->device.lastClose)
3b88: e594309c ldr r3, [r4, #156] ; 0x9c 3b8c: e3530000 cmp r3, #0
(*tty->device.lastClose)(tty->major, tty->minor, arg);
3b90: 11a02005 movne r2, r5 3b94: 1284000c addne r0, r4, #12 3b98: 18900003 ldmne r0, {r0, r1} 3b9c: 11a0e00f movne lr, pc 3ba0: 112fff13 bxne r3
if (tty->forw == NULL) {
3ba4: e894000c ldm r4, {r2, r3} 3ba8: e3520000 cmp r2, #0
if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back;
3bac: 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) { 3bb0: 1a000003 bne 3bc4 <rtems_termios_close+0xf8> rtems_termios_ttyTail = tty->back;
3bb4: e59f10a0 ldr r1, [pc, #160] ; 3c5c <rtems_termios_close+0x190>
if ( rtems_termios_ttyTail != NULL ) {
3bb8: 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;
3bbc: e5813000 str r3, [r1]
if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL;
3bc0: 15832000 strne r2, [r3]
} } else { tty->forw->back = tty->back; } if (tty->back == NULL) {
3bc4: e5942004 ldr r2, [r4, #4] 3bc8: e5943000 ldr r3, [r4] 3bcc: e3520000 cmp r2, #0
if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw;
3bd0: 15823000 strne r3, [r2]
} } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3bd4: 1a000003 bne 3be8 <rtems_termios_close+0x11c> rtems_termios_ttyHead = tty->forw;
3bd8: e59f1080 ldr r1, [pc, #128] ; 3c60 <rtems_termios_close+0x194>
if ( rtems_termios_ttyHead != NULL ) {
3bdc: e3530000 cmp r3, #0
} else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw;
3be0: e5813000 str r3, [r1]
if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL;
3be4: 15832004 strne r2, [r3, #4]
} } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem);
3be8: e5940014 ldr r0, [r4, #20] 3bec: eb000376 bl 49cc <rtems_semaphore_delete>
rtems_semaphore_delete (tty->osem);
3bf0: e5940018 ldr r0, [r4, #24] 3bf4: eb000374 bl 49cc <rtems_semaphore_delete>
rtems_semaphore_delete (tty->rawOutBuf.Semaphore);
3bf8: e594008c ldr r0, [r4, #140] ; 0x8c 3bfc: eb000372 bl 49cc <rtems_semaphore_delete>
if ((tty->device.pollRead == NULL) ||
3c00: e59430a0 ldr r3, [r4, #160] ; 0xa0 3c04: e3530000 cmp r3, #0
3c08: 0a000002 beq 3c18 <rtems_termios_close+0x14c> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN))
3c0c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3c10: e3530002 cmp r3, #2
3c14: 1a000001 bne 3c20 <rtems_termios_close+0x154> rtems_semaphore_delete (tty->rawInBuf.Semaphore);
3c18: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 3c1c: eb00036a bl 49cc <rtems_semaphore_delete> <== NOT EXECUTED
free (tty->rawInBuf.theBuf);
3c20: e5940058 ldr r0, [r4, #88] ; 0x58 3c24: ebfff747 bl 1948 <free>
free (tty->rawOutBuf.theBuf);
3c28: e594007c ldr r0, [r4, #124] ; 0x7c 3c2c: ebfff745 bl 1948 <free>
free (tty->cbuf);
3c30: e594001c ldr r0, [r4, #28] 3c34: ebfff743 bl 1948 <free>
free (tty);
3c38: e1a00004 mov r0, r4 3c3c: ebfff741 bl 1948 <free>
} rtems_semaphore_release (rtems_termios_ttyMutex);
3c40: e59f300c ldr r3, [pc, #12] ; 3c54 <rtems_termios_close+0x188> 3c44: e5930000 ldr r0, [r3] 3c48: eb0003cc bl 4b80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
3c4c: e3a00000 mov r0, #0 3c50: e8bd8030 pop {r4, r5, pc}
000028c4 <rtems_termios_dequeue_characters>: rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
28c4: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
28c8: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
28cc: e08c1001 add r1, ip, r1 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
28d0: 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) {
28d4: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len;
28d8: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED
if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
28dc: 1a000005 bne 28f8 <rtems_termios_dequeue_characters+0x34> <== NOT EXECUTED
/* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId,
28e0: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 28e4: e1a01002 mov r1, r2 <== NOT EXECUTED 28e8: eb00074a bl 4618 <rtems_event_send> <== NOT EXECUTED
TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL)
28ec: e3500000 cmp r0, #0 <== NOT EXECUTED 28f0: 0a00000c beq 2928 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
28f4: eb0009ef bl 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) {
28f8: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 28fc: e3530005 cmp r3, #5 <== NOT EXECUTED 2900: 1a000006 bne 2920 <rtems_termios_dequeue_characters+0x5c> <== NOT EXECUTED
/* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
2904: e59f3024 ldr r3, [pc, #36] ; 2930 <rtems_termios_dequeue_characters+0x6c><== NOT EXECUTED 2908: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 290c: e3530000 cmp r3, #0 <== NOT EXECUTED 2910: 0a000004 beq 2928 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
2914: e1a0e00f mov lr, pc <== NOT EXECUTED 2918: e12fff13 bx r3 <== NOT EXECUTED 291c: ea000001 b 2928 <rtems_termios_dequeue_characters+0x64> <== NOT EXECUTED
return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } }
2920: 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);
2924: eaffff6d b 26e0 <rtems_termios_refill_transmitter> <== NOT EXECUTED
} }
2928: e3a00000 mov r0, #0 <== NOT EXECUTED 292c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00002934 <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) {
2934: 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) {
2938: e59f32b8 ldr r3, [pc, #696] ; 2bf8 <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) {
293c: 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) {
2940: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED 2944: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 2948: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 294c: 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) {
2950: 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);
2954: 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);
2958: 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);
295c: 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) {
2960: 1a00000e bne 29a0 <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);
2964: e1a08002 mov r8, r2 <== NOT EXECUTED 2968: 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,
296c: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 2970: 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);
2974: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2978: e1a09006 mov r9, r6 <== NOT EXECUTED 297c: e1a05006 mov r5, r6 <== NOT EXECUTED 2980: ea000091 b 2bcc <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);
2984: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2988: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 298c: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 2990: e1a0e00f mov lr, pc <== NOT EXECUTED 2994: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 2998: e2866001 add r6, r6, #1 <== NOT EXECUTED 299c: 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--) {
29a0: e3550000 cmp r5, #0 <== NOT EXECUTED
c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty);
29a4: 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--) {
29a8: 1afffff5 bne 2984 <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 )) {
29ac: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 29b0: e3530000 cmp r3, #0 <== NOT EXECUTED 29b4: 1a00008c bne 2bec <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED 29b8: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 29bc: e3530000 cmp r3, #0 <== NOT EXECUTED 29c0: 0a000089 beq 2bec <rtems_termios_enqueue_raw_characters+0x2b8><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
29c4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 29c8: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 29cc: e1a0e00f mov lr, pc <== NOT EXECUTED 29d0: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
29d4: e3a03001 mov r3, #1 <== NOT EXECUTED 29d8: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 29dc: ea000083 b 2bf0 <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) {
29e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 29e4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED
} return 0; } while (len--) { c = *buf++;
29e8: 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) {
29ec: 0a00000f beq 2a30 <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]) {
29f0: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 29f4: e152000a cmp r2, sl <== NOT EXECUTED 29f8: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 29fc: 1a000007 bne 2a20 <rtems_termios_enqueue_raw_characters+0xec><== NOT EXECUTED
if (c == tty->termios.c_cc[VSTART]) {
2a00: e1530002 cmp r3, r2 <== NOT EXECUTED
/* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF;
2a04: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
2a08: 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;
2a0c: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED
} else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF;
2a10: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 2a14: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped;
2a18: e3a09001 mov r9, #1 <== NOT EXECUTED 2a1c: ea000005 b 2a38 <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]) {
2a20: e153000a cmp r3, sl <== NOT EXECUTED
/* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF;
2a24: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2a28: 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]) {
2a2c: 0afffff8 beq 2a14 <rtems_termios_enqueue_raw_characters+0xe0><== NOT EXECUTED
/* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) {
2a30: e3590000 cmp r9, #0 <== NOT EXECUTED 2a34: 0a000015 beq 2a90 <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) {
2a38: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2a3c: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 2a40: e3530020 cmp r3, #32 <== NOT EXECUTED 2a44: 1a00005e bne 2bc4 <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 (
2a48: e10f7000 mrs r7, CPSR <== NOT EXECUTED 2a4c: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 2a50: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
2a54: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2a58: 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;
2a5c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2a60: 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;
2a64: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
2a68: 0a000006 beq 2a88 <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);
2a6c: 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,
2a70: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2a74: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2a78: e0811003 add r1, r1, r3 <== NOT EXECUTED 2a7c: e3a02001 mov r2, #1 <== NOT EXECUTED 2a80: e1a0e00f mov lr, pc <== NOT EXECUTED 2a84: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2a88: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 2a8c: ea00004c b 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
/* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size;
2a90: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2a94: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2a98: e2800001 add r0, r0, #1 <== NOT EXECUTED 2a9c: eb004ec7 bl 165c0 <__umodsi3> <== NOT EXECUTED 2aa0: e1a07000 mov r7, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2aa4: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2aa8: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 2aac: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2ab0: e58d2000 str r2, [sp] <== NOT EXECUTED
/* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size)
2ab4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2ab8: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 2abc: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 2ac0: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2ac4: e0800007 add r0, r0, r7 <== NOT EXECUTED 2ac8: eb004ebc bl 165c0 <__umodsi3> <== NOT EXECUTED
% tty->rawInBuf.Size) > tty->highwater) &&
2acc: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 2ad0: e1500003 cmp r0, r3 <== NOT EXECUTED 2ad4: 9a000025 bls 2b70 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
!(tty->flow_ctrl & FL_IREQXOF)) {
2ad8: 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)
2adc: e3130001 tst r3, #1 <== NOT EXECUTED 2ae0: 1a000022 bne 2b70 <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;
2ae4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ae8: e3833001 orr r3, r3, #1 <== NOT EXECUTED 2aec: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF))
2af0: e59f3104 ldr r3, [pc, #260] ; 2bfc <rtems_termios_enqueue_raw_characters+0x2c8><== NOT EXECUTED 2af4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2af8: e0023003 and r3, r2, r3 <== NOT EXECUTED 2afc: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 2b00: 1a00000e bne 2b40 <rtems_termios_enqueue_raw_characters+0x20c><== NOT EXECUTED
== (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) ||
2b04: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b08: e3130020 tst r3, #32 <== NOT EXECUTED 2b0c: 1a000002 bne 2b1c <rtems_termios_enqueue_raw_characters+0x1e8><== NOT EXECUTED
(tty->rawOutBufState == rob_idle)) {
2b10: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2b14: e3530000 cmp r3, #0 <== NOT EXECUTED 2b18: 1a000014 bne 2b70 <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;
2b1c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b20: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2b24: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
2b28: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2b2c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 2b30: e3a02001 mov r2, #1 <== NOT EXECUTED 2b34: e1a0e00f mov lr, pc <== NOT EXECUTED 2b38: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2b3c: ea00000b b 2b70 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF))
2b40: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2b44: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2b48: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2b4c: 1a000007 bne 2b70 <rtems_termios_enqueue_raw_characters+0x23c><== NOT EXECUTED
== (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
2b50: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
2b54: 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;
2b58: e3822004 orr r2, r2, #4 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) {
2b5c: e3530000 cmp r3, #0 <== NOT EXECUTED
1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF;
2b60: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor);
2b64: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2b68: 11a0e00f movne lr, pc <== NOT EXECUTED 2b6c: 112fff13 bxne r3 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2b70: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2b74: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
} } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) {
2b78: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2b7c: e1570003 cmp r7, r3 <== NOT EXECUTED
dropped++;
2b80: 02855001 addeq r5, r5, #1 <== NOT EXECUTED
} } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) {
2b84: 0a00000e beq 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
dropped++; } else { tty->rawInBuf.theBuf[newTail] = c;
2b88: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2b8c: 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 )) {
2b90: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2b94: e3530000 cmp r3, #0 <== NOT EXECUTED
if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail;
2b98: 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 )) {
2b9c: 1a000008 bne 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED 2ba0: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2ba4: e3530000 cmp r3, #0 <== NOT EXECUTED 2ba8: 0a000005 beq 2bc4 <rtems_termios_enqueue_raw_characters+0x290><== NOT EXECUTED
(*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg);
2bac: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 2bb0: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 2bb4: e1a0e00f mov lr, pc <== NOT EXECUTED 2bb8: e12fff13 bx r3 <== NOT EXECUTED
tty->tty_rcvwakeup = 1;
2bbc: e3a02001 mov r2, #1 <== NOT EXECUTED 2bc0: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 2bc4: e2866001 add r6, r6, #1 <== NOT EXECUTED 2bc8: e2488001 sub r8, r8, #1 <== NOT EXECUTED
tty->tty_rcvwakeup = 1; } return 0; } while (len--) {
2bcc: e3580000 cmp r8, #0 <== NOT EXECUTED 2bd0: 1affff82 bne 29e0 <rtems_termios_enqueue_raw_characters+0xac><== NOT EXECUTED
tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped;
2bd4: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 2bd8: e0833005 add r3, r3, r5 <== NOT EXECUTED 2bdc: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED
rtems_semaphore_release (tty->rawInBuf.Semaphore);
2be0: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 2be4: eb0007e5 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
return dropped;
2be8: ea000000 b 2bf0 <rtems_termios_enqueue_raw_characters+0x2bc><== NOT EXECUTED 2bec: e3a05000 mov r5, #0 <== NOT EXECUTED
}
2bf0: e1a00005 mov r0, r5 <== NOT EXECUTED 2bf4: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED
00003724 <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;
3724: e5903000 ldr r3, [r0]
struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0;
3728: e3a01000 mov r1, #0
} } rtems_status_code rtems_termios_ioctl (void *arg) {
372c: 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;
3730: 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;
3734: e5934034 ldr r4, [r3, #52] ; 0x34
} } rtems_status_code rtems_termios_ioctl (void *arg) {
3738: 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);
373c: e1a02001 mov r2, r1 3740: 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;
3744: e5957008 ldr r7, [r5, #8]
rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3748: eb0004c6 bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL) {
374c: e2506000 subs r6, r0, #0
3750: 1a0000d7 bne 3ab4 <rtems_termios_ioctl+0x390> args->ioctl_return = sc; return sc; } switch (args->command) {
3754: e5953004 ldr r3, [r5, #4] 3758: e3530004 cmp r3, #4
375c: 0a0000ab beq 3a10 <rtems_termios_ioctl+0x2ec> 3760: 8a000005 bhi 377c <rtems_termios_ioctl+0x58>
3764: e3530002 cmp r3, #2
3768: 0a000029 beq 3814 <rtems_termios_ioctl+0xf0> 376c: 8a0000a0 bhi 39f4 <rtems_termios_ioctl+0x2d0>
3770: e3530001 cmp r3, #1
3774: 1a000010 bne 37bc <rtems_termios_ioctl+0x98>
3778: ea00001b b 37ec <rtems_termios_ioctl+0xc8>
377c: e59f233c ldr r2, [pc, #828] ; 3ac0 <rtems_termios_ioctl+0x39c><== NOT EXECUTED 3780: e1530002 cmp r3, r2 <== NOT EXECUTED 3784: 0a0000bd beq 3a80 <rtems_termios_ioctl+0x35c> <== NOT EXECUTED 3788: 8a000002 bhi 3798 <rtems_termios_ioctl+0x74> <== NOT EXECUTED 378c: e3530005 cmp r3, #5 <== NOT EXECUTED 3790: 1a000009 bne 37bc <rtems_termios_ioctl+0x98> <== NOT EXECUTED 3794: ea000099 b 3a00 <rtems_termios_ioctl+0x2dc> <== NOT EXECUTED 3798: e59f2324 ldr r2, [pc, #804] ; 3ac4 <rtems_termios_ioctl+0x3a0><== NOT EXECUTED 379c: 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;
37a0: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 37a4: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 37a8: 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) {
37ac: 0a0000be beq 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED 37b0: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 37b4: e1530002 cmp r3, r2 <== NOT EXECUTED 37b8: 0a000098 beq 3a20 <rtems_termios_ioctl+0x2fc> <== NOT EXECUTED
default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) {
37bc: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 37c0: e59f3300 ldr r3, [pc, #768] ; 3ac8 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED 37c4: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 37c8: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 37cc: e3530000 cmp r3, #0 <== NOT EXECUTED 37d0: 03a0600a moveq r6, #10 <== NOT EXECUTED 37d4: 0a0000b4 beq 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args);
37d8: e1a00004 mov r0, r4 <== NOT EXECUTED 37dc: e1a01005 mov r1, r5 <== NOT EXECUTED 37e0: e1a0e00f mov lr, pc <== NOT EXECUTED 37e4: e12fff13 bx r3 <== NOT EXECUTED 37e8: ea0000a2 b 3a78 <rtems_termios_ioctl+0x354> <== NOT EXECUTED
sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios;
37ec: e5957008 ldr r7, [r5, #8] 37f0: e284c030 add ip, r4, #48 ; 0x30 37f4: e8bc000f ldm ip!, {r0, r1, r2, r3} 37f8: e1a0e007 mov lr, r7 37fc: e8ae000f stmia lr!, {r0, r1, r2, r3} 3800: e8bc000f ldm ip!, {r0, r1, r2, r3} 3804: e8ae000f stmia lr!, {r0, r1, r2, r3} 3808: e59c3000 ldr r3, [ip] 380c: e58e3000 str r3, [lr]
break;
3810: ea0000a5 b 3aac <rtems_termios_ioctl+0x388>
case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer;
3814: e595e008 ldr lr, [r5, #8] 3818: e8be000f ldm lr!, {r0, r1, r2, r3} 381c: e284c030 add ip, r4, #48 ; 0x30 3820: e8ac000f stmia ip!, {r0, r1, r2, r3} 3824: e8be000f ldm lr!, {r0, r1, r2, r3} 3828: 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) &&
382c: 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;
3830: 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) &&
3834: 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;
3838: 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) && 383c: 0a000019 beq 38a8 <rtems_termios_ioctl+0x184>
3840: e5943030 ldr r3, [r4, #48] ; 0x30 3844: e3130b01 tst r3, #1024 ; 0x400
3848: 1a000016 bne 38a8 <rtems_termios_ioctl+0x184> !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF);
384c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3850: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3854: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) {
3858: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 385c: e3130020 tst r3, #32 <== NOT EXECUTED 3860: 0a000010 beq 38a8 <rtems_termios_ioctl+0x184> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
3864: e10f7000 mrs r7, CPSR <== NOT EXECUTED 3868: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 386c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
/* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP;
3870: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
3874: 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;
3878: e3c33020 bic r3, r3, #32 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
387c: 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;
3880: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) {
3884: 0a000006 beq 38a4 <rtems_termios_ioctl+0x180> <== NOT EXECUTED
/* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
3888: 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,
388c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3890: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3894: e0811003 add r1, r1, r3 <== NOT EXECUTED 3898: e3a02001 mov r2, #1 <== NOT EXECUTED 389c: e1a0e00f mov lr, pc <== NOT EXECUTED 38a0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
38a4: 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) &&
38a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 38ac: e3130b01 tst r3, #1024 ; 0x400
38b0: 0a000008 beq 38d8 <rtems_termios_ioctl+0x1b4>
38b4: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 38b8: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 38bc: 1a000005 bne 38d8 <rtems_termios_ioctl+0x1b4> <== NOT EXECUTED
!(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF);
38c0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38c4: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 38c8: 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);
38cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38d0: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 38d4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
} /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) &&
38d8: e59430b8 ldr r3, [r4, #184] ; 0xb8 38dc: e3130c01 tst r3, #256 ; 0x100
38e0: 0a000010 beq 3928 <rtems_termios_ioctl+0x204>
38e4: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 38e8: e3530000 cmp r3, #0 <== NOT EXECUTED 38ec: ba00000d blt 3928 <rtems_termios_ioctl+0x204> <== NOT EXECUTED
!(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS);
38f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 38f4: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 38f8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) &&
38fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3900: e3130004 tst r3, #4 <== NOT EXECUTED 3904: 0a000004 beq 391c <rtems_termios_ioctl+0x1f8> <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) {
3908: 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) &&
390c: e3530000 cmp r3, #0 <== NOT EXECUTED
(tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor);
3910: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3914: 11a0e00f movne lr, pc <== NOT EXECUTED 3918: 112fff13 bxne r3 <== NOT EXECUTED
} tty->flow_ctrl &= ~(FL_IRTSOFF);
391c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3920: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3924: 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) {
3928: e5943038 ldr r3, [r4, #56] ; 0x38 392c: e3530000 cmp r3, #0
tty->flow_ctrl |= FL_MDRTS;
3930: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3934: b3833c01 orrlt r3, r3, #256 ; 0x100 3938: b58430b8 strlt r3, [r4, #184] ; 0xb8
} /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) {
393c: e5943030 ldr r3, [r4, #48] ; 0x30 3940: e3130a01 tst r3, #4096 ; 0x1000
tty->flow_ctrl |= FL_MDXOF;
3944: 159430b8 ldrne r3, [r4, #184] ; 0xb8 3948: 13833b01 orrne r3, r3, #1024 ; 0x400 394c: 158430b8 strne r3, [r4, #184] ; 0xb8
} /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) {
3950: e5943030 ldr r3, [r4, #48] ; 0x30 3954: e3130b01 tst r3, #1024 ; 0x400
tty->flow_ctrl |= FL_MDXON;
3958: 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) {
395c: 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;
3960: 13833c02 orrne r3, r3, #512 ; 0x200 3964: 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) {
3968: e2177002 ands r7, r7, #2
tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
396c: 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) { 3970: 1a000014 bne 39c8 <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;
3974: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 3978: eb0002a5 bl 4414 <rtems_clock_get_ticks_per_second> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] *
397c: e3a0100a mov r1, #10 <== NOT EXECUTED 3980: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3984: eb004a79 bl 16370 <__aeabi_uidiv> <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
3988: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 398c: e3530000 cmp r3, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] *
3990: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 3994: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED
rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) {
3998: 0a000006 beq 39b8 <rtems_termios_ioctl+0x294> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
399c: e3520000 cmp r2, #0 <== NOT EXECUTED 39a0: 01a02000 moveq r2, r0 <== NOT EXECUTED 39a4: 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;
39a8: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
39ac: 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;
39b0: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 39b4: ea000006 b 39d4 <rtems_termios_ioctl+0x2b0> <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) {
39b8: e3520000 cmp r2, #0 <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT;
39bc: 03a03001 moveq r3, #1 <== NOT EXECUTED 39c0: 0584306c streq r3, [r4, #108] ; 0x6c <== NOT EXECUTED
tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) {
39c4: 0a000002 beq 39d4 <rtems_termios_ioctl+0x2b0> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT;
39c8: e5843074 str r3, [r4, #116] ; 0x74
else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT;
39cc: e584306c str r3, [r4, #108] ; 0x6c
tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT;
39d0: e5843070 str r3, [r4, #112] ; 0x70
else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes)
39d4: e59430a8 ldr r3, [r4, #168] ; 0xa8 39d8: e3530000 cmp r3, #0
39dc: 0a000032 beq 3aac <rtems_termios_ioctl+0x388> (*tty->device.setAttributes)(tty->minor, &tty->termios);
39e0: e5940010 ldr r0, [r4, #16] 39e4: e2841030 add r1, r4, #48 ; 0x30 39e8: e1a0e00f mov lr, pc 39ec: e12fff13 bx r3 39f0: ea00002d b 3aac <rtems_termios_ioctl+0x388>
break; case RTEMS_IO_TCDRAIN: drainOutput (tty);
39f4: e1a00004 mov r0, r4 39f8: ebfffe5a bl 3368 <drainOutput>
break;
39fc: ea00002a b 3aac <rtems_termios_ioctl+0x388>
case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup;
3a00: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3a04: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 3a08: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED
break;
3a0c: ea000026 b 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup;
3a10: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3a14: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3a18: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED
break;
3a1c: ea000022 b 3aac <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) {
3a20: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3a24: e59f309c ldr r3, [pc, #156] ; 3ac8 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED 3a28: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3a2c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 3a30: e3530000 cmp r3, #0 <== NOT EXECUTED 3a34: 0a000003 beq 3a48 <rtems_termios_ioctl+0x324> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_close(tty);
3a38: e1a00004 mov r0, r4 <== NOT EXECUTED 3a3c: e1a0e00f mov lr, pc <== NOT EXECUTED 3a40: e12fff13 bx r3 <== NOT EXECUTED 3a44: e1a06000 mov r6, r0 <== NOT EXECUTED
} tty->t_line=*(int*)(args->buffer);
3a48: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 3a4c: 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) {
3a50: e59f3070 ldr r3, [pc, #112] ; 3ac8 <rtems_termios_ioctl+0x3a4><== NOT EXECUTED 3a54: 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 */
3a58: e3a01000 mov r1, #0 <== NOT EXECUTED
/* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) {
3a5c: 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 */
3a60: 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);
3a64: 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) {
3a68: 0a00000f beq 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_open(tty);
3a6c: e1a00004 mov r0, r4 <== NOT EXECUTED 3a70: e1a0e00f mov lr, pc <== NOT EXECUTED 3a74: e12fff13 bx r3 <== NOT EXECUTED 3a78: e1a06000 mov r6, r0 <== NOT EXECUTED 3a7c: ea00000a b 3aac <rtems_termios_ioctl+0x388> <== NOT EXECUTED
*(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head;
3a80: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3a84: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED
if ( rawnc < 0 )
3a88: e0523003 subs r3, r2, r3 <== NOT EXECUTED
rawnc += tty->rawInBuf.Size;
3a8c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED 3a90: 40833002 addmi r3, r3, r2 <== NOT EXECUTED
/* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc;
3a94: e2842020 add r2, r4, #32 <== NOT EXECUTED 3a98: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED 3a9c: e0411002 sub r1, r1, r2 <== NOT EXECUTED 3aa0: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3aa4: e0813003 add r3, r1, r3 <== NOT EXECUTED 3aa8: e5823000 str r3, [r2] <== NOT EXECUTED
} break; } rtems_semaphore_release (tty->osem);
3aac: e5940018 ldr r0, [r4, #24] 3ab0: eb000432 bl 4b80 <rtems_semaphore_release>
args->ioctl_return = sc;
3ab4: e585600c str r6, [r5, #12]
return sc; }
3ab8: e1a00006 mov r0, r6 3abc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
00003c64 <rtems_termios_open>: rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c64: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3c68: e1a08002 mov r8, r2
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c6c: e59f23e0 ldr r2, [pc, #992] ; 4054 <rtems_termios_open+0x3f0>
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c70: e1a0a001 mov sl, r1
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c74: e3a01000 mov r1, #0
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c78: e1a09000 mov r9, r0
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c7c: e5920000 ldr r0, [r2] 3c80: e1a02001 mov r2, r1
rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) {
3c84: e1a0b003 mov fp, r3
struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex,
3c88: eb000376 bl 4a68 <rtems_semaphore_obtain>
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
3c8c: e2506000 subs r6, r0, #0
return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) {
3c90: 059f33c0 ldreq r3, [pc, #960] ; 4058 <rtems_termios_open+0x3f4> 3c94: 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) 3c98: 0a000007 beq 3cbc <rtems_termios_open+0x58>
3c9c: ea0000e2 b 402c <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))
3ca0: e595300c ldr r3, [r5, #12] 3ca4: e1530009 cmp r3, r9
3ca8: 1a000002 bne 3cb8 <rtems_termios_open+0x54>
3cac: e5953010 ldr r3, [r5, #16] 3cb0: e153000a cmp r3, sl
3cb4: 0a0000bb beq 3fa8 <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) {
3cb8: e5955000 ldr r5, [r5] 3cbc: e3550000 cmp r5, #0
3cc0: 1afffff6 bne 3ca0 <rtems_termios_open+0x3c>
3cc4: ea0000da b 4034 <rtems_termios_open+0x3d0>
return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE;
3cc8: e59f738c ldr r7, [pc, #908] ; 405c <rtems_termios_open+0x3f8> 3ccc: e5973004 ldr r3, [r7, #4] 3cd0: e5853064 str r3, [r5, #100] ; 0x64
tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3cd4: e5950064 ldr r0, [r5, #100] ; 0x64 3cd8: ebfff7cc bl 1c10 <malloc>
if (tty->rawInBuf.theBuf == NULL) {
3cdc: e3500000 cmp r0, #0
} /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size);
3ce0: e5850058 str r0, [r5, #88] ; 0x58
if (tty->rawInBuf.theBuf == NULL) { 3ce4: 1a000006 bne 3d04 <rtems_termios_open+0xa0> free(tty);
3ce8: e1a00005 mov r0, r5 <== NOT EXECUTED 3cec: ebfff715 bl 1948 <free> <== NOT EXECUTED
rtems_semaphore_release (rtems_termios_ttyMutex);
3cf0: e59f335c ldr r3, [pc, #860] ; 4054 <rtems_termios_open+0x3f0><== NOT EXECUTED 3cf4: e5930000 ldr r0, [r3] <== NOT EXECUTED 3cf8: eb0003a0 bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED 3cfc: e3a0601a mov r6, #26 <== NOT EXECUTED
return RTEMS_NO_MEMORY;
3d00: ea0000c9 b 402c <rtems_termios_open+0x3c8> <== NOT EXECUTED
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE;
3d04: e5973008 ldr r3, [r7, #8] 3d08: e5853088 str r3, [r5, #136] ; 0x88
tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3d0c: e5950088 ldr r0, [r5, #136] ; 0x88 3d10: ebfff7be bl 1c10 <malloc>
if (tty->rawOutBuf.theBuf == NULL) {
3d14: e3500000 cmp r0, #0
} /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size);
3d18: e585007c str r0, [r5, #124] ; 0x7c
if (tty->rawOutBuf.theBuf == NULL) { 3d1c: 0a000006 beq 3d3c <rtems_termios_open+0xd8> return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
3d20: e5970000 ldr r0, [r7] 3d24: ebfff7b9 bl 1c10 <malloc>
if (tty->cbuf == NULL) {
3d28: e3500000 cmp r0, #0
return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE);
3d2c: e585001c str r0, [r5, #28]
if (tty->cbuf == NULL) { 3d30: 1a000004 bne 3d48 <rtems_termios_open+0xe4> free((void *)(tty->rawOutBuf.theBuf));
3d34: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 3d38: ebfff702 bl 1948 <free> <== NOT EXECUTED
free((void *)(tty->rawInBuf.theBuf));
3d3c: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 3d40: ebfff700 bl 1948 <free> <== NOT EXECUTED 3d44: eaffffe7 b 3ce8 <rtems_termios_open+0x84> <== NOT EXECUTED
tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead;
3d48: e59f3308 ldr r3, [pc, #776] ; 4058 <rtems_termios_open+0x3f4> 3d4c: e5932000 ldr r2, [r3]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
3d50: e3a03000 mov r3, #0
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL)
3d54: e3520000 cmp r2, #0
/* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL;
3d58: e885000c stm r5, {r2, r3}
if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty;
3d5c: 15825004 strne r5, [r2, #4]
return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL;
3d60: e58530d4 str r3, [r5, #212] ; 0xd4
tty->tty_snd.sw_arg = NULL;
3d64: e58530d8 str r3, [r5, #216] ; 0xd8
tty->tty_rcv.sw_pfn = NULL;
3d68: e58530dc str r3, [r5, #220] ; 0xdc
tty->tty_rcv.sw_arg = NULL;
3d6c: e58530e0 str r3, [r5, #224] ; 0xe0
tty->tty_rcvwakeup = 0;
3d70: 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)
3d74: e59f32e4 ldr r3, [pc, #740] ; 4060 <rtems_termios_open+0x3fc> 3d78: e5932000 ldr r2, [r3]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3d7c: e59f72d8 ldr r7, [pc, #728] ; 405c <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)
3d80: e3520000 cmp r2, #0
rtems_termios_ttyTail = tty;
3d84: 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;
3d88: e59f22c8 ldr r2, [pc, #712] ; 4058 <rtems_termios_open+0x3f4>
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3d8c: e5d7300c ldrb r3, [r7, #12] 3d90: e59f02cc ldr r0, [pc, #716] ; 4064 <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;
3d94: e5824000 str r4, [r2]
tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3d98: 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;
3d9c: e584a010 str sl, [r4, #16]
tty->major = major;
3da0: e584900c str r9, [r4, #12]
/* * Set up mutex semaphores */ sc = rtems_semaphore_create (
3da4: e284c014 add ip, r4, #20 3da8: e3a03000 mov r3, #0 3dac: e3a01001 mov r1, #1 3db0: e3a02054 mov r2, #84 ; 0x54 3db4: e58dc000 str ip, [sp] 3db8: eb000298 bl 4820 <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)
3dbc: e2503000 subs r3, r0, #0
3dc0: 1a000095 bne 401c <rtems_termios_open+0x3b8> rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
3dc4: e5d7200c ldrb r2, [r7, #12] 3dc8: e59f0298 ldr r0, [pc, #664] ; 4068 <rtems_termios_open+0x404> 3dcc: e284c018 add ip, r4, #24 3dd0: e1820000 orr r0, r2, r0 3dd4: e3a01001 mov r1, #1 3dd8: e3a02054 mov r2, #84 ; 0x54 3ddc: e58dc000 str ip, [sp] 3de0: eb00028e bl 4820 <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)
3de4: e2501000 subs r1, r0, #0
3de8: 1a00008b bne 401c <rtems_termios_open+0x3b8> rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create (
3dec: e5d7300c ldrb r3, [r7, #12] 3df0: e59f0274 ldr r0, [pc, #628] ; 406c <rtems_termios_open+0x408> 3df4: e284c08c add ip, r4, #140 ; 0x8c 3df8: e1830000 orr r0, r3, r0 3dfc: e3a02020 mov r2, #32 3e00: e1a03001 mov r3, r1 3e04: e58dc000 str ip, [sp] 3e08: eb000284 bl 4820 <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)
3e0c: e250e000 subs lr, r0, #0
3e10: 1a000081 bne 401c <rtems_termios_open+0x3b8> tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks;
3e14: e8bb000f ldm fp!, {r0, r1, r2, r3} 3e18: e284c098 add ip, r4, #152 ; 0x98 3e1c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3e20: e89b000f ldm fp, {r0, r1, r2, r3} 3e24: e88c000f stm ip, {r0, r1, r2, r3}
/* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3e28: e59430b4 ldr r3, [r4, #180] ; 0xb4 3e2c: 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;
3e30: e584e094 str lr, [r4, #148] ; 0x94
tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3e34: 1a000017 bne 3e98 <rtems_termios_open+0x234> sc = rtems_task_create (
3e38: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3e3c: e59f022c ldr r0, [pc, #556] ; 4070 <rtems_termios_open+0x40c><== NOT EXECUTED 3e40: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 3e44: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3e48: e3a0100a mov r1, #10 <== NOT EXECUTED 3e4c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3e50: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3e54: e58de000 str lr, [sp] <== NOT EXECUTED 3e58: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3e5c: eb00036e bl 4c1c <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)
3e60: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3e64: 1a00006c bne 401c <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_create (
3e68: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3e6c: e59f0200 ldr r0, [pc, #512] ; 4074 <rtems_termios_open+0x410><== NOT EXECUTED 3e70: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3e74: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3e78: e3a01009 mov r1, #9 <== NOT EXECUTED 3e7c: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 3e80: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3e84: e58de000 str lr, [sp] <== NOT EXECUTED 3e88: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3e8c: eb000362 bl 4c1c <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)
3e90: e3500000 cmp r0, #0 <== NOT EXECUTED 3e94: 1a000060 bne 401c <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) ||
3e98: e59430a0 ldr r3, [r4, #160] ; 0xa0 3e9c: e3530000 cmp r3, #0
3ea0: 0a000002 beq 3eb0 <rtems_termios_open+0x24c> (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){
3ea4: e59430b4 ldr r3, [r4, #180] ; 0xb4 3ea8: e3530002 cmp r3, #2
3eac: 1a00000b bne 3ee0 <rtems_termios_open+0x27c> sc = rtems_semaphore_create (
3eb0: e59f31a4 ldr r3, [pc, #420] ; 405c <rtems_termios_open+0x3f8><== NOT EXECUTED 3eb4: e59f01bc ldr r0, [pc, #444] ; 4078 <rtems_termios_open+0x414><== NOT EXECUTED 3eb8: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 3ebc: e3a01000 mov r1, #0 <== NOT EXECUTED 3ec0: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3ec4: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 3ec8: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 3ecc: e1a03001 mov r3, r1 <== NOT EXECUTED 3ed0: e58dc000 str ip, [sp] <== NOT EXECUTED 3ed4: eb000251 bl 4820 <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)
3ed8: e3500000 cmp r0, #0 <== NOT EXECUTED 3edc: 1a00004e bne 401c <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';
3ee0: 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;
3ee4: e58430b8 str r3, [r4, #184] ; 0xb8
/* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2;
3ee8: e5941064 ldr r1, [r4, #100] ; 0x64
tty->highwater = tty->rawInBuf.Size * 3/4;
3eec: 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';
3ef0: 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;
3ef4: 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';
3ef8: e3a0c01c mov ip, #28 3efc: e5c4c042 strb ip, [r4, #66] ; 0x42
tty->termios.c_cc[VERASE] = '\177';
3f00: e28cc063 add ip, ip, #99 ; 0x63 3f04: e5c4c043 strb ip, [r4, #67] ; 0x43
tty->termios.c_cc[VKILL] = '\025';
3f08: e3a0c015 mov ip, #21 3f0c: e5c4c044 strb ip, [r4, #68] ; 0x44
tty->termios.c_cc[VEOF] = '\004';
3f10: e3a0c004 mov ip, #4 3f14: e5c4c045 strb ip, [r4, #69] ; 0x45
tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021';
3f18: e28cc00d add ip, ip, #13 3f1c: e5c4c049 strb ip, [r4, #73] ; 0x49
tty->termios.c_cc[VSTOP] = '\023';
3f20: e28cc002 add ip, ip, #2 3f24: e5c4c04a strb ip, [r4, #74] ; 0x4a
tty->termios.c_cc[VSUSP] = '\032';
3f28: e28cc007 add ip, ip, #7 3f2c: e5c4c04b strb ip, [r4, #75] ; 0x4b
tty->termios.c_cc[VREPRINT] = '\022';
3f30: e3a0c012 mov ip, #18 3f34: e5c4c04d strb ip, [r4, #77] ; 0x4d
tty->termios.c_cc[VDISCARD] = '\017';
3f38: e3a0c00f mov ip, #15 3f3c: e5c4c04e strb ip, [r4, #78] ; 0x4e
tty->termios.c_cc[VWERASE] = '\027';
3f40: e28cc008 add ip, ip, #8 3f44: e5c4c04f strb ip, [r4, #79] ; 0x4f
tty->termios.c_cc[VLNEXT] = '\026';
3f48: 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';
3f4c: e5c4304c strb r3, [r4, #76] ; 0x4c
tty->termios.c_cc[VEOL2] = '\000';
3f50: 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';
3f54: 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';
3f58: 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')
3f5c: e59f30f8 ldr r3, [pc, #248] ; 405c <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;
3f60: e1a00120 lsr r0, r0, #2
/* * Bump name characer */ if (c++ == 'z')
3f64: 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;
3f68: e58400c0 str r0, [r4, #192] ; 0xc0
} /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL;
3f6c: e59f0108 ldr r0, [pc, #264] ; 407c <rtems_termios_open+0x418> 3f70: e5840030 str r0, [r4, #48] ; 0x30
tty->termios.c_oflag = OPOST | ONLCR | XTABS;
3f74: e59f0104 ldr r0, [pc, #260] ; 4080 <rtems_termios_open+0x41c> 3f78: e5840034 str r0, [r4, #52] ; 0x34
tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL;
3f7c: e59f0100 ldr r0, [pc, #256] ; 4084 <rtems_termios_open+0x420> 3f80: e5840038 str r0, [r4, #56] ; 0x38
tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL;
3f84: e59f00fc ldr r0, [pc, #252] ; 4088 <rtems_termios_open+0x424>
tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
3f88: 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;
3f8c: e1a010a1 lsr r1, r1, #1
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
3f90: 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;
3f94: 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;
3f98: e58410bc str r1, [r4, #188] ; 0xbc
tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z')
3f9c: e5c3200c strb r2, [r3, #12]
c = 'a';
3fa0: 03a02061 moveq r2, #97 ; 0x61 3fa4: 05c3200c strbeq r2, [r3, #12]
} args->iop->data1 = tty; if (!tty->refcount++) {
3fa8: e5953008 ldr r3, [r5, #8]
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
3fac: e5982000 ldr r2, [r8]
if (!tty->refcount++) {
3fb0: e3530000 cmp r3, #0 3fb4: e2833001 add r3, r3, #1
*/ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty;
3fb8: e5825034 str r5, [r2, #52] ; 0x34
if (!tty->refcount++) {
3fbc: e5853008 str r3, [r5, #8]
3fc0: 1a000016 bne 4020 <rtems_termios_open+0x3bc> if (tty->device.firstOpen)
3fc4: e5953098 ldr r3, [r5, #152] ; 0x98 3fc8: e3530000 cmp r3, #0
(*tty->device.firstOpen)(major, minor, arg);
3fcc: 11a00009 movne r0, r9 3fd0: 11a0100a movne r1, sl 3fd4: 11a02008 movne r2, r8 3fd8: 11a0e00f movne lr, pc 3fdc: 112fff13 bxne r3
/* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) {
3fe0: e59530b4 ldr r3, [r5, #180] ; 0xb4 3fe4: e3530002 cmp r3, #2
3fe8: 1a00000c bne 4020 <rtems_termios_open+0x3bc> sc = rtems_task_start(tty->rxTaskId,
3fec: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 3ff0: e59f1094 ldr r1, [pc, #148] ; 408c <rtems_termios_open+0x428><== NOT EXECUTED 3ff4: e1a02005 mov r2, r5 <== NOT EXECUTED 3ff8: eb0003ac bl 4eb0 <rtems_task_start> <== NOT EXECUTED
rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
3ffc: e3500000 cmp r0, #0 <== NOT EXECUTED 4000: 1a000005 bne 401c <rtems_termios_open+0x3b8> <== NOT EXECUTED
rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId,
4004: e1a02005 mov r2, r5 <== NOT EXECUTED 4008: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 400c: e59f107c ldr r1, [pc, #124] ; 4090 <rtems_termios_open+0x42c><== NOT EXECUTED 4010: eb0003a6 bl 4eb0 <rtems_task_start> <== NOT EXECUTED
rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL)
4014: e3500000 cmp r0, #0 <== NOT EXECUTED 4018: 0a000000 beq 4020 <rtems_termios_open+0x3bc> <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
401c: eb000425 bl 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
} } rtems_semaphore_release (rtems_termios_ttyMutex);
4020: e59f302c ldr r3, [pc, #44] ; 4054 <rtems_termios_open+0x3f0> 4024: e5930000 ldr r0, [r3] 4028: eb0002d4 bl 4b80 <rtems_semaphore_release>
return RTEMS_SUCCESSFUL; }
402c: e1a00006 mov r0, r6 4030: 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));
4034: e3a00001 mov r0, #1 4038: e3a010e8 mov r1, #232 ; 0xe8 403c: eb0013c7 bl 8f60 <calloc>
if (tty == NULL) {
4040: e3500000 cmp r0, #0
static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty));
4044: e1a05000 mov r5, r0 4048: e1a04000 mov r4, r0
if (tty == NULL) { 404c: 1affff1d bne 3cc8 <rtems_termios_open+0x64>
4050: eaffff26 b 3cf0 <rtems_termios_open+0x8c> <== NOT EXECUTED
00002c00 <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) {
2c00: e59230b4 ldr r3, [r2, #180] ; 0xb4 2c04: e3530000 cmp r3, #0
* Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) {
2c08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 2c0c: e1a04002 mov r4, r2 2c10: e1a0a000 mov sl, r0 2c14: 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) { 2c18: 1a000005 bne 2c34 <rtems_termios_puts+0x34> (*tty->device.write)(tty->minor, (void *)buf, len);
2c1c: e1a01000 mov r1, r0 2c20: e1a02006 mov r2, r6 2c24: e5940010 ldr r0, [r4, #16] 2c28: e1a0e00f mov lr, pc 2c2c: e594f0a4 ldr pc, [r4, #164] ; 0xa4
return;
2c30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc}
} newHead = tty->rawOutBuf.Head;
2c34: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 2c38: 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;
2c3c: 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;
2c40: 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) {
2c44: ea00002e b 2d04 <rtems_termios_puts+0x104> <== NOT EXECUTED
* len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size;
2c48: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2c4c: e2850001 add r0, r5, #1 <== NOT EXECUTED 2c50: eb004e5a bl 165c0 <__umodsi3> <== NOT EXECUTED 2c54: e1a05000 mov r5, r0 <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2c58: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2c5c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2c60: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) {
2c64: ea00000a b 2c94 <rtems_termios_puts+0x94> <== NOT EXECUTED
tty->rawOutBufState = rob_wait;
2c68: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2c6c: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore,
2c70: e3a01000 mov r1, #0 <== NOT EXECUTED 2c74: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2c78: e1a02001 mov r2, r1 <== NOT EXECUTED 2c7c: eb000779 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL)
2c80: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_fatal_error_occurred (sc);
2c84: 1b00090b blne 50b8 <rtems_fatal_error_occurred> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2c88: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2c8c: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 2c90: 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) {
2c94: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2c98: e1550003 cmp r5, r3 <== NOT EXECUTED 2c9c: 0afffff1 beq 2c68 <rtems_termios_puts+0x68> <== 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++;
2ca0: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2ca4: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 2ca8: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2cac: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED
tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) {
2cb0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2cb4: 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;
2cb8: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED
if (tty->rawOutBufState == rob_idle) {
2cbc: 1a00000d bne 2cf8 <rtems_termios_puts+0xf8> <== NOT EXECUTED
/* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) {
2cc0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2cc4: 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;
2cc8: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2ccc: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 2cd0: 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)) {
2cd4: 1a000006 bne 2cf4 <rtems_termios_puts+0xf4> <== NOT EXECUTED
(*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1);
2cd8: 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,
2cdc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2ce0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2ce4: e0811003 add r1, r1, r3 <== NOT EXECUTED 2ce8: e3a02001 mov r2, #1 <== NOT EXECUTED 2cec: e1a0e00f mov lr, pc <== NOT EXECUTED 2cf0: 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;
2cf4: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2cf8: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED
} rtems_interrupt_enable (level); len--;
2cfc: e2466001 sub r6, r6, #1 <== NOT EXECUTED 2d00: 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) {
2d04: e3560000 cmp r6, #0 <== NOT EXECUTED 2d08: 1affffce bne 2c48 <rtems_termios_puts+0x48> <== NOT EXECUTED 2d0c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000033d4 <rtems_termios_read>: return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
33d4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
33d8: e5903000 ldr r3, [r0] <== NOT EXECUTED
return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) {
33dc: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
33e0: e5934034 ldr r4, [r3, #52] ; 0x34 <== NOT EXECUTED
uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
33e4: e3a01000 mov r1, #0 <== NOT EXECUTED
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;
33e8: e595300c ldr r3, [r5, #12] <== NOT EXECUTED
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
33ec: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 33f0: e1a02001 mov r2, r1 <== NOT EXECUTED
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;
33f4: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED
char *buffer = args->buffer;
33f8: e58d3000 str r3, [sp] <== NOT EXECUTED
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
33fc: eb000599 bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
if (sc != RTEMS_SUCCESSFUL)
3400: e2506000 subs r6, r0, #0 <== NOT EXECUTED 3404: 1a0000c1 bne 3710 <rtems_termios_read+0x33c> <== NOT EXECUTED
return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) {
3408: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 340c: e59f3304 ldr r3, [pc, #772] ; 3718 <rtems_termios_read+0x344><== NOT EXECUTED 3410: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3414: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 3418: e3530000 cmp r3, #0 <== NOT EXECUTED 341c: 0a000005 beq 3438 <rtems_termios_read+0x64> <== NOT EXECUTED
sc = rtems_termios_linesw[tty->t_line].l_read(tty,args);
3420: e1a01005 mov r1, r5 <== NOT EXECUTED 3424: e1a00004 mov r0, r4 <== NOT EXECUTED 3428: e1a0e00f mov lr, pc <== NOT EXECUTED 342c: e12fff13 bx r3 <== NOT EXECUTED 3430: e1a06000 mov r6, r0 <== NOT EXECUTED 3434: ea0000b1 b 3700 <rtems_termios_read+0x32c> <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) {
3438: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 343c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3440: e1520003 cmp r2, r3 <== NOT EXECUTED 3444: 1a00009a bne 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
3448: e59420a0 ldr r2, [r4, #160] ; 0xa0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column;
344c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED
if (tty->device.pollRead != NULL
3450: e3520000 cmp r2, #0 <== NOT EXECUTED
rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column;
3454: e584302c str r3, [r4, #44] ; 0x2c <== NOT EXECUTED
tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0;
3458: e5846020 str r6, [r4, #32] <== NOT EXECUTED 345c: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED
tty->read_start_column = tty->column; if (tty->device.pollRead != NULL
3460: 0a00003b beq 3554 <rtems_termios_read+0x180> <== NOT EXECUTED
&& tty->device.outputUsesInterrupts == TERMIOS_POLLED)
3464: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 3468: e3530000 cmp r3, #0 <== NOT EXECUTED 346c: 1a000038 bne 3554 <rtems_termios_read+0x180> <== NOT EXECUTED
static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) {
3470: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3474: e3130002 tst r3, #2 <== NOT EXECUTED 3478: 0a00000d beq 34b4 <rtems_termios_read+0xe0> <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
347c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3480: e1a0e00f mov lr, pc <== NOT EXECUTED 3484: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
3488: e3500000 cmp r0, #0 <== NOT EXECUTED
rtems_task_wake_after (1); } else { if (siproc (n, tty))
348c: e1a01004 mov r1, r4 <== NOT EXECUTED 3490: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED
int n; if (tty->termios.c_lflag & ICANON) { for (;;) { n = (*tty->device.pollRead)(tty->minor); if (n < 0) {
3494: aa000002 bge 34a4 <rtems_termios_read+0xd0> <== NOT EXECUTED
rtems_task_wake_after (1);
3498: e3a00001 mov r0, #1 <== NOT EXECUTED 349c: eb00069b bl 4f10 <rtems_task_wake_after> <== NOT EXECUTED 34a0: eafffff5 b 347c <rtems_termios_read+0xa8> <== NOT EXECUTED
} else { if (siproc (n, tty))
34a4: ebffff67 bl 3248 <siproc> <== NOT EXECUTED 34a8: e3500000 cmp r0, #0 <== NOT EXECUTED 34ac: 0afffff2 beq 347c <rtems_termios_read+0xa8> <== NOT EXECUTED 34b0: ea00007f b 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
} } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot();
34b4: eb0003de bl 4434 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED 34b8: e1a08000 mov r8, r0 <== NOT EXECUTED
for (;;) { n = (*tty->device.pollRead)(tty->minor);
34bc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 34c0: e1a0e00f mov lr, pc <== NOT EXECUTED 34c4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (n < 0) {
34c8: e3500000 cmp r0, #0 <== NOT EXECUTED 34cc: aa000013 bge 3520 <rtems_termios_read+0x14c> <== NOT EXECUTED
if (tty->termios.c_cc[VMIN]) {
34d0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 34d4: e3530000 cmp r3, #0 <== NOT EXECUTED 34d8: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 34dc: 0a000005 beq 34f8 <rtems_termios_read+0x124> <== NOT EXECUTED
if (tty->termios.c_cc[VTIME] && tty->ccount) {
34e0: e3530000 cmp r3, #0 <== NOT EXECUTED 34e4: 0a00000a beq 3514 <rtems_termios_read+0x140> <== NOT EXECUTED 34e8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 34ec: e3530000 cmp r3, #0 <== NOT EXECUTED 34f0: 0a000007 beq 3514 <rtems_termios_read+0x140> <== NOT EXECUTED 34f4: ea000001 b 3500 <rtems_termios_read+0x12c> <== NOT EXECUTED
break; } } } else { if (!tty->termios.c_cc[VTIME])
34f8: e3530000 cmp r3, #0 <== NOT EXECUTED 34fc: 0a00006c beq 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; now = rtems_clock_get_ticks_since_boot();
3500: eb0003cb bl 4434 <rtems_clock_get_ticks_since_boot> <== NOT EXECUTED
if ((now - then) > tty->vtimeTicks) {
3504: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 3508: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 350c: e1500003 cmp r0, r3 <== NOT EXECUTED 3510: 8a000067 bhi 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; } } rtems_task_wake_after (1);
3514: e3a00001 mov r0, #1 <== NOT EXECUTED 3518: eb00067c bl 4f10 <rtems_task_wake_after> <== NOT EXECUTED 351c: eaffffe6 b 34bc <rtems_termios_read+0xe8> <== NOT EXECUTED
} else { siproc (n, tty);
3520: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 3524: e1a01004 mov r1, r4 <== NOT EXECUTED 3528: ebffff46 bl 3248 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
352c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3530: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3534: e1520003 cmp r2, r3 <== NOT EXECUTED 3538: aa00005d bge 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME])
353c: e3530000 cmp r3, #0 <== NOT EXECUTED 3540: 0affffdd beq 34bc <rtems_termios_read+0xe8> <== NOT EXECUTED 3544: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3548: e3530000 cmp r3, #0 <== NOT EXECUTED 354c: 0affffda beq 34bc <rtems_termios_read+0xe8> <== NOT EXECUTED 3550: eaffffd7 b 34b4 <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;
3554: 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,
3558: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 355c: e3a0a001 mov sl, #1 <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3560: e59f91b4 ldr r9, [pc, #436] ; 371c <rtems_termios_read+0x348><== NOT EXECUTED 3564: ea000041 b 3670 <rtems_termios_read+0x29c> <== NOT EXECUTED
(tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size;
3568: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 356c: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3570: e2800001 add r0, r0, #1 <== NOT EXECUTED 3574: eb004c11 bl 165c0 <__umodsi3> <== NOT EXECUTED
c = tty->rawInBuf.theBuf[newHead];
3578: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 357c: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED
tty->rawInBuf.Head = newHead;
3580: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED
if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size)
3584: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3588: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 358c: e0823003 add r3, r2, r3 <== NOT EXECUTED 3590: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 3594: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 3598: eb004c08 bl 165c0 <__umodsi3> <== NOT EXECUTED 359c: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 35a0: e1500003 cmp r0, r3 <== NOT EXECUTED 35a4: 2a00001f bcs 3628 <rtems_termios_read+0x254> <== NOT EXECUTED
% tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF;
35a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 35ac: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 35b0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF))
35b4: e59f3164 ldr r3, [pc, #356] ; 3720 <rtems_termios_read+0x34c><== NOT EXECUTED 35b8: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 35bc: e59f015c ldr r0, [pc, #348] ; 3720 <rtems_termios_read+0x34c><== NOT EXECUTED 35c0: e0023003 and r3, r2, r3 <== NOT EXECUTED 35c4: e1530000 cmp r3, r0 <== NOT EXECUTED 35c8: 1a00000b bne 35fc <rtems_termios_read+0x228> <== NOT EXECUTED 35cc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 35d0: e3530000 cmp r3, #0 <== NOT EXECUTED 35d4: 0a000002 beq 35e4 <rtems_termios_read+0x210> <== NOT EXECUTED
== (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) {
35d8: 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))
35dc: e3130020 tst r3, #32 <== NOT EXECUTED 35e0: 0a000005 beq 35fc <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,
35e4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 35e8: e1a0100b mov r1, fp <== NOT EXECUTED 35ec: e3a02001 mov r2, #1 <== NOT EXECUTED 35f0: e1a0e00f mov lr, pc <== NOT EXECUTED 35f4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 35f8: ea00000a b 3628 <rtems_termios_read+0x254> <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) {
35fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3600: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 3604: 0a000007 beq 3628 <rtems_termios_read+0x254> <== NOT EXECUTED
tty->flow_ctrl &= ~FL_IRTSOFF;
3608: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
360c: 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;
3610: e3c22004 bic r2, r2, #4 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) {
3614: 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;
3618: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
/* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor);
361c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3620: 11a0e00f movne lr, pc <== NOT EXECUTED 3624: 112fff13 bxne r3 <== NOT EXECUTED
} } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) {
3628: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 362c: e3130002 tst r3, #2 <== NOT EXECUTED 3630: 0a000005 beq 364c <rtems_termios_read+0x278> <== NOT EXECUTED
if (siproc (c, tty))
3634: e1a00008 mov r0, r8 <== NOT EXECUTED 3638: e1a01004 mov r1, r4 <== NOT EXECUTED 363c: ebffff01 bl 3248 <siproc> <== NOT EXECUTED 3640: e3500000 cmp r0, #0 <== NOT EXECUTED 3644: 1a000007 bne 3668 <rtems_termios_read+0x294> <== NOT EXECUTED 3648: ea000007 b 366c <rtems_termios_read+0x298> <== NOT EXECUTED
wait = 0; } else { siproc (c, tty);
364c: e1a00008 mov r0, r8 <== NOT EXECUTED 3650: e1a01004 mov r1, r4 <== NOT EXECUTED 3654: ebfffefb bl 3248 <siproc> <== NOT EXECUTED
if (tty->ccount >= tty->termios.c_cc[VMIN])
3658: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 365c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3660: e1520003 cmp r2, r3 <== NOT EXECUTED 3664: ba000000 blt 366c <rtems_termios_read+0x298> <== NOT EXECUTED 3668: e3a0a000 mov sl, #0 <== NOT EXECUTED
wait = 0; } timeout = tty->rawInBufSemaphoreTimeout;
366c: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED
while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) &&
3670: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 3674: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 3678: e1520003 cmp r2, r3 <== NOT EXECUTED 367c: 0a000004 beq 3694 <rtems_termios_read+0x2c0> <== NOT EXECUTED 3680: e5993000 ldr r3, [r9] <== NOT EXECUTED 3684: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3688: e2433001 sub r3, r3, #1 <== NOT EXECUTED 368c: e1520003 cmp r2, r3 <== NOT EXECUTED 3690: baffffb4 blt 3568 <rtems_termios_read+0x194> <== NOT EXECUTED
} /* * Wait for characters */ if ( wait ) {
3694: e35a0000 cmp sl, #0 <== NOT EXECUTED 3698: 0a000005 beq 36b4 <rtems_termios_read+0x2e0> <== NOT EXECUTED
sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore,
369c: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 36a0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 36a4: e1a02008 mov r2, r8 <== NOT EXECUTED 36a8: eb0004ee bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL)
36ac: e3500000 cmp r0, #0 <== NOT EXECUTED 36b0: 0affffee beq 3670 <rtems_termios_read+0x29c> <== NOT EXECUTED
{ rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) {
36b4: e3a03000 mov r3, #0 <== NOT EXECUTED 36b8: ea000007 b 36dc <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++];
36bc: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 36c0: e59d0000 ldr r0, [sp] <== NOT EXECUTED 36c4: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED 36c8: e2822001 add r2, r2, #1 <== NOT EXECUTED 36cc: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED 36d0: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED
count--;
36d4: e2477001 sub r7, r7, #1 <== NOT EXECUTED 36d8: 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)) {
36dc: e3570000 cmp r7, #0 <== NOT EXECUTED 36e0: 0a000003 beq 36f4 <rtems_termios_read+0x320> <== NOT EXECUTED 36e4: e2841020 add r1, r4, #32 <== NOT EXECUTED 36e8: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 36ec: e1520001 cmp r2, r1 <== NOT EXECUTED 36f0: bafffff1 blt 36bc <rtems_termios_read+0x2e8> <== NOT EXECUTED
*buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count;
36f4: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 36f8: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 36fc: e5857018 str r7, [r5, #24] <== NOT EXECUTED
tty->tty_rcvwakeup = 0;
3700: e3a03000 mov r3, #0 <== NOT EXECUTED 3704: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED
rtems_semaphore_release (tty->isem);
3708: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 370c: eb00051b bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
return sc; }
3710: e1a00006 mov r0, r6 <== NOT EXECUTED 3714: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED
000026e0 <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))
26e0: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 26e4: e59f31d0 ldr r3, [pc, #464] ; 28bc <rtems_termios_refill_transmitter+0x1dc><== NOT EXECUTED 26e8: e0023003 and r3, r2, r3 <== NOT EXECUTED 26ec: e59f21cc ldr r2, [pc, #460] ; 28c0 <rtems_termios_refill_transmitter+0x1e0><== NOT EXECUTED 26f0: 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) {
26f4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 26f8: 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))
26fc: 1a00000e bne 273c <rtems_termios_refill_transmitter+0x5c> <== NOT EXECUTED
== (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor,
2700: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 2704: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 2708: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 270c: e1a0e00f mov lr, pc <== NOT EXECUTED 2710: 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 (
2714: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2718: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 271c: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--;
2720: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
2724: 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--;
2728: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF;
272c: e3811002 orr r1, r1, #2 <== NOT EXECUTED 2730: e58410b8 str 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--;
2734: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level);
2738: ea000011 b 2784 <rtems_termios_refill_transmitter+0xa4> <== NOT EXECUTED
nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF))
273c: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 2740: e2033003 and r3, r3, #3 <== NOT EXECUTED 2744: e3530002 cmp r3, #2 <== NOT EXECUTED 2748: 1a000010 bne 2790 <rtems_termios_refill_transmitter+0xb0> <== 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,
274c: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 2750: e3a02001 mov r2, #1 <== NOT EXECUTED 2754: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 2758: e1a0e00f mov lr, pc <== NOT EXECUTED 275c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2760: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2764: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2768: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
(void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--;
276c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2770: 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--;
2774: e2422001 sub r2, r2, #1 <== NOT EXECUTED
tty->flow_ctrl &= ~FL_ISNTXOF;
2778: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 277c: 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--;
2780: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2784: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2788: e3a05001 mov r5, #1 <== NOT EXECUTED 278c: ea000048 b 28b4 <rtems_termios_refill_transmitter+0x1d4> <== NOT EXECUTED
rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) {
2790: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 2794: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 2798: e1520003 cmp r2, r3 <== NOT EXECUTED 279c: 1a000005 bne 27b8 <rtems_termios_refill_transmitter+0xd8> <== NOT EXECUTED
/* * buffer was empty */ if (tty->rawOutBufState == rob_wait) {
27a0: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 27a4: e3530002 cmp r3, #2 <== NOT EXECUTED
/* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore);
27a8: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 27ac: 0b0008f3 bleq 4b80 <rtems_semaphore_release> <== NOT EXECUTED 27b0: e3a05000 mov r5, #0 <== NOT EXECUTED 27b4: ea00003e b 28b4 <rtems_termios_refill_transmitter+0x1d4> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
27b8: e10f3000 mrs r3, CPSR <== NOT EXECUTED 27bc: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 27c0: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED
return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0;
27c4: e3a02000 mov r2, #0 <== NOT EXECUTED
} return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen;
27c8: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED
tty->t_dqlen = 0;
27cc: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
27d0: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED
rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size;
27d4: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 27d8: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 27dc: e0800003 add r0, r0, r3 <== NOT EXECUTED 27e0: eb004f76 bl 165c0 <__umodsi3> <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) {
27e4: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 27e8: 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;
27ec: e1a06000 mov r6, r0 <== NOT EXECUTED
tty->rawOutBuf.Tail = newTail;
27f0: 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);
27f4: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 27f8: 0b0008e0 bleq 4b80 <rtems_semaphore_release> <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) {
27fc: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2800: e1560003 cmp r6, r3 <== NOT EXECUTED 2804: 1a00000a bne 2834 <rtems_termios_refill_transmitter+0x154> <== NOT EXECUTED
nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) {
2808: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle;
280c: e3a05000 mov r5, #0 <== NOT EXECUTED
nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) {
2810: e3530000 cmp r3, #0 <== NOT EXECUTED
} if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle;
2814: 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) {
2818: 01a05003 moveq r5, r3 <== NOT EXECUTED 281c: 0a000023 beq 28b0 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
(*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg);
2820: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2824: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2828: e1a0e00f mov lr, pc <== NOT EXECUTED 282c: e12fff13 bx r3 <== NOT EXECUTED 2830: ea00001e b 28b0 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
} } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF))
2834: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2838: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 283c: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 2840: 1a00000a bne 2870 <rtems_termios_refill_transmitter+0x190> <== NOT EXECUTED
static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile (
2844: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2848: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 284c: 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;
2850: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2854: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2858: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED
tty->rawOutBufState = rob_busy; /*apm*/
285c: e3a02001 mov r2, #1 <== NOT EXECUTED 2860: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED
static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile (
2864: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2868: e3a05000 mov r5, #0 <== NOT EXECUTED 286c: ea00000f b 28b0 <rtems_termios_refill_transmitter+0x1d0> <== NOT EXECUTED
} else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head)
2870: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2874: e1560003 cmp r6, r3 <== NOT EXECUTED
nToSend = tty->rawOutBuf.Size - newTail;
2878: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED
else nToSend = tty->rawOutBuf.Head - newTail;
287c: 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)) {
2880: 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;
2884: 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)) {
2888: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor,
288c: 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)) {
2890: 13a05001 movne r5, #1 <== NOT EXECUTED
nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/
2894: e3a03001 mov r3, #1 <== NOT EXECUTED 2898: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED
(*tty->device.write)(tty->minor,
289c: e0811006 add r1, r1, r6 <== NOT EXECUTED 28a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 28a4: e1a02005 mov r2, r5 <== NOT EXECUTED 28a8: e1a0e00f mov lr, pc <== NOT EXECUTED 28ac: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED
&tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/
28b0: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED
} return nToSend; }
28b4: e1a00005 mov r0, r5 <== NOT EXECUTED 28b8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
00004100 <rtems_termios_rxdaemon>: /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) {
4100: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 4104: e1a04000 mov r4, r0 <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4108: e3a05000 mov r5, #0 <== NOT EXECUTED
if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
410c: e28d6007 add r6, sp, #7 <== NOT EXECUTED
char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT |
4110: e1a0300d mov r3, sp <== NOT EXECUTED 4114: e3a01002 mov r1, #2 <== NOT EXECUTED 4118: e3a02000 mov r2, #0 <== NOT EXECUTED 411c: e3a00003 mov r0, #3 <== NOT EXECUTED 4120: eb0000e0 bl 44a8 <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) {
4124: e59d3000 ldr r3, [sp] <== NOT EXECUTED 4128: e3130001 tst r3, #1 <== NOT EXECUTED 412c: 0a000003 beq 4140 <rtems_termios_rxdaemon+0x40> <== NOT EXECUTED
tty->rxTaskId = 0;
4130: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
4134: e1a00005 mov r0, r5 <== NOT EXECUTED 4138: eb000309 bl 4d64 <rtems_task_delete> <== NOT EXECUTED 413c: eafffff3 b 4110 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
} else { /* * do something */ c = tty->device.pollRead(tty->minor);
4140: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4144: e1a0e00f mov lr, pc <== NOT EXECUTED 4148: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED
if (c != EOF) {
414c: e3700001 cmn r0, #1 <== NOT EXECUTED
} else { /* * do something */ c = tty->device.pollRead(tty->minor);
4150: e1a03000 mov r3, r0 <== NOT EXECUTED
if (c != EOF) {
4154: 0affffed beq 4110 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
/* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters (
4158: e1a00004 mov r0, r4 <== NOT EXECUTED 415c: e1a01006 mov r1, r6 <== NOT EXECUTED 4160: 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;
4164: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED
rtems_termios_enqueue_raw_characters (
4168: ebfff9f1 bl 2934 <rtems_termios_enqueue_raw_characters> <== NOT EXECUTED 416c: eaffffe7 b 4110 <rtems_termios_rxdaemon+0x10> <== NOT EXECUTED
000026d4 <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);
26d4: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 26d8: e3a01002 mov r1, #2 <== NOT EXECUTED 26dc: ea0007cd b 4618 <rtems_event_send> <== NOT EXECUTED
00004094 <rtems_termios_txdaemon>: /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) {
4094: 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) {
4098: e59f705c ldr r7, [pc, #92] ; 40fc <rtems_termios_txdaemon+0x68><== NOT EXECUTED
/* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) {
409c: e1a04000 mov r4, r0 <== NOT EXECUTED
while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT |
40a0: e3a05000 mov r5, #0 <== NOT EXECUTED 40a4: e1a0300d mov r3, sp <== NOT EXECUTED 40a8: e3a01002 mov r1, #2 <== NOT EXECUTED 40ac: e3a02000 mov r2, #0 <== NOT EXECUTED 40b0: e3a00003 mov r0, #3 <== NOT EXECUTED 40b4: eb0000fb bl 44a8 <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) {
40b8: e59d3000 ldr r3, [sp] <== NOT EXECUTED 40bc: 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);
40c0: 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) {
40c4: 0a000003 beq 40d8 <rtems_termios_txdaemon+0x44> <== NOT EXECUTED
tty->txTaskId = 0;
40c8: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED
rtems_task_delete(RTEMS_SELF);
40cc: e1a00005 mov r0, r5 <== NOT EXECUTED 40d0: eb000323 bl 4d64 <rtems_task_delete> <== NOT EXECUTED 40d4: eafffff2 b 40a4 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
} else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) {
40d8: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 40dc: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 40e0: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 40e4: e3530000 cmp r3, #0 <== NOT EXECUTED
rtems_termios_linesw[tty->t_line].l_start(tty);
40e8: 11a0e00f movne lr, pc <== NOT EXECUTED 40ec: 112fff13 bxne r3 <== NOT EXECUTED
} /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty);
40f0: e1a00004 mov r0, r4 <== NOT EXECUTED 40f4: ebfff979 bl 26e0 <rtems_termios_refill_transmitter> <== NOT EXECUTED 40f8: eaffffe9 b 40a4 <rtems_termios_txdaemon+0x10> <== NOT EXECUTED
000032a8 <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;
32a8: e5903000 ldr r3, [r0]
rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) {
32ac: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr}
rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1;
32b0: e5935034 ldr r5, [r3, #52] ; 0x34
rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
32b4: e3a01000 mov r1, #0
rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) {
32b8: 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);
32bc: e1a02001 mov r2, r1 32c0: e5950018 ldr r0, [r5, #24] 32c4: eb0005e7 bl 4a68 <rtems_semaphore_obtain>
if (sc != RTEMS_SUCCESSFUL)
32c8: e2506000 subs r6, r0, #0
32cc: 1a000022 bne 335c <rtems_termios_write+0xb4> return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) {
32d0: e59520cc ldr r2, [r5, #204] ; 0xcc 32d4: e59f3088 ldr r3, [pc, #136] ; 3364 <rtems_termios_write+0xbc> 32d8: e0833282 add r3, r3, r2, lsl #5 32dc: e593300c ldr r3, [r3, #12] 32e0: e3530000 cmp r3, #0
32e4: 0a000005 beq 3300 <rtems_termios_write+0x58> sc = rtems_termios_linesw[tty->t_line].l_write(tty,args);
32e8: e1a01004 mov r1, r4 <== NOT EXECUTED 32ec: e1a00005 mov r0, r5 <== NOT EXECUTED 32f0: e1a0e00f mov lr, pc <== NOT EXECUTED 32f4: e12fff13 bx r3 <== NOT EXECUTED 32f8: e1a06000 mov r6, r0 <== NOT EXECUTED 32fc: ea000014 b 3354 <rtems_termios_write+0xac> <== NOT EXECUTED
rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) {
3300: e5953034 ldr r3, [r5, #52] ; 0x34 3304: e3130001 tst r3, #1
uint32_t count = args->count;
3308: 15948010 ldrne r8, [r4, #16]
char *buffer = args->buffer;
330c: 1594a00c ldrne sl, [r4, #12] 3310: 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) { 3314: 1a000004 bne 332c <rtems_termios_write+0x84>
3318: ea000007 b 333c <rtems_termios_write+0x94> <== NOT EXECUTED
uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty);
331c: e7da0007 ldrb r0, [sl, r7] 3320: ebfffe7a bl 2d10 <oproc> 3324: e2877001 add r7, r7, #1 3328: e2488001 sub r8, r8, #1
return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--)
332c: e3580000 cmp r8, #0
oproc (*buffer++, tty);
3330: e1a01005 mov r1, r5
return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 3334: 1afffff8 bne 331c <rtems_termios_write+0x74>
3338: ea000003 b 334c <rtems_termios_write+0xa4>
oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty);
333c: e284000c add r0, r4, #12 <== NOT EXECUTED 3340: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3344: e1a02005 mov r2, r5 <== NOT EXECUTED 3348: ebfffe2c bl 2c00 <rtems_termios_puts> <== NOT EXECUTED
args->bytes_moved = args->count;
334c: e5943010 ldr r3, [r4, #16] 3350: e5843018 str r3, [r4, #24]
} rtems_semaphore_release (tty->osem);
3354: e5950018 ldr r0, [r5, #24] 3358: eb000608 bl 4b80 <rtems_semaphore_release>
return sc; }
335c: e1a00006 mov r0, r6 3360: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc}
00006460 <rtems_verror>: static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) {
6460: 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)
6464: 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 ) {
6468: e1a06000 mov r6, r0 <== NOT EXECUTED 646c: e1a09001 mov r9, r1 <== NOT EXECUTED 6470: e1a04002 mov r4, r2 <== NOT EXECUTED
int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC)
6474: 0a00000d beq 64b0 <rtems_verror+0x50> <== NOT EXECUTED
{ if (rtems_panic_in_progress++)
6478: e59f3160 ldr r3, [pc, #352] ; 65e0 <rtems_verror+0x180> <== NOT EXECUTED 647c: e5932000 ldr r2, [r3] <== NOT EXECUTED 6480: e3520000 cmp r2, #0 <== NOT EXECUTED 6484: e2822001 add r2, r2, #1 <== NOT EXECUTED 6488: e5832000 str r2, [r3] <== NOT EXECUTED 648c: 0a000003 beq 64a0 <rtems_verror+0x40> <== NOT EXECUTED
rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1;
6490: e59f314c ldr r3, [pc, #332] ; 65e4 <rtems_verror+0x184> <== NOT EXECUTED 6494: e5932000 ldr r2, [r3] <== NOT EXECUTED 6498: e2822001 add r2, r2, #1 <== NOT EXECUTED 649c: e5832000 str r2, [r3] <== NOT EXECUTED
_Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2)
64a0: e59f3138 ldr r3, [pc, #312] ; 65e0 <rtems_verror+0x180> <== NOT EXECUTED 64a4: e5933000 ldr r3, [r3] <== NOT EXECUTED 64a8: e3530002 cmp r3, #2 <== NOT EXECUTED 64ac: ca000049 bgt 65d8 <rtems_verror+0x178> <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */
64b0: e59f3130 ldr r3, [pc, #304] ; 65e8 <rtems_verror+0x188> <== NOT EXECUTED 64b4: e5933000 ldr r3, [r3] <== NOT EXECUTED 64b8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 64bc: eb0034c7 bl 137e0 <fflush> <== NOT EXECUTED
status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
64c0: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED
return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK;
64c4: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED
if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */
64c8: 0a000001 beq 64d4 <rtems_verror+0x74> <== NOT EXECUTED
local_errno = errno;
64cc: eb0033d0 bl 13414 <__errno> <== NOT EXECUTED 64d0: 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);
64d4: e59fa10c ldr sl, [pc, #268] ; 65e8 <rtems_verror+0x188> <== NOT EXECUTED 64d8: e59a3000 ldr r3, [sl] <== NOT EXECUTED 64dc: e1a02004 mov r2, r4 <== NOT EXECUTED 64e0: e1a01009 mov r1, r9 <== NOT EXECUTED 64e4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 64e8: eb004cfd bl 198e4 <vfprintf> <== NOT EXECUTED
if (status)
64ec: 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);
64f0: e1a04000 mov r4, r0 <== NOT EXECUTED
if (status)
64f4: 0a000008 beq 651c <rtems_verror+0xbc> <== NOT EXECUTED
chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status));
64f8: e59a3000 ldr r3, [sl] <== NOT EXECUTED 64fc: e1a00008 mov r0, r8 <== NOT EXECUTED 6500: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 6504: ebffffd1 bl 6450 <rtems_status_text> <== NOT EXECUTED 6508: e59f10dc ldr r1, [pc, #220] ; 65ec <rtems_verror+0x18c> <== NOT EXECUTED 650c: e1a02000 mov r2, r0 <== NOT EXECUTED 6510: e1a00008 mov r0, r8 <== NOT EXECUTED 6514: eb00356f bl 13ad8 <fprintf> <== NOT EXECUTED 6518: e0844000 add r4, r4, r0 <== NOT EXECUTED
if (local_errno)
651c: e3550000 cmp r5, #0 <== NOT EXECUTED 6520: 0a000015 beq 657c <rtems_verror+0x11c> <== NOT EXECUTED
{ if ((local_errno > 0) && *strerror(local_errno))
6524: da00000d ble 6560 <rtems_verror+0x100> <== NOT EXECUTED 6528: e1a00005 mov r0, r5 <== NOT EXECUTED 652c: eb00387c bl 14724 <strerror> <== NOT EXECUTED 6530: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 6534: e3530000 cmp r3, #0 <== NOT EXECUTED 6538: 0a000008 beq 6560 <rtems_verror+0x100> <== NOT EXECUTED
chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno));
653c: e59f30a4 ldr r3, [pc, #164] ; 65e8 <rtems_verror+0x188> <== NOT EXECUTED 6540: e5933000 ldr r3, [r3] <== NOT EXECUTED 6544: e1a00005 mov r0, r5 <== NOT EXECUTED 6548: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 654c: eb003874 bl 14724 <strerror> <== NOT EXECUTED 6550: e59f1098 ldr r1, [pc, #152] ; 65f0 <rtems_verror+0x190> <== NOT EXECUTED 6554: e1a02000 mov r2, r0 <== NOT EXECUTED 6558: e1a00008 mov r0, r8 <== NOT EXECUTED 655c: ea000004 b 6574 <rtems_verror+0x114> <== NOT EXECUTED
else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno);
6560: e59f3080 ldr r3, [pc, #128] ; 65e8 <rtems_verror+0x188> <== NOT EXECUTED 6564: e5933000 ldr r3, [r3] <== NOT EXECUTED 6568: e59f1084 ldr r1, [pc, #132] ; 65f4 <rtems_verror+0x194> <== NOT EXECUTED 656c: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 6570: e1a02005 mov r2, r5 <== NOT EXECUTED 6574: eb003557 bl 13ad8 <fprintf> <== NOT EXECUTED 6578: e0844000 add r4, r4, r0 <== NOT EXECUTED
} chars_written += fprintf(stderr, "\n");
657c: e59f8064 ldr r8, [pc, #100] ; 65e8 <rtems_verror+0x188> <== NOT EXECUTED 6580: e5983000 ldr r3, [r8] <== NOT EXECUTED 6584: e59f106c ldr r1, [pc, #108] ; 65f8 <rtems_verror+0x198> <== NOT EXECUTED 6588: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 658c: eb003551 bl 13ad8 <fprintf> <== NOT EXECUTED
(void) fflush(stderr);
6590: 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");
6594: e1a0a000 mov sl, r0 <== NOT EXECUTED
(void) fflush(stderr);
6598: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 659c: eb00348f bl 137e0 <fflush> <== NOT EXECUTED
if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
65a0: 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");
65a4: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED
(void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT))
65a8: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
{ if (error_flag & RTEMS_ERROR_PANIC)
65ac: e3570000 cmp r7, #0 <== NOT EXECUTED 65b0: 0a000004 beq 65c8 <rtems_verror+0x168> <== NOT EXECUTED
{ rtems_error(0, "fatal error, exiting");
65b4: e3a00000 mov r0, #0 <== NOT EXECUTED 65b8: e59f103c ldr r1, [pc, #60] ; 65fc <rtems_verror+0x19c> <== NOT EXECUTED 65bc: eb00001b bl 6630 <rtems_error> <== NOT EXECUTED
_exit(local_errno);
65c0: e1a00005 mov r0, r5 <== NOT EXECUTED 65c4: eb0002cf bl 7108 <_exit> <== NOT EXECUTED
} else { rtems_error(0, "fatal error, aborting");
65c8: e59f1030 ldr r1, [pc, #48] ; 6600 <rtems_verror+0x1a0> <== NOT EXECUTED 65cc: e1a00007 mov r0, r7 <== NOT EXECUTED 65d0: eb000016 bl 6630 <rtems_error> <== NOT EXECUTED
abort();
65d4: eb003385 bl 133f0 <abort> <== NOT EXECUTED 65d8: e3a00000 mov r0, #0 <== NOT EXECUTED
} } return chars_written; }
65dc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED
0000210c <scanInt>: /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
210c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 2110: e3a04000 mov r4, #0
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
2114: e59fb0d4 ldr fp, [pc, #212] ; 21f0 <scanInt+0xe4>
limit++; continue; } sign = 1; } if (!isdigit(c))
2118: e59f90d4 ldr r9, [pc, #212] ; 21f4 <scanInt+0xe8>
/* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) {
211c: e58d1000 str r1, [sp] 2120: e1a05000 mov r5, r0 2124: e3e08102 mvn r8, #-2147483648 ; 0x80000000 2128: e1a07004 mov r7, r4
sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10))
212c: e3a0a00a mov sl, #10
unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp);
2130: e5953004 ldr r3, [r5, #4] 2134: e2433001 sub r3, r3, #1 2138: e3530000 cmp r3, #0 213c: e5853004 str r3, [r5, #4] 2140: a5953000 ldrge r3, [r5] 2144: a4d36001 ldrbge r6, [r3], #1 2148: a5853000 strge r3, [r5]
214c: aa000003 bge 2160 <scanInt+0x54>
2150: e59b0000 ldr r0, [fp] <== NOT EXECUTED 2154: e1a01005 mov r1, r5 <== NOT EXECUTED 2158: eb0039da bl 108c8 <__srget_r> <== NOT EXECUTED 215c: e1a06000 mov r6, r0 <== NOT EXECUTED
if (c == ':')
2160: e356003a cmp r6, #58 ; 0x3a
2164: 0a000019 beq 21d0 <scanInt+0xc4> break; if (sign == 0) {
2168: e3540000 cmp r4, #0
216c: 1a000004 bne 2184 <scanInt+0x78> if (c == '-') {
2170: e356002d cmp r6, #45 ; 0x2d
sign = -1; limit++;
2174: 02888001 addeq r8, r8, #1 2178: 03e04000 mvneq r4, #0
for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 217c: 0affffeb beq 2130 <scanInt+0x24> sign = -1; limit++; continue;
2180: e3a04001 mov r4, #1
} sign = 1; } if (!isdigit(c))
2184: e5993000 ldr r3, [r9] 2188: e0833006 add r3, r3, r6 218c: e5d33001 ldrb r3, [r3, #1] 2190: e3130004 tst r3, #4
2194: 0a000013 beq 21e8 <scanInt+0xdc> return 0; d = c - '0'; if ((i > (limit / 10))
2198: e1a00008 mov r0, r8 219c: e3a0100a mov r1, #10 21a0: eb005aef bl 18d64 <__aeabi_uidiv> 21a4: e1570000 cmp r7, r0
21a8: 8a00000e bhi 21e8 <scanInt+0xdc> } sign = 1; } if (!isdigit(c)) return 0; d = c - '0';
21ac: e2466030 sub r6, r6, #48 ; 0x30
if ((i > (limit / 10)) 21b0: 1a000004 bne 21c8 <scanInt+0xbc>
21b4: e1a00008 mov r0, r8 <== NOT EXECUTED 21b8: e3a0100a mov r1, #10 <== NOT EXECUTED 21bc: eb005b7c bl 18fb4 <__umodsi3> <== NOT EXECUTED 21c0: e1560000 cmp r6, r0 <== NOT EXECUTED 21c4: 8a000007 bhi 21e8 <scanInt+0xdc> <== NOT EXECUTED
|| ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d;
21c8: e027679a mla r7, sl, r7, r6 21cc: eaffffd7 b 2130 <scanInt+0x24>
} if (sign == 0)
21d0: e3540000 cmp r4, #0
return 0; *val = i * sign;
21d4: 10030497 mulne r3, r7, r4 21d8: 159d2000 ldrne r2, [sp] 21dc: 13a00001 movne r0, #1 21e0: 15823000 strne r3, [r2]
return 1; 21e4: 1a000000 bne 21ec <scanInt+0xe0>
21e8: e3a00000 mov r0, #0 <== NOT EXECUTED
}
21ec: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}
000021f8 <scanString>: /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
21f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 21fc: e1a04002 mov r4, r2
int c; *name = *bufp;
2200: 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) {
2204: e59d6018 ldr r6, [sp, #24]
int c; *name = *bufp;
2208: e5812000 str r2, [r1]
for (;;) { c = getc(fp);
220c: e59f70c0 ldr r7, [pc, #192] ; 22d4 <scanString+0xdc>
/* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) {
2210: e1a05000 mov r5, r0 2214: e1a08003 mov r8, r3
int c; *name = *bufp; for (;;) { c = getc(fp);
2218: e5953004 ldr r3, [r5, #4] 221c: e2433001 sub r3, r3, #1 2220: e3530000 cmp r3, #0 2224: e5853004 str r3, [r5, #4] 2228: a5953000 ldrge r3, [r5] 222c: a4d30001 ldrbge r0, [r3], #1 2230: a5853000 strge r3, [r5] 2234: b5970000 ldrlt r0, [r7] 2238: b1a01005 movlt r1, r5 223c: bb0039a1 bllt 108c8 <__srget_r>
if (c == ':') {
2240: e350003a cmp r0, #58 ; 0x3a
2244: 1a000002 bne 2254 <scanString+0x5c> if (nlFlag)
2248: e3560000 cmp r6, #0
224c: 0a000013 beq 22a0 <scanString+0xa8>
2250: ea00001d b 22cc <scanString+0xd4> <== NOT EXECUTED
return 0; break; } if (c == '\n') {
2254: e350000a cmp r0, #10
2258: 1a000002 bne 2268 <scanString+0x70> if (!nlFlag)
225c: e3560000 cmp r6, #0
2260: 1a00000e bne 22a0 <scanString+0xa8>
2264: ea000018 b 22cc <scanString+0xd4> <== NOT EXECUTED
return 0; break; } if (c == EOF)
2268: e3700001 cmn r0, #1
226c: 0a000016 beq 22cc <scanString+0xd4> return 0; if (*nleft < 2)
2270: e5983000 ldr r3, [r8] 2274: e3530001 cmp r3, #1
2278: 9a000013 bls 22cc <scanString+0xd4> return 0; **bufp = c;
227c: e5943000 ldr r3, [r4] 2280: e5c30000 strb r0, [r3]
++(*bufp);
2284: e5942000 ldr r2, [r4]
--(*nleft);
2288: e5983000 ldr r3, [r8]
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
228c: e2822001 add r2, r2, #1
--(*nleft);
2290: e2433001 sub r3, r3, #1
if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp);
2294: e5842000 str r2, [r4]
--(*nleft);
2298: e5883000 str r3, [r8]
}
229c: eaffffdd b 2218 <scanString+0x20>
**bufp = '\0';
22a0: e5943000 ldr r3, [r4] 22a4: e3a02000 mov r2, #0 22a8: e5c32000 strb r2, [r3]
++(*bufp);
22ac: e5942000 ldr r2, [r4]
--(*nleft);
22b0: e5983000 ldr r3, [r8]
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
22b4: e2822001 add r2, r2, #1
--(*nleft);
22b8: e2433001 sub r3, r3, #1
**bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp);
22bc: e5842000 str r2, [r4]
--(*nleft);
22c0: e5883000 str r3, [r8] 22c4: e3a00001 mov r0, #1
return 1;
22c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
22cc: e3a00000 mov r0, #0 <== NOT EXECUTED
}
22d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED
000022d8 <scangr>: FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
22d8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 22dc: e24dd014 sub sp, sp, #20
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
22e0: e28d6008 add r6, sp, #8 22e4: e28d5004 add r5, sp, #4
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
22e8: e58d2008 str r2, [sp, #8] 22ec: e58d3004 str r3, [sp, #4]
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
22f0: e3a08000 mov r8, #0 22f4: e1a02006 mov r2, r6 22f8: e1a03005 mov r3, r5 22fc: e58d8000 str r8, [sp]
FILE *fp, struct group *grp, char *buffer, size_t bufsize ) {
2300: e1a07000 mov r7, r0 2304: e1a04001 mov r4, r1
int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2308: ebffffba bl 21f8 <scanString> 230c: e1500008 cmp r0, r8
2310: 0a00003b beq 2404 <scangr+0x12c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0)
2314: e1a00007 mov r0, r7 2318: e2841004 add r1, r4, #4 231c: e1a02006 mov r2, r6 2320: e1a03005 mov r3, r5 2324: e58d8000 str r8, [sp] 2328: ebffffb2 bl 21f8 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
232c: e1500008 cmp r0, r8
2330: 0a000033 beq 2404 <scangr+0x12c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid)
2334: e1a00007 mov r0, r7 2338: e28d1010 add r1, sp, #16 233c: ebffff72 bl 210c <scanInt>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2340: e1500008 cmp r0, r8
2344: 0a00002e beq 2404 <scangr+0x12c> || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1))
2348: e1a03005 mov r3, r5 234c: e28d100c add r1, sp, #12 2350: e1a00007 mov r0, r7 2354: e1a02006 mov r2, r6 2358: e3a05001 mov r5, #1 235c: e58d5000 str r5, [sp] 2360: ebffffa4 bl 21f8 <scanString>
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0)
2364: 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;
2368: 11dd31b0 ldrhne r3, [sp, #16]
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
236c: 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;
2370: 11c430b8 strhne r3, [r4, #8]
{ int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2374: 1a000003 bne 2388 <scangr+0xb0>
2378: ea000021 b 2404 <scangr+0x12c> <== NOT EXECUTED
/* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',')
237c: e352002c cmp r2, #44 ; 0x2c
memcount++;
2380: 02855001 addeq r5, r5, #1 2384: e2888001 add r8, r8, #1
grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
2388: e7d12008 ldrb r2, [r1, r8] 238c: e3520000 cmp r2, #0
2390: 1afffff9 bne 237c <scangr+0xa4> } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15))
2394: e1a05105 lsl r5, r5, #2 2398: e59d3004 ldr r3, [sp, #4] 239c: e2855013 add r5, r5, #19 23a0: e1530005 cmp r3, r5
23a4: 3a000016 bcc 2404 <scangr+0x12c> return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15);
23a8: e59d3008 ldr r3, [sp, #8] 23ac: e283300f add r3, r3, #15 23b0: e3c3300f bic r3, r3, #15
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
23b4: 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);
23b8: e584300c str r3, [r4, #12]
/* * Fill in pointer array */ grp->gr_mem[0] = grmem;
23bc: e59d300c ldr r3, [sp, #12]
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0';
23c0: e1a00002 mov r0, r2
grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem;
23c4: e2833001 add r3, r3, #1 23c8: e2822001 add r2, r2, #1
for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
23cc: ea000005 b 23e8 <scangr+0x110>
if(*cp == ',') {
23d0: e351002c cmp r1, #44 ; 0x2c
*cp = '\0';
23d4: 05430001 strbeq r0, [r3, #-1]
grp->gr_mem[memcount++] = cp + 1;
23d8: 0594100c ldreq r1, [r4, #12] 23dc: 07813102 streq r3, [r1, r2, lsl #2] 23e0: 02822001 addeq r2, r2, #1 23e4: e2833001 add r3, r3, #1
/* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) {
23e8: e5531001 ldrb r1, [r3, #-1] 23ec: e3510000 cmp r1, #0
23f0: 1afffff6 bne 23d0 <scangr+0xf8> if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL;
23f4: e594300c ldr r3, [r4, #12] 23f8: e3a00001 mov r0, #1 23fc: e7831102 str r1, [r3, r2, lsl #2]
return 1;
2400: ea000000 b 2408 <scangr+0x130>
2404: e3a00000 mov r0, #0 <== NOT EXECUTED
}
2408: e28dd014 add sp, sp, #20 240c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000244c <scanpw>: FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
244c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2450: e24dd014 sub sp, sp, #20
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2454: e28d7008 add r7, sp, #8 2458: e28d6004 add r6, sp, #4
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
245c: e58d2008 str r2, [sp, #8] 2460: e58d3004 str r3, [sp, #4]
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2464: e3a08000 mov r8, #0 2468: e1a02007 mov r2, r7 246c: e1a03006 mov r3, r6 2470: e58d8000 str r8, [sp]
FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) {
2474: e1a05000 mov r5, r0 2478: e1a04001 mov r4, r1
int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
247c: ebffff5d bl 21f8 <scanString> 2480: e1500008 cmp r0, r8
2484: 0a000038 beq 256c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0)
2488: e1a00005 mov r0, r5 248c: e2841004 add r1, r4, #4 2490: e1a02007 mov r2, r7 2494: e1a03006 mov r3, r6 2498: e58d8000 str r8, [sp] 249c: ebffff55 bl 21f8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
24a0: e1500008 cmp r0, r8
24a4: 0a000030 beq 256c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid)
24a8: e1a00005 mov r0, r5 24ac: e28d1010 add r1, sp, #16 24b0: ebffff15 bl 210c <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
24b4: e1500008 cmp r0, r8
24b8: 0a00002b beq 256c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid)
24bc: e1a00005 mov r0, r5 24c0: e28d100c add r1, sp, #12 24c4: ebffff10 bl 210c <scanInt>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
24c8: e1500008 cmp r0, r8
24cc: 0a000026 beq 256c <scanpw+0x120> || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0)
24d0: e1a00005 mov r0, r5 24d4: e284100c add r1, r4, #12 24d8: e1a02007 mov r2, r7 24dc: e1a03006 mov r3, r6 24e0: e58d8000 str r8, [sp] 24e4: ebffff43 bl 21f8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
24e8: e1500008 cmp r0, r8
24ec: 0a00001e beq 256c <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)
24f0: e1a00005 mov r0, r5 24f4: e2841010 add r1, r4, #16 24f8: e1a02007 mov r2, r7 24fc: e1a03006 mov r3, r6 2500: e58d8000 str r8, [sp] 2504: ebffff3b bl 21f8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2508: e1500008 cmp r0, r8
250c: 0a000016 beq 256c <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)
2510: e1a00005 mov r0, r5 2514: e2841014 add r1, r4, #20 2518: e1a02007 mov r2, r7 251c: e1a03006 mov r3, r6 2520: e58d8000 str r8, [sp] 2524: ebffff33 bl 21f8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
2528: e1500008 cmp r0, r8
252c: 0a00000e beq 256c <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))
2530: e1a00005 mov r0, r5 2534: e1a02007 mov r2, r7 2538: e1a03006 mov r3, r6 253c: e3a05001 mov r5, #1 2540: e2841018 add r1, r4, #24 2544: e58d5000 str r5, [sp] 2548: ebffff2a bl 21f8 <scanString>
size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0)
254c: e1500008 cmp r0, r8
2550: 0a000005 beq 256c <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;
2554: e1dd30bc ldrh r3, [sp, #12] 2558: 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;
255c: e1dd31b0 ldrh r3, [sp, #16]
pwd->pw_gid = pwgid;
2560: 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;
2564: e1c430b8 strh r3, [r4, #8]
pwd->pw_gid = pwgid; return 1;
2568: ea000000 b 2570 <scanpw+0x124>
256c: e3a00000 mov r0, #0 <== NOT EXECUTED
}
2570: e28dd014 add sp, sp, #20 2574: e8bd81f0 pop {r4, r5, r6, r7, r8, pc}
0000267c <setgrent>: return NULL; return &grent; } void setgrent(void) {
267c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
2680: ebffffcb bl 25b4 <init_etc_passwd_group> <== NOT EXECUTED
if (group_fp != NULL)
2684: e59f3020 ldr r3, [pc, #32] ; 26ac <setgrent+0x30> <== NOT EXECUTED 2688: e5930000 ldr r0, [r3] <== NOT EXECUTED 268c: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(group_fp);
2690: 1b0031f9 blne ee7c <fclose> <== NOT EXECUTED
group_fp = fopen("/etc/group", "r");
2694: e59f0014 ldr r0, [pc, #20] ; 26b0 <setgrent+0x34> <== NOT EXECUTED 2698: e59f1014 ldr r1, [pc, #20] ; 26b4 <setgrent+0x38> <== NOT EXECUTED 269c: eb0033ae bl f55c <fopen> <== NOT EXECUTED 26a0: e59f3004 ldr r3, [pc, #4] ; 26ac <setgrent+0x30> <== NOT EXECUTED 26a4: e5830000 str r0, [r3] <== NOT EXECUTED
}
26a8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
0000284c <setpwent>: return NULL; return &pwent; } void setpwent(void) {
284c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED
init_etc_passwd_group();
2850: ebffff57 bl 25b4 <init_etc_passwd_group> <== NOT EXECUTED
if (passwd_fp != NULL)
2854: e59f3020 ldr r3, [pc, #32] ; 287c <setpwent+0x30> <== NOT EXECUTED 2858: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 285c: e3500000 cmp r0, #0 <== NOT EXECUTED
fclose(passwd_fp);
2860: 1b003185 blne ee7c <fclose> <== NOT EXECUTED
passwd_fp = fopen("/etc/passwd", "r");
2864: e59f0014 ldr r0, [pc, #20] ; 2880 <setpwent+0x34> <== NOT EXECUTED 2868: e59f1014 ldr r1, [pc, #20] ; 2884 <setpwent+0x38> <== NOT EXECUTED 286c: eb00333a bl f55c <fopen> <== NOT EXECUTED 2870: e59f3004 ldr r3, [pc, #4] ; 287c <setpwent+0x30> <== NOT EXECUTED 2874: e5830004 str r0, [r3, #4] <== NOT EXECUTED
}
2878: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED
00003248 <siproc>: int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) {
3248: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 324c: e59f3050 ldr r3, [pc, #80] ; 32a4 <siproc+0x5c> <== NOT EXECUTED 3250: e0023003 and r3, r2, r3 <== NOT EXECUTED 3254: e3530000 cmp r3, #0 <== NOT EXECUTED
/* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) {
3258: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 325c: e1a04001 mov r4, r1 <== NOT EXECUTED 3260: 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)) {
3264: 0a00000b beq 3298 <siproc+0x50> <== NOT EXECUTED
rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
3268: e3a01000 mov r1, #0 <== NOT EXECUTED 326c: e1a02001 mov r2, r1 <== NOT EXECUTED 3270: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 3274: eb0005fb bl 4a68 <rtems_semaphore_obtain> <== NOT EXECUTED
i = iproc (c, tty);
3278: e1a01004 mov r1, r4 <== NOT EXECUTED 327c: e1a00005 mov r0, r5 <== NOT EXECUTED 3280: ebffff8b bl 30b4 <iproc> <== NOT EXECUTED 3284: e1a05000 mov r5, r0 <== NOT EXECUTED
rtems_semaphore_release (tty->osem);
3288: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 328c: eb00063b bl 4b80 <rtems_semaphore_release> <== NOT EXECUTED
} else { i = iproc (c, tty); } return i; }
3290: e1a00005 mov r0, r5 <== NOT EXECUTED 3294: 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);
3298: e1a00005 mov r0, r5 <== NOT EXECUTED
} return i; }
329c: 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);
32a0: eaffff83 b 30b4 <iproc> <== NOT EXECUTED
00003e04 <stat>: int _STAT_NAME( const char *path, struct stat *buf ) {
3e04: e92d4070 push {r4, r5, r6, lr}
/* * Check to see if we were passed a valid pointer. */ if ( !buf )
3e08: e2515000 subs r5, r1, #0
int _STAT_NAME( const char *path, struct stat *buf ) {
3e0c: e24dd018 sub sp, sp, #24 3e10: e1a06000 mov r6, r0
/* * Check to see if we were passed a valid pointer. */ if ( !buf ) 3e14: 1a000002 bne 3e24 <stat+0x20> rtems_set_errno_and_return_minus_one( EFAULT );
3e18: eb002d64 bl f3b0 <__errno> 3e1c: e3a0300e mov r3, #14 3e20: ea000018 b 3e88 <stat+0x84>
status = rtems_filesystem_evaluate_path( path, strlen( path ),
3e24: eb003478 bl 1100c <strlen> 3e28: e28d4004 add r4, sp, #4 3e2c: e1a01000 mov r1, r0 3e30: e3a0c001 mov ip, #1 3e34: e1a00006 mov r0, r6 3e38: e3a02000 mov r2, #0 3e3c: e1a03004 mov r3, r4 3e40: e58dc000 str ip, [sp] 3e44: ebfffa29 bl 26f0 <rtems_filesystem_evaluate_path>
0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 )
3e48: e2501000 subs r1, r0, #0
3e4c: 1a00000e bne 3e8c <stat+0x88> return -1; if ( !loc.handlers->fstat_h ){
3e50: e59d300c ldr r3, [sp, #12] 3e54: e5933018 ldr r3, [r3, #24] 3e58: e3530000 cmp r3, #0
3e5c: 1a00000c bne 3e94 <stat+0x90> rtems_filesystem_freenode( &loc );
3e60: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 3e64: e3530000 cmp r3, #0 <== NOT EXECUTED 3e68: 0a000004 beq 3e80 <stat+0x7c> <== NOT EXECUTED 3e6c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 3e70: e3530000 cmp r3, #0 <== NOT EXECUTED 3e74: 11a00004 movne r0, r4 <== NOT EXECUTED 3e78: 11a0e00f movne lr, pc <== NOT EXECUTED 3e7c: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
3e80: eb002d4a bl f3b0 <__errno> <== NOT EXECUTED 3e84: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
3e88: e5803000 str r3, [r0] 3e8c: e3e05000 mvn r5, #0 3e90: ea000010 b 3ed8 <stat+0xd4>
/* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) );
3e94: e3a02048 mov r2, #72 ; 0x48 3e98: e1a00005 mov r0, r5 3e9c: eb003201 bl 106a8 <memset>
status = (*loc.handlers->fstat_h)( &loc, buf );
3ea0: e1a01005 mov r1, r5 3ea4: e59d300c ldr r3, [sp, #12] 3ea8: e1a00004 mov r0, r4 3eac: e1a0e00f mov lr, pc 3eb0: e593f018 ldr pc, [r3, #24]
rtems_filesystem_freenode( &loc );
3eb4: e59d3010 ldr r3, [sp, #16] 3eb8: e3530000 cmp r3, #0
* versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf );
3ebc: e1a05000 mov r5, r0
rtems_filesystem_freenode( &loc ); 3ec0: 0a000004 beq 3ed8 <stat+0xd4>
3ec4: e593301c ldr r3, [r3, #28] 3ec8: e3530000 cmp r3, #0 3ecc: 11a00004 movne r0, r4 3ed0: 11a0e00f movne lr, pc 3ed4: 112fff13 bxne r3
return status; }
3ed8: e1a00005 mov r0, r5 3edc: e28dd018 add sp, sp, #24 3ee0: e8bd8070 pop {r4, r5, r6, pc}
0000415c <symlink>: int symlink( const char *actualpath, const char *sympath ) {
415c: e92d4070 push {r4, r5, r6, lr}
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
4160: e5d13000 ldrb r3, [r1] 4164: e353002f cmp r3, #47 ; 0x2f 4168: 1353005c cmpne r3, #92 ; 0x5c
int symlink( const char *actualpath, const char *sympath ) {
416c: e24dd018 sub sp, sp, #24 4170: e1a05001 mov r5, r1
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc );
4174: 13a06000 movne r6, #0 4178: 03a06001 moveq r6, #1
int symlink( const char *actualpath, const char *sympath ) {
417c: e1a04000 mov r4, r0
rtems_filesystem_location_info_t loc; int i; const char *name_start; int result; rtems_filesystem_get_start_loc( sympath, &i, &loc ); 4180: 0a000001 beq 418c <symlink+0x30>
4184: e3530000 cmp r3, #0
4188: 1a000009 bne 41b4 <symlink+0x58>
418c: e59f30f0 ldr r3, [pc, #240] ; 4284 <symlink+0x128> 4190: e593e000 ldr lr, [r3] 4194: e28ee018 add lr, lr, #24 4198: e8be000f ldm lr!, {r0, r1, r2, r3} 419c: e1a0c00d mov ip, sp 41a0: e8ac000f stmia ip!, {r0, r1, r2, r3} 41a4: e59e3000 ldr r3, [lr] 41a8: e3a00001 mov r0, #1 41ac: e58c3000 str r3, [ip] 41b0: ea000008 b 41d8 <symlink+0x7c> 41b4: e59f30c8 ldr r3, [pc, #200] ; 4284 <symlink+0x128> 41b8: e593e000 ldr lr, [r3] 41bc: e28ee004 add lr, lr, #4 41c0: e8be000f ldm lr!, {r0, r1, r2, r3} 41c4: e1a0c00d mov ip, sp 41c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 41cc: e59e3000 ldr r3, [lr] 41d0: e58c3000 str r3, [ip] 41d4: e1a00006 mov r0, r6
if ( !loc.ops->evalformake_h ) {
41d8: e59d300c ldr r3, [sp, #12] 41dc: e5933004 ldr r3, [r3, #4] 41e0: e3530000 cmp r3, #0
41e4: 0a000010 beq 422c <symlink+0xd0> rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
41e8: e0850000 add r0, r5, r0 41ec: e1a0100d mov r1, sp 41f0: e28d2014 add r2, sp, #20 41f4: e1a0e00f mov lr, pc 41f8: e12fff13 bx r3
if ( result != 0 )
41fc: e3500000 cmp r0, #0
if ( !loc.ops->evalformake_h ) { rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start );
4200: e1a0600d mov r6, sp
if ( result != 0 ) 4204: 1a00000b bne 4238 <symlink+0xdc> return -1; if ( !loc.ops->symlink_h ) {
4208: e59d200c ldr r2, [sp, #12] 420c: e5923038 ldr r3, [r2, #56] ; 0x38 4210: e3530000 cmp r3, #0
4214: 1a000009 bne 4240 <symlink+0xe4> rtems_filesystem_freenode( &loc );
4218: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 421c: e3530000 cmp r3, #0 <== NOT EXECUTED 4220: 11a0000d movne r0, sp <== NOT EXECUTED 4224: 11a0e00f movne lr, pc <== NOT EXECUTED 4228: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
422c: eb002cc2 bl f53c <__errno> <== NOT EXECUTED 4230: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4234: e5803000 str r3, [r0] <== NOT EXECUTED
4238: e3e04000 mvn r4, #0 423c: ea00000d b 4278 <symlink+0x11c>
} result = (*loc.ops->symlink_h)( &loc, actualpath, name_start);
4240: e1a01004 mov r1, r4 4244: e1a0000d mov r0, sp 4248: e59d2014 ldr r2, [sp, #20] 424c: e1a0e00f mov lr, pc 4250: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
4254: e59d300c ldr r3, [sp, #12] 4258: 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);
425c: e1a04000 mov r4, r0
rtems_filesystem_freenode( &loc ); 4260: 0a000004 beq 4278 <symlink+0x11c>
4264: e593301c ldr r3, [r3, #28] 4268: e3530000 cmp r3, #0 426c: 11a0000d movne r0, sp 4270: 11a0e00f movne lr, pc 4274: 112fff13 bxne r3
return result; }
4278: e1a00004 mov r0, r4 427c: e28dd018 add sp, sp, #24 4280: e8bd8070 pop {r4, r5, r6, pc}
00003b44 <tcsetattr>: int fd, int opt, struct termios *tp ) { switch (opt) {
3b44: e3510000 cmp r1, #0
int tcsetattr( int fd, int opt, struct termios *tp ) {
3b48: e92d4030 push {r4, r5, lr} 3b4c: e1a04002 mov r4, r2 3b50: e1a05000 mov r5, r0
switch (opt) { 3b54: 0a00000a beq 3b84 <tcsetattr+0x40>
3b58: e3510001 cmp r1, #1 <== NOT EXECUTED 3b5c: 0a000003 beq 3b70 <tcsetattr+0x2c> <== NOT EXECUTED
default: rtems_set_errno_and_return_minus_one( ENOTSUP );
3b60: eb002a61 bl e4ec <__errno> <== NOT EXECUTED 3b64: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3b68: e5803000 str r3, [r0] <== NOT EXECUTED 3b6c: ea000009 b 3b98 <tcsetattr+0x54> <== NOT EXECUTED
case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0)
3b70: e3a01003 mov r1, #3 <== NOT EXECUTED 3b74: e3a02000 mov r2, #0 <== NOT EXECUTED 3b78: eb001c32 bl ac48 <ioctl> <== NOT EXECUTED 3b7c: e3500000 cmp r0, #0 <== NOT EXECUTED 3b80: ba000004 blt 3b98 <tcsetattr+0x54> <== NOT EXECUTED
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
3b84: e1a00005 mov r0, r5 3b88: e1a02004 mov r2, r4 3b8c: e3a01002 mov r1, #2
} }
3b90: e8bd4030 pop {r4, r5, lr}
return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp );
3b94: ea001c2b b ac48 <ioctl>
} }
3b98: e3e00000 mvn r0, #0 <== NOT EXECUTED 3b9c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED
0000c510 <unlink>: #include <rtems/seterr.h> int unlink( const char *path ) {
c510: e92d4070 push {r4, r5, r6, lr} c514: e24dd02c sub sp, sp, #44 ; 0x2c c518: e1a06000 mov r6, r0
/* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path );
c51c: ebffd48e bl 175c <rtems_filesystem_dirname>
if ( parentpathlen == 0 )
c520: e2505000 subs r5, r0, #0
c524: 1a000019 bne c590 <unlink+0x80> rtems_filesystem_get_start_loc( path, &i, &parentloc );
c528: e5d63000 ldrb r3, [r6] c52c: e353002f cmp r3, #47 ; 0x2f c530: 1353005c cmpne r3, #92 ; 0x5c
c534: 0a000001 beq c540 <unlink+0x30>
c538: e3530000 cmp r3, #0
c53c: 1a000009 bne c568 <unlink+0x58>
c540: e59f3248 ldr r3, [pc, #584] ; c790 <unlink+0x280> c544: e593e000 ldr lr, [r3] c548: e28ee018 add lr, lr, #24 c54c: e8be000f ldm lr!, {r0, r1, r2, r3} c550: e28dc018 add ip, sp, #24 c554: e8ac000f stmia ip!, {r0, r1, r2, r3} c558: e59e3000 ldr r3, [lr] c55c: e3a04000 mov r4, #0 c560: e58c3000 str r3, [ip] c564: ea000013 b c5b8 <unlink+0xa8> c568: e59f3220 ldr r3, [pc, #544] ; c790 <unlink+0x280> c56c: e593e000 ldr lr, [r3] c570: e28ee004 add lr, lr, #4 c574: e8be000f ldm lr!, {r0, r1, r2, r3} c578: e28dc018 add ip, sp, #24 c57c: e8ac000f stmia ip!, {r0, r1, r2, r3} c580: e59e3000 ldr r3, [lr] c584: e1a04005 mov r4, r5 c588: e58c3000 str r3, [ip] c58c: ea000009 b c5b8 <unlink+0xa8>
else { result = rtems_filesystem_evaluate_path( path, parentpathlen,
c590: e3a0c000 mov ip, #0 c594: e1a00006 mov r0, r6 c598: e1a01005 mov r1, r5 c59c: e3a02002 mov r2, #2 c5a0: e28d3018 add r3, sp, #24 c5a4: e58dc000 str ip, [sp] c5a8: ebffd4b3 bl 187c <rtems_filesystem_evaluate_path>
RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 )
c5ac: e3500000 cmp r0, #0
c5b0: 1a000072 bne c780 <unlink+0x270>
c5b4: e3a04001 mov r4, #1
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
c5b8: e28de018 add lr, sp, #24 c5bc: e8be000f ldm lr!, {r0, r1, r2, r3} c5c0: e28dc004 add ip, sp, #4 c5c4: e8ac000f stmia ip!, {r0, r1, r2, r3} c5c8: e59e3000 ldr r3, [lr]
name = path + parentpathlen;
c5cc: e0865005 add r5, r6, r5
/* * Start from the parent to find the node that should be under it. */ loc = parentloc;
c5d0: e58c3000 str r3, [ip]
name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) );
c5d4: e1a00005 mov r0, r5 c5d8: eb0005d2 bl dd28 <strlen> c5dc: e1a01000 mov r1, r0 c5e0: e1a00005 mov r0, r5 c5e4: ebffd450 bl 172c <rtems_filesystem_prefix_separators> c5e8: e0856000 add r6, r5, r0
result = rtems_filesystem_evaluate_relative_path( name , strlen( name ),
c5ec: e1a00006 mov r0, r6 c5f0: eb0005cc bl dd28 <strlen> c5f4: e28d5004 add r5, sp, #4 c5f8: e3a0c000 mov ip, #0 c5fc: e1a01000 mov r1, r0 c600: e1a0200c mov r2, ip c604: e1a00006 mov r0, r6 c608: e1a03005 mov r3, r5 c60c: e58dc000 str ip, [sp] c610: ebffd461 bl 179c <rtems_filesystem_evaluate_relative_path>
0, &loc, false ); if ( result != 0 ) {
c614: e3500000 cmp r0, #0
c618: 0a00000b beq c64c <unlink+0x13c> if ( free_parentloc )
c61c: e3540000 cmp r4, #0
c620: 0a000056 beq c780 <unlink+0x270> rtems_filesystem_freenode( &parentloc );
c624: e59d3024 ldr r3, [sp, #36] ; 0x24 c628: e3530000 cmp r3, #0
c62c: 0a000053 beq c780 <unlink+0x270>
c630: e593301c ldr r3, [r3, #28] c634: e3530000 cmp r3, #0
c638: 0a000050 beq c780 <unlink+0x270>
c63c: e28d0018 add r0, sp, #24 c640: e1a0e00f mov lr, pc c644: e12fff13 bx r3 c648: ea00004c b c780 <unlink+0x270>
return -1; } if ( !loc.ops->node_type_h ) {
c64c: e59d2010 ldr r2, [sp, #16] c650: e5923010 ldr r3, [r2, #16] c654: e3530000 cmp r3, #0
c658: 0a00001c beq c6d0 <unlink+0x1c0> 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 ) {
c65c: e1a00005 mov r0, r5 c660: e1a0e00f mov lr, pc c664: e12fff13 bx r3 c668: e3500001 cmp r0, #1 c66c: e59d2010 ldr r2, [sp, #16]
c670: 1a000013 bne c6c4 <unlink+0x1b4> rtems_filesystem_freenode( &loc );
c674: e3520000 cmp r2, #0
c678: 0a000004 beq c690 <unlink+0x180>
c67c: e592301c ldr r3, [r2, #28] c680: e3530000 cmp r3, #0 c684: 11a00005 movne r0, r5 c688: 11a0e00f movne lr, pc c68c: 112fff13 bxne r3
if ( free_parentloc )
c690: e3540000 cmp r4, #0
c694: 0a000007 beq c6b8 <unlink+0x1a8> rtems_filesystem_freenode( &parentloc );
c698: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c69c: e3530000 cmp r3, #0 <== NOT EXECUTED c6a0: 0a000004 beq c6b8 <unlink+0x1a8> <== NOT EXECUTED c6a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c6a8: e3530000 cmp r3, #0 <== NOT EXECUTED c6ac: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c6b0: 11a0e00f movne lr, pc <== NOT EXECUTED c6b4: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( EISDIR );
c6b8: eb0001a9 bl cd64 <__errno> c6bc: e3a03015 mov r3, #21 c6c0: ea000013 b c714 <unlink+0x204>
} if ( !loc.ops->unlink_h ) {
c6c4: e592300c ldr r3, [r2, #12] c6c8: e3530000 cmp r3, #0
c6cc: 1a000012 bne c71c <unlink+0x20c> rtems_filesystem_freenode( &loc );
c6d0: e592301c ldr r3, [r2, #28] <== NOT EXECUTED c6d4: e3530000 cmp r3, #0 <== NOT EXECUTED c6d8: 11a00005 movne r0, r5 <== NOT EXECUTED c6dc: 11a0e00f movne lr, pc <== NOT EXECUTED c6e0: 112fff13 bxne r3 <== NOT EXECUTED
if ( free_parentloc )
c6e4: e3540000 cmp r4, #0 <== NOT EXECUTED c6e8: 0a000007 beq c70c <unlink+0x1fc> <== NOT EXECUTED
rtems_filesystem_freenode( &parentloc );
c6ec: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c6f0: e3530000 cmp r3, #0 <== NOT EXECUTED c6f4: 0a000004 beq c70c <unlink+0x1fc> <== NOT EXECUTED c6f8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c6fc: e3530000 cmp r3, #0 <== NOT EXECUTED c700: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c704: 11a0e00f movne lr, pc <== NOT EXECUTED c708: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
c70c: eb000194 bl cd64 <__errno> <== NOT EXECUTED c710: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED
c714: e5803000 str r3, [r0] c718: ea000018 b c780 <unlink+0x270>
} result = (*loc.ops->unlink_h)( &parentloc, &loc );
c71c: e28d0018 add r0, sp, #24 c720: e1a01005 mov r1, r5 c724: e1a0e00f mov lr, pc c728: e12fff13 bx r3
rtems_filesystem_freenode( &loc );
c72c: e59d3010 ldr r3, [sp, #16] c730: 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 );
c734: e1a06000 mov r6, r0
rtems_filesystem_freenode( &loc ); c738: 0a000004 beq c750 <unlink+0x240>
c73c: e593301c ldr r3, [r3, #28] c740: e3530000 cmp r3, #0 c744: 11a00005 movne r0, r5 c748: 11a0e00f movne lr, pc c74c: 112fff13 bxne r3
if ( free_parentloc )
c750: e3540000 cmp r4, #0
c754: 0a00000a beq c784 <unlink+0x274> rtems_filesystem_freenode( &parentloc );
c758: e59d3024 ldr r3, [sp, #36] ; 0x24 c75c: e3530000 cmp r3, #0
c760: 0a000007 beq c784 <unlink+0x274>
c764: e593301c ldr r3, [r3, #28] c768: e3530000 cmp r3, #0
c76c: 0a000004 beq c784 <unlink+0x274>
c770: e28d0018 add r0, sp, #24 c774: e1a0e00f mov lr, pc c778: e12fff13 bx r3 c77c: ea000000 b c784 <unlink+0x274> c780: e3e06000 mvn r6, #0
return result; }
c784: e1a00006 mov r0, r6 c788: e28dd02c add sp, sp, #44 ; 0x2c c78c: e8bd8070 pop {r4, r5, r6, pc}
000083a0 <unmount>: */ int unmount( const char *path ) {
83a0: e92d4030 push {r4, r5, lr} 83a4: e24dd018 sub sp, sp, #24 83a8: 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 ) )
83ac: eb003362 bl 1513c <strlen> 83b0: e28d4004 add r4, sp, #4 83b4: e1a01000 mov r1, r0 83b8: e3a0c001 mov ip, #1 83bc: e1a00005 mov r0, r5 83c0: e3a02000 mov r2, #0 83c4: e1a03004 mov r3, r4 83c8: e58dc000 str ip, [sp] 83cc: ebfff1d6 bl 4b2c <rtems_filesystem_evaluate_path> 83d0: e3500000 cmp r0, #0
83d4: 1a000057 bne 8538 <unmount+0x198> return -1; mt_entry = loc.mt_entry;
83d8: e59d5014 ldr r5, [sp, #20]
fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root;
83dc: e59d3004 ldr r3, [sp, #4] 83e0: e595201c ldr r2, [r5, #28] 83e4: e1520003 cmp r2, r3 83e8: e59d3010 ldr r3, [sp, #16]
83ec: 0a000009 beq 8418 <unmount+0x78> /* * Verify this is the root node for the file system to be unmounted. */ if ( !rtems_filesystem_nodes_equal( fs_root_loc, &loc) ){ rtems_filesystem_freenode( &loc );
83f0: e3530000 cmp r3, #0
83f4: 0a000004 beq 840c <unmount+0x6c>
83f8: e593301c ldr r3, [r3, #28] 83fc: e3530000 cmp r3, #0 8400: 11a00004 movne r0, r4 8404: 11a0e00f movne lr, pc 8408: 112fff13 bxne r3
rtems_set_errno_and_return_minus_one( EACCES );
840c: eb002674 bl 11de4 <__errno> 8410: e3a0300d mov r3, #13 8414: ea000023 b 84a8 <unmount+0x108>
/* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc );
8418: e3530000 cmp r3, #0
841c: 0a000004 beq 8434 <unmount+0x94>
8420: e593301c ldr r3, [r3, #28] 8424: e3530000 cmp r3, #0 8428: 11a00004 movne r0, r4 842c: 11a0e00f movne lr, pc 8430: 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;
8434: e5953014 ldr r3, [r5, #20] 8438: e5933028 ldr r3, [r3, #40] ; 0x28 843c: e3530000 cmp r3, #0
8440: 0a000003 beq 8454 <unmount+0xb4> fs_root_loc = &mt_entry->mt_fs_root;
8444: e5953028 ldr r3, [r5, #40] ; 0x28 8448: e593302c ldr r3, [r3, #44] ; 0x2c 844c: e3530000 cmp r3, #0
8450: 1a000002 bne 8460 <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 );
8454: eb002662 bl 11de4 <__errno> <== NOT EXECUTED 8458: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 845c: ea000011 b 84a8 <unmount+0x108> <== 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 )
8460: e59f30f0 ldr r3, [pc, #240] ; 8558 <unmount+0x1b8> 8464: e5933000 ldr r3, [r3] 8468: e5933014 ldr r3, [r3, #20] 846c: e1530005 cmp r3, r5
/* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first;
8470: 159f20e4 ldrne r2, [pc, #228] ; 855c <unmount+0x1bc> 8474: 14923004 ldrne r3, [r2], #4
* 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 ) 8478: 1a000005 bne 8494 <unmount+0xf4>
847c: ea000007 b 84a0 <unmount+0x100>
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; fs_root_loc = &mt_entry->mt_fs_root;
8480: e5930018 ldr r0, [r3, #24] 8484: e595102c ldr r1, [r5, #44] ; 0x2c 8488: e1500001 cmp r0, r1
848c: 0a000003 beq 84a0 <unmount+0x100> * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; !rtems_chain_is_tail( &rtems_filesystem_mount_table_control, the_node ); the_node = the_node->next ) {
8490: e5933000 ldr r3, [r3] 8494: e1530002 cmp r3, r2
8498: 1afffff8 bne 8480 <unmount+0xe0>
849c: ea000028 b 8544 <unmount+0x1a4>
* descriptors that are currently active and reference nodes in the * file system that we are trying to unmount */ if ( rtems_libio_is_open_files_in_fs( mt_entry ) == 1 ) rtems_set_errno_and_return_minus_one( EBUSY );
84a0: eb00264f bl 11de4 <__errno> 84a4: e3a03010 mov r3, #16 84a8: e5803000 str r3, [r0] 84ac: ea000021 b 8538 <unmount+0x198>
* 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 )
84b0: e5953014 ldr r3, [r5, #20] 84b4: e1a00005 mov r0, r5 84b8: e1a0e00f mov lr, pc 84bc: e593f028 ldr pc, [r3, #40] ; 0x28 84c0: e2504000 subs r4, r0, #0
84c4: 1a00001b bne 8538 <unmount+0x198> * 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){
84c8: e5953028 ldr r3, [r5, #40] ; 0x28 84cc: e1a00005 mov r0, r5 84d0: e1a0e00f mov lr, pc 84d4: e593f02c ldr pc, [r3, #44] ; 0x2c 84d8: e3500000 cmp r0, #0
84dc: 0a000007 beq 8500 <unmount+0x160> if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 )
84e0: e1a00005 mov r0, r5 <== NOT EXECUTED 84e4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 84e8: e1a0e00f mov lr, pc <== NOT EXECUTED 84ec: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 84f0: e3500000 cmp r0, #0 <== NOT EXECUTED 84f4: 0a00000f beq 8538 <unmount+0x198> <== NOT EXECUTED
rtems_fatal_error_occurred( 0 );
84f8: e1a00004 mov r0, r4 <== NOT EXECUTED 84fc: eb000471 bl 96c8 <rtems_fatal_error_occurred> <== NOT EXECUTED
*/ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node );
8500: e1a00005 mov r0, r5 8504: eb000534 bl 99dc <_Chain_Extract>
/* * 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 );
8508: e5953014 ldr r3, [r5, #20] 850c: e3530000 cmp r3, #0
8510: 0a000004 beq 8528 <unmount+0x188>
8514: e593301c ldr r3, [r3, #28] 8518: e3530000 cmp r3, #0 851c: 12850008 addne r0, r5, #8 8520: 11a0e00f movne lr, pc 8524: 112fff13 bxne r3
free( mt_entry );
8528: e1a00005 mov r0, r5 852c: ebfff1b1 bl 4bf8 <free> 8530: e3a00000 mov r0, #0
return 0;
8534: ea000000 b 853c <unmount+0x19c> 8538: e3e00000 mvn r0, #0
}
853c: e28dd018 add sp, sp, #24 8540: e8bd8030 pop {r4, r5, pc}
* 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 )
8544: e1a00005 mov r0, r5 8548: ebfff24d bl 4e84 <rtems_libio_is_open_files_in_fs> 854c: e3500001 cmp r0, #1
8550: 1affffd6 bne 84b0 <unmount+0x110>
8554: eaffffd1 b 84a0 <unmount+0x100>
00005a80 <utime>: int utime( const char *path, const struct utimbuf *times ) {
5a80: e92d4070 push {r4, r5, r6, lr} 5a84: e24dd018 sub sp, sp, #24 5a88: e1a05001 mov r5, r1 5a8c: 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 ) )
5a90: eb002d5d bl 1100c <strlen> 5a94: e28d4004 add r4, sp, #4 5a98: e1a01000 mov r1, r0 5a9c: e3a0c001 mov ip, #1 5aa0: e1a00006 mov r0, r6 5aa4: e3a02000 mov r2, #0 5aa8: e1a03004 mov r3, r4 5aac: e58dc000 str ip, [sp] 5ab0: ebfff30e bl 26f0 <rtems_filesystem_evaluate_path> 5ab4: e3500000 cmp r0, #0
5ab8: 1a00000b bne 5aec <utime+0x6c> return -1; if ( !temp_loc.ops->utime_h ){
5abc: e59d2010 ldr r2, [sp, #16] 5ac0: e5923030 ldr r3, [r2, #48] ; 0x30 5ac4: e3530000 cmp r3, #0
5ac8: 1a000009 bne 5af4 <utime+0x74> rtems_filesystem_freenode( &temp_loc );
5acc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 5ad0: e3530000 cmp r3, #0 <== NOT EXECUTED 5ad4: 11a00004 movne r0, r4 <== NOT EXECUTED 5ad8: 11a0e00f movne lr, pc <== NOT EXECUTED 5adc: 112fff13 bxne r3 <== NOT EXECUTED
rtems_set_errno_and_return_minus_one( ENOTSUP );
5ae0: eb002632 bl f3b0 <__errno> <== NOT EXECUTED 5ae4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5ae8: e5803000 str r3, [r0] <== NOT EXECUTED
5aec: e3e05000 mvn r5, #0 5af0: ea00000c b 5b28 <utime+0xa8>
} result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime );
5af4: e8950006 ldm r5, {r1, r2} 5af8: e1a00004 mov r0, r4 5afc: e1a0e00f mov lr, pc 5b00: e12fff13 bx r3
rtems_filesystem_freenode( &temp_loc );
5b04: e59d3010 ldr r3, [sp, #16] 5b08: 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 );
5b0c: e1a05000 mov r5, r0
rtems_filesystem_freenode( &temp_loc ); 5b10: 0a000004 beq 5b28 <utime+0xa8>
5b14: e593301c ldr r3, [r3, #28] 5b18: e3530000 cmp r3, #0 5b1c: 11a00004 movne r0, r4 5b20: 11a0e00f movne lr, pc 5b24: 112fff13 bxne r3
return result; }
5b28: e1a00005 mov r0, r5 5b2c: e28dd018 add sp, sp, #24 5b30: e8bd8070 pop {r4, r5, r6, pc}
0001814c <write>: ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd );
1814c: e59f30b0 ldr r3, [pc, #176] ; 18204 <write+0xb8> 18150: e5933000 ldr r3, [r3] 18154: e1500003 cmp r0, r3
ssize_t write( int fd, const void *buffer, size_t count ) {
18158: e92d4070 push {r4, r5, r6, lr} 1815c: e1a05001 mov r5, r1
ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 18160: 2a000005 bcs 1817c <write+0x30> iop = rtems_libio_iop( fd );
18164: e59f309c ldr r3, [pc, #156] ; 18208 <write+0xbc> 18168: e5934000 ldr r4, [r3] 1816c: e0844300 add r4, r4, r0, lsl #6
rtems_libio_check_is_open( iop );
18170: e5943014 ldr r3, [r4, #20] 18174: e3130c01 tst r3, #256 ; 0x100
18178: 1a000002 bne 18188 <write+0x3c>
1817c: ebffd2f8 bl cd64 <__errno> <== NOT EXECUTED 18180: e3a03009 mov r3, #9 <== NOT EXECUTED 18184: ea00000f b 181c8 <write+0x7c> <== NOT EXECUTED
rtems_libio_check_buffer( buffer );
18188: e3510000 cmp r1, #0
1818c: 0a000004 beq 181a4 <write+0x58> rtems_libio_check_count( count );
18190: e3520000 cmp r2, #0 18194: 01a00002 moveq r0, r2 18198: 08bd8070 popeq {r4, r5, r6, pc}
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
1819c: e3130004 tst r3, #4
181a0: 1a000002 bne 181b0 <write+0x64>
181a4: ebffd2ee bl cd64 <__errno> <== NOT EXECUTED 181a8: e3a03016 mov r3, #22 <== NOT EXECUTED 181ac: ea000005 b 181c8 <write+0x7c> <== NOT EXECUTED
/* * Now process the write() request. */ if ( !iop->handlers->write_h )
181b0: e594303c ldr r3, [r4, #60] ; 0x3c 181b4: e593300c ldr r3, [r3, #12] 181b8: e3530000 cmp r3, #0
181bc: 1a000004 bne 181d4 <write+0x88> rtems_set_errno_and_return_minus_one( ENOTSUP );
181c0: ebffd2e7 bl cd64 <__errno> <== NOT EXECUTED 181c4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 181c8: e5803000 str r3, [r0] <== NOT EXECUTED 181cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 181d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED
rc = (*iop->handlers->write_h)( iop, buffer, count );
181d4: e1a00004 mov r0, r4 181d8: e1a0e00f mov lr, pc 181dc: e12fff13 bx r3
if ( rc > 0 )
181e0: e3500000 cmp r0, #0 181e4: d8bd8070 pople {r4, r5, r6, pc}
iop->offset += rc;
181e8: e284600c add r6, r4, #12 181ec: e8960060 ldm r6, {r5, r6} 181f0: e0952000 adds r2, r5, r0 181f4: e0a63fc0 adc r3, r6, r0, asr #31 181f8: e584200c str r2, [r4, #12] 181fc: e5843010 str r3, [r4, #16]
return rc; }
18200: e8bd8070 pop {r4, r5, r6, pc}
00005a94 <writev>: int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd );
5a94: e59f3164 ldr r3, [pc, #356] ; 5c00 <writev+0x16c> 5a98: e5933000 ldr r3, [r3] 5a9c: e1500003 cmp r0, r3
ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) {
5aa0: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5aa4: e1a08002 mov r8, r2
int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5aa8: 2a000005 bcs 5ac4 <writev+0x30> iop = rtems_libio_iop( fd );
5aac: e59f3150 ldr r3, [pc, #336] ; 5c04 <writev+0x170> 5ab0: e5936000 ldr r6, [r3] 5ab4: e0866300 add r6, r6, r0, lsl #6
rtems_libio_check_is_open( iop );
5ab8: e5963014 ldr r3, [r6, #20] 5abc: e3130c01 tst r3, #256 ; 0x100
5ac0: 1a000002 bne 5ad0 <writev+0x3c>
5ac4: eb0025d4 bl f21c <__errno> 5ac8: e3a03009 mov r3, #9 5acc: ea000025 b 5b68 <writev+0xd4>
rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE );
5ad0: e3130004 tst r3, #4
5ad4: 0a000021 beq 5b60 <writev+0xcc> /* * Argument validation on IO vector */ if ( !iov )
5ad8: e3510000 cmp r1, #0
5adc: 0a00001f beq 5b60 <writev+0xcc> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 )
5ae0: e3520000 cmp r2, #0
5ae4: da00001d ble 5b60 <writev+0xcc> rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX )
5ae8: e3520b01 cmp r2, #1024 ; 0x400
5aec: ca00001b bgt 5b60 <writev+0xcc> rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h )
5af0: e596303c ldr r3, [r6, #60] ; 0x3c 5af4: e593300c ldr r3, [r3, #12] 5af8: e3530000 cmp r3, #0
5afc: 1a000002 bne 5b0c <writev+0x78> rtems_set_errno_and_return_minus_one( ENOTSUP );
5b00: eb0025c5 bl f21c <__errno> <== NOT EXECUTED 5b04: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 5b08: ea000016 b 5b68 <writev+0xd4> <== NOT EXECUTED
5b0c: e3a03000 mov r3, #0
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
5b10: e59fc0f0 ldr ip, [pc, #240] ; 5c08 <writev+0x174>
if ( iovcnt > IOV_MAX ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) rtems_set_errno_and_return_minus_one( ENOTSUP );
5b14: e1a05001 mov r5, r1 5b18: e1a02001 mov r2, r1 5b1c: e3a07001 mov r7, #1 5b20: e1a04003 mov r4, r3
* entering the write loop. */ all_zeros = true; for ( old=0, total=0, v=0 ; v < iovcnt ; v++ ) { if ( !iov[v].iov_base )
5b24: e5921000 ldr r1, [r2] 5b28: 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++ ) {
5b2c: e2833001 add r3, r3, #1
if ( !iov[v].iov_base ) 5b30: 0a00000a beq 5b60 <writev+0xcc> 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 )
5b34: e5920004 ldr r0, [r2, #4]
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len;
5b38: e0841000 add r1, r4, r0
if ( total < old || total > SSIZE_MAX )
5b3c: e1510004 cmp r1, r4 5b40: a3a04000 movge r4, #0 5b44: b3a04001 movlt r4, #1 5b48: e151000c cmp r1, ip 5b4c: c3844001 orrgt r4, 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 )
5b50: e3500000 cmp r0, #0 5b54: 13a07000 movne r7, #0
all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX )
5b58: e3540000 cmp r4, #0
5b5c: 0a000003 beq 5b70 <writev+0xdc> rtems_set_errno_and_return_minus_one( EINVAL );
5b60: eb0025ad bl f21c <__errno> 5b64: e3a03016 mov r3, #22 5b68: e5803000 str r3, [r0] 5b6c: ea000011 b 5bb8 <writev+0x124>
* 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++ ) {
5b70: e1530008 cmp r3, r8 5b74: e2822008 add r2, r2, #8 5b78: b1a04001 movlt r4, r1
5b7c: baffffe8 blt 5b24 <writev+0x90> } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) {
5b80: e3570000 cmp r7, #0
5b84: 1a00001b bne 5bf8 <writev+0x164>
5b88: 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 )
5b8c: e5952004 ldr r2, [r5, #4] 5b90: e3520000 cmp r2, #0
} /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5b94: e2877001 add r7, r7, #1
/* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5b98: 0a000013 beq 5bec <writev+0x158> continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len );
5b9c: e5951000 ldr r1, [r5] 5ba0: e596303c ldr r3, [r6, #60] ; 0x3c 5ba4: e1a00006 mov r0, r6 5ba8: e1a0e00f mov lr, pc 5bac: e593f00c ldr pc, [r3, #12]
if ( bytes < 0 )
5bb0: e3500000 cmp r0, #0
5bb4: aa000001 bge 5bc0 <writev+0x12c>
5bb8: e3e04000 mvn r4, #0 5bbc: ea00000d b 5bf8 <writev+0x164>
return -1; if ( bytes > 0 ) { 5bc0: 0a000006 beq 5be0 <writev+0x14c> iop->offset += bytes;
5bc4: e286c00c add ip, r6, #12 5bc8: e89c1800 ldm ip, {fp, ip} 5bcc: e09b2000 adds r2, fp, r0 5bd0: e0ac3fc0 adc r3, ip, r0, asr #31 5bd4: e586200c str r2, [r6, #12] 5bd8: e5863010 str r3, [r6, #16]
total += bytes;
5bdc: e0844000 add r4, r4, r0
} if (bytes != iov[ v ].iov_len)
5be0: e5953004 ldr r3, [r5, #4] 5be4: e1500003 cmp r0, r3
5be8: 1a000002 bne 5bf8 <writev+0x164> } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) {
5bec: e1570008 cmp r7, r8 5bf0: e2855008 add r5, r5, #8
5bf4: baffffe4 blt 5b8c <writev+0xf8> if (bytes != iov[ v ].iov_len) break; } return total; }
5bf8: e1a00004 mov r0, r4 5bfc: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc}