00007864 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 7864: e5903000 ldr r3, [r0] 7868: 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; 786c: e5903010 ldr r3, [r0, #16] switch( node->type ) { 7870: 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; 7874: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 7878: e3520006 cmp r2, #6 787c: 979ff102 ldrls pc, [pc, r2, lsl #2] 7880: ea000010 b 78c8 <== NOT EXECUTED 7884: 000078a0 .word 0x000078a0 <== NOT EXECUTED 7888: 000078a8 .word 0x000078a8 <== NOT EXECUTED 788c: 000078b0 .word 0x000078b0 <== NOT EXECUTED 7890: 000078b0 .word 0x000078b0 <== NOT EXECUTED 7894: 000078b8 .word 0x000078b8 <== NOT EXECUTED 7898: 000078b8 .word 0x000078b8 <== NOT EXECUTED 789c: 000078c0 .word 0x000078c0 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 78a0: e5933008 ldr r3, [r3, #8] 78a4: ea000006 b 78c4 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 78a8: e59f3020 ldr r3, [pc, #32] ; 78d0 78ac: ea000004 b 78c4 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 78b0: e59f301c ldr r3, [pc, #28] ; 78d4 78b4: ea000002 b 78c4 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 78b8: e5933004 ldr r3, [r3, #4] 78bc: ea000000 b 78c4 break; case IMFS_FIFO: loc->handlers = &IMFS_fifo_handlers; 78c0: e59f3010 ldr r3, [pc, #16] ; 78d8 78c4: e5803008 str r3, [r0, #8] break; } return 0; } 78c8: e3a00000 mov r0, #0 78cc: e12fff1e bx lr 78d0: 00018d34 .word 0x00018d34 78d4: 00018d6c .word 0x00018d6c 78d8: 00018cdc .word 0x00018cdc 0000c404 : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { c404: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} c408: e1a02802 lsl r2, r2, #16 c40c: 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; c410: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { c414: e1a07821 lsr r7, r1, #16 c418: 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(); c41c: eb000441 bl d528 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) c420: e1d453bc ldrh r5, [r4, #60] ; 0x3c c424: e3500000 cmp r0, #0 c428: 11550000 cmpne r5, r0 c42c: 03a05000 moveq r5, #0 c430: 13a05001 movne r5, #1 c434: 0a000004 beq c44c rtems_set_errno_and_return_minus_one( EPERM ); c438: eb001533 bl 1190c <__errno> <== NOT EXECUTED c43c: e3a03001 mov r3, #1 <== NOT EXECUTED c440: e5803000 str r3, [r0] <== NOT EXECUTED c444: e3e00000 mvn r0, #0 <== NOT EXECUTED c448: ea000007 b c46c <== NOT EXECUTED #endif jnode->st_uid = owner; c44c: e1c473bc strh r7, [r4, #60] ; 0x3c jnode->st_gid = group; c450: e1c463be strh r6, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); c454: e1a0000d mov r0, sp c458: e1a01005 mov r1, r5 c45c: ebffd8b1 bl 2728 c460: e59d3000 ldr r3, [sp] c464: e5843048 str r3, [r4, #72] ; 0x48 c468: e1a00005 mov r0, r5 return 0; } c46c: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} 0000b1b0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b1b0: 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 ) b1b4: e2504000 subs r4, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { b1b8: e1a05001 mov r5, r1 b1bc: e59d6014 ldr r6, [sp, #20] b1c0: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) b1c4: 01a07004 moveq r7, r4 b1c8: 0a000041 beq b2d4 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); b1cc: e59f2108 ldr r2, [pc, #264] ; b2dc b1d0: e5922000 ldr r2, [r2] b1d4: e592202c ldr r2, [r2, #44] ; 0x2c b1d8: e1a00005 mov r0, r5 b1dc: e1c32002 bic r2, r3, r2 b1e0: ebffffc4 bl b0f8 if ( !node ) b1e4: e2507000 subs r7, r0, #0 b1e8: 0a000039 beq b2d4 return NULL; /* * Set the type specific information */ switch (type) { b1ec: e2455001 sub r5, r5, #1 b1f0: e3550006 cmp r5, #6 b1f4: 979ff105 ldrls pc, [pc, r5, lsl #2] b1f8: ea000025 b b294 <== NOT EXECUTED b1fc: 0000b218 .word 0x0000b218 <== NOT EXECUTED b200: 0000b23c .word 0x0000b23c <== NOT EXECUTED b204: 0000b234 .word 0x0000b234 <== NOT EXECUTED b208: 0000b234 .word 0x0000b234 <== NOT EXECUTED b20c: 0000b264 .word 0x0000b264 <== NOT EXECUTED b210: 0000b24c .word 0x0000b24c <== NOT EXECUTED b214: 0000b288 .word 0x0000b288 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b218: e2872054 add r2, r7, #84 ; 0x54 the_chain->permanent_null = NULL; the_chain->last = _Chain_Head(the_chain); b21c: e2873050 add r3, r7, #80 ; 0x50 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); b220: e5872050 str r2, [r7, #80] ; 0x50 the_chain->permanent_null = NULL; b224: e3a02000 mov r2, #0 b228: e5872054 str r2, [r7, #84] ; 0x54 the_chain->last = _Chain_Head(the_chain); b22c: e5873058 str r3, [r7, #88] ; 0x58 b230: ea00001c b b2a8 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; b234: e5963000 ldr r3, [r6] b238: ea000013 b b28c break; case IMFS_DEVICE: node->info.device.major = info->device.major; node->info.device.minor = info->device.minor; b23c: 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; b240: e5963000 ldr r3, [r6] node->info.device.minor = info->device.minor; b244: e5872054 str r2, [r7, #84] ; 0x54 b248: ea00000f b b28c break; case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; b24c: e3a03000 mov r3, #0 <== NOT EXECUTED b250: e3a02000 mov r2, #0 <== NOT EXECUTED b254: e5872050 str r2, [r7, #80] ; 0x50 <== NOT EXECUTED b258: e5873054 str r3, [r7, #84] ; 0x54 <== NOT EXECUTED node->info.linearfile.direct = 0; b25c: e3a03000 mov r3, #0 <== NOT EXECUTED b260: e5873058 str r3, [r7, #88] ; 0x58 <== NOT EXECUTED case IMFS_MEMORY_FILE: node->info.file.size = 0; node->info.file.indirect = 0; b264: 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; b268: e3a01000 mov r1, #0 b26c: e3a02000 mov r2, #0 b270: e5871050 str r1, [r7, #80] ; 0x50 b274: e5872054 str r2, [r7, #84] ; 0x54 node->info.file.indirect = 0; node->info.file.doubly_indirect = 0; node->info.file.triply_indirect = 0; b278: 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; b27c: e5873058 str r3, [r7, #88] ; 0x58 node->info.file.doubly_indirect = 0; b280: e587305c str r3, [r7, #92] ; 0x5c node->info.file.triply_indirect = 0; break; b284: ea000007 b b2a8 case IMFS_FIFO: node->info.fifo.pipe = NULL; b288: e3a03000 mov r3, #0 b28c: e5873050 str r3, [r7, #80] ; 0x50 break; b290: ea000004 b b2a8 default: assert(0); b294: e59f0044 ldr r0, [pc, #68] ; b2e0 <== NOT EXECUTED b298: e3a0105c mov r1, #92 ; 0x5c <== NOT EXECUTED b29c: e59f2040 ldr r2, [pc, #64] ; b2e4 <== NOT EXECUTED b2a0: e59f3040 ldr r3, [pc, #64] ; b2e8 <== NOT EXECUTED b2a4: ebfff4dd bl 8620 <__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; b2a8: e5943010 ldr r3, [r4, #16] b2ac: e5932034 ldr r2, [r3, #52] ; 0x34 node->Parent = parent; node->st_ino = ++fs_info->ino_count; b2b0: e5923000 ldr r3, [r2] } /* * This node MUST have a parent, so put it in that directory list. */ parent = parent_loc->node_access; b2b4: e5940000 ldr r0, [r4] fs_info = parent_loc->mt_entry->fs_info; node->Parent = parent; node->st_ino = ++fs_info->ino_count; b2b8: e2833001 add r3, r3, #1 b2bc: e5823000 str r3, [r2] * 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; b2c0: e5870008 str r0, [r7, #8] node->st_ino = ++fs_info->ino_count; b2c4: 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 ); b2c8: e2800050 add r0, r0, #80 ; 0x50 b2cc: e1a01007 mov r1, r7 b2d0: ebffe62d bl 4b8c <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } b2d4: e1a00007 mov r0, r7 b2d8: e8bd80f0 pop {r4, r5, r6, r7, pc} b2dc: 00018538 .word 0x00018538 b2e0: 000196fd .word 0x000196fd b2e4: 00019034 .word 0x00019034 b2e8: 000194cd .word 0x000194cd 00002d08 : rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d08: e3500000 cmp r0, #0 void IMFS_dump_directory( IMFS_jnode_t *the_directory, int level ) { 2d0c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2d10: e1a05001 mov r5, r1 rtems_chain_node *the_node; rtems_chain_control *the_chain; IMFS_jnode_t *the_jnode; int i; assert( the_directory ); 2d14: 059f00a4 ldreq r0, [pc, #164] ; 2dc0 2d18: 03a01084 moveq r1, #132 ; 0x84 2d1c: 059f20a0 ldreq r2, [pc, #160] ; 2dc4 2d20: 059f30a0 ldreq r3, [pc, #160] ; 2dc8 2d24: 0a000005 beq 2d40 assert( level >= 0 ); 2d28: e3510000 cmp r1, #0 2d2c: aa000004 bge 2d44 2d30: e59f0088 ldr r0, [pc, #136] ; 2dc0 <== NOT EXECUTED 2d34: e59f2088 ldr r2, [pc, #136] ; 2dc4 <== NOT EXECUTED 2d38: e59f308c ldr r3, [pc, #140] ; 2dcc <== NOT EXECUTED 2d3c: e3a01086 mov r1, #134 ; 0x86 <== NOT EXECUTED 2d40: eb0001d7 bl 34a4 <__assert_func> <== NOT EXECUTED assert( the_directory->type == IMFS_DIRECTORY ); 2d44: e590304c ldr r3, [r0, #76] ; 0x4c 2d48: e3530001 cmp r3, #1 2d4c: 159f006c ldrne r0, [pc, #108] ; 2dc0 2d50: 13a01088 movne r1, #136 ; 0x88 2d54: 159f2068 ldrne r2, [pc, #104] ; 2dc4 2d58: 159f3070 ldrne r3, [pc, #112] ; 2dd0 2d5c: 1afffff7 bne 2d40 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2d60: e280a054 add sl, r0, #84 ; 0x54 the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d64: 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, "...." ); 2d68: e59f8064 ldr r8, [pc, #100] ; 2dd4 IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); 2d6c: e2817001 add r7, r1, #1 assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2d70: ea00000f b 2db4 !rtems_chain_is_tail( the_chain, the_node ); the_node = the_node->next ) { the_jnode = (IMFS_jnode_t *) the_node; 2d74: e3a06000 mov r6, #0 for ( i=0 ; i<=level ; i++ ) fprintf(stdout, "...." ); 2d78: 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++ ) 2d7c: e2866001 add r6, r6, #1 fprintf(stdout, "...." ); 2d80: e5931008 ldr r1, [r3, #8] 2d84: e59f004c ldr r0, [pc, #76] ; 2dd8 2d88: eb003999 bl 113f4 !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++ ) 2d8c: e1560005 cmp r6, r5 2d90: dafffff8 ble 2d78 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); 2d94: e1a00004 mov r0, r4 2d98: ebffff7e bl 2b98 if ( the_jnode->type == IMFS_DIRECTORY ) 2d9c: e594304c ldr r3, [r4, #76] ; 0x4c 2da0: e3530001 cmp r3, #1 IMFS_dump_directory( the_jnode, level + 1 ); 2da4: 01a00004 moveq r0, r4 2da8: 01a01007 moveq r1, r7 2dac: 0bffffd5 bleq 2d08 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 ) { 2db0: e5944000 ldr r4, [r4] assert( the_directory->type == IMFS_DIRECTORY ); the_chain = &the_directory->info.directory.Entries; for ( the_node = the_chain->first; 2db4: e154000a cmp r4, sl 2db8: 1affffed bne 2d74 fprintf(stdout, "...." ); IMFS_print_jnode( the_jnode ); if ( the_jnode->type == IMFS_DIRECTORY ) IMFS_dump_directory( the_jnode, level + 1 ); } } 2dbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2dc0: 000228f2 .word 0x000228f2 2dc4: 000214d0 .word 0x000214d0 2dc8: 000229a8 .word 0x000229a8 2dcc: 000229b6 .word 0x000229b6 2dd0: 000229c1 .word 0x000229c1 2dd4: 00020f64 .word 0x00020f64 2dd8: 000229e7 .word 0x000229e7 00007a6c : const char *pathname, /* IN */ int pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 7a6c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7a70: e24dd040 sub sp, sp, #64 ; 0x40 7a74: e1a04003 mov r4, r3 7a78: e1a0a000 mov sl, r0 7a7c: e1a06001 mov r6, r1 7a80: e58d2000 str r2, [sp] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7a84: e5935000 ldr r5, [r3] 7a88: e3a09001 mov r9, #1 7a8c: 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 ); 7a90: 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) ) { 7a94: ea000054 b 7bec type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 7a98: e28d303c add r3, sp, #60 ; 0x3c 7a9c: e08a0007 add r0, sl, r7 7aa0: e1a01006 mov r1, r6 7aa4: e1a02008 mov r2, r8 7aa8: eb0001e7 bl 824c pathnamelen -= len; i += len; if ( !pathloc->node_access ) 7aac: e5943000 ldr r3, [r4] 7ab0: 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 ); 7ab4: e1a09000 mov r9, r0 pathnamelen -= len; 7ab8: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 7abc: 0a000042 beq 7bcc rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7ac0: e3500000 cmp r0, #0 7ac4: 0a000006 beq 7ae4 if ( node->type == IMFS_DIRECTORY ) 7ac8: e595104c ldr r1, [r5, #76] ; 0x4c 7acc: e3510001 cmp r1, #1 7ad0: 1a000003 bne 7ae4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 7ad4: e1a00004 mov r0, r4 7ad8: ebffff7f bl 78dc 7adc: e3500000 cmp r0, #0 7ae0: 0a000068 beq 7c88 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 7ae4: 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; 7ae8: 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; 7aec: 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; 7af0: e5945000 ldr r5, [r4] switch( type ) { 7af4: 0a000013 beq 7b48 7af8: e3590004 cmp r9, #4 7afc: 0a000037 beq 7be0 7b00: e3590002 cmp r9, #2 7b04: 1a000038 bne 7bec case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7b08: e59f2194 ldr r2, [pc, #404] ; 7ca4 7b0c: e5923000 ldr r3, [r2] 7b10: e5933018 ldr r3, [r3, #24] 7b14: e1550003 cmp r5, r3 7b18: 0a000033 beq 7bec /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 7b1c: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 7b20: e59e301c ldr r3, [lr, #28] 7b24: 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; 7b28: 028ee008 addeq lr, lr, #8 7b2c: 0a000038 beq 7c14 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 7b30: e5955008 ldr r5, [r5, #8] 7b34: e3550000 cmp r5, #0 7b38: 1a000026 bne 7bd8 rtems_set_errno_and_return_minus_one( ENOENT ); 7b3c: eb001385 bl c958 <__errno> 7b40: e5809000 str r9, [r0] 7b44: ea000052 b 7c94 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 7b48: e595304c ldr r3, [r5, #76] ; 0x4c 7b4c: e3530003 cmp r3, #3 7b50: 1a000006 bne 7b70 IMFS_evaluate_hard_link( pathloc, 0 ); 7b54: e1a00004 mov r0, r4 7b58: e3a01000 mov r1, #0 7b5c: ebffff71 bl 7928 node = pathloc->node_access; 7b60: e5945000 ldr r5, [r4] if ( !node ) 7b64: e3550000 cmp r5, #0 7b68: 1a000009 bne 7b94 7b6c: ea00000b b 7ba0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 7b70: e3530004 cmp r3, #4 7b74: 1a000006 bne 7b94 result = IMFS_evaluate_sym_link( pathloc, 0 ); 7b78: e1a00004 mov r0, r4 7b7c: e3a01000 mov r1, #0 7b80: ebffff7f bl 7984 node = pathloc->node_access; if ( result == -1 ) 7b84: 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 ); 7b88: e1a0b000 mov fp, r0 node = pathloc->node_access; 7b8c: e5945000 ldr r5, [r4] if ( result == -1 ) 7b90: 0a000040 beq 7c98 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7b94: e595304c ldr r3, [r5, #76] ; 0x4c 7b98: e3530001 cmp r3, #1 7b9c: 0a000002 beq 7bac rtems_set_errno_and_return_minus_one( ENOTDIR ); 7ba0: eb00136c bl c958 <__errno> 7ba4: e3a03014 mov r3, #20 7ba8: ea000038 b 7c90 /* * 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 ) { 7bac: e595e05c ldr lr, [r5, #92] ; 0x5c 7bb0: e35e0000 cmp lr, #0 7bb4: 1a000015 bne 7c10 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7bb8: e1a00005 mov r0, r5 7bbc: e1a01008 mov r1, r8 7bc0: eb000179 bl 81ac if ( !node ) 7bc4: e2505000 subs r5, r0, #0 7bc8: 1a000002 bne 7bd8 rtems_set_errno_and_return_minus_one( ENOENT ); 7bcc: eb001361 bl c958 <__errno> 7bd0: e3a03002 mov r3, #2 7bd4: ea00002d b 7c90 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 7bd8: e5845000 str r5, [r4] 7bdc: ea000002 b 7bec case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7be0: eb00135c bl c958 <__errno> 7be4: e3a0305b mov r3, #91 ; 0x5b 7be8: ea000028 b 7c90 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 7bec: e3590004 cmp r9, #4 7bf0: 13590000 cmpne r9, #0 7bf4: 1affffa7 bne 7a98 * 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 ) { 7bf8: e595304c ldr r3, [r5, #76] ; 0x4c 7bfc: e3530001 cmp r3, #1 7c00: 1a000018 bne 7c68 if ( node->info.directory.mt_fs != NULL ) { 7c04: e595e05c ldr lr, [r5, #92] ; 0x5c 7c08: e35e0000 cmp lr, #0 7c0c: 0a000015 beq 7c68 newloc = node->info.directory.mt_fs->mt_fs_root; 7c10: e28ee01c add lr, lr, #28 7c14: e8be000f ldm lr!, {r0, r1, r2, r3} 7c18: e28dc028 add ip, sp, #40 ; 0x28 7c1c: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7c20: e28d5028 add r5, sp, #40 ; 0x28 7c24: e8b5000f ldm r5!, {r0, r1, r2, r3} 7c28: 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; 7c2c: e59ee000 ldr lr, [lr] *pathloc = newloc; 7c30: e8a5000f stmia r5!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7c34: 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; 7c38: 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; 7c3c: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalpath_h)( &pathname[i-len], 7c40: e0610007 rsb r0, r1, r7 7c44: e08a0000 add r0, sl, r0 7c48: e0861001 add r1, r6, r1 7c4c: e59d2000 ldr r2, [sp] 7c50: e1a03004 mov r3, r4 7c54: e594c00c ldr ip, [r4, #12] 7c58: e1a0e00f mov lr, pc 7c5c: e59cf000 ldr pc, [ip] 7c60: e1a0b000 mov fp, r0 7c64: ea00000b b 7c98 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7c68: e1a00004 mov r0, r4 7c6c: ebfffefc bl 7864 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 7c70: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 7c74: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 7c78: e1a00004 mov r0, r4 7c7c: ebffff16 bl 78dc 7c80: e3500000 cmp r0, #0 7c84: 1a000003 bne 7c98 rtems_set_errno_and_return_minus_one( EACCES ); 7c88: eb001332 bl c958 <__errno> 7c8c: e3a0300d mov r3, #13 7c90: e5803000 str r3, [r0] 7c94: e3e0b000 mvn fp, #0 return result; } 7c98: e1a0000b mov r0, fp 7c9c: e28dd040 add sp, sp, #64 ; 0x40 7ca0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 7ca4: 00018538 .word 0x00018538 00007d5c : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 7d5c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 7d60: e24dd040 sub sp, sp, #64 ; 0x40 7d64: e1a04001 mov r4, r1 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 7d68: 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 */ ) { 7d6c: e58d2000 str r2, [sp] 7d70: e1a07000 mov r7, r0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7d74: eb0016e8 bl d91c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 7d78: e59fa224 ldr sl, [pc, #548] ; 7fa4 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 7d7c: e3a05000 mov r5, #0 7d80: 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 ); 7d84: e1a01008 mov r1, r8 7d88: e28d303c add r3, sp, #60 ; 0x3c 7d8c: e0870005 add r0, r7, r5 7d90: e28d2004 add r2, sp, #4 7d94: eb00012c bl 824c pathlen -= len; i += len; if ( !pathloc->node_access ) 7d98: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 7d9c: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 7da0: 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 ); 7da4: e1a09000 mov r9, r0 pathlen -= len; 7da8: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 7dac: 0a000060 beq 7f34 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 7db0: e3500000 cmp r0, #0 7db4: 0a000006 beq 7dd4 if ( node->type == IMFS_DIRECTORY ) 7db8: e596104c ldr r1, [r6, #76] ; 0x4c 7dbc: e3510001 cmp r1, #1 7dc0: 1a000003 bne 7dd4 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 7dc4: e1a00004 mov r0, r4 7dc8: ebfffec3 bl 78dc 7dcc: e3500000 cmp r0, #0 7dd0: 0a00006c beq 7f88 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 7dd4: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 7dd8: 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; 7ddc: e1a06003 mov r6, r3 switch( type ) { 7de0: e3590004 cmp r9, #4 7de4: 979ff109 ldrls pc, [pc, r9, lsl #2] 7de8: eaffffe5 b 7d84 <== NOT EXECUTED 7dec: 00007ef0 .word 0x00007ef0 <== NOT EXECUTED 7df0: 00007d84 .word 0x00007d84 <== NOT EXECUTED 7df4: 00007e00 .word 0x00007e00 <== NOT EXECUTED 7df8: 00007e34 .word 0x00007e34 <== NOT EXECUTED 7dfc: 00007efc .word 0x00007efc <== 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 ) 7e00: e59a2000 ldr r2, [sl] 7e04: e5922018 ldr r2, [r2, #24] 7e08: e1530002 cmp r3, r2 7e0c: 0affffdc beq 7d84 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 7e10: e594e010 ldr lr, [r4, #16] 7e14: e59e201c ldr r2, [lr, #28] 7e18: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 7e1c: 028ee008 addeq lr, lr, #8 7e20: 0a000018 beq 7e88 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 7e24: e5936008 ldr r6, [r3, #8] 7e28: e3560000 cmp r6, #0 7e2c: 1a00002d bne 7ee8 7e30: ea00003f b 7f34 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 7e34: e593304c ldr r3, [r3, #76] ; 0x4c 7e38: e3530003 cmp r3, #3 7e3c: 0a000001 beq 7e48 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 7e40: e3530004 cmp r3, #4 7e44: 1a000005 bne 7e60 result = IMFS_evaluate_link( pathloc, 0 ); 7e48: e1a00004 mov r0, r4 7e4c: e3a01000 mov r1, #0 7e50: ebffff94 bl 7ca8 if ( result == -1 ) 7e54: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 7e58: e1a06000 mov r6, r0 if ( result == -1 ) 7e5c: 0a00004d beq 7f98 return -1; } node = pathloc->node_access; 7e60: e5940000 ldr r0, [r4] if ( !node ) 7e64: e3500000 cmp r0, #0 7e68: 0a00003e beq 7f68 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 7e6c: e590304c ldr r3, [r0, #76] ; 0x4c 7e70: e3530001 cmp r3, #1 7e74: 1a00003b bne 7f68 /* * 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 ) { 7e78: e590e05c ldr lr, [r0, #92] ; 0x5c 7e7c: e35e0000 cmp lr, #0 7e80: 0a000014 beq 7ed8 newloc = node->info.directory.mt_fs->mt_fs_root; 7e84: e28ee01c add lr, lr, #28 7e88: e8be000f ldm lr!, {r0, r1, r2, r3} 7e8c: e28dc028 add ip, sp, #40 ; 0x28 7e90: e8ac000f stmia ip!, {r0, r1, r2, r3} *pathloc = newloc; 7e94: e28d6028 add r6, sp, #40 ; 0x28 7e98: e8b6000f ldm r6!, {r0, r1, r2, r3} 7e9c: 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; 7ea0: e59ee000 ldr lr, [lr] *pathloc = newloc; 7ea4: e8a6000f stmia r6!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7ea8: 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; 7eac: 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; 7eb0: e58ce000 str lr, [ip] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 7eb4: e0635005 rsb r5, r3, r5 7eb8: e0870005 add r0, r7, r5 7ebc: e1a01004 mov r1, r4 7ec0: e59d2000 ldr r2, [sp] 7ec4: e594300c ldr r3, [r4, #12] 7ec8: e1a0e00f mov lr, pc 7ecc: e593f004 ldr pc, [r3, #4] 7ed0: e1a06000 mov r6, r0 7ed4: ea00002f b 7f98 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 7ed8: e28d1004 add r1, sp, #4 7edc: eb0000b2 bl 81ac /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 7ee0: e2506000 subs r6, r0, #0 7ee4: 0a000007 beq 7f08 done = true; else pathloc->node_access = node; 7ee8: e5846000 str r6, [r4] 7eec: eaffffa4 b 7d84 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 7ef0: eb001298 bl c958 <__errno> 7ef4: e3a03011 mov r3, #17 7ef8: ea000024 b 7f90 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 7efc: eb001295 bl c958 <__errno> 7f00: e3a0305b mov r3, #91 ; 0x5b 7f04: ea000021 b 7f90 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 7f08: e59d303c ldr r3, [sp, #60] ; 0x3c 7f0c: e59d2000 ldr r2, [sp] 7f10: e0633005 rsb r3, r3, r5 7f14: e0873003 add r3, r7, r3 7f18: e5823000 str r3, [r2] 7f1c: 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++) { 7f20: ea000006 b 7f40 if ( !IMFS_is_separator( path[ i ] ) ) 7f24: e353005c cmp r3, #92 ; 0x5c 7f28: 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++) { 7f2c: e2855001 add r5, r5, #1 if ( !IMFS_is_separator( path[ i ] ) ) 7f30: 0a000002 beq 7f40 rtems_set_errno_and_return_minus_one( ENOENT ); 7f34: eb001287 bl c958 <__errno> 7f38: e3a03002 mov r3, #2 7f3c: ea000013 b 7f90 /* * 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++) { 7f40: e5d53000 ldrb r3, [r5] 7f44: e3530000 cmp r3, #0 7f48: 1afffff5 bne 7f24 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7f4c: e1a00004 mov r0, r4 7f50: ebfffe43 bl 7864 /* * The returned node must be a directory */ node = pathloc->node_access; 7f54: e5943000 ldr r3, [r4] 7f58: e593304c ldr r3, [r3, #76] ; 0x4c 7f5c: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 7f60: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; 7f64: 0a000002 beq 7f74 if ( node->type != IMFS_DIRECTORY ) rtems_set_errno_and_return_minus_one( ENOTDIR ); 7f68: eb00127a bl c958 <__errno> 7f6c: e3a03014 mov r3, #20 7f70: ea000006 b 7f90 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 7f74: e1a00004 mov r0, r4 7f78: e3a01003 mov r1, #3 7f7c: ebfffe56 bl 78dc 7f80: e3500000 cmp r0, #0 7f84: 1a000003 bne 7f98 rtems_set_errno_and_return_minus_one( EACCES ); 7f88: eb001272 bl c958 <__errno> 7f8c: e3a0300d mov r3, #13 7f90: e5803000 str r3, [r0] 7f94: e3e06000 mvn r6, #0 return result; } 7f98: e1a00006 mov r0, r6 7f9c: e28dd040 add sp, sp, #64 ; 0x40 7fa0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 7fa4: 00018538 .word 0x00018538 00007928 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 7928: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 792c: e593204c ldr r2, [r3, #76] ; 0x4c 7930: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7934: e92d4030 push {r4, r5, lr} 7938: e1a04000 mov r4, r0 793c: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 7940: 159f0038 ldrne r0, [pc, #56] ; 7980 7944: 1bfff3d6 blne 48a4 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 7948: e5933050 ldr r3, [r3, #80] ; 0x50 794c: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 7950: ebffffc3 bl 7864 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 7954: e1a00004 mov r0, r4 7958: e1a01005 mov r1, r5 795c: ebffffde bl 78dc 7960: e3500000 cmp r0, #0 7964: 13a00000 movne r0, #0 7968: 18bd8030 popne {r4, r5, pc} rtems_set_errno_and_return_minus_one( EACCES ); 796c: eb0013f9 bl c958 <__errno> <== NOT EXECUTED 7970: e3a0300d mov r3, #13 <== NOT EXECUTED 7974: e5803000 str r3, [r0] <== NOT EXECUTED 7978: e3e00000 mvn r0, #0 <== NOT EXECUTED return result; } 797c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 7980: abcd0000 .word 0xabcd0000 00007984 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7984: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 7988: e590e000 ldr lr, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 798c: e59e304c ldr r3, [lr, #76] ; 0x4c 7990: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 7994: e1a04000 mov r4, r0 7998: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 799c: 159f00bc ldrne r0, [pc, #188] ; 7a60 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 79a0: 1a000003 bne 79b4 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 79a4: e59e3008 ldr r3, [lr, #8] 79a8: e3530000 cmp r3, #0 79ac: 1a000001 bne 79b8 rtems_fatal_error_occurred( 0xBAD00000 ); 79b0: e59f00ac ldr r0, [pc, #172] ; 7a64 <== NOT EXECUTED 79b4: ebfff3ba bl 48a4 <== 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; 79b8: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 79bc: e59e3050 ldr r3, [lr, #80] ; 0x50 79c0: e5d33000 ldrb r3, [r3] 79c4: e353002f cmp r3, #47 ; 0x2f 79c8: 1353005c cmpne r3, #92 ; 0x5c 79cc: 13a06000 movne r6, #0 79d0: 03a06001 moveq r6, #1 79d4: 0a000001 beq 79e0 79d8: e3530000 cmp r3, #0 79dc: 1a000008 bne 7a04 79e0: e59f3080 ldr r3, [pc, #128] ; 7a68 79e4: e593c000 ldr ip, [r3] 79e8: e28cc018 add ip, ip, #24 79ec: e8bc000f ldm ip!, {r0, r1, r2, r3} 79f0: e1a06004 mov r6, r4 79f4: e8a6000f stmia r6!, {r0, r1, r2, r3} 79f8: e59c2000 ldr r2, [ip] 79fc: e5862000 str r2, [r6] 7a00: 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] ), 7a04: e59e3050 ldr r3, [lr, #80] ; 0x50 7a08: e0836006 add r6, r3, r6 7a0c: e1a00006 mov r0, r6 7a10: eb0017c1 bl d91c /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7a14: e1a02005 mov r2, r5 &jnode->info.sym_link.name[i], strlen( &jnode->info.sym_link.name[i] ), 7a18: e1a01000 mov r1, r0 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 7a1c: e1a03004 mov r3, r4 7a20: e1a00006 mov r0, r6 7a24: eb000010 bl 7a6c 7a28: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 7a2c: e1a00004 mov r0, r4 7a30: ebffff8b bl 7864 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 7a34: e1a00004 mov r0, r4 7a38: e1a01005 mov r1, r5 7a3c: ebffffa6 bl 78dc 7a40: e3500000 cmp r0, #0 7a44: 1a000003 bne 7a58 rtems_set_errno_and_return_minus_one( EACCES ); 7a48: eb0013c2 bl c958 <__errno> <== NOT EXECUTED 7a4c: e3a0300d mov r3, #13 <== NOT EXECUTED 7a50: e5803000 str r3, [r0] <== NOT EXECUTED 7a54: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 7a58: e1a00006 mov r0, r6 7a5c: e8bd8070 pop {r4, r5, r6, pc} 7a60: abcd0000 .word 0xabcd0000 7a64: bad00000 .word 0xbad00000 7a68: 00018538 .word 0x00018538 0000b2ec : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { b2ec: 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; b2f0: e5904000 ldr r4, [r0] int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { b2f4: e1a06001 mov r6, r1 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); b2f8: ebfff57d bl 88f4 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) b2fc: e1d453bc ldrh r5, [r4, #60] ; 0x3c b300: e3500000 cmp r0, #0 b304: 11550000 cmpne r5, r0 b308: 03a05000 moveq r5, #0 b30c: 13a05001 movne r5, #1 b310: 0a000004 beq b328 rtems_set_errno_and_return_minus_one( EPERM ); b314: eb00058f bl c958 <__errno> <== NOT EXECUTED b318: e3a03001 mov r3, #1 <== NOT EXECUTED b31c: e5803000 str r3, [r0] <== NOT EXECUTED b320: e3e00000 mvn r0, #0 <== NOT EXECUTED b324: ea00000c b b35c <== 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); b328: e5943030 ldr r3, [r4, #48] ; 0x30 b32c: e1a06a06 lsl r6, r6, #20 b330: e3c33eff bic r3, r3, #4080 ; 0xff0 b334: e3c3300f bic r3, r3, #15 b338: e1a06a26 lsr r6, r6, #20 b33c: e1866003 orr r6, r6, r3 b340: e5846030 str r6, [r4, #48] ; 0x30 IMFS_update_ctime( jnode ); b344: e1a0000d mov r0, sp b348: e1a01005 mov r1, r5 b34c: ebfff56d bl 8908 b350: e59d3000 ldr r3, [sp] b354: e5843048 str r3, [r4, #72] ; 0x48 b358: e1a00005 mov r0, r5 return 0; } b35c: e8bd807c pop {r2, r3, r4, r5, r6, pc} 00008108 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 8108: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 810c: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED int err = pipe_release(&JNODE2PIPE(jnode), iop); 8110: e1a01000 mov r1, r0 <== NOT EXECUTED } int IMFS_fifo_close( rtems_libio_t *iop ) { 8114: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_release(&JNODE2PIPE(jnode), iop); 8118: e2840050 add r0, r4, #80 ; 0x50 <== NOT EXECUTED 811c: eb000ad4 bl ac74 <== NOT EXECUTED if (! err) { 8120: e2506000 subs r6, r0, #0 <== NOT EXECUTED 8124: 1a00000c bne 815c <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_OPEN; 8128: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 812c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 8130: 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) 8134: e1a00004 mov r0, r4 <== NOT EXECUTED 8138: eb00021c bl 89b0 <== NOT EXECUTED 813c: e3500000 cmp r0, #0 <== NOT EXECUTED 8140: 1a00000a bne 8170 <== NOT EXECUTED 8144: e1d433b4 ldrh r3, [r4, #52] ; 0x34 <== NOT EXECUTED 8148: e3530000 cmp r3, #0 <== NOT EXECUTED 814c: 1a000007 bne 8170 <== NOT EXECUTED free(jnode); 8150: e1a00004 mov r0, r4 <== NOT EXECUTED 8154: eb00017e bl 8754 <== NOT EXECUTED 8158: ea000004 b 8170 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 815c: aa000003 bge 8170 <== NOT EXECUTED 8160: eb0011fc bl c958 <__errno> <== NOT EXECUTED 8164: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 8168: e5806000 str r6, [r0] <== NOT EXECUTED 816c: e3e06000 mvn r6, #0 <== NOT EXECUTED } 8170: e1a00006 mov r0, r6 <== NOT EXECUTED 8174: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00007ff0 : void *buffer ) { int err; if (command == FIONBIO) { 7ff0: e59f3068 ldr r3, [pc, #104] ; 8060 <== NOT EXECUTED 7ff4: e1510003 cmp r1, r3 <== NOT EXECUTED int IMFS_fifo_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { 7ff8: e92d4010 push {r4, lr} <== NOT EXECUTED 7ffc: e1a03000 mov r3, r0 <== NOT EXECUTED int err; if (command == FIONBIO) { 8000: 1a00000b bne 8034 <== NOT EXECUTED if (buffer == NULL) 8004: e3520000 cmp r2, #0 <== NOT EXECUTED 8008: 03e0400d mvneq r4, #13 <== NOT EXECUTED 800c: 0a00000d beq 8048 <== NOT EXECUTED err = -EFAULT; else { if (*(int *)buffer) 8010: e5924000 ldr r4, [r2] <== NOT EXECUTED 8014: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 8018: e3540000 cmp r4, #0 <== NOT EXECUTED iop->flags |= LIBIO_FLAGS_NO_DELAY; 801c: 13822001 orrne r2, r2, #1 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 8020: 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; 8024: 15832014 strne r2, [r3, #20] <== NOT EXECUTED 8028: 13a04000 movne r4, #0 <== NOT EXECUTED else iop->flags &= ~LIBIO_FLAGS_NO_DELAY; 802c: 05832014 streq r2, [r3, #20] <== NOT EXECUTED 8030: ea000008 b 8058 <== NOT EXECUTED return 0; } } else err = pipe_ioctl(LIBIO2PIPE(iop), command, buffer, iop); 8034: e5930038 ldr r0, [r3, #56] ; 0x38 <== NOT EXECUTED 8038: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 803c: eb000a22 bl a8cc <== NOT EXECUTED IMFS_FIFO_RETURN(err); 8040: e2504000 subs r4, r0, #0 <== NOT EXECUTED 8044: aa000003 bge 8058 <== NOT EXECUTED 8048: eb001242 bl c958 <__errno> <== NOT EXECUTED 804c: e2644000 rsb r4, r4, #0 <== NOT EXECUTED 8050: e5804000 str r4, [r0] <== NOT EXECUTED 8054: e3e04000 mvn r4, #0 <== NOT EXECUTED } 8058: e1a00004 mov r0, r4 <== NOT EXECUTED 805c: e8bd8010 pop {r4, pc} <== NOT EXECUTED 8060: 8004667e .word 0x8004667e 00007fa8 : rtems_off64_t IMFS_fifo_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 7fa8: e92d4031 push {r0, r4, r5, lr} <== NOT EXECUTED off_t err = pipe_lseek(LIBIO2PIPE(iop), offset, whence, iop); 7fac: e58d0000 str r0, [sp] <== NOT EXECUTED 7fb0: e5900038 ldr r0, [r0, #56] ; 0x38 <== NOT EXECUTED 7fb4: e5900050 ldr r0, [r0, #80] ; 0x50 <== NOT EXECUTED 7fb8: eb000a29 bl a864 <== NOT EXECUTED 7fbc: e1a03000 mov r3, r0 <== NOT EXECUTED 7fc0: e1a04fc3 asr r4, r3, #31 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7fc4: 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); 7fc8: e1a05000 mov r5, r0 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 7fcc: aa000004 bge 7fe4 <== NOT EXECUTED 7fd0: eb001260 bl c958 <__errno> <== NOT EXECUTED 7fd4: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 7fd8: e5805000 str r5, [r0] <== NOT EXECUTED 7fdc: e3e03000 mvn r3, #0 <== NOT EXECUTED 7fe0: e3e04000 mvn r4, #0 <== NOT EXECUTED } 7fe4: e1a01004 mov r1, r4 <== NOT EXECUTED 7fe8: e1a00003 mov r0, r3 <== NOT EXECUTED 7fec: e8bd8038 pop {r3, r4, r5, pc} <== NOT EXECUTED 000080b8 : ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 80b8: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 80bc: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_read( rtems_libio_t *iop, void *buffer, size_t count ) { 80c0: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_read(JNODE2PIPE(jnode), buffer, count, iop); 80c4: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 80c8: eb000a17 bl a92c <== NOT EXECUTED if (err > 0) 80cc: e2505000 subs r5, r0, #0 <== NOT EXECUTED 80d0: da000005 ble 80ec <== NOT EXECUTED IMFS_update_atime(jnode); 80d4: e1a0000d mov r0, sp <== NOT EXECUTED 80d8: e3a01000 mov r1, #0 <== NOT EXECUTED 80dc: eb000209 bl 8908 <== NOT EXECUTED 80e0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 80e4: e5843040 str r3, [r4, #64] ; 0x40 <== NOT EXECUTED 80e8: ea000004 b 8100 <== NOT EXECUTED IMFS_FIFO_RETURN(err); 80ec: 0a000003 beq 8100 <== NOT EXECUTED 80f0: eb001218 bl c958 <__errno> <== NOT EXECUTED 80f4: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 80f8: e5805000 str r5, [r0] <== NOT EXECUTED 80fc: e3e05000 mvn r5, #0 <== NOT EXECUTED } 8100: e1a00005 mov r0, r5 <== NOT EXECUTED 8104: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 00008064 : ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 8064: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; 8068: e5904038 ldr r4, [r0, #56] ; 0x38 <== NOT EXECUTED ssize_t IMFS_fifo_write( rtems_libio_t *iop, const void *buffer, size_t count ) { 806c: e1a03000 mov r3, r0 <== NOT EXECUTED IMFS_jnode_t *jnode = iop->file_info; int err = pipe_write(JNODE2PIPE(jnode), buffer, count, iop); 8070: e5940050 ldr r0, [r4, #80] ; 0x50 <== NOT EXECUTED 8074: eb000a88 bl aa9c <== NOT EXECUTED if (err > 0) { 8078: e2505000 subs r5, r0, #0 <== NOT EXECUTED 807c: da000006 ble 809c <== NOT EXECUTED IMFS_mtime_ctime_update(jnode); 8080: e1a0000d mov r0, sp <== NOT EXECUTED 8084: e3a01000 mov r1, #0 <== NOT EXECUTED 8088: eb00021e bl 8908 <== NOT EXECUTED 808c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 8090: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED 8094: e5843044 str r3, [r4, #68] ; 0x44 <== NOT EXECUTED 8098: ea000004 b 80b0 <== NOT EXECUTED } IMFS_FIFO_RETURN(err); 809c: 0a000003 beq 80b0 <== NOT EXECUTED 80a0: eb00122c bl c958 <__errno> <== NOT EXECUTED 80a4: e2655000 rsb r5, r5, #0 <== NOT EXECUTED 80a8: e5805000 str r5, [r0] <== NOT EXECUTED 80ac: e3e05000 mvn r5, #0 <== NOT EXECUTED } 80b0: e1a00005 mov r0, r5 <== NOT EXECUTED 80b4: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 0000cfb4 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { cfb4: 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; cfb8: e1a0c000 mov ip, r0 cfbc: 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 ) { cfc0: e1a05000 mov r5, r0 cfc4: 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; cfc8: e8bc000f ldm ip!, {r0, r1, r2, r3} cfcc: e1a0e00d mov lr, sp cfd0: e8ae000f stmia lr!, {r0, r1, r2, r3} cfd4: e59c3000 ldr r3, [ip] cfd8: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; cfdc: e3a03000 mov r3, #0 cfe0: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); cfe4: e1a0500d mov r5, sp cfe8: e1a0000d mov r0, sp temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; loc.node_access = (void *)jnode; cfec: e58d4000 str r4, [sp] */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; cff0: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); cff4: ebfffd9a bl c664 if ( jnode->type != IMFS_DIRECTORY ) { cff8: e594204c ldr r2, [r4, #76] ; 0x4c cffc: e3520001 cmp r2, #1 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; d000: e2843054 add r3, r4, #84 ; 0x54 d004: 1a000002 bne d014 d008: e5942050 ldr r2, [r4, #80] ; 0x50 d00c: e1520003 cmp r2, r3 d010: 1a000005 bne d02c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); d014: e3a00000 mov r0, #0 d018: e1a0100d mov r1, sp d01c: ebffd415 bl 2078 if (result != 0) d020: e3500000 cmp r0, #0 d024: 1a00000c bne d05c d028: e1a04006 mov r4, r6 return -1; jnode = next; } if ( jnode != NULL ) { d02c: e3540000 cmp r4, #0 d030: 0a00000b beq d064 if ( jnode->type == IMFS_DIRECTORY ) { d034: e594304c ldr r3, [r4, #76] ; 0x4c d038: e3530001 cmp r3, #1 d03c: 1affffe9 bne cfe8 d040: e5943050 ldr r3, [r4, #80] ; 0x50 d044: e2842054 add r2, r4, #84 ; 0x54 d048: e1530002 cmp r3, r2 d04c: 0affffe5 beq cfe8 if ( jnode_has_children( jnode ) ) jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); d050: e2534000 subs r4, r3, #0 d054: 1affffe3 bne cfe8 d058: ea000001 b d064 <== NOT EXECUTED d05c: e3e00000 mvn r0, #0 <== NOT EXECUTED d060: ea000000 b d068 <== NOT EXECUTED d064: e3a00000 mov r0, #0 return 0; } d068: e28dd014 add sp, sp, #20 d06c: e8bd8070 pop {r4, r5, r6, pc} 00008314 : IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 8314: e59fc0c8 ldr ip, [pc, #200] ; 83e4 8318: 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 ) { 831c: e92d40f0 push {r4, r5, r6, r7, lr} 8320: e1a06002 mov r6, r2 8324: e1a05003 mov r5, r3 8328: e1a04000 mov r4, r0 832c: 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, 8330: e3a02000 mov r2, #0 8334: 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) { 8338: e153000c cmp r3, ip 833c: e2822001 add r2, r2, #1 8340: 0a000003 beq 8354 8344: e3520006 cmp r2, #6 8348: e1a03083 lsl r3, r3, #1 834c: 1afffff9 bne 8338 8350: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 8354: e59f208c ldr r2, [pc, #140] ; 83e8 8358: e5823000 str r3, [r2] /* * 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(); 835c: eb000b83 bl b170 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; 8360: e59fe084 ldr lr, [pc, #132] ; 83ec /* * 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(); 8364: 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; 8368: e8be000f ldm lr!, {r0, r1, r2, r3} 836c: e284c038 add ip, r4, #56 ; 0x38 8370: e8ac000f stmia ip!, {r0, r1, r2, r3} 8374: e8be000f ldm lr!, {r0, r1, r2, r3} 8378: e8ac000f stmia ip!, {r0, r1, r2, r3} 837c: 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; 8380: e5847028 str r7, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 8384: 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; 8388: e5845024 str r5, [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 ) ); 838c: e3a00001 mov r0, #1 8390: e3a0100c mov r1, #12 8394: eb0000b2 bl 8664 if ( !fs_info ) { 8398: e3500000 cmp r0, #0 839c: 1a000006 bne 83bc free(temp_mt_entry->mt_fs_root.node_access); 83a0: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 83a4: eb0000ea bl 8754 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 83a8: eb00116a bl c958 <__errno> <== NOT EXECUTED 83ac: e3a0300c mov r3, #12 <== NOT EXECUTED 83b0: e5803000 str r3, [r0] <== NOT EXECUTED 83b4: e3e00000 mvn r0, #0 <== NOT EXECUTED 83b8: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 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; 83bc: e594201c ldr r2, [r4, #28] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; 83c0: e3a03001 mov r3, #1 83c4: e5803000 str r3, [r0] fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 83c8: e5805008 str r5, [r0, #8] /* * Set st_ino for the root to 1. */ fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; 83cc: e5806004 str r6, [r0, #4] 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; 83d0: 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; 83d4: e5823038 str r3, [r2, #56] ; 0x38 /* Initialize POSIX FIFO/pipe module */ rtems_pipe_initialize(); 83d8: eb000923 bl a86c 83dc: e3a00000 mov r0, #0 return 0; } 83e0: e8bd80f0 pop {r4, r5, r6, r7, pc} 83e4: 000183a4 .word 0x000183a4 83e8: 00019afc .word 0x00019afc 83ec: 00019004 .word 0x00019004 00001d80 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1d80: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d84: 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 */ ) { 1d88: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1d8c: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1d90: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1d94: 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 */ ) { 1d98: e1a05001 mov r5, r1 1d9c: 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 ) 1da0: 9a000002 bls 1db0 rtems_set_errno_and_return_minus_one( EMLINK ); 1da4: eb003ed8 bl 1190c <__errno> 1da8: e3a0301f mov r3, #31 1dac: ea000012 b 1dfc /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 1db0: e1a00002 mov r0, r2 1db4: eb0042ad bl 12870 1db8: e28d4004 add r4, sp, #4 1dbc: e1a01000 mov r1, r0 1dc0: e1a02004 mov r2, r4 1dc4: e28d3044 add r3, sp, #68 ; 0x44 1dc8: e1a00006 mov r0, r6 1dcc: eb002ccf bl d110 * 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( 1dd0: e28dc028 add ip, sp, #40 ; 0x28 1dd4: e1a00005 mov r0, r5 1dd8: e1a02004 mov r2, r4 1ddc: e3a01003 mov r1, #3 1de0: e59f3054 ldr r3, [pc, #84] ; 1e3c 1de4: e58dc000 str ip, [sp] 1de8: eb0029ce bl c528 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 1dec: e3500000 cmp r0, #0 1df0: 1a000004 bne 1e08 rtems_set_errno_and_return_minus_one( ENOMEM ); 1df4: eb003ec4 bl 1190c <__errno> <== NOT EXECUTED 1df8: e3a0300c mov r3, #12 <== NOT EXECUTED 1dfc: e5803000 str r3, [r0] 1e00: e3e00000 mvn r0, #0 1e04: ea00000a b 1e34 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 1e08: e59d3028 ldr r3, [sp, #40] ; 0x28 1e0c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1e10: e2822001 add r2, r2, #1 1e14: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 1e18: e28d003c add r0, sp, #60 ; 0x3c 1e1c: e3a01000 mov r1, #0 1e20: eb000240 bl 2728 1e24: e59d203c ldr r2, [sp, #60] ; 0x3c 1e28: e59d3028 ldr r3, [sp, #40] ; 0x28 1e2c: e5832048 str r2, [r3, #72] ; 0x48 1e30: e3a00000 mov r0, #0 return 0; } 1e34: e28dd048 add sp, sp, #72 ; 0x48 1e38: e8bd8070 pop {r4, r5, r6, pc} 1e3c: 0000a1ff .word 0x0000a1ff 0000fc54 : ) { block_p memory; block_p *block_entry_ptr; assert( the_jnode ); fc54: e2503000 subs r3, r0, #0 MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { fc58: e92d4030 push {r4, r5, lr} block_p memory; block_p *block_entry_ptr; assert( the_jnode ); fc5c: 059f0060 ldreq r0, [pc, #96] ; fcc4 fc60: 059f1060 ldreq r1, [pc, #96] ; fcc8 fc64: 059f2060 ldreq r2, [pc, #96] ; fccc fc68: 059f3060 ldreq r3, [pc, #96] ; fcd0 fc6c: 0a000006 beq fc8c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); fc70: e593304c ldr r3, [r3, #76] ; 0x4c fc74: e3530005 cmp r3, #5 fc78: 0a000004 beq fc90 fc7c: e59f0040 ldr r0, [pc, #64] ; fcc4 <== NOT EXECUTED fc80: e59f104c ldr r1, [pc, #76] ; fcd4 <== NOT EXECUTED fc84: e59f2040 ldr r2, [pc, #64] ; fccc <== NOT EXECUTED fc88: e59f3048 ldr r3, [pc, #72] ; fcd8 <== NOT EXECUTED fc8c: ebfff5ac bl d344 <__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 ); fc90: e3a02001 mov r2, #1 fc94: ebfffeab bl f748 if ( *block_entry_ptr ) fc98: e5904000 ldr r4, [r0] fc9c: 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 ); fca0: e1a05000 mov r5, r0 if ( *block_entry_ptr ) fca4: 13a00000 movne r0, #0 fca8: 18bd8030 popne {r4, r5, pc} #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); fcac: ebfffe98 bl f714 if ( !memory ) fcb0: e3500000 cmp r0, #0 return 1; *block_entry_ptr = memory; fcb4: 15850000 strne r0, [r5] fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) fcb8: 03a00001 moveq r0, #1 return 1; *block_entry_ptr = memory; fcbc: 11a00004 movne r0, r4 return 0; } fcc0: e8bd8030 pop {r4, r5, pc} fcc4: 0001edeb .word 0x0001edeb fcc8: 00000169 .word 0x00000169 fccc: 0001e5b4 .word 0x0001e5b4 fcd0: 0001ee31 .word 0x0001ee31 fcd4: 0000016d .word 0x0000016d fcd8: 0001ee3b .word 0x0001ee3b 0000fcdc : MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { fcdc: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); fce0: e2504000 subs r4, r0, #0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { fce4: e1a05001 mov r5, r1 fce8: e1a06002 mov r6, r2 /* * Perform internal consistency checks */ assert( the_jnode ); fcec: 059f0134 ldreq r0, [pc, #308] ; fe28 fcf0: 059f1134 ldreq r1, [pc, #308] ; fe2c fcf4: 059f2134 ldreq r2, [pc, #308] ; fe30 fcf8: 059f3134 ldreq r3, [pc, #308] ; fe34 fcfc: 0a000006 beq fd1c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); fd00: e594304c ldr r3, [r4, #76] ; 0x4c fd04: e3530005 cmp r3, #5 fd08: 0a000004 beq fd20 fd0c: e59f0114 ldr r0, [pc, #276] ; fe28 <== NOT EXECUTED fd10: e59f1120 ldr r1, [pc, #288] ; fe38 <== NOT EXECUTED fd14: e59f2114 ldr r2, [pc, #276] ; fe30 <== NOT EXECUTED fd18: e59f311c ldr r3, [pc, #284] ; fe3c <== NOT EXECUTED fd1c: ebfff588 bl d344 <__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 ) fd20: e59f3118 ldr r3, [pc, #280] ; fe40 fd24: e593b000 ldr fp, [r3] fd28: e1a0312b lsr r3, fp, #2 fd2c: e2832001 add r2, r3, #1 fd30: e0010293 mul r1, r3, r2 fd34: e2811001 add r1, r1, #1 fd38: e0020193 mul r2, r3, r1 fd3c: e3a03000 mov r3, #0 fd40: e1530006 cmp r3, r6 fd44: e2422001 sub r2, r2, #1 fd48: e003029b mul r3, fp, r2 fd4c: ca000005 bgt fd68 fd50: 1a000001 bne fd5c fd54: e1530005 cmp r3, r5 fd58: 8a000002 bhi fd68 rtems_set_errno_and_return_minus_one( EINVAL ); fd5c: eb0006ea bl 1190c <__errno> <== NOT EXECUTED fd60: e3a03016 mov r3, #22 <== NOT EXECUTED fd64: ea000025 b fe00 <== NOT EXECUTED if ( new_length <= the_jnode->info.file.size ) fd68: e5948054 ldr r8, [r4, #84] ; 0x54 fd6c: e1560008 cmp r6, r8 fd70: e5947050 ldr r7, [r4, #80] ; 0x50 fd74: ca000002 bgt fd84 fd78: 1a000028 bne fe20 fd7c: e1550007 cmp r5, r7 fd80: 9a000026 bls fe20 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; fd84: e1a0cfcb asr ip, fp, #31 fd88: e1a0300c mov r3, ip fd8c: e1a0200b mov r2, fp fd90: e1a00005 mov r0, r5 fd94: e1a01006 mov r1, r6 fd98: e58dc000 str ip, [sp] fd9c: eb002f3d bl 1ba98 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; fda0: e59dc000 ldr ip, [sp] fda4: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; fda8: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; fdac: e1a0200b mov r2, fp fdb0: e1a00007 mov r0, r7 fdb4: e1a0300c mov r3, ip fdb8: eb002f36 bl 1ba98 <__divdi3> fdbc: e1a08000 mov r8, r0 fdc0: e1a07000 mov r7, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { fdc4: ea000011 b fe10 if ( IMFS_memfile_addblock( the_jnode, block ) ) { fdc8: e1a00004 mov r0, r4 fdcc: e1a01007 mov r1, r7 fdd0: ebffff9f bl fc54 fdd4: e3500000 cmp r0, #0 fdd8: 0a00000b beq fe0c fddc: ea000003 b fdf0 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); fde0: e1a01007 mov r1, r7 <== NOT EXECUTED fde4: e1a00004 mov r0, r4 <== NOT EXECUTED fde8: ebfffefa bl f9d8 <== 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-- ) { fdec: e2477001 sub r7, r7, #1 <== NOT EXECUTED fdf0: e1570008 cmp r7, r8 <== NOT EXECUTED fdf4: 2afffff9 bcs fde0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); fdf8: eb0006c3 bl 1190c <__errno> <== NOT EXECUTED fdfc: e3a0301c mov r3, #28 <== NOT EXECUTED fe00: e5803000 str r3, [r0] <== NOT EXECUTED fe04: e3e00000 mvn r0, #0 <== NOT EXECUTED fe08: ea000005 b fe24 <== NOT EXECUTED /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { fe0c: e2877001 add r7, r7, #1 fe10: e157000a cmp r7, sl fe14: 9affffeb bls fdc8 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; fe18: e5846054 str r6, [r4, #84] ; 0x54 fe1c: e5845050 str r5, [r4, #80] ; 0x50 fe20: e3a00000 mov r0, #0 return 0; } fe24: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} fe28: 0001edeb .word 0x0001edeb fe2c: 00000131 .word 0x00000131 fe30: 0001e5cc .word 0x0001e5cc fe34: 0001ee31 .word 0x0001ee31 fe38: 00000135 .word 0x00000135 fe3c: 0001ee3b .word 0x0001ee3b fe40: 0001f1c4 .word 0x0001f1c4 0000f748 : #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { f748: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); f74c: e2504000 subs r4, r0, #0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { f750: e1a06001 mov r6, r1 f754: e1a08002 mov r8, r2 /* * Perform internal consistency checks */ assert( the_jnode ); f758: 059f01e8 ldreq r0, [pc, #488] ; f948 f75c: 03a01fe2 moveq r1, #904 ; 0x388 f760: 059f21e4 ldreq r2, [pc, #484] ; f94c f764: 059f31e4 ldreq r3, [pc, #484] ; f950 f768: 0a000006 beq f788 if ( !the_jnode ) return NULL; assert( the_jnode->type == IMFS_MEMORY_FILE ); f76c: e594304c ldr r3, [r4, #76] ; 0x4c f770: e3530005 cmp r3, #5 f774: 0a000004 beq f78c f778: e59f01c8 ldr r0, [pc, #456] ; f948 <== NOT EXECUTED f77c: e59f21c8 ldr r2, [pc, #456] ; f94c <== NOT EXECUTED f780: e59f31cc ldr r3, [pc, #460] ; f954 <== NOT EXECUTED f784: e3a01fe3 mov r1, #908 ; 0x38c <== NOT EXECUTED f788: ebfff6ed bl d344 <__assert_func> <== NOT EXECUTED /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { f78c: e59f31c4 ldr r3, [pc, #452] ; f958 f790: e5935000 ldr r5, [r3] f794: e1a05125 lsr r5, r5, #2 f798: e2453001 sub r3, r5, #1 f79c: e1510003 cmp r1, r3 f7a0: 8a00000e bhi f7e0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; if ( malloc_it ) { f7a4: e3520000 cmp r2, #0 if ( my_block <= LAST_INDIRECT ) { #if 0 fprintf(stdout, "(s %d) ", block ); fflush(stdout); #endif p = info->indirect; f7a8: e5940058 ldr r0, [r4, #88] ; 0x58 if ( malloc_it ) { f7ac: 0a000007 beq f7d0 if ( !p ) { f7b0: e3500000 cmp r0, #0 f7b4: 1a000003 bne f7c8 p = memfile_alloc_block(); f7b8: ebffffd5 bl f714 if ( !p ) f7bc: e3500000 cmp r0, #0 f7c0: 0a00005e beq f940 return 0; info->indirect = p; f7c4: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; f7c8: e5940058 ldr r0, [r4, #88] ; 0x58 f7cc: ea000001 b f7d8 } if ( !p ) f7d0: e3500000 cmp r0, #0 f7d4: 0a000059 beq f940 return 0; return &info->indirect[ my_block ]; f7d8: e0800106 add r0, r0, r6, lsl #2 f7dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { f7e0: e2852001 add r2, r5, #1 <== NOT EXECUTED f7e4: e0030295 mul r3, r5, r2 <== NOT EXECUTED f7e8: e2432001 sub r2, r3, #1 <== NOT EXECUTED f7ec: e1510002 cmp r1, r2 <== NOT EXECUTED f7f0: 8a00001b bhi f864 <== NOT EXECUTED #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; f7f4: e0656001 rsb r6, r5, r1 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f7f8: e1a00006 mov r0, r6 <== NOT EXECUTED f7fc: e1a01005 mov r1, r5 <== NOT EXECUTED f800: eb002df2 bl 1afd0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f804: e1a01005 mov r1, r5 <== NOT EXECUTED fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f808: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f80c: e1a00006 mov r0, r6 <== NOT EXECUTED f810: eb002d5a bl 1ad80 <__aeabi_uidiv> <== NOT EXECUTED p = info->doubly_indirect; if ( malloc_it ) { f814: 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; f818: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->doubly_indirect; f81c: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( malloc_it ) { f820: 0a000009 beq f84c <== NOT EXECUTED if ( !p ) { f824: e3530000 cmp r3, #0 <== NOT EXECUTED f828: 1a000003 bne f83c <== NOT EXECUTED p = memfile_alloc_block(); f82c: ebffffb8 bl f714 <== NOT EXECUTED if ( !p ) f830: e2503000 subs r3, r0, #0 <== NOT EXECUTED f834: 0a000041 beq f940 <== NOT EXECUTED return 0; info->doubly_indirect = p; f838: e584305c str r3, [r4, #92] ; 0x5c <== NOT EXECUTED } p1 = (block_p *)p[ doubly ]; f83c: e7930105 ldr r0, [r3, r5, lsl #2] <== NOT EXECUTED f840: e0835105 add r5, r3, r5, lsl #2 <== NOT EXECUTED if ( !p1 ) { f844: e3500000 cmp r0, #0 <== NOT EXECUTED f848: ea00002e b f908 <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) f84c: e3530000 cmp r3, #0 <== NOT EXECUTED f850: 0a00003a beq f940 <== NOT EXECUTED return 0; p = (block_p *)p[ doubly ]; f854: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED if ( !p ) f858: e3500000 cmp r0, #0 <== NOT EXECUTED f85c: 1a000035 bne f938 <== NOT EXECUTED f860: ea000036 b f940 <== NOT EXECUTED #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { f864: e2831001 add r1, r3, #1 <== NOT EXECUTED f868: e0020195 mul r2, r5, r1 <== NOT EXECUTED f86c: e2422001 sub r2, r2, #1 <== NOT EXECUTED f870: e1560002 cmp r6, r2 <== NOT EXECUTED f874: 8a000031 bhi f940 <== NOT EXECUTED my_block -= FIRST_TRIPLY_INDIRECT; f878: e0636006 rsb r6, r3, r6 <== NOT EXECUTED singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f87c: e1a01005 mov r1, r5 <== NOT EXECUTED f880: e1a00006 mov r0, r6 <== NOT EXECUTED f884: eb002dd1 bl 1afd0 <__umodsi3> <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f888: e1a01005 mov r1, r5 <== NOT EXECUTED */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; f88c: e1a0a000 mov sl, r0 <== NOT EXECUTED doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; f890: e1a00006 mov r0, r6 <== NOT EXECUTED f894: eb002d39 bl 1ad80 <__aeabi_uidiv> <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; f898: 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; f89c: e1a06000 mov r6, r0 <== NOT EXECUTED triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; f8a0: eb002d36 bl 1ad80 <__aeabi_uidiv> <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; f8a4: 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; f8a8: e1a07000 mov r7, r0 <== NOT EXECUTED doubly %= IMFS_MEMFILE_BLOCK_SLOTS; f8ac: e1a00006 mov r0, r6 <== NOT EXECUTED f8b0: eb002dc6 bl 1afd0 <__umodsi3> <== NOT EXECUTED p = info->triply_indirect; if ( malloc_it ) { f8b4: 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; f8b8: e1a05000 mov r5, r0 <== NOT EXECUTED p = info->triply_indirect; f8bc: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED if ( malloc_it ) { f8c0: 0a000016 beq f920 <== NOT EXECUTED if ( !p ) { f8c4: e3530000 cmp r3, #0 <== NOT EXECUTED f8c8: 1a000003 bne f8dc <== NOT EXECUTED p = memfile_alloc_block(); f8cc: ebffff90 bl f714 <== NOT EXECUTED if ( !p ) f8d0: e2503000 subs r3, r0, #0 <== NOT EXECUTED f8d4: 0a000019 beq f940 <== NOT EXECUTED return 0; info->triply_indirect = p; f8d8: e5843060 str r3, [r4, #96] ; 0x60 <== NOT EXECUTED } p1 = (block_p *) p[ triply ]; f8dc: e7932107 ldr r2, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) { f8e0: e3520000 cmp r2, #0 <== NOT EXECUTED if ( !p ) return 0; info->triply_indirect = p; } p1 = (block_p *) p[ triply ]; f8e4: e0837107 add r7, r3, r7, lsl #2 <== NOT EXECUTED if ( !p1 ) { f8e8: 1a000003 bne f8fc <== NOT EXECUTED p1 = memfile_alloc_block(); f8ec: ebffff88 bl f714 <== NOT EXECUTED if ( !p1 ) f8f0: e2502000 subs r2, r0, #0 <== NOT EXECUTED f8f4: 0a000011 beq f940 <== NOT EXECUTED return 0; p[ triply ] = (block_p) p1; f8f8: e5872000 str r2, [r7] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; f8fc: e7920105 ldr r0, [r2, r5, lsl #2] <== NOT EXECUTED f900: e0825105 add r5, r2, r5, lsl #2 <== NOT EXECUTED if ( !p2 ) { f904: e3500000 cmp r0, #0 <== NOT EXECUTED f908: 1a00000a bne f938 <== NOT EXECUTED p2 = memfile_alloc_block(); f90c: ebffff80 bl f714 <== NOT EXECUTED if ( !p2 ) f910: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; p1[ doubly ] = (block_p) p2; f914: 15850000 strne r0, [r5] <== NOT EXECUTED } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) f918: 1a000006 bne f938 <== NOT EXECUTED f91c: ea000007 b f940 <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) f920: e3530000 cmp r3, #0 <== NOT EXECUTED f924: 0a000005 beq f940 <== 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 ]; f928: e7933107 ldr r3, [r3, r7, lsl #2] <== NOT EXECUTED if ( !p1 ) f92c: e3530000 cmp r3, #0 <== NOT EXECUTED f930: 0a000002 beq f940 <== NOT EXECUTED p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; f934: e7930100 ldr r0, [r3, r0, lsl #2] <== NOT EXECUTED f938: e080010a add r0, r0, sl, lsl #2 <== NOT EXECUTED f93c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED f940: e3a00000 mov r0, #0 <== NOT EXECUTED /* * This means the requested block number is out of range. */ return 0; } f944: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED f948: 0001edeb .word 0x0001edeb f94c: 0001e544 .word 0x0001e544 f950: 0001ee31 .word 0x0001ee31 f954: 0001ee3b .word 0x0001ee3b f958: 0001f1c4 .word 0x0001f1c4 00010264 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 10264: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); 10268: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 1026c: e1a06003 mov r6, r3 10270: e1a08001 mov r8, r1 10274: e1a09002 mov r9, r2 10278: e59d7030 ldr r7, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); 1027c: 059f024c ldreq r0, [pc, #588] ; 104d0 10280: 03a01f93 moveq r1, #588 ; 0x24c 10284: 059f2248 ldreq r2, [pc, #584] ; 104d4 10288: 059f3248 ldreq r3, [pc, #584] ; 104d8 1028c: 0a000007 beq 102b0 if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE || 10290: e594304c ldr r3, [r4, #76] ; 0x4c 10294: e2432005 sub r2, r3, #5 10298: e3520001 cmp r2, #1 1029c: 9a000004 bls 102b4 102a0: e59f0228 ldr r0, [pc, #552] ; 104d0 <== NOT EXECUTED 102a4: e59f1230 ldr r1, [pc, #560] ; 104dc <== NOT EXECUTED 102a8: e59f2224 ldr r2, [pc, #548] ; 104d4 <== NOT EXECUTED 102ac: e59f322c ldr r3, [pc, #556] ; 104e0 <== NOT EXECUTED 102b0: ebfff423 bl d344 <__assert_func> <== NOT EXECUTED /* * Error checks on arguments */ assert( dest ); 102b4: e3560000 cmp r6, #0 102b8: 059f0210 ldreq r0, [pc, #528] ; 104d0 102bc: 059f1220 ldreq r1, [pc, #544] ; 104e4 102c0: 059f220c ldreq r2, [pc, #524] ; 104d4 102c4: 059f321c ldreq r3, [pc, #540] ; 104e8 102c8: 0afffff8 beq 102b0 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 102cc: e3570000 cmp r7, #0 102d0: 1a000004 bne 102e8 rtems_set_errno_and_return_minus_one( EINVAL ); 102d4: eb00058c bl 1190c <__errno> <== NOT EXECUTED 102d8: e3a03016 mov r3, #22 <== NOT EXECUTED 102dc: e5803000 str r3, [r0] <== NOT EXECUTED 102e0: e3e07000 mvn r7, #0 <== NOT EXECUTED 102e4: ea000077 b 104c8 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 102e8: e3530006 cmp r3, #6 102ec: 1a000012 bne 1033c unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 102f0: e284b050 add fp, r4, #80 ; 0x50 <== NOT EXECUTED 102f4: e89b0c00 ldm fp, {sl, fp} <== NOT EXECUTED 102f8: e1a0200a mov r2, sl <== NOT EXECUTED 102fc: e1a0300b mov r3, fp <== NOT EXECUTED 10300: e3a01000 mov r1, #0 <== NOT EXECUTED 10304: e0522008 subs r2, r2, r8 <== NOT EXECUTED 10308: e0c33009 sbc r3, r3, r9 <== NOT EXECUTED 1030c: 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; 10310: e5941058 ldr r1, [r4, #88] ; 0x58 <== NOT EXECUTED if (my_length > (the_jnode->info.linearfile.size - start)) 10314: ca000002 bgt 10324 <== NOT EXECUTED 10318: 1a000002 bne 10328 <== NOT EXECUTED 1031c: e1570002 cmp r7, r2 <== NOT EXECUTED 10320: 9a000000 bls 10328 <== NOT EXECUTED my_length = the_jnode->info.linearfile.size - start; 10324: e068700a rsb r7, r8, sl <== NOT EXECUTED memcpy(dest, &file_ptr[start], my_length); 10328: e0811008 add r1, r1, r8 <== NOT EXECUTED 1032c: e1a00006 mov r0, r6 <== NOT EXECUTED 10330: e1a02007 mov r2, r7 <== NOT EXECUTED 10334: eb000782 bl 12144 <== NOT EXECUTED 10338: ea00005d b 104b4 <== 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 ) 1033c: e5943054 ldr r3, [r4, #84] ; 0x54 10340: e3a02000 mov r2, #0 10344: e1520003 cmp r2, r3 10348: 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; 1034c: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 10350: e0872001 add r2, r7, r1 10354: ca000004 bgt 1036c 10358: 1a000001 bne 10364 1035c: e1520005 cmp r2, r5 10360: 8a000001 bhi 1036c 10364: e1a05007 mov r5, r7 <== NOT EXECUTED 10368: ea000000 b 10370 <== NOT EXECUTED my_length = the_jnode->info.file.size - start; 1036c: e0635005 rsb r5, r3, r5 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10370: e59f3174 ldr r3, [pc, #372] ; 104ec 10374: e593a000 ldr sl, [r3] 10378: e1a0b00a mov fp, sl 1037c: e1a0cfcb asr ip, fp, #31 10380: e1a0300c mov r3, ip 10384: e1a00008 mov r0, r8 10388: e1a0200b mov r2, fp 1038c: e1a01009 mov r1, r9 10390: e58dc000 str ip, [sp] 10394: eb002ee9 bl 1bf40 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10398: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 1039c: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 103a0: e1a01009 mov r1, r9 103a4: e1a00008 mov r0, r8 103a8: e1a0200b mov r2, fp 103ac: e1a0300c mov r3, ip 103b0: eb002db8 bl 1ba98 <__divdi3> if ( start_offset ) { 103b4: 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; 103b8: e1a08000 mov r8, r0 if ( start_offset ) { 103bc: 0a000013 beq 10410 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 ); 103c0: e1a00004 mov r0, r4 103c4: e1a01008 mov r1, r8 103c8: e3a02000 mov r2, #0 103cc: ebfffcdd bl f748 assert( block_ptr ); 103d0: e3500000 cmp r0, #0 103d4: 059f00f4 ldreq r0, [pc, #244] ; 104d0 103d8: 059f1110 ldreq r1, [pc, #272] ; 104f0 103dc: 0a00002c beq 10494 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 103e0: 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; 103e4: e067a00a rsb sl, r7, sl 103e8: e155000a cmp r5, sl 103ec: 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 ); 103f0: e0811007 add r1, r1, r7 103f4: e1a00006 mov r0, r6 103f8: e1a0200a mov r2, sl 103fc: eb000750 bl 12144 dest += to_copy; 10400: e086600a add r6, r6, sl block++; 10404: e2888001 add r8, r8, #1 my_length -= to_copy; 10408: e06a5005 rsb r5, sl, r5 1040c: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10410: e59f30d4 ldr r3, [pc, #212] ; 104ec while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10414: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10418: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 1041c: ea00000f b 10460 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10420: e1a00004 mov r0, r4 10424: e1a01008 mov r1, r8 10428: e3a02000 mov r2, #0 1042c: ebfffcc5 bl f748 assert( block_ptr ); 10430: e3500000 cmp r0, #0 10434: 059f0094 ldreq r0, [pc, #148] ; 104d0 10438: 059f10b4 ldreq r1, [pc, #180] ; 104f4 1043c: 0a000014 beq 10494 if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 10440: e5901000 ldr r1, [r0] 10444: e1a0200a mov r2, sl 10448: e1a00006 mov r0, r6 1044c: eb00073c bl 12144 dest += to_copy; 10450: e086600a add r6, r6, sl block++; 10454: e2888001 add r8, r8, #1 my_length -= to_copy; 10458: e06a5005 rsb r5, sl, r5 copied += to_copy; 1045c: 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 ) { 10460: e5993000 ldr r3, [r9] 10464: e1550003 cmp r5, r3 10468: 2affffec bcs 10420 * Phase 3: possibly the first part of one block */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); if ( my_length ) { 1046c: e3550000 cmp r5, #0 10470: 0a00000f beq 104b4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 10474: e1a01008 mov r1, r8 10478: e1a00004 mov r0, r4 1047c: e3a02000 mov r2, #0 10480: ebfffcb0 bl f748 assert( block_ptr ); 10484: e2503000 subs r3, r0, #0 10488: 1a000004 bne 104a0 1048c: e59f003c ldr r0, [pc, #60] ; 104d0 <== NOT EXECUTED 10490: e59f1060 ldr r1, [pc, #96] ; 104f8 <== NOT EXECUTED 10494: e59f2038 ldr r2, [pc, #56] ; 104d4 <== NOT EXECUTED 10498: e59f305c ldr r3, [pc, #92] ; 104fc <== NOT EXECUTED 1049c: eaffff83 b 102b0 <== NOT EXECUTED if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 104a0: e1a00006 mov r0, r6 104a4: e5931000 ldr r1, [r3] 104a8: e1a02005 mov r2, r5 104ac: eb000724 bl 12144 copied += my_length; 104b0: e0857007 add r7, r5, r7 } IMFS_update_atime( the_jnode ); 104b4: e28d0004 add r0, sp, #4 104b8: e3a01000 mov r1, #0 104bc: ebffc899 bl 2728 104c0: e59d3004 ldr r3, [sp, #4] 104c4: e5843040 str r3, [r4, #64] ; 0x40 return copied; } 104c8: e1a00007 mov r0, r7 104cc: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 104d0: 0001edeb .word 0x0001edeb 104d4: 0001e5f4 .word 0x0001e5f4 104d8: 0001ee31 .word 0x0001ee31 104dc: 00000251 .word 0x00000251 104e0: 0001eea5 .word 0x0001eea5 104e4: 0000025a .word 0x0000025a 104e8: 0001eef0 .word 0x0001eef0 104ec: 0001f1c4 .word 0x0001f1c4 104f0: 00000296 .word 0x00000296 104f4: 000002a7 .word 0x000002a7 104f8: 000002b9 .word 0x000002b9 104fc: 0001ee6b .word 0x0001ee6b 0000fa24 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { fa24: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Perform internal consistency checks */ assert( the_jnode ); fa28: e2504000 subs r4, r0, #0 fa2c: 059f012c ldreq r0, [pc, #300] ; fb60 fa30: 059f112c ldreq r1, [pc, #300] ; fb64 fa34: 059f212c ldreq r2, [pc, #300] ; fb68 fa38: 059f312c ldreq r3, [pc, #300] ; fb6c fa3c: 0a000006 beq fa5c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); fa40: e594304c ldr r3, [r4, #76] ; 0x4c fa44: e3530005 cmp r3, #5 fa48: 0a000004 beq fa60 fa4c: e59f010c ldr r0, [pc, #268] ; fb60 <== NOT EXECUTED fa50: e59f1118 ldr r1, [pc, #280] ; fb70 <== NOT EXECUTED fa54: e59f210c ldr r2, [pc, #268] ; fb68 <== NOT EXECUTED fa58: e59f3114 ldr r3, [pc, #276] ; fb74 <== NOT EXECUTED fa5c: ebfff638 bl d344 <__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; fa60: e59f2110 ldr r2, [pc, #272] ; fb78 * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fa64: 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; fa68: e5925000 ldr r5, [r2] * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fa6c: 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; fa70: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); fa74: 12840058 addne r0, r4, #88 ; 0x58 fa78: 11a01005 movne r1, r5 fa7c: 1bffffb6 blne f95c * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fa80: e594305c ldr r3, [r4, #92] ; 0x5c fa84: e3530000 cmp r3, #0 fa88: 13a06000 movne r6, #0 memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fa90: 1a000008 bne fab8 fa94: ea00000d b fad0 } if ( info->doubly_indirect ) { for ( i=0 ; idoubly_indirect[i] ) { fa98: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED fa9c: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED faa0: e3520000 cmp r2, #0 <== NOT EXECUTED faa4: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( faa8: 10830000 addne r0, r3, r0 <== NOT EXECUTED faac: 11a01005 movne r1, r5 <== NOT EXECUTED fab0: 1bffffa9 blne f95c <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== 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 ); fac4: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED fac8: e1a01005 mov r1, r5 <== NOT EXECUTED facc: ebffffa2 bl f95c <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fad0: e5943060 ldr r3, [r4, #96] ; 0x60 fad4: e3530000 cmp r3, #0 fad8: 13a06000 movne r6, #0 memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; fae0: 1a000016 bne fb40 fae4: ea00001b b fb58 } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; fae8: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED faec: e7937106 ldr r7, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ faf0: e3570000 cmp r7, #0 <== NOT EXECUTED * + indirect * + doubly indirect * + triply indirect */ info = &the_jnode->info.file; faf4: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED } if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ faf8: 0a000013 beq fb4c <== NOT EXECUTED fafc: e3a08000 mov r8, #0 <== NOT EXECUTED fb00: ea000006 b fb20 <== NOT EXECUTED break; for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( fb2c: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED fb30: e1a01005 mov r1, r5 <== NOT EXECUTED fb34: e0800009 add r0, r0, r9 <== NOT EXECUTED fb38: ebffff87 bl f95c <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( fb4c: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED fb50: e1a01005 mov r1, r5 <== NOT EXECUTED fb54: ebffff80 bl f95c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } fb58: e3a00000 mov r0, #0 fb5c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} fb60: 0001edeb .word 0x0001edeb fb64: 000001ee .word 0x000001ee fb68: 0001e5a0 .word 0x0001e5a0 fb6c: 0001ee31 .word 0x0001ee31 fb70: 000001f2 .word 0x000001f2 fb74: 0001ee3b .word 0x0001ee3b fb78: 0001f1c4 .word 0x0001f1c4 0000f9d8 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { f9d8: 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 ); f9dc: e3a02000 mov r2, #0 <== NOT EXECUTED f9e0: ebffff58 bl f748 <== NOT EXECUTED assert( block_ptr ); f9e4: e2503000 subs r3, r0, #0 <== NOT EXECUTED f9e8: 059f0024 ldreq r0, [pc, #36] ; fa14 <== NOT EXECUTED f9ec: 059f1024 ldreq r1, [pc, #36] ; fa18 <== NOT EXECUTED f9f0: 059f2024 ldreq r2, [pc, #36] ; fa1c <== NOT EXECUTED f9f4: 059f3024 ldreq r3, [pc, #36] ; fa20 <== NOT EXECUTED f9f8: 0bfff651 bleq d344 <__assert_func> <== NOT EXECUTED if ( block_ptr ) { ptr = *block_ptr; *block_ptr = 0; f9fc: 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; fa00: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; fa04: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); fa08: ebffff39 bl f6f4 <== NOT EXECUTED } return 1; } fa0c: e3a00001 mov r0, #1 <== NOT EXECUTED fa10: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED fa14: 0001edeb .word 0x0001edeb fa18: 00000196 .word 0x00000196 fa1c: 0001e584 .word 0x0001e584 fa20: 0001ee6b .word 0x0001ee6b 0000ff34 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ff34: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Perform internal consistency checks */ assert( the_jnode ); ff38: e2504000 subs r4, r0, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { ff3c: e1a08001 mov r8, r1 ff40: e1a0a002 mov sl, r2 ff44: e1a06003 mov r6, r3 ff48: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Perform internal consistency checks */ assert( the_jnode ); ff4c: 059f0204 ldreq r0, [pc, #516] ; 10158 ff50: 059f1204 ldreq r1, [pc, #516] ; 1015c ff54: 059f2204 ldreq r2, [pc, #516] ; 10160 ff58: 059f3204 ldreq r3, [pc, #516] ; 10164 ff5c: 0a000006 beq ff7c if ( !the_jnode ) rtems_set_errno_and_return_minus_one( EIO ); assert( the_jnode->type == IMFS_MEMORY_FILE ); ff60: e594304c ldr r3, [r4, #76] ; 0x4c ff64: e3530005 cmp r3, #5 ff68: 0a000004 beq ff80 ff6c: e59f01e4 ldr r0, [pc, #484] ; 10158 <== NOT EXECUTED ff70: e59f11f0 ldr r1, [pc, #496] ; 10168 <== NOT EXECUTED ff74: e59f21e4 ldr r2, [pc, #484] ; 10160 <== NOT EXECUTED ff78: e59f31ec ldr r3, [pc, #492] ; 1016c <== NOT EXECUTED ff7c: ebfff4f0 bl d344 <__assert_func> <== NOT EXECUTED /* * Error check arguments */ assert( source ); ff80: e3560000 cmp r6, #0 ff84: 059f01cc ldreq r0, [pc, #460] ; 10158 ff88: 059f11e0 ldreq r1, [pc, #480] ; 10170 ff8c: 059f21cc ldreq r2, [pc, #460] ; 10160 ff90: 059f31dc ldreq r3, [pc, #476] ; 10174 ff94: 0afffff8 beq ff7c /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) ff98: e3550000 cmp r5, #0 ff9c: 1a000002 bne ffac rtems_set_errno_and_return_minus_one( EINVAL ); ffa0: eb000659 bl 1190c <__errno> <== NOT EXECUTED ffa4: e3a03016 mov r3, #22 <== NOT EXECUTED ffa8: ea00000e b ffe8 <== 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 ) { ffac: e5943054 ldr r3, [r4, #84] ; 0x54 ffb0: e3530000 cmp r3, #0 ffb4: e0851001 add r1, r5, r1 ffb8: ba000003 blt ffcc ffbc: 1a00000c bne fff4 ffc0: e5943050 ldr r3, [r4, #80] ; 0x50 ffc4: e1530001 cmp r3, r1 ffc8: 2a000009 bcs fff4 status = IMFS_memfile_extend( the_jnode, last_byte ); ffcc: e1a00004 mov r0, r4 ffd0: e3a02000 mov r2, #0 ffd4: ebffff40 bl fcdc if ( status ) ffd8: e3500000 cmp r0, #0 ffdc: 0a000004 beq fff4 rtems_set_errno_and_return_minus_one( ENOSPC ); ffe0: eb000649 bl 1190c <__errno> <== NOT EXECUTED ffe4: e3a0301c mov r3, #28 <== NOT EXECUTED ffe8: e5803000 str r3, [r0] <== NOT EXECUTED ffec: e3e07000 mvn r7, #0 <== NOT EXECUTED fff0: ea000056 b 10150 <== NOT EXECUTED /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; fff4: e59f317c ldr r3, [pc, #380] ; 10178 fff8: e5939000 ldr r9, [r3] fffc: e1a0b009 mov fp, r9 10000: e1a0cfcb asr ip, fp, #31 10004: e1a0300c mov r3, ip 10008: e1a00008 mov r0, r8 1000c: e1a0200b mov r2, fp 10010: e1a0100a mov r1, sl 10014: e58dc000 str ip, [sp] 10018: eb002fc8 bl 1bf40 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 1001c: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 10020: e1a07000 mov r7, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 10024: e1a0100a mov r1, sl 10028: e1a00008 mov r0, r8 1002c: e1a0200b mov r2, fp 10030: e1a0300c mov r3, ip 10034: eb002e97 bl 1ba98 <__divdi3> if ( start_offset ) { 10038: 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; 1003c: e1a08000 mov r8, r0 if ( start_offset ) { 10040: 0a000013 beq 10094 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 ); 10044: e1a01008 mov r1, r8 10048: e1a00004 mov r0, r4 1004c: e3a02000 mov r2, #0 10050: ebfffdbc bl f748 assert( block_ptr ); 10054: e3500000 cmp r0, #0 10058: 059f00f8 ldreq r0, [pc, #248] ; 10158 1005c: 03a01fc7 moveq r1, #796 ; 0x31c 10060: 0a00002c beq 10118 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 ); 10064: 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; 10068: e067a009 rsb sl, r7, r9 1006c: e15a0005 cmp sl, r5 10070: 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 ); 10074: e0800007 add r0, r0, r7 10078: e1a01006 mov r1, r6 1007c: e1a0200a mov r2, sl 10080: eb00082f bl 12144 src += to_copy; 10084: e086600a add r6, r6, sl block++; 10088: e2888001 add r8, r8, #1 my_length -= to_copy; 1008c: e06a5005 rsb r5, sl, r5 copied += to_copy; 10090: e1a0700a mov r7, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 10094: e59f30dc ldr r3, [pc, #220] ; 10178 while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 10098: e1a09003 mov r9, r3 /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 1009c: e593a000 ldr sl, [r3] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 100a0: ea00000f b 100e4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 100a4: e1a00004 mov r0, r4 100a8: e1a01008 mov r1, r8 100ac: e3a02000 mov r2, #0 100b0: ebfffda4 bl f748 assert( block_ptr ); 100b4: e3500000 cmp r0, #0 100b8: 059f0098 ldreq r0, [pc, #152] ; 10158 100bc: 03a01e33 moveq r1, #816 ; 0x330 100c0: 0a000014 beq 10118 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 ); 100c4: e1a01006 mov r1, r6 100c8: e5900000 ldr r0, [r0] 100cc: e1a0200a mov r2, sl 100d0: eb00081b bl 12144 src += to_copy; 100d4: e086600a add r6, r6, sl block++; 100d8: e2888001 add r8, r8, #1 my_length -= to_copy; 100dc: 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( 100e0: 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 ) { 100e4: e5993000 ldr r3, [r9] 100e8: e1550003 cmp r5, r3 100ec: 2affffec bcs 100a4 */ assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); to_copy = my_length; if ( my_length ) { 100f0: e3550000 cmp r5, #0 100f4: 0a00000f beq 10138 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 100f8: e1a01008 mov r1, r8 100fc: e1a00004 mov r0, r4 10100: e3a02000 mov r2, #0 10104: ebfffd8f bl f748 assert( block_ptr ); 10108: e3500000 cmp r0, #0 1010c: 1a000004 bne 10124 10110: e59f0040 ldr r0, [pc, #64] ; 10158 <== NOT EXECUTED 10114: e59f1060 ldr r1, [pc, #96] ; 1017c <== NOT EXECUTED 10118: e59f2040 ldr r2, [pc, #64] ; 10160 <== NOT EXECUTED 1011c: e59f305c ldr r3, [pc, #92] ; 10180 <== NOT EXECUTED 10120: eaffff95 b ff7c <== 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 ); 10124: e5900000 ldr r0, [r0] 10128: e1a01006 mov r1, r6 1012c: e1a02005 mov r2, r5 10130: eb000803 bl 12144 my_length = 0; copied += to_copy; 10134: e0877005 add r7, r7, r5 } IMFS_mtime_ctime_update( the_jnode ); 10138: e28d0004 add r0, sp, #4 1013c: e3a01000 mov r1, #0 10140: ebffc978 bl 2728 10144: e59d3004 ldr r3, [sp, #4] 10148: e5843048 str r3, [r4, #72] ; 0x48 1014c: e5843044 str r3, [r4, #68] ; 0x44 return copied; } 10150: e1a00007 mov r0, r7 10154: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 10158: 0001edeb .word 0x0001edeb 1015c: 000002e3 .word 0x000002e3 10160: 0001e5e0 .word 0x0001e5e0 10164: 0001ee31 .word 0x0001ee31 10168: 000002e7 .word 0x000002e7 1016c: 0001ee3b .word 0x0001ee3b 10170: 000002ef .word 0x000002ef 10174: 0001ee75 .word 0x0001ee75 10178: 0001f1c4 .word 0x0001f1c4 1017c: 00000346 .word 0x00000346 10180: 0001ee6b .word 0x0001ee6b 000083f0 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 83f0: e92d40f0 push {r4, r5, r6, r7, lr} 83f4: e24dd040 sub sp, sp, #64 ; 0x40 83f8: e1a04001 mov r4, r1 83fc: e1a07000 mov r7, r0 8400: e1a06002 mov r6, r2 8404: 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 ); 8408: eb001543 bl d91c 840c: e28d303c add r3, sp, #60 ; 0x3c 8410: e1a01000 mov r1, r0 8414: e28d2004 add r2, sp, #4 8418: e1a00007 mov r0, r7 841c: ebffff8a bl 824c /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 8420: e2043a0f and r3, r4, #61440 ; 0xf000 8424: e3530901 cmp r3, #16384 ; 0x4000 8428: 0a00000e beq 8468 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 842c: e3530902 cmp r3, #32768 ; 0x8000 8430: 03a01005 moveq r1, #5 8434: 0a00000c beq 846c type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 8438: e3530a06 cmp r3, #24576 ; 0x6000 843c: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 8440: 058d6028 streq r6, [sp, #40] ; 0x28 8444: 058d502c streq r5, [sp, #44] ; 0x2c 8448: 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) ) { 844c: 0a000006 beq 846c type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 8450: e3530a01 cmp r3, #4096 ; 0x1000 8454: 03a01007 moveq r1, #7 8458: 0a000003 beq 846c type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 845c: eb00113d bl c958 <__errno> <== NOT EXECUTED 8460: e3a03016 mov r3, #22 <== NOT EXECUTED 8464: ea00000b b 8498 <== NOT EXECUTED 8468: 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( 846c: e28dc028 add ip, sp, #40 ; 0x28 8470: e59d0054 ldr r0, [sp, #84] ; 0x54 8474: e1a03004 mov r3, r4 8478: e28d2004 add r2, sp, #4 847c: e58dc000 str ip, [sp] 8480: eb000b4a bl b1b0 new_name, mode, &info ); if ( !new_node ) 8484: e3500000 cmp r0, #0 8488: 13a00000 movne r0, #0 848c: 1a000003 bne 84a0 rtems_set_errno_and_return_minus_one( ENOMEM ); 8490: eb001130 bl c958 <__errno> <== NOT EXECUTED 8494: e3a0300c mov r3, #12 <== NOT EXECUTED 8498: e5803000 str r3, [r0] <== NOT EXECUTED 849c: e3e00000 mvn r0, #0 <== NOT EXECUTED return 0; } 84a0: e28dd040 add sp, sp, #64 ; 0x40 84a4: e8bd80f0 pop {r4, r5, r6, r7, pc} 00001ef8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1ef8: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1efc: e593204c ldr r2, [r3, #76] ; 0x4c 1f00: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1f04: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1f08: 0a000004 beq 1f20 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1f0c: eb003e7e bl 1190c <__errno> <== NOT EXECUTED 1f10: e3a03014 mov r3, #20 <== NOT EXECUTED 1f14: e5803000 str r3, [r0] <== NOT EXECUTED 1f18: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f1c: 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; 1f20: e583005c str r0, [r3, #92] ; 0x5c 1f24: e3a00000 mov r0, #0 return 0; } 1f28: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00002b98 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 2b98: e92d4030 push {r4, r5, lr} assert( the_jnode ); 2b9c: e2504000 subs r4, r0, #0 2ba0: 059f0130 ldreq r0, [pc, #304] ; 2cd8 2ba4: 03a01038 moveq r1, #56 ; 0x38 2ba8: 059f212c ldreq r2, [pc, #300] ; 2cdc 2bac: 059f312c ldreq r3, [pc, #300] ; 2ce0 2bb0: 0a00002f beq 2c74 fprintf(stdout, "%s", the_jnode->name ); 2bb4: e59f5128 ldr r5, [pc, #296] ; 2ce4 2bb8: e5953000 ldr r3, [r5] 2bbc: e284000c add r0, r4, #12 2bc0: e5931008 ldr r1, [r3, #8] 2bc4: eb003a0a bl 113f4 switch( the_jnode->type ) { 2bc8: e594204c ldr r2, [r4, #76] ; 0x4c 2bcc: e2423001 sub r3, r2, #1 2bd0: e3530006 cmp r3, #6 2bd4: 979ff103 ldrls pc, [pc, r3, lsl #2] 2bd8: ea000034 b 2cb0 <== NOT EXECUTED 2bdc: 00002bf8 .word 0x00002bf8 <== NOT EXECUTED 2be0: 00002c0c .word 0x00002c0c <== NOT EXECUTED 2be4: 00002c54 .word 0x00002c54 <== NOT EXECUTED 2be8: 00002c78 .word 0x00002c78 <== NOT EXECUTED 2bec: 00002c3c .word 0x00002c3c <== NOT EXECUTED 2bf0: 00002c20 .word 0x00002c20 <== NOT EXECUTED 2bf4: 00002c94 .word 0x00002c94 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 2bf8: e5953000 ldr r3, [r5] 2bfc: e3a0002f mov r0, #47 ; 0x2f 2c00: e5931008 ldr r1, [r3, #8] 2c04: eb0039b5 bl 112e0 break; 2c08: ea00002f b 2ccc case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 2c0c: e5952000 ldr r2, [r5] 2c10: e5943054 ldr r3, [r4, #84] ; 0x54 2c14: e5920008 ldr r0, [r2, #8] 2c18: e59f10c8 ldr r1, [pc, #200] ; 2ce8 2c1c: ea000003 b 2c30 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 2c20: e5952000 ldr r2, [r5] <== NOT EXECUTED 2c24: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2c28: e5920008 ldr r0, [r2, #8] <== NOT EXECUTED 2c2c: e59f10b8 ldr r1, [pc, #184] ; 2cec <== NOT EXECUTED 2c30: e5942050 ldr r2, [r4, #80] ; 0x50 2c34: eb00398d bl 11270 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 2c38: ea000023 b 2ccc the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 2c3c: e5953000 ldr r3, [r5] 2c40: e5942050 ldr r2, [r4, #80] ; 0x50 2c44: e5930008 ldr r0, [r3, #8] 2c48: e59f10a0 ldr r1, [pc, #160] ; 2cf0 2c4c: eb003987 bl 11270 (uint32_t)the_jnode->info.file.size ); #endif break; 2c50: ea00001d b 2ccc case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); 2c54: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c58: e59f0094 ldr r0, [pc, #148] ; 2cf4 <== NOT EXECUTED 2c5c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c60: eb0039e3 bl 113f4 <== NOT EXECUTED assert(0); 2c64: e59f006c ldr r0, [pc, #108] ; 2cd8 <== NOT EXECUTED 2c68: e3a0105d mov r1, #93 ; 0x5d <== NOT EXECUTED 2c6c: e59f2068 ldr r2, [pc, #104] ; 2cdc <== NOT EXECUTED 2c70: e59f3080 ldr r3, [pc, #128] ; 2cf8 <== NOT EXECUTED 2c74: eb00020a bl 34a4 <__assert_func> <== NOT EXECUTED break; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 2c78: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c7c: e59f0070 ldr r0, [pc, #112] ; 2cf4 <== NOT EXECUTED 2c80: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2c84: eb0039da bl 113f4 <== NOT EXECUTED assert(0); 2c88: e59f0048 ldr r0, [pc, #72] ; 2cd8 <== NOT EXECUTED 2c8c: e3a01062 mov r1, #98 ; 0x62 <== NOT EXECUTED 2c90: eafffff5 b 2c6c <== NOT EXECUTED break; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 2c94: e5953000 ldr r3, [r5] <== NOT EXECUTED 2c98: e59f005c ldr r0, [pc, #92] ; 2cfc <== NOT EXECUTED 2c9c: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED 2ca0: eb0039d3 bl 113f4 <== NOT EXECUTED assert(0); 2ca4: e59f002c ldr r0, [pc, #44] ; 2cd8 <== NOT EXECUTED 2ca8: e3a01067 mov r1, #103 ; 0x67 <== NOT EXECUTED 2cac: eaffffee b 2c6c <== NOT EXECUTED break; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 2cb0: e5953000 ldr r3, [r5] <== NOT EXECUTED 2cb4: e59f1044 ldr r1, [pc, #68] ; 2d00 <== NOT EXECUTED 2cb8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 2cbc: eb00396b bl 11270 <== NOT EXECUTED assert(0); 2cc0: e59f0010 ldr r0, [pc, #16] ; 2cd8 <== NOT EXECUTED 2cc4: e3a0106c mov r1, #108 ; 0x6c <== NOT EXECUTED 2cc8: eaffffe7 b 2c6c <== NOT EXECUTED break; } puts(""); 2ccc: e59f0030 ldr r0, [pc, #48] ; 2d04 } 2cd0: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); assert(0); break; } puts(""); 2cd4: ea004092 b 12f24 2cd8: 000228f2 .word 0x000228f2 2cdc: 000214bc .word 0x000214bc 2ce0: 0002293b .word 0x0002293b 2ce4: 00020f64 .word 0x00020f64 2ce8: 00022945 .word 0x00022945 2cec: 00022958 .word 0x00022958 2cf0: 00022967 .word 0x00022967 2cf4: 00022973 .word 0x00022973 2cf8: 000222d9 .word 0x000222d9 2cfc: 00022987 .word 0x00022987 2d00: 0002299a .word 0x0002299a 2d04: 00022b2b .word 0x00022b2b 00001f38 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 1f38: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 1f3c: e593004c ldr r0, [r3, #76] ; 0x4c 1f40: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 1f44: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 1f48: 03a00000 moveq r0, #0 1f4c: 0a000006 beq 1f6c rtems_set_errno_and_return_minus_one( EINVAL ); 1f50: eb003e6d bl 1190c <__errno> <== NOT EXECUTED 1f54: e3a03016 mov r3, #22 <== NOT EXECUTED 1f58: e5803000 str r3, [r0] <== NOT EXECUTED 1f5c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1f60: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 1f64: 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; ((iinfo.sym_link.name[i] != '\0')); i++ ) 1f68: e2800001 add r0, r0, #1 1f6c: e1500002 cmp r0, r2 1f70: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 1f74: e593c050 ldr ip, [r3, #80] ; 0x50 1f78: e7dcc000 ldrb ip, [ip, r0] 1f7c: e35c0000 cmp ip, #0 1f80: 1afffff7 bne 1f64 buf[i] = node->info.sym_link.name[i]; return i; } 1f84: e49df004 pop {pc} ; (ldr pc, [sp], #4) 00001f88 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 1f88: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 1f8c: e5914000 ldr r4, [r1] <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 1f90: e1a05002 mov r5, r2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 1f94: e1a01003 mov r1, r3 <== NOT EXECUTED 1f98: e284000c add r0, r4, #12 <== NOT EXECUTED 1f9c: e3a02020 mov r2, #32 <== NOT EXECUTED 1fa0: eb00424a bl 128d0 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 1fa4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 1fa8: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1fac: 11a00004 movne r0, r4 <== NOT EXECUTED 1fb0: 1b0011a6 blne 6650 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 1fb4: e5953000 ldr r3, [r5] <== 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 ); 1fb8: e1a01004 mov r1, r4 <== NOT EXECUTED 1fbc: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED the_jnode->Parent = new_parent; 1fc0: e5843008 str r3, [r4, #8] <== NOT EXECUTED 1fc4: eb001196 bl 6624 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1fc8: e1a0000d mov r0, sp <== NOT EXECUTED 1fcc: e3a01000 mov r1, #0 <== NOT EXECUTED 1fd0: eb0001d4 bl 2728 <== NOT EXECUTED 1fd4: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 1fd8: e3a00000 mov r0, #0 <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1fdc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 1fe0: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 0000855c : ) { IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 855c: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 8560: e593204c ldr r2, [r3, #76] ; 0x4c 8564: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 8568: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 856c: e3520005 cmp r2, #5 8570: 979ff102 ldrls pc, [pc, r2, lsl #2] 8574: ea000012 b 85c4 <== NOT EXECUTED 8578: 00008590 .word 0x00008590 <== NOT EXECUTED 857c: 000085c4 .word 0x000085c4 <== NOT EXECUTED 8580: 000085b0 .word 0x000085b0 <== NOT EXECUTED 8584: 000085a4 .word 0x000085a4 <== NOT EXECUTED 8588: 000085a4 .word 0x000085a4 <== NOT EXECUTED 858c: 000085b0 .word 0x000085b0 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 8590: e5930054 ldr r0, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 8594: e5932050 ldr r2, [r3, #80] ; 0x50 8598: e581001c str r0, [r1, #28] 859c: e5812018 str r2, [r1, #24] break; 85a0: ea00000c b 85d8 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 85a4: e283c050 add ip, r3, #80 ; 0x50 85a8: e89c1800 ldm ip, {fp, ip} 85ac: ea000001 b 85b8 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 85b0: e3a0b000 mov fp, #0 <== NOT EXECUTED 85b4: e3a0c000 mov ip, #0 <== NOT EXECUTED 85b8: e581b020 str fp, [r1, #32] 85bc: e581c024 str ip, [r1, #36] ; 0x24 break; 85c0: ea000004 b 85d8 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 85c4: eb0010e3 bl c958 <__errno> <== NOT EXECUTED 85c8: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 85cc: e5803000 str r3, [r0] <== NOT EXECUTED 85d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 85d4: e8bd8800 pop {fp, pc} <== NOT EXECUTED break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; 85d8: e5932038 ldr r2, [r3, #56] ; 0x38 85dc: 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; 85e0: e5932040 ldr r2, [r3, #64] ; 0x40 85e4: e5812028 str r2, [r1, #40] ; 0x28 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 85e8: e1d3c3b4 ldrh ip, [r3, #52] ; 0x34 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 85ec: e5932044 ldr r2, [r3, #68] ; 0x44 rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; 85f0: 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; 85f4: e5812030 str r2, [r1, #48] ; 0x30 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); break; } buf->st_mode = the_jnode->st_mode; 85f8: e5932030 ldr r2, [r3, #48] ; 0x30 85fc: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; 8600: e1d323bc ldrh r2, [r3, #60] ; 0x3c 8604: 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; 8608: e5930048 ldr r0, [r3, #72] ; 0x48 buf->st_mode = the_jnode->st_mode; buf->st_nlink = the_jnode->st_nlink; buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; 860c: e1d333be ldrh r3, [r3, #62] ; 0x3e buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8610: 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; 8614: e1c131b4 strh r3, [r1, #20] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; 8618: e3a00000 mov r0, #0 return 0; } 861c: e8bd8800 pop {fp, pc} 00001fe4 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1fe4: e92d40f0 push {r4, r5, r6, r7, lr} 1fe8: e1a05000 mov r5, r0 1fec: 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 ); 1ff0: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 1ff4: e1a07002 mov r7, r2 1ff8: 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 ); 1ffc: eb00421b bl 12870 2000: e28d4004 add r4, sp, #4 2004: e1a01000 mov r1, r0 2008: e1a02004 mov r2, r4 200c: e28d303c add r3, sp, #60 ; 0x3c 2010: e1a00007 mov r0, r7 2014: eb002c3d bl d110 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 2018: e1a00006 mov r0, r6 201c: eb0041ff bl 12820 if (info.sym_link.name == NULL) { 2020: 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); 2024: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 2028: 0a00000b beq 205c * 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( 202c: e28dc028 add ip, sp, #40 ; 0x28 2030: e1a00005 mov r0, r5 2034: e1a02004 mov r2, r4 2038: e3a01004 mov r1, #4 203c: e59f3030 ldr r3, [pc, #48] ; 2074 2040: e58dc000 str ip, [sp] 2044: eb002937 bl c528 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 2048: e3500000 cmp r0, #0 204c: 13a00000 movne r0, #0 2050: 1a000005 bne 206c free(info.sym_link.name); 2054: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 2058: eb000189 bl 2684 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 205c: eb003e2a bl 1190c <__errno> <== NOT EXECUTED 2060: e3a0300c mov r3, #12 <== NOT EXECUTED 2064: e5803000 str r3, [r0] <== NOT EXECUTED 2068: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 206c: e28dd040 add sp, sp, #64 ; 0x40 2070: e8bd80f0 pop {r4, r5, r6, r7, pc} 2074: 0000a1ff .word 0x0000a1ff 00002078 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2078: 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; 207c: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2080: e595304c ldr r3, [r5, #76] ; 0x4c 2084: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 2088: e24dd01c sub sp, sp, #28 208c: e1a04001 mov r4, r1 2090: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 2094: 1a000025 bne 2130 if ( !node->info.hard_link.link_node ) 2098: e595e050 ldr lr, [r5, #80] ; 0x50 209c: e35e0000 cmp lr, #0 20a0: 1a000003 bne 20b4 rtems_set_errno_and_return_minus_one( EINVAL ); 20a4: eb003e18 bl 1190c <__errno> <== NOT EXECUTED 20a8: e3a03016 mov r3, #22 <== NOT EXECUTED 20ac: e5803000 str r3, [r0] <== NOT EXECUTED 20b0: ea000014 b 2108 <== NOT EXECUTED the_link = *loc; 20b4: e1a07001 mov r7, r1 20b8: e8b7000f ldm r7!, {r0, r1, r2, r3} 20bc: e1a0c00d mov ip, sp 20c0: e8ac000f stmia ip!, {r0, r1, r2, r3} the_link.node_access = node->info.hard_link.link_node; 20c4: e28d801c add r8, sp, #28 20c8: 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; 20cc: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20d0: 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; 20d4: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 20d8: eb002961 bl c664 /* * 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) 20dc: e5953050 ldr r3, [r5, #80] ; 0x50 20e0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 20e4: e3520001 cmp r2, #1 20e8: 1a000008 bne 2110 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 20ec: e1a0100d mov r1, sp 20f0: e1a00006 mov r0, r6 20f4: e59d3008 ldr r3, [sp, #8] 20f8: e1a0e00f mov lr, pc 20fc: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 2100: e3500000 cmp r0, #0 2104: 0a000009 beq 2130 2108: e3e00000 mvn r0, #0 210c: ea00000c b 2144 return -1; } else { node->info.hard_link.link_node->st_nlink --; 2110: e2422001 sub r2, r2, #1 2114: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 2118: e28d0014 add r0, sp, #20 211c: e3a01000 mov r1, #0 2120: eb000180 bl 2728 2124: e5953050 ldr r3, [r5, #80] ; 0x50 2128: e59d2014 ldr r2, [sp, #20] 212c: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 2130: e1a00006 mov r0, r6 2134: e1a01004 mov r1, r4 2138: e5943008 ldr r3, [r4, #8] 213c: e1a0e00f mov lr, pc 2140: e593f034 ldr pc, [r3, #52] ; 0x34 return result; } 2144: e28dd01c add sp, sp, #28 2148: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0000214c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 214c: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 2150: e593204c ldr r2, [r3, #76] ; 0x4c 2154: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 2158: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 215c: 0a000002 beq 216c rtems_set_errno_and_return_minus_one( ENOTDIR ); 2160: eb003de9 bl 1190c <__errno> <== NOT EXECUTED 2164: e3a03014 mov r3, #20 <== NOT EXECUTED 2168: ea000004 b 2180 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 216c: e593205c ldr r2, [r3, #92] ; 0x5c 2170: e3520000 cmp r2, #0 2174: 1a000004 bne 218c rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 2178: eb003de3 bl 1190c <__errno> <== NOT EXECUTED 217c: e3a03016 mov r3, #22 <== NOT EXECUTED 2180: e5803000 str r3, [r0] <== NOT EXECUTED 2184: e3e00000 mvn r0, #0 <== NOT EXECUTED 2188: 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; 218c: e3a00000 mov r0, #0 2190: e583005c str r0, [r3, #92] ; 0x5c return 0; } 2194: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000140c : #endif /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { 140c: e59f30c8 ldr r3, [pc, #200] ; 14dc 1410: e5933000 ldr r3, [r3] 1414: e3530000 cmp r3, #0 void RTEMS_Malloc_Initialize( void *heap_begin, uintptr_t heap_size, size_t sbrk_amount ) { 1418: e92d4070 push {r4, r5, r6, lr} 141c: e1a04000 mov r4, r0 1420: e1a05001 mov r5, r1 1424: e1a06002 mov r6, r2 /* * If configured, initialize the statistics support */ if ( rtems_malloc_statistics_helpers != NULL ) { (*rtems_malloc_statistics_helpers->initialize)(); 1428: 11a0e00f movne lr, pc 142c: 1593f000 ldrne pc, [r3] } /* * Initialize the garbage collection list to start with nothing on it. */ malloc_deferred_frees_initialize(); 1430: eb001dfd bl 8c2c /* * Initialize the optional sbrk support for extending the heap */ if ( rtems_malloc_sbrk_helpers != NULL ) { 1434: e59f30a4 ldr r3, [pc, #164] ; 14e0 1438: e5933000 ldr r3, [r3] 143c: e3530000 cmp r3, #0 1440: 0a000006 beq 1460 void *new_heap_begin = (*rtems_malloc_sbrk_helpers->initialize)( 1444: e1a00004 mov r0, r4 <== NOT EXECUTED 1448: e1a01006 mov r1, r6 <== NOT EXECUTED 144c: e1a0e00f mov lr, pc <== NOT EXECUTED 1450: e593f000 ldr pc, [r3] <== NOT EXECUTED heap_begin, sbrk_amount ); heap_size -= (uintptr_t) new_heap_begin - (uintptr_t) heap_begin; 1454: e0845005 add r5, r4, r5 <== NOT EXECUTED 1458: e0605005 rsb r5, r0, r5 <== NOT EXECUTED 145c: 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 ( 1460: e59f307c ldr r3, [pc, #124] ; 14e4 1464: e5d31000 ldrb r1, [r3] 1468: e3510000 cmp r1, #0 146c: 1a000005 bne 1488 !rtems_unified_work_area && rtems_configuration_get_do_zero_of_workspace() 1470: e59f3070 ldr r3, [pc, #112] ; 14e8 1474: e5d33028 ldrb r3, [r3, #40] ; 0x28 1478: e3530000 cmp r3, #0 ) { memset( heap_begin, 0, heap_size ); 147c: 11a00004 movne r0, r4 1480: 11a02005 movne r2, r5 1484: 1b002f7d blne d280 * 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 ) { 1488: e59f3054 ldr r3, [pc, #84] ; 14e4 148c: e5d33000 ldrb r3, [r3] 1490: e3530000 cmp r3, #0 1494: 1a000008 bne 14bc void *area_begin, uintptr_t area_size, uintptr_t page_size ) { return _Heap_Initialize( heap, area_begin, area_size, page_size ); 1498: e59f304c ldr r3, [pc, #76] ; 14ec 149c: e1a01004 mov r1, r4 14a0: e5930000 ldr r0, [r3] 14a4: e1a02005 mov r2, r5 14a8: e3a03004 mov r3, #4 14ac: eb000ed4 bl 5004 <_Heap_Initialize> RTEMS_Malloc_Heap, heap_begin, heap_size, CPU_HEAP_ALIGNMENT ); if ( status == 0 ) { 14b0: e3500000 cmp r0, #0 rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); 14b4: 0280001a addeq r0, r0, #26 14b8: 0b000cf9 bleq 48a4 } } MSBUMP( space_available, _Protected_heap_Get_size(RTEMS_Malloc_Heap) ); 14bc: e59f3028 ldr r3, [pc, #40] ; 14ec 14c0: e59f4028 ldr r4, [pc, #40] ; 14f0 14c4: e5930000 ldr r0, [r3] 14c8: e5945000 ldr r5, [r4] 14cc: eb00118b bl 5b00 <_Protected_heap_Get_size> 14d0: e0800005 add r0, r0, r5 14d4: e5840000 str r0, [r4] printk( "\n" ); rtems_print_buffer( (heap_begin + heap_size) - 48, 48 ); rtems_fatal_error_occurred( RTEMS_NO_MEMORY ); } #endif } 14d8: e8bd8070 pop {r4, r5, r6, pc} 14dc: 000199a8 .word 0x000199a8 14e0: 000199ac .word 0x000199ac 14e4: 000199a5 .word 0x000199a5 14e8: 00018454 .word 0x00018454 14ec: 000183ac .word 0x000183ac 14f0: 00019b90 .word 0x00019b90 00003780 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 3780: 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 ) 3784: e250a000 subs sl, r0, #0 <== NOT EXECUTED 3788: 0a000043 beq 389c <== NOT EXECUTED return; if ( !print_handler ) 378c: e59f310c ldr r3, [pc, #268] ; 38a0 <== NOT EXECUTED 3790: e5937004 ldr r7, [r3, #4] <== NOT EXECUTED 3794: e3570000 cmp r7, #0 <== NOT EXECUTED 3798: 0a00003f beq 389c <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 379c: e37a0001 cmn sl, #1 <== NOT EXECUTED } else return; } else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 37a0: 159a60f4 ldrne r6, [sl, #244] ; 0xf4 <== NOT EXECUTED current = 0; } else return; } else { stack = &the_thread->Start.Initial_stack; 37a4: 128a40c4 addne r4, sl, #196 ; 0xc4 <== NOT EXECUTED /* * Obtain interrupt stack information */ if (the_thread == (Thread_Control *) -1) { 37a8: 1a000005 bne 37c4 <== NOT EXECUTED if (Stack_check_Interrupt_stack.area) { 37ac: e59f40f0 ldr r4, [pc, #240] ; 38a4 <== NOT EXECUTED 37b0: e5943004 ldr r3, [r4, #4] <== NOT EXECUTED 37b4: e3530000 cmp r3, #0 <== NOT EXECUTED 37b8: 13a06000 movne r6, #0 <== NOT EXECUTED 37bc: 11a0a006 movne sl, r6 <== NOT EXECUTED 37c0: 0a000035 beq 389c <== 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); 37c4: e8940220 ldm r4, {r5, r9} <== NOT EXECUTED 37c8: e2899010 add r9, r9, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 37cc: e2455010 sub r5, r5, #16 <== NOT EXECUTED high_water_mark = Stack_check_find_high_water_mark(low, size); 37d0: e1a00009 mov r0, r9 <== NOT EXECUTED 37d4: e1a01005 mov r1, r5 <== NOT EXECUTED 37d8: ebffffda bl 3748 <== NOT EXECUTED if ( high_water_mark ) 37dc: e2508000 subs r8, r0, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 37e0: 10899005 addne r9, r9, r5 <== NOT EXECUTED 37e4: 10688009 rsbne r8, r8, r9 <== NOT EXECUTED else used = 0; if ( the_thread ) { 37e8: e35a0000 cmp sl, #0 <== NOT EXECUTED 37ec: e59f30ac ldr r3, [pc, #172] ; 38a0 <== NOT EXECUTED 37f0: 0a00000c beq 3828 <== NOT EXECUTED (*print_handler)( 37f4: e59aa008 ldr sl, [sl, #8] <== NOT EXECUTED 37f8: e28d2008 add r2, sp, #8 <== NOT EXECUTED 37fc: e1a0000a mov r0, sl <== NOT EXECUTED 3800: e3a01005 mov r1, #5 <== NOT EXECUTED 3804: e5939008 ldr r9, [r3, #8] <== NOT EXECUTED 3808: eb00166e bl 91c8 <== NOT EXECUTED 380c: e1a0200a mov r2, sl <== NOT EXECUTED 3810: e1a03000 mov r3, r0 <== NOT EXECUTED 3814: e59f108c ldr r1, [pc, #140] ; 38a8 <== NOT EXECUTED 3818: e1a00009 mov r0, r9 <== NOT EXECUTED 381c: e1a0e00f mov lr, pc <== NOT EXECUTED 3820: e12fff17 bx r7 <== NOT EXECUTED 3824: ea000004 b 383c <== 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 ); 3828: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 382c: e59f1078 ldr r1, [pc, #120] ; 38ac <== NOT EXECUTED 3830: e3e02000 mvn r2, #0 <== NOT EXECUTED 3834: e1a0e00f mov lr, pc <== NOT EXECUTED 3838: e12fff17 bx r7 <== NOT EXECUTED } (*print_handler)( 383c: e5943000 ldr r3, [r4] <== NOT EXECUTED 3840: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 3844: e59f4054 ldr r4, [pc, #84] ; 38a0 <== NOT EXECUTED 3848: e58d6000 str r6, [sp] <== NOT EXECUTED 384c: e58d5004 str r5, [sp, #4] <== NOT EXECUTED 3850: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3854: e0823003 add r3, r2, r3 <== NOT EXECUTED 3858: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 385c: e59f104c ldr r1, [pc, #76] ; 38b0 <== NOT EXECUTED 3860: e1a0e00f mov lr, pc <== NOT EXECUTED 3864: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 3868: e5943000 ldr r3, [r4] <== NOT EXECUTED 386c: e3530000 cmp r3, #0 <== NOT EXECUTED 3870: 1a000004 bne 3888 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 3874: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3878: e59f1034 ldr r1, [pc, #52] ; 38b4 <== NOT EXECUTED 387c: e1a0e00f mov lr, pc <== NOT EXECUTED 3880: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED 3884: ea000004 b 389c <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 3888: e1a02008 mov r2, r8 <== NOT EXECUTED 388c: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED 3890: e59f1020 ldr r1, [pc, #32] ; 38b8 <== NOT EXECUTED 3894: e1a0e00f mov lr, pc <== NOT EXECUTED 3898: e594f004 ldr pc, [r4, #4] <== NOT EXECUTED } } 389c: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 38a0: 0005e170 .word 0x0005e170 38a4: 00060c5c .word 0x00060c5c 38a8: 00057ab1 .word 0x00057ab1 38ac: 00057abe .word 0x00057abe 38b0: 00057acc .word 0x00057acc 38b4: 00057aea .word 0x00057aea 38b8: 00057af7 .word 0x00057af7 00003748 : /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 3748: e2800010 add r0, r0, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 374c: e3c11003 bic r1, r1, #3 <== NOT EXECUTED 3750: e0801001 add r1, r0, r1 <== NOT EXECUTED if (*base != U32_PATTERN) 3754: e59f3020 ldr r3, [pc, #32] ; 377c <== 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++) 3758: ea000003 b 376c <== NOT EXECUTED if (*base != U32_PATTERN) 375c: e5902000 ldr r2, [r0] <== NOT EXECUTED 3760: e1520003 cmp r2, r3 <== NOT EXECUTED 3764: 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++) 3768: e2800004 add r0, r0, #4 <== NOT EXECUTED 376c: e1500001 cmp r0, r1 <== NOT EXECUTED 3770: 3afffff9 bcc 375c <== NOT EXECUTED 3774: e3a00000 mov r0, #0 <== NOT EXECUTED if (*base != U32_PATTERN) return (void *) base; #endif return (void *)0; } 3778: e12fff1e bx lr <== NOT EXECUTED 377c: a5a5a5a5 .word 0xa5a5a5a5 00005290 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 5290: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 5294: e1a04001 mov r4, r1 5298: 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 ) ) { 529c: e1a0100d mov r1, sp 52a0: e1a00004 mov r0, r4 pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 52a4: e1a08002 mov r8, r2 52a8: 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 ) ) { 52ac: eb00006f bl 5470 <_POSIX_Mutex_Get> 52b0: e3500000 cmp r0, #0 52b4: 0a000032 beq 5384 <_POSIX_Condition_variables_Wait_support+0xf4> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 52b8: e59f30d0 ldr r3, [pc, #208] ; 5390 <_POSIX_Condition_variables_Wait_support+0x100> 52bc: e5932000 ldr r2, [r3] 52c0: e2422001 sub r2, r2, #1 52c4: e5832000 str r2, [r3] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 52c8: e1a0100d mov r1, sp 52cc: e1a00006 mov r0, r6 52d0: ebffff7c bl 50c8 <_POSIX_Condition_variables_Get> switch ( location ) { 52d4: e59d3000 ldr r3, [sp] 52d8: e3530000 cmp r3, #0 return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 52dc: e1a0a000 mov sl, r0 switch ( location ) { 52e0: 1a000027 bne 5384 <_POSIX_Condition_variables_Wait_support+0xf4> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 52e4: e5903014 ldr r3, [r0, #20] 52e8: e3530000 cmp r3, #0 52ec: 0a000004 beq 5304 <_POSIX_Condition_variables_Wait_support+0x74> 52f0: e5942000 ldr r2, [r4] 52f4: e1530002 cmp r3, r2 52f8: 0a000001 beq 5304 <_POSIX_Condition_variables_Wait_support+0x74> _Thread_Enable_dispatch(); 52fc: eb000bab bl 81b0 <_Thread_Enable_dispatch> 5300: ea00001f b 5384 <_POSIX_Condition_variables_Wait_support+0xf4> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 5304: e1a00004 mov r0, r4 5308: eb0000de bl 5688 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 530c: e3570000 cmp r7, #0 5310: 1a000015 bne 536c <_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; 5314: e59f5078 ldr r5, [pc, #120] ; 5394 <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 5318: e5942000 ldr r2, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 531c: e5953000 ldr r3, [r5] return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 5320: e58a2014 str r2, [sl, #20] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 5324: e5837034 str r7, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 5328: 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; 532c: e28a2018 add r2, sl, #24 _Thread_Executing->Wait.id = *cond; 5330: 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; 5334: 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; 5338: e5832044 str r2, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 533c: e1a00002 mov r0, r2 5340: e58a1048 str r1, [sl, #72] ; 0x48 5344: e59f204c ldr r2, [pc, #76] ; 5398 <_POSIX_Condition_variables_Wait_support+0x108> 5348: e1a01008 mov r1, r8 534c: eb000cd0 bl 8694 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 5350: eb000b96 bl 81b0 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 5354: e5953000 ldr r3, [r5] 5358: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 535c: e3550074 cmp r5, #116 ; 0x74 5360: 13550000 cmpne r5, #0 5364: 0a000002 beq 5374 <_POSIX_Condition_variables_Wait_support+0xe4> 5368: ea000006 b 5388 <_POSIX_Condition_variables_Wait_support+0xf8> <== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 536c: eb000b8f bl 81b0 <_Thread_Enable_dispatch> 5370: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 5374: e1a00004 mov r0, r4 5378: eb0000a3 bl 560c if ( mutex_status ) 537c: e3500000 cmp r0, #0 5380: 0a000000 beq 5388 <_POSIX_Condition_variables_Wait_support+0xf8> 5384: e3a05016 mov r5, #22 case OBJECTS_ERROR: break; } return EINVAL; } 5388: e1a00005 mov r0, r5 538c: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} 5390: 0001c6ac .word 0x0001c6ac 5394: 0001c760 .word 0x0001c760 5398: 00008a40 .word 0x00008a40 0000665c <_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 ) { 665c: 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; 6660: e5913014 ldr r3, [r1, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 6664: e281503c add r5, r1, #60 ; 0x3c 6668: e5815038 str r5, [r1, #56] ; 0x38 the_chain->permanent_null = NULL; 666c: e3a05000 mov r5, #0 the_chain->last = _Chain_Head(the_chain); 6670: 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 ) ) 6674: 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 ]; 6678: 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; 667c: e581503c str r5, [r1, #60] ; 0x3c 6680: e285500c add r5, r5, #12 the_chain->last = _Chain_Head(the_chain); 6684: e581c040 str ip, [r1, #64] ; 0x40 block_state = the_thread_queue->state; 6688: 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 ]; 668c: 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; 6690: 159f8154 ldrne r8, [pc, #340] ; 67ec <_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 ) ) 6694: 1a000023 bne 6728 <_Thread_queue_Enqueue_priority+0xcc> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 6698: e28c8004 add r8, ip, #4 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 669c: e10f5000 mrs r5, CPSR 66a0: e3854080 orr r4, r5, #128 ; 0x80 66a4: 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; 66a8: e3e06000 mvn r6, #0 66ac: e59c4000 ldr r4, [ip] while ( !_Chain_Is_tail( header, (Chain_Node *)search_thread ) ) { 66b0: ea00000b b 66e4 <_Thread_queue_Enqueue_priority+0x88> search_priority = search_thread->current_priority; 66b4: e5946014 ldr r6, [r4, #20] if ( priority <= search_priority ) 66b8: e1530006 cmp r3, r6 66bc: 9a00000a bls 66ec <_Thread_queue_Enqueue_priority+0x90> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 66c0: e10fa000 mrs sl, CPSR 66c4: e129f005 msr CPSR_fc, r5 66c8: 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) ) { 66cc: e594a010 ldr sl, [r4, #16] 66d0: e117000a tst r7, sl 66d4: 1a000001 bne 66e0 <_Thread_queue_Enqueue_priority+0x84> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 66d8: e129f005 msr CPSR_fc, r5 <== NOT EXECUTED 66dc: eaffffee b 669c <_Thread_queue_Enqueue_priority+0x40> <== NOT EXECUTED _ISR_Enable( level ); goto restart_forward_search; } search_thread = (Thread_Control *)search_thread->Object.Node.next; 66e0: 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 ) ) { 66e4: e1540008 cmp r4, r8 66e8: 1afffff1 bne 66b4 <_Thread_queue_Enqueue_priority+0x58> } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 66ec: e590c030 ldr ip, [r0, #48] ; 0x30 66f0: 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 ) ) { 66f4: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *)search_thread->Object.Node.next; } if ( the_thread_queue->sync_state != 66f8: 1a000038 bne 67e0 <_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 ) 66fc: 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; 6700: e3a03000 mov r3, #0 6704: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 6708: 0a00002a beq 67b8 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; previous_node = search_node->previous; 670c: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 6710: e5814000 str r4, [r1] the_node->previous = previous_node; 6714: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 6718: 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; 671c: e5831000 str r1, [r3] search_node->previous = the_node; 6720: e5841004 str r1, [r4, #4] the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); 6724: ea000021 b 67b0 <_Thread_queue_Enqueue_priority+0x154> return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; restart_reverse_search: search_priority = PRIORITY_MAXIMUM + 1; 6728: e5d86000 ldrb r6, [r8] 672c: e2866001 add r6, r6, #1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 6730: e10f5000 mrs r5, CPSR 6734: e3854080 orr r4, r5, #128 ; 0x80 6738: e129f004 msr CPSR_fc, r4 _ISR_Disable( level ); search_thread = (Thread_Control *) header->last; 673c: e59c4008 ldr r4, [ip, #8] while ( !_Chain_Is_head( header, (Chain_Node *)search_thread ) ) { 6740: ea00000b b 6774 <_Thread_queue_Enqueue_priority+0x118> search_priority = search_thread->current_priority; 6744: e5946014 ldr r6, [r4, #20] if ( priority >= search_priority ) 6748: e1530006 cmp r3, r6 674c: 2a00000a bcs 677c <_Thread_queue_Enqueue_priority+0x120> static inline void arm_interrupt_flash( uint32_t level ) { uint32_t arm_switch_reg; asm volatile ( 6750: e10fa000 mrs sl, CPSR 6754: e129f005 msr CPSR_fc, r5 6758: 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) ) { 675c: e594a010 ldr sl, [r4, #16] 6760: e117000a tst r7, sl 6764: 1a000001 bne 6770 <_Thread_queue_Enqueue_priority+0x114> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 6768: e129f005 msr CPSR_fc, r5 676c: eaffffed b 6728 <_Thread_queue_Enqueue_priority+0xcc> _ISR_Enable( level ); goto restart_reverse_search; } search_thread = (Thread_Control *) 6770: 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 ) ) { 6774: e154000c cmp r4, ip 6778: 1afffff1 bne 6744 <_Thread_queue_Enqueue_priority+0xe8> } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 677c: e590c030 ldr ip, [r0, #48] ; 0x30 6780: 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 ) ) { 6784: e1a0c005 mov ip, r5 } search_thread = (Thread_Control *) search_thread->Object.Node.previous; } if ( the_thread_queue->sync_state != 6788: 1a000014 bne 67e0 <_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 ) 678c: 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; 6790: e3a03000 mov r3, #0 6794: e5803030 str r3, [r0, #48] ; 0x30 if ( priority == search_priority ) 6798: 0a000006 beq 67b8 <_Thread_queue_Enqueue_priority+0x15c> goto equal_priority; search_node = (Chain_Node *) search_thread; next_node = search_node->next; 679c: e5943000 ldr r3, [r4] the_node = (Chain_Node *) the_thread; the_node->next = next_node; the_node->previous = search_node; 67a0: e8810018 stm r1, {r3, r4} search_node->next = the_node; next_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 67a4: 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; 67a8: e5841000 str r1, [r4] next_node->previous = the_node; 67ac: e5831004 str r1, [r3, #4] 67b0: e129f005 msr CPSR_fc, r5 67b4: ea000007 b 67d8 <_Thread_queue_Enqueue_priority+0x17c> 67b8: 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; 67bc: e5943004 ldr r3, [r4, #4] the_node = (Chain_Node *) the_thread; the_node->next = search_node; 67c0: e5814000 str r4, [r1] the_node->previous = previous_node; 67c4: e5813004 str r3, [r1, #4] previous_node->next = the_node; search_node->previous = the_node; the_thread->Wait.queue = the_thread_queue; 67c8: 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; 67cc: e5831000 str r1, [r3] search_node->previous = the_node; 67d0: e5841004 str r1, [r4, #4] 67d4: e129f00c msr CPSR_fc, ip 67d8: e3a00001 mov r0, #1 the_thread->Wait.queue = the_thread_queue; _ISR_Enable( level ); return THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 67dc: 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; 67e0: e582c000 str ip, [r2] return the_thread_queue->sync_state; 67e4: e5900030 ldr r0, [r0, #48] ; 0x30 } 67e8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 67ec: 00018450 .word 0x00018450 00013ce8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13ce8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13cec: e24dd020 sub sp, sp, #32 13cf0: e28d3014 add r3, sp, #20 13cf4: 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; 13cf8: e3a09000 mov r9, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 13cfc: e283a004 add sl, r3, #4 13d00: 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); 13d04: e58d301c str r3, [sp, #28] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d08: e2802008 add r2, r0, #8 static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d0c: e2803040 add r3, r0, #64 ; 0x40 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d10: e58da014 str sl, [sp, #20] the_chain->permanent_null = NULL; 13d14: e58d9018 str r9, [sp, #24] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13d18: e58d8008 str r8, [sp, #8] the_chain->permanent_null = NULL; 13d1c: e58d900c str r9, [sp, #12] the_chain->last = _Chain_Head(the_chain); 13d20: e58d5010 str r5, [sp, #16] static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 13d24: e58d2004 str r2, [sp, #4] static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13d28: e58d3000 str r3, [sp] * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13d2c: e1a04000 mov r4, r0 */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d30: 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 ); 13d34: 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; 13d38: e28d2014 add r2, sp, #20 13d3c: 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; 13d40: e59f2168 ldr r2, [pc, #360] ; 13eb0 <_Timer_server_Body+0x1c8> 13d44: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 13d48: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d4c: e1a02005 mov r2, r5 13d50: e0611003 rsb r1, r1, r3 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 13d54: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13d58: e1a0000b mov r0, fp 13d5c: eb001049 bl 17e88 <_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(); 13d60: e59f314c ldr r3, [pc, #332] ; 13eb4 <_Timer_server_Body+0x1cc> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 13d64: 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(); 13d68: 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 ) { 13d6c: e1560002 cmp r6, r2 13d70: 9a000004 bls 13d88 <_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 ); 13d74: e0621006 rsb r1, r2, r6 13d78: e1a00007 mov r0, r7 13d7c: e1a02005 mov r2, r5 13d80: eb001040 bl 17e88 <_Watchdog_Adjust_to_chain> 13d84: ea000003 b 13d98 <_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 ); 13d88: 30662002 rsbcc r2, r6, r2 13d8c: 31a00007 movcc r0, r7 13d90: 33a01001 movcc r1, #1 13d94: 3b001013 blcc 17de8 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 13d98: 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 ); 13d9c: e5940078 ldr r0, [r4, #120] ; 0x78 13da0: eb00023b bl 14694 <_Chain_Get> if ( timer == NULL ) { 13da4: e2501000 subs r1, r0, #0 13da8: 0a00000a beq 13dd8 <_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 ) { 13dac: e5913038 ldr r3, [r1, #56] ; 0x38 13db0: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 13db4: 02811010 addeq r1, r1, #16 13db8: 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 ) { 13dbc: 0a000003 beq 13dd0 <_Timer_server_Body+0xe8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 13dc0: e3530003 cmp r3, #3 13dc4: 1afffff4 bne 13d9c <_Timer_server_Body+0xb4> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 13dc8: e2811010 add r1, r1, #16 13dcc: e1a00007 mov r0, r7 13dd0: eb001059 bl 17f3c <_Watchdog_Insert> 13dd4: eafffff0 b 13d9c <_Timer_server_Body+0xb4> static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13dd8: e10f3000 mrs r3, CPSR 13ddc: e3832080 orr r2, r3, #128 ; 0x80 13de0: e129f002 msr CPSR_fc, r2 * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); if ( _Chain_Is_empty( insert_chain ) ) { 13de4: e59d2014 ldr r2, [sp, #20] 13de8: e152000a cmp r2, sl 13dec: 1a000005 bne 13e08 <_Timer_server_Body+0x120> ts->insert_chain = NULL; 13df0: e5841078 str r1, [r4, #120] ; 0x78 static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13df4: 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 ) ) { 13df8: e59d3008 ldr r3, [sp, #8] 13dfc: e1530008 cmp r3, r8 13e00: 1a000002 bne 13e10 <_Timer_server_Body+0x128> 13e04: ea000015 b 13e60 <_Timer_server_Body+0x178> 13e08: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 13e0c: eaffffcb b 13d40 <_Timer_server_Body+0x58> <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 13e10: e10f2000 mrs r2, CPSR 13e14: e3823080 orr r3, r2, #128 ; 0x80 13e18: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 13e1c: e59d3008 ldr r3, [sp, #8] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 13e20: e1530008 cmp r3, r8 13e24: 0a00000b beq 13e58 <_Timer_server_Body+0x170> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 13e28: 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 ) { 13e2c: e3530000 cmp r3, #0 the_chain->first = new_first; 13e30: e58d1008 str r1, [sp, #8] new_first->previous = _Chain_Head(the_chain); 13e34: e5815004 str r5, [r1, #4] 13e38: 0a000006 beq 13e58 <_Timer_server_Body+0x170> watchdog->state = WATCHDOG_INACTIVE; 13e3c: e5839008 str r9, [r3, #8] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 13e40: 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 ); 13e44: e2830020 add r0, r3, #32 13e48: e8900003 ldm r0, {r0, r1} 13e4c: e1a0e00f mov lr, pc 13e50: e593f01c ldr pc, [r3, #28] } 13e54: eaffffed b 13e10 <_Timer_server_Body+0x128> 13e58: e129f002 msr CPSR_fc, r2 13e5c: eaffffb5 b 13d38 <_Timer_server_Body+0x50> } else { ts->active = false; 13e60: e5c4907c strb r9, [r4, #124] ; 0x7c 13e64: e59f304c ldr r3, [pc, #76] ; 13eb8 <_Timer_server_Body+0x1d0> 13e68: e5932000 ldr r2, [r3] 13e6c: e2822001 add r2, r2, #1 13e70: e5832000 str r2, [r3] /* * Block until there is something to do. */ _Thread_Disable_dispatch(); _Thread_Set_state( ts->thread, STATES_DELAYING ); 13e74: e3a01008 mov r1, #8 13e78: e5940000 ldr r0, [r4] 13e7c: eb000d7d bl 17478 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 13e80: e1a00004 mov r0, r4 13e84: ebffff6b bl 13c38 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 13e88: e1a00004 mov r0, r4 13e8c: ebffff7f bl 13c90 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 13e90: eb000adf bl 16a14 <_Thread_Enable_dispatch> ts->active = true; 13e94: e3a03001 mov r3, #1 13e98: 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 ); 13e9c: e59d0004 ldr r0, [sp, #4] 13ea0: eb00107e bl 180a0 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 13ea4: e59d0000 ldr r0, [sp] 13ea8: eb00107c bl 180a0 <_Watchdog_Remove> 13eac: eaffffa1 b 13d38 <_Timer_server_Body+0x50> 13eb0: 00039384 .word 0x00039384 13eb4: 000392b4 .word 0x000392b4 13eb8: 0003922c .word 0x0003922c 00017ac8 <_exit>: /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 17ac8: e1a04000 mov r4, r0 17acc: eb000227 bl 18370 <___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(); 17ad0: ebffffe0 bl 17a58 rtems_shutdown_executive(status); 17ad4: e1a00004 mov r0, r4 17ad8: eb00003b bl 17bcc 17adc: eafffffe b 17adc <_exit+0x14> <== NOT EXECUTED 000337d0 <_fcntl_r>: int fd, int cmd, int arg ) { return fcntl( fd, cmd, arg ); 337d0: e1a00001 mov r0, r1 <== NOT EXECUTED 337d4: e1a01002 mov r1, r2 <== NOT EXECUTED 337d8: e1a02003 mov r2, r3 <== NOT EXECUTED 337dc: eaffff8b b 33610 <== NOT EXECUTED 0000b42c <_getpid_r>: pid_t _getpid_r( struct _reent *ptr __attribute__((unused)) ) { return getpid(); } b42c: e3a00001 mov r0, #1 <== NOT EXECUTED b430: e12fff1e bx lr <== NOT EXECUTED 00008960 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 8960: eaffffe8 b 8908 <== NOT EXECUTED 00022e50 <_link_r>: struct _reent *ptr __attribute__((unused)), const char *existing, const char *new ) { return link( existing, new ); 22e50: e1a00001 mov r0, r1 <== NOT EXECUTED 22e54: e1a01002 mov r1, r2 <== NOT EXECUTED 22e58: eaffff68 b 22c00 <== NOT EXECUTED 0002304c <_lstat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 2304c: e1a00001 mov r0, r1 <== NOT EXECUTED 23050: e1a01002 mov r1, r2 <== NOT EXECUTED 23054: eaffffc4 b 22f6c <== NOT EXECUTED 00017bb0 <_realloc_r>: struct _reent *ignored __attribute__((unused)), void *ptr, size_t size ) { return realloc( ptr, size ); 17bb0: e1a00001 mov r0, r1 <== NOT EXECUTED 17bb4: e1a01002 mov r1, r2 <== NOT EXECUTED 17bb8: ea00000e b 17bf8 <== NOT EXECUTED 00052c9c <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 52c9c: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 52ca0: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 52ca4: e24dd044 sub sp, sp, #68 ; 0x44 <== NOT EXECUTED 52ca8: e1a05001 mov r5, r1 <== NOT EXECUTED 52cac: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 52cb0: ebfec8d9 bl 501c <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 52cb4: e2507000 subs r7, r0, #0 <== NOT EXECUTED 52cb8: 1a000019 bne 52d24 <_rename_r+0x88> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 52cbc: e5d53000 ldrb r3, [r5] <== NOT EXECUTED 52cc0: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 52cc4: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 52cc8: 0a000001 beq 52cd4 <_rename_r+0x38> <== NOT EXECUTED 52ccc: e3530000 cmp r3, #0 <== NOT EXECUTED 52cd0: 1a000009 bne 52cfc <_rename_r+0x60> <== NOT EXECUTED 52cd4: e59f33ac ldr r3, [pc, #940] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52cd8: e593e000 ldr lr, [r3] <== NOT EXECUTED 52cdc: e28ee018 add lr, lr, #24 <== NOT EXECUTED 52ce0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52ce4: e28dc018 add ip, sp, #24 <== NOT EXECUTED 52ce8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52cec: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52cf0: e3a04000 mov r4, #0 <== NOT EXECUTED 52cf4: e58c3000 str r3, [ip] <== NOT EXECUTED 52cf8: ea000013 b 52d4c <_rename_r+0xb0> <== NOT EXECUTED 52cfc: e59f3384 ldr r3, [pc, #900] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52d00: e593e000 ldr lr, [r3] <== NOT EXECUTED 52d04: e28ee004 add lr, lr, #4 <== NOT EXECUTED 52d08: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52d0c: e28dc018 add ip, sp, #24 <== NOT EXECUTED 52d10: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52d14: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52d18: e1a04007 mov r4, r7 <== NOT EXECUTED 52d1c: e58c3000 str r3, [ip] <== NOT EXECUTED 52d20: ea000009 b 52d4c <_rename_r+0xb0> <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 52d24: e3a0c000 mov ip, #0 <== NOT EXECUTED 52d28: e1a00005 mov r0, r5 <== NOT EXECUTED 52d2c: e1a01007 mov r1, r7 <== NOT EXECUTED 52d30: e3a02002 mov r2, #2 <== NOT EXECUTED 52d34: e28d3018 add r3, sp, #24 <== NOT EXECUTED 52d38: e58dc000 str ip, [sp] <== NOT EXECUTED 52d3c: ebfec8fe bl 513c <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 52d40: e3500000 cmp r0, #0 <== NOT EXECUTED 52d44: 03a04001 moveq r4, #1 <== NOT EXECUTED 52d48: 1a000025 bne 52de4 <_rename_r+0x148> <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 52d4c: e28de018 add lr, sp, #24 <== NOT EXECUTED 52d50: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52d54: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 52d58: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52d5c: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 52d60: e0855007 add r5, r5, r7 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 52d64: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 52d68: e1a00005 mov r0, r5 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 52d6c: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 52d70: ebffb354 bl 3fac8 <== NOT EXECUTED 52d74: e1a01000 mov r1, r0 <== NOT EXECUTED 52d78: e1a00005 mov r0, r5 <== NOT EXECUTED 52d7c: ebfec89a bl 4fec <== NOT EXECUTED 52d80: e0855000 add r5, r5, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 52d84: e1a00005 mov r0, r5 <== NOT EXECUTED * 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 ) ); 52d88: e58d5040 str r5, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 52d8c: ebffb34d bl 3fac8 <== NOT EXECUTED 52d90: e3a0c000 mov ip, #0 <== NOT EXECUTED 52d94: e1a01000 mov r1, r0 <== NOT EXECUTED 52d98: e1a0200c mov r2, ip <== NOT EXECUTED 52d9c: e1a00005 mov r0, r5 <== NOT EXECUTED 52da0: e28d302c add r3, sp, #44 ; 0x2c <== NOT EXECUTED 52da4: e58dc000 str ip, [sp] <== NOT EXECUTED 52da8: ebfec8ab bl 505c <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 52dac: e2505000 subs r5, r0, #0 <== NOT EXECUTED 52db0: 0a00000d beq 52dec <_rename_r+0x150> <== NOT EXECUTED if ( free_old_parentloc ) 52db4: e3540000 cmp r4, #0 <== NOT EXECUTED 52db8: 0a000007 beq 52ddc <_rename_r+0x140> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52dbc: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52dc0: e3530000 cmp r3, #0 <== NOT EXECUTED 52dc4: 0a000004 beq 52ddc <_rename_r+0x140> <== NOT EXECUTED 52dc8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52dcc: e3530000 cmp r3, #0 <== NOT EXECUTED 52dd0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52dd4: 11a0e00f movne lr, pc <== NOT EXECUTED 52dd8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 52ddc: ebff98ae bl 3909c <__errno> <== NOT EXECUTED 52de0: e5805000 str r5, [r0] <== NOT EXECUTED 52de4: e3e06000 mvn r6, #0 <== NOT EXECUTED 52de8: ea0000a3 b 5307c <_rename_r+0x3e0> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 52dec: e5d63000 ldrb r3, [r6] <== NOT EXECUTED 52df0: e353002f cmp r3, #47 ; 0x2f <== NOT EXECUTED 52df4: 1353005c cmpne r3, #92 ; 0x5c <== NOT EXECUTED 52df8: 13a05000 movne r5, #0 <== NOT EXECUTED 52dfc: 03a05001 moveq r5, #1 <== NOT EXECUTED 52e00: 0a000001 beq 52e0c <_rename_r+0x170> <== NOT EXECUTED 52e04: e3530000 cmp r3, #0 <== NOT EXECUTED 52e08: 1a000009 bne 52e34 <_rename_r+0x198> <== NOT EXECUTED 52e0c: e59f3274 ldr r3, [pc, #628] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52e10: e593e000 ldr lr, [r3] <== NOT EXECUTED 52e14: e28ee018 add lr, lr, #24 <== NOT EXECUTED 52e18: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52e1c: e28dc004 add ip, sp, #4 <== NOT EXECUTED 52e20: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52e24: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52e28: e3a00001 mov r0, #1 <== NOT EXECUTED 52e2c: e58c3000 str r3, [ip] <== NOT EXECUTED 52e30: ea000008 b 52e58 <_rename_r+0x1bc> <== NOT EXECUTED 52e34: e59f324c ldr r3, [pc, #588] ; 53088 <_rename_r+0x3ec> <== NOT EXECUTED 52e38: e593e000 ldr lr, [r3] <== NOT EXECUTED 52e3c: e28ee004 add lr, lr, #4 <== NOT EXECUTED 52e40: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 52e44: e28dc004 add ip, sp, #4 <== NOT EXECUTED 52e48: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 52e4c: e59e3000 ldr r3, [lr] <== NOT EXECUTED 52e50: e58c3000 str r3, [ip] <== NOT EXECUTED 52e54: e1a00005 mov r0, r5 <== NOT EXECUTED if ( !new_parent_loc.ops->evalformake_h ) { 52e58: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52e5c: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 52e60: e3530000 cmp r3, #0 <== NOT EXECUTED 52e64: 0a00004d beq 52fa0 <_rename_r+0x304> <== NOT EXECUTED 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 ); 52e68: e28d5004 add r5, sp, #4 <== NOT EXECUTED 52e6c: e0860000 add r0, r6, r0 <== NOT EXECUTED 52e70: e1a01005 mov r1, r5 <== NOT EXECUTED 52e74: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 52e78: e1a0e00f mov lr, pc <== NOT EXECUTED 52e7c: e12fff13 bx r3 <== NOT EXECUTED if ( result != 0 ) { 52e80: e2506000 subs r6, r0, #0 <== NOT EXECUTED 52e84: 0a00001c beq 52efc <_rename_r+0x260> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 52e88: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52e8c: e3530000 cmp r3, #0 <== NOT EXECUTED 52e90: 0a000004 beq 52ea8 <_rename_r+0x20c> <== NOT EXECUTED 52e94: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52e98: e3530000 cmp r3, #0 <== NOT EXECUTED 52e9c: 11a00005 movne r0, r5 <== NOT EXECUTED 52ea0: 11a0e00f movne lr, pc <== NOT EXECUTED 52ea4: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 52ea8: e3540000 cmp r4, #0 <== NOT EXECUTED 52eac: 0a000007 beq 52ed0 <_rename_r+0x234> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52eb0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52eb4: e3530000 cmp r3, #0 <== NOT EXECUTED 52eb8: 0a000004 beq 52ed0 <_rename_r+0x234> <== NOT EXECUTED 52ebc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52ec0: e3530000 cmp r3, #0 <== NOT EXECUTED 52ec4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52ec8: 11a0e00f movne lr, pc <== NOT EXECUTED 52ecc: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 52ed0: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52ed4: e3530000 cmp r3, #0 <== NOT EXECUTED 52ed8: 0a000004 beq 52ef0 <_rename_r+0x254> <== NOT EXECUTED 52edc: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52ee0: e3530000 cmp r3, #0 <== NOT EXECUTED 52ee4: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52ee8: 11a0e00f movne lr, pc <== NOT EXECUTED 52eec: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( result ); 52ef0: ebff9869 bl 3909c <__errno> <== NOT EXECUTED 52ef4: e5806000 str r6, [r0] <== NOT EXECUTED 52ef8: eaffffb9 b 52de4 <_rename_r+0x148> <== NOT EXECUTED /* * 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 ) { 52efc: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 52f00: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 52f04: e1520003 cmp r2, r3 <== NOT EXECUTED 52f08: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 52f0c: 0a00001b beq 52f80 <_rename_r+0x2e4> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 52f10: e3530000 cmp r3, #0 <== NOT EXECUTED 52f14: 0a000004 beq 52f2c <_rename_r+0x290> <== NOT EXECUTED 52f18: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f1c: e3530000 cmp r3, #0 <== NOT EXECUTED 52f20: 11a00005 movne r0, r5 <== NOT EXECUTED 52f24: 11a0e00f movne lr, pc <== NOT EXECUTED 52f28: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 52f2c: e3540000 cmp r4, #0 <== NOT EXECUTED 52f30: 0a000007 beq 52f54 <_rename_r+0x2b8> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52f34: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52f38: e3530000 cmp r3, #0 <== NOT EXECUTED 52f3c: 0a000004 beq 52f54 <_rename_r+0x2b8> <== NOT EXECUTED 52f40: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f44: e3530000 cmp r3, #0 <== NOT EXECUTED 52f48: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52f4c: 11a0e00f movne lr, pc <== NOT EXECUTED 52f50: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 52f54: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52f58: e3530000 cmp r3, #0 <== NOT EXECUTED 52f5c: 0a000004 beq 52f74 <_rename_r+0x2d8> <== NOT EXECUTED 52f60: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f64: e3530000 cmp r3, #0 <== NOT EXECUTED 52f68: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52f6c: 11a0e00f movne lr, pc <== NOT EXECUTED 52f70: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 52f74: ebff9848 bl 3909c <__errno> <== NOT EXECUTED 52f78: e3a03012 mov r3, #18 <== NOT EXECUTED 52f7c: ea00001b b 52ff0 <_rename_r+0x354> <== NOT EXECUTED } if ( !new_parent_loc.ops->rename_h ) { 52f80: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED 52f84: e35c0000 cmp ip, #0 <== NOT EXECUTED 52f88: 1a00001a bne 52ff8 <_rename_r+0x35c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 52f8c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52f90: e3530000 cmp r3, #0 <== NOT EXECUTED 52f94: 11a00005 movne r0, r5 <== NOT EXECUTED 52f98: 11a0e00f movne lr, pc <== NOT EXECUTED 52f9c: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 52fa0: e3540000 cmp r4, #0 <== NOT EXECUTED 52fa4: 0a000007 beq 52fc8 <_rename_r+0x32c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 52fa8: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 52fac: e3530000 cmp r3, #0 <== NOT EXECUTED 52fb0: 0a000004 beq 52fc8 <_rename_r+0x32c> <== NOT EXECUTED 52fb4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52fb8: e3530000 cmp r3, #0 <== NOT EXECUTED 52fbc: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 52fc0: 11a0e00f movne lr, pc <== NOT EXECUTED 52fc4: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 52fc8: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 52fcc: e3530000 cmp r3, #0 <== NOT EXECUTED 52fd0: 0a000004 beq 52fe8 <_rename_r+0x34c> <== NOT EXECUTED 52fd4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 52fd8: e3530000 cmp r3, #0 <== NOT EXECUTED 52fdc: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 52fe0: 11a0e00f movne lr, pc <== NOT EXECUTED 52fe4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 52fe8: ebff982b bl 3909c <__errno> <== NOT EXECUTED 52fec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 52ff0: e5803000 str r3, [r0] <== NOT EXECUTED 52ff4: eaffff7a b 52de4 <_rename_r+0x148> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 52ff8: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 52ffc: e28d0018 add r0, sp, #24 <== NOT EXECUTED 53000: e28d102c add r1, sp, #44 ; 0x2c <== NOT EXECUTED 53004: e1a02005 mov r2, r5 <== NOT EXECUTED 53008: e1a0e00f mov lr, pc <== NOT EXECUTED 5300c: e12fff1c bx ip <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 53010: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 53014: e3530000 cmp r3, #0 <== NOT EXECUTED 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 ); 53018: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 5301c: 0a000004 beq 53034 <_rename_r+0x398> <== NOT EXECUTED 53020: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 53024: e3530000 cmp r3, #0 <== NOT EXECUTED 53028: 11a00005 movne r0, r5 <== NOT EXECUTED 5302c: 11a0e00f movne lr, pc <== NOT EXECUTED 53030: 112fff13 bxne r3 <== NOT EXECUTED if ( free_old_parentloc ) 53034: e3540000 cmp r4, #0 <== NOT EXECUTED 53038: 0a000007 beq 5305c <_rename_r+0x3c0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5303c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 53040: e3530000 cmp r3, #0 <== NOT EXECUTED 53044: 0a000004 beq 5305c <_rename_r+0x3c0> <== NOT EXECUTED 53048: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5304c: e3530000 cmp r3, #0 <== NOT EXECUTED 53050: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 53054: 11a0e00f movne lr, pc <== NOT EXECUTED 53058: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 5305c: e59d3038 ldr r3, [sp, #56] ; 0x38 <== NOT EXECUTED 53060: e3530000 cmp r3, #0 <== NOT EXECUTED 53064: 0a000004 beq 5307c <_rename_r+0x3e0> <== NOT EXECUTED 53068: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 5306c: e3530000 cmp r3, #0 <== NOT EXECUTED 53070: 128d002c addne r0, sp, #44 ; 0x2c <== NOT EXECUTED 53074: 11a0e00f movne lr, pc <== NOT EXECUTED 53078: 112fff13 bxne r3 <== NOT EXECUTED return result; } 5307c: e1a00006 mov r0, r6 <== NOT EXECUTED 53080: e28dd044 add sp, sp, #68 ; 0x44 <== NOT EXECUTED 53084: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 53088: 000534b8 .word 0x000534b8 000068e8 <_stat_r>: struct _reent *ptr __attribute__((unused)), const char *path, struct stat *buf ) { return _STAT_NAME( path, buf ); 68e8: e1a00001 mov r0, r1 <== NOT EXECUTED 68ec: e1a01002 mov r1, r2 <== NOT EXECUTED 68f0: eaffffc4 b 6808 <== NOT EXECUTED 0000c388 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); c388: e1a00001 mov r0, r1 <== NOT EXECUTED c38c: eaffff5c b c104 <== NOT EXECUTED 000219bc : #include int chdir( const char *pathname ) { 219bc: e92d4030 push {r4, r5, lr} 219c0: e24dd018 sub sp, sp, #24 219c4: e1a05000 mov r5, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 219c8: eb00783e bl 3fac8 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 219cc: e28d4004 add r4, sp, #4 219d0: e3a0c001 mov ip, #1 pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); 219d4: e1a01000 mov r1, r0 /* * Get the node where we wish to go. */ result = rtems_filesystem_evaluate_path( 219d8: e1a0200c mov r2, ip 219dc: e1a00005 mov r0, r5 219e0: e1a03004 mov r3, r4 219e4: e58dc000 str ip, [sp] 219e8: ebff8dd3 bl 513c pathname, strlen( pathname ), RTEMS_LIBIO_PERMS_SEARCH, &loc, true ); if ( result != 0 ) 219ec: e3500000 cmp r0, #0 219f0: 1a00000b bne 21a24 /* * Verify you can change directory into this node. */ if ( !loc.ops->node_type_h ) { 219f4: e59d2010 ldr r2, [sp, #16] 219f8: e5923010 ldr r3, [r2, #16] 219fc: e3530000 cmp r3, #0 21a00: 1a000009 bne 21a2c rtems_filesystem_freenode( &loc ); 21a04: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21a08: e3530000 cmp r3, #0 <== NOT EXECUTED 21a0c: 11a00004 movne r0, r4 <== NOT EXECUTED 21a10: 11a0e00f movne lr, pc <== NOT EXECUTED 21a14: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21a18: eb005d9f bl 3909c <__errno> <== NOT EXECUTED 21a1c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21a20: e5803000 str r3, [r0] 21a24: e3e00000 mvn r0, #0 21a28: ea000022 b 21ab8 } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 21a2c: e1a00004 mov r0, r4 21a30: e1a0e00f mov lr, pc 21a34: e12fff13 bx r3 21a38: e3500001 cmp r0, #1 21a3c: 0a00000a beq 21a6c rtems_filesystem_freenode( &loc ); 21a40: e59d3010 ldr r3, [sp, #16] 21a44: e3530000 cmp r3, #0 21a48: 0a000004 beq 21a60 21a4c: e593301c ldr r3, [r3, #28] 21a50: e3530000 cmp r3, #0 21a54: 11a00004 movne r0, r4 21a58: 11a0e00f movne lr, pc 21a5c: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 21a60: eb005d8d bl 3909c <__errno> 21a64: e3a03014 mov r3, #20 21a68: eaffffec b 21a20 } rtems_filesystem_freenode( &rtems_filesystem_current ); 21a6c: e59f304c ldr r3, [pc, #76] ; 21ac0 21a70: e5930000 ldr r0, [r3] 21a74: e5903010 ldr r3, [r0, #16] 21a78: e3530000 cmp r3, #0 21a7c: 0a000004 beq 21a94 21a80: e593301c ldr r3, [r3, #28] 21a84: e3530000 cmp r3, #0 21a88: 12800004 addne r0, r0, #4 21a8c: 11a0e00f movne lr, pc 21a90: 112fff13 bxne r3 rtems_filesystem_current = loc; 21a94: e59f3024 ldr r3, [pc, #36] ; 21ac0 21a98: e28d4004 add r4, sp, #4 21a9c: e593c000 ldr ip, [r3] 21aa0: e8b4000f ldm r4!, {r0, r1, r2, r3} 21aa4: e28cc004 add ip, ip, #4 21aa8: e8ac000f stmia ip!, {r0, r1, r2, r3} 21aac: e5943000 ldr r3, [r4] 21ab0: e58c3000 str r3, [ip] 21ab4: e3a00000 mov r0, #0 return 0; } 21ab8: e28dd018 add sp, sp, #24 21abc: e8bd8030 pop {r4, r5, pc} 21ac0: 000534b8 .word 0x000534b8 00004e54 : int chmod( const char *path, mode_t mode ) { 4e54: e92d4070 push {r4, r5, r6, lr} 4e58: e24dd018 sub sp, sp, #24 4e5c: e1a05001 mov r5, r1 4e60: 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 ); 4e64: eb00eb17 bl 3fac8 4e68: e28d4004 add r4, sp, #4 4e6c: e1a01000 mov r1, r0 4e70: e3a0c001 mov ip, #1 4e74: e1a00006 mov r0, r6 4e78: e3a02000 mov r2, #0 4e7c: e1a03004 mov r3, r4 4e80: e58dc000 str ip, [sp] 4e84: eb0000ac bl 513c if ( status != 0 ) 4e88: e3500000 cmp r0, #0 4e8c: 1a00000d bne 4ec8 return -1; if ( !loc.handlers ){ 4e90: e59d300c ldr r3, [sp, #12] 4e94: e3530000 cmp r3, #0 4e98: 1a00000c bne 4ed0 rtems_filesystem_freenode( &loc ); 4e9c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4ea0: e3530000 cmp r3, #0 <== NOT EXECUTED 4ea4: 0a000004 beq 4ebc <== NOT EXECUTED 4ea8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4eac: e3530000 cmp r3, #0 <== NOT EXECUTED 4eb0: 11a00004 movne r0, r4 <== NOT EXECUTED 4eb4: 11a0e00f movne lr, pc <== NOT EXECUTED 4eb8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EBADF ); 4ebc: eb00d076 bl 3909c <__errno> <== NOT EXECUTED 4ec0: e3a03009 mov r3, #9 <== NOT EXECUTED 4ec4: e5803000 str r3, [r0] <== NOT EXECUTED 4ec8: e3e05000 mvn r5, #0 4ecc: ea00001a b 4f3c } if ( !loc.handlers->fchmod_h ){ 4ed0: e593301c ldr r3, [r3, #28] 4ed4: e3530000 cmp r3, #0 4ed8: 1a00000a bne 4f08 rtems_filesystem_freenode( &loc ); 4edc: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 4ee0: e3530000 cmp r3, #0 <== NOT EXECUTED 4ee4: 0a000004 beq 4efc <== NOT EXECUTED 4ee8: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 4eec: e3530000 cmp r3, #0 <== NOT EXECUTED 4ef0: 11a00004 movne r0, r4 <== NOT EXECUTED 4ef4: 11a0e00f movne lr, pc <== NOT EXECUTED 4ef8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 4efc: eb00d066 bl 3909c <__errno> <== NOT EXECUTED 4f00: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4f04: eaffffee b 4ec4 <== NOT EXECUTED } result = (*loc.handlers->fchmod_h)( &loc, mode ); 4f08: e1a01005 mov r1, r5 4f0c: e1a00004 mov r0, r4 4f10: e1a0e00f mov lr, pc 4f14: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 4f18: e59d3010 ldr r3, [sp, #16] 4f1c: 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 ); 4f20: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 4f24: 0a000004 beq 4f3c 4f28: e593301c ldr r3, [r3, #28] 4f2c: e3530000 cmp r3, #0 4f30: 11a00004 movne r0, r4 4f34: 11a0e00f movne lr, pc 4f38: 112fff13 bxne r3 return result; } 4f3c: e1a00005 mov r0, r5 4f40: e28dd018 add sp, sp, #24 4f44: e8bd8070 pop {r4, r5, r6, pc} 00021ac4 : int chown( const char *path, uid_t owner, gid_t group ) { 21ac4: e92d40f0 push {r4, r5, r6, r7, lr} 21ac8: e1a01801 lsl r1, r1, #16 21acc: e24dd018 sub sp, sp, #24 21ad0: e1a02802 lsl r2, r2, #16 21ad4: e1a06821 lsr r6, r1, #16 21ad8: e1a05822 lsr r5, r2, #16 21adc: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &loc, true ) ) 21ae0: eb0077f8 bl 3fac8 21ae4: e28d4004 add r4, sp, #4 21ae8: e1a01000 mov r1, r0 21aec: e3a0c001 mov ip, #1 21af0: e1a00007 mov r0, r7 21af4: e3a02000 mov r2, #0 21af8: e1a03004 mov r3, r4 21afc: e58dc000 str ip, [sp] 21b00: ebff8d8d bl 513c 21b04: e3500000 cmp r0, #0 21b08: 1a00000b bne 21b3c return -1; if ( !loc.ops->chown_h ) { 21b0c: e59d2010 ldr r2, [sp, #16] 21b10: e5923018 ldr r3, [r2, #24] 21b14: e3530000 cmp r3, #0 21b18: 1a000009 bne 21b44 rtems_filesystem_freenode( &loc ); 21b1c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 21b20: e3530000 cmp r3, #0 <== NOT EXECUTED 21b24: 11a00004 movne r0, r4 <== NOT EXECUTED 21b28: 11a0e00f movne lr, pc <== NOT EXECUTED 21b2c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21b30: eb005d59 bl 3909c <__errno> <== NOT EXECUTED 21b34: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21b38: e5803000 str r3, [r0] <== NOT EXECUTED 21b3c: e3e05000 mvn r5, #0 21b40: ea00000d b 21b7c } result = (*loc.ops->chown_h)( &loc, owner, group ); 21b44: e1a02005 mov r2, r5 21b48: e1a01006 mov r1, r6 21b4c: e1a00004 mov r0, r4 21b50: e1a0e00f mov lr, pc 21b54: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 21b58: e59d3010 ldr r3, [sp, #16] 21b5c: 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 ); 21b60: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 21b64: 0a000004 beq 21b7c 21b68: e593301c ldr r3, [r3, #28] 21b6c: e3530000 cmp r3, #0 21b70: 11a00004 movne r0, r4 21b74: 11a0e00f movne lr, pc 21b78: 112fff13 bxne r3 return result; } 21b7c: e1a00005 mov r0, r5 21b80: e28dd018 add sp, sp, #24 21b84: e8bd80f0 pop {r4, r5, r6, r7, pc} 00021b88 : #include int chroot( const char *pathname ) { 21b88: 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) { 21b8c: e59f50d4 ldr r5, [pc, #212] ; 21c68 21b90: e59f30d4 ldr r3, [pc, #212] ; 21c6c 21b94: e5954000 ldr r4, [r5] 21b98: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 21b9c: e24dd018 sub sp, sp, #24 21ba0: 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) { 21ba4: 1a000007 bne 21bc8 rtems_libio_set_private_env(); /* try to set a new private env*/ 21ba8: eb0005dc bl 23320 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 21bac: e5953000 ldr r3, [r5] 21bb0: e1530004 cmp r3, r4 21bb4: 1a000003 bne 21bc8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 21bb8: eb005d37 bl 3909c <__errno> <== NOT EXECUTED 21bbc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21bc0: e5803000 str r3, [r0] <== NOT EXECUTED 21bc4: ea000008 b 21bec <== NOT EXECUTED } result = chdir(pathname); 21bc8: e1a00006 mov r0, r6 21bcc: ebffff7a bl 219bc if (result) { 21bd0: e250c000 subs ip, r0, #0 21bd4: 0a000006 beq 21bf4 rtems_set_errno_and_return_minus_one( errno ); 21bd8: eb005d2f bl 3909c <__errno> <== NOT EXECUTED 21bdc: e1a04000 mov r4, r0 <== NOT EXECUTED 21be0: eb005d2d bl 3909c <__errno> <== NOT EXECUTED 21be4: e5903000 ldr r3, [r0] <== NOT EXECUTED 21be8: e5843000 str r3, [r4] <== NOT EXECUTED 21bec: e3e00000 mvn r0, #0 <== NOT EXECUTED 21bf0: ea00001a b 21c60 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 21bf4: e1a0200c mov r2, ip 21bf8: e59f0070 ldr r0, [pc, #112] ; 21c70 21bfc: e3a01001 mov r1, #1 21c00: e28d3004 add r3, sp, #4 21c04: e58dc000 str ip, [sp] 21c08: ebff8d4b bl 513c 21c0c: e3500000 cmp r0, #0 21c10: 1afffff0 bne 21bd8 /* 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); 21c14: e59f304c ldr r3, [pc, #76] ; 21c68 21c18: e5930000 ldr r0, [r3] 21c1c: e5903024 ldr r3, [r0, #36] ; 0x24 21c20: e3530000 cmp r3, #0 21c24: 0a000004 beq 21c3c 21c28: e593301c ldr r3, [r3, #28] 21c2c: e3530000 cmp r3, #0 21c30: 12800018 addne r0, r0, #24 21c34: 11a0e00f movne lr, pc 21c38: 112fff13 bxne r3 rtems_filesystem_root = loc; 21c3c: e59f3024 ldr r3, [pc, #36] ; 21c68 21c40: e28d4004 add r4, sp, #4 21c44: e593c000 ldr ip, [r3] 21c48: e8b4000f ldm r4!, {r0, r1, r2, r3} 21c4c: e28cc018 add ip, ip, #24 21c50: e8ac000f stmia ip!, {r0, r1, r2, r3} 21c54: e5943000 ldr r3, [r4] 21c58: e58c3000 str r3, [ip] 21c5c: e3a00000 mov r0, #0 return 0; } 21c60: e28dd018 add sp, sp, #24 21c64: e8bd8070 pop {r4, r5, r6, pc} 21c68: 000534b8 .word 0x000534b8 21c6c: 00060cc0 .word 0x00060cc0 21c70: 00058c75 .word 0x00058c75 000076a0 : const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 76a0: 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; 76a4: e5935000 ldr r5, [r3] if (!device_name_table) 76a8: e3550000 cmp r5, #0 const char *pathname, int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 76ac: e1a04003 mov r4, r3 76b0: e1a09000 mov r9, r0 76b4: 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) 76b8: 13a06000 movne r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 76bc: 159fa090 ldrne sl, [pc, #144] ; 7754 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) 76c0: 1a000019 bne 772c rtems_set_errno_and_return_minus_one( EFAULT ); 76c4: eb000b5e bl a444 <__errno> <== NOT EXECUTED 76c8: e3a0300e mov r3, #14 <== NOT EXECUTED 76cc: e5803000 str r3, [r0] <== NOT EXECUTED 76d0: e3e00000 mvn r0, #0 <== NOT EXECUTED 76d4: 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) 76d8: e5957000 ldr r7, [r5] 76dc: e2571000 subs r1, r7, #0 76e0: 0a00000f beq 7724 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 76e4: eb000f0c bl b31c 76e8: e3500000 cmp r0, #0 76ec: 1a00000c bne 7724 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 76f0: e7d70008 ldrb r0, [r7, r8] 76f4: e3500000 cmp r0, #0 76f8: 1a000009 bne 7724 /* 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; 76fc: e59f3054 ldr r3, [pc, #84] ; 7758 7700: e5933000 ldr r3, [r3] 7704: e5933028 ldr r3, [r3, #40] ; 0x28 7708: 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; 770c: e59f3048 ldr r3, [pc, #72] ; 775c 7710: e5843008 str r3, [r4, #8] pathloc->ops = &devFS_ops; 7714: e59f3044 ldr r3, [pc, #68] ; 7760 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 7718: e5845000 str r5, [r4] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; 771c: e584300c str r3, [r4, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; 7720: 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++) { 7724: e2866001 add r6, r6, #1 7728: e2855014 add r5, r5, #20 772c: e59a3000 ldr r3, [sl] 7730: e1560003 cmp r6, r3 if (!device_name_table[i].device_name) continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 7734: e1a00009 mov r0, r9 7738: 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++) { 773c: 3affffe5 bcc 76d8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 7740: eb000b3f bl a444 <__errno> 7744: e3a03002 mov r3, #2 7748: e5803000 str r3, [r0] 774c: e3e00000 mvn r0, #0 } 7750: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 7754: 0000d0c4 .word 0x0000d0c4 7758: 0000d2ac .word 0x0000d2ac 775c: 0000d218 .word 0x0000d218 7760: 0000d250 .word 0x0000d250 00000b60 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b60: 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( b64: e59f7058 ldr r7, [pc, #88] ; bc4 b68: e5973000 ldr r3, [r7] b6c: e3a06014 mov r6, #20 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { b70: 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( b74: e0000396 mul r0, r6, r3 b78: eb00199c bl 71f0 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) b7c: e2505000 subs r5, r0, #0 b80: 1a000004 bne b98 rtems_set_errno_and_return_minus_one( ENOMEM ); b84: eb00262e bl a444 <__errno> <== NOT EXECUTED b88: e3a0300c mov r3, #12 <== NOT EXECUTED b8c: e5803000 str r3, [r0] <== NOT EXECUTED b90: e3e00000 mvn r0, #0 <== NOT EXECUTED b94: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( b98: e5972000 ldr r2, [r7] b9c: e3a01000 mov r1, #0 ba0: e0020296 mul r2, r6, r2 ba4: eb002854 bl acfc 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; ba8: e59f3018 ldr r3, [pc, #24] ; bc8 temp_mt_entry->mt_fs_root.ops = &devFS_ops; bac: 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; bb0: 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; bb4: 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; bb8: 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; bbc: e3a00000 mov r0, #0 return 0; } bc0: e8bd80f0 pop {r4, r5, r6, r7, pc} bc4: 0000d0c4 .word 0x0000d0c4 bc8: 0000d218 .word 0x0000d218 00000bcc : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { bcc: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} bd0: 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') && bd4: e5d00000 ldrb r0, [r0] bd8: e3500064 cmp r0, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { bdc: e1a05001 mov r5, r1 be0: e58d2000 str r2, [sp] be4: 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') && be8: 1a000008 bne c10 bec: e5d43001 ldrb r3, [r4, #1] bf0: e3530065 cmp r3, #101 ; 0x65 bf4: 1a000005 bne c10 (path[2] == 'v') && (path[3] == '\0')) bf8: e5d43002 ldrb r3, [r4, #2] bfc: e3530076 cmp r3, #118 ; 0x76 c00: 1a000002 bne c10 c04: e5d40003 ldrb r0, [r4, #3] c08: e3500000 cmp r0, #0 c0c: 0a000039 beq cf8 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) c10: e205aa0f and sl, r5, #61440 ; 0xf000 c14: e35a0a02 cmp sl, #8192 ; 0x2000 c18: 135a0a06 cmpne sl, #24576 ; 0x6000 c1c: 03a0a000 moveq sl, #0 c20: 13a0a001 movne sl, #1 c24: 0a000002 beq c34 rtems_set_errno_and_return_minus_one( EINVAL ); c28: eb002605 bl a444 <__errno> <== NOT EXECUTED c2c: e3a03016 mov r3, #22 <== NOT EXECUTED c30: ea000008 b c58 <== 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; c34: e59d3028 ldr r3, [sp, #40] ; 0x28 c38: e5936000 ldr r6, [r3] if (!device_name_table) c3c: e3560000 cmp r6, #0 c40: 13e07000 mvnne r7, #0 c44: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ c48: 159fb0ac ldrne fp, [pc, #172] ; cfc c4c: 1a000010 bne c94 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 ); c50: eb0025fb bl a444 <__errno> <== NOT EXECUTED c54: e3a0300e mov r3, #14 <== NOT EXECUTED c58: e5803000 str r3, [r0] <== NOT EXECUTED c5c: e3e00000 mvn r0, #0 <== NOT EXECUTED c60: ea000024 b cf8 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) c64: e796300a ldr r3, [r6, sl] c68: e2531000 subs r1, r3, #0 c6c: 0a000005 beq c88 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) c70: eb0028c9 bl af9c <== NOT EXECUTED c74: e3500000 cmp r0, #0 <== NOT EXECUTED c78: 1a000003 bne c8c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); c7c: eb0025f0 bl a444 <__errno> <== NOT EXECUTED c80: e3a03011 mov r3, #17 <== NOT EXECUTED c84: eafffff3 b c58 <== NOT EXECUTED c88: 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++){ c8c: e2888001 add r8, r8, #1 c90: e28aa014 add sl, sl, #20 c94: e59b3000 ldr r3, [fp] c98: 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) c9c: 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++){ ca0: 3affffef bcc c64 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) ca4: e3770001 cmn r7, #1 ca8: 1a000004 bne cc0 rtems_set_errno_and_return_minus_one( ENOMEM ); cac: eb0025e4 bl a444 <__errno> <== NOT EXECUTED cb0: e3a0300c mov r3, #12 <== NOT EXECUTED cb4: e5803000 str r3, [r0] <== NOT EXECUTED cb8: e1a00007 mov r0, r7 <== NOT EXECUTED cbc: ea00000d b cf8 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( cc0: e10f8000 mrs r8, CPSR cc4: e3883080 orr r3, r8, #128 ; 0x80 cc8: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; ccc: e3a02014 mov r2, #20 cd0: e0030792 mul r3, r2, r7 device_name_table[slot].device_name_length = strlen(path); cd4: 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; cd8: e7864003 str r4, [r6, r3] cdc: e0866003 add r6, r6, r3 device_name_table[slot].device_name_length = strlen(path); ce0: eb002975 bl b2bc device_name_table[slot].major = major; ce4: e59d3000 ldr r3, [sp] device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; ce8: 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); cec: e9860209 stmib r6, {r0, r3, r9} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( cf0: e129f008 msr CPSR_fc, r8 cf4: e3a00000 mov r0, #0 device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; _ISR_Enable(level); return 0; } cf8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} cfc: 0000d0c4 .word 0x0000d0c4 00000d7c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { d7c: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED d80: e1a03000 mov r3, r0 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d84: 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; d88: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; d8c: e3a02000 mov r2, #0 <== NOT EXECUTED d90: e58d2018 str r2, [sp, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; d94: 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; d98: e5932038 ldr r2, [r3, #56] ; 0x38 <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; d9c: e283c00c add ip, r3, #12 <== NOT EXECUTED da0: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; da4: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( da8: e2820008 add r0, r2, #8 <== NOT EXECUTED dac: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED db0: 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; db4: 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; db8: e58d3000 str r3, [sp] <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( dbc: eb000ed4 bl 4914 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) dc0: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; dc4: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); dc8: 1b001a65 blne 7764 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } dcc: e28dd01c add sp, sp, #28 <== NOT EXECUTED dd0: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00000dd4 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; dd4: e5903000 ldr r3, [r0] if (!the_dev) dd8: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { ddc: 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) de0: 1a000004 bne df8 rtems_set_errno_and_return_minus_one( EFAULT ); de4: eb002596 bl a444 <__errno> <== NOT EXECUTED de8: e3a0300e mov r3, #14 <== NOT EXECUTED dec: e5803000 str r3, [r0] <== NOT EXECUTED df0: e3e00000 mvn r0, #0 <== NOT EXECUTED df4: 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; df8: 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 ); dfc: e593200c ldr r2, [r3, #12] rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; e00: e5933008 ldr r3, [r3, #8] buf->st_mode = the_dev->mode; e04: 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 ); e08: e5813018 str r3, [r1, #24] e0c: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; e10: e3a00000 mov r0, #0 return 0; } e14: e49df004 pop {pc} ; (ldr pc, [sp], #4) 0000a7ac : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { a7ac: 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; a7b0: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a7b4: e280c00c add ip, r0, #12 <== NOT EXECUTED a7b8: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; a7bc: e58d3014 str r3, [sp, #20] <== NOT EXECUTED IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; a7c0: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a7c4: e3a03000 mov r3, #0 <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; a7c8: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; args.bytes_moved = 0; a7cc: e58d3018 str r3, [sp, #24] <== NOT EXECUTED the_jnode = iop->file_info; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; a7d0: e58d100c str r1, [sp, #12] <== NOT EXECUTED rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; args.iop = iop; a7d4: 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; a7d8: 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( a7dc: e1a0200d mov r2, sp <== NOT EXECUTED a7e0: e2830050 add r0, r3, #80 ; 0x50 <== NOT EXECUTED a7e4: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED a7e8: eb000513 bl bc3c <== NOT EXECUTED the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a7ec: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a7f0: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED the_jnode->info.device.minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); a7f4: 1b00062e blne c0b4 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } a7f8: e28dd01c add sp, sp, #28 <== NOT EXECUTED a7fc: e8bd8800 pop {fp, pc} <== NOT EXECUTED 00002b54 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b54: e59030b4 ldr r3, [r0, #180] ; 0xb4 2b58: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2b5c: e92d4030 push {r4, r5, lr} 2b60: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b64: 08bd8030 popeq {r4, r5, pc} static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2b68: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2b6c: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2b70: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED rtems_interrupt_disable (level); while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2b74: 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) { 2b78: ea00000a b 2ba8 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2b7c: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b80: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 2b84: e3a01000 mov r1, #0 <== NOT EXECUTED 2b88: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2b8c: e1a02001 mov r2, r1 <== NOT EXECUTED 2b90: eb0005af bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2b94: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2b98: 1b000741 blne 48a4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2b9c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2ba0: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2ba4: 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) { 2ba8: e5941084 ldr r1, [r4, #132] ; 0x84 <== NOT EXECUTED 2bac: e5942080 ldr r2, [r4, #128] ; 0x80 <== NOT EXECUTED 2bb0: e1510002 cmp r1, r2 <== NOT EXECUTED 2bb4: 1afffff0 bne 2b7c <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2bb8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2bbc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 00001f38 : int dup2( int fildes, int fildes2 ) { 1f38: e92d4070 push {r4, r5, r6, lr} 1f3c: e24dd048 sub sp, sp, #72 ; 0x48 1f40: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f44: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { 1f48: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f4c: eb00019b bl 25c0 if ( status == -1 ) 1f50: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); 1f54: e1a0500d mov r5, sp if ( status == -1 ) 1f58: 0a000009 beq 1f84 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); 1f5c: e1a0100d mov r1, sp 1f60: e1a00004 mov r0, r4 1f64: eb000195 bl 25c0 if ( status == -1 ) 1f68: e3700001 cmn r0, #1 1f6c: 0a000004 beq 1f84 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); 1f70: e1a00006 mov r0, r6 <== NOT EXECUTED 1f74: e1a02004 mov r2, r4 <== NOT EXECUTED 1f78: e3a01000 mov r1, #0 <== NOT EXECUTED 1f7c: eb00008d bl 21b8 <== NOT EXECUTED 1f80: ea000000 b 1f88 <== NOT EXECUTED 1f84: e3e00000 mvn r0, #0 } 1f88: e28dd048 add sp, sp, #72 ; 0x48 1f8c: e8bd8070 pop {r4, r5, r6, pc} 00002654 : * 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')) { 2654: e591303c ldr r3, [r1, #60] ; 0x3c <== NOT EXECUTED 2658: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Echo a typed character */ static void echo (unsigned char c, struct rtems_termios_tty *tty) { 265c: e92d4011 push {r0, r4, lr} <== NOT EXECUTED 2660: e1a04001 mov r4, r1 <== NOT EXECUTED 2664: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED if ((tty->termios.c_lflag & ECHOCTL) && iscntrl(c) && (c != '\t') && (c != '\n')) { 2668: 0a000015 beq 26c4 <== NOT EXECUTED 266c: e59f305c ldr r3, [pc, #92] ; 26d0 <== NOT EXECUTED 2670: e5933000 ldr r3, [r3] <== NOT EXECUTED 2674: e0833000 add r3, r3, r0 <== NOT EXECUTED 2678: e5d32001 ldrb r2, [r3, #1] <== NOT EXECUTED 267c: e2503009 subs r3, r0, #9 <== NOT EXECUTED 2680: 13a03001 movne r3, #1 <== NOT EXECUTED 2684: e01332a2 ands r3, r3, r2, lsr #5 <== NOT EXECUTED 2688: 0a00000d beq 26c4 <== NOT EXECUTED 268c: e350000a cmp r0, #10 <== NOT EXECUTED 2690: 0a00000b beq 26c4 <== NOT EXECUTED char echobuf[2]; echobuf[0] = '^'; echobuf[1] = c ^ 0x40; 2694: 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] = '^'; 2698: e3a0c05e mov ip, #94 ; 0x5e <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 269c: e1a0000d mov r0, sp <== NOT EXECUTED 26a0: e3a01002 mov r1, #2 <== NOT EXECUTED 26a4: 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; 26a8: 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] = '^'; 26ac: e5cdc000 strb ip, [sp] <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); 26b0: ebffff4d bl 23ec <== NOT EXECUTED tty->column += 2; 26b4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 26b8: e2833002 add r3, r3, #2 <== NOT EXECUTED 26bc: 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')) { 26c0: ea000001 b 26cc <== NOT EXECUTED echobuf[1] = c ^ 0x40; rtems_termios_puts (echobuf, 2, tty); tty->column += 2; } else { oproc (c, tty); 26c4: e1a01004 mov r1, r4 <== NOT EXECUTED 26c8: ebffff8b bl 24fc <== NOT EXECUTED } } 26cc: e8bd8018 pop {r3, r4, pc} <== NOT EXECUTED 26d0: 000185e0 .word 0x000185e0 0002222c : group_fp = fopen("/etc/group", "r"); } void endgrent(void) { if (group_fp != NULL) 2222c: e59f300c ldr r3, [pc, #12] ; 22240 <== NOT EXECUTED 22230: e5930000 ldr r0, [r3] <== NOT EXECUTED 22234: e3500000 cmp r0, #0 <== NOT EXECUTED 22238: 012fff1e bxeq lr <== NOT EXECUTED fclose(group_fp); 2223c: ea005be3 b 391d0 <== NOT EXECUTED 22240: 00060978 .word 0x00060978 00022244 : passwd_fp = fopen("/etc/passwd", "r"); } void endpwent(void) { if (passwd_fp != NULL) 22244: e59f300c ldr r3, [pc, #12] ; 22258 <== NOT EXECUTED 22248: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 2224c: e3500000 cmp r0, #0 <== NOT EXECUTED 22250: 012fff1e bxeq lr <== NOT EXECUTED fclose(passwd_fp); 22254: ea005bdd b 391d0 <== NOT EXECUTED 22258: 00060978 .word 0x00060978 000026d4 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 26d4: e5903020 ldr r3, [r0, #32] <== NOT EXECUTED 26d8: 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) { 26dc: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED 26e0: e1a04000 mov r4, r0 <== NOT EXECUTED 26e4: e1a07001 mov r7, r1 <== NOT EXECUTED if (tty->ccount == 0) 26e8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED return; if (lineFlag) { 26ec: e3510000 cmp r1, #0 <== NOT EXECUTED 26f0: 0a000062 beq 2880 <== NOT EXECUTED if (!(tty->termios.c_lflag & ECHO)) { 26f4: e590303c ldr r3, [r0, #60] ; 0x3c <== NOT EXECUTED 26f8: e2132008 ands r2, r3, #8 <== NOT EXECUTED tty->ccount = 0; 26fc: 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)) { 2700: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 2704: e2133010 ands r3, r3, #16 <== NOT EXECUTED 2708: 1a00005c bne 2880 <== NOT EXECUTED tty->ccount = 0; 270c: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 2710: e1a01004 mov r1, r4 <== NOT EXECUTED 2714: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 2718: ebffffcd bl 2654 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 271c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2720: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 2724: 11a01004 movne r1, r4 <== NOT EXECUTED 2728: 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) 272c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2730: ea00000c b 2768 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2734: e2411001 sub r1, r1, #1 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2738: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 273c: e5841020 str r1, [r4, #32] <== NOT EXECUTED 2740: e594201c ldr r2, [r4, #28] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 2744: e3130008 tst r3, #8 <== NOT EXECUTED echo ('\n', tty); return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 2748: e7d25001 ldrb r5, [r2, r1] <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) { 274c: 0a000048 beq 2874 <== NOT EXECUTED if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 2750: e3570000 cmp r7, #0 <== NOT EXECUTED 2754: 1a000005 bne 2770 <== NOT EXECUTED 2758: e3130010 tst r3, #16 <== NOT EXECUTED 275c: 1a000003 bne 2770 <== NOT EXECUTED echo (tty->termios.c_cc[VERASE], tty); 2760: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 2764: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 2768: 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); 276c: eaffffb8 b 2654 <== NOT EXECUTED } else if (c == '\t') { 2770: e3550009 cmp r5, #9 <== NOT EXECUTED 2774: 1a000020 bne 27fc <== NOT EXECUTED c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 2778: 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; 277c: 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)) { 2780: e596c000 ldr ip, [r6] <== NOT EXECUTED 2784: e3a02000 mov r2, #0 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 2788: ea00000d b 27c4 <== NOT EXECUTED c = tty->cbuf[i++]; 278c: e594001c ldr r0, [r4, #28] <== NOT EXECUTED 2790: e7d00002 ldrb r0, [r0, r2] <== NOT EXECUTED if (c == '\t') { 2794: e3500009 cmp r0, #9 <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 2798: 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; 279c: 03855007 orreq r5, r5, #7 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 27a0: 0a000005 beq 27bc <== NOT EXECUTED col = (col | 7) + 1; } else if (iscntrl (c)) { 27a4: e5d80001 ldrb r0, [r8, #1] <== NOT EXECUTED 27a8: e3100020 tst r0, #32 <== NOT EXECUTED 27ac: 0a000002 beq 27bc <== NOT EXECUTED if (tty->termios.c_lflag & ECHOCTL) 27b0: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 27b4: 12855002 addne r5, r5, #2 <== NOT EXECUTED 27b8: ea000000 b 27c0 <== NOT EXECUTED } else { col++; 27bc: e2855001 add r5, r5, #1 <== NOT EXECUTED /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 27c0: e2822001 add r2, r2, #1 <== NOT EXECUTED int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 27c4: e1520001 cmp r2, r1 <== NOT EXECUTED 27c8: 1affffef bne 278c <== NOT EXECUTED 27cc: ea000006 b 27ec <== NOT EXECUTED /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 27d0: e59f00bc ldr r0, [pc, #188] ; 2894 <== NOT EXECUTED 27d4: e3a01001 mov r1, #1 <== NOT EXECUTED 27d8: e1a02004 mov r2, r4 <== NOT EXECUTED 27dc: ebffff02 bl 23ec <== NOT EXECUTED tty->column--; 27e0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27e4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 27e8: e5843028 str r3, [r4, #40] ; 0x28 <== NOT EXECUTED } /* * Back up over the tab */ while (tty->column > col) { 27ec: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 27f0: e1530005 cmp r3, r5 <== NOT EXECUTED 27f4: cafffff5 bgt 27d0 <== NOT EXECUTED 27f8: ea00001d b 2874 <== NOT EXECUTED rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 27fc: e5962000 ldr r2, [r6] <== NOT EXECUTED 2800: e2855001 add r5, r5, #1 <== NOT EXECUTED 2804: e7d22005 ldrb r2, [r2, r5] <== NOT EXECUTED 2808: e3120020 tst r2, #32 <== NOT EXECUTED 280c: 0a000009 beq 2838 <== NOT EXECUTED 2810: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2814: 0a000007 beq 2838 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2818: e59f0078 ldr r0, [pc, #120] ; 2898 <== NOT EXECUTED 281c: e3a01003 mov r1, #3 <== NOT EXECUTED 2820: e1a02004 mov r2, r4 <== NOT EXECUTED 2824: ebfffef0 bl 23ec <== NOT EXECUTED if (tty->column) 2828: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 282c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 2830: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2834: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 2838: e5963000 ldr r3, [r6] <== NOT EXECUTED 283c: e7d33005 ldrb r3, [r3, r5] <== NOT EXECUTED 2840: e3130020 tst r3, #32 <== NOT EXECUTED 2844: 0a000002 beq 2854 <== NOT EXECUTED 2848: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 284c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 2850: 0a000007 beq 2874 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 2854: e59f003c ldr r0, [pc, #60] ; 2898 <== NOT EXECUTED 2858: e3a01003 mov r1, #3 <== NOT EXECUTED 285c: e1a02004 mov r2, r4 <== NOT EXECUTED 2860: ebfffee1 bl 23ec <== NOT EXECUTED if (tty->column) 2864: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 2868: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 286c: 12433001 subne r3, r3, #1 <== NOT EXECUTED 2870: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } } } if (!lineFlag) 2874: e3570000 cmp r7, #0 <== NOT EXECUTED 2878: 1a000001 bne 2884 <== NOT EXECUTED 287c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2880: e59f6014 ldr r6, [pc, #20] ; 289c <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) echo ('\n', tty); return; } } while (tty->ccount) { 2884: e5941020 ldr r1, [r4, #32] <== NOT EXECUTED 2888: e3510000 cmp r1, #0 <== NOT EXECUTED 288c: 1affffa8 bne 2734 <== NOT EXECUTED 2890: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 2894: 000194e3 .word 0x000194e3 2898: 000194e1 .word 0x000194e1 289c: 000185e0 .word 0x000185e0 00033498 : #include int fchdir( int fd ) { 33498: e92d40f0 push {r4, r5, r6, r7, lr} <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 3349c: e59f315c ldr r3, [pc, #348] ; 33600 <== NOT EXECUTED 334a0: e5933000 ldr r3, [r3] <== NOT EXECUTED 334a4: e1500003 cmp r0, r3 <== NOT EXECUTED #include int fchdir( int fd ) { 334a8: e24dd02c sub sp, sp, #44 ; 0x2c <== NOT EXECUTED rtems_libio_t *iop; rtems_filesystem_location_info_t loc, saved; rtems_libio_check_fd( fd ); 334ac: 2a000005 bcs 334c8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 334b0: e59f314c ldr r3, [pc, #332] ; 33604 <== NOT EXECUTED 334b4: e5934000 ldr r4, [r3] <== NOT EXECUTED 334b8: e0844300 add r4, r4, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 334bc: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED 334c0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 334c4: 1a000002 bne 334d4 <== NOT EXECUTED 334c8: eb0016f3 bl 3909c <__errno> <== NOT EXECUTED 334cc: e3a03009 mov r3, #9 <== NOT EXECUTED 334d0: ea000016 b 33530 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 334d4: e3130002 tst r3, #2 <== NOT EXECUTED 334d8: 1a000002 bne 334e8 <== NOT EXECUTED 334dc: eb0016ee bl 3909c <__errno> <== NOT EXECUTED 334e0: e3a03016 mov r3, #22 <== NOT EXECUTED 334e4: ea000011 b 33530 <== NOT EXECUTED /* * Verify you can change directory into this node. */ if ( !iop->pathinfo.ops ) { 334e8: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 334ec: e3530000 cmp r3, #0 <== NOT EXECUTED 334f0: 0a000002 beq 33500 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( !iop->pathinfo.ops->node_type_h ) { 334f4: e5933010 ldr r3, [r3, #16] <== NOT EXECUTED 334f8: e3530000 cmp r3, #0 <== NOT EXECUTED 334fc: 1a000002 bne 3350c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 33500: eb0016e5 bl 3909c <__errno> <== NOT EXECUTED 33504: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 33508: ea000008 b 33530 <== NOT EXECUTED } if ( (*iop->pathinfo.ops->node_type_h)( &iop->pathinfo ) != 3350c: e2844018 add r4, r4, #24 <== NOT EXECUTED 33510: e1a00004 mov r0, r4 <== NOT EXECUTED 33514: e1a0e00f mov lr, pc <== NOT EXECUTED 33518: e12fff13 bx r3 <== NOT EXECUTED 3351c: e3500001 cmp r0, #1 <== NOT EXECUTED 33520: e1a06000 mov r6, r0 <== NOT EXECUTED 33524: 0a000003 beq 33538 <== NOT EXECUTED RTEMS_FILESYSTEM_DIRECTORY ) { rtems_set_errno_and_return_minus_one( ENOTDIR ); 33528: eb0016db bl 3909c <__errno> <== NOT EXECUTED 3352c: e3a03014 mov r3, #20 <== NOT EXECUTED 33530: e5803000 str r3, [r0] <== NOT EXECUTED 33534: ea00001c b 335ac <== NOT EXECUTED * but note the race condition. Threads who * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; 33538: e59f50c8 ldr r5, [pc, #200] ; 33608 <== NOT EXECUTED 3353c: e5957000 ldr r7, [r5] <== NOT EXECUTED 33540: e287c004 add ip, r7, #4 <== NOT EXECUTED 33544: e8bc000f ldm ip!, {r0, r1, r2, r3} <== NOT EXECUTED 33548: e28de004 add lr, sp, #4 <== NOT EXECUTED 3354c: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 33550: e59c3000 ldr r3, [ip] <== NOT EXECUTED 33554: e58e3000 str r3, [lr] <== NOT EXECUTED rtems_filesystem_current = iop->pathinfo; 33558: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3355c: e287e004 add lr, r7, #4 <== NOT EXECUTED 33560: e8ae000f stmia lr!, {r0, r1, r2, r3} <== NOT EXECUTED 33564: e5943000 ldr r3, [r4] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 33568: e3a0e000 mov lr, #0 <== NOT EXECUTED * share their rtems_filesystem_current better * be synchronized! */ saved = rtems_filesystem_current; rtems_filesystem_current = iop->pathinfo; 3356c: e58c3000 str r3, [ip] <== NOT EXECUTED /* clone the current node */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 33570: e1a01006 mov r1, r6 <== NOT EXECUTED 33574: e1a0200e mov r2, lr <== NOT EXECUTED 33578: e59f008c ldr r0, [pc, #140] ; 3360c <== NOT EXECUTED 3357c: e28d3018 add r3, sp, #24 <== NOT EXECUTED 33580: e58de000 str lr, [sp] <== NOT EXECUTED 33584: ebff46ec bl 513c <== NOT EXECUTED 33588: e3500000 cmp r0, #0 <== NOT EXECUTED 3358c: 0a000008 beq 335b4 <== NOT EXECUTED /* cloning failed; restore original and bail out */ rtems_filesystem_current = saved; 33590: e595c000 ldr ip, [r5] <== NOT EXECUTED 33594: e28d4004 add r4, sp, #4 <== NOT EXECUTED 33598: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 3359c: e28cc004 add ip, ip, #4 <== NOT EXECUTED 335a0: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 335a4: e5943000 ldr r3, [r4] <== NOT EXECUTED 335a8: e58c3000 str r3, [ip] <== NOT EXECUTED 335ac: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 335b0: ea000010 b 335f8 <== NOT EXECUTED } /* release the old one */ rtems_filesystem_freenode( &saved ); 335b4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 335b8: e3530000 cmp r3, #0 <== NOT EXECUTED 335bc: 0a000004 beq 335d4 <== NOT EXECUTED 335c0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 335c4: e3530000 cmp r3, #0 <== NOT EXECUTED 335c8: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 335cc: 11a0e00f movne lr, pc <== NOT EXECUTED 335d0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_current = loc; 335d4: e59f302c ldr r3, [pc, #44] ; 33608 <== NOT EXECUTED 335d8: e28d4018 add r4, sp, #24 <== NOT EXECUTED 335dc: e593c000 ldr ip, [r3] <== NOT EXECUTED 335e0: e8b4000f ldm r4!, {r0, r1, r2, r3} <== NOT EXECUTED 335e4: e28cc004 add ip, ip, #4 <== NOT EXECUTED 335e8: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 335ec: e5943000 ldr r3, [r4] <== NOT EXECUTED 335f0: e58c3000 str r3, [ip] <== NOT EXECUTED 335f4: e3a00000 mov r0, #0 <== NOT EXECUTED return 0; } 335f8: e28dd02c add sp, sp, #44 ; 0x2c <== NOT EXECUTED 335fc: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED 33600: 000531e0 .word 0x000531e0 33604: 00060c64 .word 0x00060c64 33608: 000534b8 .word 0x000534b8 3360c: 00058c75 .word 0x00058c75 00021e7c : mode_t mode ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21e7c: e59f307c ldr r3, [pc, #124] ; 21f00 <== NOT EXECUTED 21e80: e5932000 ldr r2, [r3] <== NOT EXECUTED 21e84: e1500002 cmp r0, r2 <== NOT EXECUTED int fchmod( int fd, mode_t mode ) { 21e88: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21e8c: 2a000005 bcs 21ea8 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21e90: e59f306c ldr r3, [pc, #108] ; 21f04 <== NOT EXECUTED 21e94: e5933000 ldr r3, [r3] <== NOT EXECUTED 21e98: e0833300 add r3, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21e9c: e5932014 ldr r2, [r3, #20] <== NOT EXECUTED 21ea0: e3120c01 tst r2, #256 ; 0x100 <== NOT EXECUTED 21ea4: 1a000002 bne 21eb4 <== NOT EXECUTED 21ea8: eb005c7b bl 3909c <__errno> <== NOT EXECUTED 21eac: e3a03009 mov r3, #9 <== NOT EXECUTED 21eb0: ea00000a b 21ee0 <== NOT EXECUTED /* * Now process the fchmod(). */ rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21eb4: e3120004 tst r2, #4 <== NOT EXECUTED 21eb8: 1a000002 bne 21ec8 <== NOT EXECUTED 21ebc: eb005c76 bl 3909c <__errno> <== NOT EXECUTED 21ec0: e3a03016 mov r3, #22 <== NOT EXECUTED 21ec4: ea000005 b 21ee0 <== NOT EXECUTED if ( !iop->handlers->fchmod_h ) 21ec8: e593203c ldr r2, [r3, #60] ; 0x3c <== NOT EXECUTED 21ecc: e592201c ldr r2, [r2, #28] <== NOT EXECUTED 21ed0: e3520000 cmp r2, #0 <== NOT EXECUTED 21ed4: 1a000004 bne 21eec <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21ed8: eb005c6f bl 3909c <__errno> <== NOT EXECUTED 21edc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21ee0: e5803000 str r3, [r0] <== NOT EXECUTED 21ee4: e3e00000 mvn r0, #0 <== NOT EXECUTED 21ee8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.handlers->fchmod_h)( &iop->pathinfo, mode ); 21eec: e2830018 add r0, r3, #24 <== NOT EXECUTED 21ef0: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED 21ef4: e1a0e00f mov lr, pc <== NOT EXECUTED 21ef8: e593f01c ldr pc, [r3, #28] <== NOT EXECUTED } 21efc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21f00: 000531e0 .word 0x000531e0 21f04: 00060c64 .word 0x00060c64 00021f08 : gid_t group ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f08: e59f3088 ldr r3, [pc, #136] ; 21f98 <== NOT EXECUTED 21f0c: e5933000 ldr r3, [r3] <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21f10: e1a01801 lsl r1, r1, #16 <== NOT EXECUTED 21f14: e1a02802 lsl r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f18: e1500003 cmp r0, r3 <== NOT EXECUTED int fchown( int fd, uid_t owner, gid_t group ) { 21f1c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED 21f20: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 21f24: e1a02822 lsr r2, r2, #16 <== NOT EXECUTED rtems_libio_t *iop; rtems_libio_check_fd( fd ); 21f28: 2a000005 bcs 21f44 <== NOT EXECUTED iop = rtems_libio_iop( fd ); 21f2c: e59f3068 ldr r3, [pc, #104] ; 21f9c <== NOT EXECUTED 21f30: e5933000 ldr r3, [r3] <== NOT EXECUTED 21f34: e0830300 add r0, r3, r0, lsl #6 <== NOT EXECUTED rtems_libio_check_is_open(iop); 21f38: e5903014 ldr r3, [r0, #20] <== NOT EXECUTED 21f3c: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 21f40: 1a000002 bne 21f50 <== NOT EXECUTED 21f44: eb005c54 bl 3909c <__errno> <== NOT EXECUTED 21f48: e3a03009 mov r3, #9 <== NOT EXECUTED 21f4c: ea00000a b 21f7c <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 21f50: e3130004 tst r3, #4 <== NOT EXECUTED 21f54: 1a000002 bne 21f64 <== NOT EXECUTED 21f58: eb005c4f bl 3909c <__errno> <== NOT EXECUTED 21f5c: e3a03016 mov r3, #22 <== NOT EXECUTED 21f60: ea000005 b 21f7c <== NOT EXECUTED if ( !iop->pathinfo.ops->chown_h ) 21f64: e5903024 ldr r3, [r0, #36] ; 0x24 <== NOT EXECUTED 21f68: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 21f6c: e3530000 cmp r3, #0 <== NOT EXECUTED 21f70: 1a000004 bne 21f88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 21f74: eb005c48 bl 3909c <__errno> <== NOT EXECUTED 21f78: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 21f7c: e5803000 str r3, [r0] <== NOT EXECUTED 21f80: e3e00000 mvn r0, #0 <== NOT EXECUTED 21f84: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED return (*iop->pathinfo.ops->chown_h)( &iop->pathinfo, owner, group ); 21f88: e2800018 add r0, r0, #24 <== NOT EXECUTED 21f8c: e1a0e00f mov lr, pc <== NOT EXECUTED 21f90: e12fff13 bx r3 <== NOT EXECUTED } 21f94: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 21f98: 000531e0 .word 0x000531e0 21f9c: 00060c64 .word 0x00060c64 00033610 : int fcntl( int fd, int cmd, ... ) { 33610: e92d000e push {r1, r2, r3} 33614: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33618: e59f31a4 ldr r3, [pc, #420] ; 337c4 3361c: e5933000 ldr r3, [r3] ... ) { int ret; va_list ap; va_start( ap, cmd ); 33620: e28d201c add r2, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33624: e1500003 cmp r0, r3 ... ) { int ret; va_list ap; va_start( ap, cmd ); 33628: e58d2000 str r2, [sp] int fcntl( int fd, int cmd, ... ) { 3362c: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 33630: 2a000005 bcs 3364c iop = rtems_libio_iop( fd ); 33634: e59f118c ldr r1, [pc, #396] ; 337c8 33638: e591c000 ldr ip, [r1] 3363c: e08c4300 add r4, ip, r0, lsl #6 rtems_libio_check_is_open(iop); 33640: e5940014 ldr r0, [r4, #20] 33644: e3100c01 tst r0, #256 ; 0x100 33648: 1a000002 bne 33658 3364c: eb001692 bl 3909c <__errno> <== NOT EXECUTED 33650: e3a03009 mov r3, #9 <== NOT EXECUTED 33654: ea000045 b 33770 <== NOT EXECUTED /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 33658: e3570009 cmp r7, #9 3365c: 979ff107 ldrls pc, [pc, r7, lsl #2] 33660: ea000040 b 33768 33664: 0003368c .word 0x0003368c <== NOT EXECUTED 33668: 000336f8 .word 0x000336f8 <== NOT EXECUTED 3366c: 00033704 .word 0x00033704 <== NOT EXECUTED 33670: 00033724 .word 0x00033724 <== NOT EXECUTED 33674: 00033730 .word 0x00033730 <== NOT EXECUTED 33678: 0003375c .word 0x0003375c <== NOT EXECUTED 3367c: 0003375c .word 0x0003375c <== NOT EXECUTED 33680: 0003375c .word 0x0003375c <== NOT EXECUTED 33684: 0003375c .word 0x0003375c <== NOT EXECUTED 33688: 0003375c .word 0x0003375c <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 3368c: e5922000 ldr r2, [r2] if ( fd2 ) 33690: e3520000 cmp r2, #0 33694: 0a000003 beq 336a8 diop = rtems_libio_iop( fd2 ); 33698: e1520003 cmp r2, r3 <== NOT EXECUTED 3369c: 23a0c000 movcs ip, #0 <== NOT EXECUTED 336a0: 308cc302 addcc ip, ip, r2, lsl #6 <== NOT EXECUTED 336a4: ea000002 b 336b4 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 336a8: ebff47bc bl 55a0 if ( diop == 0 ) { 336ac: e250c000 subs ip, r0, #0 336b0: 0a00003e beq 337b0 } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 336b4: e2846018 add r6, r4, #24 336b8: e8b6000f ldm r6!, {r0, r1, r2, r3} 336bc: e28c5018 add r5, ip, #24 336c0: e8a5000f stmia r5!, {r0, r1, r2, r3} ret = (int) (diop - rtems_libio_iops); 336c4: e59f30fc ldr r3, [pc, #252] ; 337c8 336c8: e5933000 ldr r3, [r3] } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 336cc: e5966000 ldr r6, [r6] ret = -1; break; } } diop->handlers = iop->handlers; 336d0: e594003c ldr r0, [r4, #60] ; 0x3c diop->file_info = iop->file_info; 336d4: e5941038 ldr r1, [r4, #56] ; 0x38 diop->flags = iop->flags; 336d8: e5942014 ldr r2, [r4, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 336dc: e063300c rsb r3, r3, ip } diop->handlers = iop->handlers; diop->file_info = iop->file_info; diop->flags = iop->flags; diop->pathinfo = iop->pathinfo; 336e0: e5856000 str r6, [r5] ret = -1; break; } } diop->handlers = iop->handlers; 336e4: e58c003c str r0, [ip, #60] ; 0x3c diop->file_info = iop->file_info; 336e8: e58c1038 str r1, [ip, #56] ; 0x38 diop->flags = iop->flags; 336ec: e58c2014 str r2, [ip, #20] diop->pathinfo = iop->pathinfo; ret = (int) (diop - rtems_libio_iops); 336f0: e1a05343 asr r5, r3, #6 336f4: ea00001f b 33778 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 336f8: e1a055a0 lsr r5, r0, #11 336fc: e2055001 and r5, r5, #1 33700: ea00001e b 33780 * 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 ) ) 33704: e5925000 ldr r5, [r2] 33708: e3550000 cmp r5, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 3370c: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 33710: 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; 33714: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 33718: 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 ) ) 3371c: 0a000017 beq 33780 33720: ea00000b b 33754 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 33724: ebff4734 bl 53fc 33728: e1a05000 mov r5, r0 3372c: ea000011 b 33778 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 33730: e5920000 ldr r0, [r2] 33734: ebff47c6 bl 5654 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 33738: e5943014 ldr r3, [r4, #20] 3373c: e59f2088 ldr r2, [pc, #136] ; 337cc 33740: e3c33c02 bic r3, r3, #512 ; 0x200 33744: e0002002 and r2, r0, r2 33748: e3c33001 bic r3, r3, #1 3374c: e1823003 orr r3, r2, r3 33750: e5843014 str r3, [r4, #20] 33754: e3a05000 mov r5, #0 33758: ea000008 b 33780 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 3375c: eb00164e bl 3909c <__errno> 33760: e3a03086 mov r3, #134 ; 0x86 33764: ea000001 b 33770 ret = -1; break; default: errno = EINVAL; 33768: eb00164b bl 3909c <__errno> 3376c: e3a03016 mov r3, #22 33770: e5803000 str r3, [r0] 33774: ea00000d b 337b0 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 33778: e3550000 cmp r5, #0 3377c: ba00000c blt 337b4 if (iop->handlers->fcntl_h) { 33780: e594303c ldr r3, [r4, #60] ; 0x3c 33784: e5933030 ldr r3, [r3, #48] ; 0x30 33788: e3530000 cmp r3, #0 3378c: 0a000008 beq 337b4 int err = (*iop->handlers->fcntl_h)( cmd, iop ); 33790: e1a01004 mov r1, r4 33794: e1a00007 mov r0, r7 33798: e1a0e00f mov lr, pc 3379c: e12fff13 bx r3 if (err) { 337a0: e2504000 subs r4, r0, #0 337a4: 0a000002 beq 337b4 errno = err; 337a8: eb00163b bl 3909c <__errno> <== NOT EXECUTED 337ac: e5804000 str r4, [r0] <== NOT EXECUTED 337b0: e3e05000 mvn r5, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 337b4: e1a00005 mov r0, r5 337b8: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 337bc: e28dd00c add sp, sp, #12 337c0: e12fff1e bx lr 337c4: 000531e0 .word 0x000531e0 337c8: 00060c64 .word 0x00060c64 337cc: 00000201 .word 0x00000201 0000ad70 : ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ad70: e59f3368 ldr r3, [pc, #872] ; b0e0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ad74: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr} ad78: e1a08001 mov r8, r1 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ad7c: e3a01000 mov r1, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { ad80: e1a07000 mov r7, r0 ) { pipe_control_t *pipe; int err = 0; if (rtems_semaphore_obtain(rtems_pipe_semaphore, ad84: e1a02001 mov r2, r1 ad88: e5930000 ldr r0, [r3] ad8c: ebffe530 bl 4254 ad90: e250a000 subs sl, r0, #0 ad94: 13e06003 mvnne r6, #3 ad98: 1a0000ce bne b0d8 RTEMS_WAIT, RTEMS_NO_TIMEOUT) != RTEMS_SUCCESSFUL) return -EINTR; pipe = *pipep; ad9c: e5974000 ldr r4, [r7] <== NOT EXECUTED if (pipe == NULL) { ada0: e3540000 cmp r4, #0 <== NOT EXECUTED ada4: 1a00004f bne aee8 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); ada8: e3a00034 mov r0, #52 ; 0x34 <== NOT EXECUTED adac: ebfff7b2 bl 8c7c <== NOT EXECUTED if (pipe == NULL) adb0: e3500000 cmp r0, #0 <== NOT EXECUTED { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); adb4: e1a05000 mov r5, r0 <== NOT EXECUTED adb8: e1a04000 mov r4, r0 <== NOT EXECUTED if (pipe == NULL) adbc: 03e0600b mvneq r6, #11 <== NOT EXECUTED adc0: 0a000056 beq af20 <== NOT EXECUTED return err; memset(pipe, 0, sizeof(pipe_control_t)); adc4: e1a0100a mov r1, sl <== NOT EXECUTED adc8: e3a02034 mov r2, #52 ; 0x34 <== NOT EXECUTED adcc: eb00092b bl d280 <== NOT EXECUTED pipe->Size = PIPE_BUF; add0: e3a03c02 mov r3, #512 ; 0x200 <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); add4: 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; add8: e5853004 str r3, [r5, #4] <== NOT EXECUTED pipe->Buffer = malloc(pipe->Size); addc: ebfff7a6 bl 8c7c <== NOT EXECUTED if (! pipe->Buffer) ade0: 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); ade4: e5850000 str r0, [r5] <== NOT EXECUTED if (! pipe->Buffer) ade8: 03e0600b mvneq r6, #11 <== NOT EXECUTED adec: 0a00003a beq aedc <== NOT EXECUTED goto err_buf; err = -EINTR; if (rtems_barrier_create( adf0: e59f62ec ldr r6, [pc, #748] ; b0e4 <== NOT EXECUTED adf4: e59f02ec ldr r0, [pc, #748] ; b0e8 <== NOT EXECUTED adf8: e5d63000 ldrb r3, [r6] <== NOT EXECUTED adfc: e1a0100a mov r1, sl <== NOT EXECUTED ae00: e1830000 orr r0, r3, r0 <== NOT EXECUTED ae04: e1a0200a mov r2, sl <== NOT EXECUTED ae08: e285302c add r3, r5, #44 ; 0x2c <== NOT EXECUTED ae0c: eb000287 bl b830 <== NOT EXECUTED ae10: e2501000 subs r1, r0, #0 <== NOT EXECUTED ae14: 1a00002d bne aed0 <== 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( ae18: e5d63000 ldrb r3, [r6] <== NOT EXECUTED ae1c: e59f02c8 ldr r0, [pc, #712] ; b0ec <== NOT EXECUTED ae20: e1a02001 mov r2, r1 <== NOT EXECUTED ae24: e1830000 orr r0, r3, r0 <== NOT EXECUTED ae28: e2853030 add r3, r5, #48 ; 0x30 <== NOT EXECUTED ae2c: eb00027f bl b830 <== NOT EXECUTED ae30: e2503000 subs r3, r0, #0 <== NOT EXECUTED ae34: 1a000023 bne aec8 <== 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( ae38: e5d62000 ldrb r2, [r6] <== NOT EXECUTED ae3c: e59f02ac ldr r0, [pc, #684] ; b0f0 <== NOT EXECUTED ae40: e285c028 add ip, r5, #40 ; 0x28 <== NOT EXECUTED ae44: e1820000 orr r0, r2, r0 <== NOT EXECUTED ae48: e3a01001 mov r1, #1 <== NOT EXECUTED ae4c: e3a02010 mov r2, #16 <== NOT EXECUTED ae50: e58dc000 str ip, [sp] <== NOT EXECUTED ae54: ebffe46c bl 400c <== NOT EXECUTED ae58: e3500000 cmp r0, #0 <== NOT EXECUTED ae5c: 1a000017 bne aec0 <== NOT EXECUTED RTEMS_INLINE_ROUTINE Barrier_Control *_Barrier_Get ( Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) ae60: e28d5004 add r5, sp, #4 <== NOT EXECUTED ae64: e594102c ldr r1, [r4, #44] ; 0x2c <== NOT EXECUTED ae68: e1a02005 mov r2, r5 <== NOT EXECUTED ae6c: e59f0280 ldr r0, [pc, #640] ; b0f4 <== NOT EXECUTED ae70: ebffea7c bl 5868 <_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 ae74: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED ae78: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED ae7c: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); ae80: ebffec94 bl 60d8 <_Thread_Enable_dispatch> <== NOT EXECUTED ae84: e1a02005 mov r2, r5 <== NOT EXECUTED ae88: e5941030 ldr r1, [r4, #48] ; 0x30 <== NOT EXECUTED ae8c: e59f0260 ldr r0, [pc, #608] ; b0f4 <== NOT EXECUTED ae90: ebffea74 bl 5868 <_Objects_Get> <== NOT EXECUTED _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state ae94: e590304c ldr r3, [r0, #76] ; 0x4c <== NOT EXECUTED ae98: e3833201 orr r3, r3, #268435456 ; 0x10000000 <== NOT EXECUTED ae9c: e580304c str r3, [r0, #76] ; 0x4c <== NOT EXECUTED |= STATES_INTERRUPTIBLE_BY_SIGNAL; _Thread_Enable_dispatch(); aea0: ebffec8c bl 60d8 <_Thread_Enable_dispatch> <== NOT EXECUTED #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') aea4: e5d63000 ldrb r3, [r6] <== NOT EXECUTED aea8: e353007a cmp r3, #122 ; 0x7a <== NOT EXECUTED aeac: e2833001 add r3, r3, #1 <== NOT EXECUTED aeb0: e5c63000 strb r3, [r6] <== NOT EXECUTED c = 'a'; aeb4: 03a03061 moveq r3, #97 ; 0x61 <== NOT EXECUTED aeb8: 05c63000 strbeq r3, [r6] <== NOT EXECUTED aebc: ea000009 b aee8 <== NOT EXECUTED return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); aec0: e5950030 ldr r0, [r5, #48] ; 0x30 <== NOT EXECUTED aec4: eb000287 bl b8e8 <== NOT EXECUTED err_wbar: rtems_barrier_delete(pipe->readBarrier); aec8: e595002c ldr r0, [r5, #44] ; 0x2c <== NOT EXECUTED aecc: eb000285 bl b8e8 <== NOT EXECUTED err_rbar: free(pipe->Buffer); aed0: e5950000 ldr r0, [r5] <== NOT EXECUTED aed4: ebfff61e bl 8754 <== NOT EXECUTED aed8: e3e06003 mvn r6, #3 <== NOT EXECUTED err_buf: free(pipe); aedc: e1a00005 mov r0, r5 <== NOT EXECUTED aee0: ebfff61b bl 8754 <== NOT EXECUTED aee4: ea00000d b af20 <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) aee8: e3a01000 mov r1, #0 <== NOT EXECUTED aeec: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED aef0: e1a02001 mov r2, r1 <== NOT EXECUTED aef4: ebffe4d6 bl 4254 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { aef8: e5973000 ldr r3, [r7] <== NOT EXECUTED err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) aefc: e3500000 cmp r0, #0 <== NOT EXECUTED af00: 01a06000 moveq r6, r0 <== NOT EXECUTED af04: 13e06003 mvnne r6, #3 <== NOT EXECUTED err = -EINTR; if (*pipep == NULL) { af08: e3530000 cmp r3, #0 <== NOT EXECUTED af0c: 1a000003 bne af20 <== NOT EXECUTED if (err) af10: e3560000 cmp r6, #0 <== NOT EXECUTED pipe_free(pipe); else *pipep = pipe; af14: 05874000 streq r4, [r7] <== NOT EXECUTED if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); af18: 11a00004 movne r0, r4 <== NOT EXECUTED af1c: 1bffff47 blne ac40 <== NOT EXECUTED else *pipep = pipe; } out: rtems_semaphore_release(rtems_pipe_semaphore); af20: e59f31b8 ldr r3, [pc, #440] ; b0e0 <== NOT EXECUTED af24: e5930000 ldr r0, [r3] <== NOT EXECUTED af28: ebffe50f bl 436c <== NOT EXECUTED pipe_control_t *pipe; uint prevCounter; int err; err = pipe_new(pipep); if (err) af2c: e3560000 cmp r6, #0 <== NOT EXECUTED af30: 1a000068 bne b0d8 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { af34: e5982014 ldr r2, [r8, #20] <== NOT EXECUTED af38: e2023006 and r3, r2, #6 <== NOT EXECUTED af3c: e3530004 cmp r3, #4 <== NOT EXECUTED int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; af40: e5974000 ldr r4, [r7] <== NOT EXECUTED switch (LIBIO_ACCMODE(iop)) { af44: 0a000024 beq afdc <== NOT EXECUTED af48: e3530006 cmp r3, #6 <== NOT EXECUTED af4c: 0a000046 beq b06c <== NOT EXECUTED af50: e3530002 cmp r3, #2 <== NOT EXECUTED af54: 1a000058 bne b0bc <== NOT EXECUTED case LIBIO_FLAGS_READ: pipe->readerCounter ++; if (pipe->Readers ++ == 0) af58: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; af5c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) af60: e3530000 cmp r3, #0 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; af64: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) af68: e2833001 add r3, r3, #1 <== NOT EXECUTED return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { case LIBIO_FLAGS_READ: pipe->readerCounter ++; af6c: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) af70: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); af74: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED af78: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED af7c: 0b000271 bleq b948 <== NOT EXECUTED if (pipe->Writers == 0) { af80: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED af84: e3530000 cmp r3, #0 <== NOT EXECUTED af88: 1a00004b bne b0bc <== NOT EXECUTED /* Not an error */ if (LIBIO_NODELAY(iop)) af8c: e5983014 ldr r3, [r8, #20] <== NOT EXECUTED af90: e3130001 tst r3, #1 <== NOT EXECUTED af94: 1a000048 bne b0bc <== NOT EXECUTED break; prevCounter = pipe->writerCounter; af98: e5945024 ldr r5, [r4, #36] ; 0x24 <== NOT EXECUTED err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); af9c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED afa0: ebffe4f1 bl 436c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) afa4: e3a01000 mov r1, #0 <== NOT EXECUTED afa8: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED afac: eb00027b bl b9a0 <== NOT EXECUTED afb0: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) afb4: 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)) afb8: 1a000042 bne b0c8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) afbc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED afc0: ebffe4a3 bl 4254 <== NOT EXECUTED afc4: e3500000 cmp r0, #0 <== NOT EXECUTED afc8: 1a00003e bne b0c8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->writerCounter); afcc: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED afd0: e1550003 cmp r5, r3 <== NOT EXECUTED afd4: 0afffff0 beq af9c <== NOT EXECUTED afd8: ea000037 b b0bc <== NOT EXECUTED } break; case LIBIO_FLAGS_WRITE: if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { afdc: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED afe0: e3530000 cmp r3, #0 <== NOT EXECUTED afe4: 1a000002 bne aff4 <== NOT EXECUTED afe8: e3120001 tst r2, #1 <== NOT EXECUTED afec: 13e06005 mvnne r6, #5 <== NOT EXECUTED aff0: 1a000035 bne b0cc <== NOT EXECUTED err = -ENXIO; goto out_error; } pipe->writerCounter ++; if (pipe->Writers ++ == 0) aff4: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; aff8: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) affc: e3530000 cmp r3, #0 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b000: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b004: e2833001 add r3, r3, #1 <== NOT EXECUTED if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { err = -ENXIO; goto out_error; } pipe->writerCounter ++; b008: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b00c: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b010: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b014: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b018: 0b00024a bleq b948 <== NOT EXECUTED if (pipe->Readers == 0) { b01c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED b020: e3530000 cmp r3, #0 <== NOT EXECUTED b024: 1a000024 bne b0bc <== NOT EXECUTED prevCounter = pipe->readerCounter; b028: e5945020 ldr r5, [r4, #32] <== NOT EXECUTED err = -EINTR; do { PIPE_UNLOCK(pipe); b02c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b030: ebffe4cd bl 436c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) b034: e3a01000 mov r1, #0 <== NOT EXECUTED b038: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED b03c: eb000257 bl b9a0 <== NOT EXECUTED b040: e2501000 subs r1, r0, #0 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b044: e1a02001 mov r2, r1 <== NOT EXECUTED if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) b048: 1a00001e bne b0c8 <== NOT EXECUTED goto out_error; if (! PIPE_LOCK(pipe)) b04c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b050: ebffe47f bl 4254 <== NOT EXECUTED b054: e3500000 cmp r0, #0 <== NOT EXECUTED b058: 1a00001a bne b0c8 <== NOT EXECUTED goto out_error; } while (prevCounter == pipe->readerCounter); b05c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED b060: e1550003 cmp r5, r3 <== NOT EXECUTED b064: 0afffff0 beq b02c <== NOT EXECUTED b068: ea000013 b b0bc <== NOT EXECUTED } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) b06c: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b070: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b074: e3530000 cmp r3, #0 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b078: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Readers ++ == 0) b07c: e2833001 add r3, r3, #1 <== NOT EXECUTED } while (prevCounter == pipe->readerCounter); } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b080: e5842020 str r2, [r4, #32] <== NOT EXECUTED if (pipe->Readers ++ == 0) b084: e5843010 str r3, [r4, #16] <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); b088: 05940030 ldreq r0, [r4, #48] ; 0x30 <== NOT EXECUTED b08c: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b090: 0b00022c bleq b948 <== NOT EXECUTED pipe->writerCounter ++; if (pipe->Writers ++ == 0) b094: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b098: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b09c: e3530000 cmp r3, #0 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b0a0: e2822001 add r2, r2, #1 <== NOT EXECUTED if (pipe->Writers ++ == 0) b0a4: e2833001 add r3, r3, #1 <== NOT EXECUTED case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; if (pipe->Readers ++ == 0) PIPE_WAKEUPWRITERS(pipe); pipe->writerCounter ++; b0a8: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED if (pipe->Writers ++ == 0) b0ac: e5843014 str r3, [r4, #20] <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); b0b0: 0594002c ldreq r0, [r4, #44] ; 0x2c <== NOT EXECUTED b0b4: 028d1008 addeq r1, sp, #8 <== NOT EXECUTED b0b8: 0b000222 bleq b948 <== NOT EXECUTED break; } PIPE_UNLOCK(pipe); b0bc: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED b0c0: ebffe4a9 bl 436c <== NOT EXECUTED return 0; b0c4: ea000003 b b0d8 <== NOT EXECUTED b0c8: e3e06003 mvn r6, #3 <== NOT EXECUTED out_error: pipe_release(pipep, iop); b0cc: e1a00007 mov r0, r7 <== NOT EXECUTED b0d0: e1a01008 mov r1, r8 <== NOT EXECUTED b0d4: ebfffee6 bl ac74 <== NOT EXECUTED return err; } b0d8: e1a00006 mov r0, r6 b0dc: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc} b0e0: 00019b00 .word 0x00019b00 b0e4: 000185cc .word 0x000185cc b0e8: 50497200 .word 0x50497200 b0ec: 50497700 .word 0x50497700 b0f0: 50497300 .word 0x50497300 b0f4: 0001a5e4 .word 0x0001a5e4 00008684 : /* * Search the mount table for any mount entries referencing this * mount entry. */ for ( the_node = rtems_filesystem_mount_table_control.first; 8684: e59f3030 ldr r3, [pc, #48] ; 86bc <== NOT EXECUTED 8688: e4932004 ldr r2, [r3], #4 <== NOT EXECUTED 868c: ea000006 b 86ac <== 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 ) { 8690: e592c018 ldr ip, [r2, #24] <== NOT EXECUTED 8694: e5910010 ldr r0, [r1, #16] <== NOT EXECUTED 8698: e15c0000 cmp ip, r0 <== NOT EXECUTED 869c: 1a000001 bne 86a8 <== NOT EXECUTED 86a0: e3a00001 mov r0, #1 <== NOT EXECUTED 86a4: 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 ) { 86a8: e5922000 ldr r2, [r2] <== NOT EXECUTED 86ac: e1520003 cmp r2, r3 <== NOT EXECUTED 86b0: 1afffff6 bne 8690 <== NOT EXECUTED 86b4: e3a00000 mov r0, #0 <== NOT EXECUTED return true; } } return false; } 86b8: e12fff1e bx lr <== NOT EXECUTED 86bc: 00060ca8 .word 0x00060ca8 0000240c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 240c: e59f3100 ldr r3, [pc, #256] ; 2514 2410: e5933000 ldr r3, [r3] 2414: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2418: 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); 241c: 2a000005 bcs 2438 iop = rtems_libio_iop(fd); 2420: e59f30f0 ldr r3, [pc, #240] ; 2518 2424: e5933000 ldr r3, [r3] 2428: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 242c: e5903014 ldr r3, [r0, #20] 2430: e3130c01 tst r3, #256 ; 0x100 2434: 1a000002 bne 2444 2438: eb0032d9 bl efa4 <__errno> 243c: e3a03009 mov r3, #9 2440: ea000003 b 2454 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2444: e3130002 tst r3, #2 2448: 1a000004 bne 2460 244c: eb0032d4 bl efa4 <__errno> <== NOT EXECUTED 2450: e3a03016 mov r3, #22 <== NOT EXECUTED 2454: e5803000 str r3, [r0] 2458: e3e00000 mvn r0, #0 245c: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2460: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2464: e351000b cmp r1, #11 2468: 979ff101 ldrls pc, [pc, r1, lsl #2] 246c: ea000023 b 2500 2470: 000024a0 .word 0x000024a0 <== NOT EXECUTED 2474: 000024a8 .word 0x000024a8 <== NOT EXECUTED 2478: 000024b0 .word 0x000024b0 <== NOT EXECUTED 247c: 000024b8 .word 0x000024b8 <== NOT EXECUTED 2480: 000024c0 .word 0x000024c0 <== NOT EXECUTED 2484: 000024c8 .word 0x000024c8 <== NOT EXECUTED 2488: 000024d0 .word 0x000024d0 <== NOT EXECUTED 248c: 000024d8 .word 0x000024d8 <== NOT EXECUTED 2490: 000024e0 .word 0x000024e0 <== NOT EXECUTED 2494: 000024e8 .word 0x000024e8 <== NOT EXECUTED 2498: 000024f0 .word 0x000024f0 <== NOT EXECUTED 249c: 000024f8 .word 0x000024f8 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 24a0: e5930038 ldr r0, [r3, #56] ; 0x38 break; 24a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 24a8: e593003c ldr r0, [r3, #60] ; 0x3c break; 24ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 24b0: e5930040 ldr r0, [r3, #64] ; 0x40 break; 24b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 24b8: e5930044 ldr r0, [r3, #68] ; 0x44 break; 24bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 24c0: e5930048 ldr r0, [r3, #72] ; 0x48 break; 24c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 24c8: e593004c ldr r0, [r3, #76] ; 0x4c break; 24cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 24d0: e5930054 ldr r0, [r3, #84] ; 0x54 break; 24d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 24d8: e5930058 ldr r0, [r3, #88] ; 0x58 break; 24dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 24e0: e5930064 ldr r0, [r3, #100] ; 0x64 break; 24e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 24e8: e5930050 ldr r0, [r3, #80] ; 0x50 break; 24ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 24f0: e593005c ldr r0, [r3, #92] ; 0x5c break; 24f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 24f8: e5930060 ldr r0, [r3, #96] ; 0x60 break; 24fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2500: eb0032a7 bl efa4 <__errno> 2504: e3a03016 mov r3, #22 2508: e5803000 str r3, [r0] 250c: e3e00000 mvn r0, #0 break; } return return_value; } 2510: e49df004 pop {pc} ; (ldr pc, [sp], #4) 2514: 0001bdb0 .word 0x0001bdb0 2518: 0001d90c .word 0x0001d90c 00008754 : void free( void *ptr ) { MSBUMP(free_calls, 1); 8754: e59f3088 ldr r3, [pc, #136] ; 87e4 8758: e593200c ldr r2, [r3, #12] 875c: e92d4030 push {r4, r5, lr} 8760: e2822001 add r2, r2, #1 if ( !ptr ) 8764: e2504000 subs r4, r0, #0 void free( void *ptr ) { MSBUMP(free_calls, 1); 8768: e583200c str r2, [r3, #12] if ( !ptr ) 876c: 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()) && 8770: e59f3070 ldr r3, [pc, #112] ; 87e8 8774: e5933000 ldr r3, [r3] 8778: e3530003 cmp r3, #3 877c: 1a000005 bne 8798 8780: eb00011d bl 8bfc 8784: e3500000 cmp r0, #0 8788: 1a000002 bne 8798 !malloc_is_system_state_OK() ) { malloc_deferred_free(ptr); 878c: e1a00004 mov r0, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 8790: 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); 8794: ea00012b b 8c48 <== NOT EXECUTED #endif /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8798: e59f304c ldr r3, [pc, #76] ; 87ec 879c: e5933000 ldr r3, [r3] 87a0: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_free)(ptr); 87a4: 11a00004 movne r0, r4 87a8: 11a0e00f movne lr, pc 87ac: 1593f008 ldrne pc, [r3, #8] if ( !_Protected_heap_Free( RTEMS_Malloc_Heap, ptr ) ) { 87b0: e59f5038 ldr r5, [pc, #56] ; 87f0 87b4: e1a01004 mov r1, r4 87b8: e5950000 ldr r0, [r5] 87bc: eb00068c bl a1f4 <_Protected_heap_Free> 87c0: e3500000 cmp r0, #0 87c4: 18bd8030 popne {r4, r5, pc} printk( "Program heap: free of bad pointer %p -- range %p - %p \n", ptr, RTEMS_Malloc_Heap->area_begin, 87c8: 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", 87cc: e59f0020 ldr r0, [pc, #32] ; 87f4 <== NOT EXECUTED 87d0: e2822018 add r2, r2, #24 <== NOT EXECUTED 87d4: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 87d8: e1a01004 mov r1, r4 <== NOT EXECUTED RTEMS_Malloc_Heap->area_begin, RTEMS_Malloc_Heap->area_end ); } } 87dc: 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", 87e0: eaffe598 b 1e48 <== NOT EXECUTED 87e4: 00019b90 .word 0x00019b90 87e8: 00019e90 .word 0x00019e90 87ec: 000199a8 .word 0x000199a8 87f0: 000183ac .word 0x000183ac 87f4: 0001969e .word 0x0001969e 00023218 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 23218: e59f3058 ldr r3, [pc, #88] ; 23278 <== NOT EXECUTED 2321c: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 23220: e92d4010 push {r4, lr} <== NOT EXECUTED 23224: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 23228: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 2322c: e5903010 ldr r3, [r0, #16] <== NOT EXECUTED 23230: e3530000 cmp r3, #0 <== NOT EXECUTED 23234: 0a000004 beq 2324c <== NOT EXECUTED 23238: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2323c: e3530000 cmp r3, #0 <== NOT EXECUTED 23240: 12800004 addne r0, r0, #4 <== NOT EXECUTED 23244: 11a0e00f movne lr, pc <== NOT EXECUTED 23248: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 2324c: e5943024 ldr r3, [r4, #36] ; 0x24 <== NOT EXECUTED 23250: e3530000 cmp r3, #0 <== NOT EXECUTED 23254: 0a000004 beq 2326c <== NOT EXECUTED 23258: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 2325c: e3530000 cmp r3, #0 <== NOT EXECUTED 23260: 12840018 addne r0, r4, #24 <== NOT EXECUTED 23264: 11a0e00f movne lr, pc <== NOT EXECUTED 23268: 112fff13 bxne r3 <== NOT EXECUTED free(env); 2326c: e1a00004 mov r0, r4 <== NOT EXECUTED } } 23270: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 23274: eaff87e3 b 5208 <== NOT EXECUTED 23278: 00060cc0 .word 0x00060cc0 00017884 : int fstat( int fd, struct stat *sbuf ) { 17884: e92d4030 push {r4, r5, lr} /* * Check to see if we were passed a valid pointer. */ if ( !sbuf ) 17888: e2515000 subs r5, r1, #0 1788c: 1a000002 bne 1789c rtems_set_errno_and_return_minus_one( EFAULT ); 17890: ebffd430 bl c958 <__errno> 17894: e3a0300e mov r3, #14 17898: ea000014 b 178f0 /* * Now process the stat() request. */ iop = rtems_libio_iop( fd ); 1789c: e59f3080 ldr r3, [pc, #128] ; 17924 178a0: e5933000 ldr r3, [r3] 178a4: e1500003 cmp r0, r3 178a8: 2a000008 bcs 178d0 178ac: e59f3074 ldr r3, [pc, #116] ; 17928 178b0: e5934000 ldr r4, [r3] 178b4: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_fd( fd ); rtems_libio_check_is_open(iop); 178b8: e5943014 ldr r3, [r4, #20] 178bc: e3130c01 tst r3, #256 ; 0x100 178c0: 0a000002 beq 178d0 if ( !iop->handlers ) 178c4: e594303c ldr r3, [r4, #60] ; 0x3c 178c8: e3530000 cmp r3, #0 178cc: 1a000002 bne 178dc rtems_set_errno_and_return_minus_one( EBADF ); 178d0: ebffd420 bl c958 <__errno> 178d4: e3a03009 mov r3, #9 178d8: ea000004 b 178f0 if ( !iop->handlers->fstat_h ) 178dc: e5933018 ldr r3, [r3, #24] 178e0: e3530000 cmp r3, #0 178e4: 1a000004 bne 178fc rtems_set_errno_and_return_minus_one( ENOTSUP ); 178e8: ebffd41a bl c958 <__errno> <== NOT EXECUTED 178ec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 178f0: e5803000 str r3, [r0] 178f4: e3e00000 mvn r0, #0 178f8: 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) ); 178fc: e3a01000 mov r1, #0 17900: e3a02048 mov r2, #72 ; 0x48 17904: e1a00005 mov r0, r5 17908: ebffd65c bl d280 return (*iop->handlers->fstat_h)( &iop->pathinfo, sbuf ); 1790c: e2840018 add r0, r4, #24 17910: e1a01005 mov r1, r5 17914: e594303c ldr r3, [r4, #60] ; 0x3c 17918: e1a0e00f mov lr, pc 1791c: e593f018 ldr pc, [r3, #24] } 17920: e8bd8030 pop {r4, r5, pc} 17924: 000183a0 .word 0x000183a0 17928: 00019b84 .word 0x00019b84 00022054 : int fd ) { rtems_libio_t *iop; rtems_libio_check_fd( fd ); 22054: e59f307c ldr r3, [pc, #124] ; 220d8 22058: e5933000 ldr r3, [r3] 2205c: e1500003 cmp r0, r3 #include int fsync( int fd ) { 22060: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_libio_t *iop; rtems_libio_check_fd( fd ); 22064: 2a00000d bcs 220a0 iop = rtems_libio_iop( fd ); 22068: e59f306c ldr r3, [pc, #108] ; 220dc 2206c: e5933000 ldr r3, [r3] 22070: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 22074: e5903014 ldr r3, [r0, #20] 22078: e3130c01 tst r3, #256 ; 0x100 2207c: 0a000007 beq 220a0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 22080: e3130004 tst r3, #4 22084: 1a000002 bne 22094 22088: eb005c03 bl 3909c <__errno> 2208c: e3a03016 mov r3, #22 22090: ea00000a b 220c0 /* * Now process the fsync(). */ if ( !iop->handlers ) 22094: e590303c ldr r3, [r0, #60] ; 0x3c 22098: e3530000 cmp r3, #0 2209c: 1a000002 bne 220ac rtems_set_errno_and_return_minus_one( EBADF ); 220a0: eb005bfd bl 3909c <__errno> <== NOT EXECUTED 220a4: e3a03009 mov r3, #9 <== NOT EXECUTED 220a8: ea000004 b 220c0 <== NOT EXECUTED if ( !iop->handlers->fsync_h ) 220ac: e5933028 ldr r3, [r3, #40] ; 0x28 220b0: e3530000 cmp r3, #0 220b4: 1a000004 bne 220cc rtems_set_errno_and_return_minus_one( ENOTSUP ); 220b8: eb005bf7 bl 3909c <__errno> 220bc: e3a03086 mov r3, #134 ; 0x86 220c0: e5803000 str r3, [r0] 220c4: e3e00000 mvn r0, #0 220c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) return (*iop->handlers->fsync_h)( iop ); 220cc: e1a0e00f mov lr, pc 220d0: e12fff13 bx r3 } 220d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) 220d8: 000531e0 .word 0x000531e0 220dc: 00060c64 .word 0x00060c64 000087f8 : int ftruncate( int fd, off_t length ) { 87f8: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 87fc: e59f30d4 ldr r3, [pc, #212] ; 88d8 8800: e5933000 ldr r3, [r3] 8804: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 8808: e24dd014 sub sp, sp, #20 880c: e1a05001 mov r5, r1 8810: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 8814: 2a000005 bcs 8830 iop = rtems_libio_iop( fd ); 8818: e59f30bc ldr r3, [pc, #188] ; 88dc 881c: e5934000 ldr r4, [r3] 8820: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 8824: e5943014 ldr r3, [r4, #20] 8828: e3130c01 tst r3, #256 ; 0x100 882c: 1a000002 bne 883c 8830: eb001048 bl c958 <__errno> <== NOT EXECUTED 8834: e3a03009 mov r3, #9 <== NOT EXECUTED 8838: ea00001c b 88b0 <== NOT EXECUTED /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 883c: e284e018 add lr, r4, #24 8840: e8be000f ldm lr!, {r0, r1, r2, r3} 8844: e1a0c00d mov ip, sp 8848: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 884c: e5933010 ldr r3, [r3, #16] /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8850: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 8854: e3530000 cmp r3, #0 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 8858: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 885c: 0a000011 beq 88a8 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 8860: e1a0000d mov r0, sp 8864: e1a0e00f mov lr, pc 8868: e12fff13 bx r3 886c: e3500001 cmp r0, #1 8870: 1a000002 bne 8880 rtems_set_errno_and_return_minus_one( EISDIR ); 8874: eb001037 bl c958 <__errno> 8878: e3a03015 mov r3, #21 887c: ea00000b b 88b0 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 8880: e5943014 ldr r3, [r4, #20] 8884: e3130004 tst r3, #4 8888: 1a000002 bne 8898 888c: eb001031 bl c958 <__errno> <== NOT EXECUTED 8890: e3a03016 mov r3, #22 <== NOT EXECUTED 8894: ea000005 b 88b0 <== NOT EXECUTED if ( !iop->handlers->ftruncate_h ) 8898: e594303c ldr r3, [r4, #60] ; 0x3c 889c: e5933020 ldr r3, [r3, #32] 88a0: e3530000 cmp r3, #0 88a4: 1a000004 bne 88bc rtems_set_errno_and_return_minus_one( ENOTSUP ); 88a8: eb00102a bl c958 <__errno> <== NOT EXECUTED 88ac: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 88b0: e5803000 str r3, [r0] 88b4: e3e00000 mvn r0, #0 88b8: ea000004 b 88d0 return (*iop->handlers->ftruncate_h)( iop, length ); 88bc: e1a00004 mov r0, r4 88c0: e1a01005 mov r1, r5 88c4: e1a02006 mov r2, r6 88c8: e1a0e00f mov lr, pc 88cc: e12fff13 bx r3 } 88d0: e28dd014 add sp, sp, #20 88d4: e8bd8070 pop {r4, r5, r6, pc} 88d8: 000183a0 .word 0x000183a0 88dc: 00019b84 .word 0x00019b84 00052bc8 : /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 52bc8: e59f30a8 ldr r3, [pc, #168] ; 52c78 52bcc: e5933000 ldr r3, [r3] 52bd0: e1500003 cmp r0, r3 52bd4: 359f30a0 ldrcc r3, [pc, #160] ; 52c7c int getdents( int dd_fd, char *dd_buf, int dd_len ) { 52bd8: e92d4070 push {r4, r5, r6, lr} /* * Get the file control block structure associated with the file descriptor */ iop = rtems_libio_iop( dd_fd ); 52bdc: 35934000 ldrcc r4, [r3] 52be0: 23a04000 movcs r4, #0 52be4: 30844300 addcc r4, r4, r0, lsl #6 /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52be8: e284e018 add lr, r4, #24 int getdents( int dd_fd, char *dd_buf, int dd_len ) { 52bec: e24dd014 sub sp, sp, #20 52bf0: e1a06001 mov r6, r1 52bf4: e1a05002 mov r5, r2 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52bf8: e8be000f ldm lr!, {r0, r1, r2, r3} 52bfc: e1a0c00d mov ip, sp 52c00: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !loc.ops->node_type_h ) 52c04: e5933010 ldr r3, [r3, #16] iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52c08: e59e2000 ldr r2, [lr] if ( !loc.ops->node_type_h ) 52c0c: e3530000 cmp r3, #0 iop = rtems_libio_iop( dd_fd ); /* * Make sure we are working on a directory */ loc = iop->pathinfo; 52c10: e58c2000 str r2, [ip] if ( !loc.ops->node_type_h ) 52c14: 0a00000d beq 52c50 rtems_set_errno_and_return_minus_one( ENOTSUP ); if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) 52c18: e1a0000d mov r0, sp 52c1c: e1a0e00f mov lr, pc 52c20: e12fff13 bx r3 52c24: e3500001 cmp r0, #1 52c28: 0a000004 beq 52c40 rtems_set_errno_and_return_minus_one( ENOTDIR ); 52c2c: ebff991a bl 3909c <__errno> 52c30: e3a03014 mov r3, #20 52c34: e5803000 str r3, [r0] 52c38: e3e00000 mvn r0, #0 52c3c: ea00000b b 52c70 /* * Return the number of bytes that were actually transfered as a result * of the read attempt. */ if ( !iop->handlers->read_h ) 52c40: e594303c ldr r3, [r4, #60] ; 0x3c 52c44: e5933008 ldr r3, [r3, #8] 52c48: e3530000 cmp r3, #0 52c4c: 1a000002 bne 52c5c rtems_set_errno_and_return_minus_one( ENOTSUP ); 52c50: ebff9911 bl 3909c <__errno> <== NOT EXECUTED 52c54: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 52c58: eafffff5 b 52c34 <== NOT EXECUTED return (*iop->handlers->read_h)( iop, dd_buf, dd_len ); 52c5c: e1a00004 mov r0, r4 52c60: e1a01006 mov r1, r6 52c64: e1a02005 mov r2, r5 52c68: e1a0e00f mov lr, pc 52c6c: e12fff13 bx r3 } 52c70: e28dd014 add sp, sp, #20 52c74: e8bd8070 pop {r4, r5, r6, pc} 52c78: 000531e0 .word 0x000531e0 52c7c: 00060c64 .word 0x00060c64 000221f0 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ gid_t getgid( void ) { 221f0: e59f3008 ldr r3, [pc, #8] ; 22200 <== NOT EXECUTED 221f4: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Gid; } 221f8: e1d303b4 ldrh r0, [r3, #52] ; 0x34 <== NOT EXECUTED 221fc: e12fff1e bx lr <== NOT EXECUTED 22200: 000534b8 .word 0x000534b8 00022808 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 22808: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 2280c: e59da01c ldr sl, [sp, #28] 22810: e1a06000 mov r6, r0 22814: e1a07001 mov r7, r1 22818: e1a04002 mov r4, r2 2281c: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 22820: ebffffb7 bl 22704 if ((fp = fopen("/etc/group", "r")) == NULL) { 22824: e59f00a4 ldr r0, [pc, #164] ; 228d0 22828: e59f10a4 ldr r1, [pc, #164] ; 228d4 2282c: eb005c8a bl 39a5c 22830: e2505000 subs r5, r0, #0 22834: 1a000003 bne 22848 errno = EINVAL; 22838: eb005a17 bl 3909c <__errno> <== NOT EXECUTED 2283c: e3a03016 mov r3, #22 <== NOT EXECUTED 22840: e5803000 str r3, [r0] <== NOT EXECUTED 22844: ea00000c b 2287c <== NOT EXECUTED return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 22848: e1a01004 mov r1, r4 2284c: e1a02008 mov r2, r8 22850: e1a0300a mov r3, sl 22854: e1a00005 mov r0, r5 22858: ebfffef2 bl 22428 2285c: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(grp->gr_name, name) == 0); 22860: e1a01006 mov r1, r6 if ((fp = fopen("/etc/group", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scangr(fp, grp, buffer, bufsize)) { 22864: 1a000006 bne 22884 errno = EINVAL; 22868: eb005a0b bl 3909c <__errno> <== NOT EXECUTED 2286c: e3a03016 mov r3, #22 <== NOT EXECUTED 22870: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 22874: e1a00005 mov r0, r5 <== NOT EXECUTED 22878: eb005a54 bl 391d0 <== NOT EXECUTED 2287c: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 22880: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 22884: e3560000 cmp r6, #0 22888: 0a000004 beq 228a0 match = (strcmp(grp->gr_name, name) == 0); 2288c: e5940000 ldr r0, [r4] 22890: eb007224 bl 3f128 22894: e2700001 rsbs r0, r0, #1 22898: 33a00000 movcc r0, #0 2289c: ea000003 b 228b0 } else { match = (grp->gr_gid == gid); 228a0: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 228a4: e1500007 cmp r0, r7 <== NOT EXECUTED 228a8: 13a00000 movne r0, #0 <== NOT EXECUTED 228ac: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 228b0: e3500000 cmp r0, #0 228b4: 0affffe3 beq 22848 fclose(fp); 228b8: e1a00005 mov r0, r5 228bc: eb005a43 bl 391d0 *result = grp; 228c0: e59d3020 ldr r3, [sp, #32] 228c4: e3a00000 mov r0, #0 228c8: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 228cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 228d0: 00057678 .word 0x00057678 228d4: 000583f0 .word 0x000583f0 00022560 : return NULL; return p; } struct group *getgrent(void) { 22560: e92d4010 push {r4, lr} <== NOT EXECUTED if (group_fp == NULL) 22564: e59f402c ldr r4, [pc, #44] ; 22598 <== NOT EXECUTED 22568: e5940000 ldr r0, [r4] <== NOT EXECUTED 2256c: e3500000 cmp r0, #0 <== NOT EXECUTED 22570: 0a000006 beq 22590 <== NOT EXECUTED return NULL; if (!scangr(group_fp, &grent, grbuf, sizeof grbuf)) 22574: e2841008 add r1, r4, #8 <== NOT EXECUTED 22578: e2842018 add r2, r4, #24 <== NOT EXECUTED 2257c: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22580: ebffffa8 bl 22428 <== NOT EXECUTED 22584: e3500000 cmp r0, #0 <== NOT EXECUTED 22588: 12840008 addne r0, r4, #8 <== NOT EXECUTED 2258c: 18bd8010 popne {r4, pc} <== NOT EXECUTED 22590: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &grent; } 22594: e8bd8010 pop {r4, pc} <== NOT EXECUTED 22598: 00060978 .word 0x00060978 0002290c : struct group *getgrgid( gid_t gid ) { 2290c: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 22910: e59f1028 ldr r1, [pc, #40] ; 22940 <== NOT EXECUTED } struct group *getgrgid( gid_t gid ) { 22914: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct group *p; if(getgrgid_r(gid, &grent, grbuf, sizeof grbuf, &p)) 22918: e28dc004 add ip, sp, #4 <== NOT EXECUTED 2291c: e2812010 add r2, r1, #16 <== NOT EXECUTED 22920: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22924: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22928: e58dc000 str ip, [sp] <== NOT EXECUTED 2292c: ebffffe9 bl 228d8 <== NOT EXECUTED 22930: e3500000 cmp r0, #0 <== NOT EXECUTED 22934: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 22938: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 2293c: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 22940: 00060980 .word 0x00060980 000228d8 : struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 228d8: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 228dc: e1a0c002 mov ip, r2 <== NOT EXECUTED 228e0: e1a0e001 mov lr, r1 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 228e4: e58d3000 str r3, [sp] <== NOT EXECUTED struct group *grp, char *buffer, size_t bufsize, struct group **result ) { 228e8: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getgr_r(NULL, gid, grp, buffer, bufsize, result); 228ec: e1a0300c mov r3, ip <== NOT EXECUTED 228f0: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 228f4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 228f8: e1a0200e mov r2, lr <== NOT EXECUTED 228fc: e3a00000 mov r0, #0 <== NOT EXECUTED 22900: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22904: ebffffbf bl 22808 <== NOT EXECUTED } 22908: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 000229d8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 229d8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 229dc: e59da01c ldr sl, [sp, #28] 229e0: e1a06000 mov r6, r0 229e4: e1a07001 mov r7, r1 229e8: e1a04002 mov r4, r2 229ec: e1a08003 mov r8, r3 FILE *fp; int match; init_etc_passwd_group(); 229f0: ebffff43 bl 22704 if ((fp = fopen("/etc/passwd", "r")) == NULL) { 229f4: e59f00a4 ldr r0, [pc, #164] ; 22aa0 229f8: e59f10a4 ldr r1, [pc, #164] ; 22aa4 229fc: eb005c16 bl 39a5c 22a00: e2505000 subs r5, r0, #0 22a04: 1a000003 bne 22a18 errno = EINVAL; 22a08: eb0059a3 bl 3909c <__errno> <== NOT EXECUTED 22a0c: e3a03016 mov r3, #22 <== NOT EXECUTED 22a10: e5803000 str r3, [r0] <== NOT EXECUTED 22a14: ea00000c b 22a4c <== NOT EXECUTED return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22a18: e1a01004 mov r1, r4 22a1c: e1a02008 mov r2, r8 22a20: e1a0300a mov r3, sl 22a24: e1a00005 mov r0, r5 22a28: ebfffedb bl 2259c 22a2c: e3500000 cmp r0, #0 errno = EINVAL; fclose(fp); return -1; } if (name) { match = (strcmp(pwd->pw_name, name) == 0); 22a30: e1a01006 mov r1, r6 if ((fp = fopen("/etc/passwd", "r")) == NULL) { errno = EINVAL; return -1; } for(;;) { if (!scanpw(fp, pwd, buffer, bufsize)) { 22a34: 1a000006 bne 22a54 errno = EINVAL; 22a38: eb005997 bl 3909c <__errno> <== NOT EXECUTED 22a3c: e3a03016 mov r3, #22 <== NOT EXECUTED 22a40: e5803000 str r3, [r0] <== NOT EXECUTED fclose(fp); 22a44: e1a00005 mov r0, r5 <== NOT EXECUTED 22a48: eb0059e0 bl 391d0 <== NOT EXECUTED 22a4c: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 22a50: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } if (name) { 22a54: e3560000 cmp r6, #0 22a58: 0a000004 beq 22a70 match = (strcmp(pwd->pw_name, name) == 0); 22a5c: e5940000 ldr r0, [r4] 22a60: eb0071b0 bl 3f128 22a64: e2700001 rsbs r0, r0, #1 22a68: 33a00000 movcc r0, #0 22a6c: ea000003 b 22a80 } else { match = (pwd->pw_uid == uid); 22a70: e1d400b8 ldrh r0, [r4, #8] <== NOT EXECUTED 22a74: e1500007 cmp r0, r7 <== NOT EXECUTED 22a78: 13a00000 movne r0, #0 <== NOT EXECUTED 22a7c: 03a00001 moveq r0, #1 <== NOT EXECUTED } if (match) { 22a80: e3500000 cmp r0, #0 22a84: 0affffe3 beq 22a18 fclose(fp); 22a88: e1a00005 mov r0, r5 22a8c: eb0059cf bl 391d0 *result = pwd; 22a90: e59d3020 ldr r3, [sp, #32] 22a94: e3a00000 mov r0, #0 22a98: e5834000 str r4, [r3] } } fclose(fp); errno = EINVAL; return -1; } 22a9c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 22aa0: 000575ca .word 0x000575ca 22aa4: 000583f0 .word 0x000583f0 000226c8 : return NULL; return p; } struct passwd *getpwent(void) { 226c8: e92d4010 push {r4, lr} <== NOT EXECUTED if (passwd_fp == NULL) 226cc: e59f402c ldr r4, [pc, #44] ; 22700 <== NOT EXECUTED 226d0: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 226d4: e3500000 cmp r0, #0 <== NOT EXECUTED 226d8: 0a000006 beq 226f8 <== NOT EXECUTED return NULL; if (!scanpw(passwd_fp, &pwent, pwbuf, sizeof pwbuf)) 226dc: e28410e0 add r1, r4, #224 ; 0xe0 <== NOT EXECUTED 226e0: e28420fc add r2, r4, #252 ; 0xfc <== NOT EXECUTED 226e4: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 226e8: ebffffab bl 2259c <== NOT EXECUTED 226ec: e3500000 cmp r0, #0 <== NOT EXECUTED 226f0: 128400e0 addne r0, r4, #224 ; 0xe0 <== NOT EXECUTED 226f4: 18bd8010 popne {r4, pc} <== NOT EXECUTED 226f8: e3a00000 mov r0, #0 <== NOT EXECUTED return NULL; return &pwent; } 226fc: e8bd8010 pop {r4, pc} <== NOT EXECUTED 22700: 00060978 .word 0x00060978 00022adc : struct passwd *getpwuid( uid_t uid ) { 22adc: e92d4003 push {r0, r1, lr} <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22ae0: e59f1028 ldr r1, [pc, #40] ; 22b10 <== NOT EXECUTED } struct passwd *getpwuid( uid_t uid ) { 22ae4: e1a00800 lsl r0, r0, #16 <== NOT EXECUTED struct passwd *p; if(getpwuid_r(uid, &pwent, pwbuf, sizeof pwbuf, &p)) 22ae8: e28dc004 add ip, sp, #4 <== NOT EXECUTED 22aec: e281201c add r2, r1, #28 <== NOT EXECUTED 22af0: e3a030c8 mov r3, #200 ; 0xc8 <== NOT EXECUTED 22af4: e1a00820 lsr r0, r0, #16 <== NOT EXECUTED 22af8: e58dc000 str ip, [sp] <== NOT EXECUTED 22afc: ebffffe9 bl 22aa8 <== NOT EXECUTED 22b00: e3500000 cmp r0, #0 <== NOT EXECUTED 22b04: 13a00000 movne r0, #0 <== NOT EXECUTED return NULL; return p; 22b08: 059d0004 ldreq r0, [sp, #4] <== NOT EXECUTED } 22b0c: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 22b10: 00060a58 .word 0x00060a58 00022aa8 : struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22aa8: e92d4003 push {r0, r1, lr} <== NOT EXECUTED 22aac: e1a0c002 mov ip, r2 <== NOT EXECUTED 22ab0: e1a0e001 mov lr, r1 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22ab4: e58d3000 str r3, [sp] <== NOT EXECUTED struct passwd *pwd, char *buffer, size_t bufsize, struct passwd **result ) { 22ab8: e1a01800 lsl r1, r0, #16 <== NOT EXECUTED return getpw_r(NULL, uid, pwd, buffer, bufsize, result); 22abc: e1a0300c mov r3, ip <== NOT EXECUTED 22ac0: e59dc00c ldr ip, [sp, #12] <== NOT EXECUTED 22ac4: e1a01821 lsr r1, r1, #16 <== NOT EXECUTED 22ac8: e1a0200e mov r2, lr <== NOT EXECUTED 22acc: e3a00000 mov r0, #0 <== NOT EXECUTED 22ad0: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 22ad4: ebffffbf bl 229d8 <== NOT EXECUTED } 22ad8: e8bd800c pop {r2, r3, pc} <== NOT EXECUTED 00008908 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 8908: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) { 890c: e2504000 subs r4, r0, #0 8910: 1a000004 bne 8928 errno = EFAULT; 8914: eb00100f bl c958 <__errno> <== NOT EXECUTED 8918: e3a0300e mov r3, #14 <== NOT EXECUTED 891c: e5803000 str r3, [r0] <== NOT EXECUTED 8920: e3e00000 mvn r0, #0 <== NOT EXECUTED return -1; 8924: ea00000c b 895c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 8928: e10f5000 mrs r5, CPSR 892c: e3853080 orr r3, r5, #128 ; 0x80 8930: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 8934: e1a0000d mov r0, sp 8938: eb0004df bl 9cbc <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 893c: 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; 8940: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; 8944: e59d0004 ldr r0, [sp, #4] useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; time->tv_usec = useconds; 8948: 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; 894c: e5843000 str r3, [r4] time->tv_usec = useconds; 8950: eb0035b7 bl 16034 <__aeabi_idiv> 8954: e5840004 str r0, [r4, #4] 8958: 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; } 895c: e8bd803c pop {r2, r3, r4, r5, pc} 00005314 : * 4.2.1 Get Real User, Effective User, Ral Group, and Effective Group IDs, * P1003.1b-1993, p. 84 */ uid_t getuid( void ) { 5314: e59f3008 ldr r3, [pc, #8] ; 5324 <== NOT EXECUTED 5318: e5933000 ldr r3, [r3] <== NOT EXECUTED return _POSIX_types_Uid; } 531c: e1d303b2 ldrh r0, [r3, #50] ; 0x32 <== NOT EXECUTED 5320: e12fff1e bx lr <== NOT EXECUTED 5324: 000534b8 .word 0x000534b8 00004ac4 : int ioctl( int fd, ioctl_command_t command, ... ) { 4ac4: e92d000e push {r1, r2, r3} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ac8: e59f3080 ldr r3, [pc, #128] ; 4b50 4acc: e5933000 ldr r3, [r3] 4ad0: e1500003 cmp r0, r3 int ioctl( int fd, ioctl_command_t command, ... ) { 4ad4: e92d4001 push {r0, lr} va_list ap; rtems_status_code rc; rtems_libio_t *iop; void *buffer; rtems_libio_check_fd( fd ); 4ad8: 2a00000b bcs 4b0c iop = rtems_libio_iop( fd ); 4adc: e59f3070 ldr r3, [pc, #112] ; 4b54 4ae0: e5933000 ldr r3, [r3] 4ae4: e0830300 add r0, r3, r0, lsl #6 rtems_libio_check_is_open(iop); 4ae8: e5903014 ldr r3, [r0, #20] 4aec: e3130c01 tst r3, #256 ; 0x100 4af0: 0a000005 beq 4b0c /* * Now process the ioctl(). */ if ( !iop->handlers ) 4af4: 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 *); 4af8: e28d2010 add r2, sp, #16 /* * Now process the ioctl(). */ if ( !iop->handlers ) 4afc: e3530000 cmp r3, #0 iop = rtems_libio_iop( fd ); rtems_libio_check_is_open(iop); va_start(ap, command); buffer = va_arg(ap, void *); 4b00: e58d2000 str r2, [sp] 4b04: e59d200c ldr r2, [sp, #12] /* * Now process the ioctl(). */ if ( !iop->handlers ) 4b08: 1a000002 bne 4b18 rtems_set_errno_and_return_minus_one( EBADF ); 4b0c: eb003477 bl 11cf0 <__errno> 4b10: e3a03009 mov r3, #9 4b14: ea000004 b 4b2c if ( !iop->handlers->ioctl_h ) 4b18: e5933010 ldr r3, [r3, #16] 4b1c: e3530000 cmp r3, #0 4b20: 1a000004 bne 4b38 rtems_set_errno_and_return_minus_one( ENOTSUP ); 4b24: eb003471 bl 11cf0 <__errno> <== NOT EXECUTED 4b28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 4b2c: e5803000 str r3, [r0] 4b30: e3e00000 mvn r0, #0 4b34: ea000002 b 4b44 rc = (*iop->handlers->ioctl_h)( iop, command, buffer ); 4b38: e59d1008 ldr r1, [sp, #8] 4b3c: e1a0e00f mov lr, pc 4b40: e12fff13 bx r3 return rc; } 4b44: e8bd4008 pop {r3, lr} 4b48: e28dd00c add sp, sp, #12 4b4c: e12fff1e bx lr 4b50: 0001dc00 .word 0x0001dc00 4b54: 0001f814 .word 0x0001f814 000028a0 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 28a0: e5913030 ldr r3, [r1, #48] ; 0x30 <== NOT EXECUTED 28a4: e3130020 tst r3, #32 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28a8: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 28ac: e20050ff and r5, r0, #255 ; 0xff <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 28b0: 1200507f andne r5, r0, #127 ; 0x7f <== NOT EXECUTED if (tty->termios.c_iflag & IUCLC) 28b4: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 28b8: e1a04001 mov r4, r1 <== NOT EXECUTED if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 28bc: 0a000007 beq 28e0 <== NOT EXECUTED c = tolower (c); 28c0: e59f2164 ldr r2, [pc, #356] ; 2a2c <== NOT EXECUTED 28c4: e5922000 ldr r2, [r2] <== NOT EXECUTED 28c8: e0822005 add r2, r2, r5 <== NOT EXECUTED 28cc: e5d22001 ldrb r2, [r2, #1] <== NOT EXECUTED 28d0: e2022003 and r2, r2, #3 <== NOT EXECUTED 28d4: e3520001 cmp r2, #1 <== NOT EXECUTED 28d8: 02855020 addeq r5, r5, #32 <== NOT EXECUTED 28dc: e20550ff and r5, r5, #255 ; 0xff <== NOT EXECUTED if (c == '\r') { 28e0: e355000d cmp r5, #13 <== NOT EXECUTED 28e4: 1a000005 bne 2900 <== NOT EXECUTED if (tty->termios.c_iflag & IGNCR) 28e8: e3130080 tst r3, #128 ; 0x80 <== NOT EXECUTED 28ec: 1a00004c bne 2a24 <== NOT EXECUTED return 0; if (tty->termios.c_iflag & ICRNL) 28f0: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 28f4: 03a0500d moveq r5, #13 <== NOT EXECUTED 28f8: 13a0500a movne r5, #10 <== NOT EXECUTED 28fc: ea000007 b 2920 <== NOT EXECUTED c = '\n'; } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 2900: e355000a cmp r5, #10 <== NOT EXECUTED 2904: 1a000003 bne 2918 <== NOT EXECUTED 2908: e3130040 tst r3, #64 ; 0x40 <== NOT EXECUTED 290c: 03a0500a moveq r5, #10 <== NOT EXECUTED 2910: 13a0500d movne r5, #13 <== NOT EXECUTED 2914: ea000001 b 2920 <== NOT EXECUTED c = '\r'; } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 2918: e3550000 cmp r5, #0 <== NOT EXECUTED 291c: 0a00002e beq 29dc <== NOT EXECUTED 2920: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2924: e3130002 tst r3, #2 <== NOT EXECUTED 2928: 0a00002b beq 29dc <== NOT EXECUTED if (c == tty->termios.c_cc[VERASE]) { 292c: e5d42043 ldrb r2, [r4, #67] ; 0x43 <== NOT EXECUTED 2930: e1520005 cmp r2, r5 <== NOT EXECUTED erase (tty, 0); 2934: 01a00004 moveq r0, r4 <== NOT EXECUTED 2938: 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]) { 293c: 0a000004 beq 2954 <== NOT EXECUTED erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 2940: e5d42044 ldrb r2, [r4, #68] ; 0x44 <== NOT EXECUTED 2944: e1520005 cmp r2, r5 <== NOT EXECUTED 2948: 1a000003 bne 295c <== NOT EXECUTED erase (tty, 1); 294c: e1a00004 mov r0, r4 <== NOT EXECUTED 2950: e3a01001 mov r1, #1 <== NOT EXECUTED 2954: ebffff5e bl 26d4 <== NOT EXECUTED 2958: ea00002f b 2a1c <== NOT EXECUTED return 0; } else if (c == tty->termios.c_cc[VEOF]) { 295c: e5d42045 ldrb r2, [r4, #69] ; 0x45 <== NOT EXECUTED 2960: e1520005 cmp r2, r5 <== NOT EXECUTED 2964: 0a00001a beq 29d4 <== NOT EXECUTED return 1; } else if (c == '\n') { 2968: e355000a cmp r5, #10 <== NOT EXECUTED 296c: 1a000009 bne 2998 <== NOT EXECUTED if (tty->termios.c_lflag & (ECHO | ECHONL)) 2970: e3130048 tst r3, #72 ; 0x48 <== NOT EXECUTED echo (c, tty); 2974: 11a00005 movne r0, r5 <== NOT EXECUTED 2978: 11a01004 movne r1, r4 <== NOT EXECUTED 297c: 1bffff34 blne 2654 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2980: e284101c add r1, r4, #28 <== NOT EXECUTED 2984: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2988: e3a0000a mov r0, #10 <== NOT EXECUTED 298c: e2832001 add r2, r3, #1 <== NOT EXECUTED 2990: e7c10003 strb r0, [r1, r3] <== NOT EXECUTED 2994: ea00000d b 29d0 <== NOT EXECUTED return 1; } else if ((c == tty->termios.c_cc[VEOL]) 2998: e5d4204c ldrb r2, [r4, #76] ; 0x4c <== NOT EXECUTED 299c: e1520005 cmp r2, r5 <== NOT EXECUTED 29a0: 0a000002 beq 29b0 <== NOT EXECUTED || (c == tty->termios.c_cc[VEOL2])) { 29a4: e5d42051 ldrb r2, [r4, #81] ; 0x51 <== NOT EXECUTED 29a8: e1520005 cmp r2, r5 <== NOT EXECUTED 29ac: 1a00000a bne 29dc <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29b0: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 29b4: 11a00005 movne r0, r5 <== NOT EXECUTED 29b8: 11a01004 movne r1, r4 <== NOT EXECUTED 29bc: 1bffff24 blne 2654 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 29c0: e284101c add r1, r4, #28 <== NOT EXECUTED 29c4: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 29c8: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 29cc: e2832001 add r2, r3, #1 <== NOT EXECUTED 29d0: e5842020 str r2, [r4, #32] <== NOT EXECUTED 29d4: e3a00001 mov r0, #1 <== NOT EXECUTED return 1; 29d8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 29dc: e59f304c ldr r3, [pc, #76] ; 2a30 <== NOT EXECUTED 29e0: e5933000 ldr r3, [r3] <== NOT EXECUTED 29e4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 29e8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 29ec: e1520003 cmp r2, r3 <== NOT EXECUTED 29f0: aa00000b bge 2a24 <== NOT EXECUTED if (tty->termios.c_lflag & ECHO) 29f4: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 29f8: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 29fc: 11a00005 movne r0, r5 <== NOT EXECUTED 2a00: 11a01004 movne r1, r4 <== NOT EXECUTED 2a04: 1bffff12 blne 2654 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 2a08: e284101c add r1, r4, #28 <== NOT EXECUTED 2a0c: e891000a ldm r1, {r1, r3} <== NOT EXECUTED 2a10: e2832001 add r2, r3, #1 <== NOT EXECUTED 2a14: e7c15003 strb r5, [r1, r3] <== NOT EXECUTED 2a18: e5842020 str r2, [r4, #32] <== NOT EXECUTED 2a1c: e3a00000 mov r0, #0 <== NOT EXECUTED 2a20: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a24: e3a00000 mov r0, #0 <== NOT EXECUTED } return 0; } 2a28: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 2a2c: 000185e0 .word 0x000185e0 2a30: 00018524 .word 0x00018524 00022c00 : int link( const char *existing, const char *new ) { 22c00: e92d4030 push {r4, r5, lr} 22c04: e24dd030 sub sp, sp, #48 ; 0x30 22c08: e1a04001 mov r4, r1 22c0c: e1a05000 mov r5, r0 /* * Get the node we are linking to. */ result = rtems_filesystem_evaluate_path( existing, strlen( existing ), 22c10: eb0073ac bl 3fac8 22c14: e3a0c001 mov ip, #1 22c18: e1a01000 mov r1, r0 22c1c: e3a02000 mov r2, #0 22c20: e1a00005 mov r0, r5 22c24: e28d3018 add r3, sp, #24 22c28: e58dc000 str ip, [sp] 22c2c: ebff8942 bl 513c 0, &existing_loc, true ); if ( result != 0 ) 22c30: e3500000 cmp r0, #0 22c34: 1a00002a bne 22ce4 /* * Get the parent of the node we are creating. */ rtems_filesystem_get_start_loc( new, &i, &parent_loc ); 22c38: e5d43000 ldrb r3, [r4] 22c3c: e353002f cmp r3, #47 ; 0x2f 22c40: 1353005c cmpne r3, #92 ; 0x5c 22c44: 13a05000 movne r5, #0 22c48: 03a05001 moveq r5, #1 22c4c: 0a000001 beq 22c58 22c50: e3530000 cmp r3, #0 22c54: 1a000009 bne 22c80 22c58: e59f31ec ldr r3, [pc, #492] ; 22e4c 22c5c: e593e000 ldr lr, [r3] 22c60: e28ee018 add lr, lr, #24 22c64: e8be000f ldm lr!, {r0, r1, r2, r3} 22c68: e28dc004 add ip, sp, #4 22c6c: e8ac000f stmia ip!, {r0, r1, r2, r3} 22c70: e59e3000 ldr r3, [lr] 22c74: e3a00001 mov r0, #1 22c78: e58c3000 str r3, [ip] 22c7c: ea000008 b 22ca4 22c80: e59f31c4 ldr r3, [pc, #452] ; 22e4c 22c84: e593e000 ldr lr, [r3] 22c88: e28ee004 add lr, lr, #4 22c8c: e8be000f ldm lr!, {r0, r1, r2, r3} 22c90: e28dc004 add ip, sp, #4 22c94: e8ac000f stmia ip!, {r0, r1, r2, r3} 22c98: e59e3000 ldr r3, [lr] 22c9c: e58c3000 str r3, [ip] 22ca0: e1a00005 mov r0, r5 if ( !parent_loc.ops->evalformake_h ) { 22ca4: e59d3010 ldr r3, [sp, #16] 22ca8: e5933004 ldr r3, [r3, #4] 22cac: e3530000 cmp r3, #0 22cb0: 1a00000d bne 22cec rtems_filesystem_freenode( &existing_loc ); 22cb4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22cb8: e3530000 cmp r3, #0 <== NOT EXECUTED 22cbc: 0a000005 beq 22cd8 <== NOT EXECUTED 22cc0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22cc4: e3530000 cmp r3, #0 <== NOT EXECUTED 22cc8: 0a000002 beq 22cd8 <== NOT EXECUTED 22ccc: e28d0018 add r0, sp, #24 <== NOT EXECUTED 22cd0: e1a0e00f mov lr, pc <== NOT EXECUTED 22cd4: e12fff13 bx r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22cd8: eb0058ef bl 3909c <__errno> <== NOT EXECUTED 22cdc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22ce0: e5803000 str r3, [r0] 22ce4: e3e05000 mvn r5, #0 22ce8: ea000054 b 22e40 } result = (*parent_loc.ops->evalformake_h)( &new[i], &parent_loc, &name_start ); 22cec: e28d5004 add r5, sp, #4 22cf0: e0840000 add r0, r4, r0 22cf4: e1a01005 mov r1, r5 22cf8: e28d202c add r2, sp, #44 ; 0x2c 22cfc: e1a0e00f mov lr, pc 22d00: e12fff13 bx r3 if ( result != 0 ) { 22d04: e2504000 subs r4, r0, #0 22d08: 0a00000a beq 22d38 rtems_filesystem_freenode( &existing_loc ); 22d0c: e59d3024 ldr r3, [sp, #36] ; 0x24 22d10: e3530000 cmp r3, #0 22d14: 0a000004 beq 22d2c 22d18: e593301c ldr r3, [r3, #28] 22d1c: e3530000 cmp r3, #0 22d20: 128d0018 addne r0, sp, #24 22d24: 11a0e00f movne lr, pc 22d28: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( result ); 22d2c: eb0058da bl 3909c <__errno> 22d30: e5804000 str r4, [r0] 22d34: eaffffea b 22ce4 /* * Check to see if the caller is trying to link across file system * boundaries. */ if ( parent_loc.mt_entry != existing_loc.mt_entry ) { 22d38: e59d3028 ldr r3, [sp, #40] ; 0x28 22d3c: e59d2014 ldr r2, [sp, #20] 22d40: e1520003 cmp r2, r3 22d44: 0a000012 beq 22d94 rtems_filesystem_freenode( &existing_loc ); 22d48: e59d3024 ldr r3, [sp, #36] ; 0x24 22d4c: e3530000 cmp r3, #0 22d50: 0a000004 beq 22d68 22d54: e593301c ldr r3, [r3, #28] 22d58: e3530000 cmp r3, #0 22d5c: 128d0018 addne r0, sp, #24 22d60: 11a0e00f movne lr, pc 22d64: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22d68: e59d3010 ldr r3, [sp, #16] 22d6c: e3530000 cmp r3, #0 22d70: 0a000004 beq 22d88 22d74: e593301c ldr r3, [r3, #28] 22d78: e3530000 cmp r3, #0 22d7c: 128d0004 addne r0, sp, #4 22d80: 11a0e00f movne lr, pc 22d84: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EXDEV ); 22d88: eb0058c3 bl 3909c <__errno> 22d8c: e3a03012 mov r3, #18 22d90: eaffffd2 b 22ce0 } if ( !parent_loc.ops->link_h ) { 22d94: e59d3010 ldr r3, [sp, #16] 22d98: e5933008 ldr r3, [r3, #8] 22d9c: e3530000 cmp r3, #0 22da0: 1a00000f bne 22de4 rtems_filesystem_freenode( &existing_loc ); 22da4: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 22da8: e3530000 cmp r3, #0 <== NOT EXECUTED 22dac: 0a000004 beq 22dc4 <== NOT EXECUTED 22db0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22db4: e3530000 cmp r3, #0 <== NOT EXECUTED 22db8: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 22dbc: 11a0e00f movne lr, pc <== NOT EXECUTED 22dc0: 112fff13 bxne r3 <== NOT EXECUTED rtems_filesystem_freenode( &parent_loc ); 22dc4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22dc8: e3530000 cmp r3, #0 <== NOT EXECUTED 22dcc: 0affffc1 beq 22cd8 <== NOT EXECUTED 22dd0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22dd4: e3530000 cmp r3, #0 <== NOT EXECUTED 22dd8: 128d0004 addne r0, sp, #4 <== NOT EXECUTED 22ddc: 1affffbb bne 22cd0 <== NOT EXECUTED 22de0: eaffffbc b 22cd8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*parent_loc.ops->link_h)( &existing_loc, &parent_loc, name_start ); 22de4: e28d4018 add r4, sp, #24 22de8: e1a01005 mov r1, r5 22dec: e1a00004 mov r0, r4 22df0: e59d202c ldr r2, [sp, #44] ; 0x2c 22df4: e1a0e00f mov lr, pc 22df8: e12fff13 bx r3 rtems_filesystem_freenode( &existing_loc ); 22dfc: e59d3024 ldr r3, [sp, #36] ; 0x24 22e00: 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 ); 22e04: e1a05000 mov r5, r0 rtems_filesystem_freenode( &existing_loc ); 22e08: 0a000004 beq 22e20 22e0c: e593301c ldr r3, [r3, #28] 22e10: e3530000 cmp r3, #0 22e14: 11a00004 movne r0, r4 22e18: 11a0e00f movne lr, pc 22e1c: 112fff13 bxne r3 rtems_filesystem_freenode( &parent_loc ); 22e20: e59d3010 ldr r3, [sp, #16] 22e24: e3530000 cmp r3, #0 22e28: 0a000004 beq 22e40 22e2c: e593301c ldr r3, [r3, #28] 22e30: e3530000 cmp r3, #0 22e34: 128d0004 addne r0, sp, #4 22e38: 11a0e00f movne lr, pc 22e3c: 112fff13 bxne r3 return result; } 22e40: e1a00005 mov r0, r5 22e44: e28dd030 add sp, sp, #48 ; 0x30 22e48: e8bd8030 pop {r4, r5, pc} 22e4c: 000534b8 .word 0x000534b8 00017940 : { rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17940: e59fc0ec ldr ip, [pc, #236] ; 17a34 17944: e59cc000 ldr ip, [ip] 17948: e150000c cmp r0, ip off_t lseek( int fd, off_t offset, int whence ) { 1794c: e92d4870 push {r4, r5, r6, fp, lr} rtems_libio_t *iop; off_t old_offset; off_t status; rtems_libio_check_fd( fd ); 17950: 2a000005 bcs 1796c iop = rtems_libio_iop( fd ); 17954: e59fc0dc ldr ip, [pc, #220] ; 17a38 17958: e59c4000 ldr r4, [ip] 1795c: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open(iop); 17960: e5940014 ldr r0, [r4, #20] 17964: e3100c01 tst r0, #256 ; 0x100 17968: 1a000002 bne 17978 1796c: ebffd3f9 bl c958 <__errno> 17970: e3a03009 mov r3, #9 17974: ea00001c b 179ec /* * Check as many errors as possible before touching iop->offset. */ if ( !iop->handlers->lseek_h ) 17978: e594003c ldr r0, [r4, #60] ; 0x3c 1797c: e5900014 ldr r0, [r0, #20] 17980: e3500000 cmp r0, #0 17984: 1a000002 bne 17994 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17988: ebffd3f2 bl c958 <__errno> <== NOT EXECUTED 1798c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17990: ea000015 b 179ec <== NOT EXECUTED /* * Now process the lseek(). */ old_offset = iop->offset; switch ( whence ) { 17994: e3530001 cmp r3, #1 /* * Now process the lseek(). */ old_offset = iop->offset; 17998: e284600c add r6, r4, #12 1799c: e8960060 ldm r6, {r5, r6} switch ( whence ) { 179a0: 0a000006 beq 179c0 179a4: e3530002 cmp r3, #2 179a8: 0a000007 beq 179cc 179ac: e3530000 cmp r3, #0 179b0: 1a00000b bne 179e4 case SEEK_SET: iop->offset = offset; 179b4: e584100c str r1, [r4, #12] 179b8: e5842010 str r2, [r4, #16] break; 179bc: ea00000e b 179fc case SEEK_CUR: iop->offset += offset; 179c0: e091b005 adds fp, r1, r5 179c4: e0a2c006 adc ip, r2, r6 179c8: ea000002 b 179d8 break; case SEEK_END: iop->offset = iop->size + offset; 179cc: e9941800 ldmib r4, {fp, ip} 179d0: e09bb001 adds fp, fp, r1 179d4: e0acc002 adc ip, ip, r2 179d8: e584b00c str fp, [r4, #12] 179dc: e584c010 str ip, [r4, #16] break; 179e0: ea000005 b 179fc default: rtems_set_errno_and_return_minus_one( EINVAL ); 179e4: ebffd3db bl c958 <__errno> 179e8: e3a03016 mov r3, #22 179ec: e5803000 str r3, [r0] 179f0: e3e02000 mvn r2, #0 179f4: e3e03000 mvn r3, #0 179f8: ea00000a b 17a28 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 179fc: e594c03c ldr ip, [r4, #60] ; 0x3c 17a00: e1a00004 mov r0, r4 17a04: e1a0e00f mov lr, pc 17a08: e59cf014 ldr pc, [ip, #20] if ( status == (off_t) -1 ) 17a0c: e3700001 cmn r0, #1 /* * At this time, handlers assume iop->offset has the desired * new offset. */ status = (*iop->handlers->lseek_h)( iop, offset, whence ); 17a10: e1a02000 mov r2, r0 17a14: e1a03001 mov r3, r1 if ( status == (off_t) -1 ) 17a18: 1a000002 bne 17a28 17a1c: e3710001 cmn r1, #1 iop->offset = old_offset; 17a20: 0584500c streq r5, [r4, #12] 17a24: 05846010 streq r6, [r4, #16] /* * So if the operation failed, we have to restore iop->offset. */ return status; } 17a28: e1a01003 mov r1, r3 17a2c: e1a00002 mov r0, r2 17a30: e8bd8870 pop {r4, r5, r6, fp, pc} 17a34: 000183a0 .word 0x000183a0 17a38: 00019b84 .word 0x00019b84 00022f6c : int _STAT_NAME( const char *path, struct stat *buf ) { 22f6c: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22f70: e2515000 subs r5, r1, #0 <== NOT EXECUTED int _STAT_NAME( const char *path, struct stat *buf ) { 22f74: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 22f78: e1a06000 mov r6, r0 <== NOT EXECUTED /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 22f7c: 1a000002 bne 22f8c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EFAULT ); 22f80: eb005845 bl 3909c <__errno> <== NOT EXECUTED 22f84: e3a0300e mov r3, #14 <== NOT EXECUTED 22f88: ea000018 b 22ff0 <== NOT EXECUTED status = rtems_filesystem_evaluate_path( path, strlen( path ), 22f8c: eb0072cd bl 3fac8 <== NOT EXECUTED 22f90: e28d4004 add r4, sp, #4 <== NOT EXECUTED 22f94: e3a0c000 mov ip, #0 <== NOT EXECUTED 22f98: e1a01000 mov r1, r0 <== NOT EXECUTED 22f9c: e1a0200c mov r2, ip <== NOT EXECUTED 22fa0: e1a00006 mov r0, r6 <== NOT EXECUTED 22fa4: e1a03004 mov r3, r4 <== NOT EXECUTED 22fa8: e58dc000 str ip, [sp] <== NOT EXECUTED 22fac: ebff8862 bl 513c <== NOT EXECUTED 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 22fb0: e2501000 subs r1, r0, #0 <== NOT EXECUTED 22fb4: 1a00000e bne 22ff4 <== NOT EXECUTED return -1; if ( !loc.handlers->fstat_h ){ 22fb8: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 22fbc: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 22fc0: e3530000 cmp r3, #0 <== NOT EXECUTED 22fc4: 1a00000c bne 22ffc <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 22fc8: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 22fcc: e3530000 cmp r3, #0 <== NOT EXECUTED 22fd0: 0a000004 beq 22fe8 <== NOT EXECUTED 22fd4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 22fd8: e3530000 cmp r3, #0 <== NOT EXECUTED 22fdc: 11a00004 movne r0, r4 <== NOT EXECUTED 22fe0: 11a0e00f movne lr, pc <== NOT EXECUTED 22fe4: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 22fe8: eb00582b bl 3909c <__errno> <== NOT EXECUTED 22fec: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 22ff0: e5803000 str r3, [r0] <== NOT EXECUTED 22ff4: e3e05000 mvn r5, #0 <== NOT EXECUTED 22ff8: ea000010 b 23040 <== NOT EXECUTED /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 22ffc: e3a02048 mov r2, #72 ; 0x48 <== NOT EXECUTED 23000: e1a00005 mov r0, r5 <== NOT EXECUTED 23004: eb0064dc bl 3c37c <== NOT EXECUTED status = (*loc.handlers->fstat_h)( &loc, buf ); 23008: e1a01005 mov r1, r5 <== NOT EXECUTED 2300c: e59d300c ldr r3, [sp, #12] <== NOT EXECUTED 23010: e1a00004 mov r0, r4 <== NOT EXECUTED 23014: e1a0e00f mov lr, pc <== NOT EXECUTED 23018: e593f018 ldr pc, [r3, #24] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 2301c: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23020: e3530000 cmp r3, #0 <== NOT EXECUTED * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 23024: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23028: 0a000004 beq 23040 <== NOT EXECUTED 2302c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 23030: e3530000 cmp r3, #0 <== NOT EXECUTED 23034: 11a00004 movne r0, r4 <== NOT EXECUTED 23038: 11a0e00f movne lr, pc <== NOT EXECUTED 2303c: 112fff13 bxne r3 <== NOT EXECUTED return status; } 23040: e1a00005 mov r0, r5 <== NOT EXECUTED 23044: e28dd018 add sp, sp, #24 <== NOT EXECUTED 23048: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00008c7c : size_t size ) { void *return_this; MSBUMP(malloc_calls, 1); 8c7c: e59f30d8 ldr r3, [pc, #216] ; 8d5c 8c80: e5932004 ldr r2, [r3, #4] 8c84: e2822001 add r2, r2, #1 8c88: e92d4070 push {r4, r5, r6, lr} 8c8c: e5832004 str r2, [r3, #4] 8c90: e1a04000 mov r4, r0 /* * If some free's have been deferred, then do them now. */ malloc_deferred_frees_process(); 8c94: ebffffef bl 8c58 /* * Validate the parameters */ if ( !size ) 8c98: e3540000 cmp r4, #0 8c9c: 0a00002b beq 8d50 return (void *) 0; /* * Do not attempt to allocate memory if not in correct system state. */ if ( _System_state_Is_up(_System_state_Get()) && 8ca0: e59f30b8 ldr r3, [pc, #184] ; 8d60 8ca4: e5933000 ldr r3, [r3] 8ca8: e3530003 cmp r3, #3 8cac: 1a000002 bne 8cbc 8cb0: ebffffd1 bl 8bfc 8cb4: e3500000 cmp r0, #0 8cb8: 0a000024 beq 8d50 RTEMS_INLINE_ROUTINE void *_Protected_heap_Allocate( Heap_Control *heap, uintptr_t size ) { return _Protected_heap_Allocate_aligned_with_boundary( heap, size, 0, 0 ); 8cbc: e59f30a0 ldr r3, [pc, #160] ; 8d64 8cc0: e3a02000 mov r2, #0 8cc4: e5930000 ldr r0, [r3] 8cc8: e1a01004 mov r1, r4 8ccc: e1a03002 mov r3, r2 8cd0: eb000534 bl a1a8 <_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 ) { 8cd4: 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; 8cd8: 11a05006 movne r5, r6 * If this fails then return a NULL pointer. */ return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); if ( !return_this ) { 8cdc: 1a00000c bne 8d14 if (rtems_malloc_sbrk_helpers) 8ce0: e59f3080 ldr r3, [pc, #128] ; 8d68 8ce4: e5933000 ldr r3, [r3] 8ce8: e3530000 cmp r3, #0 8cec: 0a000004 beq 8d04 return_this = (*rtems_malloc_sbrk_helpers->extend)( size ); 8cf0: e1a00004 mov r0, r4 <== NOT EXECUTED 8cf4: e1a0e00f mov lr, pc <== NOT EXECUTED 8cf8: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( !return_this ) { 8cfc: e2505000 subs r5, r0, #0 <== NOT EXECUTED 8d00: 1a000003 bne 8d14 <== NOT EXECUTED errno = ENOMEM; 8d04: eb000f13 bl c958 <__errno> 8d08: e3a0300c mov r3, #12 8d0c: e5803000 str r3, [r0] return (void *) 0; 8d10: ea00000f b 8d54 } /* * If the user wants us to dirty the allocated memory, then do it. */ if ( rtems_malloc_dirty_helper ) 8d14: e59f3050 ldr r3, [pc, #80] ; 8d6c 8d18: e5933000 ldr r3, [r3] 8d1c: e3530000 cmp r3, #0 (*rtems_malloc_dirty_helper)( return_this, size ); 8d20: 11a01004 movne r1, r4 8d24: 11a00005 movne r0, r5 8d28: 11a0e00f movne lr, pc 8d2c: 1593f000 ldrne pc, [r3] /* * If configured, update the statistics */ if ( rtems_malloc_statistics_helpers ) 8d30: e59f3038 ldr r3, [pc, #56] ; 8d70 8d34: e5933000 ldr r3, [r3] 8d38: e3530000 cmp r3, #0 (*rtems_malloc_statistics_helpers->at_malloc)(return_this); 8d3c: 11a00005 movne r0, r5 8d40: 11a0e00f movne lr, pc 8d44: 1593f004 ldrne pc, [r3, #4] 8d48: e1a06005 mov r6, r5 8d4c: ea000000 b 8d54 8d50: e3a06000 mov r6, #0 <== NOT EXECUTED if (rtems_malloc_boundary_helpers) (*rtems_malloc_boundary_helpers->at_malloc)(return_this, size); #endif return return_this; } 8d54: e1a00006 mov r0, r6 8d58: e8bd8070 pop {r4, r5, r6, pc} 8d5c: 00019b90 .word 0x00019b90 8d60: 00019e90 .word 0x00019e90 8d64: 000183ac .word 0x000183ac 8d68: 000199ac .word 0x000199ac 8d6c: 000199b0 .word 0x000199b0 8d70: 000199a8 .word 0x000199a8 00008c48 : } void malloc_deferred_free( void *pointer ) { 8c48: e1a01000 mov r1, r0 <== NOT EXECUTED 8c4c: e59f0000 ldr r0, [pc, #0] ; 8c54 <== NOT EXECUTED 8c50: eaffefcd b 4b8c <_Chain_Append> <== NOT EXECUTED 8c54: 0001a1ec .word 0x0001a1ec 00008c58 : { rtems_chain_initialize_empty(&RTEMS_Malloc_GC_list); } void malloc_deferred_frees_process(void) { 8c58: 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) 8c5c: ea000000 b 8c64 free(to_be_freed); 8c60: ebfffebb bl 8754 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE rtems_chain_node *rtems_chain_get( rtems_chain_control *the_chain ) { return _Chain_Get( the_chain ); 8c64: e59f000c ldr r0, [pc, #12] ; 8c78 8c68: eb0003ab bl 9b1c <_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) 8c6c: e3500000 cmp r0, #0 8c70: 1afffffa bne 8c60 free(to_be_freed); } 8c74: e49df004 pop {pc} ; (ldr pc, [sp], #4) 8c78: 0001a1ec .word 0x0001a1ec 0000fe44 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { fe44: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; fe48: 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 ) fe4c: e5943054 ldr r3, [r4, #84] ; 0x54 fe50: e1530002 cmp r3, r2 fe54: ba000003 blt fe68 fe58: 1a000005 bne fe74 fe5c: e5943050 ldr r3, [r4, #80] ; 0x50 fe60: e1530001 cmp r3, r1 fe64: 2a000002 bcs fe74 return IMFS_memfile_extend( the_jnode, length ); fe68: e1a00004 mov r0, r4 <== NOT EXECUTED fe6c: ebffff9a bl fcdc <== NOT EXECUTED fe70: ea000008 b fe98 <== 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; fe74: e5841050 str r1, [r4, #80] ; 0x50 fe78: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; fe7c: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); fe80: e3a01000 mov r1, #0 fe84: e1a0000d mov r0, sp fe88: ebffca26 bl 2728 fe8c: e59d3000 ldr r3, [sp] fe90: e5843040 str r3, [r4, #64] ; 0x40 fe94: e3a00000 mov r0, #0 return 0; } fe98: e8bd801c pop {r2, r3, r4, pc} 0000fe9c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { fe9c: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; fea0: e5905038 ldr r5, [r0, #56] ; 0x38 if (the_jnode->type == IMFS_LINEAR_FILE) { fea4: e595304c ldr r3, [r5, #76] ; 0x4c fea8: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { feac: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; if (the_jnode->type == IMFS_LINEAR_FILE) { feb0: 1a00000b bne fee4 if (iop->offset > the_jnode->info.linearfile.size) feb4: e5902010 ldr r2, [r0, #16] <== NOT EXECUTED feb8: e5953054 ldr r3, [r5, #84] ; 0x54 <== NOT EXECUTED febc: e1520003 cmp r2, r3 <== NOT EXECUTED fec0: e5952050 ldr r2, [r5, #80] ; 0x50 <== NOT EXECUTED fec4: ca000003 bgt fed8 <== NOT EXECUTED fec8: 1a000014 bne ff20 <== NOT EXECUTED fecc: e590100c ldr r1, [r0, #12] <== NOT EXECUTED fed0: e1510002 cmp r1, r2 <== NOT EXECUTED fed4: 9a000011 bls ff20 <== NOT EXECUTED iop->offset = the_jnode->info.linearfile.size; fed8: e584200c str r2, [r4, #12] <== NOT EXECUTED fedc: e5843010 str r3, [r4, #16] <== NOT EXECUTED fee0: ea00000e b ff20 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) fee4: e1a00005 mov r0, r5 fee8: e284200c add r2, r4, #12 feec: e8920006 ldm r2, {r1, r2} fef0: ebffff79 bl fcdc fef4: e3500000 cmp r0, #0 fef8: 0a000005 beq ff14 rtems_set_errno_and_return_minus_one( ENOSPC ); fefc: eb000682 bl 1190c <__errno> <== NOT EXECUTED ff00: e3a0301c mov r3, #28 <== NOT EXECUTED ff04: e5803000 str r3, [r0] <== NOT EXECUTED ff08: e3e04000 mvn r4, #0 <== NOT EXECUTED ff0c: e3e03000 mvn r3, #0 <== NOT EXECUTED ff10: ea000004 b ff28 <== NOT EXECUTED iop->size = the_jnode->info.file.size; ff14: e2853050 add r3, r5, #80 ; 0x50 ff18: e893000c ldm r3, {r2, r3} ff1c: e984000c stmib r4, {r2, r3} } return iop->offset; ff20: e284400c add r4, r4, #12 ff24: e8940018 ldm r4, {r3, r4} } ff28: e1a01004 mov r1, r4 ff2c: e1a00003 mov r0, r3 ff30: e8bd8030 pop {r4, r5, pc} 000101c0 : the_jnode = iop->file_info; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 101c0: e5903014 ldr r3, [r0, #20] 101c4: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 101c8: e92d4031 push {r0, r4, r5, lr} 101cc: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->file_info; 101d0: e5904038 ldr r4, [r0, #56] ; 0x38 /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 101d4: 0a000017 beq 10238 && (the_jnode->type == IMFS_LINEAR_FILE)) { 101d8: e594304c ldr r3, [r4, #76] ; 0x4c 101dc: e3530006 cmp r3, #6 101e0: 1a000014 bne 10238 uint32_t count = the_jnode->info.linearfile.size; 101e4: 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; 101e8: 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; 101ec: e3a03005 mov r3, #5 <== NOT EXECUTED the_jnode->info.file.size = 0; 101f0: e3a00000 mov r0, #0 <== NOT EXECUTED 101f4: 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) 101f8: 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; 101fc: 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; 10200: 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; 10204: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 10208: e5840050 str r0, [r4, #80] ; 0x50 <== NOT EXECUTED 1020c: e5841054 str r1, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; 10210: 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; 10214: 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) 10218: 0a000006 beq 10238 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 1021c: e1a02001 mov r2, r1 <== NOT EXECUTED 10220: e1a01000 mov r1, r0 <== NOT EXECUTED 10224: e1a00004 mov r0, r4 <== NOT EXECUTED 10228: e58dc000 str ip, [sp] <== NOT EXECUTED 1022c: ebffff40 bl ff34 <== 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) 10230: e3700001 cmn r0, #1 <== NOT EXECUTED 10234: 0a000009 beq 10260 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 10238: e5953014 ldr r3, [r5, #20] 1023c: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 10240: 12843050 addne r3, r4, #80 ; 0x50 10244: 1893000c ldmne r3, {r2, r3} 10248: 1585200c strne r2, [r5, #12] 1024c: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; 10250: e2844050 add r4, r4, #80 ; 0x50 10254: e8940018 ldm r4, {r3, r4} 10258: e9850018 stmib r5, {r3, r4} 1025c: e3a00000 mov r0, #0 return 0; } 10260: e8bd8038 pop {r3, r4, r5, pc} 00001504 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 1504: 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) ) ) 1508: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 150c: e24dd01c sub sp, sp, #28 1510: e1a05001 mov r5, r1 1514: e1a06000 mov r6, r0 1518: e1a07002 mov r7, r2 151c: 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) ) ) 1520: 1a000002 bne 1530 rtems_set_errno_and_return_minus_one( EINVAL ); 1524: eb002d0b bl c958 <__errno> <== NOT EXECUTED 1528: e3a03016 mov r3, #22 <== NOT EXECUTED 152c: ea000020 b 15b4 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 1530: e5d03000 ldrb r3, [r0] 1534: e353002f cmp r3, #47 ; 0x2f 1538: 1353005c cmpne r3, #92 ; 0x5c 153c: 13a04000 movne r4, #0 1540: 03a04001 moveq r4, #1 1544: 0a000001 beq 1550 1548: e3530000 cmp r3, #0 154c: 1a000009 bne 1578 1550: e59f3100 ldr r3, [pc, #256] ; 1658 1554: e593e000 ldr lr, [r3] 1558: e28ee018 add lr, lr, #24 155c: e8be000f ldm lr!, {r0, r1, r2, r3} 1560: e28dc004 add ip, sp, #4 1564: e8ac000f stmia ip!, {r0, r1, r2, r3} 1568: e59e3000 ldr r3, [lr] 156c: e3a00001 mov r0, #1 1570: e58c3000 str r3, [ip] 1574: ea000008 b 159c 1578: e59f30d8 ldr r3, [pc, #216] ; 1658 157c: e593e000 ldr lr, [r3] 1580: e28ee004 add lr, lr, #4 1584: e8be000f ldm lr!, {r0, r1, r2, r3} 1588: e28dc004 add ip, sp, #4 158c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1590: e59e3000 ldr r3, [lr] 1594: e58c3000 str r3, [ip] 1598: e1a00004 mov r0, r4 if ( !temp_loc.ops->evalformake_h ) { 159c: e59d3010 ldr r3, [sp, #16] 15a0: e5933004 ldr r3, [r3, #4] 15a4: e3530000 cmp r3, #0 15a8: 1a000004 bne 15c0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 15ac: eb002ce9 bl c958 <__errno> <== NOT EXECUTED 15b0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 15b4: e5803000 str r3, [r0] <== NOT EXECUTED 15b8: e3e05000 mvn r5, #0 15bc: ea000022 b 164c } result = (*temp_loc.ops->evalformake_h)( 15c0: e28d4004 add r4, sp, #4 15c4: e0860000 add r0, r6, r0 15c8: e1a01004 mov r1, r4 15cc: e28d2018 add r2, sp, #24 15d0: e1a0e00f mov lr, pc 15d4: e12fff13 bx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 15d8: e3500000 cmp r0, #0 15dc: 1afffff5 bne 15b8 return -1; if ( !temp_loc.ops->mknod_h ) { 15e0: e59d3010 ldr r3, [sp, #16] 15e4: e593c014 ldr ip, [r3, #20] 15e8: e35c0000 cmp ip, #0 15ec: 1a000006 bne 160c rtems_filesystem_freenode( &temp_loc ); 15f0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 15f4: e3530000 cmp r3, #0 <== NOT EXECUTED 15f8: 0affffeb beq 15ac <== NOT EXECUTED 15fc: e1a00004 mov r0, r4 <== NOT EXECUTED 1600: e1a0e00f mov lr, pc <== NOT EXECUTED 1604: e12fff13 bx r3 <== NOT EXECUTED 1608: eaffffe7 b 15ac <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 160c: e1a01005 mov r1, r5 1610: e1a03008 mov r3, r8 1614: e58d4000 str r4, [sp] 1618: e1a02007 mov r2, r7 161c: e59d0018 ldr r0, [sp, #24] 1620: e1a0e00f mov lr, pc 1624: e12fff1c bx ip rtems_filesystem_freenode( &temp_loc ); 1628: e59d3010 ldr r3, [sp, #16] 162c: 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 ); 1630: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 1634: 0a000004 beq 164c 1638: e593301c ldr r3, [r3, #28] 163c: e3530000 cmp r3, #0 1640: 11a00004 movne r0, r4 1644: 11a0e00f movne lr, pc 1648: 112fff13 bxne r3 return result; } 164c: e1a00005 mov r0, r5 1650: e28dd01c add sp, sp, #28 1654: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 1658: 00018538 .word 0x00018538 00001678 : const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1678: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 167c: e2517000 subs r7, r1, #0 const rtems_filesystem_operations_table *fs_ops, rtems_filesystem_options_t options, const char *device, const char *mount_point ) { 1680: e24dd018 sub sp, sp, #24 1684: e1a06000 mov r6, r0 1688: e1a09002 mov r9, r2 168c: e1a0b003 mov fp, r3 1690: e59da03c ldr sl, [sp, #60] ; 0x3c /* * Is there a file system operations table? */ if ( fs_ops == NULL ) { 1694: 0a000001 beq 16a0 /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 1698: e3520001 cmp r2, #1 169c: 9a000002 bls 16ac options != RTEMS_FILESYSTEM_READ_WRITE ) { errno = EINVAL; 16a0: eb002cac bl c958 <__errno> 16a4: e3a03016 mov r3, #22 16a8: ea000014 b 1700 return -1; } /* Do they support being mounted at all ? */ if ( !fs_ops->fsmount_me_h ) { 16ac: e5975024 ldr r5, [r7, #36] ; 0x24 16b0: e3550000 cmp r5, #0 16b4: 1a000004 bne 16cc errno = ENOTSUP; 16b8: eb002ca6 bl c958 <__errno> <== NOT EXECUTED 16bc: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 16c0: e5803000 str r3, [r0] <== NOT EXECUTED 16c4: e1a08005 mov r8, r5 <== NOT EXECUTED goto cleanup_and_bail; 16c8: ea00006d b 1884 <== NOT EXECUTED /* * Allocate a mount table entry */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) 16cc: e3530000 cmp r3, #0 16d0: 03a0006c moveq r0, #108 ; 0x6c 16d4: 0a000002 beq 16e4 size += strlen( device ) + 1; 16d8: e1a00003 mov r0, r3 <== NOT EXECUTED 16dc: eb00308e bl d91c <== NOT EXECUTED 16e0: e280006d add r0, r0, #109 ; 0x6d <== NOT EXECUTED temp_mt_entry = malloc( size ); 16e4: eb001d64 bl 8c7c if ( !temp_mt_entry ) { 16e8: e3500000 cmp r0, #0 */ size = sizeof(rtems_filesystem_mount_table_entry_t); if ( device ) size += strlen( device ) + 1; temp_mt_entry = malloc( size ); 16ec: e1a04000 mov r4, r0 16f0: e1a08000 mov r8, r0 if ( !temp_mt_entry ) { 16f4: 1a000003 bne 1708 errno = ENOMEM; 16f8: eb002c96 bl c958 <__errno> <== NOT EXECUTED 16fc: e3a0300c mov r3, #12 <== NOT EXECUTED 1700: e5803000 str r3, [r0] 1704: ea00006a b 18b4 return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; if ( device ) { 1708: e35b0000 cmp fp, #0 errno = ENOMEM; return -1; } temp_mt_entry->mt_fs_root.mt_entry = temp_mt_entry; temp_mt_entry->options = options; 170c: 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; 1710: 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; 1714: 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 ); 1718: 1280306c addne r3, r0, #108 ; 0x6c strcpy( temp_mt_entry->dev, device ); 171c: 11a00003 movne r0, r3 1720: 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 = 1724: 15843068 strne r3, [r4, #104] ; 0x68 (char *)temp_mt_entry + sizeof( rtems_filesystem_mount_table_entry_t ); strcpy( temp_mt_entry->dev, device ); 1728: 1b00303f blne d82c /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( mount_point ) { 172c: e35a0000 cmp sl, #0 1730: 0a000035 beq 180c if ( rtems_filesystem_evaluate_path( mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1734: e1a0000a mov r0, sl 1738: eb003077 bl d91c * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 173c: e28d5004 add r5, sp, #4 mount_point, strlen( mount_point ), RTEMS_LIBIO_PERMS_RWX, &loc, true ) == -1 ) 1740: e1a01000 mov r1, r0 * permissions in the existing tree. */ if ( mount_point ) { if ( rtems_filesystem_evaluate_path( 1744: e3a0c001 mov ip, #1 1748: e1a0000a mov r0, sl 174c: e3a02007 mov r2, #7 1750: e1a03005 mov r3, r5 1754: e58dc000 str ip, [sp] 1758: ebfffec9 bl 1284 175c: e3700001 cmn r0, #1 1760: 0a000046 beq 1880 /* * Test for node_type_h */ if (!loc.ops->node_type_h) { 1764: e59d3010 ldr r3, [sp, #16] 1768: e5933010 ldr r3, [r3, #16] 176c: e3530000 cmp r3, #0 1770: 1a000002 bne 1780 errno = ENOTSUP; 1774: eb002c77 bl c958 <__errno> <== NOT EXECUTED 1778: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 177c: ea000006 b 179c <== NOT EXECUTED /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 1780: e1a00005 mov r0, r5 1784: e1a0e00f mov lr, pc 1788: e12fff13 bx r3 178c: e3500001 cmp r0, #1 1790: 0a000003 beq 17a4 errno = ENOTDIR; 1794: eb002c6f bl c958 <__errno> 1798: e3a03014 mov r3, #20 179c: e5803000 str r3, [r0] goto cleanup_and_bail; 17a0: ea000037 b 1884 /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17a4: e59f2140 ldr r2, [pc, #320] ; 18ec !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 ) 17a8: e59d1004 ldr r1, [sp, #4] /* * For each mount table entry */ for ( the_node = rtems_filesystem_mount_table_control.first; 17ac: e4923004 ldr r3, [r2], #4 17b0: ea000003 b 17c4 !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 ) 17b4: e593001c ldr r0, [r3, #28] 17b8: e1500001 cmp r0, r1 17bc: 0a000003 beq 17d0 * 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 ) { 17c0: e5933000 ldr r3, [r3] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 17c4: e1530002 cmp r3, r2 17c8: 1afffff9 bne 17b4 17cc: ea00003b b 18c0 /* * You can only mount one file system onto a single mount point. */ if ( Is_node_fs_root( &loc ) ){ errno = EBUSY; 17d0: eb002c60 bl c958 <__errno> 17d4: e3a03010 mov r3, #16 17d8: ea000001 b 17e4 * 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; 17dc: eb002c5d bl c958 <__errno> <== NOT EXECUTED 17e0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17e4: e5803000 str r3, [r0] 17e8: e28d5004 add r5, sp, #4 goto cleanup_and_bail; 17ec: ea000024 b 1884 } if ( loc.ops->mount_h( temp_mt_entry ) ) { 17f0: e1a00004 mov r0, r4 17f4: e1a0e00f mov lr, pc 17f8: e12fff13 bx r3 17fc: e3500000 cmp r0, #0 1800: e28d5004 add r5, sp, #4 1804: 0a000008 beq 182c 1808: ea00001d b 1884 <== 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; 180c: e584a01c str sl, [r4, #28] temp_mt_entry->mt_fs_root.handlers = NULL; 1810: e584a024 str sl, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = NULL; 1814: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->mt_point_node.node_access = NULL; 1818: e584a008 str sl, [r4, #8] temp_mt_entry->mt_point_node.handlers = NULL; 181c: e584a010 str sl, [r4, #16] temp_mt_entry->mt_point_node.ops = NULL; 1820: e584a014 str sl, [r4, #20] temp_mt_entry->mt_point_node.mt_entry = NULL; 1824: e584a018 str sl, [r4, #24] 1828: e1a0500a mov r5, sl } if ( fs_ops->fsmount_me_h( temp_mt_entry ) ) { 182c: e1a00004 mov r0, r4 1830: e1a0e00f mov lr, pc 1834: e597f024 ldr pc, [r7, #36] ; 0x24 1838: e2507000 subs r7, r0, #0 183c: 0a000007 beq 1860 /* try to undo the mount operation */ if ( loc.ops->unmount_h ) { 1840: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 1844: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED 1848: e3530000 cmp r3, #0 <== NOT EXECUTED 184c: 0a00000c beq 1884 <== NOT EXECUTED loc.ops->unmount_h( temp_mt_entry ); 1850: e1a00004 mov r0, r4 <== NOT EXECUTED 1854: e1a0e00f mov lr, pc <== NOT EXECUTED 1858: e12fff13 bx r3 <== NOT EXECUTED 185c: ea000008 b 1884 <== 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 ); 1860: e59f0084 ldr r0, [pc, #132] ; 18ec 1864: e1a01004 mov r1, r4 1868: eb000cc7 bl 4b8c <_Chain_Append> */ rtems_chain_append( &rtems_filesystem_mount_table_control, &temp_mt_entry->Node ); if ( mt_entry ) 186c: e3560000 cmp r6, #0 1870: 01a00006 moveq r0, r6 *mt_entry = temp_mt_entry; 1874: 15864000 strne r4, [r6] 1878: 11a00007 movne r0, r7 187c: ea00000d b 18b8 1880: e3a05000 mov r5, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( temp_mt_entry ); 1884: e1a00008 mov r0, r8 1888: eb001bb1 bl 8754 if ( loc_to_free ) 188c: e3550000 cmp r5, #0 1890: 0a000007 beq 18b4 rtems_filesystem_freenode( loc_to_free ); 1894: e595300c ldr r3, [r5, #12] 1898: e3530000 cmp r3, #0 189c: 0a000004 beq 18b4 18a0: e593301c ldr r3, [r3, #28] 18a4: e3530000 cmp r3, #0 18a8: 11a00005 movne r0, r5 18ac: 11a0e00f movne lr, pc 18b0: 112fff13 bxne r3 18b4: e3e00000 mvn r0, #0 return -1; } 18b8: e28dd018 add sp, sp, #24 18bc: 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; 18c0: 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; 18c4: e5841008 str r1, [r4, #8] temp_mt_entry->mt_point_node.handlers = loc.handlers; 18c8: 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 ){ 18cc: 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; 18d0: 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; 18d4: 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 ){ 18d8: 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; 18dc: 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; 18e0: 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 ){ 18e4: 1affffc1 bne 17f0 18e8: eaffffbb b 17dc <== NOT EXECUTED 18ec: 00019bbc .word 0x00019bbc 00001960 : */ int newlib_free_buffers( FILE *fp ) { 1960: e92d4010 push {r4, lr} 1964: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 1968: eb002cf9 bl cd54 196c: e3500002 cmp r0, #2 1970: 8a00000b bhi 19a4 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 1974: e1d430bc ldrh r3, [r4, #12] 1978: e3130080 tst r3, #128 ; 0x80 197c: 0a00000a beq 19ac free( fp->_bf._base ); 1980: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 1984: eb001b72 bl 8754 <== NOT EXECUTED fp->_flags &= ~__SMBF; 1988: e1d420bc ldrh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 198c: e3a03000 mov r3, #0 <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1990: e3c22080 bic r2, r2, #128 ; 0x80 <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 1994: e5843010 str r3, [r4, #16] <== NOT EXECUTED case 0: case 1: case 2: if (fp->_flags & __SMBF) { free( fp->_bf._base ); fp->_flags &= ~__SMBF; 1998: e1c420bc strh r2, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 199c: e5843000 str r3, [r4] <== NOT EXECUTED 19a0: ea000001 b 19ac <== NOT EXECUTED } break; default: fclose(fp); 19a4: e1a00004 mov r0, r4 <== NOT EXECUTED 19a8: eb002c37 bl ca8c <== NOT EXECUTED } return 0; } 19ac: e3a00000 mov r0, #0 19b0: e8bd8010 pop {r4, pc} 00001bd4 : int open( const char *pathname, int flags, ... ) { 1bd4: e92d000e push {r1, r2, r3} 1bd8: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} 1bdc: e24dd01c sub sp, sp, #28 1be0: e59d503c ldr r5, [sp, #60] ; 0x3c /* * Set the Evaluation flags */ eval_flags = 0; status = flags + 1; 1be4: e2853001 add r3, r5, #1 if ( ( status & _FREAD ) == _FREAD ) 1be8: e2138001 ands r8, r3, #1 1bec: 13a08004 movne r8, #4 eval_flags |= RTEMS_LIBIO_PERMS_READ; if ( ( status & _FWRITE ) == _FWRITE ) 1bf0: e3130002 tst r3, #2 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1bf4: 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; 1bf8: 13888002 orrne r8, r8, #2 int open( const char *pathname, int flags, ... ) { 1bfc: e1a06000 mov r6, r0 eval_flags |= RTEMS_LIBIO_PERMS_WRITE; va_start(ap, flags); mode = va_arg( ap, int ); 1c00: e58d3018 str r3, [sp, #24] 1c04: 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(); 1c08: eb001bc1 bl 8b14 if ( iop == 0 ) { 1c0c: e2504000 subs r4, r0, #0 1c10: 03a05017 moveq r5, #23 1c14: 0a000077 beq 1df8 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), eval_flags, &loc, true ); 1c18: e1a00006 mov r0, r6 1c1c: eb002f3e bl d91c /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c20: e28d7004 add r7, sp, #4 pathname, strlen( pathname ), eval_flags, &loc, true ); 1c24: e1a01000 mov r1, r0 /* * See if the file exists. */ status = rtems_filesystem_evaluate_path( 1c28: e1a02008 mov r2, r8 1c2c: e1a00006 mov r0, r6 1c30: e3a08001 mov r8, #1 1c34: e1a03007 mov r3, r7 1c38: e58d8000 str r8, [sp] 1c3c: ebfffd90 bl 1284 pathname, strlen( pathname ), eval_flags, &loc, true ); if ( status == -1 ) { 1c40: e3700001 cmn r0, #1 1c44: 1a00001f bne 1cc8 if ( errno != ENOENT ) { 1c48: eb002b42 bl c958 <__errno> 1c4c: e5903000 ldr r3, [r0] 1c50: e3530002 cmp r3, #2 1c54: 1a00000a bne 1c84 rc = errno; goto done; } /* If the file does not exist and we are not trying to create it--> error */ if ( !(flags & O_CREAT) ) { 1c58: e215ac02 ands sl, r5, #512 ; 0x200 1c5c: 01a0700a moveq r7, sl 1c60: 01a05003 moveq r5, r3 1c64: 0a000056 beq 1dc4 rc = ENOENT; goto done; } /* Create the node for the new regular file */ rc = mknod( pathname, S_IFREG | mode, 0LL ); 1c68: e1a00006 mov r0, r6 1c6c: e3891902 orr r1, r9, #32768 ; 0x8000 1c70: e3a02000 mov r2, #0 1c74: e3a03000 mov r3, #0 1c78: ebfffe21 bl 1504 if ( rc ) { 1c7c: e250a000 subs sl, r0, #0 1c80: 0a000003 beq 1c94 rc = errno; 1c84: eb002b33 bl c958 <__errno> 1c88: e3a07000 mov r7, #0 1c8c: e5905000 ldr r5, [r0] goto done; 1c90: ea000049 b 1dbc } /* Sanity check to see if the file name exists after the mknod() */ status = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0x0, &loc, true ); 1c94: e1a00006 mov r0, r6 1c98: eb002f1f bl d91c 1c9c: e1a03007 mov r3, r7 1ca0: e1a01000 mov r1, r0 1ca4: e1a0200a mov r2, sl 1ca8: e1a00006 mov r0, r6 1cac: e58d8000 str r8, [sp] 1cb0: ebfffd73 bl 1284 if ( status != 0 ) { /* The file did not exist */ 1cb4: e3500000 cmp r0, #0 1cb8: 11a0700a movne r7, sl 1cbc: 13a0500d movne r5, #13 1cc0: 1a00003f bne 1dc4 1cc4: ea000003 b 1cd8 rc = EACCES; goto done; } } else if ((flags & (O_EXCL|O_CREAT)) == (O_EXCL|O_CREAT)) { 1cc8: e2053c0a and r3, r5, #2560 ; 0xa00 1ccc: e3530c0a cmp r3, #2560 ; 0xa00 1cd0: 03a05011 moveq r5, #17 1cd4: 0a00003a beq 1dc4 * 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; 1cd8: e28d701c add r7, sp, #28 1cdc: e5373018 ldr r3, [r7, #-24]! 1ce0: 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; 1ce4: e59d300c ldr r3, [sp, #12] iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1ce8: e1a00005 mov r0, r5 /* * Fill in the file control block based on the loc structure * returned by successful path evaluation. */ iop->handlers = loc.handlers; 1cec: e584303c str r3, [r4, #60] ; 0x3c iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); 1cf0: e5948014 ldr r8, [r4, #20] 1cf4: eb001bb3 bl 8bc8 1cf8: e180e008 orr lr, r0, r8 iop->pathinfo = loc; 1cfc: e8b7000f ldm r7!, {r0, r1, r2, r3} 1d00: e284c018 add ip, r4, #24 1d04: e8ac000f stmia ip!, {r0, r1, r2, r3} if ( !iop->handlers || !iop->handlers->open_h ) { 1d08: 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; 1d0c: e5972000 ldr r2, [r7] if ( !iop->handlers || !iop->handlers->open_h ) { 1d10: e3530000 cmp r3, #0 */ iop->handlers = loc.handlers; iop->file_info = loc.node_access; iop->flags |= rtems_libio_fcntl_flags( flags ); iop->pathinfo = loc; 1d14: 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 ); 1d18: e584e014 str lr, [r4, #20] iop->pathinfo = loc; if ( !iop->handlers || !iop->handlers->open_h ) { 1d1c: 0a000041 beq 1e28 1d20: e593c000 ldr ip, [r3] 1d24: e35c0000 cmp ip, #0 1d28: 0a00003e beq 1e28 rc = ENOTSUP; goto done; } rc = (*iop->handlers->open_h)( iop, pathname, flags, mode ); 1d2c: e1a01006 mov r1, r6 1d30: e1a03009 mov r3, r9 1d34: e1a00004 mov r0, r4 1d38: e1a02005 mov r2, r5 1d3c: e1a0e00f mov lr, pc 1d40: e12fff1c bx ip if ( rc ) { 1d44: e3500000 cmp r0, #0 1d48: 0a000003 beq 1d5c rc = errno; 1d4c: eb002b01 bl c958 <__errno> 1d50: e28d7004 add r7, sp, #4 1d54: e5905000 ldr r5, [r0] goto done; 1d58: ea000017 b 1dbc /* * Optionally truncate the file. */ if ( (flags & O_TRUNC) == O_TRUNC ) { 1d5c: e3150b01 tst r5, #1024 ; 0x400 1d60: 0a000028 beq 1e08 rc = ftruncate( iop - rtems_libio_iops, 0 ); 1d64: e59f30c8 ldr r3, [pc, #200] ; 1e34 1d68: e5930000 ldr r0, [r3] 1d6c: e0600004 rsb r0, r0, r4 1d70: e1a00340 asr r0, r0, #6 1d74: e3a01000 mov r1, #0 1d78: e3a02000 mov r2, #0 1d7c: eb001a9d bl 87f8 if ( rc ) { 1d80: e2505000 subs r5, r0, #0 1d84: 0a00001f beq 1e08 if(errno) rc = errno; 1d88: eb002af2 bl c958 <__errno> <== NOT EXECUTED 1d8c: e5903000 ldr r3, [r0] <== NOT EXECUTED 1d90: e3530000 cmp r3, #0 <== NOT EXECUTED 1d94: 0a000001 beq 1da0 <== NOT EXECUTED 1d98: eb002aee bl c958 <__errno> <== NOT EXECUTED 1d9c: e5905000 ldr r5, [r0] <== NOT EXECUTED close( iop - rtems_libio_iops ); 1da0: e59f308c ldr r3, [pc, #140] ; 1e34 <== NOT EXECUTED 1da4: e5933000 ldr r3, [r3] <== NOT EXECUTED 1da8: e0634004 rsb r4, r3, r4 <== NOT EXECUTED 1dac: e1a00344 asr r0, r4, #6 <== NOT EXECUTED 1db0: eb001a3e bl 86b0 <== NOT EXECUTED 1db4: e3a04000 mov r4, #0 <== NOT EXECUTED 1db8: e1a07004 mov r7, r4 <== NOT EXECUTED */ done: va_end(ap); if ( rc ) { 1dbc: e3550000 cmp r5, #0 1dc0: 0a000010 beq 1e08 if ( iop ) 1dc4: e3540000 cmp r4, #0 rtems_libio_free( iop ); 1dc8: 11a00004 movne r0, r4 1dcc: 1b001b39 blne 8ab8 if ( loc_to_free ) 1dd0: e3570000 cmp r7, #0 1dd4: 0a000007 beq 1df8 rtems_filesystem_freenode( loc_to_free ); 1dd8: e597300c ldr r3, [r7, #12] 1ddc: e3530000 cmp r3, #0 1de0: 0a000004 beq 1df8 1de4: e593301c ldr r3, [r3, #28] 1de8: e3530000 cmp r3, #0 1dec: 11a00007 movne r0, r7 1df0: 11a0e00f movne lr, pc 1df4: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( rc ); 1df8: eb002ad6 bl c958 <__errno> 1dfc: e5805000 str r5, [r0] 1e00: e3e00000 mvn r0, #0 1e04: ea000003 b 1e18 } return iop - rtems_libio_iops; 1e08: e59f3024 ldr r3, [pc, #36] ; 1e34 1e0c: e5930000 ldr r0, [r3] 1e10: e0604004 rsb r4, r0, r4 1e14: e1a00344 asr r0, r4, #6 } 1e18: e28dd01c add sp, sp, #28 1e1c: e8bd47f0 pop {r4, r5, r6, r7, r8, r9, sl, lr} 1e20: e28dd00c add sp, sp, #12 1e24: 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; 1e28: e28d7004 add r7, sp, #4 <== NOT EXECUTED 1e2c: e3a05086 mov r5, #134 ; 0x86 <== NOT EXECUTED 1e30: eaffffe3 b 1dc4 <== NOT EXECUTED 1e34: 00019b84 .word 0x00019b84 00001b70 : int stderr_fd; /* * Attempt to open /dev/console. */ if ((stdin_fd = open("/dev/console", O_RDONLY, 0)) == -1) { 1b70: e3a01000 mov r1, #0 /* * This is a replaceable stub which opens the console, if present. */ void open_dev_console(void) { 1b74: 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) { 1b78: e59f0048 ldr r0, [pc, #72] ; 1bc8 1b7c: e1a02001 mov r2, r1 1b80: eb000013 bl 1bd4 1b84: e3700001 cmn r0, #1 1b88: 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) 1b8c: e59f0034 ldr r0, [pc, #52] ; 1bc8 1b90: e3a01001 mov r1, #1 1b94: e3a02000 mov r2, #0 1b98: eb00000d bl 1bd4 1b9c: e3700001 cmn r0, #1 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ 1ba0: 059f0024 ldreq r0, [pc, #36] ; 1bcc /* * 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) 1ba4: 0a000006 beq 1bc4 rtems_fatal_error_occurred( 0x55544431 ); /* error STD1 */ if ((stderr_fd = open("/dev/console", O_WRONLY, 0)) == -1) 1ba8: e59f0018 ldr r0, [pc, #24] ; 1bc8 1bac: e3a01001 mov r1, #1 1bb0: e3a02000 mov r2, #0 1bb4: eb000006 bl 1bd4 1bb8: e3700001 cmn r0, #1 1bbc: 149df004 popne {pc} ; (ldrne pc, [sp], #4) rtems_fatal_error_occurred( 0x55544432 ); /* error STD2 */ 1bc0: e59f0008 ldr r0, [pc, #8] ; 1bd0 <== NOT EXECUTED 1bc4: eb000b36 bl 48a4 <== NOT EXECUTED 1bc8: 00019497 .word 0x00019497 1bcc: 55544431 .word 0x55544431 1bd0: 55544432 .word 0x55544432 000024fc : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 24fc: e92d4011 push {r0, r4, lr} int i; if (tty->termios.c_oflag & OPOST) { 2500: e5913034 ldr r3, [r1, #52] ; 0x34 2504: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 2508: e1a04001 mov r4, r1 250c: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 2510: 0a000047 beq 2634 switch (c) { 2514: e5dd2000 ldrb r2, [sp] 2518: e2421008 sub r1, r2, #8 251c: e3510005 cmp r1, #5 2520: 979ff101 ldrls pc, [pc, r1, lsl #2] 2524: ea00002e b 25e4 2528: 000025d0 .word 0x000025d0 <== NOT EXECUTED 252c: 000025a4 .word 0x000025a4 <== NOT EXECUTED 2530: 00002540 .word 0x00002540 <== NOT EXECUTED 2534: 000025e4 .word 0x000025e4 <== NOT EXECUTED 2538: 000025e4 .word 0x000025e4 <== NOT EXECUTED 253c: 0000256c .word 0x0000256c <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 2540: e3130020 tst r3, #32 tty->column = 0; 2544: 13a03000 movne r3, #0 2548: 15843028 strne r3, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 254c: e5943034 ldr r3, [r4, #52] ; 0x34 2550: e3130004 tst r3, #4 2554: 0a000036 beq 2634 rtems_termios_puts ("\r", 1, tty); 2558: e59f00e8 ldr r0, [pc, #232] ; 2648 255c: e3a01001 mov r1, #1 2560: e1a02004 mov r2, r4 2564: ebffffa0 bl 23ec 2568: ea00000b b 259c tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 256c: e3130010 tst r3, #16 <== NOT EXECUTED 2570: 0a000002 beq 2580 <== NOT EXECUTED 2574: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 2578: e3520000 cmp r2, #0 <== NOT EXECUTED 257c: 0a000030 beq 2644 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 2580: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 2584: 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) { 2588: 0a000029 beq 2634 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) 258c: 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'; 2590: e3a0300a mov r3, #10 <== NOT EXECUTED 2594: e5cd3000 strb r3, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 2598: 0a000025 beq 2634 <== NOT EXECUTED tty->column = 0; 259c: e3a03000 mov r3, #0 25a0: ea000022 b 2630 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25a4: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25a8: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25ac: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25b0: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 25b4: e2611008 rsb r1, r1, #8 25b8: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 25bc: 1a00001b bne 2630 tty->column += i; 25c0: e5843028 str r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 25c4: e1a02004 mov r2, r4 25c8: e59f007c ldr r0, [pc, #124] ; 264c 25cc: ea00001b b 2640 } tty->column += i; break; case '\b': if (tty->column > 0) 25d0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 25d4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 25d8: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 25dc: ca000013 bgt 2630 <== NOT EXECUTED 25e0: ea000013 b 2634 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 25e4: e3130002 tst r3, #2 25e8: 0a000007 beq 260c c = toupper(c); 25ec: e59f305c ldr r3, [pc, #92] ; 2650 <== NOT EXECUTED 25f0: e5933000 ldr r3, [r3] <== NOT EXECUTED 25f4: e0833002 add r3, r3, r2 <== NOT EXECUTED 25f8: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 25fc: e2033003 and r3, r3, #3 <== NOT EXECUTED 2600: e3530002 cmp r3, #2 <== NOT EXECUTED 2604: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 2608: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 260c: e59f303c ldr r3, [pc, #60] ; 2650 2610: e5932000 ldr r2, [r3] 2614: e5dd3000 ldrb r3, [sp] 2618: e0823003 add r3, r2, r3 261c: e5d33001 ldrb r3, [r3, #1] 2620: e3130020 tst r3, #32 2624: 1a000002 bne 2634 tty->column++; 2628: e5943028 ldr r3, [r4, #40] ; 0x28 262c: e2833001 add r3, r3, #1 2630: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 2634: e1a02004 mov r2, r4 2638: e1a0000d mov r0, sp 263c: e3a01001 mov r1, #1 2640: ebffff69 bl 23ec } 2644: e8bd8018 pop {r3, r4, pc} 2648: 00019607 .word 0x00019607 264c: 000194d8 .word 0x000194d8 2650: 000185e0 .word 0x000185e0 0000bf38 : * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { bf38: e92d4070 push {r4, r5, r6, lr} bf3c: 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) bf40: e28d5004 add r5, sp, #4 bf44: e3a0c001 mov ip, #1 * Called by pipe() to create an anonymous pipe. */ int pipe_create( int filsdes[2] ) { bf48: 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) bf4c: e3a01003 mov r1, #3 bf50: e59f0140 ldr r0, [pc, #320] ; c098 bf54: e3a02007 mov r2, #7 bf58: e1a03005 mov r3, r5 bf5c: e58dc000 str ip, [sp] bf60: ebffd4c7 bl 1284 bf64: e3500000 cmp r0, #0 bf68: 0a000009 beq bf94 != 0) { if (errno != ENOENT) bf6c: eb000279 bl c958 <__errno> bf70: e5903000 ldr r3, [r0] bf74: e3530002 cmp r3, #2 bf78: 1a000043 bne c08c return -1; if (mkdir("/tmp", S_IRWXU|S_IRWXG|S_IRWXO|S_ISVTX) != 0) bf7c: e59f0114 ldr r0, [pc, #276] ; c098 bf80: e59f1114 ldr r1, [pc, #276] ; c09c bf84: ebffd55a bl 14f4 bf88: e3500000 cmp r0, #0 bf8c: 0a000008 beq bfb4 bf90: ea00003d b c08c <== NOT EXECUTED return -1; } else rtems_filesystem_freenode(&loc); bf94: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED bf98: e3530000 cmp r3, #0 <== NOT EXECUTED bf9c: 0a000004 beq bfb4 <== NOT EXECUTED bfa0: e593301c ldr r3, [r3, #28] <== NOT EXECUTED bfa4: e3530000 cmp r3, #0 <== NOT EXECUTED bfa8: 11a00005 movne r0, r5 <== NOT EXECUTED bfac: 11a0e00f movne lr, pc <== NOT EXECUTED bfb0: 112fff13 bxne r3 <== NOT EXECUTED /* /tmp/.fifoXXXX */ char fifopath[15]; memcpy(fifopath, "/tmp/.fifo", 10); bfb4: e28d5018 add r5, sp, #24 bfb8: e59f10e0 ldr r1, [pc, #224] ; c0a0 bfbc: e3a0200a mov r2, #10 bfc0: e1a00005 mov r0, r5 bfc4: eb000471 bl d190 sprintf(fifopath + 10, "%04x", rtems_pipe_no ++); bfc8: e59f30d4 ldr r3, [pc, #212] ; c0a4 bfcc: e1d3c0b0 ldrh ip, [r3] bfd0: e1a0200c mov r2, ip bfd4: e28cc001 add ip, ip, #1 bfd8: e59f10c8 ldr r1, [pc, #200] ; c0a8 bfdc: e1c3c0b0 strh ip, [r3] bfe0: e285000a add r0, r5, #10 bfe4: eb00050f bl d428 /* Try creating FIFO file until find an available file name */ while (mkfifo(fifopath, S_IRUSR|S_IWUSR) != 0) { bfe8: e1a00005 mov r0, r5 bfec: e3a01d06 mov r1, #384 ; 0x180 bff0: eb00003f bl c0f4 bff4: e2506000 subs r6, r0, #0 bff8: 0a000001 beq c004 if (errno != EEXIST){ bffc: eb000255 bl c958 <__errno> <== NOT EXECUTED c000: ea000021 b c08c <== 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); c004: e1a00005 mov r0, r5 c008: e3a01901 mov r1, #16384 ; 0x4000 c00c: ebffd6f0 bl 1bd4 if (filsdes[0] < 0) { c010: 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); c014: e5840000 str r0, [r4] if (filsdes[0] < 0) { c018: aa000003 bge c02c err = errno; c01c: eb00024d bl c958 <__errno> c020: 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); c024: e1a00005 mov r0, r5 c028: ea000014 b c080 } else { /* Reset open file to blocking mode */ iop = rtems_libio_iop(filsdes[0]); c02c: e59f3078 ldr r3, [pc, #120] ; c0ac <== NOT EXECUTED c030: e5933000 ldr r3, [r3] <== NOT EXECUTED c034: e1500003 cmp r0, r3 <== NOT EXECUTED c038: 359f3070 ldrcc r3, [pc, #112] ; c0b0 <== NOT EXECUTED c03c: 35936000 ldrcc r6, [r3] <== NOT EXECUTED c040: 30866300 addcc r6, r6, r0, lsl #6 <== NOT EXECUTED iop->flags &= ~LIBIO_FLAGS_NO_DELAY; c044: e5963014 ldr r3, [r6, #20] <== NOT EXECUTED c048: e3c33001 bic r3, r3, #1 <== NOT EXECUTED c04c: e5863014 str r3, [r6, #20] <== NOT EXECUTED filsdes[1] = open(fifopath, O_WRONLY); c050: e28d0018 add r0, sp, #24 <== NOT EXECUTED c054: e3a01001 mov r1, #1 <== NOT EXECUTED c058: ebffd6dd bl 1bd4 <== NOT EXECUTED if (filsdes[1] < 0) { c05c: 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); c060: e5840004 str r0, [r4, #4] <== NOT EXECUTED if (filsdes[1] < 0) { c064: a3a06000 movge r6, #0 <== NOT EXECUTED c068: aa000003 bge c07c <== NOT EXECUTED err = errno; c06c: eb000239 bl c958 <__errno> <== NOT EXECUTED c070: e5906000 ldr r6, [r0] <== NOT EXECUTED close(filsdes[0]); c074: e5940000 ldr r0, [r4] <== NOT EXECUTED c078: ebfff18c bl 86b0 <== NOT EXECUTED } unlink(fifopath); c07c: e28d0018 add r0, sp, #24 <== NOT EXECUTED c080: eb00001f bl c104 } rtems_set_errno_and_return_minus_one(err); c084: eb000233 bl c958 <__errno> c088: e5806000 str r6, [r0] } c08c: e3e00000 mvn r0, #0 c090: e28dd028 add sp, sp, #40 ; 0x28 c094: e8bd8070 pop {r4, r5, r6, pc} c098: 00019750 .word 0x00019750 c09c: 000003ff .word 0x000003ff c0a0: 00019755 .word 0x00019755 c0a4: 00019b06 .word 0x00019b06 c0a8: 00019760 .word 0x00019760 c0ac: 000183a0 .word 0x000183a0 c0b0: 00019b84 .word 0x00019b84 0000ac40 : /* Called with rtems_pipe_semaphore held. */ static inline void pipe_free( pipe_control_t *pipe ) { ac40: e92d4010 push {r4, lr} <== NOT EXECUTED ac44: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_barrier_delete(pipe->readBarrier); ac48: e590002c ldr r0, [r0, #44] ; 0x2c <== NOT EXECUTED ac4c: eb000325 bl b8e8 <== NOT EXECUTED rtems_barrier_delete(pipe->writeBarrier); ac50: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED ac54: eb000323 bl b8e8 <== NOT EXECUTED rtems_semaphore_delete(pipe->Semaphore); ac58: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac5c: ebffe555 bl 41b8 <== NOT EXECUTED free(pipe->Buffer); ac60: e5940000 ldr r0, [r4] <== NOT EXECUTED ac64: ebfff6ba bl 8754 <== NOT EXECUTED free(pipe); ac68: e1a00004 mov r0, r4 <== NOT EXECUTED } ac6c: 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); ac70: eafff6b7 b 8754 <== NOT EXECUTED 0000a8cc : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { a8cc: e59f3054 ldr r3, [pc, #84] ; a928 <== NOT EXECUTED a8d0: e1510003 cmp r1, r3 <== NOT EXECUTED pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a8d4: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED a8d8: e1a04000 mov r4, r0 <== NOT EXECUTED a8dc: e1a05002 mov r5, r2 <== NOT EXECUTED if (cmd == FIONREAD) { a8e0: 13e00015 mvnne r0, #21 <== NOT EXECUTED a8e4: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED if (buffer == NULL) a8e8: e3520000 cmp r2, #0 <== NOT EXECUTED a8ec: 03e0000d mvneq r0, #13 <== NOT EXECUTED a8f0: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return -EFAULT; if (! PIPE_LOCK(pipe)) a8f4: e3a01000 mov r1, #0 <== NOT EXECUTED a8f8: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a8fc: e1a02001 mov r2, r1 <== NOT EXECUTED a900: ebffe653 bl 4254 <== NOT EXECUTED a904: e2506000 subs r6, r0, #0 <== NOT EXECUTED a908: 13e00003 mvnne r0, #3 <== NOT EXECUTED a90c: 18bd8070 popne {r4, r5, r6, pc} <== NOT EXECUTED return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; a910: e594300c ldr r3, [r4, #12] <== NOT EXECUTED PIPE_UNLOCK(pipe); a914: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(uint *)buffer = pipe->Length; a918: e5853000 str r3, [r5] <== NOT EXECUTED PIPE_UNLOCK(pipe); a91c: ebffe692 bl 436c <== NOT EXECUTED a920: e1a00006 mov r0, r6 <== NOT EXECUTED return 0; } return -EINVAL; } a924: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED a928: 4004667f .word 0x4004667f 0000a864 : rtems_libio_t *iop ) { /* Seek on pipe is not supported */ return -ESPIPE; } a864: e3e0001c mvn r0, #28 <== NOT EXECUTED a868: e12fff1e bx lr <== NOT EXECUTED 0000a92c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a92c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} <== NOT EXECUTED a930: e1a09001 mov r9, r1 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a934: e3a01000 mov r1, #0 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a938: e1a04000 mov r4, r0 <== NOT EXECUTED a93c: e1a05002 mov r5, r2 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a940: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED a944: e1a02001 mov r2, r1 <== NOT EXECUTED pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a948: e1a0a003 mov sl, r3 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a94c: ebffe640 bl 4254 <== NOT EXECUTED a950: e2506000 subs r6, r0, #0 <== NOT EXECUTED a954: 13e06003 mvnne r6, #3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a958: 01a0b00d moveq fp, sp <== NOT EXECUTED rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a95c: 0a000045 beq aa78 <== NOT EXECUTED a960: ea00004b b aa94 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) a964: e5943014 ldr r3, [r4, #20] <== NOT EXECUTED a968: e3530000 cmp r3, #0 <== NOT EXECUTED a96c: 0a000043 beq aa80 <== NOT EXECUTED goto out_locked; if (LIBIO_NODELAY(iop)) { a970: e59a7014 ldr r7, [sl, #20] <== NOT EXECUTED a974: e2177001 ands r7, r7, #1 <== NOT EXECUTED a978: 13e0700a mvnne r7, #10 <== NOT EXECUTED a97c: 1a000040 bne aa84 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a980: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED a984: e2833001 add r3, r3, #1 <== NOT EXECUTED a988: e5843018 str r3, [r4, #24] <== NOT EXECUTED PIPE_UNLOCK(pipe); a98c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED a990: ebffe675 bl 436c <== NOT EXECUTED if (! PIPE_READWAIT(pipe)) a994: e1a01007 mov r1, r7 <== NOT EXECUTED a998: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED a99c: eb0003ff bl b9a0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a9a0: e1a01007 mov r1, r7 <== NOT EXECUTED a9a4: 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)) a9a8: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a9ac: 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)) a9b0: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { a9b4: ebffe626 bl 4254 <== NOT EXECUTED a9b8: e3500000 cmp r0, #0 <== NOT EXECUTED a9bc: 13e07003 mvnne r7, #3 <== NOT EXECUTED a9c0: 1a000031 bne aa8c <== NOT EXECUTED /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a9c4: e5943018 ldr r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a9c8: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a9cc: e2433001 sub r3, r3, #1 <== NOT EXECUTED a9d0: e5843018 str r3, [r4, #24] <== NOT EXECUTED if (ret != 0) a9d4: 1a00002a bne aa84 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { a9d8: e594200c ldr r2, [r4, #12] <== NOT EXECUTED a9dc: e3520000 cmp r2, #0 <== NOT EXECUTED a9e0: 0affffdf beq a964 <== NOT EXECUTED goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; a9e4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a9e8: e5948004 ldr r8, [r4, #4] <== NOT EXECUTED if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); a9ec: e0667005 rsb r7, r6, r5 <== NOT EXECUTED a9f0: e1520007 cmp r2, r7 <== NOT EXECUTED a9f4: 31a07002 movcc r7, r2 <== NOT EXECUTED chunk1 = pipe->Size - pipe->Start; a9f8: e0638008 rsb r8, r3, r8 <== NOT EXECUTED a9fc: e5941000 ldr r1, [r4] <== NOT EXECUTED if (chunk > chunk1) { aa00: e1570008 cmp r7, r8 <== NOT EXECUTED aa04: 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); aa08: d0811003 addle r1, r1, r3 <== NOT EXECUTED aa0c: d1a02007 movle r2, r7 <== NOT EXECUTED } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { aa10: da000006 ble aa30 <== NOT EXECUTED memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); aa14: e0811003 add r1, r1, r3 <== NOT EXECUTED aa18: e1a02008 mov r2, r8 <== NOT EXECUTED aa1c: eb0009db bl d190 <== NOT EXECUTED memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); aa20: e0860008 add r0, r6, r8 <== NOT EXECUTED aa24: e5941000 ldr r1, [r4] <== NOT EXECUTED aa28: e0890000 add r0, r9, r0 <== NOT EXECUTED aa2c: e0682007 rsb r2, r8, r7 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); aa30: eb0009d6 bl d190 <== NOT EXECUTED pipe->Start += chunk; aa34: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED aa38: e0870000 add r0, r7, r0 <== NOT EXECUTED aa3c: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Start %= pipe->Size; aa40: e5941004 ldr r1, [r4, #4] <== NOT EXECUTED aa44: eb002dca bl 16174 <__umodsi3> <== NOT EXECUTED pipe->Length -= chunk; aa48: e594300c ldr r3, [r4, #12] <== NOT EXECUTED aa4c: e0673003 rsb r3, r7, r3 <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) aa50: e3530000 cmp r3, #0 <== NOT EXECUTED } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; aa54: e5840008 str r0, [r4, #8] <== NOT EXECUTED pipe->Length -= chunk; aa58: e584300c str r3, [r4, #12] <== NOT EXECUTED /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; aa5c: 05843008 streq r3, [r4, #8] <== NOT EXECUTED if (pipe->waitingWriters > 0) aa60: e594301c ldr r3, [r4, #28] <== NOT EXECUTED aa64: e3530000 cmp r3, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); aa68: 15940030 ldrne r0, [r4, #48] ; 0x30 <== NOT EXECUTED aa6c: 11a0100d movne r1, sp <== NOT EXECUTED aa70: 1b0003b4 blne b948 <== NOT EXECUTED read += chunk; aa74: e0866007 add r6, r6, r7 <== NOT EXECUTED int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { aa78: e1560005 cmp r6, r5 <== NOT EXECUTED aa7c: 3affffd5 bcc a9d8 <== NOT EXECUTED aa80: e3a07000 mov r7, #0 <== NOT EXECUTED PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); aa84: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED aa88: ebffe637 bl 436c <== NOT EXECUTED out_nolock: if (read > 0) aa8c: e3560000 cmp r6, #0 <== NOT EXECUTED aa90: d1a06007 movle r6, r7 <== NOT EXECUTED return read; return ret; } aa94: e1a00006 mov r0, r6 <== NOT EXECUTED aa98: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 0000ac74 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ac74: e92d40f1 push {r0, r4, r5, r6, r7, lr} <== NOT EXECUTED pipe_control_t *pipe = *pipep; ac78: e5904000 ldr r4, [r0] <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ac7c: e1a05001 mov r5, r1 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ac80: e3a01000 mov r1, #0 <== NOT EXECUTED */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { ac84: e1a06000 mov r6, r0 <== NOT EXECUTED pipe_control_t *pipe = *pipep; uint32_t mode; rtems_status_code sc; sc = rtems_semaphore_obtain(pipe->Semaphore, ac88: e1a02001 mov r2, r1 <== NOT EXECUTED ac8c: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac90: ebffe56f bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not released! */ if(sc != RTEMS_SUCCESSFUL) ac94: e3500000 cmp r0, #0 <== NOT EXECUTED ac98: 1a000010 bne ace0 <== NOT EXECUTED rtems_fatal_error_occurred(sc); mode = LIBIO_ACCMODE(iop); ac9c: e5955014 ldr r5, [r5, #20] <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) aca0: e3150002 tst r5, #2 <== NOT EXECUTED pipe->Readers --; aca4: 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); aca8: e2055006 and r5, r5, #6 <== NOT EXECUTED if (mode & LIBIO_FLAGS_READ) pipe->Readers --; acac: 12433001 subne r3, r3, #1 <== NOT EXECUTED acb0: 15843010 strne r3, [r4, #16] <== NOT EXECUTED if (mode & LIBIO_FLAGS_WRITE) acb4: e3150004 tst r5, #4 <== NOT EXECUTED pipe->Writers --; acb8: 15943014 ldrne r3, [r4, #20] <== NOT EXECUTED acbc: 12433001 subne r3, r3, #1 <== NOT EXECUTED acc0: 15843014 strne r3, [r4, #20] <== NOT EXECUTED sc = rtems_semaphore_obtain(rtems_pipe_semaphore, acc4: e59f30a0 ldr r3, [pc, #160] ; ad6c <== NOT EXECUTED acc8: e3a01000 mov r1, #0 <== NOT EXECUTED accc: e5930000 ldr r0, [r3] <== NOT EXECUTED acd0: e1a02001 mov r2, r1 <== NOT EXECUTED acd4: ebffe55e bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); /* WARN pipe not freed and pipep not set to NULL! */ if(sc != RTEMS_SUCCESSFUL) acd8: e3500000 cmp r0, #0 <== NOT EXECUTED acdc: 0a000000 beq ace4 <== NOT EXECUTED rtems_fatal_error_occurred(sc); ace0: ebffe6ef bl 48a4 <== NOT EXECUTED PIPE_UNLOCK(pipe); ace4: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ace8: ebffe59f bl 436c <== NOT EXECUTED if (pipe->Readers == 0 && pipe->Writers == 0) { acec: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED acf0: e3530000 cmp r3, #0 <== NOT EXECUTED acf4: 1a000006 bne ad14 <== NOT EXECUTED acf8: e5947014 ldr r7, [r4, #20] <== NOT EXECUTED acfc: e3570000 cmp r7, #0 <== NOT EXECUTED ad00: 1a000003 bne ad14 <== NOT EXECUTED #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); ad04: e1a00004 mov r0, r4 <== NOT EXECUTED ad08: ebffffcc bl ac40 <== NOT EXECUTED *pipep = NULL; ad0c: 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) { ad10: ea000010 b ad58 <== NOT EXECUTED delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) ad14: e2552004 subs r2, r5, #4 <== NOT EXECUTED ad18: 13a02001 movne r2, #1 <== NOT EXECUTED ad1c: e3530000 cmp r3, #0 <== NOT EXECUTED ad20: 13a02000 movne r2, #0 <== NOT EXECUTED ad24: e3520000 cmp r2, #0 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); ad28: 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) ad2c: 1a000007 bne ad50 <== NOT EXECUTED /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) ad30: e5942014 ldr r2, [r4, #20] <== NOT EXECUTED ad34: e2553002 subs r3, r5, #2 <== NOT EXECUTED ad38: 13a03001 movne r3, #1 <== NOT EXECUTED ad3c: e3520000 cmp r2, #0 <== NOT EXECUTED ad40: 13a03000 movne r3, #0 <== NOT EXECUTED ad44: e3530000 cmp r3, #0 <== NOT EXECUTED ad48: 0a000002 beq ad58 <== NOT EXECUTED PIPE_WAKEUPREADERS(pipe); ad4c: e594002c ldr r0, [r4, #44] ; 0x2c <== NOT EXECUTED ad50: e1a0100d mov r1, sp <== NOT EXECUTED ad54: eb0002fb bl b948 <== NOT EXECUTED rtems_semaphore_release(rtems_pipe_semaphore); ad58: e59f300c ldr r3, [pc, #12] ; ad6c <== NOT EXECUTED ad5c: e5930000 ldr r0, [r3] <== NOT EXECUTED ad60: ebffe581 bl 436c <== NOT EXECUTED if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } ad64: e3a00000 mov r0, #0 <== NOT EXECUTED ad68: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} <== NOT EXECUTED ad6c: 00019b00 .word 0x00019b00 0000aa9c : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { aa9c: 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) aaa0: e2525000 subs r5, r2, #0 <== NOT EXECUTED pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { aaa4: e1a04000 mov r4, r0 <== NOT EXECUTED aaa8: e1a0b001 mov fp, r1 <== NOT EXECUTED aaac: e1a08003 mov r8, r3 <== NOT EXECUTED int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) aab0: 01a06005 moveq r6, r5 <== NOT EXECUTED aab4: 0a00005f beq ac38 <== NOT EXECUTED return 0; if (! PIPE_LOCK(pipe)) aab8: e3a01000 mov r1, #0 <== NOT EXECUTED aabc: e5900028 ldr r0, [r0, #40] ; 0x28 <== NOT EXECUTED aac0: e1a02001 mov r2, r1 <== NOT EXECUTED aac4: ebffe5e2 bl 4254 <== NOT EXECUTED aac8: e3500000 cmp r0, #0 <== NOT EXECUTED aacc: 13e06003 mvnne r6, #3 <== NOT EXECUTED aad0: 1a000058 bne ac38 <== NOT EXECUTED return -EINTR; if (pipe->Readers == 0) { aad4: e5946010 ldr r6, [r4, #16] <== NOT EXECUTED aad8: e3560000 cmp r6, #0 <== NOT EXECUTED aadc: 0a000022 beq ab6c <== NOT EXECUTED ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; aae0: e5949004 ldr r9, [r4, #4] <== NOT EXECUTED aae4: e1550009 cmp r5, r9 <== NOT EXECUTED aae8: 91a09005 movls r9, r5 <== NOT EXECUTED aaec: 83a09001 movhi r9, #1 <== NOT EXECUTED aaf0: e1a06000 mov r6, r0 <== NOT EXECUTED aaf4: ea000043 b ac08 <== NOT EXECUTED while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { aaf8: e5987014 ldr r7, [r8, #20] <== NOT EXECUTED aafc: e2177001 ands r7, r7, #1 <== NOT EXECUTED ab00: 13e0700a mvnne r7, #10 <== NOT EXECUTED ab04: 1a000042 bne ac14 <== NOT EXECUTED ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; ab08: e594301c ldr r3, [r4, #28] <== NOT EXECUTED ab0c: e2833001 add r3, r3, #1 <== NOT EXECUTED ab10: e584301c str r3, [r4, #28] <== NOT EXECUTED PIPE_UNLOCK(pipe); ab14: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ab18: ebffe613 bl 436c <== NOT EXECUTED if (! PIPE_WRITEWAIT(pipe)) ab1c: e1a01007 mov r1, r7 <== NOT EXECUTED ab20: e5940030 ldr r0, [r4, #48] ; 0x30 <== NOT EXECUTED ab24: eb00039d bl b9a0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ab28: e1a01007 mov r1, r7 <== NOT EXECUTED ab2c: 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)) ab30: e2507000 subs r7, r0, #0 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ab34: 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)) ab38: 13e07003 mvnne r7, #3 <== NOT EXECUTED ret = -EINTR; if (! PIPE_LOCK(pipe)) { ab3c: ebffe5c4 bl 4254 <== NOT EXECUTED ab40: e3500000 cmp r0, #0 <== NOT EXECUTED ab44: 13e07003 mvnne r7, #3 <== NOT EXECUTED ab48: 1a000038 bne ac30 <== NOT EXECUTED /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ab4c: e594301c ldr r3, [r4, #28] <== NOT EXECUTED if (ret != 0) ab50: e3570000 cmp r7, #0 <== NOT EXECUTED if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; ab54: e2433001 sub r3, r3, #1 <== NOT EXECUTED ab58: e584301c str r3, [r4, #28] <== NOT EXECUTED if (ret != 0) ab5c: 1a00002c bne ac14 <== NOT EXECUTED goto out_locked; if (pipe->Readers == 0) { ab60: e5943010 ldr r3, [r4, #16] <== NOT EXECUTED ab64: e3530000 cmp r3, #0 <== NOT EXECUTED ab68: 1a000001 bne ab74 <== NOT EXECUTED ab6c: e3e0701f mvn r7, #31 <== NOT EXECUTED ab70: ea000027 b ac14 <== 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) { ab74: e594a004 ldr sl, [r4, #4] <== NOT EXECUTED ab78: e594200c ldr r2, [r4, #12] <== NOT EXECUTED ab7c: e062300a rsb r3, r2, sl <== NOT EXECUTED ab80: e1530009 cmp r3, r9 <== NOT EXECUTED ab84: 3affffdb bcc aaf8 <== NOT EXECUTED goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); ab88: e5940008 ldr r0, [r4, #8] <== NOT EXECUTED ab8c: e1a0100a mov r1, sl <== NOT EXECUTED ab90: e0820000 add r0, r2, r0 <== NOT EXECUTED ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); ab94: e0667005 rsb r7, r6, r5 <== NOT EXECUTED ab98: e1530007 cmp r3, r7 <== NOT EXECUTED ab9c: 31a07003 movcc r7, r3 <== NOT EXECUTED chunk1 = pipe->Size - PIPE_WSTART(pipe); aba0: eb002d73 bl 16174 <__umodsi3> <== NOT EXECUTED aba4: e5943000 ldr r3, [r4] <== NOT EXECUTED aba8: e060a00a rsb sl, r0, sl <== NOT EXECUTED if (chunk > chunk1) { abac: e157000a cmp r7, sl <== NOT EXECUTED abb0: 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); abb4: d0830000 addle r0, r3, r0 <== NOT EXECUTED abb8: d1a02007 movle r2, r7 <== NOT EXECUTED } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { abbc: da000006 ble abdc <== NOT EXECUTED memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); abc0: e1a0200a mov r2, sl <== NOT EXECUTED abc4: e0830000 add r0, r3, r0 <== NOT EXECUTED abc8: eb000970 bl d190 <== NOT EXECUTED memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); abcc: e08a1006 add r1, sl, r6 <== NOT EXECUTED abd0: e5940000 ldr r0, [r4] <== NOT EXECUTED abd4: e08b1001 add r1, fp, r1 <== NOT EXECUTED abd8: e06a2007 rsb r2, sl, r7 <== NOT EXECUTED } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); abdc: eb00096b bl d190 <== NOT EXECUTED pipe->Length += chunk; abe0: e594300c ldr r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) abe4: 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; abe8: e0833007 add r3, r3, r7 <== NOT EXECUTED if (pipe->waitingReaders > 0) abec: 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; abf0: e584300c str r3, [r4, #12] <== NOT EXECUTED if (pipe->waitingReaders > 0) PIPE_WAKEUPREADERS(pipe); abf4: 1594002c ldrne r0, [r4, #44] ; 0x2c <== NOT EXECUTED abf8: 11a0100d movne r1, sp <== NOT EXECUTED abfc: 1b000351 blne b948 <== NOT EXECUTED written += chunk; ac00: e0866007 add r6, r6, r7 <== NOT EXECUTED ac04: 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) { ac08: e1560005 cmp r6, r5 <== NOT EXECUTED ac0c: 3affffd8 bcc ab74 <== NOT EXECUTED ac10: e3a07000 mov r7, #0 <== NOT EXECUTED /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); ac14: e5940028 ldr r0, [r4, #40] ; 0x28 <== NOT EXECUTED ac18: ebffe5d3 bl 436c <== NOT EXECUTED out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) ac1c: e3770020 cmn r7, #32 <== NOT EXECUTED ac20: 1a000002 bne ac30 <== NOT EXECUTED kill(getpid(), SIGPIPE); ac24: eb0001fe bl b424 <== NOT EXECUTED ac28: e3a0100d mov r1, #13 <== NOT EXECUTED ac2c: eb00026b bl b5e0 <== NOT EXECUTED #endif if (written > 0) ac30: e3560000 cmp r6, #0 <== NOT EXECUTED ac34: d1a06007 movle r6, r7 <== NOT EXECUTED return written; return ret; } ac38: e1a00006 mov r0, r6 <== NOT EXECUTED ac3c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00017ae0 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17ae0: e59f30b0 ldr r3, [pc, #176] ; 17b98 17ae4: e5933000 ldr r3, [r3] 17ae8: e1500003 cmp r0, r3 ssize_t read( int fd, void *buffer, size_t count ) { 17aec: e92d4070 push {r4, r5, r6, lr} 17af0: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17af4: 2a000005 bcs 17b10 iop = rtems_libio_iop( fd ); 17af8: e59f309c ldr r3, [pc, #156] ; 17b9c 17afc: e5934000 ldr r4, [r3] 17b00: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 17b04: e5943014 ldr r3, [r4, #20] 17b08: e3130c01 tst r3, #256 ; 0x100 17b0c: 1a000002 bne 17b1c 17b10: ebffd390 bl c958 <__errno> 17b14: e3a03009 mov r3, #9 17b18: ea00000f b 17b5c rtems_libio_check_buffer( buffer ); 17b1c: e3510000 cmp r1, #0 17b20: 0a000004 beq 17b38 rtems_libio_check_count( count ); 17b24: e3520000 cmp r2, #0 17b28: 01a00002 moveq r0, r2 17b2c: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 17b30: e3130002 tst r3, #2 17b34: 1a000002 bne 17b44 17b38: ebffd386 bl c958 <__errno> <== NOT EXECUTED 17b3c: e3a03016 mov r3, #22 <== NOT EXECUTED 17b40: ea000005 b 17b5c <== NOT EXECUTED /* * Now process the read(). */ if ( !iop->handlers->read_h ) 17b44: e594303c ldr r3, [r4, #60] ; 0x3c 17b48: e5933008 ldr r3, [r3, #8] 17b4c: e3530000 cmp r3, #0 17b50: 1a000004 bne 17b68 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17b54: ebffd37f bl c958 <__errno> <== NOT EXECUTED 17b58: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17b5c: e5803000 str r3, [r0] 17b60: e3e00000 mvn r0, #0 17b64: e8bd8070 pop {r4, r5, r6, pc} rc = (*iop->handlers->read_h)( iop, buffer, count ); 17b68: e1a00004 mov r0, r4 17b6c: e1a0e00f mov lr, pc 17b70: e12fff13 bx r3 if ( rc > 0 ) 17b74: e3500000 cmp r0, #0 17b78: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 17b7c: e284600c add r6, r4, #12 17b80: e8960060 ldm r6, {r5, r6} 17b84: e0952000 adds r2, r5, r0 17b88: e0a63fc0 adc r3, r6, r0, asr #31 17b8c: e584200c str r2, [r4, #12] 17b90: e5843010 str r3, [r4, #16] return rc; } 17b94: e8bd8070 pop {r4, r5, r6, pc} 17b98: 000183a0 .word 0x000183a0 17b9c: 00019b84 .word 0x00019b84 00023460 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 23460: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 23464: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 23468: e24dd018 sub sp, sp, #24 2346c: e1a05002 mov r5, r2 23470: e1a07000 mov r7, r0 rtems_filesystem_location_info_t loc; int result; if (!buf) 23474: 1a000002 bne 23484 rtems_set_errno_and_return_minus_one( EFAULT ); 23478: eb005707 bl 3909c <__errno> <== NOT EXECUTED 2347c: e3a0300e mov r3, #14 <== NOT EXECUTED 23480: ea000028 b 23528 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 23484: eb00718f bl 3fac8 23488: e28d4004 add r4, sp, #4 2348c: e3a0c000 mov ip, #0 23490: e1a01000 mov r1, r0 23494: e1a0200c mov r2, ip 23498: e1a00007 mov r0, r7 2349c: e1a03004 mov r3, r4 234a0: e58dc000 str ip, [sp] 234a4: ebff8724 bl 513c 0, &loc, false ); if ( result != 0 ) 234a8: e3500000 cmp r0, #0 234ac: 1a00001e bne 2352c return -1; if ( !loc.ops->node_type_h ){ 234b0: e59d2010 ldr r2, [sp, #16] 234b4: e5923010 ldr r3, [r2, #16] 234b8: e3530000 cmp r3, #0 234bc: 0a000012 beq 2350c rtems_filesystem_freenode( &loc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 234c0: e1a00004 mov r0, r4 234c4: e1a0e00f mov lr, pc 234c8: e12fff13 bx r3 234cc: e3500004 cmp r0, #4 234d0: e59d2010 ldr r2, [sp, #16] 234d4: 0a000009 beq 23500 rtems_filesystem_freenode( &loc ); 234d8: e3520000 cmp r2, #0 234dc: 0a000004 beq 234f4 234e0: e592301c ldr r3, [r2, #28] 234e4: e3530000 cmp r3, #0 234e8: 11a00004 movne r0, r4 234ec: 11a0e00f movne lr, pc 234f0: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EINVAL ); 234f4: eb0056e8 bl 3909c <__errno> 234f8: e3a03016 mov r3, #22 234fc: ea000009 b 23528 } if ( !loc.ops->readlink_h ){ 23500: e592303c ldr r3, [r2, #60] ; 0x3c 23504: e3530000 cmp r3, #0 23508: 1a000009 bne 23534 rtems_filesystem_freenode( &loc ); 2350c: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23510: e3530000 cmp r3, #0 <== NOT EXECUTED 23514: 11a00004 movne r0, r4 <== NOT EXECUTED 23518: 11a0e00f movne lr, pc <== NOT EXECUTED 2351c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23520: eb0056dd bl 3909c <__errno> <== NOT EXECUTED 23524: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23528: e5803000 str r3, [r0] 2352c: e3e05000 mvn r5, #0 23530: ea00000d b 2356c } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 23534: e1a02005 mov r2, r5 23538: e1a01006 mov r1, r6 2353c: e1a00004 mov r0, r4 23540: e1a0e00f mov lr, pc 23544: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 23548: e59d3010 ldr r3, [sp, #16] 2354c: 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 ); 23550: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 23554: 0a000004 beq 2356c 23558: e593301c ldr r3, [r3, #28] 2355c: e3530000 cmp r3, #0 23560: 11a00004 movne r0, r4 23564: 11a0e00f movne lr, pc 23568: 112fff13 bxne r3 return result; } 2356c: e1a00005 mov r0, r5 23570: e28dd018 add sp, sp, #24 23574: e8bd80f0 pop {r4, r5, r6, r7, pc} 0000331c : int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 331c: e59f3138 ldr r3, [pc, #312] ; 345c 3320: e5933000 ldr r3, [r3] 3324: e1500003 cmp r0, r3 ssize_t readv( int fd, const struct iovec *iov, int iovcnt ) { 3328: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 332c: e1a08002 mov r8, r2 int v; int bytes; rtems_libio_t *iop; bool all_zeros; rtems_libio_check_fd( fd ); 3330: 2a000005 bcs 334c iop = rtems_libio_iop( fd ); 3334: e59f3124 ldr r3, [pc, #292] ; 3460 3338: e5936000 ldr r6, [r3] 333c: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 3340: e5963014 ldr r3, [r6, #20] 3344: e3130c01 tst r3, #256 ; 0x100 3348: 1a000002 bne 3358 334c: eb002eab bl ee00 <__errno> <== NOT EXECUTED 3350: e3a03009 mov r3, #9 <== NOT EXECUTED 3354: ea00001e b 33d4 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 3358: e3130002 tst r3, #2 335c: 0a00001a beq 33cc /* * Argument validation on IO vector */ if ( !iov ) 3360: e3510000 cmp r1, #0 3364: 0a000018 beq 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 3368: e3520000 cmp r2, #0 336c: da000016 ble 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 3370: e3520b01 cmp r2, #1024 ; 0x400 3374: ca000014 bgt 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->read_h ) 3378: e596303c ldr r3, [r6, #60] ; 0x3c 337c: e5933008 ldr r3, [r3, #8] 3380: e3530000 cmp r3, #0 3384: 1a000002 bne 3394 rtems_set_errno_and_return_minus_one( ENOTSUP ); 3388: eb002e9c bl ee00 <__errno> <== NOT EXECUTED 338c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 3390: ea00000f b 33d4 <== NOT EXECUTED 3394: e3a03000 mov r3, #0 3398: e1a05001 mov r5, r1 339c: e1a02001 mov r2, r1 33a0: e1a01003 mov r1, r3 all_zeros = true; for ( total=0, v=0 ; v < iovcnt ; v++ ) { ssize_t old; if ( !iov[v].iov_base ) 33a4: e5920000 ldr r0, [r2] 33a8: 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++ ) { 33ac: e2833001 add r3, r3, #1 ssize_t old; if ( !iov[v].iov_base ) 33b0: 0a000005 beq 33cc rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 33b4: e592c004 ldr ip, [r2, #4] 33b8: e35c0000 cmp ip, #0 rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; 33bc: e081000c add r0, r1, ip ssize_t old; if ( !iov[v].iov_base ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( iov[v].iov_len <= 0 ) 33c0: 0a000001 beq 33cc rtems_set_errno_and_return_minus_one( EINVAL ); /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old ) 33c4: e1500001 cmp r0, r1 33c8: aa000003 bge 33dc rtems_set_errno_and_return_minus_one( EINVAL ); 33cc: eb002e8b bl ee00 <__errno> 33d0: e3a03016 mov r3, #22 33d4: e5803000 str r3, [r0] 33d8: ea00000d b 3414 * 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++ ) { 33dc: e1530008 cmp r3, r8 33e0: e2822008 add r2, r2, #8 33e4: b1a01000 movlt r1, r0 33e8: baffffed blt 33a4 33ec: e3a07000 mov r7, #0 33f0: 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 ); 33f4: e8950006 ldm r5, {r1, r2} 33f8: e596303c ldr r3, [r6, #60] ; 0x3c 33fc: e1a00006 mov r0, r6 3400: e1a0e00f mov lr, pc 3404: e593f008 ldr pc, [r3, #8] if ( bytes < 0 ) 3408: e3500000 cmp r0, #0 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 340c: e2877001 add r7, r7, #1 bytes = (*iop->handlers->read_h)( iop, iov[v].iov_base, iov[v].iov_len ); if ( bytes < 0 ) 3410: aa000001 bge 341c 3414: e3e04000 mvn r4, #0 3418: ea00000d b 3454 return -1; if ( bytes > 0 ) { 341c: 0a000006 beq 343c iop->offset += bytes; 3420: e286c00c add ip, r6, #12 <== NOT EXECUTED 3424: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 3428: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 342c: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 3430: e586200c str r2, [r6, #12] <== NOT EXECUTED 3434: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 3438: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 343c: e5953004 ldr r3, [r5, #4] 3440: e1500003 cmp r0, r3 3444: 1a000002 bne 3454 } /* * Now process the readv(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 3448: e1570008 cmp r7, r8 <== NOT EXECUTED 344c: e2855008 add r5, r5, #8 <== NOT EXECUTED 3450: baffffe7 blt 33f4 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 3454: e1a00004 mov r0, r4 3458: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 345c: 0001c0b0 .word 0x0001c0b0 3460: 0001ecd8 .word 0x0001ecd8 00017bf8 : { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17bf8: e59f310c ldr r3, [pc, #268] ; 17d0c /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 17bfc: e59f210c ldr r2, [pc, #268] ; 17d10 17c00: e592c000 ldr ip, [r2] { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17c04: 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())) { 17c08: e35c0003 cmp ip, #3 { uintptr_t old_size; char *new_area; uintptr_t resize; MSBUMP(realloc_calls, 1); 17c0c: e2822001 add r2, r2, #1 17c10: e92d40f1 push {r0, r4, r5, r6, r7, lr} 17c14: e5832010 str r2, [r3, #16] 17c18: e1a04000 mov r4, r0 17c1c: 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())) { 17c20: 1a000007 bne 17c44 if (_Thread_Dispatch_disable_level > 0) 17c24: e59f30e8 ldr r3, [pc, #232] ; 17d14 17c28: e5933000 ldr r3, [r3] 17c2c: e3530000 cmp r3, #0 17c30: 1a000032 bne 17d00 return (void *) 0; if (_ISR_Nest_level > 0) 17c34: e59f30dc ldr r3, [pc, #220] ; 17d18 17c38: e5933000 ldr r3, [r3] 17c3c: e3530000 cmp r3, #0 17c40: 1a00002e bne 17d00 } /* * Continue with realloc(). */ if ( !ptr ) 17c44: e3540000 cmp r4, #0 17c48: 1a000003 bne 17c5c return malloc( size ); 17c4c: e1a00005 mov r0, r5 17c50: ebffc409 bl 8c7c 17c54: e1a04000 mov r4, r0 17c58: ea000029 b 17d04 if ( !size ) { 17c5c: e3550000 cmp r5, #0 17c60: 1a000003 bne 17c74 free( ptr ); 17c64: e1a00004 mov r0, r4 <== NOT EXECUTED 17c68: ebffc2b9 bl 8754 <== NOT EXECUTED 17c6c: e1a04005 mov r4, r5 <== NOT EXECUTED return (void *) 0; 17c70: ea000023 b 17d04 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 17c74: e59f60a0 ldr r6, [pc, #160] ; 17d1c 17c78: e1a01004 mov r1, r4 17c7c: e5960000 ldr r0, [r6] 17c80: e1a0200d mov r2, sp 17c84: eb000055 bl 17de0 <_Protected_heap_Get_block_size> 17c88: e2507000 subs r7, r0, #0 17c8c: 1a000004 bne 17ca4 errno = EINVAL; 17c90: ebffd330 bl c958 <__errno> 17c94: e3a03016 mov r3, #22 17c98: e5803000 str r3, [r0] 17c9c: e1a04007 mov r4, r7 return (void *) 0; 17ca0: ea000017 b 17d04 #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 ) ) { 17ca4: e5960000 ldr r0, [r6] 17ca8: e1a01004 mov r1, r4 17cac: e1a02005 mov r2, r5 17cb0: eb00005b bl 17e24 <_Protected_heap_Resize_block> 17cb4: e3500000 cmp r0, #0 17cb8: 1a000011 bne 17d04 * 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 ); 17cbc: e1a00005 mov r0, r5 17cc0: ebffc3ed bl 8c7c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 17cc4: e59f3040 ldr r3, [pc, #64] ; 17d0c 17cc8: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 17ccc: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 17cd0: e2422001 sub r2, r2, #1 17cd4: e5832004 str r2, [r3, #4] if ( !new_area ) { 17cd8: 0a000008 beq 17d00 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 17cdc: e59d2000 ldr r2, [sp] 17ce0: e1a01004 mov r1, r4 17ce4: e1550002 cmp r5, r2 17ce8: 31a02005 movcc r2, r5 17cec: ebffd527 bl d190 free( ptr ); 17cf0: e1a00004 mov r0, r4 17cf4: ebffc296 bl 8754 17cf8: e1a04006 mov r4, r6 return new_area; 17cfc: ea000000 b 17d04 17d00: e3a04000 mov r4, #0 } 17d04: e1a00004 mov r0, r4 17d08: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 17d0c: 00019b90 .word 0x00019b90 17d10: 00019e90 .word 0x00019e90 17d14: 00019cec .word 0x00019cec 17d18: 00019d7c .word 0x00019d7c 17d1c: 000183ac .word 0x000183ac 00006570 : #include int rmdir( const char *pathname ) { 6570: e92d4070 push {r4, r5, r6, lr} 6574: e24dd02c sub sp, sp, #44 ; 0x2c 6578: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 657c: ebfffaa6 bl 501c if ( parentpathlen == 0 ) 6580: e2505000 subs r5, r0, #0 6584: 1a000019 bne 65f0 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 6588: e5d63000 ldrb r3, [r6] 658c: e353002f cmp r3, #47 ; 0x2f 6590: 1353005c cmpne r3, #92 ; 0x5c 6594: 0a000001 beq 65a0 6598: e3530000 cmp r3, #0 <== NOT EXECUTED 659c: 1a000009 bne 65c8 <== NOT EXECUTED 65a0: e59f325c ldr r3, [pc, #604] ; 6804 65a4: e593e000 ldr lr, [r3] 65a8: e28ee018 add lr, lr, #24 65ac: e8be000f ldm lr!, {r0, r1, r2, r3} 65b0: e28dc018 add ip, sp, #24 65b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 65b8: e59e3000 ldr r3, [lr] 65bc: e3a04000 mov r4, #0 65c0: e58c3000 str r3, [ip] 65c4: ea000013 b 6618 65c8: e59f3234 ldr r3, [pc, #564] ; 6804 <== NOT EXECUTED 65cc: e593e000 ldr lr, [r3] <== NOT EXECUTED 65d0: e28ee004 add lr, lr, #4 <== NOT EXECUTED 65d4: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 65d8: e28dc018 add ip, sp, #24 <== NOT EXECUTED 65dc: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 65e0: e59e3000 ldr r3, [lr] <== NOT EXECUTED 65e4: e1a04005 mov r4, r5 <== NOT EXECUTED 65e8: e58c3000 str r3, [ip] <== NOT EXECUTED 65ec: ea000009 b 6618 <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 65f0: e3a0c000 mov ip, #0 65f4: e1a00006 mov r0, r6 65f8: e1a01005 mov r1, r5 65fc: e3a02002 mov r2, #2 6600: e28d3018 add r3, sp, #24 6604: e58dc000 str ip, [sp] 6608: ebfffacb bl 513c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 660c: e3500000 cmp r0, #0 6610: 1a000077 bne 67f4 6614: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6618: e28de018 add lr, sp, #24 661c: e8be000f ldm lr!, {r0, r1, r2, r3} 6620: e28dc004 add ip, sp, #4 6624: e8ac000f stmia ip!, {r0, r1, r2, r3} 6628: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; 662c: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 6630: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 6634: e1a00005 mov r0, r5 6638: eb00e522 bl 3fac8 663c: e1a01000 mov r1, r0 6640: e1a00005 mov r0, r5 6644: ebfffa68 bl 4fec 6648: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 664c: e1a00006 mov r0, r6 6650: eb00e51c bl 3fac8 6654: e28d5004 add r5, sp, #4 6658: e3a0c000 mov ip, #0 665c: e1a01000 mov r1, r0 6660: e1a0200c mov r2, ip 6664: e1a00006 mov r0, r6 6668: e1a03005 mov r3, r5 666c: e58dc000 str ip, [sp] 6670: ebfffa79 bl 505c 0, &loc, false ); if ( result != 0 ) { 6674: e3500000 cmp r0, #0 6678: 0a00000b beq 66ac if ( free_parentloc ) 667c: e3540000 cmp r4, #0 6680: 0a00005b beq 67f4 rtems_filesystem_freenode( &parentloc ); 6684: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6688: e3530000 cmp r3, #0 <== NOT EXECUTED 668c: 0a000058 beq 67f4 <== NOT EXECUTED 6690: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6694: e3530000 cmp r3, #0 <== NOT EXECUTED 6698: 0a000055 beq 67f4 <== NOT EXECUTED 669c: e28d0018 add r0, sp, #24 <== NOT EXECUTED 66a0: e1a0e00f mov lr, pc <== NOT EXECUTED 66a4: e12fff13 bx r3 <== NOT EXECUTED 66a8: ea000051 b 67f4 <== NOT EXECUTED /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66ac: e59d2010 ldr r2, [sp, #16] 66b0: e5923010 ldr r3, [r2, #16] 66b4: e3530000 cmp r3, #0 rtems_filesystem_freenode( &loc ); 66b8: 0592301c ldreq r3, [r2, #28] /* * Verify you can remove this node as a directory. */ if ( !loc.ops->node_type_h ){ 66bc: 0a000021 beq 6748 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 ){ 66c0: e1a00005 mov r0, r5 66c4: e1a0e00f mov lr, pc 66c8: e12fff13 bx r3 66cc: e3500001 cmp r0, #1 66d0: 0a000014 beq 6728 rtems_filesystem_freenode( &loc ); 66d4: e59d3010 ldr r3, [sp, #16] 66d8: e3530000 cmp r3, #0 66dc: 0a000004 beq 66f4 66e0: e593301c ldr r3, [r3, #28] 66e4: e3530000 cmp r3, #0 66e8: 11a00005 movne r0, r5 66ec: 11a0e00f movne lr, pc 66f0: 112fff13 bxne r3 if ( free_parentloc ) 66f4: e3540000 cmp r4, #0 66f8: 0a000007 beq 671c rtems_filesystem_freenode( &parentloc ); 66fc: e59d3024 ldr r3, [sp, #36] ; 0x24 6700: e3530000 cmp r3, #0 6704: 0a000004 beq 671c 6708: e593301c ldr r3, [r3, #28] 670c: e3530000 cmp r3, #0 6710: 128d0018 addne r0, sp, #24 6714: 11a0e00f movne lr, pc 6718: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( ENOTDIR ); 671c: eb00ca5e bl 3909c <__errno> 6720: e3a03014 mov r3, #20 6724: ea000017 b 6788 /* * Use the filesystems rmnod to remove the node. */ if ( !loc.handlers->rmnod_h ){ 6728: e59d300c ldr r3, [sp, #12] 672c: e5933034 ldr r3, [r3, #52] ; 0x34 6730: e3530000 cmp r3, #0 6734: 1a000015 bne 6790 rtems_filesystem_freenode( &loc ); 6738: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 673c: e3530000 cmp r3, #0 <== NOT EXECUTED 6740: 0a000004 beq 6758 <== NOT EXECUTED 6744: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6748: e3530000 cmp r3, #0 <== NOT EXECUTED 674c: 11a00005 movne r0, r5 <== NOT EXECUTED 6750: 11a0e00f movne lr, pc <== NOT EXECUTED 6754: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) 6758: e3540000 cmp r4, #0 <== NOT EXECUTED 675c: 0a000007 beq 6780 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 6760: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED 6764: e3530000 cmp r3, #0 <== NOT EXECUTED 6768: 0a000004 beq 6780 <== NOT EXECUTED 676c: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6770: e3530000 cmp r3, #0 <== NOT EXECUTED 6774: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 6778: 11a0e00f movne lr, pc <== NOT EXECUTED 677c: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6780: eb00ca45 bl 3909c <__errno> <== NOT EXECUTED 6784: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 6788: e5803000 str r3, [r0] 678c: ea000018 b 67f4 } result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 6790: e28d0018 add r0, sp, #24 6794: e1a01005 mov r1, r5 6798: e1a0e00f mov lr, pc 679c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 67a0: e59d3010 ldr r3, [sp, #16] 67a4: 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 ); 67a8: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); 67ac: 0a000004 beq 67c4 67b0: e593301c ldr r3, [r3, #28] 67b4: e3530000 cmp r3, #0 67b8: 11a00005 movne r0, r5 67bc: 11a0e00f movne lr, pc 67c0: 112fff13 bxne r3 if ( free_parentloc ) 67c4: e3540000 cmp r4, #0 67c8: 0a00000a beq 67f8 rtems_filesystem_freenode( &parentloc ); 67cc: e59d3024 ldr r3, [sp, #36] ; 0x24 67d0: e3530000 cmp r3, #0 67d4: 0a000007 beq 67f8 67d8: e593301c ldr r3, [r3, #28] 67dc: e3530000 cmp r3, #0 67e0: 0a000004 beq 67f8 67e4: e28d0018 add r0, sp, #24 67e8: e1a0e00f mov lr, pc 67ec: e12fff13 bx r3 67f0: ea000000 b 67f8 67f4: e3e06000 mvn r6, #0 return result; } 67f8: e1a00006 mov r0, r6 67fc: e28dd02c add sp, sp, #44 ; 0x2c 6800: e8bd8070 pop {r4, r5, r6, pc} 6804: 000534b8 .word 0x000534b8 00012278 : sprintf(bad_buffer, "< %" PRId32 "[0x%" PRIx32 " ] >", bad_value, bad_value); #else static char bad_buffer[40] = ""; #endif return bad_buffer; } 12278: e59f0000 ldr r0, [pc, #0] ; 12280 <== NOT EXECUTED 1227c: e12fff1e bx lr <== NOT EXECUTED 12280: 00021f0c .word 0x00021f0c 0000ebb4 : const char *rtems_assoc_name_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { ebb4: e92d4010 push {r4, lr} ebb8: e1a04001 mov r4, r1 const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); ebbc: eb000006 bl ebdc if (nap) ebc0: e3500000 cmp r0, #0 ebc4: 0a000001 beq ebd0 return nap->name; return rtems_assoc_name_bad(local_value); } ebc8: e5900000 ldr r0, [r0] ebcc: 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); ebd0: e1a00004 mov r0, r4 <== NOT EXECUTED } ebd4: 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); ebd8: ea000da6 b 12278 <== NOT EXECUTED 0000c0e0 : uint32_t rtems_assoc_remote_by_local( const rtems_assoc_t *ap, uint32_t local_value ) { c0e0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED const rtems_assoc_t *nap; nap = rtems_assoc_ptr_by_local(ap, local_value); c0e4: eb0001fe bl c8e4 <== NOT EXECUTED if (nap) c0e8: e3500000 cmp r0, #0 <== NOT EXECUTED return nap->remote_value; c0ec: 15900008 ldrne r0, [r0, #8] <== NOT EXECUTED return 0; } c0f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 00001148 : size_t length ) { const char *p; if ( !name ) 1148: e3500000 cmp r0, #0 const char *rtems_bsp_cmdline_get_param( const char *name, char *value, size_t length ) { 114c: e92d4070 push {r4, r5, r6, lr} 1150: e1a04001 mov r4, r1 1154: e1a05002 mov r5, r2 const char *p; if ( !name ) 1158: 0a00001c beq 11d0 return NULL; if ( !value ) 115c: e3510000 cmp r1, #0 1160: 0a00001b beq 11d4 return NULL; if ( !length ) 1164: e3520000 cmp r2, #0 1168: 0a000018 beq 11d0 return NULL; value[0] = '\0'; 116c: e3a06000 mov r6, #0 1170: e5c16000 strb r6, [r1] p = rtems_bsp_cmdline_get_param_raw( name ); 1174: eb000018 bl 11dc if ( !p ) 1178: e3500000 cmp r0, #0 117c: 0a000013 beq 11d0 int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i quotes++; } else if ( ((quotes % 2) == 0) && *p == ' ' ) 119c: e3160001 tst r6, #1 11a0: 1a000001 bne 11ac 11a4: e3520020 cmp r2, #32 11a8: 0a000009 beq 11d4 break; value[i++] = *p++; 11ac: e7c42003 strb r2, [r4, r3] 11b0: e2833001 add r3, r3, #1 value[i] = '\0'; 11b4: e7c41003 strb r1, [r4, r3] int i; int quotes; const char *p = start; quotes=0; for (i=0 ; *p && i 11c4: e1530005 cmp r3, r5 11c8: 3afffff0 bcc 1190 11cc: ea000000 b 11d4 <== NOT EXECUTED 11d0: e3a04000 mov r4, #0 return NULL; copy_string( p, value, length ); return value; } 11d4: e1a00004 mov r0, r4 11d8: e8bd8070 pop {r4, r5, r6, pc} 00001204 : const char *rtems_bsp_cmdline_get_param_rhs( const char *name, char *value, size_t length ) { 1204: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1208: e1a05000 mov r5, r0 <== NOT EXECUTED 120c: e1a04001 mov r4, r1 <== NOT EXECUTED const char *p; const char *rhs; char *d; p = rtems_bsp_cmdline_get_param( name, value, length ); 1210: ebffffcc bl 1148 <== NOT EXECUTED if ( !p ) 1214: e2506000 subs r6, r0, #0 <== NOT EXECUTED 1218: 0a000018 beq 1280 <== NOT EXECUTED return NULL; rhs = &p[strlen(name)]; 121c: e1a00005 mov r0, r5 <== NOT EXECUTED 1220: eb0031a1 bl d8ac <== NOT EXECUTED if ( *rhs != '=' ) 1224: e7d63000 ldrb r3, [r6, r0] <== NOT EXECUTED 1228: e353003d cmp r3, #61 ; 0x3d <== NOT EXECUTED p = rtems_bsp_cmdline_get_param( name, value, length ); if ( !p ) return NULL; rhs = &p[strlen(name)]; 122c: e0866000 add r6, r6, r0 <== NOT EXECUTED if ( *rhs != '=' ) 1230: 1a000012 bne 1280 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) 1234: e5d63001 ldrb r3, [r6, #1] <== NOT EXECUTED rhs = &p[strlen(name)]; if ( *rhs != '=' ) return NULL; rhs++; 1238: e2866001 add r6, r6, #1 <== NOT EXECUTED if ( *rhs == '\"' ) 123c: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED rhs++; 1240: 02866001 addeq r6, r6, #1 <== NOT EXECUTED 1244: e1a02004 mov r2, r4 <== NOT EXECUTED 1248: e3a0c000 mov ip, #0 <== NOT EXECUTED 124c: ea000000 b 1254 <== NOT EXECUTED for ( d=value ; *rhs ; ) *d++ = *rhs++; 1250: e5421001 strb r1, [r2, #-1] <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1254: e7d6100c ldrb r1, [r6, ip] <== NOT EXECUTED 1258: e3510000 cmp r1, #0 <== NOT EXECUTED *d++ = *rhs++; 125c: e1a03002 mov r3, r2 <== NOT EXECUTED return NULL; rhs++; if ( *rhs == '\"' ) rhs++; for ( d=value ; *rhs ; ) 1260: e28cc001 add ip, ip, #1 <== NOT EXECUTED 1264: e2822001 add r2, r2, #1 <== NOT EXECUTED 1268: 1afffff8 bne 1250 <== NOT EXECUTED *d++ = *rhs++; if ( *(d-1) == '\"' ) 126c: e5532001 ldrb r2, [r3, #-1] <== NOT EXECUTED 1270: e3520022 cmp r2, #34 ; 0x22 <== NOT EXECUTED 1274: 02433001 subeq r3, r3, #1 <== NOT EXECUTED d--; *d = '\0'; 1278: e5c31000 strb r1, [r3] <== NOT EXECUTED return value; 127c: ea000000 b 1284 <== NOT EXECUTED 1280: e3a04000 mov r4, #0 <== NOT EXECUTED } 1284: e1a00004 mov r0, r4 <== NOT EXECUTED 1288: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 00001db0 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1db0: 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 ) 1db4: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 1db8: e24dd040 sub sp, sp, #64 ; 0x40 1dbc: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 1dc0: 0a000059 beq 1f2c * 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 ); 1dc4: e28d4030 add r4, sp, #48 ; 0x30 1dc8: e1a00004 mov r0, r4 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dcc: 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 ); 1dd0: eb0012a5 bl 686c <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 1dd4: e1a01004 mov r1, r4 1dd8: e1a02005 mov r2, r5 1ddc: e59f0150 ldr r0, [pc, #336] ; 1f34 1de0: eb001b95 bl 8c3c <_Timespec_Subtract> } } } #endif (*print)( 1de4: e1a00008 mov r0, r8 1de8: e59f1148 ldr r1, [pc, #328] ; 1f38 1dec: e1a0e00f mov lr, pc 1df0: e12fff1a bx sl 1df4: e59f4140 ldr r4, [pc, #320] ; 1f3c /* * 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 ) { 1df8: e59fb140 ldr fp, [pc, #320] ; 1f40 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 1dfc: e5943004 ldr r3, [r4, #4] 1e00: e3530000 cmp r3, #0 1e04: 0a00003b beq 1ef8 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 1e08: e5936004 ldr r6, [r3, #4] if ( information ) { 1e0c: e3560000 cmp r6, #0 1e10: 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( 1e14: 128d9018 addne r9, sp, #24 1e18: 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 ) { 1e1c: 1a00002f bne 1ee0 1e20: ea000034 b 1ef8 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 1e24: e596301c ldr r3, [r6, #28] 1e28: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 1e2c: e3540000 cmp r4, #0 1e30: 0a000029 beq 1edc continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 1e34: e5940008 ldr r0, [r4, #8] 1e38: eb000e09 bl 5664 (*print)( 1e3c: e28d3008 add r3, sp, #8 1e40: e5942008 ldr r2, [r4, #8] 1e44: e1a00008 mov r0, r8 1e48: e59f10f4 ldr r1, [pc, #244] ; 1f44 1e4c: e1a0e00f mov lr, pc 1e50: 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; 1e54: e2843084 add r3, r4, #132 ; 0x84 1e58: e893000c ldm r3, {r2, r3} 1e5c: e58d2020 str r2, [sp, #32] 1e60: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 1e64: e59b2000 ldr r2, [fp] 1e68: e5943008 ldr r3, [r4, #8] 1e6c: e5922008 ldr r2, [r2, #8] 1e70: e1520003 cmp r2, r3 1e74: 1a000006 bne 1e94 Timestamp_Control used; _Timestamp_Subtract( 1e78: e59f00c8 ldr r0, [pc, #200] ; 1f48 1e7c: e28d1030 add r1, sp, #48 ; 0x30 1e80: e1a02009 mov r2, r9 1e84: eb001b6c bl 8c3c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 1e88: e28d0020 add r0, sp, #32 1e8c: e1a01009 mov r1, r9 1e90: eb001b2f bl 8b54 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 1e94: e28d203c add r2, sp, #60 ; 0x3c 1e98: e28d3038 add r3, sp, #56 ; 0x38 1e9c: e28d0020 add r0, sp, #32 1ea0: e28d1028 add r1, sp, #40 ; 0x28 1ea4: eb001b3e bl 8ba4 <_Timespec_Divide> /* * Print the information */ (*print)( context, 1ea8: e3a01ffa mov r1, #1000 ; 0x3e8 1eac: e59d0024 ldr r0, [sp, #36] ; 0x24 1eb0: eb006475 bl 1b08c <__aeabi_uidiv> 1eb4: e59d203c ldr r2, [sp, #60] ; 0x3c 1eb8: e58d2000 str r2, [sp] 1ebc: e59d2038 ldr r2, [sp, #56] ; 0x38 1ec0: e1a03000 mov r3, r0 1ec4: e58d2004 str r2, [sp, #4] 1ec8: e1a00008 mov r0, r8 1ecc: e59f1078 ldr r1, [pc, #120] ; 1f4c 1ed0: e59d2020 ldr r2, [sp, #32] 1ed4: e1a0e00f mov lr, pc 1ed8: 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++ ) { 1edc: e2877001 add r7, r7, #1 1ee0: e1d631b0 ldrh r3, [r6, #16] 1ee4: 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 ); 1ee8: e3a0100d mov r1, #13 1eec: 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++ ) { 1ef0: 9affffcb bls 1e24 1ef4: e1a04005 mov r4, r5 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1ef8: e59f3050 ldr r3, [pc, #80] ; 1f50 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++ ) { 1efc: e2844004 add r4, r4, #4 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 1f00: e1540003 cmp r4, r3 1f04: 1affffbc bne 1dfc } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 1f08: e3a01ffa mov r1, #1000 ; 0x3e8 1f0c: e59d002c ldr r0, [sp, #44] ; 0x2c 1f10: eb00645d bl 1b08c <__aeabi_uidiv> 1f14: e59f1038 ldr r1, [pc, #56] ; 1f54 1f18: e1a03000 mov r3, r0 1f1c: e59d2028 ldr r2, [sp, #40] ; 0x28 1f20: e1a00008 mov r0, r8 1f24: e1a0e00f mov lr, pc 1f28: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 1f2c: e28dd040 add sp, sp, #64 ; 0x40 1f30: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} 1f34: 0002816c .word 0x0002816c 1f38: 0001eadc .word 0x0001eadc 1f3c: 00027be8 .word 0x00027be8 1f40: 00027ce0 .word 0x00027ce0 1f44: 0001ec4e .word 0x0001ec4e 1f48: 00027ce8 .word 0x00027ce8 1f4c: 0001ec61 .word 0x0001ec61 1f50: 00027bf8 .word 0x00027bf8 1f54: 0001ec79 .word 0x0001ec79 0000c0b4 : { 0, 0, 0 }, }; int rtems_deviceio_errno(rtems_status_code code) { c0b4: e92d4010 push {r4, lr} <== NOT EXECUTED c0b8: e1a01000 mov r1, r0 <== NOT EXECUTED int rc; if ((rc = rtems_assoc_remote_by_local(errno_assoc, (uint32_t ) code))) c0bc: e59f0018 ldr r0, [pc, #24] ; c0dc <== NOT EXECUTED c0c0: eb000006 bl c0e0 <== NOT EXECUTED c0c4: e2504000 subs r4, r0, #0 <== NOT EXECUTED c0c8: 0a000001 beq c0d4 <== NOT EXECUTED { errno = rc; c0cc: eb000221 bl c958 <__errno> <== NOT EXECUTED c0d0: e5804000 str r4, [r0] <== NOT EXECUTED return -1; } return -1; } c0d4: e3e00000 mvn r0, #0 <== NOT EXECUTED c0d8: e8bd8010 pop {r4, pc} <== NOT EXECUTED c0dc: 00019048 .word 0x00019048 00005f7c : int rtems_error( rtems_error_code_t error_flag, const char *printf_format, ... ) { 5f7c: e92d000e push {r1, r2, r3} <== NOT EXECUTED 5f80: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; int chars_written; va_start(arglist, printf_format); 5f84: e28d300c add r3, sp, #12 <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f88: e1a02003 mov r2, r3 <== NOT EXECUTED 5f8c: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED ) { va_list arglist; int chars_written; va_start(arglist, printf_format); 5f90: e58d3000 str r3, [sp] <== NOT EXECUTED chars_written = rtems_verror(error_flag, printf_format, arglist); 5f94: ebffff84 bl 5dac <== NOT EXECUTED va_end(arglist); return chars_written; } 5f98: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f9c: e28dd00c add sp, sp, #12 <== NOT EXECUTED 5fa0: e12fff1e bx lr <== NOT EXECUTED 00001164 : } int rtems_filesystem_dirname( const char *pathname ) { 1164: e92d4010 push {r4, lr} 1168: e1a04000 mov r4, r0 int len = strlen( pathname ); 116c: eb0031ea bl d91c 1170: e0844000 add r4, r4, r0 while ( len ) { 1174: ea000007 b 1198 len--; if ( rtems_filesystem_is_separator( pathname[len] ) ) 1178: e5543001 ldrb r3, [r4, #-1] 117c: e353002f cmp r3, #47 ; 0x2f 1180: 1353005c cmpne r3, #92 ; 0x5c ) { int len = strlen( pathname ); while ( len ) { len--; 1184: e2400001 sub r0, r0, #1 if ( rtems_filesystem_is_separator( pathname[len] ) ) 1188: 08bd8010 popeq {r4, pc} 118c: e3530000 cmp r3, #0 1190: e2444001 sub r4, r4, #1 1194: 08bd8010 popeq {r4, pc} const char *pathname ) { int len = strlen( pathname ); while ( len ) { 1198: e3500000 cmp r0, #0 119c: 1afffff5 bne 1178 if ( rtems_filesystem_is_separator( pathname[len] ) ) break; } return len; } 11a0: e8bd8010 pop {r4, pc} <== NOT EXECUTED 00001284 : int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1284: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Verify Input parameters. */ if ( !pathname ) 1288: e2505000 subs r5, r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 128c: e1a07001 mov r7, r1 1290: e1a06002 mov r6, r2 1294: e1a0c003 mov ip, r3 1298: e59da020 ldr sl, [sp, #32] /* * Verify Input parameters. */ if ( !pathname ) 129c: 1a000002 bne 12ac rtems_set_errno_and_return_minus_one( EFAULT ); 12a0: eb002dac bl c958 <__errno> 12a4: e3a0300e mov r3, #14 12a8: ea000003 b 12bc if ( !pathloc ) 12ac: e3530000 cmp r3, #0 12b0: 1a000004 bne 12c8 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 12b4: eb002da7 bl c958 <__errno> <== NOT EXECUTED 12b8: e3a03005 mov r3, #5 <== NOT EXECUTED 12bc: e5803000 str r3, [r0] return rtems_filesystem_evaluate_relative_path( &pathname[i], pathnamelen - i, flags, pathloc, follow_link ); } 12c0: e3e00000 mvn r0, #0 12c4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 12c8: e5d53000 ldrb r3, [r5] 12cc: e353002f cmp r3, #47 ; 0x2f 12d0: 1353005c cmpne r3, #92 ; 0x5c 12d4: 13a08000 movne r8, #0 12d8: 03a08001 moveq r8, #1 12dc: 0a000001 beq 12e8 12e0: e3530000 cmp r3, #0 12e4: 1a000009 bne 1310 12e8: e59f305c ldr r3, [pc, #92] ; 134c 12ec: e5934000 ldr r4, [r3] 12f0: e2844018 add r4, r4, #24 12f4: e8b4000f ldm r4!, {r0, r1, r2, r3} 12f8: e1a0800c mov r8, ip 12fc: e8a8000f stmia r8!, {r0, r1, r2, r3} 1300: e5942000 ldr r2, [r4] 1304: e5882000 str r2, [r8] 1308: e3a08001 mov r8, #1 130c: ea000007 b 1330 1310: e59f3034 ldr r3, [pc, #52] ; 134c 1314: e5934000 ldr r4, [r3] 1318: e2844004 add r4, r4, #4 131c: e8b4000f ldm r4!, {r0, r1, r2, r3} 1320: e1a0900c mov r9, ip 1324: e8a9000f stmia r9!, {r0, r1, r2, r3} 1328: e5942000 ldr r2, [r4] 132c: e5892000 str r2, [r9] /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1330: e0681007 rsb r1, r8, r7 1334: e0850008 add r0, r5, r8 1338: e1a02006 mov r2, r6 133c: e1a0300c mov r3, ip 1340: e58da020 str sl, [sp, #32] pathnamelen - i, flags, pathloc, follow_link ); } 1344: 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], 1348: eaffff95 b 11a4 134c: 00018538 .word 0x00018538 000011a4 : /* * Verify Input parameters. */ if ( !pathname ) 11a4: e3500000 cmp r0, #0 int pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 11a8: e92d4030 push {r4, r5, lr} 11ac: e1a05002 mov r5, r2 11b0: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 11b4: 1a000002 bne 11c4 rtems_set_errno_and_return_minus_one( EFAULT ); 11b8: eb002de6 bl c958 <__errno> <== NOT EXECUTED 11bc: e3a0300e mov r3, #14 <== NOT EXECUTED 11c0: ea000027 b 1264 <== NOT EXECUTED if ( !pathloc ) 11c4: e3530000 cmp r3, #0 11c8: 1a000002 bne 11d8 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 11cc: eb002de1 bl c958 <__errno> <== NOT EXECUTED 11d0: e3a03005 mov r3, #5 <== NOT EXECUTED 11d4: ea000022 b 1264 <== NOT EXECUTED if ( !pathloc->ops->evalpath_h ) 11d8: e593c00c ldr ip, [r3, #12] 11dc: e59cc000 ldr ip, [ip] 11e0: e35c0000 cmp ip, #0 11e4: 0a00001c beq 125c rtems_set_errno_and_return_minus_one( ENOTSUP ); result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 11e8: e1a0e00f mov lr, pc 11ec: e12fff1c bx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 11f0: e59d200c ldr r2, [sp, #12] 11f4: e2703001 rsbs r3, r0, #1 11f8: 33a03000 movcc r3, #0 11fc: e3520000 cmp r2, #0 1200: 03a03000 moveq r3, #0 1204: e3530000 cmp r3, #0 1208: 08bd8030 popeq {r4, r5, pc} if ( !pathloc->ops->node_type_h ){ 120c: e594200c ldr r2, [r4, #12] 1210: e5923010 ldr r3, [r2, #16] 1214: e3530000 cmp r3, #0 1218: 0a00000a beq 1248 rtems_filesystem_freenode( pathloc ); rtems_set_errno_and_return_minus_one( ENOTSUP ); } type = (*pathloc->ops->node_type_h)( pathloc ); 121c: e1a00004 mov r0, r4 1220: e1a0e00f mov lr, pc 1224: e12fff13 bx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1228: e2400003 sub r0, r0, #3 122c: e3500001 cmp r0, #1 1230: 83a00000 movhi r0, #0 1234: 88bd8030 pophi {r4, r5, pc} ( type == RTEMS_FILESYSTEM_SYM_LINK ) ) { if ( !pathloc->ops->eval_link_h ){ 1238: e594200c ldr r2, [r4, #12] 123c: e5923034 ldr r3, [r2, #52] ; 0x34 1240: e3530000 cmp r3, #0 1244: 1a000009 bne 1270 rtems_filesystem_freenode( pathloc ); 1248: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 124c: e3530000 cmp r3, #0 <== NOT EXECUTED 1250: 11a00004 movne r0, r4 <== NOT EXECUTED 1254: 11a0e00f movne lr, pc <== NOT EXECUTED 1258: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 125c: eb002dbd bl c958 <__errno> <== NOT EXECUTED 1260: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1264: e5803000 str r3, [r0] <== NOT EXECUTED 1268: e3e00000 mvn r0, #0 <== NOT EXECUTED 126c: 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 ); 1270: e1a00004 mov r0, r4 1274: e1a01005 mov r1, r5 1278: e1a0e00f mov lr, pc 127c: e12fff13 bx r3 } } return result; } 1280: e8bd8030 pop {r4, r5, pc} 00001004 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1004: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1008: e59f6100 ldr r6, [pc, #256] ; 1110 100c: e5963000 ldr r3, [r6] 1010: e3a02012 mov r2, #18 1014: 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 ) { 1018: e24dd01c sub sp, sp, #28 */ rtems_filesystem_umask = 022; init_fs_mount_table(); 101c: eb00018e bl 165c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1020: e59f30ec ldr r3, [pc, #236] ; 1114 1024: e5933000 ldr r3, [r3] 1028: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 102c: 059f00e4 ldreq r0, [pc, #228] ; 1118 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1030: 0a000009 beq 105c rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1034: e59f30e0 ldr r3, [pc, #224] ; 111c 1038: e5932000 ldr r2, [r3] status = mount( 103c: e592300c ldr r3, [r2, #12] 1040: e58d3000 str r3, [sp] 1044: e28d0018 add r0, sp, #24 1048: e892000e ldm r2, {r1, r2, r3} 104c: eb000189 bl 1678 &entry, mt->fs_ops, mt->fsoptions, mt->device, mt->mount_point ); if ( status == -1 ) 1050: e3700001 cmn r0, #1 1054: 1a000001 bne 1060 rtems_fatal_error_occurred( 0xABCD0002 ); 1058: e59f00c0 ldr r0, [pc, #192] ; 1120 <== NOT EXECUTED 105c: eb000e10 bl 48a4 <== NOT EXECUTED * set_private_env() - but then: that's * gonna hit performance. * * Till Straumann, 10/25/2002 */ rtems_filesystem_root = entry->mt_fs_root; 1060: 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; 1064: 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; 1068: e28ee01c add lr, lr, #28 106c: e8be000f ldm lr!, {r0, r1, r2, r3} 1070: e287c018 add ip, r7, #24 1074: e8ac000f stmia ip!, {r0, r1, r2, r3} 1078: 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; 107c: 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); 1080: 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; 1084: 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; 1088: 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); 108c: e1a03004 mov r3, r4 1090: e3a01001 mov r1, #1 1094: e1a02005 mov r2, r5 1098: e59f0084 ldr r0, [pc, #132] ; 1124 rtems_filesystem_root = loc; 109c: 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); 10a0: e58d5000 str r5, [sp] 10a4: eb000076 bl 1284 rtems_filesystem_root = loc; 10a8: e596c000 ldr ip, [r6] 10ac: e8b7000f ldm r7!, {r0, r1, r2, r3} 10b0: e28cc018 add ip, ip, #24 10b4: e8ac000f stmia ip!, {r0, r1, r2, r3} 10b8: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10bc: 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; 10c0: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 10c4: e3a01001 mov r1, #1 10c8: e1a03004 mov r3, r4 10cc: e59f0050 ldr r0, [pc, #80] ; 1124 10d0: e58d5000 str r5, [sp] 10d4: eb00006a bl 1284 rtems_filesystem_current = loc; 10d8: e596c000 ldr ip, [r6] 10dc: e8b4000f ldm r4!, {r0, r1, r2, r3} 10e0: e28cc004 add ip, ip, #4 10e4: e8ac000f stmia ip!, {r0, r1, r2, r3} 10e8: 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); 10ec: e59f0034 ldr r0, [pc, #52] ; 1128 /* 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; 10f0: 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); 10f4: e59f1030 ldr r1, [pc, #48] ; 112c 10f8: eb0000fd bl 14f4 if ( status != 0 ) 10fc: e1500005 cmp r0, r5 rtems_fatal_error_occurred( 0xABCD0003 ); 1100: 159f0028 ldrne r0, [pc, #40] ; 1130 * 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 ) 1104: 1affffd4 bne 105c * 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. */ } 1108: e28dd01c add sp, sp, #28 110c: e8bd80f0 pop {r4, r5, r6, r7, pc} 1110: 00018538 .word 0x00018538 1114: 00018af0 .word 0x00018af0 1118: abcd0001 .word 0xabcd0001 111c: 000183a8 .word 0x000183a8 1120: abcd0002 .word 0xabcd0002 1124: 000194cf .word 0x000194cf 1128: 000194d1 .word 0x000194d1 112c: 000001ff .word 0x000001ff 1130: abcd0003 .word 0xabcd0003 0000866c : ); bool rtems_filesystem_nodes_equal( const rtems_filesystem_location_info_t *loc1, const rtems_filesystem_location_info_t *loc2 ){ 866c: e5903000 ldr r3, [r0] <== NOT EXECUTED 8670: e5910000 ldr r0, [r1] <== NOT EXECUTED return ( loc1->node_access == loc2->node_access ); } 8674: e1530000 cmp r3, r0 <== NOT EXECUTED 8678: 13a00000 movne r0, #0 <== NOT EXECUTED 867c: 03a00001 moveq r0, #1 <== NOT EXECUTED 8680: e12fff1e bx lr <== NOT EXECUTED 00000ec4 : rtems_status_code rtems_io_lookup_name( const char *name, rtems_driver_name_t *device_info ) { ec4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} <== NOT EXECUTED ec8: e24dd018 sub sp, sp, #24 <== NOT EXECUTED ecc: e1a05001 mov r5, r1 <== NOT EXECUTED ed0: 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 ); ed4: eb003290 bl d91c <== NOT EXECUTED ed8: e28d4004 add r4, sp, #4 <== NOT EXECUTED edc: e1a01000 mov r1, r0 <== NOT EXECUTED ee0: e3a02000 mov r2, #0 <== NOT EXECUTED ee4: e1a03004 mov r3, r4 <== NOT EXECUTED ee8: e3a0c001 mov ip, #1 <== NOT EXECUTED eec: e1a00006 mov r0, r6 <== NOT EXECUTED ef0: e58dc000 str ip, [sp] <== NOT EXECUTED ef4: eb0000e2 bl 1284 <== NOT EXECUTED the_jnode = loc.node_access; if ( !loc.ops->node_type_h ) { ef8: e59d2010 ldr r2, [sp, #16] <== NOT EXECUTED efc: e5923010 ldr r3, [r2, #16] <== NOT EXECUTED f00: 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 ); f04: e1a07000 mov r7, r0 <== NOT EXECUTED the_jnode = loc.node_access; f08: e59d8004 ldr r8, [sp, #4] <== NOT EXECUTED if ( !loc.ops->node_type_h ) { f0c: 1a000009 bne f38 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f10: e592301c ldr r3, [r2, #28] <== NOT EXECUTED f14: e3530000 cmp r3, #0 <== NOT EXECUTED f18: 11a00004 movne r0, r4 <== NOT EXECUTED f1c: 11a0e00f movne lr, pc <== NOT EXECUTED f20: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); f24: eb002e8b bl c958 <__errno> <== NOT EXECUTED f28: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f2c: e5803000 str r3, [r0] <== NOT EXECUTED f30: e3e00000 mvn r0, #0 <== NOT EXECUTED f34: ea000026 b fd4 <== NOT EXECUTED } node_type = (*loc.ops->node_type_h)( &loc ); f38: e1a00004 mov r0, r4 <== NOT EXECUTED f3c: e1a0e00f mov lr, pc <== NOT EXECUTED f40: e12fff13 bx r3 <== NOT EXECUTED if ( (result != 0) || node_type != RTEMS_FILESYSTEM_DEVICE ) { f44: e3570000 cmp r7, #0 <== NOT EXECUTED f48: 03500002 cmpeq r0, #2 <== NOT EXECUTED f4c: 03a0a000 moveq sl, #0 <== NOT EXECUTED f50: 13a0a001 movne sl, #1 <== NOT EXECUTED f54: e59d7010 ldr r7, [sp, #16] <== NOT EXECUTED f58: 0a000008 beq f80 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f5c: e3570000 cmp r7, #0 <== NOT EXECUTED f60: 0a000018 beq fc8 <== NOT EXECUTED f64: e597301c ldr r3, [r7, #28] <== NOT EXECUTED f68: e3530000 cmp r3, #0 <== NOT EXECUTED f6c: 0a000015 beq fc8 <== NOT EXECUTED f70: e1a00004 mov r0, r4 <== NOT EXECUTED f74: e1a0e00f mov lr, pc <== NOT EXECUTED f78: e12fff13 bx r3 <== NOT EXECUTED f7c: ea000011 b fc8 <== NOT EXECUTED return RTEMS_UNSATISFIED; } device_info->device_name = (char *) name; f80: e5856000 str r6, [r5] <== NOT EXECUTED device_info->device_name_length = strlen( name ); f84: e1a00006 mov r0, r6 <== NOT EXECUTED f88: eb003263 bl d91c <== NOT EXECUTED f8c: e5850004 str r0, [r5, #4] <== NOT EXECUTED device_info->major = the_jnode->info.device.major; f90: e5983050 ldr r3, [r8, #80] ; 0x50 <== NOT EXECUTED f94: e5853008 str r3, [r5, #8] <== NOT EXECUTED device_info->minor = the_jnode->info.device.minor; f98: e5983054 ldr r3, [r8, #84] ; 0x54 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); f9c: 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; fa0: e585300c str r3, [r5, #12] <== NOT EXECUTED rtems_filesystem_freenode( &loc ); fa4: 0a000009 beq fd0 <== NOT EXECUTED fa8: e597301c ldr r3, [r7, #28] <== NOT EXECUTED fac: e3530000 cmp r3, #0 <== NOT EXECUTED fb0: 0a000006 beq fd0 <== NOT EXECUTED fb4: e1a00004 mov r0, r4 <== NOT EXECUTED fb8: e1a0e00f mov lr, pc <== NOT EXECUTED fbc: e12fff13 bx r3 <== NOT EXECUTED fc0: e1a0000a mov r0, sl <== NOT EXECUTED fc4: ea000002 b fd4 <== NOT EXECUTED fc8: e3a0000d mov r0, #13 <== NOT EXECUTED fcc: ea000000 b fd4 <== NOT EXECUTED fd0: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } fd4: e28dd018 add sp, sp, #24 <== NOT EXECUTED fd8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED 00001350 : * * Called by BSP startup code to initialize the libio subsystem. */ void rtems_libio_init( void ) { 1350: e92d4011 push {r0, r4, lr} rtems_status_code rc; uint32_t i; rtems_libio_t *iop; if (rtems_libio_number_iops > 0) 1354: e59f4098 ldr r4, [pc, #152] ; 13f4 1358: e5940000 ldr r0, [r4] 135c: e3500000 cmp r0, #0 1360: 0a000013 beq 13b4 { rtems_libio_iops = (rtems_libio_t *) calloc(rtems_libio_number_iops, 1364: e3a01040 mov r1, #64 ; 0x40 1368: eb001cbd bl 8664 136c: e59f3084 ldr r3, [pc, #132] ; 13f8 sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) 1370: 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, 1374: e5830000 str r0, [r3] sizeof(rtems_libio_t)); if (rtems_libio_iops == NULL) rtems_fatal_error_occurred(RTEMS_NO_MEMORY); 1378: 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) 137c: 0a000015 beq 13d8 rtems_fatal_error_occurred(RTEMS_NO_MEMORY); iop = rtems_libio_iop_freelist = rtems_libio_iops; 1380: e59f3074 ldr r3, [pc, #116] ; 13fc for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 1384: 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; 1388: e5830000 str r0, [r3] for (i = 0 ; (i + 1) < rtems_libio_number_iops ; i++, iop++) 138c: e3a03000 mov r3, #0 1390: ea000000 b 1398 iop->data1 = iop + 1; 1394: 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++) 1398: e2833001 add r3, r3, #1 139c: e1530001 cmp r3, r1 iop->data1 = iop + 1; 13a0: 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++) 13a4: e2800040 add r0, r0, #64 ; 0x40 13a8: 3afffff9 bcc 1394 iop->data1 = iop + 1; iop->data1 = NULL; 13ac: e3a03000 mov r3, #0 13b0: e5823034 str r3, [r2, #52] ; 0x34 /* * Create the binary semaphore used to provide mutual exclusion * on the IOP Table. */ rc = rtems_semaphore_create( 13b4: e59fc044 ldr ip, [pc, #68] ; 1400 13b8: e59f0044 ldr r0, [pc, #68] ; 1404 13bc: e3a01001 mov r1, #1 13c0: e3a02054 mov r2, #84 ; 0x54 13c4: e3a03000 mov r3, #0 13c8: e58dc000 str ip, [sp] 13cc: eb000b0e bl 400c 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &rtems_libio_semaphore ); if ( rc != RTEMS_SUCCESSFUL ) 13d0: e3500000 cmp r0, #0 13d4: 0a000000 beq 13dc rtems_fatal_error_occurred( rc ); 13d8: eb000d31 bl 48a4 <== NOT EXECUTED /* * Initialize the base file system infrastructure. */ if (rtems_fs_init_helper) 13dc: e59f3024 ldr r3, [pc, #36] ; 1408 13e0: e5933000 ldr r3, [r3] 13e4: e3530000 cmp r3, #0 (* rtems_fs_init_helper)(); 13e8: 11a0e00f movne lr, pc 13ec: 112fff13 bxne r3 } 13f0: e8bd8018 pop {r3, r4, pc} 13f4: 000183a0 .word 0x000183a0 13f8: 00019b84 .word 0x00019b84 13fc: 00019b88 .word 0x00019b88 1400: 00019b8c .word 0x00019b8c 1404: 4c42494f .word 0x4c42494f 1408: 0001839c .word 0x0001839c 00023320 : rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 23320: 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); 23324: e3a00000 mov r0, #0 rtems_filesystem_freenode( &env->root_directory); free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 23328: 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); 2332c: e1a01000 mov r1, r0 23330: e28d2018 add r2, sp, #24 23334: eb000639 bl 24c20 if (sc != RTEMS_SUCCESSFUL) return sc; 23338: e2508000 subs r8, r0, #0 2333c: 1a00003f bne 23440 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 23340: e59f4104 ldr r4, [pc, #260] ; 2344c 23344: e59f3104 ldr r3, [pc, #260] ; 23450 23348: e5942000 ldr r2, [r4] 2334c: e1520003 cmp r2, r3 23350: 1a00000f bne 23394 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 23354: e2800048 add r0, r0, #72 ; 0x48 23358: ebff892c bl 5810 if (!tmp) 2335c: e2505000 subs r5, r0, #0 23360: 03a0801a moveq r8, #26 23364: 0a000035 beq 23440 #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); 23368: e1a00008 mov r0, r8 2336c: e1a01004 mov r1, r4 23370: e59f20dc ldr r2, [pc, #220] ; 23454 23374: eb000720 bl 24ffc if (sc != RTEMS_SUCCESSFUL) { 23378: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 2337c: 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) { 23380: 0a000003 beq 23394 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 23384: e1a00005 mov r0, r5 <== NOT EXECUTED 23388: ebff879e bl 5208 <== NOT EXECUTED 2338c: e1a08006 mov r8, r6 <== NOT EXECUTED return sc; 23390: ea00002a b 23440 <== NOT EXECUTED } rtems_current_user_env = tmp; }; *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 23394: e59f60b0 ldr r6, [pc, #176] ; 2344c 23398: e5964000 ldr r4, [r6] 2339c: e59f10ac ldr r1, [pc, #172] ; 23450 233a0: e3a02048 mov r2, #72 ; 0x48 233a4: e1a00004 mov r0, r4 233a8: eb00636c bl 3c160 rtems_current_user_env->task_id=task_id; /* mark the local values*/ /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 233ac: e59f30a4 ldr r3, [pc, #164] ; 23458 233b0: 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*/ 233b4: e59d3018 ldr r3, [sp, #24] 233b8: e1a0c004 mov ip, r4 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 233bc: 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*/ 233c0: e48c3018 str r3, [ip], #24 /* get a clean root */ rtems_filesystem_root = THE_ROOT_FS_LOC; 233c4: e8be000f ldm lr!, {r0, r1, r2, r3} 233c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 233cc: 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); 233d0: e28d4004 add r4, sp, #4 233d4: 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; 233d8: 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); 233dc: e3a01001 mov r1, #1 233e0: e1a03004 mov r3, r4 233e4: e1a02005 mov r2, r5 233e8: e59f006c ldr r0, [pc, #108] ; 2345c rtems_filesystem_root = loc; 233ec: 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); 233f0: e58d5000 str r5, [sp] 233f4: ebff8750 bl 513c rtems_filesystem_root = loc; 233f8: e596c000 ldr ip, [r6] 233fc: e8b7000f ldm r7!, {r0, r1, r2, r3} 23400: e28cc018 add ip, ip, #24 23404: e8ac000f stmia ip!, {r0, r1, r2, r3} 23408: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2340c: 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; 23410: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 23414: e3a01001 mov r1, #1 23418: e1a03004 mov r3, r4 2341c: e59f0038 ldr r0, [pc, #56] ; 2345c 23420: e58d5000 str r5, [sp] 23424: ebff8744 bl 513c rtems_filesystem_current = loc; 23428: e596c000 ldr ip, [r6] 2342c: e8b4000f ldm r4!, {r0, r1, r2, r3} 23430: e28cc004 add ip, ip, #4 23434: e8ac000f stmia ip!, {r0, r1, r2, r3} 23438: e5973000 ldr r3, [r7] 2343c: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 23440: e1a00008 mov r0, r8 23444: e28dd01c add sp, sp, #28 23448: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 2344c: 000534b8 .word 0x000534b8 23450: 00060cc0 .word 0x00060cc0 23454: 00023218 .word 0x00023218 23458: 00060ca8 .word 0x00060ca8 2345c: 00057cbb .word 0x00057cbb 0002327c : * 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) { 2327c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 23280: 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); 23284: e3a00000 mov r0, #0 <== NOT EXECUTED 23288: e1a01000 mov r1, r0 <== NOT EXECUTED 2328c: e1a0200d mov r2, sp <== NOT EXECUTED 23290: eb000662 bl 24c20 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 23294: e2503000 subs r3, r0, #0 <== NOT EXECUTED 23298: 1a00001b bne 2330c <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 2329c: e59f1070 ldr r1, [pc, #112] ; 23314 <== NOT EXECUTED 232a0: e5914000 ldr r4, [r1] <== NOT EXECUTED 232a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 232a8: e5942000 ldr r2, [r4] <== NOT EXECUTED 232ac: e1520003 cmp r2, r3 <== NOT EXECUTED 232b0: 1a000004 bne 232c8 <== 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); 232b4: eb000779 bl 250a0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 232b8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 232bc: 1a000012 bne 2330c <== NOT EXECUTED free_user_env(tmp); 232c0: e1a00004 mov r0, r4 <== NOT EXECUTED 232c4: ebffffd3 bl 23218 <== NOT EXECUTED }; /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_get(task_id,(void*)&rtems_current_user_env, 232c8: e59f4044 ldr r4, [pc, #68] ; 23314 <== NOT EXECUTED 232cc: e1a00005 mov r0, r5 <== NOT EXECUTED 232d0: e1a01004 mov r1, r4 <== NOT EXECUTED 232d4: e28d2004 add r2, sp, #4 <== NOT EXECUTED 232d8: eb00078d bl 25114 <== NOT EXECUTED (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 232dc: e2503000 subs r3, r0, #0 <== NOT EXECUTED 232e0: 1a000006 bne 23300 <== NOT EXECUTED goto bailout; sc = rtems_task_variable_add(RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); 232e4: e59f202c ldr r2, [pc, #44] ; 23318 <== NOT EXECUTED 232e8: e1a01004 mov r1, r4 <== NOT EXECUTED 232ec: eb000742 bl 24ffc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 232f0: 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; 232f4: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 232f8: 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) 232fc: 0a000002 beq 2330c <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 23300: e59f1014 ldr r1, [pc, #20] ; 2331c <== NOT EXECUTED 23304: e59f2008 ldr r2, [pc, #8] ; 23314 <== NOT EXECUTED 23308: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 2330c: e1a00003 mov r0, r3 <== NOT EXECUTED 23310: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED 23314: 000534b8 .word 0x000534b8 23318: 00023218 .word 0x00023218 2331c: 00060cc0 .word 0x00060cc0 00005908 : * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5908: e92d4801 push {r0, fp, lr} <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 590c: e59f3038 ldr r3, [pc, #56] ; 594c <== NOT EXECUTED * size and thus we skip updating the statistics. */ static void rtems_malloc_statistics_at_free( void *pointer ) { 5910: e1a01000 mov r1, r0 <== NOT EXECUTED uintptr_t size; if (_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &size) ) { 5914: e1a0200d mov r2, sp <== NOT EXECUTED 5918: e5930000 ldr r0, [r3] <== NOT EXECUTED 591c: eb001560 bl aea4 <_Protected_heap_Get_block_size> <== NOT EXECUTED 5920: e3500000 cmp r0, #0 <== NOT EXECUTED 5924: 0a000007 beq 5948 <== NOT EXECUTED MSBUMP(lifetime_freed, size); 5928: e59f3020 ldr r3, [pc, #32] ; 5950 <== NOT EXECUTED 592c: e59d0000 ldr r0, [sp] <== NOT EXECUTED 5930: e283c024 add ip, r3, #36 ; 0x24 <== NOT EXECUTED 5934: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 5938: e09b1000 adds r1, fp, r0 <== NOT EXECUTED 593c: e2ac2000 adc r2, ip, #0 <== NOT EXECUTED 5940: e5831024 str r1, [r3, #36] ; 0x24 <== NOT EXECUTED 5944: e5832028 str r2, [r3, #40] ; 0x28 <== NOT EXECUTED } } 5948: e8bd8808 pop {r3, fp, pc} <== NOT EXECUTED 594c: 000531ec .word 0x000531ec 5950: 00060c7c .word 0x00060c7c 00005954 : { uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 5954: e2501000 subs r1, r0, #0 <== NOT EXECUTED } static void rtems_malloc_statistics_at_malloc( void *pointer ) { 5958: e92d4811 push {r0, r4, fp, lr} <== NOT EXECUTED uintptr_t actual_size = 0; uint32_t current_depth; rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) 595c: 0a000013 beq 59b0 <== NOT EXECUTED static void rtems_malloc_statistics_at_malloc( void *pointer ) { uintptr_t actual_size = 0; 5960: e28d2004 add r2, sp, #4 <== NOT EXECUTED 5964: e3a03000 mov r3, #0 <== NOT EXECUTED 5968: e5223004 str r3, [r2, #-4]! <== NOT EXECUTED rtems_malloc_statistics_t *s = &rtems_malloc_statistics; if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); 596c: e59f3040 ldr r3, [pc, #64] ; 59b4 <== NOT EXECUTED 5970: e1a0200d mov r2, sp <== NOT EXECUTED 5974: e5930000 ldr r0, [r3] <== NOT EXECUTED 5978: eb001549 bl aea4 <_Protected_heap_Get_block_size> <== NOT EXECUTED MSBUMP(lifetime_allocated, actual_size); 597c: e59f3034 ldr r3, [pc, #52] ; 59b8 <== NOT EXECUTED 5980: e59d4000 ldr r4, [sp] <== NOT EXECUTED 5984: e283c01c add ip, r3, #28 <== NOT EXECUTED 5988: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 598c: e5932024 ldr r2, [r3, #36] ; 0x24 <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 5990: e09b0004 adds r0, fp, r4 <== NOT EXECUTED 5994: e2ac1000 adc r1, ip, #0 <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) 5998: e593c018 ldr ip, [r3, #24] <== NOT EXECUTED _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); 599c: e0622000 rsb r2, r2, r0 <== NOT EXECUTED if (current_depth > s->max_depth) 59a0: e152000c cmp r2, ip <== NOT EXECUTED if ( !pointer ) return; _Protected_heap_Get_block_size(RTEMS_Malloc_Heap, pointer, &actual_size); MSBUMP(lifetime_allocated, actual_size); 59a4: e583001c str r0, [r3, #28] <== NOT EXECUTED 59a8: e5831020 str r1, [r3, #32] <== NOT EXECUTED current_depth = (uint32_t) (s->lifetime_allocated - s->lifetime_freed); if (current_depth > s->max_depth) s->max_depth = current_depth; 59ac: 85832018 strhi r2, [r3, #24] <== NOT EXECUTED } 59b0: e8bd8818 pop {r3, r4, fp, pc} <== NOT EXECUTED 59b4: 000531ec .word 0x000531ec 59b8: 00060c7c .word 0x00060c7c 000059bc : static void rtems_malloc_statistics_initialize( void ) { /* * Zero all the statistics */ (void) memset(&rtems_malloc_statistics, 0, sizeof(rtems_malloc_statistics)); 59bc: e59f0008 ldr r0, [pc, #8] ; 59cc <== NOT EXECUTED 59c0: e3a01000 mov r1, #0 <== NOT EXECUTED 59c4: e3a0202c mov r2, #44 ; 0x2c <== NOT EXECUTED 59c8: ea00da6b b 3c37c <== NOT EXECUTED 59cc: 00060c7c .word 0x00060c7c 00005f50 : void rtems_panic( const char *printf_format, ... ) { 5f50: e92d000f push {r0, r1, r2, r3} <== NOT EXECUTED 5f54: e92d4001 push {r0, lr} <== NOT EXECUTED va_list arglist; va_start(arglist, printf_format); 5f58: e28d300c add r3, sp, #12 <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5f5c: e1a02003 mov r2, r3 <== NOT EXECUTED 5f60: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 5f64: e3a00202 mov r0, #536870912 ; 0x20000000 <== NOT EXECUTED ... ) { va_list arglist; va_start(arglist, printf_format); 5f68: e58d3000 str r3, [sp] <== NOT EXECUTED (void) rtems_verror(RTEMS_ERROR_PANIC, printf_format, arglist); 5f6c: ebffff8e bl 5dac <== NOT EXECUTED va_end(arglist); } 5f70: e8bd4008 pop {r3, lr} <== NOT EXECUTED 5f74: e28dd010 add sp, sp, #16 <== NOT EXECUTED 5f78: e12fff1e bx lr <== NOT EXECUTED 0000a86c : /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { if (!rtems_pipe_configured) a86c: e59f3048 ldr r3, [pc, #72] ; a8bc a870: e5d33000 ldrb r3, [r3] a874: e3530000 cmp r3, #0 /* * Initialization of FIFO/pipe module. */ void rtems_pipe_initialize (void) { a878: e92d4001 push {r0, lr} if (!rtems_pipe_configured) a87c: 0a00000d beq a8b8 return; if (rtems_pipe_semaphore) a880: e59fc038 ldr ip, [pc, #56] ; a8c0 <== NOT EXECUTED a884: e59c3000 ldr r3, [ip] <== NOT EXECUTED a888: e3530000 cmp r3, #0 <== NOT EXECUTED a88c: 1a000009 bne a8b8 <== NOT EXECUTED return; rtems_status_code sc; sc = rtems_semaphore_create( a890: e59f002c ldr r0, [pc, #44] ; a8c4 <== NOT EXECUTED a894: e3a01001 mov r1, #1 <== NOT EXECUTED a898: e3a02054 mov r2, #84 ; 0x54 <== NOT EXECUTED a89c: e58dc000 str ip, [sp] <== NOT EXECUTED a8a0: ebffe5d9 bl 400c <== 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) a8a4: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); a8a8: 1bffe7fd blne 48a4 <== NOT EXECUTED rtems_interval now; now = rtems_clock_get_ticks_since_boot(); a8ac: ebffe4db bl 3c20 <== NOT EXECUTED rtems_pipe_no = now; a8b0: e59f3010 ldr r3, [pc, #16] ; a8c8 <== NOT EXECUTED a8b4: e1c300b0 strh r0, [r3] <== NOT EXECUTED } a8b8: e8bd8008 pop {r3, pc} a8bc: 000199a4 .word 0x000199a4 a8c0: 00019b00 .word 0x00019b00 a8c4: 50495045 .word 0x50495045 a8c8: 00019b06 .word 0x00019b06 000039dc : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39dc: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 39e0: e59f307c ldr r3, [pc, #124] ; 3a64 39e4: e5933000 ldr r3, [r3] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39e8: e59300c8 ldr r0, [r3, #200] ; 0xc8 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 39ec: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 39f0: e15b0000 cmp fp, r0 39f4: 33a04000 movcc r4, #0 39f8: 3a000004 bcc 3a10 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 39fc: e59340c4 ldr r4, [r3, #196] ; 0xc4 3a00: e0804004 add r4, r0, r4 3a04: e15b0004 cmp fp, r4 3a08: 83a04000 movhi r4, #0 3a0c: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 3a10: e59f3050 ldr r3, [pc, #80] ; 3a68 3a14: e5933000 ldr r3, [r3] 3a18: e3530000 cmp r3, #0 3a1c: 03a01001 moveq r1, #1 3a20: 0a000005 beq 3a3c pattern_ok = (!memcmp( 3a24: e59f1040 ldr r1, [pc, #64] ; 3a6c 3a28: e2800008 add r0, r0, #8 3a2c: e3a02010 mov r2, #16 3a30: eb00e1a0 bl 3c0b8 3a34: e2701001 rsbs r1, r0, #1 3a38: 33a01000 movcc r1, #0 } /* * The Stack Pointer and the Pattern Area are OK so return false. */ if ( sp_ok && pattern_ok ) 3a3c: e3540000 cmp r4, #0 3a40: 0a000002 beq 3a50 3a44: e3510000 cmp r1, #0 3a48: 13a00000 movne r0, #0 3a4c: 18bd8810 popne {r4, fp, pc} return false; /* * Let's report as much as we can. */ Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 3a50: e59f300c ldr r3, [pc, #12] ; 3a64 <== NOT EXECUTED 3a54: e5930000 ldr r0, [r3] <== NOT EXECUTED 3a58: ebffffb4 bl 3930 <== NOT EXECUTED 3a5c: e3a00001 mov r0, #1 <== NOT EXECUTED return true; } 3a60: e8bd8810 pop {r4, fp, pc} <== NOT EXECUTED 3a64: 00060ea0 .word 0x00060ea0 3a68: 0005e170 .word 0x0005e170 3a6c: 00060c4c .word 0x00060c4c 00003920 : void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 3920: e59f1004 ldr r1, [pc, #4] ; 392c <== NOT EXECUTED 3924: e3a00000 mov r0, #0 <== NOT EXECUTED 3928: eaffffe3 b 38bc <== NOT EXECUTED 392c: 0000634c .word 0x0000634c 000038bc : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38bc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED print_context = context; 38c0: e59f4048 ldr r4, [pc, #72] ; 3910 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 38c4: e1a05001 mov r5, r1 <== NOT EXECUTED 38c8: e1a06000 mov r6, r0 <== NOT EXECUTED print_context = context; print_handler = print; 38cc: 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; 38d0: e5840008 str r0, [r4, #8] <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 38d4: e59f1038 ldr r1, [pc, #56] ; 3914 <== NOT EXECUTED 38d8: e1a0e00f mov lr, pc <== NOT EXECUTED 38dc: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 38e0: e59f1030 ldr r1, [pc, #48] ; 3918 <== NOT EXECUTED 38e4: e1a00006 mov r0, r6 <== NOT EXECUTED 38e8: e1a0e00f mov lr, pc <== NOT EXECUTED 38ec: 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 ); 38f0: e59f0024 ldr r0, [pc, #36] ; 391c <== NOT EXECUTED 38f4: eb001b50 bl a63c <== NOT EXECUTED /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); 38f8: e3e00000 mvn r0, #0 <== NOT EXECUTED 38fc: ebffff9f bl 3780 <== NOT EXECUTED print_context = NULL; 3900: e3a03000 mov r3, #0 <== NOT EXECUTED print_handler = NULL; 3904: 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; 3908: e5843008 str r3, [r4, #8] <== NOT EXECUTED print_handler = NULL; } 390c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 3910: 0005e170 .word 0x0005e170 3914: 00057afd .word 0x00057afd 3918: 00057b14 .word 0x00057b14 391c: 00003780 .word 0x00003780 0000a358 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a358: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a35c: e2514000 subs r4, r1, #0 <== NOT EXECUTED #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a360: e1a07000 mov r7, r0 <== NOT EXECUTED a364: e1a08002 mov r8, r2 <== NOT EXECUTED STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a368: 03a00009 moveq r0, #9 <== NOT EXECUTED a36c: 0a00001e beq a3ec <== NOT EXECUTED return RTEMS_INVALID_ADDRESS; errno = 0; a370: eb000cdd bl d6ec <__errno> <== NOT EXECUTED a374: e3a03000 mov r3, #0 <== NOT EXECUTED a378: e5803000 str r3, [r0] <== NOT EXECUTED *n = 0; a37c: e3a02000 mov r2, #0 <== NOT EXECUTED a380: e3a03000 mov r3, #0 <== NOT EXECUTED a384: e884000c stm r4, {r2, r3} <== NOT EXECUTED #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a388: e1a00007 mov r0, r7 <== NOT EXECUTED a38c: e1a0100d mov r1, sp <== NOT EXECUTED a390: eb00184c bl 104c8 <== NOT EXECUTED #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 ) a394: e3580000 cmp r8, #0 <== NOT EXECUTED *endptr = end; a398: 159d3000 ldrne r3, [sp] <== NOT EXECUTED a39c: 15883000 strne r3, [r8] <== NOT EXECUTED /* nothing was converted */ if ( end == s ) a3a0: e59d3000 ldr r3, [sp] <== NOT EXECUTED a3a4: e1530007 cmp r3, r7 <== NOT EXECUTED errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a3a8: e1a05000 mov r5, r0 <== NOT EXECUTED a3ac: e1a06001 mov r6, r1 <== NOT EXECUTED /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) a3b0: 03a0000b moveq r0, #11 <== NOT EXECUTED a3b4: 0a00000c beq a3ec <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a3b8: e1a00005 mov r0, r5 <== NOT EXECUTED a3bc: e59f202c ldr r2, [pc, #44] ; a3f0 <== NOT EXECUTED a3c0: e3e03000 mvn r3, #0 <== NOT EXECUTED a3c4: ebffe203 bl 2bd8 <__gedf2> <== NOT EXECUTED a3c8: e3500000 cmp r0, #0 <== NOT EXECUTED a3cc: da000004 ble a3e4 <== NOT EXECUTED a3d0: eb000cc5 bl d6ec <__errno> <== NOT EXECUTED a3d4: e5903000 ldr r3, [r0] <== NOT EXECUTED a3d8: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a3dc: 03a0000a moveq r0, #10 <== NOT EXECUTED a3e0: 0a000001 beq a3ec <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a3e4: e8840060 stm r4, {r5, r6} <== NOT EXECUTED a3e8: e3a00000 mov r0, #0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; } a3ec: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} <== NOT EXECUTED a3f0: 7fefffff .word 0x7fefffff 0000a3f4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a3f4: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a3f8: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a3fc: e1a05000 mov r5, r0 a400: e1a07002 mov r7, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a404: 03a00009 moveq r0, #9 a408: 0a00001b beq a47c return RTEMS_INVALID_ADDRESS; errno = 0; a40c: eb000cb6 bl d6ec <__errno> a410: e3a03000 mov r3, #0 a414: e5803000 str r3, [r0] *n = 0; a418: e3a03000 mov r3, #0 a41c: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a420: e1a00005 mov r0, r5 a424: e1a0100d mov r1, sp a428: eb001813 bl 1047c #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 ) a42c: e3570000 cmp r7, #0 *endptr = end; a430: 159d3000 ldrne r3, [sp] a434: 15873000 strne r3, [r7] /* nothing was converted */ if ( end == s ) a438: e59d3000 ldr r3, [sp] a43c: e1530005 cmp r3, r5 errno = 0; *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); a440: e1a06000 mov r6, r0 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) a444: 03a0000b moveq r0, #11 a448: 0a00000b beq a47c return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a44c: e1a00006 mov r0, r6 a450: e59f1028 ldr r1, [pc, #40] ; a480 a454: ebffe22a bl 2d04 <__gesf2> a458: e3500000 cmp r0, #0 a45c: da000004 ble a474 a460: eb000ca1 bl d6ec <__errno> <== NOT EXECUTED a464: e5903000 ldr r3, [r0] <== NOT EXECUTED a468: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED a46c: 03a0000a moveq r0, #10 <== NOT EXECUTED a470: 0a000001 beq a47c <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; a474: e5846000 str r6, [r4] a478: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } a47c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} a480: 7f7fffff .word 0x7f7fffff 00019db8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19db8: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19dbc: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 19dc0: e1a05000 mov r5, r0 19dc4: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 19dc8: 03a00009 moveq r0, #9 19dcc: 0a000018 beq 19e34 return RTEMS_INVALID_ADDRESS; errno = 0; 19dd0: eb007cb1 bl 3909c <__errno> 19dd4: e3a03000 mov r3, #0 19dd8: e5803000 str r3, [r0] *n = 0; 19ddc: 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 ); 19de0: e1a00005 mov r0, r5 19de4: e1a0100d mov r1, sp 19de8: e3a02010 mov r2, #16 19dec: eb009c51 bl 40f38 #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 ) 19df0: e3560000 cmp r6, #0 *endptr = end; 19df4: 159d3000 ldrne r3, [sp] 19df8: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 19dfc: e59d3000 ldr r3, [sp] 19e00: 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 ); 19e04: 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 ) 19e08: 03a0000b moveq r0, #11 19e0c: 0a000008 beq 19e34 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 19e10: e3770001 cmn r7, #1 19e14: 1a000004 bne 19e2c 19e18: eb007c9f bl 3909c <__errno> <== NOT EXECUTED 19e1c: e5903000 ldr r3, [r0] <== NOT EXECUTED 19e20: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED 19e24: 03a0000a moveq r0, #10 <== NOT EXECUTED 19e28: 0a000001 beq 19e34 <== NOT EXECUTED /* there was an underflow */ if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif *n = (STRING_TO_TYPE) result; 19e2c: e5847000 str r7, [r4] 19e30: e3a00000 mov r0, #0 return RTEMS_SUCCESSFUL; } 19e34: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} 00003380 : rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3380: e3500009 cmp r0, #9 3384: 012fff1e bxeq lr 3388: ca000016 bgt 33e8 338c: e3500004 cmp r0, #4 3390: 012fff1e bxeq lr 3394: ca00000a bgt 33c4 3398: e3500001 cmp r0, #1 339c: 012fff1e bxeq lr 33a0: ca000002 bgt 33b0 33a4: e3500000 cmp r0, #0 33a8: 012fff1e bxeq lr 33ac: ea000030 b 3474 33b0: e3500002 cmp r0, #2 <== NOT EXECUTED 33b4: 012fff1e bxeq lr <== NOT EXECUTED 33b8: e3500003 cmp r0, #3 <== NOT EXECUTED 33bc: 1a00002c bne 3474 <== NOT EXECUTED 33c0: e12fff1e bx lr <== NOT EXECUTED 33c4: e3500006 cmp r0, #6 <== NOT EXECUTED 33c8: 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; 33cc: b3a00005 movlt r0, #5 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 33d0: b12fff1e bxlt lr <== NOT EXECUTED 33d4: e3500007 cmp r0, #7 <== NOT EXECUTED 33d8: 012fff1e bxeq lr <== NOT EXECUTED 33dc: e3500008 cmp r0, #8 <== NOT EXECUTED 33e0: 1a000023 bne 3474 <== NOT EXECUTED 33e4: e12fff1e bx lr <== NOT EXECUTED 33e8: e350000e cmp r0, #14 <== NOT EXECUTED 33ec: 012fff1e bxeq lr <== NOT EXECUTED 33f0: ca000008 bgt 3418 <== NOT EXECUTED 33f4: e350000b cmp r0, #11 <== NOT EXECUTED 33f8: 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; 33fc: b3a0000a movlt r0, #10 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3400: b12fff1e bxlt lr <== NOT EXECUTED 3404: e350000c cmp r0, #12 <== NOT EXECUTED 3408: 012fff1e bxeq lr <== NOT EXECUTED 340c: e350000d cmp r0, #13 <== NOT EXECUTED 3410: 1a000017 bne 3474 <== NOT EXECUTED 3414: e12fff1e bx lr <== NOT EXECUTED 3418: e59f305c ldr r3, [pc, #92] ; 347c <== NOT EXECUTED 341c: 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; 3420: 03a00011 moveq r0, #17 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3424: 012fff1e bxeq lr <== NOT EXECUTED 3428: ca000005 bgt 3444 <== NOT EXECUTED 342c: e350000f cmp r0, #15 <== NOT EXECUTED 3430: 012fff1e bxeq lr <== NOT EXECUTED 3434: e2433001 sub r3, r3, #1 <== NOT EXECUTED 3438: e1500003 cmp r0, r3 <== NOT EXECUTED 343c: 1a00000c bne 3474 <== NOT EXECUTED 3440: ea000007 b 3464 <== NOT EXECUTED 3444: e59f3034 ldr r3, [pc, #52] ; 3480 <== NOT EXECUTED 3448: 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; 344c: 03a00012 moveq r0, #18 <== NOT EXECUTED rtems_termios_baud_t termios_baud ) { int baud_index; switch (termios_baud) { 3450: 012fff1e bxeq lr <== NOT EXECUTED 3454: e2833001 add r3, r3, #1 <== NOT EXECUTED 3458: e1500003 cmp r0, r3 <== NOT EXECUTED 345c: 1a000004 bne 3474 <== NOT EXECUTED 3460: ea000001 b 346c <== 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; 3464: e3a00010 mov r0, #16 <== NOT EXECUTED case B57600: baud_index = 16; break; 3468: e12fff1e bx lr <== NOT EXECUTED case B115200: baud_index = 17; break; case B230400: baud_index = 18; break; 346c: e3a00013 mov r0, #19 <== NOT EXECUTED case B460800: baud_index = 19; break; 3470: e12fff1e bx lr <== NOT EXECUTED 3474: e3e00000 mvn r0, #0 default: baud_index = -1; break; } return baud_index; } 3478: e12fff1e bx lr 347c: 00001002 .word 0x00001002 3480: 00001003 .word 0x00001003 00001eac : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 1eac: e59f3008 ldr r3, [pc, #8] ; 1ebc <== NOT EXECUTED 1eb0: 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; } 1eb4: e3a00000 mov r0, #0 <== NOT EXECUTED 1eb8: e12fff1e bx lr <== NOT EXECUTED 1ebc: 00018524 .word 0x00018524 000032b8 : { 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); 32b8: e59f2180 ldr r2, [pc, #384] ; 3440 rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 32bc: e5903000 ldr r3, [r0] rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32c0: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 32c4: e92d4030 push {r4, r5, lr} 32c8: 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); 32cc: e5920000 ldr r0, [r2] 32d0: 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; 32d4: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 32d8: eb0003dd bl 4254 if (sc != RTEMS_SUCCESSFUL) 32dc: e3500000 cmp r0, #0 32e0: 1a000022 bne 3370 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 32e4: e5943008 ldr r3, [r4, #8] 32e8: e2433001 sub r3, r3, #1 32ec: e3530000 cmp r3, #0 32f0: e5843008 str r3, [r4, #8] 32f4: 1a00004c bne 342c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 32f8: e59420cc ldr r2, [r4, #204] ; 0xcc 32fc: e59f3140 ldr r3, [pc, #320] ; 3444 3300: e0833282 add r3, r3, r2, lsl #5 3304: e5931004 ldr r1, [r3, #4] 3308: e3510000 cmp r1, #0 330c: 0a000003 beq 3320 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3310: e1a00004 mov r0, r4 <== NOT EXECUTED 3314: e1a0e00f mov lr, pc <== NOT EXECUTED 3318: e12fff11 bx r1 <== NOT EXECUTED 331c: ea000006 b 333c <== NOT EXECUTED } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3320: e5940018 ldr r0, [r4, #24] 3324: e1a02001 mov r2, r1 3328: eb0003c9 bl 4254 if (sc != RTEMS_SUCCESSFUL) { 332c: e3500000 cmp r0, #0 3330: 1a00000e bne 3370 rtems_fatal_error_occurred (sc); } drainOutput (tty); 3334: e1a00004 mov r0, r4 3338: ebfffe05 bl 2b54 } if (tty->device.outputUsesInterrupts 333c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3340: e3530002 cmp r3, #2 3344: 1a00000a bne 3374 == TERMIOS_TASK_DRIVEN) { /* * send "terminate" to I/O tasks */ sc = rtems_event_send( 3348: e59400c4 ldr r0, [r4, #196] ; 0xc4 <== NOT EXECUTED 334c: e3a01001 mov r1, #1 <== NOT EXECUTED 3350: eb0002ab bl 3e04 <== NOT EXECUTED tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3354: e3500000 cmp r0, #0 <== NOT EXECUTED 3358: 1a000004 bne 3370 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_event_send( 335c: e59400c8 ldr r0, [r4, #200] ; 0xc8 <== NOT EXECUTED 3360: e3a01001 mov r1, #1 <== NOT EXECUTED 3364: eb0002a6 bl 3e04 <== NOT EXECUTED tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT); if (sc != RTEMS_SUCCESSFUL) 3368: e3500000 cmp r0, #0 <== NOT EXECUTED 336c: 0a000000 beq 3374 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3370: eb00054b bl 48a4 <== NOT EXECUTED } if (tty->device.lastClose) 3374: e594309c ldr r3, [r4, #156] ; 0x9c 3378: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 337c: 11a02005 movne r2, r5 3380: 1284000c addne r0, r4, #12 3384: 18900003 ldmne r0, {r0, r1} 3388: 11a0e00f movne lr, pc 338c: 112fff13 bxne r3 if (tty->forw == NULL) { 3390: e894000c ldm r4, {r2, r3} 3394: e3520000 cmp r2, #0 if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 3398: 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) { 339c: 1a000003 bne 33b0 rtems_termios_ttyTail = tty->back; 33a0: e59f10a0 ldr r1, [pc, #160] ; 3448 if ( rtems_termios_ttyTail != NULL ) { 33a4: 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; 33a8: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 33ac: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33b0: e5942004 ldr r2, [r4, #4] 33b4: e5943000 ldr r3, [r4] 33b8: e3520000 cmp r2, #0 if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 33bc: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 33c0: 1a000003 bne 33d4 rtems_termios_ttyHead = tty->forw; 33c4: e59f1080 ldr r1, [pc, #128] ; 344c if ( rtems_termios_ttyHead != NULL ) { 33c8: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 33cc: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 33d0: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 33d4: e5940014 ldr r0, [r4, #20] 33d8: eb000376 bl 41b8 rtems_semaphore_delete (tty->osem); 33dc: e5940018 ldr r0, [r4, #24] 33e0: eb000374 bl 41b8 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 33e4: e594008c ldr r0, [r4, #140] ; 0x8c 33e8: eb000372 bl 41b8 if ((tty->device.pollRead == NULL) || 33ec: e59430a0 ldr r3, [r4, #160] ; 0xa0 33f0: e3530000 cmp r3, #0 33f4: 0a000002 beq 3404 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) 33f8: e59430b4 ldr r3, [r4, #180] ; 0xb4 33fc: e3530002 cmp r3, #2 3400: 1a000001 bne 340c rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3404: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 3408: eb00036a bl 41b8 <== NOT EXECUTED free (tty->rawInBuf.theBuf); 340c: e5940058 ldr r0, [r4, #88] ; 0x58 3410: eb0014cf bl 8754 free (tty->rawOutBuf.theBuf); 3414: e594007c ldr r0, [r4, #124] ; 0x7c 3418: eb0014cd bl 8754 free (tty->cbuf); 341c: e594001c ldr r0, [r4, #28] 3420: eb0014cb bl 8754 free (tty); 3424: e1a00004 mov r0, r4 3428: eb0014c9 bl 8754 } rtems_semaphore_release (rtems_termios_ttyMutex); 342c: e59f300c ldr r3, [pc, #12] ; 3440 3430: e5930000 ldr r0, [r3] 3434: eb0003cc bl 436c return RTEMS_SUCCESSFUL; } 3438: e3a00000 mov r0, #0 343c: e8bd8030 pop {r4, r5, pc} 3440: 00019bc8 .word 0x00019bc8 3444: 000199f4 .word 0x000199f4 3448: 00019bcc .word 0x00019bcc 344c: 00019bd0 .word 0x00019bd0 000020b0 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20b0: e590c090 ldr ip, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20b4: e59020b4 ldr r2, [r0, #180] ; 0xb4 <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20b8: e08c1001 add r1, ip, r1 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20bc: 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) { 20c0: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 20c4: e5801090 str r1, [r0, #144] ; 0x90 <== NOT EXECUTED if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 20c8: 1a000005 bne 20e4 <== NOT EXECUTED /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, 20cc: e59000c8 ldr r0, [r0, #200] ; 0xc8 <== NOT EXECUTED 20d0: e1a01002 mov r1, r2 <== NOT EXECUTED 20d4: eb00074a bl 3e04 <== NOT EXECUTED TERMIOS_TX_START_EVENT); if (sc != RTEMS_SUCCESSFUL) 20d8: e3500000 cmp r0, #0 <== NOT EXECUTED 20dc: 0a00000c beq 2114 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 20e0: eb0009ef bl 48a4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else if (tty->t_line == PPPDISC ) { 20e4: e59030cc ldr r3, [r0, #204] ; 0xcc <== NOT EXECUTED 20e8: e3530005 cmp r3, #5 <== NOT EXECUTED 20ec: 1a000006 bne 210c <== NOT EXECUTED /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 20f0: e59f3024 ldr r3, [pc, #36] ; 211c <== NOT EXECUTED 20f4: e59330b4 ldr r3, [r3, #180] ; 0xb4 <== NOT EXECUTED 20f8: e3530000 cmp r3, #0 <== NOT EXECUTED 20fc: 0a000004 beq 2114 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 2100: e1a0e00f mov lr, pc <== NOT EXECUTED 2104: e12fff13 bx r3 <== NOT EXECUTED 2108: ea000001 b 2114 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } else { return rtems_termios_refill_transmitter(tty); } } 210c: 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); 2110: eaffff6d b 1ecc <== NOT EXECUTED } } 2114: e3a00000 mov r0, #0 <== NOT EXECUTED 2118: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 211c: 000199f4 .word 0x000199f4 00002120 : * 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) { 2120: 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) { 2124: e59f32b8 ldr r3, [pc, #696] ; 23e4 <== 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) { 2128: 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) { 212c: e59000cc ldr r0, [r0, #204] ; 0xcc <== NOT EXECUTED 2130: e0830280 add r0, r3, r0, lsl #5 <== NOT EXECUTED 2134: e5906010 ldr r6, [r0, #16] <== NOT EXECUTED 2138: 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) { 213c: 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); 2140: 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); 2144: 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); 2148: 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) { 214c: 1a00000e bne 218c <== 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); 2150: e1a08002 mov r8, r2 <== NOT EXECUTED 2154: 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, 2158: e284204a add r2, r4, #74 ; 0x4a <== NOT EXECUTED 215c: 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); 2160: e58d3004 str r3, [sp, #4] <== NOT EXECUTED 2164: e1a09006 mov r9, r6 <== NOT EXECUTED 2168: e1a05006 mov r5, r6 <== NOT EXECUTED 216c: ea000091 b 23b8 <== 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); 2170: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 2174: e7db0006 ldrb r0, [fp, r6] <== NOT EXECUTED 2178: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 217c: e1a0e00f mov lr, pc <== NOT EXECUTED 2180: e593f010 ldr pc, [r3, #16] <== NOT EXECUTED 2184: e2866001 add r6, r6, #1 <== NOT EXECUTED 2188: 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--) { 218c: e3550000 cmp r5, #0 <== NOT EXECUTED c = *buf++; rtems_termios_linesw[tty->t_line].l_rint(c,tty); 2190: 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--) { 2194: 1afffff5 bne 2170 <== NOT EXECUTED } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 2198: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 219c: e3530000 cmp r3, #0 <== NOT EXECUTED 21a0: 1a00008c bne 23d8 <== NOT EXECUTED 21a4: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 21a8: e3530000 cmp r3, #0 <== NOT EXECUTED 21ac: 0a000089 beq 23d8 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 21b0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 21b4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 21b8: e1a0e00f mov lr, pc <== NOT EXECUTED 21bc: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 21c0: e3a03001 mov r3, #1 <== NOT EXECUTED 21c4: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 21c8: ea000083 b 23dc <== 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) { 21cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 21d0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED } return 0; } while (len--) { c = *buf++; 21d4: 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) { 21d8: 0a00000f beq 221c <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 21dc: e5d4204a ldrb r2, [r4, #74] ; 0x4a <== NOT EXECUTED 21e0: e152000a cmp r2, sl <== NOT EXECUTED 21e4: e5d43049 ldrb r3, [r4, #73] ; 0x49 <== NOT EXECUTED 21e8: 1a000007 bne 220c <== NOT EXECUTED if (c == tty->termios.c_cc[VSTART]) { 21ec: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 21f0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 21f4: 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; 21f8: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 21fc: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 2200: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } } } tty->rawInBufDropped += dropped; rtems_semaphore_release (tty->rawInBuf.Semaphore); return dropped; 2204: e3a09001 mov r9, #1 <== NOT EXECUTED 2208: ea000005 b 2224 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 220c: e153000a cmp r3, sl <== NOT EXECUTED /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 2210: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2214: 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]) { 2218: 0afffff8 beq 2200 <== NOT EXECUTED /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 221c: e3590000 cmp r9, #0 <== NOT EXECUTED 2220: 0a000015 beq 227c <== NOT EXECUTED /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 2224: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2228: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 222c: e3530020 cmp r3, #32 <== NOT EXECUTED 2230: 1a00005e bne 23b0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2234: e10f7000 mrs r7, CPSR <== NOT EXECUTED 2238: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 223c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 2240: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2244: 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; 2248: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 224c: 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; 2250: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 2254: 0a000006 beq 2274 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 2258: 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, 225c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 2260: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2264: e0811003 add r1, r1, r3 <== NOT EXECUTED 2268: e3a02001 mov r2, #1 <== NOT EXECUTED 226c: e1a0e00f mov lr, pc <== NOT EXECUTED 2270: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2274: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 2278: ea00004c b 23b0 <== NOT EXECUTED /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 227c: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 2280: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2284: e2800001 add r0, r0, #1 <== NOT EXECUTED 2288: eb004fb9 bl 16174 <__umodsi3> <== NOT EXECUTED 228c: e1a07000 mov r7, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2290: e10f2000 mrs r2, CPSR <== NOT EXECUTED 2294: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 2298: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 229c: e58d2000 str r2, [sp] <== NOT EXECUTED /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 22a0: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 22a4: e5940064 ldr r0, [r4, #100] ; 0x64 <== NOT EXECUTED 22a8: e0630000 rsb r0, r3, r0 <== NOT EXECUTED 22ac: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 22b0: e0800007 add r0, r0, r7 <== NOT EXECUTED 22b4: eb004fae bl 16174 <__umodsi3> <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && 22b8: e59430c0 ldr r3, [r4, #192] ; 0xc0 <== NOT EXECUTED 22bc: e1500003 cmp r0, r3 <== NOT EXECUTED 22c0: 9a000025 bls 235c <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { 22c4: 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) 22c8: e3130001 tst r3, #1 <== NOT EXECUTED 22cc: 1a000022 bne 235c <== NOT EXECUTED % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 22d0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22d4: e3833001 orr r3, r3, #1 <== NOT EXECUTED 22d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 22dc: e59f3104 ldr r3, [pc, #260] ; 23e8 <== NOT EXECUTED 22e0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 22e4: e0023003 and r3, r2, r3 <== NOT EXECUTED 22e8: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 22ec: 1a00000e bne 232c <== NOT EXECUTED == (FL_MDXOF ) ){ if ((tty->flow_ctrl & FL_OSTOP) || 22f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 22f4: e3130020 tst r3, #32 <== NOT EXECUTED 22f8: 1a000002 bne 2308 <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { 22fc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2300: e3530000 cmp r3, #0 <== NOT EXECUTED 2304: 1a000014 bne 235c <== NOT EXECUTED /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 2308: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 230c: e3833002 orr r3, r3, #2 <== NOT EXECUTED 2310: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2314: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2318: e59d1008 ldr r1, [sp, #8] <== NOT EXECUTED 231c: e3a02001 mov r2, #1 <== NOT EXECUTED 2320: e1a0e00f mov lr, pc <== NOT EXECUTED 2324: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2328: ea00000b b 235c <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) 232c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2330: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 2334: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 2338: 1a000007 bne 235c <== NOT EXECUTED == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 233c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2340: 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; 2344: e3822004 orr r2, r2, #4 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 2348: e3530000 cmp r3, #0 <== NOT EXECUTED 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS ) ) { tty->flow_ctrl |= FL_IRTSOFF; 234c: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { tty->device.stopRemoteTx(tty->minor); 2350: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2354: 11a0e00f movne lr, pc <== NOT EXECUTED 2358: 112fff13 bxne r3 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 235c: e59d3000 ldr r3, [sp] <== NOT EXECUTED 2360: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2364: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 2368: e1570003 cmp r7, r3 <== NOT EXECUTED dropped++; 236c: 02855001 addeq r5, r5, #1 <== NOT EXECUTED } } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 2370: 0a00000e beq 23b0 <== NOT EXECUTED dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 2374: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2378: 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 )) { 237c: e59430e4 ldr r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 2380: e3530000 cmp r3, #0 <== NOT EXECUTED if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 2384: 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 )) { 2388: 1a000008 bne 23b0 <== NOT EXECUTED 238c: e59430dc ldr r3, [r4, #220] ; 0xdc <== NOT EXECUTED 2390: e3530000 cmp r3, #0 <== NOT EXECUTED 2394: 0a000005 beq 23b0 <== NOT EXECUTED (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 2398: e59d0004 ldr r0, [sp, #4] <== NOT EXECUTED 239c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 23a0: e1a0e00f mov lr, pc <== NOT EXECUTED 23a4: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 23a8: e3a02001 mov r2, #1 <== NOT EXECUTED 23ac: e58420e4 str r2, [r4, #228] ; 0xe4 <== NOT EXECUTED 23b0: e2866001 add r6, r6, #1 <== NOT EXECUTED 23b4: e2488001 sub r8, r8, #1 <== NOT EXECUTED tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 23b8: e3580000 cmp r8, #0 <== NOT EXECUTED 23bc: 1affff82 bne 21cc <== NOT EXECUTED tty->tty_rcvwakeup = 1; } } } } tty->rawInBufDropped += dropped; 23c0: e5943078 ldr r3, [r4, #120] ; 0x78 <== NOT EXECUTED 23c4: e0833005 add r3, r3, r5 <== NOT EXECUTED 23c8: e5843078 str r3, [r4, #120] ; 0x78 <== NOT EXECUTED rtems_semaphore_release (tty->rawInBuf.Semaphore); 23cc: e5940068 ldr r0, [r4, #104] ; 0x68 <== NOT EXECUTED 23d0: eb0007e5 bl 436c <== NOT EXECUTED return dropped; 23d4: ea000000 b 23dc <== NOT EXECUTED 23d8: e3a05000 mov r5, #0 <== NOT EXECUTED } 23dc: e1a00005 mov r0, r5 <== NOT EXECUTED 23e0: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 23e4: 000199f4 .word 0x000199f4 23e8: 00000402 .word 0x00000402 00002f10 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2f10: e5903000 ldr r3, [r0] struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 2f14: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f18: 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; 2f1c: 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; 2f20: e5934034 ldr r4, [r3, #52] ; 0x34 } } rtems_status_code rtems_termios_ioctl (void *arg) { 2f24: 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); 2f28: e1a02001 mov r2, r1 2f2c: 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; 2f30: e5957008 ldr r7, [r5, #8] rtems_status_code sc; args->ioctl_return = 0; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2f34: eb0004c6 bl 4254 if (sc != RTEMS_SUCCESSFUL) { 2f38: e2506000 subs r6, r0, #0 2f3c: 1a0000d7 bne 32a0 args->ioctl_return = sc; return sc; } switch (args->command) { 2f40: e5953004 ldr r3, [r5, #4] 2f44: e3530004 cmp r3, #4 2f48: 0a0000ab beq 31fc 2f4c: 8a000005 bhi 2f68 2f50: e3530002 cmp r3, #2 2f54: 0a000029 beq 3000 2f58: 8a0000a0 bhi 31e0 2f5c: e3530001 cmp r3, #1 2f60: 1a000010 bne 2fa8 2f64: ea00001b b 2fd8 2f68: e59f233c ldr r2, [pc, #828] ; 32ac <== NOT EXECUTED 2f6c: e1530002 cmp r3, r2 <== NOT EXECUTED 2f70: 0a0000bd beq 326c <== NOT EXECUTED 2f74: 8a000002 bhi 2f84 <== NOT EXECUTED 2f78: e3530005 cmp r3, #5 <== NOT EXECUTED 2f7c: 1a000009 bne 2fa8 <== NOT EXECUTED 2f80: ea000099 b 31ec <== NOT EXECUTED 2f84: e59f2324 ldr r2, [pc, #804] ; 32b0 <== NOT EXECUTED 2f88: 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; 2f8c: 05953008 ldreq r3, [r5, #8] <== NOT EXECUTED 2f90: 059420cc ldreq r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2f94: 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) { 2f98: 0a0000be beq 3298 <== NOT EXECUTED 2f9c: e2822105 add r2, r2, #1073741825 ; 0x40000001 <== NOT EXECUTED 2fa0: e1530002 cmp r3, r2 <== NOT EXECUTED 2fa4: 0a000098 beq 320c <== NOT EXECUTED default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 2fa8: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2fac: e59f3300 ldr r3, [pc, #768] ; 32b4 <== NOT EXECUTED 2fb0: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2fb4: e5933018 ldr r3, [r3, #24] <== NOT EXECUTED 2fb8: e3530000 cmp r3, #0 <== NOT EXECUTED 2fbc: 03a0600a moveq r6, #10 <== NOT EXECUTED 2fc0: 0a0000b4 beq 3298 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 2fc4: e1a00004 mov r0, r4 <== NOT EXECUTED 2fc8: e1a01005 mov r1, r5 <== NOT EXECUTED 2fcc: e1a0e00f mov lr, pc <== NOT EXECUTED 2fd0: e12fff13 bx r3 <== NOT EXECUTED 2fd4: ea0000a2 b 3264 <== NOT EXECUTED sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 2fd8: e5957008 ldr r7, [r5, #8] 2fdc: e284c030 add ip, r4, #48 ; 0x30 2fe0: e8bc000f ldm ip!, {r0, r1, r2, r3} 2fe4: e1a0e007 mov lr, r7 2fe8: e8ae000f stmia lr!, {r0, r1, r2, r3} 2fec: e8bc000f ldm ip!, {r0, r1, r2, r3} 2ff0: e8ae000f stmia lr!, {r0, r1, r2, r3} 2ff4: e59c3000 ldr r3, [ip] 2ff8: e58e3000 str r3, [lr] break; 2ffc: ea0000a5 b 3298 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3000: e595e008 ldr lr, [r5, #8] 3004: e8be000f ldm lr!, {r0, r1, r2, r3} 3008: e284c030 add ip, r4, #48 ; 0x30 300c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3010: e8be000f ldm lr!, {r0, r1, r2, r3} 3014: 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) && 3018: 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; 301c: 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) && 3020: 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; 3024: 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) && 3028: 0a000019 beq 3094 302c: e5943030 ldr r3, [r4, #48] ; 0x30 3030: e3130b01 tst r3, #1024 ; 0x400 3034: 1a000016 bne 3094 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3038: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 303c: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3040: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3044: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3048: e3130020 tst r3, #32 <== NOT EXECUTED 304c: 0a000010 beq 3094 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3050: e10f7000 mrs r7, CPSR <== NOT EXECUTED 3054: e3873080 orr r3, r7, #128 ; 0x80 <== NOT EXECUTED 3058: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); tty->flow_ctrl &= ~FL_OSTOP; 305c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3060: 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; 3064: e3c33020 bic r3, r3, #32 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3068: 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; 306c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3070: 0a000006 beq 3090 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)(tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3074: 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, 3078: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 307c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3080: e0811003 add r1, r1, r3 <== NOT EXECUTED 3084: e3a02001 mov r2, #1 <== NOT EXECUTED 3088: e1a0e00f mov lr, pc <== NOT EXECUTED 308c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3090: 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) && 3094: e59430b8 ldr r3, [r4, #184] ; 0xb8 3098: e3130b01 tst r3, #1024 ; 0x400 309c: 0a000008 beq 30c4 30a0: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 30a4: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30a8: 1a000005 bne 30c4 <== NOT EXECUTED !(tty->termios.c_iflag & IXOFF)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 30ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30b0: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30b4: 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); 30b8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30bc: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 30c0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && 30c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 30c8: e3130c01 tst r3, #256 ; 0x100 30cc: 0a000010 beq 3114 30d0: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 30d4: e3530000 cmp r3, #0 <== NOT EXECUTED 30d8: ba00000d blt 3114 <== NOT EXECUTED !(tty->termios.c_cflag & CRTSCTS)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30dc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30e0: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 30e4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && 30e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30ec: e3130004 tst r3, #4 <== NOT EXECUTED 30f0: 0a000004 beq 3108 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { 30f4: 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) && 30f8: e3530000 cmp r3, #0 <== NOT EXECUTED (tty->device.startRemoteTx != NULL)) { tty->device.startRemoteTx(tty->minor); 30fc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3100: 11a0e00f movne lr, pc <== NOT EXECUTED 3104: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 3108: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 310c: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3110: 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) { 3114: e5943038 ldr r3, [r4, #56] ; 0x38 3118: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 311c: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3120: b3833c01 orrlt r3, r3, #256 ; 0x100 3124: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3128: e5943030 ldr r3, [r4, #48] ; 0x30 312c: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3130: 159430b8 ldrne r3, [r4, #184] ; 0xb8 3134: 13833b01 orrne r3, r3, #1024 ; 0x400 3138: 158430b8 strne r3, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 313c: e5943030 ldr r3, [r4, #48] ; 0x30 3140: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 3144: 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) { 3148: 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; 314c: 13833c02 orrne r3, r3, #512 ; 0x200 3150: 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) { 3154: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3158: 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) { 315c: 1a000014 bne 31b4 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; 3160: e5d48046 ldrb r8, [r4, #70] ; 0x46 <== NOT EXECUTED 3164: eb0002a5 bl 3c00 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3168: e3a0100a mov r1, #10 <== NOT EXECUTED 316c: e0000098 mul r0, r8, r0 <== NOT EXECUTED 3170: eb004b6b bl 15f24 <__aeabi_uidiv> <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3174: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3178: 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] * 317c: e5840054 str r0, [r4, #84] ; 0x54 <== NOT EXECUTED 3180: e5d42047 ldrb r2, [r4, #71] ; 0x47 <== NOT EXECUTED rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 3184: 0a000006 beq 31a4 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3188: e3520000 cmp r2, #0 <== NOT EXECUTED 318c: 01a02000 moveq r2, r0 <== NOT EXECUTED 3190: 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; 3194: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3198: 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; 319c: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED 31a0: ea000006 b 31c0 <== NOT EXECUTED tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 31a4: 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; 31a8: 03a03001 moveq r3, #1 <== NOT EXECUTED 31ac: 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]) { 31b0: 0a000002 beq 31c0 <== NOT EXECUTED tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 31b4: e5843074 str r3, [r4, #116] ; 0x74 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 31b8: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 31bc: e5843070 str r3, [r4, #112] ; 0x70 else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 31c0: e59430a8 ldr r3, [r4, #168] ; 0xa8 31c4: e3530000 cmp r3, #0 31c8: 0a000032 beq 3298 (*tty->device.setAttributes)(tty->minor, &tty->termios); 31cc: e5940010 ldr r0, [r4, #16] 31d0: e2841030 add r1, r4, #48 ; 0x30 31d4: e1a0e00f mov lr, pc 31d8: e12fff13 bx r3 31dc: ea00002d b 3298 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 31e0: e1a00004 mov r0, r4 31e4: ebfffe5a bl 2b54 break; 31e8: ea00002a b 3298 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 31ec: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 31f0: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 31f4: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 31f8: ea000026 b 3298 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 31fc: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 3200: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3204: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 3208: ea000022 b 3298 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 320c: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 3210: e59f309c ldr r3, [pc, #156] ; 32b4 <== NOT EXECUTED 3214: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 3218: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED 321c: e3530000 cmp r3, #0 <== NOT EXECUTED 3220: 0a000003 beq 3234 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3224: e1a00004 mov r0, r4 <== NOT EXECUTED 3228: e1a0e00f mov lr, pc <== NOT EXECUTED 322c: e12fff13 bx r3 <== NOT EXECUTED 3230: e1a06000 mov r6, r0 <== NOT EXECUTED } tty->t_line=*(int*)(args->buffer); 3234: e5953008 ldr r3, [r5, #8] <== NOT EXECUTED 3238: 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) { 323c: e59f3070 ldr r3, [pc, #112] ; 32b4 <== NOT EXECUTED 3240: 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 */ 3244: e3a01000 mov r1, #0 <== NOT EXECUTED /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3248: 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 */ 324c: 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); 3250: 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) { 3254: 0a00000f beq 3298 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3258: e1a00004 mov r0, r4 <== NOT EXECUTED 325c: e1a0e00f mov lr, pc <== NOT EXECUTED 3260: e12fff13 bx r3 <== NOT EXECUTED 3264: e1a06000 mov r6, r0 <== NOT EXECUTED 3268: ea00000a b 3298 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 326c: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3270: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3274: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 3278: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED 327c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3280: e2842020 add r2, r4, #32 <== NOT EXECUTED 3284: e8920006 ldm r2, {r1, r2} <== NOT EXECUTED 3288: e0411002 sub r1, r1, r2 <== NOT EXECUTED 328c: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3290: e0813003 add r3, r1, r3 <== NOT EXECUTED 3294: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 3298: e5940018 ldr r0, [r4, #24] 329c: eb000432 bl 436c args->ioctl_return = sc; 32a0: e585600c str r6, [r5, #12] return sc; } 32a4: e1a00006 mov r0, r6 32a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 32ac: 4004667f .word 0x4004667f 32b0: 4004741a .word 0x4004741a 32b4: 000199f4 .word 0x000199f4 00003450 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3450: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3454: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3458: e59f23e0 ldr r2, [pc, #992] ; 3840 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 345c: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3460: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3464: e1a09000 mov r9, r0 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3468: e5920000 ldr r0, [r2] 346c: e1a02001 mov r2, r1 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 3470: e1a0b003 mov fp, r3 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain (rtems_termios_ttyMutex, 3474: eb000376 bl 4254 RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3478: e2506000 subs r6, r0, #0 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 347c: 059f33c0 ldreq r3, [pc, #960] ; 3844 3480: 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) 3484: 0a000007 beq 34a8 3488: ea0000e2 b 3818 <== NOT EXECUTED return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { if ((tty->major == major) && (tty->minor == minor)) 348c: e595300c ldr r3, [r5, #12] 3490: e1530009 cmp r3, r9 3494: 1a000002 bne 34a4 3498: e5953010 ldr r3, [r5, #16] 349c: e153000a cmp r3, sl 34a0: 0a0000bb beq 3794 */ 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) { 34a4: e5955000 ldr r5, [r5] 34a8: e3550000 cmp r5, #0 34ac: 1afffff6 bne 348c 34b0: ea0000da b 3820 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 34b4: e59f738c ldr r7, [pc, #908] ; 3848 34b8: e5973004 ldr r3, [r7, #4] 34bc: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34c0: e5950064 ldr r0, [r5, #100] ; 0x64 34c4: eb0015ec bl 8c7c if (tty->rawInBuf.theBuf == NULL) { 34c8: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 34cc: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 34d0: 1a000006 bne 34f0 free(tty); 34d4: e1a00005 mov r0, r5 <== NOT EXECUTED 34d8: eb00149d bl 8754 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 34dc: e59f335c ldr r3, [pc, #860] ; 3840 <== NOT EXECUTED 34e0: e5930000 ldr r0, [r3] <== NOT EXECUTED 34e4: eb0003a0 bl 436c <== NOT EXECUTED 34e8: e3a0601a mov r6, #26 <== NOT EXECUTED return RTEMS_NO_MEMORY; 34ec: ea0000c9 b 3818 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 34f0: e5973008 ldr r3, [r7, #8] 34f4: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 34f8: e5950088 ldr r0, [r5, #136] ; 0x88 34fc: eb0015de bl 8c7c if (tty->rawOutBuf.theBuf == NULL) { 3500: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3504: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 3508: 0a000006 beq 3528 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 350c: e5970000 ldr r0, [r7] 3510: eb0015d9 bl 8c7c if (tty->cbuf == NULL) { 3514: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3518: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 351c: 1a000004 bne 3534 free((void *)(tty->rawOutBuf.theBuf)); 3520: e595007c ldr r0, [r5, #124] ; 0x7c <== NOT EXECUTED 3524: eb00148a bl 8754 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 3528: e5950058 ldr r0, [r5, #88] ; 0x58 <== NOT EXECUTED 352c: eb001488 bl 8754 <== NOT EXECUTED 3530: eaffffe7 b 34d4 <== NOT EXECUTED tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 3534: e59f3308 ldr r3, [pc, #776] ; 3844 3538: e5932000 ldr r2, [r3] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 353c: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) 3540: e3520000 cmp r2, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 3544: e885000c stm r5, {r2, r3} if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 3548: 15825004 strne r5, [r2, #4] return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 354c: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 3550: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 3554: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 3558: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 355c: 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) 3560: e59f32e4 ldr r3, [pc, #740] ; 384c 3564: e5932000 ldr r2, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3568: e59f72d8 ldr r7, [pc, #728] ; 3848 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) 356c: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 3570: 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; 3574: e59f22c8 ldr r2, [pc, #712] ; 3844 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3578: e5d7300c ldrb r3, [r7, #12] 357c: e59f02cc ldr r0, [pc, #716] ; 3850 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 3580: e5824000 str r4, [r2] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3584: 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; 3588: e584a010 str sl, [r4, #16] tty->major = major; 358c: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 3590: e284c014 add ip, r4, #20 3594: e3a03000 mov r3, #0 3598: e3a01001 mov r1, #1 359c: e3a02054 mov r2, #84 ; 0x54 35a0: e58dc000 str ip, [sp] 35a4: eb000298 bl 400c 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) 35a8: e2503000 subs r3, r0, #0 35ac: 1a000095 bne 3808 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35b0: e5d7200c ldrb r2, [r7, #12] 35b4: e59f0298 ldr r0, [pc, #664] ; 3854 35b8: e284c018 add ip, r4, #24 35bc: e1820000 orr r0, r2, r0 35c0: e3a01001 mov r1, #1 35c4: e3a02054 mov r2, #84 ; 0x54 35c8: e58dc000 str ip, [sp] 35cc: eb00028e bl 400c 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) 35d0: e2501000 subs r1, r0, #0 35d4: 1a00008b bne 3808 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 35d8: e5d7300c ldrb r3, [r7, #12] 35dc: e59f0274 ldr r0, [pc, #628] ; 3858 35e0: e284c08c add ip, r4, #140 ; 0x8c 35e4: e1830000 orr r0, r3, r0 35e8: e3a02020 mov r2, #32 35ec: e1a03001 mov r3, r1 35f0: e58dc000 str ip, [sp] 35f4: eb000284 bl 400c rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 35f8: e250e000 subs lr, r0, #0 35fc: 1a000081 bne 3808 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3600: e8bb000f ldm fp!, {r0, r1, r2, r3} 3604: e284c098 add ip, r4, #152 ; 0x98 3608: e8ac000f stmia ip!, {r0, r1, r2, r3} 360c: e89b000f ldm fp, {r0, r1, r2, r3} 3610: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3614: e59430b4 ldr r3, [r4, #180] ; 0xb4 3618: 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; 361c: e584e094 str lr, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3620: 1a000017 bne 3684 sc = rtems_task_create ( 3624: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3628: e59f022c ldr r0, [pc, #556] ; 385c <== NOT EXECUTED 362c: e284c0c8 add ip, r4, #200 ; 0xc8 <== NOT EXECUTED 3630: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3634: e3a0100a mov r1, #10 <== NOT EXECUTED 3638: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 363c: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3640: e58de000 str lr, [sp] <== NOT EXECUTED 3644: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3648: eb00036e bl 4408 <== 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) 364c: e250e000 subs lr, r0, #0 <== NOT EXECUTED 3650: 1a00006c bne 3808 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 3654: e5d7300c ldrb r3, [r7, #12] <== NOT EXECUTED 3658: e59f0200 ldr r0, [pc, #512] ; 3860 <== NOT EXECUTED 365c: e284c0c4 add ip, r4, #196 ; 0xc4 <== NOT EXECUTED 3660: e1830000 orr r0, r3, r0 <== NOT EXECUTED 3664: e3a01009 mov r1, #9 <== NOT EXECUTED 3668: e3a02b01 mov r2, #1024 ; 0x400 <== NOT EXECUTED 366c: e3a03c05 mov r3, #1280 ; 0x500 <== NOT EXECUTED 3670: e58de000 str lr, [sp] <== NOT EXECUTED 3674: e58dc004 str ip, [sp, #4] <== NOT EXECUTED 3678: eb000362 bl 4408 <== 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) 367c: e3500000 cmp r0, #0 <== NOT EXECUTED 3680: 1a000060 bne 3808 <== NOT EXECUTED rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 3684: e59430a0 ldr r3, [r4, #160] ; 0xa0 3688: e3530000 cmp r3, #0 368c: 0a000002 beq 369c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ 3690: e59430b4 ldr r3, [r4, #180] ; 0xb4 3694: e3530002 cmp r3, #2 3698: 1a00000b bne 36cc sc = rtems_semaphore_create ( 369c: e59f31a4 ldr r3, [pc, #420] ; 3848 <== NOT EXECUTED 36a0: e59f01bc ldr r0, [pc, #444] ; 3864 <== NOT EXECUTED 36a4: e5d3300c ldrb r3, [r3, #12] <== NOT EXECUTED 36a8: e3a01000 mov r1, #0 <== NOT EXECUTED 36ac: e1830000 orr r0, r3, r0 <== NOT EXECUTED 36b0: e284c068 add ip, r4, #104 ; 0x68 <== NOT EXECUTED 36b4: e3a02024 mov r2, #36 ; 0x24 <== NOT EXECUTED 36b8: e1a03001 mov r3, r1 <== NOT EXECUTED 36bc: e58dc000 str ip, [sp] <== NOT EXECUTED 36c0: eb000251 bl 400c <== 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) 36c4: e3500000 cmp r0, #0 <== NOT EXECUTED 36c8: 1a00004e bne 3808 <== 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'; 36cc: 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; 36d0: e58430b8 str r3, [r4, #184] ; 0xb8 /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 36d4: e5941064 ldr r1, [r4, #100] ; 0x64 tty->highwater = tty->rawInBuf.Size * 3/4; 36d8: 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'; 36dc: 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; 36e0: 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'; 36e4: e3a0c01c mov ip, #28 36e8: e5c4c042 strb ip, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 36ec: e28cc063 add ip, ip, #99 ; 0x63 36f0: e5c4c043 strb ip, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 36f4: e3a0c015 mov ip, #21 36f8: e5c4c044 strb ip, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 36fc: e3a0c004 mov ip, #4 3700: e5c4c045 strb ip, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3704: e28cc00d add ip, ip, #13 3708: e5c4c049 strb ip, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 370c: e28cc002 add ip, ip, #2 3710: e5c4c04a strb ip, [r4, #74] ; 0x4a tty->termios.c_cc[VSUSP] = '\032'; 3714: e28cc007 add ip, ip, #7 3718: e5c4c04b strb ip, [r4, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 371c: e3a0c012 mov ip, #18 3720: e5c4c04d strb ip, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 3724: e3a0c00f mov ip, #15 3728: e5c4c04e strb ip, [r4, #78] ; 0x4e tty->termios.c_cc[VWERASE] = '\027'; 372c: e28cc008 add ip, ip, #8 3730: e5c4c04f strb ip, [r4, #79] ; 0x4f tty->termios.c_cc[VLNEXT] = '\026'; 3734: 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'; 3738: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 373c: 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'; 3740: 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'; 3744: 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') 3748: e59f30f8 ldr r3, [pc, #248] ; 3848 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; 374c: e1a00120 lsr r0, r0, #2 /* * Bump name characer */ if (c++ == 'z') 3750: 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; 3754: e58400c0 str r0, [r4, #192] ; 0xc0 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3758: e59f0108 ldr r0, [pc, #264] ; 3868 375c: e5840030 str r0, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3760: e59f0104 ldr r0, [pc, #260] ; 386c 3764: e5840034 str r0, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3768: e59f0100 ldr r0, [pc, #256] ; 3870 376c: e5840038 str r0, [r4, #56] ; 0x38 tty->termios.c_lflag = ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; 3770: e59f00fc ldr r0, [pc, #252] ; 3874 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3774: 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; 3778: e1a010a1 lsr r1, r1, #1 tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 377c: 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; 3780: 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; 3784: e58410bc str r1, [r4, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 3788: e5c3200c strb r2, [r3, #12] c = 'a'; 378c: 03a02061 moveq r2, #97 ; 0x61 3790: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; if (!tty->refcount++) { 3794: e5953008 ldr r3, [r5, #8] */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 3798: e5982000 ldr r2, [r8] if (!tty->refcount++) { 379c: e3530000 cmp r3, #0 37a0: e2833001 add r3, r3, #1 */ if (c++ == 'z') c = 'a'; } args->iop->data1 = tty; 37a4: e5825034 str r5, [r2, #52] ; 0x34 if (!tty->refcount++) { 37a8: e5853008 str r3, [r5, #8] 37ac: 1a000016 bne 380c if (tty->device.firstOpen) 37b0: e5953098 ldr r3, [r5, #152] ; 0x98 37b4: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 37b8: 11a00009 movne r0, r9 37bc: 11a0100a movne r1, sl 37c0: 11a02008 movne r2, r8 37c4: 11a0e00f movne lr, pc 37c8: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 37cc: e59530b4 ldr r3, [r5, #180] ; 0xb4 37d0: e3530002 cmp r3, #2 37d4: 1a00000c bne 380c sc = rtems_task_start(tty->rxTaskId, 37d8: e59500c4 ldr r0, [r5, #196] ; 0xc4 <== NOT EXECUTED 37dc: e59f1094 ldr r1, [pc, #148] ; 3878 <== NOT EXECUTED 37e0: e1a02005 mov r2, r5 <== NOT EXECUTED 37e4: eb0003ac bl 469c <== NOT EXECUTED rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 37e8: e3500000 cmp r0, #0 <== NOT EXECUTED 37ec: 1a000005 bne 3808 <== NOT EXECUTED rtems_fatal_error_occurred (sc); sc = rtems_task_start(tty->txTaskId, 37f0: e1a02005 mov r2, r5 <== NOT EXECUTED 37f4: e59500c8 ldr r0, [r5, #200] ; 0xc8 <== NOT EXECUTED 37f8: e59f107c ldr r1, [pc, #124] ; 387c <== NOT EXECUTED 37fc: eb0003a6 bl 469c <== NOT EXECUTED rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3800: e3500000 cmp r0, #0 <== NOT EXECUTED 3804: 0a000000 beq 380c <== NOT EXECUTED rtems_fatal_error_occurred (sc); 3808: eb000425 bl 48a4 <== NOT EXECUTED } } rtems_semaphore_release (rtems_termios_ttyMutex); 380c: e59f302c ldr r3, [pc, #44] ; 3840 3810: e5930000 ldr r0, [r3] 3814: eb0002d4 bl 436c return RTEMS_SUCCESSFUL; } 3818: e1a00006 mov r0, r6 381c: 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)); 3820: e3a00001 mov r0, #1 3824: e3a010e8 mov r1, #232 ; 0xe8 3828: eb00138d bl 8664 if (tty == NULL) { 382c: e3500000 cmp r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3830: e1a05000 mov r5, r0 3834: e1a04000 mov r4, r0 if (tty == NULL) { 3838: 1affff1d bne 34b4 383c: eaffff26 b 34dc <== NOT EXECUTED 3840: 00019bc8 .word 0x00019bc8 3844: 00019bd0 .word 0x00019bd0 3848: 00018524 .word 0x00018524 384c: 00019bcc .word 0x00019bcc 3850: 54526900 .word 0x54526900 3854: 54526f00 .word 0x54526f00 3858: 54527800 .word 0x54527800 385c: 54785400 .word 0x54785400 3860: 52785400 .word 0x52785400 3864: 54527200 .word 0x54527200 3868: 00002502 .word 0x00002502 386c: 00001805 .word 0x00001805 3870: 000008bd .word 0x000008bd 3874: 0000823b .word 0x0000823b 3878: 000038ec .word 0x000038ec 387c: 00003880 .word 0x00003880 000023ec : const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { 23ec: e59230b4 ldr r3, [r2, #180] ; 0xb4 23f0: e3530000 cmp r3, #0 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { 23f4: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 23f8: e1a04002 mov r4, r2 23fc: e1a0a000 mov sl, r0 2400: 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) { 2404: 1a000005 bne 2420 (*tty->device.write)(tty->minor, (void *)buf, len); 2408: e1a01000 mov r1, r0 240c: e1a02006 mov r2, r6 2410: e5940010 ldr r0, [r4, #16] 2414: e1a0e00f mov lr, pc 2418: e594f0a4 ldr pc, [r4, #164] ; 0xa4 return; 241c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} } newHead = tty->rawOutBuf.Head; 2420: e5925080 ldr r5, [r2, #128] ; 0x80 <== NOT EXECUTED 2424: 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; 2428: 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; 242c: 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) { 2430: ea00002e b 24f0 <== NOT EXECUTED * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; 2434: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 2438: e2850001 add r0, r5, #1 <== NOT EXECUTED 243c: eb004f4c bl 16174 <__umodsi3> <== NOT EXECUTED 2440: e1a05000 mov r5, r0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2444: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2448: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 244c: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { 2450: ea00000a b 2480 <== NOT EXECUTED tty->rawOutBufState = rob_wait; 2454: e5849094 str r9, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2458: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain (tty->rawOutBuf.Semaphore, 245c: e3a01000 mov r1, #0 <== NOT EXECUTED 2460: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2464: e1a02001 mov r2, r1 <== NOT EXECUTED 2468: eb000779 bl 4254 <== NOT EXECUTED RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 246c: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2470: 1b00090b blne 48a4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2474: e10f8000 mrs r8, CPSR <== NOT EXECUTED 2478: e3883080 orr r3, r8, #128 ; 0x80 <== NOT EXECUTED 247c: 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) { 2480: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 2484: e1550003 cmp r5, r3 <== NOT EXECUTED 2488: 0afffff1 beq 2454 <== 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++; 248c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2490: e7da1007 ldrb r1, [sl, r7] <== NOT EXECUTED 2494: e594207c ldr r2, [r4, #124] ; 0x7c <== NOT EXECUTED 2498: e7c21003 strb r1, [r2, r3] <== NOT EXECUTED tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { 249c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 24a0: 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; 24a4: e5845080 str r5, [r4, #128] ; 0x80 <== NOT EXECUTED if (tty->rawOutBufState == rob_idle) { 24a8: 1a00000d bne 24e4 <== NOT EXECUTED /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { 24ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24b0: 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; 24b4: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 24b8: 13833020 orrne r3, r3, #32 <== NOT EXECUTED 24bc: 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)) { 24c0: 1a000006 bne 24e0 <== NOT EXECUTED (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 24c4: 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, 24c8: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 24cc: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 24d0: e0811003 add r1, r1, r3 <== NOT EXECUTED 24d4: e3a02001 mov r2, #1 <== NOT EXECUTED 24d8: e1a0e00f mov lr, pc <== NOT EXECUTED 24dc: 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; 24e0: e584b094 str fp, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 24e4: e129f008 msr CPSR_fc, r8 <== NOT EXECUTED } rtems_interrupt_enable (level); len--; 24e8: e2466001 sub r6, r6, #1 <== NOT EXECUTED 24ec: 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) { 24f0: e3560000 cmp r6, #0 <== NOT EXECUTED 24f4: 1affffce bne 2434 <== NOT EXECUTED 24f8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 00002bc0 : return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bc0: 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; 2bc4: e5903000 ldr r3, [r0] <== NOT EXECUTED return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 2bc8: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2bcc: 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); 2bd0: 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; 2bd4: e595300c ldr r3, [r5, #12] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2bd8: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2bdc: 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; 2be0: e5957010 ldr r7, [r5, #16] <== NOT EXECUTED char *buffer = args->buffer; 2be4: e58d3000 str r3, [sp] <== NOT EXECUTED rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2be8: eb000599 bl 4254 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) 2bec: e2506000 subs r6, r0, #0 <== NOT EXECUTED 2bf0: 1a0000c1 bne 2efc <== NOT EXECUTED return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 2bf4: e59420cc ldr r2, [r4, #204] ; 0xcc <== NOT EXECUTED 2bf8: e59f3304 ldr r3, [pc, #772] ; 2f04 <== NOT EXECUTED 2bfc: e0833282 add r3, r3, r2, lsl #5 <== NOT EXECUTED 2c00: e5933008 ldr r3, [r3, #8] <== NOT EXECUTED 2c04: e3530000 cmp r3, #0 <== NOT EXECUTED 2c08: 0a000005 beq 2c24 <== NOT EXECUTED sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 2c0c: e1a01005 mov r1, r5 <== NOT EXECUTED 2c10: e1a00004 mov r0, r4 <== NOT EXECUTED 2c14: e1a0e00f mov lr, pc <== NOT EXECUTED 2c18: e12fff13 bx r3 <== NOT EXECUTED 2c1c: e1a06000 mov r6, r0 <== NOT EXECUTED 2c20: ea0000b1 b 2eec <== NOT EXECUTED tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 2c24: e5942024 ldr r2, [r4, #36] ; 0x24 <== NOT EXECUTED 2c28: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2c2c: e1520003 cmp r2, r3 <== NOT EXECUTED 2c30: 1a00009a bne 2ea0 <== NOT EXECUTED tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c34: 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; 2c38: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED if (tty->device.pollRead != NULL 2c3c: 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; 2c40: 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; 2c44: e5846020 str r6, [r4, #32] <== NOT EXECUTED 2c48: e5846024 str r6, [r4, #36] ; 0x24 <== NOT EXECUTED tty->read_start_column = tty->column; if (tty->device.pollRead != NULL 2c4c: 0a00003b beq 2d40 <== NOT EXECUTED && tty->device.outputUsesInterrupts == TERMIOS_POLLED) 2c50: e59430b4 ldr r3, [r4, #180] ; 0xb4 <== NOT EXECUTED 2c54: e3530000 cmp r3, #0 <== NOT EXECUTED 2c58: 1a000038 bne 2d40 <== NOT EXECUTED static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 2c5c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2c60: e3130002 tst r3, #2 <== NOT EXECUTED 2c64: 0a00000d beq 2ca0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2c68: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2c6c: e1a0e00f mov lr, pc <== NOT EXECUTED 2c70: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2c74: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_task_wake_after (1); } else { if (siproc (n, tty)) 2c78: e1a01004 mov r1, r4 <== NOT EXECUTED 2c7c: 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) { 2c80: aa000002 bge 2c90 <== NOT EXECUTED rtems_task_wake_after (1); 2c84: e3a00001 mov r0, #1 <== NOT EXECUTED 2c88: eb00069b bl 46fc <== NOT EXECUTED 2c8c: eafffff5 b 2c68 <== NOT EXECUTED } else { if (siproc (n, tty)) 2c90: ebffff67 bl 2a34 <== NOT EXECUTED 2c94: e3500000 cmp r0, #0 <== NOT EXECUTED 2c98: 0afffff2 beq 2c68 <== NOT EXECUTED 2c9c: ea00007f b 2ea0 <== NOT EXECUTED } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 2ca0: eb0003de bl 3c20 <== NOT EXECUTED 2ca4: e1a08000 mov r8, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 2ca8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2cac: e1a0e00f mov lr, pc <== NOT EXECUTED 2cb0: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 2cb4: e3500000 cmp r0, #0 <== NOT EXECUTED 2cb8: aa000013 bge 2d0c <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 2cbc: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2cc0: e3530000 cmp r3, #0 <== NOT EXECUTED 2cc4: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2cc8: 0a000005 beq 2ce4 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 2ccc: e3530000 cmp r3, #0 <== NOT EXECUTED 2cd0: 0a00000a beq 2d00 <== NOT EXECUTED 2cd4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 2cd8: e3530000 cmp r3, #0 <== NOT EXECUTED 2cdc: 0a000007 beq 2d00 <== NOT EXECUTED 2ce0: ea000001 b 2cec <== NOT EXECUTED break; } } } else { if (!tty->termios.c_cc[VTIME]) 2ce4: e3530000 cmp r3, #0 <== NOT EXECUTED 2ce8: 0a00006c beq 2ea0 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 2cec: eb0003cb bl 3c20 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 2cf0: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 2cf4: e0680000 rsb r0, r8, r0 <== NOT EXECUTED 2cf8: e1500003 cmp r0, r3 <== NOT EXECUTED 2cfc: 8a000067 bhi 2ea0 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 2d00: e3a00001 mov r0, #1 <== NOT EXECUTED 2d04: eb00067c bl 46fc <== NOT EXECUTED 2d08: eaffffe6 b 2ca8 <== NOT EXECUTED } else { siproc (n, tty); 2d0c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 2d10: e1a01004 mov r1, r4 <== NOT EXECUTED 2d14: ebffff46 bl 2a34 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2d18: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2d1c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2d20: e1520003 cmp r2, r3 <== NOT EXECUTED 2d24: aa00005d bge 2ea0 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 2d28: e3530000 cmp r3, #0 <== NOT EXECUTED 2d2c: 0affffdd beq 2ca8 <== NOT EXECUTED 2d30: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 2d34: e3530000 cmp r3, #0 <== NOT EXECUTED 2d38: 0affffda beq 2ca8 <== NOT EXECUTED 2d3c: eaffffd7 b 2ca0 <== 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; 2d40: 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, 2d44: e284b049 add fp, r4, #73 ; 0x49 <== NOT EXECUTED 2d48: e3a0a001 mov sl, #1 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2d4c: e59f91b4 ldr r9, [pc, #436] ; 2f08 <== NOT EXECUTED 2d50: ea000041 b 2e5c <== NOT EXECUTED (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 2d54: e594005c ldr r0, [r4, #92] ; 0x5c <== NOT EXECUTED 2d58: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d5c: e2800001 add r0, r0, #1 <== NOT EXECUTED 2d60: eb004d03 bl 16174 <__umodsi3> <== NOT EXECUTED c = tty->rawInBuf.theBuf[newHead]; 2d64: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 2d68: e7d38000 ldrb r8, [r3, r0] <== NOT EXECUTED tty->rawInBuf.Head = newHead; 2d6c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 2d70: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2d74: e5942064 ldr r2, [r4, #100] ; 0x64 <== NOT EXECUTED 2d78: e0823003 add r3, r2, r3 <== NOT EXECUTED 2d7c: e0600003 rsb r0, r0, r3 <== NOT EXECUTED 2d80: e5941064 ldr r1, [r4, #100] ; 0x64 <== NOT EXECUTED 2d84: eb004cfa bl 16174 <__umodsi3> <== NOT EXECUTED 2d88: e59430bc ldr r3, [r4, #188] ; 0xbc <== NOT EXECUTED 2d8c: e1500003 cmp r0, r3 <== NOT EXECUTED 2d90: 2a00001f bcs 2e14 <== NOT EXECUTED % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 2d94: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2d98: e3c33001 bic r3, r3, #1 <== NOT EXECUTED 2d9c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 2da0: e59f3164 ldr r3, [pc, #356] ; 2f0c <== NOT EXECUTED 2da4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2da8: e59f015c ldr r0, [pc, #348] ; 2f0c <== NOT EXECUTED 2dac: e0023003 and r3, r2, r3 <== NOT EXECUTED 2db0: e1530000 cmp r3, r0 <== NOT EXECUTED 2db4: 1a00000b bne 2de8 <== NOT EXECUTED 2db8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 2dbc: e3530000 cmp r3, #0 <== NOT EXECUTED 2dc0: 0a000002 beq 2dd0 <== NOT EXECUTED == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { 2dc4: 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)) 2dc8: e3130020 tst r3, #32 <== NOT EXECUTED 2dcc: 0a000005 beq 2de8 <== 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, 2dd0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2dd4: e1a0100b mov r1, fp <== NOT EXECUTED 2dd8: e3a02001 mov r2, #1 <== NOT EXECUTED 2ddc: e1a0e00f mov lr, pc <== NOT EXECUTED 2de0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 2de4: ea00000a b 2e14 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 2de8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2dec: e3130c01 tst r3, #256 ; 0x100 <== NOT EXECUTED 2df0: 0a000007 beq 2e14 <== NOT EXECUTED tty->flow_ctrl &= ~FL_IRTSOFF; 2df4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2df8: 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; 2dfc: e3c22004 bic r2, r2, #4 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 2e00: 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; 2e04: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { tty->device.startRemoteTx(tty->minor); 2e08: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 2e0c: 11a0e00f movne lr, pc <== NOT EXECUTED 2e10: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 2e14: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 2e18: e3130002 tst r3, #2 <== NOT EXECUTED 2e1c: 0a000005 beq 2e38 <== NOT EXECUTED if (siproc (c, tty)) 2e20: e1a00008 mov r0, r8 <== NOT EXECUTED 2e24: e1a01004 mov r1, r4 <== NOT EXECUTED 2e28: ebffff01 bl 2a34 <== NOT EXECUTED 2e2c: e3500000 cmp r0, #0 <== NOT EXECUTED 2e30: 1a000007 bne 2e54 <== NOT EXECUTED 2e34: ea000007 b 2e58 <== NOT EXECUTED wait = 0; } else { siproc (c, tty); 2e38: e1a00008 mov r0, r8 <== NOT EXECUTED 2e3c: e1a01004 mov r1, r4 <== NOT EXECUTED 2e40: ebfffefb bl 2a34 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 2e44: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 2e48: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e4c: e1520003 cmp r2, r3 <== NOT EXECUTED 2e50: ba000000 blt 2e58 <== NOT EXECUTED 2e54: e3a0a000 mov sl, #0 <== NOT EXECUTED wait = 0; } timeout = tty->rawInBufSemaphoreTimeout; 2e58: e5948070 ldr r8, [r4, #112] ; 0x70 <== NOT EXECUTED while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 2e5c: e594205c ldr r2, [r4, #92] ; 0x5c <== NOT EXECUTED 2e60: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED 2e64: e1520003 cmp r2, r3 <== NOT EXECUTED 2e68: 0a000004 beq 2e80 <== NOT EXECUTED 2e6c: e5993000 ldr r3, [r9] <== NOT EXECUTED 2e70: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 2e74: e2433001 sub r3, r3, #1 <== NOT EXECUTED 2e78: e1520003 cmp r2, r3 <== NOT EXECUTED 2e7c: baffffb4 blt 2d54 <== NOT EXECUTED } /* * Wait for characters */ if ( wait ) { 2e80: e35a0000 cmp sl, #0 <== NOT EXECUTED 2e84: 0a000005 beq 2ea0 <== NOT EXECUTED sc = rtems_semaphore_obtain (tty->rawInBuf.Semaphore, 2e88: e2840068 add r0, r4, #104 ; 0x68 <== NOT EXECUTED 2e8c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2e90: e1a02008 mov r2, r8 <== NOT EXECUTED 2e94: eb0004ee bl 4254 <== NOT EXECUTED tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 2e98: e3500000 cmp r0, #0 <== NOT EXECUTED 2e9c: 0affffee beq 2e5c <== NOT EXECUTED { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; rtems_status_code sc; int wait = (int)1; while ( wait ) { 2ea0: e3a03000 mov r3, #0 <== NOT EXECUTED 2ea4: ea000007 b 2ec8 <== 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++]; 2ea8: e594101c ldr r1, [r4, #28] <== NOT EXECUTED 2eac: e59d0000 ldr r0, [sp] <== NOT EXECUTED 2eb0: e7d11002 ldrb r1, [r1, r2] <== NOT EXECUTED 2eb4: e2822001 add r2, r2, #1 <== NOT EXECUTED 2eb8: e7c01003 strb r1, [r0, r3] <== NOT EXECUTED 2ebc: e5842024 str r2, [r4, #36] ; 0x24 <== NOT EXECUTED count--; 2ec0: e2477001 sub r7, r7, #1 <== NOT EXECUTED 2ec4: 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)) { 2ec8: e3570000 cmp r7, #0 <== NOT EXECUTED 2ecc: 0a000003 beq 2ee0 <== NOT EXECUTED 2ed0: e2841020 add r1, r4, #32 <== NOT EXECUTED 2ed4: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED 2ed8: e1520001 cmp r2, r1 <== NOT EXECUTED 2edc: bafffff1 blt 2ea8 <== NOT EXECUTED *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 2ee0: e5953010 ldr r3, [r5, #16] <== NOT EXECUTED 2ee4: e0677003 rsb r7, r7, r3 <== NOT EXECUTED 2ee8: e5857018 str r7, [r5, #24] <== NOT EXECUTED tty->tty_rcvwakeup = 0; 2eec: e3a03000 mov r3, #0 <== NOT EXECUTED 2ef0: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED rtems_semaphore_release (tty->isem); 2ef4: e5940014 ldr r0, [r4, #20] <== NOT EXECUTED 2ef8: eb00051b bl 436c <== NOT EXECUTED return sc; } 2efc: e1a00006 mov r0, r6 <== NOT EXECUTED 2f00: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED 2f04: 000199f4 .word 0x000199f4 2f08: 00018524 .word 0x00018524 2f0c: 00000202 .word 0x00000202 00001ecc : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 1ecc: e59020b8 ldr r2, [r0, #184] ; 0xb8 <== NOT EXECUTED 1ed0: e59f31d0 ldr r3, [pc, #464] ; 20a8 <== NOT EXECUTED 1ed4: e0023003 and r3, r2, r3 <== NOT EXECUTED 1ed8: e59f21cc ldr r2, [pc, #460] ; 20ac <== NOT EXECUTED 1edc: 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) { 1ee0: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 1ee4: 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)) 1ee8: 1a00000e bne 1f28 <== NOT EXECUTED == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, 1eec: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 1ef0: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 1ef4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1ef8: e1a0e00f mov lr, pc <== NOT EXECUTED 1efc: 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 ( 1f00: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f04: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f08: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f0c: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f10: 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--; 1f14: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 1f18: e3811002 orr r1, r1, #2 <== NOT EXECUTED 1f1c: 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--; 1f20: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; rtems_interrupt_enable(level); 1f24: ea000011 b 1f70 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) 1f28: e59030b8 ldr r3, [r0, #184] ; 0xb8 <== NOT EXECUTED 1f2c: e2033003 and r3, r3, #3 <== NOT EXECUTED 1f30: e3530002 cmp r3, #2 <== NOT EXECUTED 1f34: 1a000010 bne 1f7c <== 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, 1f38: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 1f3c: e3a02001 mov r2, #1 <== NOT EXECUTED 1f40: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 1f44: e1a0e00f mov lr, pc <== NOT EXECUTED 1f48: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 1f4c: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1f50: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1f54: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTART]), 1); rtems_interrupt_disable(level); tty->t_dqlen--; 1f58: e5942090 ldr r2, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f5c: 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--; 1f60: e2422001 sub r2, r2, #1 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 1f64: e3c11002 bic r1, r1, #2 <== NOT EXECUTED 1f68: 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--; 1f6c: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1f70: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 1f74: e3a05001 mov r5, #1 <== NOT EXECUTED 1f78: ea000048 b 20a0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 1f7c: e5902080 ldr r2, [r0, #128] ; 0x80 <== NOT EXECUTED 1f80: e5903084 ldr r3, [r0, #132] ; 0x84 <== NOT EXECUTED 1f84: e1520003 cmp r2, r3 <== NOT EXECUTED 1f88: 1a000005 bne 1fa4 <== NOT EXECUTED /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 1f8c: e5903094 ldr r3, [r0, #148] ; 0x94 <== NOT EXECUTED 1f90: e3530002 cmp r3, #2 <== NOT EXECUTED /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 1f94: 0590008c ldreq r0, [r0, #140] ; 0x8c <== NOT EXECUTED 1f98: 0b0008f3 bleq 436c <== NOT EXECUTED 1f9c: e3a05000 mov r5, #0 <== NOT EXECUTED 1fa0: ea00003e b 20a0 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1fa4: e10f3000 mrs r3, CPSR <== NOT EXECUTED 1fa8: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 1fac: e129f002 msr CPSR_fc, r2 <== NOT EXECUTED return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; 1fb0: e3a02000 mov r2, #0 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 1fb4: e5900090 ldr r0, [r0, #144] ; 0x90 <== NOT EXECUTED tty->t_dqlen = 0; 1fb8: e5842090 str r2, [r4, #144] ; 0x90 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1fbc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 1fc0: e5943084 ldr r3, [r4, #132] ; 0x84 <== NOT EXECUTED 1fc4: e5941088 ldr r1, [r4, #136] ; 0x88 <== NOT EXECUTED 1fc8: e0800003 add r0, r0, r3 <== NOT EXECUTED 1fcc: eb005068 bl 16174 <__umodsi3> <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 1fd0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 1fd4: 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; 1fd8: e1a06000 mov r6, r0 <== NOT EXECUTED tty->rawOutBuf.Tail = newTail; 1fdc: 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); 1fe0: 0594008c ldreq r0, [r4, #140] ; 0x8c <== NOT EXECUTED 1fe4: 0b0008e0 bleq 436c <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { 1fe8: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 1fec: e1560003 cmp r6, r3 <== NOT EXECUTED 1ff0: 1a00000a bne 2020 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 1ff4: e59430d4 ldr r3, [r4, #212] ; 0xd4 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 1ff8: e3a05000 mov r5, #0 <== NOT EXECUTED nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 1ffc: e3530000 cmp r3, #0 <== NOT EXECUTED } if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 2000: 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) { 2004: 01a05003 moveq r5, r3 <== NOT EXECUTED 2008: 0a000023 beq 209c <== NOT EXECUTED (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 200c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 2010: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 2014: e1a0e00f mov lr, pc <== NOT EXECUTED 2018: e12fff13 bx r3 <== NOT EXECUTED 201c: ea00001e b 209c <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 2020: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 2024: e2033e21 and r3, r3, #528 ; 0x210 <== NOT EXECUTED 2028: e3530e21 cmp r3, #528 ; 0x210 <== NOT EXECUTED 202c: 1a00000a bne 205c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 2030: e10f3000 mrs r3, CPSR <== NOT EXECUTED 2034: e3832080 orr r2, r3, #128 ; 0x80 <== NOT EXECUTED 2038: 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; 203c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 2040: e3822020 orr r2, r2, #32 <== NOT EXECUTED 2044: e58420b8 str r2, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 2048: e3a02001 mov r2, #1 <== NOT EXECUTED 204c: e5842094 str r2, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2050: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED 2054: e3a05000 mov r5, #0 <== NOT EXECUTED 2058: ea00000f b 209c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 205c: e5943080 ldr r3, [r4, #128] ; 0x80 <== NOT EXECUTED 2060: e1560003 cmp r6, r3 <== NOT EXECUTED nToSend = tty->rawOutBuf.Size - newTail; 2064: 85945088 ldrhi r5, [r4, #136] ; 0x88 <== NOT EXECUTED else nToSend = tty->rawOutBuf.Head - newTail; 2068: 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)) { 206c: 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; 2070: 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)) { 2074: e3130c06 tst r3, #1536 ; 0x600 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)(tty->minor, 2078: 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)) { 207c: 13a05001 movne r5, #1 <== NOT EXECUTED nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ 2080: e3a03001 mov r3, #1 <== NOT EXECUTED 2084: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED (*tty->device.write)(tty->minor, 2088: e0811006 add r1, r1, r6 <== NOT EXECUTED 208c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2090: e1a02005 mov r2, r5 <== NOT EXECUTED 2094: e1a0e00f mov lr, pc <== NOT EXECUTED 2098: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 209c: e5846084 str r6, [r4, #132] ; 0x84 <== NOT EXECUTED } return nToSend; } 20a0: e1a00005 mov r0, r5 <== NOT EXECUTED 20a4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 20a8: 00000403 .word 0x00000403 20ac: 00000401 .word 0x00000401 000038ec : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { 38ec: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} <== NOT EXECUTED 38f0: e1a04000 mov r4, r0 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 38f4: e3a05000 mov r5, #0 <== NOT EXECUTED if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 38f8: e28d6007 add r6, sp, #7 <== NOT EXECUTED char c_buf; while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_RX_PROC_EVENT | 38fc: e1a0300d mov r3, sp <== NOT EXECUTED 3900: e3a01002 mov r1, #2 <== NOT EXECUTED 3904: e3a02000 mov r2, #0 <== NOT EXECUTED 3908: e3a00003 mov r0, #3 <== NOT EXECUTED 390c: eb0000e0 bl 3c94 <== NOT EXECUTED TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { 3910: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3914: e3130001 tst r3, #1 <== NOT EXECUTED 3918: 0a000003 beq 392c <== NOT EXECUTED tty->rxTaskId = 0; 391c: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 3920: e1a00005 mov r0, r5 <== NOT EXECUTED 3924: eb000309 bl 4550 <== NOT EXECUTED 3928: eafffff3 b 38fc <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 392c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3930: e1a0e00f mov lr, pc <== NOT EXECUTED 3934: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (c != EOF) { 3938: e3700001 cmn r0, #1 <== NOT EXECUTED } else { /* * do something */ c = tty->device.pollRead(tty->minor); 393c: e1a03000 mov r3, r0 <== NOT EXECUTED if (c != EOF) { 3940: 0affffed beq 38fc <== NOT EXECUTED /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( 3944: e1a00004 mov r0, r4 <== NOT EXECUTED 3948: e1a01006 mov r1, r6 <== NOT EXECUTED 394c: 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; 3950: e5cd3007 strb r3, [sp, #7] <== NOT EXECUTED rtems_termios_enqueue_raw_characters ( 3954: ebfff9f1 bl 2120 <== NOT EXECUTED 3958: eaffffe7 b 38fc <== NOT EXECUTED 00001ec0 : 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); 1ec0: e59000c4 ldr r0, [r0, #196] ; 0xc4 <== NOT EXECUTED 1ec4: e3a01002 mov r1, #2 <== NOT EXECUTED 1ec8: ea0007cd b 3e04 <== NOT EXECUTED 00003880 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3880: 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) { 3884: e59f705c ldr r7, [pc, #92] ; 38e8 <== NOT EXECUTED /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { 3888: e1a04000 mov r4, r0 <== NOT EXECUTED while (1) { /* * wait for rtems event */ rtems_event_receive((TERMIOS_TX_START_EVENT | 388c: e3a05000 mov r5, #0 <== NOT EXECUTED 3890: e1a0300d mov r3, sp <== NOT EXECUTED 3894: e3a01002 mov r1, #2 <== NOT EXECUTED 3898: e3a02000 mov r2, #0 <== NOT EXECUTED 389c: e3a00003 mov r0, #3 <== NOT EXECUTED 38a0: eb0000fb bl 3c94 <== NOT EXECUTED TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { 38a4: e59d3000 ldr r3, [sp] <== NOT EXECUTED 38a8: 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); 38ac: 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) { 38b0: 0a000003 beq 38c4 <== NOT EXECUTED tty->txTaskId = 0; 38b4: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); 38b8: e1a00005 mov r0, r5 <== NOT EXECUTED 38bc: eb000323 bl 4550 <== NOT EXECUTED 38c0: eafffff2 b 3890 <== NOT EXECUTED } else { /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 38c4: e59430cc ldr r3, [r4, #204] ; 0xcc <== NOT EXECUTED 38c8: e0873283 add r3, r7, r3, lsl #5 <== NOT EXECUTED 38cc: e5933014 ldr r3, [r3, #20] <== NOT EXECUTED 38d0: e3530000 cmp r3, #0 <== NOT EXECUTED rtems_termios_linesw[tty->t_line].l_start(tty); 38d4: 11a0e00f movne lr, pc <== NOT EXECUTED 38d8: 112fff13 bxne r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); 38dc: e1a00004 mov r0, r4 <== NOT EXECUTED 38e0: ebfff979 bl 1ecc <== NOT EXECUTED 38e4: eaffffe9 b 3890 <== NOT EXECUTED 38e8: 000199f4 .word 0x000199f4 00002a94 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2a94: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2a98: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2a9c: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2aa0: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 2aa4: 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); 2aa8: e1a02001 mov r2, r1 2aac: e5950018 ldr r0, [r5, #24] 2ab0: eb0005e7 bl 4254 if (sc != RTEMS_SUCCESSFUL) 2ab4: e2506000 subs r6, r0, #0 2ab8: 1a000022 bne 2b48 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 2abc: e59520cc ldr r2, [r5, #204] ; 0xcc 2ac0: e59f3088 ldr r3, [pc, #136] ; 2b50 2ac4: e0833282 add r3, r3, r2, lsl #5 2ac8: e593300c ldr r3, [r3, #12] 2acc: e3530000 cmp r3, #0 2ad0: 0a000005 beq 2aec sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 2ad4: e1a01004 mov r1, r4 <== NOT EXECUTED 2ad8: e1a00005 mov r0, r5 <== NOT EXECUTED 2adc: e1a0e00f mov lr, pc <== NOT EXECUTED 2ae0: e12fff13 bx r3 <== NOT EXECUTED 2ae4: e1a06000 mov r6, r0 <== NOT EXECUTED 2ae8: ea000014 b 2b40 <== NOT EXECUTED rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 2aec: e5953034 ldr r3, [r5, #52] ; 0x34 2af0: e3130001 tst r3, #1 uint32_t count = args->count; 2af4: 15948010 ldrne r8, [r4, #16] char *buffer = args->buffer; 2af8: 1594a00c ldrne sl, [r4, #12] 2afc: 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) { 2b00: 1a000004 bne 2b18 2b04: ea000007 b 2b28 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 2b08: e7da0007 ldrb r0, [sl, r7] 2b0c: ebfffe7a bl 24fc 2b10: e2877001 add r7, r7, #1 2b14: e2488001 sub r8, r8, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b18: e3580000 cmp r8, #0 oproc (*buffer++, tty); 2b1c: e1a01005 mov r1, r5 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 2b20: 1afffff8 bne 2b08 2b24: ea000003 b 2b38 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 2b28: e284000c add r0, r4, #12 <== NOT EXECUTED 2b2c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 2b30: e1a02005 mov r2, r5 <== NOT EXECUTED 2b34: ebfffe2c bl 23ec <== NOT EXECUTED args->bytes_moved = args->count; 2b38: e5943010 ldr r3, [r4, #16] 2b3c: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 2b40: e5950018 ldr r0, [r5, #24] 2b44: eb000608 bl 436c return sc; } 2b48: e1a00006 mov r0, r6 2b4c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} 2b50: 000199f4 .word 0x000199f4 00005dac : static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 5dac: 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) 5db0: 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 ) { 5db4: e1a06000 mov r6, r0 <== NOT EXECUTED 5db8: e1a09001 mov r9, r1 <== NOT EXECUTED 5dbc: e1a04002 mov r4, r2 <== NOT EXECUTED int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) 5dc0: 0a00000d beq 5dfc <== NOT EXECUTED { if (rtems_panic_in_progress++) 5dc4: e59f3160 ldr r3, [pc, #352] ; 5f2c <== NOT EXECUTED 5dc8: e5932000 ldr r2, [r3] <== NOT EXECUTED 5dcc: e3520000 cmp r2, #0 <== NOT EXECUTED 5dd0: e2822001 add r2, r2, #1 <== NOT EXECUTED 5dd4: e5832000 str r2, [r3] <== NOT EXECUTED 5dd8: 0a000003 beq 5dec <== NOT EXECUTED rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 5ddc: e59f314c ldr r3, [pc, #332] ; 5f30 <== NOT EXECUTED 5de0: e5932000 ldr r2, [r3] <== NOT EXECUTED 5de4: e2822001 add r2, r2, #1 <== NOT EXECUTED 5de8: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 5dec: e59f3138 ldr r3, [pc, #312] ; 5f2c <== NOT EXECUTED 5df0: e5933000 ldr r3, [r3] <== NOT EXECUTED 5df4: e3530002 cmp r3, #2 <== NOT EXECUTED 5df8: ca000049 bgt 5f24 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 5dfc: e59f3130 ldr r3, [pc, #304] ; 5f34 <== NOT EXECUTED 5e00: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e04: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 5e08: eb003545 bl 13324 <== NOT EXECUTED status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5e0c: e2165101 ands r5, r6, #1073741824 ; 0x40000000 <== NOT EXECUTED return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ status = error_flag & ~RTEMS_ERROR_MASK; 5e10: e3c68207 bic r8, r6, #1879048192 ; 0x70000000 <== NOT EXECUTED if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 5e14: 0a000001 beq 5e20 <== NOT EXECUTED local_errno = errno; 5e18: eb00344e bl 12f58 <__errno> <== NOT EXECUTED 5e1c: 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); 5e20: e59fa10c ldr sl, [pc, #268] ; 5f34 <== NOT EXECUTED 5e24: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5e28: e1a02004 mov r2, r4 <== NOT EXECUTED 5e2c: e1a01009 mov r1, r9 <== NOT EXECUTED 5e30: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5e34: eb004d5b bl 193a8 <== NOT EXECUTED if (status) 5e38: 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); 5e3c: e1a04000 mov r4, r0 <== NOT EXECUTED if (status) 5e40: 0a000008 beq 5e68 <== NOT EXECUTED chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 5e44: e59a3000 ldr r3, [sl] <== NOT EXECUTED 5e48: e1a00008 mov r0, r8 <== NOT EXECUTED 5e4c: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5e50: ebffffd1 bl 5d9c <== NOT EXECUTED 5e54: e59f10dc ldr r1, [pc, #220] ; 5f38 <== NOT EXECUTED 5e58: e1a02000 mov r2, r0 <== NOT EXECUTED 5e5c: e1a00008 mov r0, r8 <== NOT EXECUTED 5e60: eb0035ed bl 1361c <== NOT EXECUTED 5e64: e0844000 add r4, r4, r0 <== NOT EXECUTED if (local_errno) 5e68: e3550000 cmp r5, #0 <== NOT EXECUTED 5e6c: 0a000015 beq 5ec8 <== NOT EXECUTED { if ((local_errno > 0) && *strerror(local_errno)) 5e70: da00000d ble 5eac <== NOT EXECUTED 5e74: e1a00005 mov r0, r5 <== NOT EXECUTED 5e78: eb0038fa bl 14268 <== NOT EXECUTED 5e7c: e5d03000 ldrb r3, [r0] <== NOT EXECUTED 5e80: e3530000 cmp r3, #0 <== NOT EXECUTED 5e84: 0a000008 beq 5eac <== NOT EXECUTED chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 5e88: e59f30a4 ldr r3, [pc, #164] ; 5f34 <== NOT EXECUTED 5e8c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5e90: e1a00005 mov r0, r5 <== NOT EXECUTED 5e94: e593800c ldr r8, [r3, #12] <== NOT EXECUTED 5e98: eb0038f2 bl 14268 <== NOT EXECUTED 5e9c: e59f1098 ldr r1, [pc, #152] ; 5f3c <== NOT EXECUTED 5ea0: e1a02000 mov r2, r0 <== NOT EXECUTED 5ea4: e1a00008 mov r0, r8 <== NOT EXECUTED 5ea8: ea000004 b 5ec0 <== NOT EXECUTED else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 5eac: e59f3080 ldr r3, [pc, #128] ; 5f34 <== NOT EXECUTED 5eb0: e5933000 ldr r3, [r3] <== NOT EXECUTED 5eb4: e59f1084 ldr r1, [pc, #132] ; 5f40 <== NOT EXECUTED 5eb8: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5ebc: e1a02005 mov r2, r5 <== NOT EXECUTED 5ec0: eb0035d5 bl 1361c <== NOT EXECUTED 5ec4: e0844000 add r4, r4, r0 <== NOT EXECUTED } chars_written += fprintf(stderr, "\n"); 5ec8: e59f8064 ldr r8, [pc, #100] ; 5f34 <== NOT EXECUTED 5ecc: e5983000 ldr r3, [r8] <== NOT EXECUTED 5ed0: e59f106c ldr r1, [pc, #108] ; 5f44 <== NOT EXECUTED 5ed4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5ed8: eb0035cf bl 1361c <== NOT EXECUTED (void) fflush(stderr); 5edc: 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"); 5ee0: e1a0a000 mov sl, r0 <== NOT EXECUTED (void) fflush(stderr); 5ee4: e593000c ldr r0, [r3, #12] <== NOT EXECUTED 5ee8: eb00350d bl 13324 <== NOT EXECUTED if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5eec: 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"); 5ef0: 008a0004 addeq r0, sl, r4 <== NOT EXECUTED (void) fflush(stderr); if (error_flag & (RTEMS_ERROR_PANIC | RTEMS_ERROR_ABORT)) 5ef4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED { if (error_flag & RTEMS_ERROR_PANIC) 5ef8: e3570000 cmp r7, #0 <== NOT EXECUTED 5efc: 0a000004 beq 5f14 <== NOT EXECUTED { rtems_error(0, "fatal error, exiting"); 5f00: e3a00000 mov r0, #0 <== NOT EXECUTED 5f04: e59f103c ldr r1, [pc, #60] ; 5f48 <== NOT EXECUTED 5f08: eb00001b bl 5f7c <== NOT EXECUTED _exit(local_errno); 5f0c: e1a00005 mov r0, r5 <== NOT EXECUTED 5f10: eb0002cf bl 6a54 <_exit> <== NOT EXECUTED } else { rtems_error(0, "fatal error, aborting"); 5f14: e59f1030 ldr r1, [pc, #48] ; 5f4c <== NOT EXECUTED 5f18: e1a00007 mov r0, r7 <== NOT EXECUTED 5f1c: eb000016 bl 5f7c <== NOT EXECUTED abort(); 5f20: eb003403 bl 12f34 <== NOT EXECUTED 5f24: e3a00000 mov r0, #0 <== NOT EXECUTED } } return chars_written; } 5f28: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED 5f2c: 00024a7c .word 0x00024a7c 5f30: 00024c0c .word 0x00024c0c 5f34: 00021f48 .word 0x00021f48 5f38: 00023893 .word 0x00023893 5f3c: 000238a1 .word 0x000238a1 5f40: 000238ae .word 0x000238ae 5f44: 00023880 .word 0x00023880 5f48: 000238c2 .word 0x000238c2 5f4c: 000238d7 .word 0x000238d7 0002225c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2225c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 22260: e3a04000 mov r4, #0 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 22264: e59fb0d4 ldr fp, [pc, #212] ; 22340 limit++; continue; } sign = 1; } if (!isdigit(c)) 22268: e59f90d4 ldr r9, [pc, #212] ; 22344 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2226c: e58d1000 str r1, [sp] 22270: e1a05000 mov r5, r0 22274: e3e08102 mvn r8, #-2147483648 ; 0x80000000 22278: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 2227c: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 22280: e5953004 ldr r3, [r5, #4] 22284: e2433001 sub r3, r3, #1 22288: e3530000 cmp r3, #0 2228c: e5853004 str r3, [r5, #4] 22290: a5953000 ldrge r3, [r5] 22294: a4d36001 ldrbge r6, [r3], #1 22298: a5853000 strge r3, [r5] 2229c: aa000003 bge 222b0 222a0: e59b0000 ldr r0, [fp] <== NOT EXECUTED 222a4: e1a01005 mov r1, r5 <== NOT EXECUTED 222a8: eb00707a bl 3e498 <__srget_r> <== NOT EXECUTED 222ac: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 222b0: e356003a cmp r6, #58 ; 0x3a 222b4: 0a000019 beq 22320 break; if (sign == 0) { 222b8: e3540000 cmp r4, #0 222bc: 1a000004 bne 222d4 if (c == '-') { 222c0: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 222c4: 02888001 addeq r8, r8, #1 222c8: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 222cc: 0affffeb beq 22280 sign = -1; limit++; continue; 222d0: e3a04001 mov r4, #1 } sign = 1; } if (!isdigit(c)) 222d4: e5993000 ldr r3, [r9] 222d8: e0833006 add r3, r3, r6 222dc: e5d33001 ldrb r3, [r3, #1] 222e0: e3130004 tst r3, #4 222e4: 0a000013 beq 22338 return 0; d = c - '0'; if ((i > (limit / 10)) 222e8: e1a00008 mov r0, r8 222ec: e3a0100a mov r1, #10 222f0: eb00bb08 bl 50f18 <__aeabi_uidiv> 222f4: e1570000 cmp r7, r0 222f8: 8a00000e bhi 22338 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 222fc: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) 22300: 1a000004 bne 22318 22304: e1a00008 mov r0, r8 <== NOT EXECUTED 22308: e3a0100a mov r1, #10 <== NOT EXECUTED 2230c: eb00bb95 bl 51168 <__umodsi3> <== NOT EXECUTED 22310: e1560000 cmp r6, r0 <== NOT EXECUTED 22314: 8a000007 bhi 22338 <== NOT EXECUTED || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; i = i * 10 + d; 22318: e027679a mla r7, sl, r7, r6 2231c: eaffffd7 b 22280 } if (sign == 0) 22320: e3540000 cmp r4, #0 return 0; *val = i * sign; 22324: 10030497 mulne r3, r7, r4 22328: 159d2000 ldrne r2, [sp] 2232c: 13a00001 movne r0, #1 22330: 15823000 strne r3, [r2] return 1; 22334: 1a000000 bne 2233c 22338: e3a00000 mov r0, #0 <== NOT EXECUTED } 2233c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} 22340: 00053cd0 .word 0x00053cd0 22344: 00053cc4 .word 0x00053cc4 00022348 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 22348: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2234c: e1a04002 mov r4, r2 int c; *name = *bufp; 22350: 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) { 22354: e59d6018 ldr r6, [sp, #24] int c; *name = *bufp; 22358: e5812000 str r2, [r1] for (;;) { c = getc(fp); 2235c: e59f70c0 ldr r7, [pc, #192] ; 22424 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 22360: e1a05000 mov r5, r0 22364: e1a08003 mov r8, r3 int c; *name = *bufp; for (;;) { c = getc(fp); 22368: e5953004 ldr r3, [r5, #4] 2236c: e2433001 sub r3, r3, #1 22370: e3530000 cmp r3, #0 22374: e5853004 str r3, [r5, #4] 22378: a5953000 ldrge r3, [r5] 2237c: a4d30001 ldrbge r0, [r3], #1 22380: a5853000 strge r3, [r5] 22384: b5970000 ldrlt r0, [r7] 22388: b1a01005 movlt r1, r5 2238c: bb007041 bllt 3e498 <__srget_r> if (c == ':') { 22390: e350003a cmp r0, #58 ; 0x3a 22394: 1a000002 bne 223a4 if (nlFlag) 22398: e3560000 cmp r6, #0 2239c: 0a000013 beq 223f0 223a0: ea00001d b 2241c <== NOT EXECUTED return 0; break; } if (c == '\n') { 223a4: e350000a cmp r0, #10 223a8: 1a000002 bne 223b8 if (!nlFlag) 223ac: e3560000 cmp r6, #0 223b0: 1a00000e bne 223f0 223b4: ea000018 b 2241c <== NOT EXECUTED return 0; break; } if (c == EOF) 223b8: e3700001 cmn r0, #1 223bc: 0a000016 beq 2241c return 0; if (*nleft < 2) 223c0: e5983000 ldr r3, [r8] 223c4: e3530001 cmp r3, #1 223c8: 9a000013 bls 2241c return 0; **bufp = c; 223cc: e5943000 ldr r3, [r4] 223d0: e5c30000 strb r0, [r3] ++(*bufp); 223d4: e5942000 ldr r2, [r4] --(*nleft); 223d8: e5983000 ldr r3, [r8] if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 223dc: e2822001 add r2, r2, #1 --(*nleft); 223e0: e2433001 sub r3, r3, #1 if (c == EOF) return 0; if (*nleft < 2) return 0; **bufp = c; ++(*bufp); 223e4: e5842000 str r2, [r4] --(*nleft); 223e8: e5883000 str r3, [r8] } 223ec: eaffffdd b 22368 **bufp = '\0'; 223f0: e5943000 ldr r3, [r4] 223f4: e3a02000 mov r2, #0 223f8: e5c32000 strb r2, [r3] ++(*bufp); 223fc: e5942000 ldr r2, [r4] --(*nleft); 22400: e5983000 ldr r3, [r8] **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 22404: e2822001 add r2, r2, #1 --(*nleft); 22408: e2433001 sub r3, r3, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 2240c: e5842000 str r2, [r4] --(*nleft); 22410: e5883000 str r3, [r8] 22414: e3a00001 mov r0, #1 return 1; 22418: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 2241c: e3a00000 mov r0, #0 <== NOT EXECUTED } 22420: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 22424: 00053cd0 .word 0x00053cd0 00022428 : FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22428: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2242c: e24dd014 sub sp, sp, #20 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22430: e28d6008 add r6, sp, #8 22434: e28d5004 add r5, sp, #4 FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22438: e58d2008 str r2, [sp, #8] 2243c: e58d3004 str r3, [sp, #4] int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22440: e3a08000 mov r8, #0 22444: e1a02006 mov r2, r6 22448: e1a03005 mov r3, r5 2244c: e58d8000 str r8, [sp] FILE *fp, struct group *grp, char *buffer, size_t bufsize ) { 22450: e1a07000 mov r7, r0 22454: e1a04001 mov r4, r1 int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22458: ebffffba bl 22348 2245c: e1500008 cmp r0, r8 22460: 0a00003b beq 22554 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) 22464: e1a00007 mov r0, r7 22468: e2841004 add r1, r4, #4 2246c: e1a02006 mov r2, r6 22470: e1a03005 mov r3, r5 22474: e58d8000 str r8, [sp] 22478: ebffffb2 bl 22348 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 2247c: e1500008 cmp r0, r8 22480: 0a000033 beq 22554 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) 22484: e1a00007 mov r0, r7 22488: e28d1010 add r1, sp, #16 2248c: ebffff72 bl 2225c { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 22490: e1500008 cmp r0, r8 22494: 0a00002e beq 22554 || !scanString(fp, &grp->gr_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &grgid) || !scanString(fp, &grmem, &buffer, &bufsize, 1)) 22498: e1a03005 mov r3, r5 2249c: e28d100c add r1, sp, #12 224a0: e1a00007 mov r0, r7 224a4: e1a02006 mov r2, r6 224a8: e3a05001 mov r5, #1 224ac: e58d5000 str r5, [sp] 224b0: ebffffa4 bl 22348 { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 224b4: 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; 224b8: 11dd31b0 ldrhne r3, [sp, #16] /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 224bc: 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; 224c0: 11c430b8 strhne r3, [r4, #8] { int grgid; char *grmem, *cp; int memcount; if (!scanString(fp, &grp->gr_name, &buffer, &bufsize, 0) 224c4: 1a000003 bne 224d8 224c8: ea000021 b 22554 <== NOT EXECUTED /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') 224cc: e352002c cmp r2, #44 ; 0x2c memcount++; 224d0: 02855001 addeq r5, r5, #1 224d4: e2888001 add r8, r8, #1 grp->gr_gid = grgid; /* * Determine number of members */ for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 224d8: e7d12008 ldrb r2, [r1, r8] 224dc: e3520000 cmp r2, #0 224e0: 1afffff9 bne 224cc } /* * Hack to produce (hopefully) a suitably-aligned array of pointers */ if (bufsize < (((memcount+1)*sizeof(char *)) + 15)) 224e4: e1a05105 lsl r5, r5, #2 224e8: e59d3004 ldr r3, [sp, #4] 224ec: e2855013 add r5, r5, #19 224f0: e1530005 cmp r3, r5 224f4: 3a000016 bcc 22554 return 0; grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); 224f8: e59d3008 ldr r3, [sp, #8] 224fc: e283300f add r3, r3, #15 22500: e3c3300f bic r3, r3, #15 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22504: 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); 22508: e584300c str r3, [r4, #12] /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 2250c: e59d300c ldr r3, [sp, #12] for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { if(*cp == ',') { *cp = '\0'; 22510: e1a00002 mov r0, r2 grp->gr_mem = (char **)(((uintptr_t)buffer + 15) & ~15); /* * Fill in pointer array */ grp->gr_mem[0] = grmem; 22514: e2833001 add r3, r3, #1 22518: e2822001 add r2, r2, #1 for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 2251c: ea000005 b 22538 if(*cp == ',') { 22520: e351002c cmp r1, #44 ; 0x2c *cp = '\0'; 22524: 05430001 strbeq r0, [r3, #-1] grp->gr_mem[memcount++] = cp + 1; 22528: 0594100c ldreq r1, [r4, #12] 2252c: 07813102 streq r3, [r1, r2, lsl #2] 22530: 02822001 addeq r2, r2, #1 22534: e2833001 add r3, r3, #1 /* * Fill in pointer array */ grp->gr_mem[0] = grmem; for (cp = grmem, memcount = 1 ; *cp != 0 ; cp++) { 22538: e5531001 ldrb r1, [r3, #-1] 2253c: e3510000 cmp r1, #0 22540: 1afffff6 bne 22520 if(*cp == ',') { *cp = '\0'; grp->gr_mem[memcount++] = cp + 1; } } grp->gr_mem[memcount] = NULL; 22544: e594300c ldr r3, [r4, #12] 22548: e3a00001 mov r0, #1 2254c: e7831102 str r1, [r3, r2, lsl #2] return 1; 22550: ea000000 b 22558 22554: e3a00000 mov r0, #0 <== NOT EXECUTED } 22558: e28dd014 add sp, sp, #20 2255c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 0002259c : FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 2259c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 225a0: e24dd014 sub sp, sp, #20 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225a4: e28d7008 add r7, sp, #8 225a8: e28d6004 add r6, sp, #4 FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 225ac: e58d2008 str r2, [sp, #8] 225b0: e58d3004 str r3, [sp, #4] int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225b4: e3a08000 mov r8, #0 225b8: e1a02007 mov r2, r7 225bc: e1a03006 mov r3, r6 225c0: e58d8000 str r8, [sp] FILE *fp, struct passwd *pwd, char *buffer, size_t bufsize ) { 225c4: e1a05000 mov r5, r0 225c8: e1a04001 mov r4, r1 int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225cc: ebffff5d bl 22348 225d0: e1500008 cmp r0, r8 225d4: 0a000038 beq 226bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) 225d8: e1a00005 mov r0, r5 225dc: e2841004 add r1, r4, #4 225e0: e1a02007 mov r2, r7 225e4: e1a03006 mov r3, r6 225e8: e58d8000 str r8, [sp] 225ec: ebffff55 bl 22348 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 225f0: e1500008 cmp r0, r8 225f4: 0a000030 beq 226bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) 225f8: e1a00005 mov r0, r5 225fc: e28d1010 add r1, sp, #16 22600: ebffff15 bl 2225c size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22604: e1500008 cmp r0, r8 22608: 0a00002b beq 226bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) 2260c: e1a00005 mov r0, r5 22610: e28d100c add r1, sp, #12 22614: ebffff10 bl 2225c size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22618: e1500008 cmp r0, r8 2261c: 0a000026 beq 226bc || !scanString(fp, &pwd->pw_passwd, &buffer, &bufsize, 0) || !scanInt(fp, &pwuid) || !scanInt(fp, &pwgid) || !scanString(fp, &pwd->pw_comment, &buffer, &bufsize, 0) 22620: e1a00005 mov r0, r5 22624: e284100c add r1, r4, #12 22628: e1a02007 mov r2, r7 2262c: e1a03006 mov r3, r6 22630: e58d8000 str r8, [sp] 22634: ebffff43 bl 22348 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22638: e1500008 cmp r0, r8 2263c: 0a00001e beq 226bc || !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) 22640: e1a00005 mov r0, r5 22644: e2841010 add r1, r4, #16 22648: e1a02007 mov r2, r7 2264c: e1a03006 mov r3, r6 22650: e58d8000 str r8, [sp] 22654: ebffff3b bl 22348 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22658: e1500008 cmp r0, r8 2265c: 0a000016 beq 226bc || !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) 22660: e1a00005 mov r0, r5 22664: e2841014 add r1, r4, #20 22668: e1a02007 mov r2, r7 2266c: e1a03006 mov r3, r6 22670: e58d8000 str r8, [sp] 22674: ebffff33 bl 22348 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 22678: e1500008 cmp r0, r8 2267c: 0a00000e beq 226bc || !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)) 22680: e1a00005 mov r0, r5 22684: e1a02007 mov r2, r7 22688: e1a03006 mov r3, r6 2268c: e3a05001 mov r5, #1 22690: e2841018 add r1, r4, #24 22694: e58d5000 str r5, [sp] 22698: ebffff2a bl 22348 size_t bufsize ) { int pwuid, pwgid; if (!scanString(fp, &pwd->pw_name, &buffer, &bufsize, 0) 2269c: e1500008 cmp r0, r8 226a0: 0a000005 beq 226bc || !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; 226a4: e1dd30bc ldrh r3, [sp, #12] 226a8: 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; 226ac: e1dd31b0 ldrh r3, [sp, #16] pwd->pw_gid = pwgid; 226b0: 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; 226b4: e1c430b8 strh r3, [r4, #8] pwd->pw_gid = pwgid; return 1; 226b8: ea000000 b 226c0 226bc: e3a00000 mov r0, #0 <== NOT EXECUTED } 226c0: e28dd014 add sp, sp, #20 226c4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 00022204 : int setgid( gid_t gid ) { _POSIX_types_Gid = gid; 22204: e59f300c ldr r3, [pc, #12] ; 22218 <== NOT EXECUTED 22208: e5933000 ldr r3, [r3] <== NOT EXECUTED 2220c: e1c303b4 strh r0, [r3, #52] ; 0x34 <== NOT EXECUTED return 0; } 22210: e3a00000 mov r0, #0 <== NOT EXECUTED 22214: e12fff1e bx lr <== NOT EXECUTED 22218: 000534b8 .word 0x000534b8 000227cc : return NULL; return &grent; } void setgrent(void) { 227cc: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 227d0: ebffffcb bl 22704 <== NOT EXECUTED if (group_fp != NULL) 227d4: e59f3020 ldr r3, [pc, #32] ; 227fc <== NOT EXECUTED 227d8: e5930000 ldr r0, [r3] <== NOT EXECUTED 227dc: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(group_fp); 227e0: 1b005a7a blne 391d0 <== NOT EXECUTED group_fp = fopen("/etc/group", "r"); 227e4: e59f0014 ldr r0, [pc, #20] ; 22800 <== NOT EXECUTED 227e8: e59f1014 ldr r1, [pc, #20] ; 22804 <== NOT EXECUTED 227ec: eb005c9a bl 39a5c <== NOT EXECUTED 227f0: e59f3004 ldr r3, [pc, #4] ; 227fc <== NOT EXECUTED 227f4: e5830000 str r0, [r3] <== NOT EXECUTED } 227f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 227fc: 00060978 .word 0x00060978 22800: 00057678 .word 0x00057678 22804: 000583f0 .word 0x000583f0 0002299c : return NULL; return &pwent; } void setpwent(void) { 2299c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED init_etc_passwd_group(); 229a0: ebffff57 bl 22704 <== NOT EXECUTED if (passwd_fp != NULL) 229a4: e59f3020 ldr r3, [pc, #32] ; 229cc <== NOT EXECUTED 229a8: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 229ac: e3500000 cmp r0, #0 <== NOT EXECUTED fclose(passwd_fp); 229b0: 1b005a06 blne 391d0 <== NOT EXECUTED passwd_fp = fopen("/etc/passwd", "r"); 229b4: e59f0014 ldr r0, [pc, #20] ; 229d0 <== NOT EXECUTED 229b8: e59f1014 ldr r1, [pc, #20] ; 229d4 <== NOT EXECUTED 229bc: eb005c26 bl 39a5c <== NOT EXECUTED 229c0: e59f3004 ldr r3, [pc, #4] ; 229cc <== NOT EXECUTED 229c4: e5830004 str r0, [r3, #4] <== NOT EXECUTED } 229c8: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED 229cc: 00060978 .word 0x00060978 229d0: 000575ca .word 0x000575ca 229d4: 000583f0 .word 0x000583f0 00005328 : int setuid( uid_t uid ) { _POSIX_types_Uid = uid; 5328: e59f300c ldr r3, [pc, #12] ; 533c <== NOT EXECUTED 532c: e5933000 ldr r3, [r3] <== NOT EXECUTED 5330: e1c303b2 strh r0, [r3, #50] ; 0x32 <== NOT EXECUTED return 0; } 5334: e3a00000 mov r0, #0 <== NOT EXECUTED 5338: e12fff1e bx lr <== NOT EXECUTED 533c: 000534b8 .word 0x000534b8 00002a34 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 2a34: e591203c ldr r2, [r1, #60] ; 0x3c <== NOT EXECUTED 2a38: e59f3050 ldr r3, [pc, #80] ; 2a90 <== NOT EXECUTED 2a3c: e0023003 and r3, r2, r3 <== NOT EXECUTED 2a40: e3530000 cmp r3, #0 <== NOT EXECUTED /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 2a44: e92d4030 push {r4, r5, lr} <== NOT EXECUTED 2a48: e1a04001 mov r4, r1 <== NOT EXECUTED 2a4c: 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)) { 2a50: 0a00000b beq 2a84 <== NOT EXECUTED rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 2a54: e3a01000 mov r1, #0 <== NOT EXECUTED 2a58: e1a02001 mov r2, r1 <== NOT EXECUTED 2a5c: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a60: eb0005fb bl 4254 <== NOT EXECUTED i = iproc (c, tty); 2a64: e1a01004 mov r1, r4 <== NOT EXECUTED 2a68: e1a00005 mov r0, r5 <== NOT EXECUTED 2a6c: ebffff8b bl 28a0 <== NOT EXECUTED 2a70: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_semaphore_release (tty->osem); 2a74: e5940018 ldr r0, [r4, #24] <== NOT EXECUTED 2a78: eb00063b bl 436c <== NOT EXECUTED } else { i = iproc (c, tty); } return i; } 2a7c: e1a00005 mov r0, r5 <== NOT EXECUTED 2a80: 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); 2a84: e1a00005 mov r0, r5 <== NOT EXECUTED } return i; } 2a88: 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); 2a8c: eaffff83 b 28a0 <== NOT EXECUTED 2a90: 00000e78 .word 0x00000e78 00006808 : int _STAT_NAME( const char *path, struct stat *buf ) { 6808: e92d4070 push {r4, r5, r6, lr} /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 680c: e2515000 subs r5, r1, #0 int _STAT_NAME( const char *path, struct stat *buf ) { 6810: e24dd018 sub sp, sp, #24 6814: e1a06000 mov r6, r0 /* * Check to see if we were passed a valid pointer. */ if ( !buf ) 6818: 1a000002 bne 6828 rtems_set_errno_and_return_minus_one( EFAULT ); 681c: eb00ca1e bl 3909c <__errno> 6820: e3a0300e mov r3, #14 6824: ea000018 b 688c status = rtems_filesystem_evaluate_path( path, strlen( path ), 6828: eb00e4a6 bl 3fac8 682c: e28d4004 add r4, sp, #4 6830: e1a01000 mov r1, r0 6834: e3a0c001 mov ip, #1 6838: e1a00006 mov r0, r6 683c: e3a02000 mov r2, #0 6840: e1a03004 mov r3, r4 6844: e58dc000 str ip, [sp] 6848: ebfffa3b bl 513c 0, &loc, _STAT_FOLLOW_LINKS ); if ( status != 0 ) 684c: e2501000 subs r1, r0, #0 6850: 1a00000e bne 6890 return -1; if ( !loc.handlers->fstat_h ){ 6854: e59d300c ldr r3, [sp, #12] 6858: e5933018 ldr r3, [r3, #24] 685c: e3530000 cmp r3, #0 6860: 1a00000c bne 6898 rtems_filesystem_freenode( &loc ); 6864: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 6868: e3530000 cmp r3, #0 <== NOT EXECUTED 686c: 0a000004 beq 6884 <== NOT EXECUTED 6870: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 6874: e3530000 cmp r3, #0 <== NOT EXECUTED 6878: 11a00004 movne r0, r4 <== NOT EXECUTED 687c: 11a0e00f movne lr, pc <== NOT EXECUTED 6880: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 6884: eb00ca04 bl 3909c <__errno> <== NOT EXECUTED 6888: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 688c: e5803000 str r3, [r0] 6890: e3e05000 mvn r5, #0 6894: ea000010 b 68dc /* * Zero out the stat structure so the various support * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); 6898: e3a02048 mov r2, #72 ; 0x48 689c: e1a00005 mov r0, r5 68a0: eb00d6b5 bl 3c37c status = (*loc.handlers->fstat_h)( &loc, buf ); 68a4: e1a01005 mov r1, r5 68a8: e59d300c ldr r3, [sp, #12] 68ac: e1a00004 mov r0, r4 68b0: e1a0e00f mov lr, pc 68b4: e593f018 ldr pc, [r3, #24] rtems_filesystem_freenode( &loc ); 68b8: e59d3010 ldr r3, [sp, #16] 68bc: e3530000 cmp r3, #0 * versions of stat don't have to. */ memset( buf, 0, sizeof(struct stat) ); status = (*loc.handlers->fstat_h)( &loc, buf ); 68c0: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 68c4: 0a000004 beq 68dc 68c8: e593301c ldr r3, [r3, #28] 68cc: e3530000 cmp r3, #0 68d0: 11a00004 movne r0, r4 68d4: 11a0e00f movne lr, pc 68d8: 112fff13 bxne r3 return status; } 68dc: e1a00005 mov r0, r5 68e0: e28dd018 add sp, sp, #24 68e4: e8bd8070 pop {r4, r5, r6, pc} 00023610 : */ extern rtems_chain_control rtems_filesystem_mount_table_control; int statvfs (const char *path, struct statvfs *sb) { 23610: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 23614: e24dd018 sub sp, sp, #24 <== NOT EXECUTED 23618: e1a05001 mov r5, r1 <== NOT EXECUTED 2361c: e1a06000 mov r6, r0 <== NOT EXECUTED * The root node of the mounted filesytem. * The node for the directory that the fileystem is mounted on. * The mount entry that is being refered to. */ if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x0, &loc, true ) ) 23620: eb007128 bl 3fac8 <== NOT EXECUTED 23624: e28d4004 add r4, sp, #4 <== NOT EXECUTED 23628: e1a01000 mov r1, r0 <== NOT EXECUTED 2362c: e3a0c001 mov ip, #1 <== NOT EXECUTED 23630: e1a00006 mov r0, r6 <== NOT EXECUTED 23634: e3a02000 mov r2, #0 <== NOT EXECUTED 23638: e1a03004 mov r3, r4 <== NOT EXECUTED 2363c: e58dc000 str ip, [sp] <== NOT EXECUTED 23640: ebff86bd bl 513c <== NOT EXECUTED 23644: e2501000 subs r1, r0, #0 <== NOT EXECUTED 23648: 1a000007 bne 2366c <== NOT EXECUTED return -1; mt_entry = loc.mt_entry; 2364c: e59d6014 ldr r6, [sp, #20] <== NOT EXECUTED fs_mount_root = &mt_entry->mt_fs_root; 23650: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 23654: e5933044 ldr r3, [r3, #68] ; 0x44 <== NOT EXECUTED 23658: e3530000 cmp r3, #0 <== NOT EXECUTED 2365c: 1a000004 bne 23674 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); 23660: eb00568d bl 3909c <__errno> <== NOT EXECUTED 23664: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 23668: e5803000 str r3, [r0] <== NOT EXECUTED 2366c: e3e05000 mvn r5, #0 <== NOT EXECUTED 23670: ea000010 b 236b8 <== NOT EXECUTED memset (sb, 0, sizeof (struct statvfs)); 23674: e3a02038 mov r2, #56 ; 0x38 <== NOT EXECUTED 23678: e1a00005 mov r0, r5 <== NOT EXECUTED 2367c: eb00633e bl 3c37c <== NOT EXECUTED result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 23680: e1a01005 mov r1, r5 <== NOT EXECUTED 23684: e5963028 ldr r3, [r6, #40] ; 0x28 <== NOT EXECUTED 23688: e286001c add r0, r6, #28 <== NOT EXECUTED 2368c: e1a0e00f mov lr, pc <== NOT EXECUTED 23690: e593f044 ldr pc, [r3, #68] ; 0x44 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 23694: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 23698: e3530000 cmp r3, #0 <== NOT EXECUTED if ( !fs_mount_root->ops->statvfs_h ) rtems_set_errno_and_return_minus_one( ENOTSUP ); memset (sb, 0, sizeof (struct statvfs)); result = ( fs_mount_root->ops->statvfs_h )( fs_mount_root, sb ); 2369c: e1a05000 mov r5, r0 <== NOT EXECUTED rtems_filesystem_freenode( &loc ); 236a0: 0a000004 beq 236b8 <== NOT EXECUTED 236a4: e593301c ldr r3, [r3, #28] <== NOT EXECUTED 236a8: e3530000 cmp r3, #0 <== NOT EXECUTED 236ac: 11a00004 movne r0, r4 <== NOT EXECUTED 236b0: 11a0e00f movne lr, pc <== NOT EXECUTED 236b4: 112fff13 bxne r3 <== NOT EXECUTED return result; } 236b8: e1a00005 mov r0, r5 <== NOT EXECUTED 236bc: e28dd018 add sp, sp, #24 <== NOT EXECUTED 236c0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED 000236c4 : int symlink( const char *actualpath, const char *sympath ) { 236c4: 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 ); 236c8: e5d13000 ldrb r3, [r1] 236cc: e353002f cmp r3, #47 ; 0x2f 236d0: 1353005c cmpne r3, #92 ; 0x5c int symlink( const char *actualpath, const char *sympath ) { 236d4: e24dd018 sub sp, sp, #24 236d8: 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 ); 236dc: 13a06000 movne r6, #0 236e0: 03a06001 moveq r6, #1 int symlink( const char *actualpath, const char *sympath ) { 236e4: 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 ); 236e8: 0a000001 beq 236f4 236ec: e3530000 cmp r3, #0 236f0: 1a000009 bne 2371c 236f4: e59f30f0 ldr r3, [pc, #240] ; 237ec 236f8: e593e000 ldr lr, [r3] 236fc: e28ee018 add lr, lr, #24 23700: e8be000f ldm lr!, {r0, r1, r2, r3} 23704: e1a0c00d mov ip, sp 23708: e8ac000f stmia ip!, {r0, r1, r2, r3} 2370c: e59e3000 ldr r3, [lr] 23710: e3a00001 mov r0, #1 23714: e58c3000 str r3, [ip] 23718: ea000008 b 23740 2371c: e59f30c8 ldr r3, [pc, #200] ; 237ec 23720: e593e000 ldr lr, [r3] 23724: e28ee004 add lr, lr, #4 23728: e8be000f ldm lr!, {r0, r1, r2, r3} 2372c: e1a0c00d mov ip, sp 23730: e8ac000f stmia ip!, {r0, r1, r2, r3} 23734: e59e3000 ldr r3, [lr] 23738: e58c3000 str r3, [ip] 2373c: e1a00006 mov r0, r6 if ( !loc.ops->evalformake_h ) { 23740: e59d300c ldr r3, [sp, #12] 23744: e5933004 ldr r3, [r3, #4] 23748: e3530000 cmp r3, #0 2374c: 0a000010 beq 23794 rtems_set_errno_and_return_minus_one( ENOTSUP ); } result = (*loc.ops->evalformake_h)( &sympath[i], &loc, &name_start ); 23750: e0850000 add r0, r5, r0 23754: e1a0100d mov r1, sp 23758: e28d2014 add r2, sp, #20 2375c: e1a0e00f mov lr, pc 23760: e12fff13 bx r3 if ( result != 0 ) 23764: 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 ); 23768: e1a0600d mov r6, sp if ( result != 0 ) 2376c: 1a00000b bne 237a0 return -1; if ( !loc.ops->symlink_h ) { 23770: e59d200c ldr r2, [sp, #12] 23774: e5923038 ldr r3, [r2, #56] ; 0x38 23778: e3530000 cmp r3, #0 2377c: 1a000009 bne 237a8 rtems_filesystem_freenode( &loc ); 23780: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 23784: e3530000 cmp r3, #0 <== NOT EXECUTED 23788: 11a0000d movne r0, sp <== NOT EXECUTED 2378c: 11a0e00f movne lr, pc <== NOT EXECUTED 23790: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 23794: eb005640 bl 3909c <__errno> <== NOT EXECUTED 23798: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 2379c: e5803000 str r3, [r0] <== NOT EXECUTED 237a0: e3e04000 mvn r4, #0 237a4: ea00000d b 237e0 } result = (*loc.ops->symlink_h)( &loc, actualpath, name_start); 237a8: e1a01004 mov r1, r4 237ac: e1a0000d mov r0, sp 237b0: e59d2014 ldr r2, [sp, #20] 237b4: e1a0e00f mov lr, pc 237b8: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); 237bc: e59d300c ldr r3, [sp, #12] 237c0: 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); 237c4: e1a04000 mov r4, r0 rtems_filesystem_freenode( &loc ); 237c8: 0a000004 beq 237e0 237cc: e593301c ldr r3, [r3, #28] 237d0: e3530000 cmp r3, #0 237d4: 11a0000d movne r0, sp 237d8: 11a0e00f movne lr, pc 237dc: 112fff13 bxne r3 return result; } 237e0: e1a00004 mov r0, r4 237e4: e28dd018 add sp, sp, #24 237e8: e8bd8070 pop {r4, r5, r6, pc} 237ec: 000534b8 .word 0x000534b8 0000f604 : int fd, int opt, struct termios *tp ) { switch (opt) { f604: e3510000 cmp r1, #0 int tcsetattr( int fd, int opt, struct termios *tp ) { f608: e92d4030 push {r4, r5, lr} f60c: e1a04002 mov r4, r2 f610: e1a05000 mov r5, r0 switch (opt) { f614: 0a00000a beq f644 f618: e3510001 cmp r1, #1 <== NOT EXECUTED f61c: 0a000003 beq f630 <== NOT EXECUTED default: rtems_set_errno_and_return_minus_one( ENOTSUP ); f620: eb0013e1 bl 145ac <__errno> <== NOT EXECUTED f624: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED f628: e5803000 str r3, [r0] <== NOT EXECUTED f62c: ea000009 b f658 <== NOT EXECUTED case TCSADRAIN: if (ioctl( fd, RTEMS_IO_TCDRAIN, NULL ) < 0) f630: e3a01003 mov r1, #3 <== NOT EXECUTED f634: e3a02000 mov r2, #0 <== NOT EXECUTED f638: eb000e16 bl 12e98 <== NOT EXECUTED f63c: e3500000 cmp r0, #0 <== NOT EXECUTED f640: ba000004 blt f658 <== NOT EXECUTED return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f644: e1a00005 mov r0, r5 f648: e1a02004 mov r2, r4 f64c: e3a01002 mov r1, #2 } } f650: e8bd4030 pop {r4, r5, lr} return -1; /* * Fall through to.... */ case TCSANOW: return ioctl( fd, RTEMS_IO_SET_ATTRIBUTES, tp ); f654: ea000e0f b 12e98 } } f658: e3e00000 mvn r0, #0 <== NOT EXECUTED f65c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED 0000c104 : #include int unlink( const char *path ) { c104: e92d4070 push {r4, r5, r6, lr} c108: e24dd02c sub sp, sp, #44 ; 0x2c c10c: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); c110: ebffd413 bl 1164 if ( parentpathlen == 0 ) c114: e2505000 subs r5, r0, #0 c118: 1a000019 bne c184 rtems_filesystem_get_start_loc( path, &i, &parentloc ); c11c: e5d63000 ldrb r3, [r6] c120: e353002f cmp r3, #47 ; 0x2f c124: 1353005c cmpne r3, #92 ; 0x5c c128: 0a000001 beq c134 c12c: e3530000 cmp r3, #0 <== NOT EXECUTED c130: 1a000009 bne c15c <== NOT EXECUTED c134: e59f3248 ldr r3, [pc, #584] ; c384 c138: e593e000 ldr lr, [r3] c13c: e28ee018 add lr, lr, #24 c140: e8be000f ldm lr!, {r0, r1, r2, r3} c144: e28dc018 add ip, sp, #24 c148: e8ac000f stmia ip!, {r0, r1, r2, r3} c14c: e59e3000 ldr r3, [lr] c150: e3a04000 mov r4, #0 c154: e58c3000 str r3, [ip] c158: ea000013 b c1ac c15c: e59f3220 ldr r3, [pc, #544] ; c384 <== NOT EXECUTED c160: e593e000 ldr lr, [r3] <== NOT EXECUTED c164: e28ee004 add lr, lr, #4 <== NOT EXECUTED c168: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED c16c: e28dc018 add ip, sp, #24 <== NOT EXECUTED c170: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED c174: e59e3000 ldr r3, [lr] <== NOT EXECUTED c178: e1a04005 mov r4, r5 <== NOT EXECUTED c17c: e58c3000 str r3, [ip] <== NOT EXECUTED c180: ea000009 b c1ac <== NOT EXECUTED else { result = rtems_filesystem_evaluate_path( path, parentpathlen, c184: e3a0c000 mov ip, #0 c188: e1a00006 mov r0, r6 c18c: e1a01005 mov r1, r5 c190: e3a02002 mov r2, #2 c194: e28d3018 add r3, sp, #24 c198: e58dc000 str ip, [sp] c19c: ebffd438 bl 1284 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) c1a0: e3500000 cmp r0, #0 c1a4: 1a000072 bne c374 c1a8: e3a04001 mov r4, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c1ac: e28de018 add lr, sp, #24 c1b0: e8be000f ldm lr!, {r0, r1, r2, r3} c1b4: e28dc004 add ip, sp, #4 c1b8: e8ac000f stmia ip!, {r0, r1, r2, r3} c1bc: e59e3000 ldr r3, [lr] name = path + parentpathlen; c1c0: e0865005 add r5, r6, r5 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; c1c4: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); c1c8: e1a00005 mov r0, r5 c1cc: eb0005d2 bl d91c c1d0: e1a01000 mov r1, r0 c1d4: e1a00005 mov r0, r5 c1d8: ebffd3d5 bl 1134 c1dc: e0856000 add r6, r5, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), c1e0: e1a00006 mov r0, r6 c1e4: eb0005cc bl d91c c1e8: e28d5004 add r5, sp, #4 c1ec: e3a0c000 mov ip, #0 c1f0: e1a01000 mov r1, r0 c1f4: e1a0200c mov r2, ip c1f8: e1a00006 mov r0, r6 c1fc: e1a03005 mov r3, r5 c200: e58dc000 str ip, [sp] c204: ebffd3e6 bl 11a4 0, &loc, false ); if ( result != 0 ) { c208: e3500000 cmp r0, #0 c20c: 0a00000b beq c240 if ( free_parentloc ) c210: e3540000 cmp r4, #0 c214: 0a000056 beq c374 rtems_filesystem_freenode( &parentloc ); c218: e59d3024 ldr r3, [sp, #36] ; 0x24 c21c: e3530000 cmp r3, #0 c220: 0a000053 beq c374 c224: e593301c ldr r3, [r3, #28] c228: e3530000 cmp r3, #0 c22c: 0a000050 beq c374 c230: e28d0018 add r0, sp, #24 c234: e1a0e00f mov lr, pc c238: e12fff13 bx r3 c23c: ea00004c b c374 return -1; } if ( !loc.ops->node_type_h ) { c240: e59d2010 ldr r2, [sp, #16] c244: e5923010 ldr r3, [r2, #16] c248: e3530000 cmp r3, #0 c24c: 0a00001c beq c2c4 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 ) { c250: e1a00005 mov r0, r5 c254: e1a0e00f mov lr, pc c258: e12fff13 bx r3 c25c: e3500001 cmp r0, #1 c260: e59d2010 ldr r2, [sp, #16] c264: 1a000013 bne c2b8 rtems_filesystem_freenode( &loc ); c268: e3520000 cmp r2, #0 c26c: 0a000004 beq c284 c270: e592301c ldr r3, [r2, #28] c274: e3530000 cmp r3, #0 c278: 11a00005 movne r0, r5 c27c: 11a0e00f movne lr, pc c280: 112fff13 bxne r3 if ( free_parentloc ) c284: e3540000 cmp r4, #0 c288: 0a000007 beq c2ac rtems_filesystem_freenode( &parentloc ); c28c: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c290: e3530000 cmp r3, #0 <== NOT EXECUTED c294: 0a000004 beq c2ac <== NOT EXECUTED c298: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c29c: e3530000 cmp r3, #0 <== NOT EXECUTED c2a0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c2a4: 11a0e00f movne lr, pc <== NOT EXECUTED c2a8: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); c2ac: eb0001a9 bl c958 <__errno> c2b0: e3a03015 mov r3, #21 c2b4: ea000013 b c308 } if ( !loc.ops->unlink_h ) { c2b8: e592300c ldr r3, [r2, #12] c2bc: e3530000 cmp r3, #0 c2c0: 1a000012 bne c310 rtems_filesystem_freenode( &loc ); c2c4: e592301c ldr r3, [r2, #28] <== NOT EXECUTED c2c8: e3530000 cmp r3, #0 <== NOT EXECUTED c2cc: 11a00005 movne r0, r5 <== NOT EXECUTED c2d0: 11a0e00f movne lr, pc <== NOT EXECUTED c2d4: 112fff13 bxne r3 <== NOT EXECUTED if ( free_parentloc ) c2d8: e3540000 cmp r4, #0 <== NOT EXECUTED c2dc: 0a000007 beq c300 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); c2e0: e59d3024 ldr r3, [sp, #36] ; 0x24 <== NOT EXECUTED c2e4: e3530000 cmp r3, #0 <== NOT EXECUTED c2e8: 0a000004 beq c300 <== NOT EXECUTED c2ec: e593301c ldr r3, [r3, #28] <== NOT EXECUTED c2f0: e3530000 cmp r3, #0 <== NOT EXECUTED c2f4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED c2f8: 11a0e00f movne lr, pc <== NOT EXECUTED c2fc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); c300: eb000194 bl c958 <__errno> <== NOT EXECUTED c304: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED c308: e5803000 str r3, [r0] c30c: ea000018 b c374 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); c310: e28d0018 add r0, sp, #24 c314: e1a01005 mov r1, r5 c318: e1a0e00f mov lr, pc c31c: e12fff13 bx r3 rtems_filesystem_freenode( &loc ); c320: e59d3010 ldr r3, [sp, #16] c324: 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 ); c328: e1a06000 mov r6, r0 rtems_filesystem_freenode( &loc ); c32c: 0a000004 beq c344 c330: e593301c ldr r3, [r3, #28] c334: e3530000 cmp r3, #0 c338: 11a00005 movne r0, r5 c33c: 11a0e00f movne lr, pc c340: 112fff13 bxne r3 if ( free_parentloc ) c344: e3540000 cmp r4, #0 c348: 0a00000a beq c378 rtems_filesystem_freenode( &parentloc ); c34c: e59d3024 ldr r3, [sp, #36] ; 0x24 c350: e3530000 cmp r3, #0 c354: 0a000007 beq c378 c358: e593301c ldr r3, [r3, #28] c35c: e3530000 cmp r3, #0 c360: 0a000004 beq c378 c364: e28d0018 add r0, sp, #24 c368: e1a0e00f mov lr, pc c36c: e12fff13 bx r3 c370: ea000000 b c378 c374: e3e06000 mvn r6, #0 return result; } c378: e1a00006 mov r0, r6 c37c: e28dd02c add sp, sp, #44 ; 0x2c c380: e8bd8070 pop {r4, r5, r6, pc} c384: 00018538 .word 0x00018538 000086c0 : */ int unmount( const char *path ) { 86c0: e92d4030 push {r4, r5, lr} 86c4: e24dd018 sub sp, sp, #24 86c8: 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 ) ) 86cc: eb00dcfd bl 3fac8 86d0: e28d4004 add r4, sp, #4 86d4: e1a01000 mov r1, r0 86d8: e3a0c001 mov ip, #1 86dc: e1a00005 mov r0, r5 86e0: e3a02000 mov r2, #0 86e4: e1a03004 mov r3, r4 86e8: e58dc000 str ip, [sp] 86ec: ebfff292 bl 513c 86f0: e3500000 cmp r0, #0 86f4: 1a000057 bne 8858 return -1; mt_entry = loc.mt_entry; 86f8: e59d5014 ldr r5, [sp, #20] fs_mount_loc = &mt_entry->mt_point_node; fs_root_loc = &mt_entry->mt_fs_root; 86fc: e59d3004 ldr r3, [sp, #4] 8700: e595201c ldr r2, [r5, #28] 8704: e1520003 cmp r2, r3 8708: e59d3010 ldr r3, [sp, #16] 870c: 0a000009 beq 8738 /* * 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 ); 8710: e3530000 cmp r3, #0 8714: 0a000004 beq 872c 8718: e593301c ldr r3, [r3, #28] 871c: e3530000 cmp r3, #0 8720: 11a00004 movne r0, r4 8724: 11a0e00f movne lr, pc 8728: 112fff13 bxne r3 rtems_set_errno_and_return_minus_one( EACCES ); 872c: eb00c25a bl 3909c <__errno> 8730: e3a0300d mov r3, #13 8734: ea000023 b 87c8 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 8738: e3530000 cmp r3, #0 873c: 0a000004 beq 8754 8740: e593301c ldr r3, [r3, #28] 8744: e3530000 cmp r3, #0 8748: 11a00004 movne r0, r4 874c: 11a0e00f movne lr, pc 8750: 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; 8754: e5953014 ldr r3, [r5, #20] 8758: e5933028 ldr r3, [r3, #40] ; 0x28 875c: e3530000 cmp r3, #0 8760: 0a000003 beq 8774 fs_root_loc = &mt_entry->mt_fs_root; 8764: e5953028 ldr r3, [r5, #40] ; 0x28 8768: e593302c ldr r3, [r3, #44] ; 0x2c 876c: e3530000 cmp r3, #0 8770: 1a000002 bne 8780 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 ); 8774: eb00c248 bl 3909c <__errno> <== NOT EXECUTED 8778: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 877c: ea000011 b 87c8 <== 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 ) 8780: e59f30f0 ldr r3, [pc, #240] ; 8878 8784: e5933000 ldr r3, [r3] 8788: e5933014 ldr r3, [r3, #20] 878c: 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; 8790: 159f20e4 ldrne r2, [pc, #228] ; 887c 8794: 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 ) 8798: 1a000005 bne 87b4 879c: ea000007 b 87c0 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; 87a0: e5930018 ldr r0, [r3, #24] 87a4: e595102c ldr r1, [r5, #44] ; 0x2c 87a8: e1500001 cmp r0, r1 87ac: 0a000003 beq 87c0 * 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 ) { 87b0: e5933000 ldr r3, [r3] 87b4: e1530002 cmp r3, r2 87b8: 1afffff8 bne 87a0 87bc: ea000028 b 8864 * 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 ); 87c0: eb00c235 bl 3909c <__errno> 87c4: e3a03010 mov r3, #16 87c8: e5803000 str r3, [r0] 87cc: ea000021 b 8858 * 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 ) 87d0: e5953014 ldr r3, [r5, #20] 87d4: e1a00005 mov r0, r5 87d8: e1a0e00f mov lr, pc 87dc: e593f028 ldr pc, [r3, #40] ; 0x28 87e0: e2504000 subs r4, r0, #0 87e4: 1a00001b bne 8858 * 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){ 87e8: e5953028 ldr r3, [r5, #40] ; 0x28 87ec: e1a00005 mov r0, r5 87f0: e1a0e00f mov lr, pc 87f4: e593f02c ldr pc, [r3, #44] ; 0x2c 87f8: e3500000 cmp r0, #0 87fc: 0a000007 beq 8820 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 8800: e1a00005 mov r0, r5 <== NOT EXECUTED 8804: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 8808: e1a0e00f mov lr, pc <== NOT EXECUTED 880c: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 8810: e3500000 cmp r0, #0 <== NOT EXECUTED 8814: 0a00000f beq 8858 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 8818: e1a00004 mov r0, r4 <== NOT EXECUTED 881c: eb00047b bl 9a10 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 8820: e1a00005 mov r0, r5 8824: eb00053e bl 9d24 <_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 ); 8828: e5953014 ldr r3, [r5, #20] 882c: e3530000 cmp r3, #0 8830: 0a000004 beq 8848 8834: e593301c ldr r3, [r3, #28] 8838: e3530000 cmp r3, #0 883c: 12850008 addne r0, r5, #8 8840: 11a0e00f movne lr, pc 8844: 112fff13 bxne r3 free( mt_entry ); 8848: e1a00005 mov r0, r5 884c: ebfff26d bl 5208 8850: e3a00000 mov r0, #0 return 0; 8854: ea000000 b 885c 8858: e3e00000 mvn r0, #0 } 885c: e28dd018 add sp, sp, #24 8860: 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 ) 8864: e1a00005 mov r0, r5 8868: ebfff314 bl 54c0 886c: e3500001 cmp r0, #1 8870: 1affffd6 bne 87d0 8874: eaffffd1 b 87c0 8878: 000534b8 .word 0x000534b8 887c: 00060ca8 .word 0x00060ca8 00023880 : int utime( const char *path, const struct utimbuf *times ) { 23880: e92d4070 push {r4, r5, r6, lr} 23884: e24dd018 sub sp, sp, #24 23888: e1a05001 mov r5, r1 2388c: 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 ) ) 23890: eb00708c bl 3fac8 23894: e28d4004 add r4, sp, #4 23898: e1a01000 mov r1, r0 2389c: e3a0c001 mov ip, #1 238a0: e1a00006 mov r0, r6 238a4: e3a02000 mov r2, #0 238a8: e1a03004 mov r3, r4 238ac: e58dc000 str ip, [sp] 238b0: ebff8621 bl 513c 238b4: e3500000 cmp r0, #0 238b8: 1a00000b bne 238ec return -1; if ( !temp_loc.ops->utime_h ){ 238bc: e59d2010 ldr r2, [sp, #16] 238c0: e5923030 ldr r3, [r2, #48] ; 0x30 238c4: e3530000 cmp r3, #0 238c8: 1a000009 bne 238f4 rtems_filesystem_freenode( &temp_loc ); 238cc: e592301c ldr r3, [r2, #28] <== NOT EXECUTED 238d0: e3530000 cmp r3, #0 <== NOT EXECUTED 238d4: 11a00004 movne r0, r4 <== NOT EXECUTED 238d8: 11a0e00f movne lr, pc <== NOT EXECUTED 238dc: 112fff13 bxne r3 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTSUP ); 238e0: eb0055ed bl 3909c <__errno> <== NOT EXECUTED 238e4: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 238e8: e5803000 str r3, [r0] <== NOT EXECUTED 238ec: e3e05000 mvn r5, #0 238f0: ea00000c b 23928 } result = (*temp_loc.ops->utime_h)( &temp_loc, times->actime, times->modtime ); 238f4: e8950006 ldm r5, {r1, r2} 238f8: e1a00004 mov r0, r4 238fc: e1a0e00f mov lr, pc 23900: e12fff13 bx r3 rtems_filesystem_freenode( &temp_loc ); 23904: e59d3010 ldr r3, [sp, #16] 23908: 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 ); 2390c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 23910: 0a000004 beq 23928 23914: e593301c ldr r3, [r3, #28] 23918: e3530000 cmp r3, #0 2391c: 11a00004 movne r0, r4 23920: 11a0e00f movne lr, pc 23924: 112fff13 bxne r3 return result; } 23928: e1a00005 mov r0, r5 2392c: e28dd018 add sp, sp, #24 23930: e8bd8070 pop {r4, r5, r6, pc} 00017d20 : ) { ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17d20: e59f30b0 ldr r3, [pc, #176] ; 17dd8 17d24: e5933000 ldr r3, [r3] 17d28: e1500003 cmp r0, r3 ssize_t write( int fd, const void *buffer, size_t count ) { 17d2c: e92d4070 push {r4, r5, r6, lr} 17d30: e1a05001 mov r5, r1 ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 17d34: 2a000005 bcs 17d50 iop = rtems_libio_iop( fd ); 17d38: e59f309c ldr r3, [pc, #156] ; 17ddc 17d3c: e5934000 ldr r4, [r3] 17d40: e0844300 add r4, r4, r0, lsl #6 rtems_libio_check_is_open( iop ); 17d44: e5943014 ldr r3, [r4, #20] 17d48: e3130c01 tst r3, #256 ; 0x100 17d4c: 1a000002 bne 17d5c 17d50: ebffd300 bl c958 <__errno> <== NOT EXECUTED 17d54: e3a03009 mov r3, #9 <== NOT EXECUTED 17d58: ea00000f b 17d9c <== NOT EXECUTED rtems_libio_check_buffer( buffer ); 17d5c: e3510000 cmp r1, #0 17d60: 0a000004 beq 17d78 rtems_libio_check_count( count ); 17d64: e3520000 cmp r2, #0 17d68: 01a00002 moveq r0, r2 17d6c: 08bd8070 popeq {r4, r5, r6, pc} rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 17d70: e3130004 tst r3, #4 17d74: 1a000002 bne 17d84 17d78: ebffd2f6 bl c958 <__errno> <== NOT EXECUTED 17d7c: e3a03016 mov r3, #22 <== NOT EXECUTED 17d80: ea000005 b 17d9c <== NOT EXECUTED /* * Now process the write() request. */ if ( !iop->handlers->write_h ) 17d84: e594303c ldr r3, [r4, #60] ; 0x3c 17d88: e593300c ldr r3, [r3, #12] 17d8c: e3530000 cmp r3, #0 17d90: 1a000004 bne 17da8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 17d94: ebffd2ef bl c958 <__errno> <== NOT EXECUTED 17d98: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 17d9c: e5803000 str r3, [r0] <== NOT EXECUTED 17da0: e3e00000 mvn r0, #0 <== NOT EXECUTED 17da4: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED rc = (*iop->handlers->write_h)( iop, buffer, count ); 17da8: e1a00004 mov r0, r4 17dac: e1a0e00f mov lr, pc 17db0: e12fff13 bx r3 if ( rc > 0 ) 17db4: e3500000 cmp r0, #0 17db8: d8bd8070 pople {r4, r5, r6, pc} iop->offset += rc; 17dbc: e284600c add r6, r4, #12 17dc0: e8960060 ldm r6, {r5, r6} 17dc4: e0952000 adds r2, r5, r0 17dc8: e0a63fc0 adc r3, r6, r0, asr #31 17dcc: e584200c str r2, [r4, #12] 17dd0: e5843010 str r3, [r4, #16] return rc; } 17dd4: e8bd8070 pop {r4, r5, r6, pc} 17dd8: 000183a0 .word 0x000183a0 17ddc: 00019b84 .word 0x00019b84 00005480 : int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5480: e59f3164 ldr r3, [pc, #356] ; 55ec 5484: e5933000 ldr r3, [r3] 5488: e1500003 cmp r0, r3 ssize_t writev( int fd, const struct iovec *iov, int iovcnt ) { 548c: e92d49f0 push {r4, r5, r6, r7, r8, fp, lr} 5490: e1a08002 mov r8, r2 int bytes; rtems_libio_t *iop; ssize_t old; bool all_zeros; rtems_libio_check_fd( fd ); 5494: 2a000005 bcs 54b0 iop = rtems_libio_iop( fd ); 5498: e59f3150 ldr r3, [pc, #336] ; 55f0 549c: e5936000 ldr r6, [r3] 54a0: e0866300 add r6, r6, r0, lsl #6 rtems_libio_check_is_open( iop ); 54a4: e5963014 ldr r3, [r6, #20] 54a8: e3130c01 tst r3, #256 ; 0x100 54ac: 1a000002 bne 54bc 54b0: eb002652 bl ee00 <__errno> 54b4: e3a03009 mov r3, #9 54b8: ea000025 b 5554 rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 54bc: e3130004 tst r3, #4 54c0: 0a000021 beq 554c /* * Argument validation on IO vector */ if ( !iov ) 54c4: e3510000 cmp r1, #0 54c8: 0a00001f beq 554c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt <= 0 ) 54cc: e3520000 cmp r2, #0 54d0: da00001d ble 554c rtems_set_errno_and_return_minus_one( EINVAL ); if ( iovcnt > IOV_MAX ) 54d4: e3520b01 cmp r2, #1024 ; 0x400 54d8: ca00001b bgt 554c rtems_set_errno_and_return_minus_one( EINVAL ); if ( !iop->handlers->write_h ) 54dc: e596303c ldr r3, [r6, #60] ; 0x3c 54e0: e593300c ldr r3, [r3, #12] 54e4: e3530000 cmp r3, #0 54e8: 1a000002 bne 54f8 rtems_set_errno_and_return_minus_one( ENOTSUP ); 54ec: eb002643 bl ee00 <__errno> <== NOT EXECUTED 54f0: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 54f4: ea000016 b 5554 <== NOT EXECUTED 54f8: e3a03000 mov r3, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 54fc: e59fc0f0 ldr ip, [pc, #240] ; 55f4 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 ); 5500: e1a05001 mov r5, r1 5504: e1a02001 mov r2, r1 5508: e3a07001 mov r7, #1 550c: 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 ) 5510: e5921000 ldr r1, [r2] 5514: 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++ ) { 5518: e2833001 add r3, r3, #1 if ( !iov[v].iov_base ) 551c: 0a00000a beq 554c 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 ) 5520: e5920004 ldr r0, [r2, #4] all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; 5524: e0841000 add r1, r4, r0 if ( total < old || total > SSIZE_MAX ) 5528: e1510004 cmp r1, r4 552c: a3a04000 movge r4, #0 5530: b3a04001 movlt r4, #1 5534: e151000c cmp r1, ip 5538: 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 ) 553c: e3500000 cmp r0, #0 5540: 13a07000 movne r7, #0 all_zeros = false; /* check for wrap */ old = total; total += iov[v].iov_len; if ( total < old || total > SSIZE_MAX ) 5544: e3540000 cmp r4, #0 5548: 0a000003 beq 555c rtems_set_errno_and_return_minus_one( EINVAL ); 554c: eb00262b bl ee00 <__errno> 5550: e3a03016 mov r3, #22 5554: e5803000 str r3, [r0] 5558: ea000011 b 55a4 * 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++ ) { 555c: e1530008 cmp r3, r8 5560: e2822008 add r2, r2, #8 5564: b1a04001 movlt r4, r1 5568: baffffe8 blt 5510 } /* * A writev with all zeros is supposed to have no effect per OpenGroup. */ if ( all_zeros == true ) { 556c: e3570000 cmp r7, #0 <== NOT EXECUTED 5570: 1a00001b bne 55e4 <== NOT EXECUTED 5574: e1a04007 mov r4, r7 <== NOT EXECUTED /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5578: e5952004 ldr r2, [r5, #4] <== NOT EXECUTED 557c: e3520000 cmp r2, #0 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 5580: e2877001 add r7, r7, #1 <== NOT EXECUTED /* all zero lengths has no effect */ if ( iov[v].iov_len == 0 ) 5584: 0a000013 beq 55d8 <== NOT EXECUTED continue; bytes = (*iop->handlers->write_h)( iop, iov[v].iov_base, iov[v].iov_len ); 5588: e5951000 ldr r1, [r5] <== NOT EXECUTED 558c: e596303c ldr r3, [r6, #60] ; 0x3c <== NOT EXECUTED 5590: e1a00006 mov r0, r6 <== NOT EXECUTED 5594: e1a0e00f mov lr, pc <== NOT EXECUTED 5598: e593f00c ldr pc, [r3, #12] <== NOT EXECUTED if ( bytes < 0 ) 559c: e3500000 cmp r0, #0 <== NOT EXECUTED 55a0: aa000001 bge 55ac <== NOT EXECUTED 55a4: e3e04000 mvn r4, #0 55a8: ea00000d b 55e4 return -1; if ( bytes > 0 ) { 55ac: 0a000006 beq 55cc <== NOT EXECUTED iop->offset += bytes; 55b0: e286c00c add ip, r6, #12 <== NOT EXECUTED 55b4: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED 55b8: e09b2000 adds r2, fp, r0 <== NOT EXECUTED 55bc: e0ac3fc0 adc r3, ip, r0, asr #31 <== NOT EXECUTED 55c0: e586200c str r2, [r6, #12] <== NOT EXECUTED 55c4: e5863010 str r3, [r6, #16] <== NOT EXECUTED total += bytes; 55c8: e0844000 add r4, r4, r0 <== NOT EXECUTED } if (bytes != iov[ v ].iov_len) 55cc: e5953004 ldr r3, [r5, #4] <== NOT EXECUTED 55d0: e1500003 cmp r0, r3 <== NOT EXECUTED 55d4: 1a000002 bne 55e4 <== NOT EXECUTED } /* * Now process the writev(). */ for ( total=0, v=0 ; v < iovcnt ; v++ ) { 55d8: e1570008 cmp r7, r8 <== NOT EXECUTED 55dc: e2855008 add r5, r5, #8 <== NOT EXECUTED 55e0: baffffe4 blt 5578 <== NOT EXECUTED if (bytes != iov[ v ].iov_len) break; } return total; } 55e4: e1a00004 mov r0, r4 55e8: e8bd89f0 pop {r4, r5, r6, r7, r8, fp, pc} 55ec: 0001c0b0 .word 0x0001c0b0 55f0: 0001ecd8 .word 0x0001ecd8 55f4: 00007fff .word 0x00007fff