=============================================================================== 00008ccc : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 8ccc: e5902000 ldr r2, [r0] 8cd0: e592204c ldr r2, [r2, #76] ; 0x4c ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 8cd4: e5903010 ldr r3, [r0, #16] switch( node->type ) { 8cd8: 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; 8cdc: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 8ce0: e3520006 cmp r2, #6 8ce4: 979ff102 ldrls pc, [pc, r2, lsl #2] 8ce8: ea000010 b 8d30 <== NOT EXECUTED 8cec: 00008d08 .word 0x00008d08 <== NOT EXECUTED 8cf0: 00008d10 .word 0x00008d10 <== NOT EXECUTED 8cf4: 00008d18 .word 0x00008d18 <== NOT EXECUTED 8cf8: 00008d18 .word 0x00008d18 <== NOT EXECUTED 8cfc: 00008d20 .word 0x00008d20 <== NOT EXECUTED 8d00: 00008d20 .word 0x00008d20 <== NOT EXECUTED 8d04: 00008d28 .word 0x00008d28 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 8d08: e593300c ldr r3, [r3, #12] 8d0c: ea000006 b 8d2c break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 8d10: e59f3020 ldr r3, [pc, #32] ; 8d38 8d14: ea000004 b 8d2c break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 8d18: e59f301c ldr r3, [pc, #28] ; 8d3c 8d1c: ea000002 b 8d2c break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 8d20: e5933008 ldr r3, [r3, #8] 8d24: ea000000 b 8d2c break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 8d28: e5933010 ldr r3, [r3, #16] 8d2c: e5803008 str r3, [r0, #8] break; } return 0; } 8d30: e3a00000 mov r0, #0 8d34: e12fff1e bx lr =============================================================================== 00008dcc : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8dcc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 8dd0: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8dd4: e24dd040 sub sp, sp, #64 ; 0x40 8dd8: e58d0000 str r0, [sp] 8ddc: e1a06001 mov r6, r1 8de0: e1a08002 mov r8, r2 8de4: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8de8: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 8dec: 03a09001 moveq r9, #1 * 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 ); 8df0: 028da004 addeq sl, sp, #4 char token[ IMFS_NAME_MAX + 1 ]; rtems_filesystem_location_info_t newloc; IMFS_jnode_t *node; int result; if ( !rtems_libio_is_valid_perms( flags ) ) { 8df4: 0a000057 beq 8f58 rtems_set_errno_and_return_minus_one( EIO ); 8df8: eb000c86 bl c018 <__errno> <== NOT EXECUTED 8dfc: e3a03005 mov r3, #5 <== NOT EXECUTED 8e00: ea00007e b 9000 <== NOT EXECUTED * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 8e04: e59d2000 ldr r2, [sp] 8e08: e28d303c add r3, sp, #60 ; 0x3c 8e0c: e0820007 add r0, r2, r7 8e10: e1a01006 mov r1, r6 8e14: e1a0200a mov r2, sl 8e18: eb0001ae bl 94d8 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8e1c: e5943000 ldr r3, [r4] 8e20: 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 ); 8e24: e1a09000 mov r9, r0 pathnamelen -= len; 8e28: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8e2c: 0a000041 beq 8f38 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8e30: e3500000 cmp r0, #0 8e34: 0a000006 beq 8e54 if ( node->type == IMFS_DIRECTORY ) 8e38: e595104c ldr r1, [r5, #76] ; 0x4c 8e3c: e3510001 cmp r1, #1 8e40: 1a000003 bne 8e54 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8e44: e1a00004 mov r0, r4 8e48: ebffffbc bl 8d40 8e4c: e3500000 cmp r0, #0 8e50: 0a000068 beq 8ff8 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8e54: 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; 8e58: e06b6006 rsb r6, fp, r6 i += len; 8e5c: e087700b add r7, r7, 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; 8e60: e5945000 ldr r5, [r4] switch( type ) { 8e64: 0a000014 beq 8ebc 8e68: e3590004 cmp r9, #4 8e6c: 0a000036 beq 8f4c 8e70: e3590002 cmp r9, #2 8e74: 1a000037 bne 8f58 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8e78: e59fc194 ldr ip, [pc, #404] ; 9014 8e7c: e59c3000 ldr r3, [ip] 8e80: e5933018 ldr r3, [r3, #24] 8e84: e1550003 cmp r5, r3 8e88: 0a000032 beq 8f58 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 8e8c: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 8e90: e59e301c ldr r3, [lr, #28] 8e94: 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; 8e98: 028dc028 addeq ip, sp, #40 ; 0x28 8e9c: 028ee008 addeq lr, lr, #8 8ea0: 0a000037 beq 8f84 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 8ea4: e5955008 ldr r5, [r5, #8] 8ea8: e3550000 cmp r5, #0 8eac: 1a000024 bne 8f44 rtems_set_errno_and_return_minus_one( ENOENT ); 8eb0: eb000c58 bl c018 <__errno> 8eb4: e5809000 str r9, [r0] 8eb8: ea000051 b 9004 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8ebc: e595304c ldr r3, [r5, #76] ; 0x4c 8ec0: e3530003 cmp r3, #3 8ec4: 1a000004 bne 8edc IMFS_evaluate_hard_link( pathloc, 0 ); 8ec8: e1a00004 mov r0, r4 8ecc: e3a01000 mov r1, #0 8ed0: ebffffaa bl 8d80 node = pathloc->node_access; 8ed4: e5945000 ldr r5, [r4] 8ed8: ea000008 b 8f00 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 8edc: e3530004 cmp r3, #4 8ee0: 1a000006 bne 8f00 result = IMFS_evaluate_sym_link( pathloc, 0 ); 8ee4: e1a00004 mov r0, r4 8ee8: e3a01000 mov r1, #0 8eec: eb000049 bl 9018 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 8ef0: e3700001 cmn r0, #1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8ef4: e1a0b000 mov fp, r0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 8ef8: e5945000 ldr r5, [r4] if ( result == -1 ) 8efc: 0a000041 beq 9008 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8f00: e595304c ldr r3, [r5, #76] ; 0x4c 8f04: e3530001 cmp r3, #1 8f08: 0a000002 beq 8f18 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8f0c: eb000c41 bl c018 <__errno> 8f10: e3a03014 mov r3, #20 8f14: ea000039 b 9000 /* * 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 ) { 8f18: e595e05c ldr lr, [r5, #92] ; 0x5c 8f1c: e35e0000 cmp lr, #0 8f20: 1a000015 bne 8f7c } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8f24: e1a00005 mov r0, r5 8f28: e1a0100a mov r1, sl 8f2c: eb000149 bl 9458 if ( !node ) 8f30: e2505000 subs r5, r0, #0 8f34: 1a000002 bne 8f44 rtems_set_errno_and_return_minus_one( ENOENT ); 8f38: eb000c36 bl c018 <__errno> 8f3c: e3a03002 mov r3, #2 8f40: ea00002e b 9000 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 8f44: e5845000 str r5, [r4] 8f48: ea000002 b 8f58 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8f4c: eb000c31 bl c018 <__errno> 8f50: e3a0305b mov r3, #91 ; 0x5b 8f54: ea000029 b 9000 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8f58: e3590004 cmp r9, #4 8f5c: 13590000 cmpne r9, #0 8f60: 1affffa7 bne 8e04 * 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 ) { 8f64: e595304c ldr r3, [r5, #76] ; 0x4c 8f68: e3530001 cmp r3, #1 8f6c: 1a000019 bne 8fd8 if ( node->info.directory.mt_fs != NULL ) { 8f70: e595e05c ldr lr, [r5, #92] ; 0x5c 8f74: e35e0000 cmp lr, #0 8f78: 0a000016 beq 8fd8 newloc = node->info.directory.mt_fs->mt_fs_root; 8f7c: e28dc028 add ip, sp, #40 ; 0x28 8f80: e28ee01c add lr, lr, #28 8f84: e8be000f ldm lr!, {r0, r1, r2, r3} 8f88: e8ac000f stmia ip!, {r0, r1, r2, r3} 8f8c: e59ee000 ldr lr, [lr] 8f90: e58ce000 str lr, [ip] *pathloc = newloc; 8f94: e28dc028 add ip, sp, #40 ; 0x28 8f98: e8bc000f ldm ip!, {r0, r1, r2, r3} 8f9c: e1a0c004 mov ip, r4 8fa0: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8fa4: e59d103c ldr r1, [sp, #60] ; 0x3c 8fa8: e59d2000 ldr r2, [sp] */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 8fac: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8fb0: e0610007 rsb r0, r1, r7 8fb4: e0820000 add r0, r2, r0 8fb8: e594c00c ldr ip, [r4, #12] 8fbc: e0861001 add r1, r6, r1 8fc0: e1a02008 mov r2, r8 8fc4: e1a03004 mov r3, r4 8fc8: e1a0e00f mov lr, pc 8fcc: e59cf000 ldr pc, [ip] 8fd0: e1a0b000 mov fp, r0 8fd4: ea00000b b 9008 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8fd8: e1a00004 mov r0, r4 8fdc: ebffff3a bl 8ccc /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8fe0: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8fe4: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8fe8: e1a00004 mov r0, r4 8fec: ebffff53 bl 8d40 8ff0: e3500000 cmp r0, #0 8ff4: 1a000003 bne 9008 rtems_set_errno_and_return_minus_one( EACCES ); 8ff8: eb000c06 bl c018 <__errno> 8ffc: e3a0300d mov r3, #13 9000: e5803000 str r3, [r0] 9004: e3e0b000 mvn fp, #0 return result; } 9008: e1a0000b mov r0, fp 900c: e28dd040 add sp, sp, #64 ; 0x40 9010: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00009154 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 9154: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 9158: e24dd03c sub sp, sp, #60 ; 0x3c 915c: e1a07000 mov r7, r0 9160: e1a04001 mov r4, r1 9164: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 9168: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 916c: eb000f93 bl cfc0 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 9170: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 9174: 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 ); 9178: e1a01008 mov r1, r8 917c: e28d3038 add r3, sp, #56 ; 0x38 9180: e0870005 add r0, r7, r5 9184: e1a0200d mov r2, sp 9188: eb0000d2 bl 94d8 pathlen -= len; i += len; if ( !pathloc->node_access ) 918c: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 9190: e59db038 ldr fp, [sp, #56] ; 0x38 i += len; if ( !pathloc->node_access ) 9194: 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 ); 9198: e1a09000 mov r9, r0 pathlen -= len; 919c: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 91a0: 0a000060 beq 9328 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 91a4: e3500000 cmp r0, #0 91a8: 0a000006 beq 91c8 if ( node->type == IMFS_DIRECTORY ) 91ac: e596104c ldr r1, [r6, #76] ; 0x4c 91b0: e3510001 cmp r1, #1 91b4: 1a000003 bne 91c8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 91b8: e1a00004 mov r0, r4 91bc: ebfffedf bl 8d40 91c0: e3500000 cmp r0, #0 91c4: 0a00006c beq 937c rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 91c8: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 91cc: 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; 91d0: e1a06003 mov r6, r3 switch( type ) { 91d4: e3590004 cmp r9, #4 91d8: 979ff109 ldrls pc, [pc, r9, lsl #2] 91dc: eaffffe5 b 9178 <== NOT EXECUTED 91e0: 000092ec .word 0x000092ec <== NOT EXECUTED 91e4: 00009178 .word 0x00009178 <== NOT EXECUTED 91e8: 000091f4 .word 0x000091f4 <== NOT EXECUTED 91ec: 00009230 .word 0x00009230 <== NOT EXECUTED 91f0: 000092f8 .word 0x000092f8 <== 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 ) 91f4: e59f119c ldr r1, [pc, #412] ; 9398 91f8: e5912000 ldr r2, [r1] 91fc: e5922018 ldr r2, [r2, #24] 9200: e1530002 cmp r3, r2 9204: 0affffdb beq 9178 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 9208: e594e010 ldr lr, [r4, #16] 920c: e59e201c ldr r2, [lr, #28] 9210: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 9214: 028dc024 addeq ip, sp, #36 ; 0x24 9218: 028ee008 addeq lr, lr, #8 921c: 0a000019 beq 9288 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 9220: e5936008 ldr r6, [r3, #8] 9224: e3560000 cmp r6, #0 9228: 1a00002d bne 92e4 922c: ea00003d b 9328 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 9230: e593304c ldr r3, [r3, #76] ; 0x4c 9234: e3530003 cmp r3, #3 9238: 0a000001 beq 9244 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 923c: e3530004 cmp r3, #4 9240: 1a000005 bne 925c result = IMFS_evaluate_link( pathloc, 0 ); 9244: e1a00004 mov r0, r4 9248: e3a01000 mov r1, #0 924c: ebffff93 bl 90a0 if ( result == -1 ) 9250: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 9254: e1a06000 mov r6, r0 if ( result == -1 ) 9258: 0a00004b beq 938c return -1; } node = pathloc->node_access; 925c: e5940000 ldr r0, [r4] if ( !node ) 9260: e3500000 cmp r0, #0 9264: 0a00003c beq 935c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 9268: e590304c ldr r3, [r0, #76] ; 0x4c 926c: e3530001 cmp r3, #1 9270: 1a000039 bne 935c /* * 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 ) { 9274: e590e05c ldr lr, [r0, #92] ; 0x5c 9278: e35e0000 cmp lr, #0 927c: 0a000014 beq 92d4 newloc = node->info.directory.mt_fs->mt_fs_root; 9280: e28dc024 add ip, sp, #36 ; 0x24 9284: e28ee01c add lr, lr, #28 9288: e8be000f ldm lr!, {r0, r1, r2, r3} 928c: e8ac000f stmia ip!, {r0, r1, r2, r3} 9290: e59ee000 ldr lr, [lr] 9294: e58ce000 str lr, [ip] *pathloc = newloc; 9298: e28dc024 add ip, sp, #36 ; 0x24 929c: e8bc000f ldm ip!, {r0, r1, r2, r3} 92a0: e1a0c004 mov ip, r4 92a4: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 92a8: e59d2038 ldr r2, [sp, #56] ; 0x38 * 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; 92ac: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 92b0: e0625005 rsb r5, r2, r5 92b4: e594300c ldr r3, [r4, #12] 92b8: e0870005 add r0, r7, r5 92bc: e1a01004 mov r1, r4 92c0: e1a0200a mov r2, sl 92c4: e1a0e00f mov lr, pc 92c8: e593f004 ldr pc, [r3, #4] 92cc: e1a06000 mov r6, r0 92d0: ea00002d b 938c /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 92d4: e1a0100d mov r1, sp 92d8: eb00005e bl 9458 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 92dc: e2506000 subs r6, r0, #0 92e0: 0a000007 beq 9304 done = true; else pathloc->node_access = node; 92e4: e5846000 str r6, [r4] 92e8: eaffffa2 b 9178 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 92ec: eb000b49 bl c018 <__errno> 92f0: e3a03011 mov r3, #17 92f4: ea000022 b 9384 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 92f8: eb000b46 bl c018 <__errno> 92fc: e3a0305b mov r3, #91 ; 0x5b 9300: ea00001f b 9384 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 9304: e59d3038 ldr r3, [sp, #56] ; 0x38 9308: e0633005 rsb r3, r3, r5 930c: e0873003 add r3, r7, r3 9310: e58a3000 str r3, [sl] * pathloc is returned with a pointer to the parent of the new node. * name is returned with a pointer to the first character in the * new node name. The parent node is verified to be a directory. */ int IMFS_evaluate_for_make( 9314: 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++) { 9318: ea000005 b 9334 if ( !IMFS_is_separator( path[ i ] ) ) 931c: ebffe6e0 bl 2ea4 9320: e3500000 cmp r0, #0 9324: 1a000002 bne 9334 rtems_set_errno_and_return_minus_one( ENOENT ); 9328: eb000b3a bl c018 <__errno> 932c: e3a03002 mov r3, #2 9330: ea000013 b 9384 /* * 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++) { 9334: e4d50001 ldrb r0, [r5], #1 9338: e3500000 cmp r0, #0 933c: 1afffff6 bne 931c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 9340: e1a00004 mov r0, r4 9344: ebfffe60 bl 8ccc /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 9348: e5943000 ldr r3, [r4] 934c: e593304c ldr r3, [r3, #76] ; 0x4c 9350: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 9354: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 9358: 0a000002 beq 9368 rtems_set_errno_and_return_minus_one( ENOTDIR ); 935c: eb000b2d bl c018 <__errno> 9360: e3a03014 mov r3, #20 9364: ea000006 b 9384 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 9368: e1a00004 mov r0, r4 936c: e3a01003 mov r1, #3 9370: ebfffe72 bl 8d40 9374: e3500000 cmp r0, #0 9378: 1a000003 bne 938c rtems_set_errno_and_return_minus_one( EACCES ); 937c: eb000b25 bl c018 <__errno> 9380: e3a0300d mov r3, #13 9384: e5803000 str r3, [r0] 9388: e3e06000 mvn r6, #0 return result; } 938c: e1a00006 mov r0, r6 9390: e28dd03c add sp, sp, #60 ; 0x3c 9394: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00008d40 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 8d40: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 8d44: e52de004 push {lr} ; (str lr, [sp, #-4]!) uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 8d48: 0a000004 beq 8d60 rtems_set_errno_and_return_minus_one( EPERM ); 8d4c: eb000cb1 bl c018 <__errno> <== NOT EXECUTED 8d50: e3a03001 mov r3, #1 <== NOT EXECUTED 8d54: e5803000 str r3, [r0] <== NOT EXECUTED 8d58: e3e00000 mvn r0, #0 <== NOT EXECUTED 8d5c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8d60: e5903000 ldr r3, [r0] 8d64: e5930030 ldr r0, [r3, #48] ; 0x30 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 8d68: e1a01301 lsl r1, r1, #6 /* * If all of the flags are set we have permission * to do this. */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) 8d6c: e0010000 and r0, r1, r0 gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); 8d70: e1500001 cmp r0, r1 8d74: 13a00000 movne r0, #0 8d78: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 8d7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000939c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 939c: 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; 93a0: e1a0c000 mov ip, r0 93a4: 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 ) { 93a8: e1a05000 mov r5, r0 93ac: 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; 93b0: e8bc000f ldm ip!, {r0, r1, r2, r3} 93b4: e1a0e00d mov lr, sp 93b8: e8ae000f stmia lr!, {r0, r1, r2, r3} 93bc: e59c3000 ldr r3, [ip] 93c0: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 93c4: e3a03000 mov r3, #0 93c8: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 93cc: e1a0500d mov r5, sp 93d0: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 93d4: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 93d8: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 93dc: ebfffe3a bl 8ccc if ( jnode->type != IMFS_DIRECTORY ) { 93e0: e594304c ldr r3, [r4, #76] ; 0x4c 93e4: e3530001 cmp r3, #1 93e8: 1a000003 bne 93fc result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 93ec: e5942050 ldr r2, [r4, #80] ; 0x50 RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( const Chain_Control *the_chain ) { return _Chain_Immutable_first( the_chain ) == _Chain_Immutable_tail( the_chain ); 93f0: e2843054 add r3, r4, #84 ; 0x54 93f4: e1520003 cmp r2, r3 93f8: 1a000005 bne 9414 result = IMFS_unlink( NULL, &loc ); 93fc: e3a00000 mov r0, #0 9400: e1a0100d mov r1, sp 9404: ebffe1f0 bl 1bcc if (result != 0) 9408: e3500000 cmp r0, #0 940c: 1a00000c bne 9444 return -1; jnode = next; 9410: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 9414: e3540000 cmp r4, #0 9418: 0a00000b beq 944c if ( jnode->type == IMFS_DIRECTORY ) { 941c: e594304c ldr r3, [r4, #76] ; 0x4c 9420: e3530001 cmp r3, #1 9424: 1affffe9 bne 93d0 } } } while (jnode != NULL); return 0; } 9428: e5943050 ldr r3, [r4, #80] ; 0x50 942c: e2842054 add r2, r4, #84 ; 0x54 return -1; jnode = next; } if ( jnode != NULL ) { if ( jnode->type == IMFS_DIRECTORY ) { if ( jnode_has_children( jnode ) ) 9430: e1530002 cmp r3, r2 9434: 0affffe5 beq 93d0 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 9438: e2534000 subs r4, r3, #0 943c: 1affffe3 bne 93d0 9440: ea000001 b 944c <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 9444: e3e00000 mvn r0, #0 <== NOT EXECUTED 9448: ea000000 b 9450 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 944c: e1a00004 mov r0, r4 } 9450: e28dd014 add sp, sp, #20 9454: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000abc0 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { abc0: e59f31e4 ldr r3, [pc, #484] ; adac #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { abc4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { abc8: e5935000 ldr r5, [r3] abcc: e1a05125 lsr r5, r5, #2 abd0: e2453001 sub r3, r5, #1 abd4: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { abd8: e1a04000 mov r4, r0 abdc: e1a06001 mov r6, r1 abe0: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { abe4: 8a00000e bhi ac24 p = info->indirect; if ( malloc_it ) { abe8: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; abec: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { abf0: 0a000007 beq ac14 if ( !p ) { abf4: e3500000 cmp r0, #0 abf8: 1a000003 bne ac0c p = memfile_alloc_block(); abfc: ebffffe2 bl ab8c if ( !p ) ac00: e3500000 cmp r0, #0 ac04: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; ac08: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; ac0c: e5940058 ldr r0, [r4, #88] ; 0x58 ac10: ea000001 b ac1c } if ( !p ) ac14: e3500000 cmp r0, #0 ac18: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; ac1c: e0800106 add r0, r0, r6, lsl #2 ac20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { ac24: e2853001 add r3, r5, #1 ac28: e0030395 mul r3, r5, r3 ac2c: e2432001 sub r2, r3, #1 ac30: e1510002 cmp r1, r2 ac34: 8a000021 bhi acc0 my_block -= FIRST_DOUBLY_INDIRECT; ac38: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ac3c: e1a00006 mov r0, r6 ac40: e1a01005 mov r1, r5 ac44: eb00134e bl f984 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ac48: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ac4c: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ac50: e1a00006 mov r0, r6 ac54: eb0012b2 bl f724 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { ac58: e3580000 cmp r8, #0 if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ac5c: e1a05000 mov r5, r0 p = info->doubly_indirect; ac60: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { ac64: 0a00000e beq aca4 if ( !p ) { ac68: e3500000 cmp r0, #0 ac6c: 1a000003 bne ac80 p = memfile_alloc_block(); ac70: ebffffc5 bl ab8c if ( !p ) ac74: e3500000 cmp r0, #0 ac78: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; ac7c: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; ac80: e0804105 add r4, r0, r5, lsl #2 ac84: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { ac88: e3500000 cmp r0, #0 ac8c: 1a000009 bne acb8 p1 = memfile_alloc_block(); ac90: ebffffbd bl ab8c if ( !p1 ) ac94: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; ac98: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) ac9c: 1a000005 bne acb8 aca0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) aca4: e3500000 cmp r0, #0 aca8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; acac: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) acb0: e3500000 cmp r0, #0 acb4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; acb8: e0800107 add r0, r0, r7, lsl #2 acbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { acc0: e2832001 add r2, r3, #1 acc4: e0020295 mul r2, r5, r2 acc8: e2422001 sub r2, r2, #1 accc: e1510002 cmp r1, r2 acd0: 8a000033 bhi ada4 my_block -= FIRST_TRIPLY_INDIRECT; acd4: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; acd8: e1a00006 mov r0, r6 acdc: e1a01005 mov r1, r5 ace0: eb001327 bl f984 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; ace4: e1a01005 mov r1, r5 * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; ace8: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; acec: e1a00006 mov r0, r6 acf0: eb00128b bl f724 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; acf4: e1a01005 mov r1, r5 */ 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; acf8: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; acfc: eb001288 bl f724 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ad00: e1a01005 mov r1, r5 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; ad04: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; ad08: e1a00006 mov r0, r6 ad0c: eb00131c bl f984 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { ad10: e3580000 cmp r8, #0 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; ad14: e1a05000 mov r5, r0 p = info->triply_indirect; ad18: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { ad1c: 0a000016 beq ad7c if ( !p ) { ad20: e3500000 cmp r0, #0 ad24: 1a000003 bne ad38 p = memfile_alloc_block(); ad28: ebffff97 bl ab8c if ( !p ) ad2c: e3500000 cmp r0, #0 ad30: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->triply_indirect = p; ad34: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; ad38: e0804107 add r4, r0, r7, lsl #2 ad3c: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { ad40: e3500000 cmp r0, #0 ad44: 1a000003 bne ad58 p1 = memfile_alloc_block(); ad48: ebffff8f bl ab8c if ( !p1 ) ad4c: e3500000 cmp r0, #0 ad50: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p[ triply ] = (block_p) p1; ad54: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; ad58: e0804105 add r4, r0, r5, lsl #2 ad5c: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { ad60: e3500000 cmp r0, #0 ad64: 1a00000c bne ad9c p2 = memfile_alloc_block(); ad68: ebffff87 bl ab8c if ( !p2 ) ad6c: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; ad70: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) ad74: 1a000008 bne ad9c ad78: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) ad7c: e3500000 cmp r0, #0 ad80: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p1 = (block_p *) p[ triply ]; ad84: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) ad88: e3500000 cmp r0, #0 ad8c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p2 = (block_p *)p1[ doubly ]; ad90: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) ad94: e3500000 cmp r0, #0 ad98: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p2[ singly ]; ad9c: e080010a add r0, r0, sl, lsl #2 ada0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * This means the requested block number is out of range. */ return 0; ada4: e3a00000 mov r0, #0 <== NOT EXECUTED } ada8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00001a6c : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1a6c: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1a70: e593204c ldr r2, [r3, #76] ; 0x4c 1a74: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1a78: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1a7c: 0a000004 beq 1a94 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1a80: eb002964 bl c018 <__errno> <== NOT EXECUTED 1a84: e3a03014 mov r3, #20 <== NOT EXECUTED 1a88: e5803000 str r3, [r0] <== NOT EXECUTED 1a8c: e3e00000 mvn r0, #0 <== NOT EXECUTED 1a90: 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; 1a94: e583005c str r0, [r3, #92] ; 0x5c return 0; 1a98: e3a00000 mov r0, #0 } 1a9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 000043f4 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 43f4: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 43f8: e59f50e0 ldr r5, [pc, #224] ; 44e0 43fc: e5953000 ldr r3, [r5] * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 4400: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4404: e5931008 ldr r1, [r3, #8] 4408: e280000c add r0, r0, #12 440c: eb0030db bl 10780 switch( the_jnode->type ) { 4410: e594204c ldr r2, [r4, #76] ; 0x4c 4414: e2423001 sub r3, r2, #1 4418: e3530006 cmp r3, #6 441c: 979ff103 ldrls pc, [pc, r3, lsl #2] 4420: ea000026 b 44c0 <== NOT EXECUTED 4424: 00004440 .word 0x00004440 <== NOT EXECUTED 4428: 00004454 .word 0x00004454 <== NOT EXECUTED 442c: 000044a0 .word 0x000044a0 <== NOT EXECUTED 4430: 000044a0 .word 0x000044a0 <== NOT EXECUTED 4434: 00004488 .word 0x00004488 <== NOT EXECUTED 4438: 0000446c .word 0x0000446c <== NOT EXECUTED 443c: 000044ac .word 0x000044ac <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4440: e5953000 ldr r3, [r5] 4444: e3a0002f mov r0, #47 ; 0x2f 4448: e5931008 ldr r1, [r3, #8] 444c: eb003096 bl 106ac break; 4450: ea00001f b 44d4 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4454: e5953000 ldr r3, [r5] 4458: e59f1084 ldr r1, [pc, #132] ; 44e4 445c: e5930008 ldr r0, [r3, #8] 4460: e2842050 add r2, r4, #80 ; 0x50 4464: e892000c ldm r2, {r2, r3} 4468: ea000004 b 4480 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 446c: e5953000 ldr r3, [r5] 4470: e59f1070 ldr r1, [pc, #112] ; 44e8 4474: e5930008 ldr r0, [r3, #8] 4478: e5942050 ldr r2, [r4, #80] ; 0x50 447c: e5943058 ldr r3, [r4, #88] ; 0x58 4480: eb003069 bl 1062c (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 4484: ea000012 b 44d4 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 4488: e5953000 ldr r3, [r5] 448c: e59f1058 ldr r1, [pc, #88] ; 44ec 4490: e5930008 ldr r0, [r3, #8] 4494: e5942050 ldr r2, [r4, #80] ; 0x50 4498: eb003063 bl 1062c (uint32_t)the_jnode->info.file.size ); #endif break; 449c: ea00000c b 44d4 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 44a0: e5953000 ldr r3, [r5] 44a4: e59f0044 ldr r0, [pc, #68] ; 44f0 44a8: ea000001 b 44b4 return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 44ac: e5953000 ldr r3, [r5] 44b0: e59f003c ldr r0, [pc, #60] ; 44f4 44b4: e5931008 ldr r1, [r3, #8] default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 44b8: e8bd4030 pop {r4, r5, lr} case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 44bc: ea0030af b 10780 return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 44c0: e5953000 ldr r3, [r5] <== NOT EXECUTED 44c4: e59f102c ldr r1, [pc, #44] ; 44f8 <== NOT EXECUTED 44c8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 44cc: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 44d0: ea003055 b 1062c <== NOT EXECUTED return; } puts(""); 44d4: e59f0020 ldr r0, [pc, #32] ; 44fc } 44d8: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 44dc: ea003781 b 122e8 =============================================================================== 00009680 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 9680: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 9684: e593204c ldr r2, [r3, #76] ; 0x4c 9688: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 968c: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 9690: e3520005 cmp r2, #5 9694: 979ff102 ldrls pc, [pc, r2, lsl #2] 9698: ea000012 b 96e8 <== NOT EXECUTED 969c: 000096b4 .word 0x000096b4 <== NOT EXECUTED 96a0: 000096e8 .word 0x000096e8 <== NOT EXECUTED 96a4: 000096d4 .word 0x000096d4 <== NOT EXECUTED 96a8: 000096c8 .word 0x000096c8 <== NOT EXECUTED 96ac: 000096c8 .word 0x000096c8 <== NOT EXECUTED 96b0: 000096d4 .word 0x000096d4 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 96b4: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 96b8: e593c050 ldr ip, [r3, #80] ; 0x50 96bc: e581201c str r2, [r1, #28] 96c0: e581c018 str ip, [r1, #24] break; 96c4: ea00000c b 96fc case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 96c8: e283c050 add ip, r3, #80 ; 0x50 96cc: e89c1800 ldm ip, {fp, ip} 96d0: ea000001 b 96dc case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 96d4: e3a0b000 mov fp, #0 96d8: e3a0c000 mov ip, #0 96dc: e581b020 str fp, [r1, #32] 96e0: e581c024 str ip, [r1, #36] ; 0x24 break; 96e4: ea000004 b 96fc default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 96e8: eb000a4a bl c018 <__errno> 96ec: e3a03086 mov r3, #134 ; 0x86 96f0: e5803000 str r3, [r0] 96f4: e3e00000 mvn r0, #0 96f8: e8bd8800 pop {fp, pc} /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 96fc: e5902010 ldr r2, [r0, #16] buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 9700: e5922034 ldr r2, [r2, #52] ; 0x34 9704: e5922000 ldr r2, [r2] /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 9708: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 970c: e5932030 ldr r2, [r3, #48] ; 0x30 9710: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 9714: e1d323b4 ldrh r2, [r3, #52] ; 0x34 9718: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 971c: e5932038 ldr r2, [r3, #56] ; 0x38 9720: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 9724: e1d323bc ldrh r2, [r3, #60] ; 0x3c 9728: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 972c: e1d323be ldrh r2, [r3, #62] ; 0x3e 9730: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 9734: e5932040 ldr r2, [r3, #64] ; 0x40 9738: e59f001c ldr r0, [pc, #28] ; 975c 973c: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 9740: e2832044 add r2, r3, #68 ; 0x44 9744: e892000c ldm r2, {r2, r3} /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 9748: e5810000 str r0, [r1] 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; 974c: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 9750: e5813038 str r3, [r1, #56] ; 0x38 return 0; 9754: e3a00000 mov r0, #0 } 9758: e8bd8800 pop {fp, pc} =============================================================================== 00001bcc : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1bcc: e92d40f0 push {r4, r5, r6, r7, lr} IMFS_jnode_t *node; rtems_filesystem_location_info_t the_link; int result = 0; node = loc->node_access; 1bd0: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1bd4: e595304c ldr r3, [r5, #76] ; 0x4c 1bd8: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1bdc: e24dd01c sub sp, sp, #28 1be0: e1a06000 mov r6, r0 1be4: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1be8: 1a000024 bne 1c80 if ( !node->info.hard_link.link_node ) 1bec: e595e050 ldr lr, [r5, #80] ; 0x50 1bf0: e35e0000 cmp lr, #0 1bf4: 1a000003 bne 1c08 rtems_set_errno_and_return_minus_one( EINVAL ); 1bf8: eb002906 bl c018 <__errno> <== NOT EXECUTED 1bfc: e3a03016 mov r3, #22 <== NOT EXECUTED 1c00: e5803000 str r3, [r0] <== NOT EXECUTED 1c04: ea000023 b 1c98 <== NOT EXECUTED the_link = *loc; 1c08: e1a07001 mov r7, r1 1c0c: e8b7000f ldm r7!, {r0, r1, r2, r3} 1c10: e1a0c00d mov ip, sp 1c14: e8ac000f stmia ip!, {r0, r1, r2, r3} 1c18: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; 1c1c: e28d701c add r7, sp, #28 1c20: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); 1c24: 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; 1c28: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1c2c: eb001c26 bl 8ccc /* * 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) 1c30: e5953050 ldr r3, [r5, #80] ; 0x50 1c34: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1c38: e3520001 cmp r2, #1 1c3c: 1a000007 bne 1c60 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1c40: e1a00006 mov r0, r6 1c44: e1a0100d mov r1, sp 1c48: e59d3008 ldr r3, [sp, #8] 1c4c: e1a0e00f mov lr, pc 1c50: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 1c54: e3500000 cmp r0, #0 1c58: 0a000008 beq 1c80 1c5c: ea00000d b 1c98 return -1; } else { node->info.hard_link.link_node->st_nlink --; 1c60: e2422001 sub r2, r2, #1 1c64: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 1c68: e28d0014 add r0, sp, #20 1c6c: e3a01000 mov r1, #0 1c70: eb00012c bl 2128 1c74: e5953050 ldr r3, [r5, #80] ; 0x50 1c78: e59d2014 ldr r2, [sp, #20] 1c7c: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 1c80: e5943008 ldr r3, [r4, #8] 1c84: e1a00006 mov r0, r6 1c88: e1a01004 mov r1, r4 1c8c: e1a0e00f mov lr, pc 1c90: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 1c94: ea000000 b 1c9c if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 1c98: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 1c9c: e28dd01c add sp, sp, #28 1ca0: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00001ca4 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1ca4: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1ca8: e593204c ldr r2, [r3, #76] ; 0x4c 1cac: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1cb0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1cb4: 0a000002 beq 1cc4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 1cb8: eb0028d6 bl c018 <__errno> <== NOT EXECUTED 1cbc: e3a03014 mov r3, #20 <== NOT EXECUTED 1cc0: ea000004 b 1cd8 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 1cc4: e593205c ldr r2, [r3, #92] ; 0x5c 1cc8: e3520000 cmp r2, #0 1ccc: 1a000004 bne 1ce4 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 1cd0: eb0028d0 bl c018 <__errno> <== NOT EXECUTED 1cd4: e3a03016 mov r3, #22 <== NOT EXECUTED 1cd8: e5803000 str r3, [r0] <== NOT EXECUTED 1cdc: e3e00000 mvn r0, #0 <== NOT EXECUTED 1ce0: 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; 1ce4: e3a00000 mov r0, #0 1ce8: e583005c str r0, [r3, #92] ; 0x5c return 0; } 1cec: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 000015dc : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 15dc: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 15e0: e59030b8 ldr r3, [r0, #184] ; 0xb8 size = Stack_check_usable_stack_size(stack); 15e4: e59070b4 ldr r7, [r0, #180] ; 0xb4 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 15e8: e2832010 add r2, r3, #16 size = Stack_check_usable_stack_size(stack); 15ec: e2477010 sub r7, r7, #16 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 15f0: e3c71003 bic r1, r7, #3 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 15f4: e1a05000 mov r5, r0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 15f8: e590b0e4 ldr fp, [r0, #228] ; 0xe4 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 15fc: e2820010 add r0, r2, #16 for (ebase = base + length; base < ebase; base++) 1600: e0800001 add r0, r0, r1 * Try to print out how much stack was actually used by the task. */ static void *print_context; static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( 1604: e2833020 add r3, r3, #32 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 1608: e59f10c0 ldr r1, [pc, #192] ; 16d0 160c: ea000002 b 161c 1610: e493c004 ldr ip, [r3], #4 1614: e15c0001 cmp ip, r1 1618: 1a000004 bne 1630 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 161c: e1530000 cmp r3, r0 if (*base != U32_PATTERN) 1620: e1a06003 mov r6, r3 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 1624: 3afffff9 bcc 1610 high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; 1628: e3a06000 mov r6, #0 <== NOT EXECUTED 162c: ea000002 b 163c <== NOT EXECUTED low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); high_water_mark = Stack_check_find_high_water_mark(low, size); if ( high_water_mark ) 1630: e3560000 cmp r6, #0 used = Stack_check_Calculate_used( low, size, high_water_mark ); 1634: 10822007 addne r2, r2, r7 1638: 10666002 rsbne r6, r6, r2 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 163c: e5958008 ldr r8, [r5, #8] 1640: e59f408c ldr r4, [pc, #140] ; 16d4 1644: e3a01005 mov r1, #5 1648: e28d2008 add r2, sp, #8 164c: e1a00008 mov r0, r8 1650: e8940600 ldm r4, {r9, sl} 1654: eb000ed5 bl 51b0 1658: e59f1078 ldr r1, [pc, #120] ; 16d8 165c: e1a03000 mov r3, r0 1660: e1a02008 mov r2, r8 1664: e1a0000a mov r0, sl 1668: e1a0e00f mov lr, pc 166c: e12fff19 bx r9 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 1670: e59530b4 ldr r3, [r5, #180] ; 0xb4 1674: e59520b8 ldr r2, [r5, #184] ; 0xb8 1678: e2433001 sub r3, r3, #1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 167c: e0823003 add r3, r2, r3 1680: e58db000 str fp, [sp] 1684: e58d7004 str r7, [sp, #4] 1688: e5940004 ldr r0, [r4, #4] 168c: e59f1048 ldr r1, [pc, #72] ; 16dc 1690: e1a0e00f mov lr, pc 1694: e594f000 ldr pc, [r4] stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 1698: e5943008 ldr r3, [r4, #8] 169c: e3530000 cmp r3, #0 16a0: 1a000004 bne 16b8 (*print_handler)( print_context, "Unavailable\n" ); 16a4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 16a8: e59f1030 ldr r1, [pc, #48] ; 16e0 <== NOT EXECUTED 16ac: e1a0e00f mov lr, pc <== NOT EXECUTED 16b0: e594f000 ldr pc, [r4] <== NOT EXECUTED 16b4: ea000004 b 16cc <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 16b8: e5940004 ldr r0, [r4, #4] 16bc: e59f1020 ldr r1, [pc, #32] ; 16e4 16c0: e1a02006 mov r2, r6 16c4: e1a0e00f mov lr, pc 16c8: e594f000 ldr pc, [r4] } } 16cc: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0002060c <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 2060c: e3a00000 mov r0, #0 <== NOT EXECUTED 20610: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000218c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 218c: eaffffe5 b 2128 <== NOT EXECUTED =============================================================================== 000089f0 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 89f0: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 89f4: e3d27007 bics r7, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 89f8: e1a09000 mov r9, r0 89fc: e1a04001 mov r4, r1 8a00: e1a05003 mov r5, r3 int i; rtems_device_name_t *device_name_table; /* see if 'flags' is valid */ if ( !rtems_libio_is_valid_perms( flags ) ) 8a04: 0a000002 beq 8a14 rtems_set_errno_and_return_minus_one( EPERM ); 8a08: eb000622 bl a298 <__errno> <== NOT EXECUTED 8a0c: e3a03001 mov r3, #1 <== NOT EXECUTED 8a10: ea000005 b 8a2c <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 8a14: e5936000 ldr r6, [r3] if (!device_name_table) 8a18: e3560000 cmp r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8a1c: 159fa094 ldrne sl, [pc, #148] ; 8ab8 if ( !rtems_libio_is_valid_perms( flags ) ) rtems_set_errno_and_return_minus_one( EPERM ); /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 8a20: 1a00001c bne 8a98 rtems_set_errno_and_return_minus_one( EFAULT ); 8a24: eb00061b bl a298 <__errno> 8a28: e3a0300e mov r3, #14 8a2c: e5803000 str r3, [r0] 8a30: e3e00000 mvn r0, #0 8a34: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 8a38: e5968000 ldr r8, [r6] 8a3c: e3580000 cmp r8, #0 8a40: 0a000012 beq 8a90 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8a44: e1a00009 mov r0, r9 8a48: e1a01008 mov r1, r8 8a4c: e1a02004 mov r2, r4 8a50: eb000997 bl b0b4 8a54: e3500000 cmp r0, #0 8a58: 1a00000c bne 8a90 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 8a5c: e7d80004 ldrb r0, [r8, r4] 8a60: e3500000 cmp r0, #0 8a64: 1a000009 bne 8a90 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 8a68: e59f304c ldr r3, [pc, #76] ; 8abc 8a6c: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 8a70: e59f3048 ldr r3, [pc, #72] ; 8ac0 8a74: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8a78: e59f3044 ldr r3, [pc, #68] ; 8ac4 8a7c: e5933000 ldr r3, [r3] 8a80: e5933028 ldr r3, [r3, #40] ; 0x28 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 8a84: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8a88: e5853010 str r3, [r5, #16] return 0; 8a8c: 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++) { 8a90: e2877001 add r7, r7, #1 8a94: e2866014 add r6, r6, #20 8a98: e59a3000 ldr r3, [sl] 8a9c: e1570003 cmp r7, r3 8aa0: 3affffe4 bcc 8a38 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8aa4: eb0005fb bl a298 <__errno> 8aa8: e3a03002 mov r3, #2 8aac: e5803000 str r3, [r0] 8ab0: e3e00000 mvn r0, #0 } 8ab4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00002f14 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2f14: e59030b4 ldr r3, [r0, #180] ; 0xb4 2f18: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2f1c: e92d4030 push {r4, r5, lr} 2f20: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2f24: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 2f28: ebfffff5 bl 2f04 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2f2c: e3a05002 mov r5, #2 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) { 2f30: ea000008 b 2f58 tty->rawOutBufState = rob_wait; 2f34: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; __asm__ volatile ( 2f38: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 2f3c: e3a01000 mov r1, #0 <== NOT EXECUTED 2f40: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2f44: e1a02001 mov r2, r1 <== NOT EXECUTED 2f48: eb0008cc bl 5280 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2f4c: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2f50: 1b000a64 blne 58e8 <== NOT EXECUTED rtems_interrupt_disable (level); 2f54: ebffffea bl 2f04 <== 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) { 2f58: e5942084 ldr r2, [r4, #132] ; 0x84 2f5c: e5943080 ldr r3, [r4, #128] ; 0x80 2f60: e1520003 cmp r2, r3 2f64: 1afffff2 bne 2f34 2f68: e129f000 msr CPSR_fc, r0 2f6c: e8bd8030 pop {r4, r5, pc} =============================================================================== 00003bf4 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 3bf4: e5903020 ldr r3, [r0, #32] 3bf8: e3530000 cmp r3, #0 * 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) { 3bfc: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3c00: e1a04000 mov r4, r0 3c04: e1a07001 mov r7, r1 if (tty->ccount == 0) 3c08: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; if (lineFlag) { 3c0c: e3510000 cmp r1, #0 3c10: 0a000060 beq 3d98 if (!(tty->termios.c_lflag & ECHO)) { 3c14: e590303c ldr r3, [r0, #60] ; 0x3c 3c18: e2132008 ands r2, r3, #8 tty->ccount = 0; 3c1c: 05802020 streq r2, [r0, #32] erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) return; if (lineFlag) { if (!(tty->termios.c_lflag & ECHO)) { 3c20: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 3c24: e2133010 ands r3, r3, #16 3c28: 1a00005a bne 3d98 tty->ccount = 0; 3c2c: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 3c30: e1a01004 mov r1, r4 <== NOT EXECUTED 3c34: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 3c38: ebffffca bl 3b68 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 3c3c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3c40: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 3c44: 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) 3c48: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3c4c: ea00000b b 3c80 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3c50: e2411001 sub r1, r1, #1 if (tty->termios.c_lflag & ECHO) { 3c54: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3c58: e594001c ldr r0, [r4, #28] 3c5c: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { 3c60: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3c64: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { 3c68: 0a000047 beq 3d8c if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 3c6c: e3570000 cmp r7, #0 3c70: 1a000005 bne 3c8c 3c74: e3130010 tst r3, #16 3c78: 1a000003 bne 3c8c echo (tty->termios.c_cc[VERASE], tty); 3c7c: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 3c80: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 3c84: 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); 3c88: eaffffb6 b 3b68 <== NOT EXECUTED } else if (c == '\t') { 3c8c: e3550009 cmp r5, #9 3c90: 1a00001f bne 3d14 int col = tty->read_start_column; 3c94: e594502c ldr r5, [r4, #44] ; 0x2c */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { 3c98: e5968000 ldr r8, [r6] 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; int i = 0; 3c9c: e3a02000 mov r2, #0 while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { col = (col | 7) + 1; } else if (iscntrl (c)) { if (tty->termios.c_lflag & ECHOCTL) 3ca0: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3ca4: ea00000c b 3cdc c = tty->cbuf[i++]; 3ca8: e7d0c002 ldrb ip, [r0, r2] if (c == '\t') { 3cac: e35c0009 cmp ip, #9 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 3cb0: e2822001 add r2, r2, #1 if (c == '\t') { col = (col | 7) + 1; 3cb4: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 3cb8: 0a000006 beq 3cd8 col = (col | 7) + 1; } else if (iscntrl (c)) { 3cbc: e088c00c add ip, r8, ip 3cc0: e5dcc001 ldrb ip, [ip, #1] 3cc4: e31c0020 tst ip, #32 3cc8: 0a000002 beq 3cd8 if (tty->termios.c_lflag & ECHOCTL) 3ccc: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 3cd0: 12855002 addne r5, r5, #2 <== NOT EXECUTED 3cd4: ea000000 b 3cdc <== NOT EXECUTED } else { col++; 3cd8: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3cdc: e1520001 cmp r2, r1 3ce0: 1afffff0 bne 3ca8 3ce4: ea000006 b 3d04 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 3ce8: e59f00bc ldr r0, [pc, #188] ; 3dac 3cec: e3a01001 mov r1, #1 3cf0: e1a02004 mov r2, r4 3cf4: ebffff07 bl 3918 tty->column--; 3cf8: e5943028 ldr r3, [r4, #40] ; 0x28 3cfc: e2433001 sub r3, r3, #1 3d00: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { 3d04: e5943028 ldr r3, [r4, #40] ; 0x28 3d08: e1530005 cmp r3, r5 3d0c: cafffff5 bgt 3ce8 3d10: ea00001d b 3d8c rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 3d14: e5962000 ldr r2, [r6] 3d18: e2855001 add r5, r5, #1 3d1c: e7d22005 ldrb r2, [r2, r5] 3d20: e3120020 tst r2, #32 3d24: 0a000009 beq 3d50 3d28: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3d2c: 0a000007 beq 3d50 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 3d30: e59f0078 ldr r0, [pc, #120] ; 3db0 <== NOT EXECUTED 3d34: e3a01003 mov r1, #3 <== NOT EXECUTED 3d38: e1a02004 mov r2, r4 <== NOT EXECUTED 3d3c: ebfffef5 bl 3918 <== NOT EXECUTED if (tty->column) 3d40: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3d44: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3d48: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3d4c: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 3d50: e5963000 ldr r3, [r6] 3d54: e7d33005 ldrb r3, [r3, r5] 3d58: e3130020 tst r3, #32 3d5c: 0a000002 beq 3d6c 3d60: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3d64: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3d68: 0a000007 beq 3d8c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 3d6c: e59f003c ldr r0, [pc, #60] ; 3db0 3d70: e3a01003 mov r1, #3 3d74: e1a02004 mov r2, r4 3d78: ebfffee6 bl 3918 if (tty->column) 3d7c: e5943028 ldr r3, [r4, #40] ; 0x28 3d80: e3530000 cmp r3, #0 tty->column--; 3d84: 12433001 subne r3, r3, #1 3d88: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) 3d8c: e3570000 cmp r7, #0 3d90: 1a000001 bne 3d9c 3d94: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3d98: e59f6014 ldr r6, [pc, #20] ; 3db4 echo ('\n', tty); return; } } while (tty->ccount) { 3d9c: e5941020 ldr r1, [r4, #32] 3da0: e3510000 cmp r1, #0 3da4: 1affffa9 bne 3c50 3da8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00002984 : int fcntl( int fd, int cmd, ... ) { 2984: e92d000e push {r1, r2, r3} 2988: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 298c: e59f21a4 ldr r2, [pc, #420] ; 2b38 2990: e5921000 ldr r1, [r2] ... ) { int ret; va_list ap; va_start( ap, cmd ); 2994: e28d301c add r3, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 2998: e1500001 cmp r0, r1 int fcntl( int fd, int cmd, ... ) { 299c: e59d7018 ldr r7, [sp, #24] int ret; va_list ap; va_start( ap, cmd ); 29a0: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 29a4: 2a000006 bcs 29c4 iop = rtems_libio_iop( fd ); 29a8: e59f218c ldr r2, [pc, #396] ; 2b3c 29ac: e5922000 ldr r2, [r2] 29b0: e3a04038 mov r4, #56 ; 0x38 29b4: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); 29b8: e5940014 ldr r0, [r4, #20] 29bc: e3100c01 tst r0, #256 ; 0x100 29c0: 1a000002 bne 29d0 29c4: eb002976 bl cfa4 <__errno> 29c8: e3a03009 mov r3, #9 29cc: ea000047 b 2af0 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 29d0: e3570009 cmp r7, #9 29d4: 979ff107 ldrls pc, [pc, r7, lsl #2] 29d8: ea000042 b 2ae8 29dc: 00002a04 .word 0x00002a04 29e0: 00002a74 .word 0x00002a74 29e4: 00002a84 .word 0x00002a84 29e8: 00002aa4 .word 0x00002aa4 29ec: 00002ab0 .word 0x00002ab0 29f0: 00002adc .word 0x00002adc 29f4: 00002adc .word 0x00002adc 29f8: 00002adc .word 0x00002adc 29fc: 00002adc .word 0x00002adc 2a00: 00002adc .word 0x00002adc case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2a04: e5933000 ldr r3, [r3] if ( fd2 ) 2a08: e3530000 cmp r3, #0 2a0c: 0a000004 beq 2a24 diop = rtems_libio_iop( fd2 ); 2a10: e1530001 cmp r3, r1 2a14: 33a06038 movcc r6, #56 ; 0x38 2a18: 30262693 mlacc r6, r3, r6, r2 2a1c: 3a000005 bcc 2a38 2a20: ea000003 b 2a34 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2a24: eb000190 bl 306c if ( diop == 0 ) { 2a28: e2506000 subs r6, r0, #0 2a2c: 1a000001 bne 2a38 2a30: ea00003b b 2b24 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 2a34: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 2a38: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; 2a3c: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; 2a40: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; 2a44: e8b5000f ldm r5!, {r0, r1, r2, r3} 2a48: e286c018 add ip, r6, #24 2a4c: e8ac000f stmia ip!, {r0, r1, r2, r3} 2a50: e5953000 ldr r3, [r5] 2a54: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); 2a58: e59f30dc ldr r3, [pc, #220] ; 2b3c 2a5c: e5933000 ldr r3, [r3] 2a60: e0636006 rsb r6, r3, r6 2a64: e59f30d4 ldr r3, [pc, #212] ; 2b40 2a68: e1a061c6 asr r6, r6, #3 2a6c: e0060693 mul r6, r3, r6 2a70: ea000020 b 2af8 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 2a74: e3100b02 tst r0, #2048 ; 0x800 2a78: 03a06000 moveq r6, #0 2a7c: 13a06001 movne r6, #1 2a80: ea00001e b 2b00 * 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 ) ) 2a84: e5936000 ldr r6, [r3] 2a88: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 2a8c: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2a90: 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; 2a94: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 2a98: 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 ) ) 2a9c: 0a000017 beq 2b00 2aa0: ea00000b b 2ad4 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 2aa4: eb00015e bl 3024 2aa8: e1a06000 mov r6, r0 2aac: ea000011 b 2af8 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2ab0: e5930000 ldr r0, [r3] 2ab4: eb00014d bl 2ff0 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 2ab8: e5942014 ldr r2, [r4, #20] 2abc: e59f3080 ldr r3, [pc, #128] ; 2b44 2ac0: e3c22c02 bic r2, r2, #512 ; 0x200 2ac4: e0003003 and r3, r0, r3 2ac8: e3c22001 bic r2, r2, #1 2acc: e1833002 orr r3, r3, r2 2ad0: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 2ad4: e3a06000 mov r6, #0 2ad8: ea000008 b 2b00 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2adc: eb002930 bl cfa4 <__errno> 2ae0: e3a03086 mov r3, #134 ; 0x86 2ae4: ea000001 b 2af0 ret = -1; break; default: errno = EINVAL; 2ae8: eb00292d bl cfa4 <__errno> 2aec: e3a03016 mov r3, #22 2af0: e5803000 str r3, [r0] 2af4: ea00000a b 2b24 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2af8: e3560000 cmp r6, #0 2afc: ba000009 blt 2b28 int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 2b00: e5943020 ldr r3, [r4, #32] 2b04: e1a01004 mov r1, r4 2b08: e1a00007 mov r0, r7 2b0c: e1a0e00f mov lr, pc 2b10: e593f030 ldr pc, [r3, #48] ; 0x30 if (err) { 2b14: e2504000 subs r4, r0, #0 2b18: 0a000002 beq 2b28 errno = err; 2b1c: eb002920 bl cfa4 <__errno> <== NOT EXECUTED 2b20: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; 2b24: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2b28: e1a00006 mov r0, r6 2b2c: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 2b30: e28dd00c add sp, sp, #12 2b34: e12fff1e bx lr =============================================================================== 0000b64c : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b64c: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { b650: e59f5378 ldr r5, [pc, #888] ; b9d0 b654: e5954000 ldr r4, [r5] b658: e3540000 cmp r4, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b65c: e1a08000 mov r8, r0 b660: e1a07001 mov r7, r1 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { b664: 1a000012 bne b6b4 rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); b668: e59f3364 ldr r3, [pc, #868] ; b9d4 b66c: e1a01004 mov r1, r4 b670: e5930000 ldr r0, [r3] b674: e1a02004 mov r2, r4 b678: ebffeeb5 bl 7154 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { b67c: e5953000 ldr r3, [r5] b680: e3530000 cmp r3, #0 b684: 1a000005 bne b6a0 sc = rtems_semaphore_create( b688: e59f0348 ldr r0, [pc, #840] ; b9d8 b68c: e3a01001 mov r1, #1 b690: e3a02054 mov r2, #84 ; 0x54 b694: e58d5000 str r5, [sp] b698: ebffee1b bl 6f0c b69c: e1a04000 mov r4, r0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); b6a0: e59f332c ldr r3, [pc, #812] ; b9d4 b6a4: e5930000 ldr r0, [r3] b6a8: ebffeeef bl 726c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { b6ac: e3540000 cmp r4, #0 b6b0: 1a000006 bne b6d0 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); b6b4: e59f3314 ldr r3, [pc, #788] ; b9d0 b6b8: e3a01000 mov r1, #0 b6bc: e5930000 ldr r0, [r3] b6c0: e1a02001 mov r2, r1 b6c4: ebffeea2 bl 7154 } if (sc == RTEMS_SUCCESSFUL) { b6c8: e2505000 subs r5, r0, #0 b6cc: 0a000000 beq b6d4 return 0; } else { return -ENOMEM; b6d0: e3e0500b mvn r5, #11 { pipe_control_t *pipe; int err = 0; err = pipe_lock(); if (err) b6d4: e2556000 subs r6, r5, #0 b6d8: 1a0000ba bne b9c8 return err; pipe = *pipep; b6dc: e5984000 ldr r4, [r8] if (pipe == NULL) { b6e0: e3540000 cmp r4, #0 b6e4: 1a00003c bne b7dc { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b6e8: e3a00034 mov r0, #52 ; 0x34 b6ec: ebffe2ac bl 41a4 if (pipe == NULL) b6f0: e250a000 subs sl, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b6f4: e1a04000 mov r4, r0 if (pipe == NULL) b6f8: 0a000035 beq b7d4 return err; memset(pipe, 0, sizeof(pipe_control_t)); b6fc: e1a01005 mov r1, r5 b700: e3a02034 mov r2, #52 ; 0x34 b704: eb000dba bl edf4 pipe->Size = PIPE_BUF; b708: e3a00c02 mov r0, #512 ; 0x200 b70c: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); b710: ebffe2a3 bl 41a4 if (! pipe->Buffer) b714: e3500000 cmp r0, #0 if (pipe == NULL) return err; memset(pipe, 0, sizeof(pipe_control_t)); pipe->Size = PIPE_BUF; pipe->Buffer = malloc(pipe->Size); b718: e5840000 str r0, [r4] if (! pipe->Buffer) b71c: 0a00002a beq b7cc goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), b720: e59f62b4 ldr r6, [pc, #692] ; b9dc if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( b724: e59f02b4 ldr r0, [pc, #692] ; b9e0 rtems_build_name ('P', 'I', 'r', c), b728: e5d63000 ldrb r3, [r6] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( b72c: e1a01005 mov r1, r5 b730: e1830000 orr r0, r3, r0 b734: e1a02005 mov r2, r5 b738: e284302c add r3, r4, #44 ; 0x2c b73c: eb0003dd bl c6b8 b740: e3500000 cmp r0, #0 b744: 1a00001e bne b7c4 rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), b748: e5d63000 ldrb r3, [r6] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->readBarrier) != RTEMS_SUCCESSFUL) goto err_rbar; if (rtems_barrier_create( b74c: e59f0290 ldr r0, [pc, #656] ; b9e4 b750: e1a01005 mov r1, r5 b754: e1830000 orr r0, r3, r0 b758: e1a02005 mov r2, r5 b75c: e2843030 add r3, r4, #48 ; 0x30 b760: eb0003d4 bl c6b8 b764: e3500000 cmp r0, #0 b768: 1a000013 bne b7bc rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( rtems_build_name ('P', 'I', 's', c), 1, b76c: e5d63000 ldrb r3, [r6] if (rtems_barrier_create( rtems_build_name ('P', 'I', 'w', c), RTEMS_BARRIER_MANUAL_RELEASE, 0, &pipe->writeBarrier) != RTEMS_SUCCESSFUL) goto err_wbar; if (rtems_semaphore_create( b770: e59f0270 ldr r0, [pc, #624] ; b9e8 b774: e2842028 add r2, r4, #40 ; 0x28 b778: e58d2000 str r2, [sp] b77c: e1830000 orr r0, r3, r0 b780: e3a01001 mov r1, #1 b784: e3a02010 mov r2, #16 b788: e1a03005 mov r3, r5 b78c: ebffedde bl 6f0c b790: e3500000 cmp r0, #0 b794: 1a000006 bne b7b4 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b798: e5d63000 ldrb r3, [r6] b79c: e353007a cmp r3, #122 ; 0x7a b7a0: e2832001 add r2, r3, #1 c = 'a'; b7a4: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b7a8: e5c62000 strb r2, [r6] c = 'a'; b7ac: 05c63000 strbeq r3, [r6] b7b0: ea000009 b b7dc return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); b7b4: e59a0030 ldr r0, [sl, #48] ; 0x30 b7b8: eb0003ee bl c778 err_wbar: rtems_barrier_delete(pipe->readBarrier); b7bc: e59a002c ldr r0, [sl, #44] ; 0x2c b7c0: eb0003ec bl c778 err_rbar: free(pipe->Buffer); b7c4: e59a0000 ldr r0, [sl] b7c8: ebffe0a2 bl 3a58 err_buf: free(pipe); b7cc: e1a0000a mov r0, sl b7d0: ebffe0a0 bl 3a58 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; b7d4: e3e0600b mvn r6, #11 b7d8: ea00000d b b814 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) b7dc: e3a01000 mov r1, #0 b7e0: e5940028 ldr r0, [r4, #40] ; 0x28 b7e4: e1a02001 mov r2, r1 b7e8: ebffee59 bl 7154 err = -EINTR; if (*pipep == NULL) { b7ec: e5983000 ldr r3, [r8] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; b7f0: e3500000 cmp r0, #0 b7f4: 03a06000 moveq r6, #0 b7f8: 13e06003 mvnne r6, #3 if (*pipep == NULL) { b7fc: e3530000 cmp r3, #0 b800: 1a000003 bne b814 if (err) b804: e3560000 cmp r6, #0 pipe_free(pipe); else *pipep = pipe; b808: 05884000 streq r4, [r8] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); b80c: 11a00004 movne r0, r4 b810: 1bffff54 blne b568 else *pipep = pipe; } out: pipe_unlock(); b814: ebffff4f bl b558 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) b818: e3560000 cmp r6, #0 b81c: 1a000069 bne b9c8 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { b820: e5973014 ldr r3, [r7, #20] b824: e2033006 and r3, r3, #6 b828: e3530004 cmp r3, #4 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; b82c: e5984000 ldr r4, [r8] switch (LIBIO_ACCMODE(iop)) { b830: 0a000024 beq b8c8 b834: e3530006 cmp r3, #6 b838: 0a000047 beq b95c b83c: e3530002 cmp r3, #2 b840: 1a000059 bne b9ac case LIBIO_FLAGS_READ: pipe->readerCounter ++; b844: e5943020 ldr r3, [r4, #32] b848: e2833001 add r3, r3, #1 b84c: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) b850: e5943010 ldr r3, [r4, #16] b854: e2832001 add r2, r3, #1 b858: e3530000 cmp r3, #0 b85c: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); b860: 05940030 ldreq r0, [r4, #48] ; 0x30 b864: 028d1004 addeq r1, sp, #4 b868: 0b0003ea bleq c818 if (pipe->Writers == 0) { b86c: e5943014 ldr r3, [r4, #20] b870: e3530000 cmp r3, #0 b874: 1a00004c bne b9ac /* Not an error */ if (LIBIO_NODELAY(iop)) b878: e5973014 ldr r3, [r7, #20] b87c: e3130001 tst r3, #1 b880: 1a000049 bne b9ac break; prevCounter = pipe->writerCounter; b884: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); b888: e5940028 ldr r0, [r4, #40] ; 0x28 b88c: ebffee76 bl 726c if (! PIPE_READWAIT(pipe)) b890: e3a01000 mov r1, #0 b894: e594002c ldr r0, [r4, #44] ; 0x2c b898: eb0003f4 bl c870 b89c: e2501000 subs r1, r0, #0 b8a0: 1a000044 bne b9b8 goto out_error; if (! PIPE_LOCK(pipe)) b8a4: e5940028 ldr r0, [r4, #40] ; 0x28 b8a8: e1a02001 mov r2, r1 b8ac: ebffee28 bl 7154 b8b0: e3500000 cmp r0, #0 b8b4: 1a00003f bne b9b8 goto out_error; } while (prevCounter == pipe->writerCounter); b8b8: e5943024 ldr r3, [r4, #36] ; 0x24 b8bc: e1550003 cmp r5, r3 b8c0: 0afffff0 beq b888 b8c4: ea000038 b b9ac } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; b8c8: e5943024 ldr r3, [r4, #36] ; 0x24 b8cc: e2833001 add r3, r3, #1 b8d0: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) b8d4: e5943014 ldr r3, [r4, #20] b8d8: e2832001 add r2, r3, #1 b8dc: e3530000 cmp r3, #0 b8e0: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); b8e4: 0594002c ldreq r0, [r4, #44] ; 0x2c b8e8: 028d1004 addeq r1, sp, #4 b8ec: 0b0003c9 bleq c818 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b8f0: e5943010 ldr r3, [r4, #16] b8f4: e3530000 cmp r3, #0 b8f8: 1a00002b bne b9ac b8fc: e5973014 ldr r3, [r7, #20] b900: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; b904: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b908: 0a000003 beq b91c PIPE_UNLOCK(pipe); b90c: e5940028 ldr r0, [r4, #40] ; 0x28 b910: ebffee55 bl 726c err = -ENXIO; b914: e3e06005 mvn r6, #5 goto out_error; b918: ea000027 b b9bc if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); b91c: e5940028 ldr r0, [r4, #40] ; 0x28 b920: ebffee51 bl 726c if (! PIPE_WRITEWAIT(pipe)) b924: e3a01000 mov r1, #0 b928: e5940030 ldr r0, [r4, #48] ; 0x30 b92c: eb0003cf bl c870 b930: e2501000 subs r1, r0, #0 b934: 1a00001f bne b9b8 goto out_error; if (! PIPE_LOCK(pipe)) b938: e5940028 ldr r0, [r4, #40] ; 0x28 b93c: e1a02001 mov r2, r1 b940: ebffee03 bl 7154 b944: e3500000 cmp r0, #0 b948: 1a00001a bne b9b8 goto out_error; } while (prevCounter == pipe->readerCounter); b94c: e5943020 ldr r3, [r4, #32] b950: e1550003 cmp r5, r3 b954: 0afffff0 beq b91c b958: ea000013 b b9ac } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b95c: e5943020 ldr r3, [r4, #32] b960: e2833001 add r3, r3, #1 b964: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) b968: e5943010 ldr r3, [r4, #16] b96c: e2832001 add r2, r3, #1 b970: e3530000 cmp r3, #0 b974: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); b978: 05940030 ldreq r0, [r4, #48] ; 0x30 b97c: 028d1004 addeq r1, sp, #4 b980: 0b0003a4 bleq c818 pipe->writerCounter ++; b984: e5943024 ldr r3, [r4, #36] ; 0x24 b988: e2833001 add r3, r3, #1 b98c: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) b990: e5943014 ldr r3, [r4, #20] b994: e2832001 add r2, r3, #1 b998: e3530000 cmp r3, #0 b99c: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); b9a0: 0594002c ldreq r0, [r4, #44] ; 0x2c b9a4: 028d1004 addeq r1, sp, #4 b9a8: 0b00039a bleq c818 break; } PIPE_UNLOCK(pipe); b9ac: e5940028 ldr r0, [r4, #40] ; 0x28 b9b0: ebffee2d bl 726c return 0; b9b4: ea000003 b b9c8 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; b9b8: e3e06003 mvn r6, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); b9bc: e1a00008 mov r0, r8 b9c0: e1a01007 mov r1, r7 b9c4: ebfffef4 bl b59c return err; } b9c8: e1a00006 mov r0, r6 b9cc: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00002bc8 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2bc8: e59f3104 ldr r3, [pc, #260] ; 2cd4 2bcc: e5933000 ldr r3, [r3] 2bd0: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2bd4: 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); 2bd8: 2a000006 bcs 2bf8 iop = rtems_libio_iop(fd); 2bdc: e59f30f4 ldr r3, [pc, #244] ; 2cd8 2be0: e5933000 ldr r3, [r3] 2be4: e3a02038 mov r2, #56 ; 0x38 2be8: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); 2bec: e5903014 ldr r3, [r0, #20] 2bf0: e3130c01 tst r3, #256 ; 0x100 2bf4: 1a000002 bne 2c04 2bf8: eb0028e9 bl cfa4 <__errno> 2bfc: e3a03009 mov r3, #9 2c00: ea000003 b 2c14 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2c04: e3130002 tst r3, #2 2c08: 1a000004 bne 2c20 2c0c: eb0028e4 bl cfa4 <__errno> 2c10: e3a03016 mov r3, #22 2c14: e5803000 str r3, [r0] 2c18: e3e00000 mvn r0, #0 2c1c: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2c20: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2c24: e351000b cmp r1, #11 2c28: 979ff101 ldrls pc, [pc, r1, lsl #2] 2c2c: ea000023 b 2cc0 2c30: 00002c60 .word 0x00002c60 2c34: 00002c68 .word 0x00002c68 2c38: 00002c70 .word 0x00002c70 2c3c: 00002c78 .word 0x00002c78 2c40: 00002c80 .word 0x00002c80 2c44: 00002c88 .word 0x00002c88 2c48: 00002c90 .word 0x00002c90 2c4c: 00002c98 .word 0x00002c98 2c50: 00002ca0 .word 0x00002ca0 2c54: 00002ca8 .word 0x00002ca8 2c58: 00002cb0 .word 0x00002cb0 2c5c: 00002cb8 .word 0x00002cb8 case _PC_LINK_MAX: return_value = the_limits->link_max; 2c60: e5930038 ldr r0, [r3, #56] ; 0x38 break; 2c64: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 2c68: e593003c ldr r0, [r3, #60] ; 0x3c break; 2c6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 2c70: e5930040 ldr r0, [r3, #64] ; 0x40 break; 2c74: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 2c78: e5930044 ldr r0, [r3, #68] ; 0x44 break; 2c7c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 2c80: e5930048 ldr r0, [r3, #72] ; 0x48 break; 2c84: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 2c88: e593004c ldr r0, [r3, #76] ; 0x4c break; 2c8c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 2c90: e5930054 ldr r0, [r3, #84] ; 0x54 break; 2c94: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 2c98: e5930058 ldr r0, [r3, #88] ; 0x58 break; 2c9c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 2ca0: e5930064 ldr r0, [r3, #100] ; 0x64 break; 2ca4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 2ca8: e5930050 ldr r0, [r3, #80] ; 0x50 break; 2cac: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2cb0: e593005c ldr r0, [r3, #92] ; 0x5c break; 2cb4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2cb8: e5930060 ldr r0, [r3, #96] ; 0x60 break; 2cbc: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2cc0: eb0028b7 bl cfa4 <__errno> 2cc4: e3a03016 mov r3, #22 2cc8: e5803000 str r3, [r0] 2ccc: e3e00000 mvn r0, #0 break; } return return_value; } 2cd0: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00002128 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 2128: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 212c: e2504000 subs r4, r0, #0 2130: 1a000004 bne 2148 rtems_set_errno_and_return_minus_one( EFAULT ); 2134: eb0027b7 bl c018 <__errno> <== NOT EXECUTED 2138: e3a0300e mov r3, #14 <== NOT EXECUTED 213c: e5803000 str r3, [r0] <== NOT EXECUTED 2140: e3e00000 mvn r0, #0 <== NOT EXECUTED 2144: ea00000c b 217c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; __asm__ volatile ( 2148: e10f5000 mrs r5, CPSR 214c: e3853080 orr r3, r5, #128 ; 0x80 2150: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 2154: e1a0000d mov r0, sp 2158: eb000f8c bl 5f90 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; __asm__ volatile ( 215c: 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; 2160: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 2164: e59d0004 ldr r0, [sp, #4] time->tv_sec = now.tv_sec; 2168: e5843000 str r3, [r4] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 216c: e3a01ffa mov r1, #1000 ; 0x3e8 2170: eb0035b1 bl f83c <__aeabi_idiv> time->tv_sec = now.tv_sec; time->tv_usec = useconds; 2174: e5840004 str r0, [r4, #4] * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 2178: e3a00000 mov r0, #0 } 217c: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== 0000b80c : IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) b80c: e5903018 ldr r3, [r0, #24] b810: e593304c ldr r3, [r3, #76] ; 0x4c b814: e3530001 cmp r3, #1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { b818: e92d4010 push {r4, lr} IMFS_jnode_t *the_jnode; /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) b81c: 1a000005 bne b838 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; b820: e3a03000 mov r3, #0 b824: e3a04000 mov r4, #0 b828: e580300c str r3, [r0, #12] b82c: e5804010 str r4, [r0, #16] return 0; b830: e3a00000 mov r0, #0 b834: e8bd8010 pop {r4, pc} /* Is the node a directory ? */ the_jnode = (IMFS_jnode_t *) iop->pathinfo.node_access; if ( the_jnode->type != IMFS_DIRECTORY ) return -1; /* It wasn't a directory --> return error */ b838: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } b83c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00003db8 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 3db8: e5913030 ldr r3, [r1, #48] ; 0x30 3dbc: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3dc0: e92d4030 push {r4, r5, lr} 3dc4: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 3dc8: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) 3dcc: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3dd0: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 3dd4: 0a000007 beq 3df8 c = tolower (c); 3dd8: e59f2164 ldr r2, [pc, #356] ; 3f44 3ddc: e5922000 ldr r2, [r2] 3de0: e0822005 add r2, r2, r5 3de4: e5d22001 ldrb r2, [r2, #1] 3de8: e2022003 and r2, r2, #3 3dec: e3520001 cmp r2, #1 3df0: 02855020 addeq r5, r5, #32 3df4: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { 3df8: e355000d cmp r5, #13 3dfc: 1a000005 bne 3e18 if (tty->termios.c_iflag & IGNCR) 3e00: e3130080 tst r3, #128 ; 0x80 3e04: 1a000048 bne 3f2c return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; 3e08: e3130c01 tst r3, #256 ; 0x100 3e0c: 03a0500d moveq r5, #13 3e10: 13a0500a movne r5, #10 3e14: ea000007 b 3e38 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3e18: e355000a cmp r5, #10 3e1c: 1a000003 bne 3e30 c = '\r'; 3e20: e3130040 tst r3, #64 ; 0x40 3e24: 03a0500a moveq r5, #10 3e28: 13a0500d movne r5, #13 3e2c: ea000001 b 3e38 } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 3e30: e3550000 cmp r5, #0 3e34: 0a00002c beq 3eec 3e38: e594303c ldr r3, [r4, #60] ; 0x3c 3e3c: e3130002 tst r3, #2 3e40: 0a000029 beq 3eec if (c == tty->termios.c_cc[VERASE]) { 3e44: e5d42043 ldrb r2, [r4, #67] ; 0x43 3e48: e1520005 cmp r2, r5 erase (tty, 0); 3e4c: 01a00004 moveq r0, r4 3e50: 03a01000 moveq r1, #0 } 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]) { 3e54: 0a000004 beq 3e6c erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3e58: e5d42044 ldrb r2, [r4, #68] ; 0x44 3e5c: e1520005 cmp r2, r5 3e60: 1a000003 bne 3e74 erase (tty, 1); 3e64: e1a00004 mov r0, r4 3e68: e3a01001 mov r1, #1 3e6c: ebffff60 bl 3bf4 3e70: ea00002d b 3f2c return 0; } else if (c == tty->termios.c_cc[VEOF]) { 3e74: e5d42045 ldrb r2, [r4, #69] ; 0x45 3e78: e1520005 cmp r2, r5 3e7c: 0a00002c beq 3f34 return 1; } else if (c == '\n') { 3e80: e355000a cmp r5, #10 3e84: 1a000008 bne 3eac if (tty->termios.c_lflag & (ECHO | ECHONL)) 3e88: e3130048 tst r3, #72 ; 0x48 echo (c, tty); 3e8c: 11a00005 movne r0, r5 3e90: 11a01004 movne r1, r4 3e94: 1bffff33 blne 3b68 tty->cbuf[tty->ccount++] = c; 3e98: e284201c add r2, r4, #28 3e9c: e892000c ldm r2, {r2, r3} 3ea0: e3a0100a mov r1, #10 3ea4: e7c21003 strb r1, [r2, r3] 3ea8: ea00000c b 3ee0 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 3eac: e5d4204c ldrb r2, [r4, #76] ; 0x4c 3eb0: e1520005 cmp r2, r5 3eb4: 0a000002 beq 3ec4 3eb8: e5d42051 ldrb r2, [r4, #81] ; 0x51 3ebc: e1520005 cmp r2, r5 3ec0: 1a000009 bne 3eec (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 3ec4: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 3ec8: 11a00005 movne r0, r5 <== NOT EXECUTED 3ecc: 11a01004 movne r1, r4 <== NOT EXECUTED 3ed0: 1bffff24 blne 3b68 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3ed4: e284201c add r2, r4, #28 <== NOT EXECUTED 3ed8: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 3edc: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED 3ee0: e2833001 add r3, r3, #1 3ee4: e5843020 str r3, [r4, #32] 3ee8: ea000011 b 3f34 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 3eec: e59f3054 ldr r3, [pc, #84] ; 3f48 3ef0: e5933008 ldr r3, [r3, #8] 3ef4: e5942020 ldr r2, [r4, #32] 3ef8: e2433001 sub r3, r3, #1 3efc: e1520003 cmp r2, r3 3f00: aa00000d bge 3f3c if (tty->termios.c_lflag & ECHO) 3f04: e594303c ldr r3, [r4, #60] ; 0x3c 3f08: e3130008 tst r3, #8 echo (c, tty); 3f0c: 11a00005 movne r0, r5 3f10: 11a01004 movne r1, r4 3f14: 1bffff13 blne 3b68 tty->cbuf[tty->ccount++] = c; 3f18: e284201c add r2, r4, #28 3f1c: e892000c ldm r2, {r2, r3} 3f20: e7c25003 strb r5, [r2, r3] 3f24: e2833001 add r3, r3, #1 3f28: e5843020 str r3, [r4, #32] if (tty->termios.c_iflag & IUCLC) c = tolower (c); if (c == '\r') { if (tty->termios.c_iflag & IGNCR) return 0; 3f2c: e3a00000 mov r0, #0 3f30: e8bd8030 pop {r4, r5, pc} else if (c == tty->termios.c_cc[VKILL]) { erase (tty, 1); return 0; } else if (c == tty->termios.c_cc[VEOF]) { return 1; 3f34: e3a00001 mov r0, #1 3f38: e8bd8030 pop {r4, r5, pc} if (tty->ccount < (CBUFSIZE-1)) { if (tty->termios.c_lflag & ECHO) echo (c, tty); tty->cbuf[tty->ccount++] = c; } return 0; 3f3c: e3a00000 mov r0, #0 <== NOT EXECUTED } 3f40: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 000205fc : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 205fc: e3a00000 mov r0, #0 <== NOT EXECUTED 20600: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000b57c : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { b57c: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; b580: e5905018 ldr r5, [r0, #24] if (the_jnode->type == IMFS_LINEAR_FILE) { b584: e595304c ldr r3, [r5, #76] ; 0x4c b588: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { b58c: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { b590: 1a00000b bne b5c4 if (iop->offset > the_jnode->info.linearfile.size) b594: e5953054 ldr r3, [r5, #84] ; 0x54 b598: e5901010 ldr r1, [r0, #16] b59c: e1510003 cmp r1, r3 b5a0: e5952050 ldr r2, [r5, #80] ; 0x50 b5a4: ca000003 bgt b5b8 b5a8: 1a000014 bne b600 b5ac: e590100c ldr r1, [r0, #12] b5b0: e1510002 cmp r1, r2 b5b4: 9a000011 bls b600 iop->offset = the_jnode->info.linearfile.size; b5b8: e584200c str r2, [r4, #12] <== NOT EXECUTED b5bc: e5843010 str r3, [r4, #16] <== NOT EXECUTED b5c0: ea00000e b b600 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) b5c4: e1a00005 mov r0, r5 b5c8: e284200c add r2, r4, #12 b5cc: e8920006 ldm r2, {r1, r2} b5d0: ebfffeed bl b18c b5d4: e3500000 cmp r0, #0 b5d8: 0a000005 beq b5f4 rtems_set_errno_and_return_minus_one( ENOSPC ); b5dc: eb00028d bl c018 <__errno> b5e0: e3a0301c mov r3, #28 b5e4: e5803000 str r3, [r0] b5e8: e3e04000 mvn r4, #0 b5ec: e3e03000 mvn r3, #0 b5f0: ea000004 b b608 iop->size = the_jnode->info.file.size; b5f4: e2853050 add r3, r5, #80 ; 0x50 b5f8: e893000c ldm r3, {r2, r3} b5fc: e984000c stmib r4, {r2, r3} } return iop->offset; b600: e284400c add r4, r4, #12 b604: e8940018 ldm r4, {r3, r4} } b608: e1a00003 mov r0, r3 b60c: e1a01004 mov r1, r4 b610: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000b488 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) b488: e5903014 ldr r3, [r0, #20] b48c: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { b490: e92d4031 push {r0, r4, r5, lr} b494: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; b498: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) b49c: 0a000015 beq b4f8 && (the_jnode->type == IMFS_LINEAR_FILE)) { b4a0: e594304c ldr r3, [r4, #76] ; 0x4c b4a4: e3530006 cmp r3, #6 b4a8: 1a000012 bne b4f8 uint32_t count = the_jnode->info.linearfile.size; b4ac: 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; b4b0: e3a00000 mov r0, #0 <== NOT EXECUTED if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) && (the_jnode->type == IMFS_LINEAR_FILE)) { uint32_t count = the_jnode->info.linearfile.size; const unsigned char *buffer = the_jnode->info.linearfile.direct; the_jnode->type = IMFS_MEMORY_FILE; b4b4: e3a02005 mov r2, #5 <== NOT EXECUTED b4b8: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; b4bc: e3a01000 mov r1, #0 <== NOT EXECUTED b4c0: e3a02000 mov r2, #0 <== NOT EXECUTED the_jnode->info.file.indirect = 0; the_jnode->info.file.doubly_indirect = 0; the_jnode->info.file.triply_indirect = 0; if ((count != 0) b4c4: e15c0000 cmp ip, r0 <== 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; b4c8: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; b4cc: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED b4d0: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; b4d4: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; b4d8: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; b4dc: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) b4e0: 0a000004 beq b4f8 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) b4e4: e1a00004 mov r0, r4 <== NOT EXECUTED b4e8: e58dc000 str ip, [sp] <== NOT EXECUTED b4ec: ebffff6d bl b2a8 <== NOT EXECUTED b4f0: e3700001 cmn r0, #1 <== NOT EXECUTED b4f4: 0a000009 beq b520 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) b4f8: e5953014 ldr r3, [r5, #20] b4fc: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; b500: 12843050 addne r3, r4, #80 ; 0x50 b504: 1893000c ldmne r3, {r2, r3} b508: 1585200c strne r2, [r5, #12] b50c: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; b510: e2844050 add r4, r4, #80 ; 0x50 b514: e8940018 ldm r4, {r3, r4} b518: e9850018 stmib r5, {r3, r4} return 0; b51c: e3a00000 mov r0, #0 } b520: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 00002624 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2624: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2628: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 262c: e24dd02c sub sp, sp, #44 ; 0x2c 2630: e1a06000 mov r6, r0 2634: e1a0b001 mov fp, r1 2638: e1a0a002 mov sl, r2 263c: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2640: 8a000004 bhi 2658 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 2644: e1a00002 mov r0, r2 2648: eb001d6a bl 9bf8 if ( !mount_h ) 264c: e3500000 cmp r0, #0 2650: e58d0014 str r0, [sp, #20] 2654: 1a000002 bne 2664 rtems_set_errno_and_return_minus_one( EINVAL ); 2658: eb00266e bl c018 <__errno> 265c: e3a03016 mov r3, #22 2660: ea00003b b 2754 { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; bool has_target = target != NULL; 2664: e25b5000 subs r5, fp, #0 2668: 13a05001 movne r5, #1 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 266c: e59f3258 ldr r3, [pc, #600] ; 28cc 2670: e3550000 cmp r5, #0 2674: 11a0300b movne r3, fp size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2678: e1a0000a mov r0, sl const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 267c: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2680: eb002a4e bl cfc0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2684: e3560000 cmp r6, #0 const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2688: e2809001 add r9, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 268c: 01a07006 moveq r7, r6 2690: 0a000002 beq 26a0 2694: e1a00006 mov r0, r6 2698: eb002a48 bl cfc0 269c: e2807001 add r7, r0, #1 size_t target_size = strlen( target ) + 1; 26a0: e59d0004 ldr r0, [sp, #4] 26a4: eb002a45 bl cfc0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 26a8: e2891074 add r1, r9, #116 ; 0x74 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 26ac: e2803001 add r3, r0, #1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 26b0: e0811007 add r1, r1, r7 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 26b4: e58d0010 str r0, [sp, #16] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 26b8: e0811003 add r1, r1, r3 26bc: e3a00001 mov r0, #1 { const char *target = target_or_null != NULL ? target_or_null : "/"; size_t filesystemtype_size = strlen( filesystemtype ) + 1; size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; size_t target_size = strlen( target ) + 1; 26c0: e58d3008 str r3, [sp, #8] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 26c4: ebfffe0a bl 1ef4 if ( mt_entry != NULL ) { 26c8: e2504000 subs r4, r0, #0 26cc: 0a00001e beq 274c char *str = (char *) mt_entry + sizeof( *mt_entry ); 26d0: e2848074 add r8, r4, #116 ; 0x74 memcpy( str, filesystemtype, filesystemtype_size ); 26d4: e1a00008 mov r0, r8 26d8: e1a0100a mov r1, sl 26dc: e1a02009 mov r2, r9 26e0: eb00287a bl c8d0 mt_entry->type = str; 26e4: e584806c str r8, [r4, #108] ; 0x6c str += filesystemtype_size; 26e8: e0888009 add r8, r8, r9 memcpy( str, source_or_null, source_size ); 26ec: e1a00008 mov r0, r8 26f0: e1a01006 mov r1, r6 26f4: e1a02007 mov r2, r7 26f8: eb002874 bl c8d0 mt_entry->dev = str; 26fc: e5848070 str r8, [r4, #112] ; 0x70 str += source_size; 2700: e0888007 add r8, r8, r7 memcpy( str, target, target_size ); 2704: e99d0006 ldmib sp, {r1, r2} 2708: e1a00008 mov r0, r8 270c: eb00286f bl c8d0 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 2710: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2714: e59fe1b4 ldr lr, [pc, #436] ; 28d0 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 2718: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 271c: e8be000f ldm lr!, {r0, r1, r2, r3} 2720: e284c038 add ip, r4, #56 ; 0x38 2724: e8ac000f stmia ip!, {r0, r1, r2, r3} 2728: e8be000f ldm lr!, {r0, r1, r2, r3} 272c: e8ac000f stmia ip!, {r0, r1, r2, r3} 2730: e89e000f ldm lr, {r0, r1, r2, r3} /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 2734: e3550000 cmp r5, #0 memcpy( str, source_or_null, source_size ); mt_entry->dev = str; str += source_size; memcpy( str, target, target_size ); mt_entry->target = str; 2738: e5848068 str r8, [r4, #104] ; 0x68 &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; 273c: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2740: e88c000f stm ip, {r0, r1, r2, r3} /* * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { 2744: 0a00002e beq 2804 2748: ea000003 b 275c target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 274c: eb002631 bl c018 <__errno> <== NOT EXECUTED 2750: e3a0300c mov r3, #12 <== NOT EXECUTED 2754: e5803000 str r3, [r0] 2758: ea000058 b 28c0 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 275c: e3a03001 mov r3, #1 2760: e28d6018 add r6, sp, #24 2764: e58d3000 str r3, [sp] 2768: e1a0000b mov r0, fp 276c: e59d1010 ldr r1, [sp, #16] 2770: e3a02007 mov r2, #7 2774: e1a03006 mov r3, r6 2778: ebfffe0c bl 1fb0 277c: e3700001 cmn r0, #1 2780: 0a000048 beq 28a8 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2784: e1a00006 mov r0, r6 2788: e59d3024 ldr r3, [sp, #36] ; 0x24 278c: e1a0e00f mov lr, pc 2790: e593f010 ldr pc, [r3, #16] 2794: e3500001 cmp r0, #1 2798: 0a000002 beq 27a8 errno = ENOTDIR; 279c: eb00261d bl c018 <__errno> 27a0: e3a03014 mov r3, #20 27a4: ea000006 b 27c4 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 27a8: e59f0124 ldr r0, [pc, #292] ; 28d4 27ac: e59d1018 ldr r1, [sp, #24] 27b0: ebffff85 bl 25cc 27b4: e3500000 cmp r0, #0 27b8: 0a000003 beq 27cc errno = EBUSY; 27bc: eb002615 bl c018 <__errno> 27c0: e3a03010 mov r3, #16 27c4: e5803000 str r3, [r0] goto cleanup_and_bail; 27c8: ea000037 b 28ac * may have been allocated in loc should not be sent to freenode * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; 27cc: e59d3018 ldr r3, [sp, #24] 27d0: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 27d4: e59d3020 ldr r3, [sp, #32] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 27d8: e59d2028 ldr r2, [sp, #40] ; 0x28 * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; 27dc: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; 27e0: e59d3024 ldr r3, [sp, #36] ; 0x24 mt_entry->mt_point_node.mt_entry = loc.mt_entry; 27e4: e5842018 str r2, [r4, #24] * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 27e8: e5843014 str r3, [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( mt_entry ) ) { 27ec: e1a00004 mov r0, r4 27f0: e1a0e00f mov lr, pc 27f4: e593f020 ldr pc, [r3, #32] 27f8: e3500000 cmp r0, #0 27fc: 0a00000b beq 2830 2800: ea000029 b 28ac <== NOT EXECUTED stop = (*routine)( mt_entry, routine_arg ); } rtems_libio_unlock(); return stop; } 2804: e59f30cc ldr r3, [pc, #204] ; 28d8 */ RTEMS_INLINE_ROUTINE const Chain_Node *_Chain_Immutable_tail( const Chain_Control *the_chain ) { return &the_chain->Tail.Node; 2808: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 280c: e5933000 ldr r3, [r3] 2810: e1530002 cmp r3, r2 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 2814: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2818: 0a000004 beq 2830 errno = EINVAL; 281c: eb0025fd bl c018 <__errno> 2820: e3a03016 mov r3, #22 2824: e5803000 str r3, [r0] ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 2828: e1a06005 mov r6, r5 /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; goto cleanup_and_bail; 282c: ea00001e b 28ac * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 2830: e1a00004 mov r0, r4 2834: e59d1050 ldr r1, [sp, #80] ; 0x50 2838: e59d3014 ldr r3, [sp, #20] 283c: e1a0e00f mov lr, pc 2840: e12fff13 bx r3 2844: e2507000 subs r7, r0, #0 2848: 0a000004 beq 2860 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 284c: e1a00004 mov r0, r4 2850: e59d3024 ldr r3, [sp, #36] ; 0x24 2854: e1a0e00f mov lr, pc 2858: e593f028 ldr pc, [r3, #40] ; 0x28 goto cleanup_and_bail; 285c: ea000012 b 28ac } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 2860: ebffff4f bl 25a4 2864: e59f006c ldr r0, [pc, #108] ; 28d8 2868: e1a01004 mov r1, r4 286c: eb000cc9 bl 5b98 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 2870: ebffff51 bl 25bc if ( !has_target ) 2874: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 2878: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 287c: 1a000010 bne 28c4 rtems_filesystem_root = mt_entry->mt_fs_root; 2880: e59f3054 ldr r3, [pc, #84] ; 28dc 2884: e284401c add r4, r4, #28 2888: e593c000 ldr ip, [r3] 288c: e8b4000f ldm r4!, {r0, r1, r2, r3} 2890: e28cc018 add ip, ip, #24 2894: e8ac000f stmia ip!, {r0, r1, r2, r3} 2898: e5943000 ldr r3, [r4] return 0; 289c: e1a00005 mov r0, r5 rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) rtems_filesystem_root = mt_entry->mt_fs_root; 28a0: e58c3000 str r3, [ip] 28a4: ea000006 b 28c4 ) { rtems_filesystem_fsmount_me_t mount_h = NULL; rtems_filesystem_location_info_t loc; rtems_filesystem_mount_table_entry_t *mt_entry = NULL; rtems_filesystem_location_info_t *loc_to_free = NULL; 28a8: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 28ac: e1a00004 mov r0, r4 28b0: ebfffdf3 bl 2084 if ( loc_to_free ) 28b4: e3560000 cmp r6, #0 rtems_filesystem_freenode( loc_to_free ); 28b8: 11a00006 movne r0, r6 28bc: 1bfffdeb blne 2070 return -1; 28c0: e3e00000 mvn r0, #0 } 28c4: e28dd02c add sp, sp, #44 ; 0x2c 28c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000028e4 : */ int newlib_free_buffers( FILE *fp ) { 28e4: e92d4010 push {r4, lr} 28e8: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 28ec: eb0026cc bl c424 28f0: e3500002 cmp r0, #2 28f4: 8a00000b bhi 2928 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 28f8: e1d430bc ldrh r3, [r4, #12] 28fc: e3130080 tst r3, #128 ; 0x80 2900: 0a00000a beq 2930 free( fp->_bf._base ); 2904: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2908: ebfffddd bl 2084 <== NOT EXECUTED fp->_flags &= ~__SMBF; 290c: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED 2910: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED 2914: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2918: e3a03000 mov r3, #0 <== NOT EXECUTED 291c: e5843000 str r3, [r4] <== NOT EXECUTED 2920: e5843010 str r3, [r4, #16] <== NOT EXECUTED 2924: ea000001 b 2930 <== NOT EXECUTED } break; default: fclose(fp); 2928: e1a00004 mov r0, r4 <== NOT EXECUTED 292c: eb002607 bl c150 <== NOT EXECUTED } return 0; } 2930: e3a00000 mov r0, #0 2934: e8bd8010 pop {r4, pc} =============================================================================== 00003a18 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3a18: e92d4011 push {r0, r4, lr} 3a1c: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 3a20: e5913034 ldr r3, [r1, #52] ; 0x34 3a24: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3a28: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { 3a2c: 0a000045 beq 3b48 switch (c) { 3a30: e5dd2000 ldrb r2, [sp] 3a34: e2421008 sub r1, r2, #8 3a38: e3510005 cmp r1, #5 3a3c: 979ff101 ldrls pc, [pc, r1, lsl #2] 3a40: ea00002c b 3af8 3a44: 00003ae4 .word 0x00003ae4 3a48: 00003abc .word 0x00003abc 3a4c: 00003a5c .word 0x00003a5c 3a50: 00003af8 .word 0x00003af8 3a54: 00003af8 .word 0x00003af8 3a58: 00003a84 .word 0x00003a84 case '\n': if (tty->termios.c_oflag & ONLRET) 3a5c: e3130020 tst r3, #32 tty->column = 0; 3a60: 13a02000 movne r2, #0 3a64: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 3a68: e3130004 tst r3, #4 3a6c: 0a000035 beq 3b48 rtems_termios_puts ("\r", 1, tty); 3a70: e59f00e4 ldr r0, [pc, #228] ; 3b5c 3a74: e3a01001 mov r1, #1 3a78: e1a02004 mov r2, r4 3a7c: ebffffa5 bl 3918 3a80: ea00000b b 3ab4 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 3a84: e3130010 tst r3, #16 <== NOT EXECUTED 3a88: 0a000002 beq 3a98 <== NOT EXECUTED 3a8c: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 3a90: e3520000 cmp r2, #0 <== NOT EXECUTED 3a94: 0a00002f beq 3b58 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 3a98: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 3a9c: 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) { 3aa0: 0a000028 beq 3b48 <== NOT EXECUTED c = '\n'; 3aa4: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 3aa8: 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'; 3aac: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 3ab0: 0a000024 beq 3b48 <== NOT EXECUTED tty->column = 0; 3ab4: e3a03000 mov r3, #0 3ab8: ea000021 b 3b44 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3abc: e5942028 ldr r2, [r4, #40] ; 0x28 3ac0: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3ac4: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3ac8: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3acc: e3530b06 cmp r3, #6144 ; 0x1800 3ad0: e0813002 add r3, r1, r2 tty->column += i; 3ad4: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 3ad8: 059f0080 ldreq r0, [pc, #128] ; 3b60 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3adc: 1a000018 bne 3b44 3ae0: ea00001a b 3b50 } tty->column += i; break; case '\b': if (tty->column > 0) 3ae4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3ae8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3aec: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 3af0: ca000013 bgt 3b44 <== NOT EXECUTED 3af4: ea000013 b 3b48 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 3af8: e3130002 tst r3, #2 3afc: 0a000007 beq 3b20 c = toupper(c); 3b00: e59f305c ldr r3, [pc, #92] ; 3b64 <== NOT EXECUTED 3b04: e5933000 ldr r3, [r3] <== NOT EXECUTED 3b08: e0833002 add r3, r3, r2 <== NOT EXECUTED 3b0c: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 3b10: e2033003 and r3, r3, #3 <== NOT EXECUTED 3b14: e3530002 cmp r3, #2 <== NOT EXECUTED 3b18: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 3b1c: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 3b20: e59f203c ldr r2, [pc, #60] ; 3b64 3b24: e5dd3000 ldrb r3, [sp] 3b28: e5922000 ldr r2, [r2] 3b2c: e0823003 add r3, r2, r3 3b30: e5d33001 ldrb r3, [r3, #1] 3b34: e3130020 tst r3, #32 3b38: 1a000002 bne 3b48 tty->column++; 3b3c: e5943028 ldr r3, [r4, #40] ; 0x28 3b40: e2833001 add r3, r3, #1 3b44: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 3b48: e1a0000d mov r0, sp 3b4c: e3a01001 mov r1, #1 3b50: e1a02004 mov r2, r4 3b54: ebffff6f bl 3918 } 3b58: e8bd8018 pop {r3, r4, pc} =============================================================================== 0000bd04 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { bd04: e59f3058 ldr r3, [pc, #88] ; bd64 bd08: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { bd0c: e92d4070 push {r4, r5, r6, lr} bd10: e1a04000 mov r4, r0 bd14: e1a05002 mov r5, r2 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; bd18: 13e00015 mvnne r0, #21 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { bd1c: 18bd8070 popne {r4, r5, r6, pc} if (buffer == NULL) bd20: e3520000 cmp r2, #0 return -EFAULT; bd24: 03e0000d mvneq r0, #13 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) bd28: 08bd8070 popeq {r4, r5, r6, pc} return -EFAULT; if (! PIPE_LOCK(pipe)) bd2c: e3a01000 mov r1, #0 bd30: e5940028 ldr r0, [r4, #40] ; 0x28 bd34: e1a02001 mov r2, r1 bd38: ebffed05 bl 7154 bd3c: e2506000 subs r6, r0, #0 bd40: 1a000005 bne bd5c return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; bd44: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); bd48: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; bd4c: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); bd50: ebffed45 bl 726c return 0; bd54: e1a00006 mov r0, r6 bd58: e8bd8070 pop {r4, r5, r6, pc} if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) return -EINTR; bd5c: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } bd60: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0000b9ec : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b9ec: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} b9f0: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b9f4: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b9f8: e1a04000 mov r4, r0 b9fc: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ba00: e5900028 ldr r0, [r0, #40] ; 0x28 ba04: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { ba08: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ba0c: ebffedd0 bl 7154 ba10: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); ba14: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ba18: 0a000043 beq bb2c ba1c: ea00004f b bb60 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ba20: e5947014 ldr r7, [r4, #20] ba24: e3570000 cmp r7, #0 ba28: 0a000044 beq bb40 goto out_locked; if (LIBIO_NODELAY(iop)) { ba2c: e59a8014 ldr r8, [sl, #20] ba30: e2188001 ands r8, r8, #1 ba34: 1a000040 bne bb3c ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ba38: e5943018 ldr r3, [r4, #24] ba3c: e2833001 add r3, r3, #1 ba40: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); ba44: e5940028 ldr r0, [r4, #40] ; 0x28 ba48: ebffee07 bl 726c if (! PIPE_READWAIT(pipe)) ba4c: e1a01008 mov r1, r8 ba50: e594002c ldr r0, [r4, #44] ; 0x2c ba54: eb000385 bl c870 ba58: e3500000 cmp r0, #0 ba5c: 01a07000 moveq r7, r0 ba60: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ba64: e1a01008 mov r1, r8 ba68: e5940028 ldr r0, [r4, #40] ; 0x28 ba6c: e1a02008 mov r2, r8 ba70: ebffedb7 bl 7154 ba74: e3500000 cmp r0, #0 ba78: 1a000033 bne bb4c /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ba7c: e5943018 ldr r3, [r4, #24] if (ret != 0) ba80: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ba84: e2433001 sub r3, r3, #1 ba88: e5843018 str r3, [r4, #24] if (ret != 0) ba8c: 1a00002b bne bb40 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { ba90: e594300c ldr r3, [r4, #12] ba94: e3530000 cmp r3, #0 ba98: 0affffe0 beq ba20 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ba9c: e0667005 rsb r7, r6, r5 baa0: e1530007 cmp r3, r7 baa4: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; baa8: e5948004 ldr r8, [r4, #4] baac: e5943008 ldr r3, [r4, #8] bab0: e5941000 ldr r1, [r4] bab4: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { bab8: e1570008 cmp r7, r8 babc: e0890006 add r0, r9, r6 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); bac0: d0811003 addle r1, r1, r3 bac4: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { bac8: da000006 ble bae8 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); bacc: e0811003 add r1, r1, r3 bad0: e1a02008 mov r2, r8 bad4: eb000c4a bl ec04 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); bad8: e0860008 add r0, r6, r8 badc: e5941000 ldr r1, [r4] bae0: e0890000 add r0, r9, r0 bae4: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); bae8: eb000c45 bl ec04 pipe->Start += chunk; baec: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; baf0: e5941004 ldr r1, [r4, #4] baf4: e0870000 add r0, r7, r0 baf8: eb003ba2 bl 1a988 <__umodsi3> pipe->Length -= chunk; bafc: e594300c ldr r3, [r4, #12] bb00: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) bb04: e3530000 cmp r3, #0 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; bb08: e5840008 str r0, [r4, #8] pipe->Length -= chunk; bb0c: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; bb10: 05843008 streq r3, [r4, #8] if (pipe->waitingWriters > 0) bb14: e594301c ldr r3, [r4, #28] bb18: e3530000 cmp r3, #0 PIPE_WAKEUPWRITERS(pipe); bb1c: 15940030 ldrne r0, [r4, #48] ; 0x30 bb20: 11a0100d movne r1, sp bb24: 1b00033b blne c818 read += chunk; bb28: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { bb2c: e1560005 cmp r6, r5 bb30: 3affffd6 bcc ba90 bb34: e3a07000 mov r7, #0 bb38: ea000000 b bb40 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; bb3c: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); bb40: e5940028 ldr r0, [r4, #40] ; 0x28 bb44: ebffedc8 bl 726c bb48: ea000000 b bb50 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; bb4c: e3e07003 mvn r7, #3 <== NOT EXECUTED out_locked: PIPE_UNLOCK(pipe); out_nolock: if (read > 0) bb50: e3560000 cmp r6, #0 bb54: c1a00006 movgt r0, r6 bb58: d1a00007 movle r0, r7 bb5c: ea000000 b bb64 ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; bb60: e3e00003 mvn r0, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } bb64: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000bb68 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { bb68: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) bb6c: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { bb70: e1a04000 mov r4, r0 bb74: e1a0b001 mov fp, r1 bb78: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; bb7c: 01a00007 moveq r0, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) bb80: 0a00005e beq bd00 return 0; if (! PIPE_LOCK(pipe)) bb84: e3a01000 mov r1, #0 bb88: e5940028 ldr r0, [r4, #40] ; 0x28 bb8c: e1a02001 mov r2, r1 bb90: ebffed6f bl 7154 bb94: e3500000 cmp r0, #0 return -EINTR; bb98: 13e00003 mvnne r0, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) bb9c: 1a000057 bne bd00 return -EINTR; if (pipe->Readers == 0) { bba0: e5945010 ldr r5, [r4, #16] bba4: e3550000 cmp r5, #0 bba8: 0a00004c beq bce0 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; bbac: e5949004 ldr r9, [r4, #4] bbb0: e1570009 cmp r7, r9 bbb4: 91a09007 movls r9, r7 bbb8: 83a09001 movhi r9, #1 /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; bbbc: e1a05000 mov r5, r0 bbc0: ea000040 b bcc8 /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { bbc4: e598a014 ldr sl, [r8, #20] bbc8: e21aa001 ands sl, sl, #1 bbcc: 1a000041 bne bcd8 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; bbd0: e594301c ldr r3, [r4, #28] bbd4: e2833001 add r3, r3, #1 bbd8: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); bbdc: e5940028 ldr r0, [r4, #40] ; 0x28 bbe0: ebffeda1 bl 726c if (! PIPE_WRITEWAIT(pipe)) bbe4: e1a0100a mov r1, sl bbe8: e5940030 ldr r0, [r4, #48] ; 0x30 bbec: eb00031f bl c870 bbf0: e3500000 cmp r0, #0 bbf4: 01a06000 moveq r6, r0 bbf8: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { bbfc: e1a0100a mov r1, sl bc00: e5940028 ldr r0, [r4, #40] ; 0x28 bc04: e1a0200a mov r2, sl bc08: ebffed51 bl 7154 bc0c: e3500000 cmp r0, #0 bc10: 1a000036 bne bcf0 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; bc14: e594301c ldr r3, [r4, #28] if (ret != 0) bc18: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; bc1c: e2433001 sub r3, r3, #1 bc20: e584301c str r3, [r4, #28] if (ret != 0) bc24: 1a00002e bne bce4 goto out_locked; if (pipe->Readers == 0) { bc28: e5943010 ldr r3, [r4, #16] bc2c: e3530000 cmp r3, #0 bc30: 0a00002a beq bce0 /* 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) { bc34: e594a004 ldr sl, [r4, #4] bc38: e594300c ldr r3, [r4, #12] bc3c: e063200a rsb r2, r3, sl bc40: e1520009 cmp r2, r9 bc44: 3affffde bcc bbc4 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); bc48: e5940008 ldr r0, [r4, #8] bc4c: e1a0100a mov r1, sl bc50: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); bc54: e0656007 rsb r6, r5, r7 bc58: e1520006 cmp r2, r6 bc5c: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); bc60: eb003b48 bl 1a988 <__umodsi3> bc64: e5943000 ldr r3, [r4] bc68: e060a00a rsb sl, r0, sl if (chunk > chunk1) { bc6c: e156000a cmp r6, sl bc70: e08b1005 add r1, fp, r5 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); bc74: d0830000 addle r0, r3, r0 bc78: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { bc7c: da000006 ble bc9c memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); bc80: e1a0200a mov r2, sl bc84: e0830000 add r0, r3, r0 bc88: eb000bdd bl ec04 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); bc8c: e08a1005 add r1, sl, r5 bc90: e5940000 ldr r0, [r4] bc94: e08b1001 add r1, fp, r1 bc98: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); bc9c: eb000bd8 bl ec04 pipe->Length += chunk; bca0: e594300c ldr r3, [r4, #12] bca4: e0833006 add r3, r3, r6 bca8: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) bcac: e5943018 ldr r3, [r4, #24] bcb0: e3530000 cmp r3, #0 PIPE_WAKEUPREADERS(pipe); bcb4: 1594002c ldrne r0, [r4, #44] ; 0x2c bcb8: 11a0100d movne r1, sp bcbc: 1b0002d5 blne c818 written += chunk; bcc0: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; bcc4: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { bcc8: e1550007 cmp r5, r7 bccc: 3affffd8 bcc bc34 bcd0: e3a06000 mov r6, #0 bcd4: ea000002 b bce4 while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; bcd8: e3e0600a mvn r6, #10 bcdc: ea000000 b bce4 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; bce0: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); bce4: e5940028 ldr r0, [r4, #40] ; 0x28 bce8: ebffed5f bl 726c bcec: ea000000 b bcf4 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; bcf0: e3e06003 mvn r6, #3 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) bcf4: e3550000 cmp r5, #0 bcf8: c1a00005 movgt r0, r5 bcfc: d1a00006 movle r0, r6 return written; return ret; } bd00: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00011374 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11374: e59f310c ldr r3, [pc, #268] ; 11488 11378: e5932010 ldr r2, [r3, #16] 1137c: e2822001 add r2, r2, #1 void *realloc( void *ptr, size_t size ) { 11380: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 11384: e5832010 str r2, [r3, #16] /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { 11388: e59f30fc ldr r3, [pc, #252] ; 1148c 1138c: e5933000 ldr r3, [r3] 11390: e3530003 cmp r3, #3 void *realloc( void *ptr, size_t size ) { 11394: e1a04000 mov r4, r0 11398: 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())) { 1139c: 1a000009 bne 113c8 if (_Thread_Dispatch_disable_level > 0) 113a0: e59f30e8 ldr r3, [pc, #232] ; 11490 113a4: e5933000 ldr r3, [r3] 113a8: e3530000 cmp r3, #0 return (void *) 0; 113ac: 13a04000 movne r4, #0 /* * Do not attempt to allocate memory if in a critical section or ISR. */ if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) 113b0: 1a000032 bne 11480 return (void *) 0; if (_ISR_Nest_level > 0) 113b4: e59f20d8 ldr r2, [pc, #216] ; 11494 113b8: e5922000 ldr r2, [r2] 113bc: e3520000 cmp r2, #0 return (void *) 0; 113c0: 11a04003 movne r4, r3 if (_System_state_Is_up(_System_state_Get())) { if (_Thread_Dispatch_disable_level > 0) return (void *) 0; if (_ISR_Nest_level > 0) 113c4: 1a00002d bne 11480 } /* * Continue with realloc(). */ if ( !ptr ) 113c8: e3540000 cmp r4, #0 113cc: 1a000003 bne 113e0 return malloc( size ); 113d0: e1a00005 mov r0, r5 113d4: ebffc3f9 bl 23c0 113d8: e1a04000 mov r4, r0 113dc: ea000027 b 11480 if ( !size ) { 113e0: e3550000 cmp r5, #0 113e4: 1a000003 bne 113f8 free( ptr ); 113e8: e1a00004 mov r0, r4 <== NOT EXECUTED 113ec: ebffc324 bl 2084 <== NOT EXECUTED return (void *) 0; 113f0: e1a04005 mov r4, r5 <== NOT EXECUTED 113f4: ea000021 b 11480 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 113f8: e59f6098 ldr r6, [pc, #152] ; 11498 113fc: e1a01004 mov r1, r4 11400: e5960000 ldr r0, [r6] 11404: e1a0200d mov r2, sp 11408: eb00004e bl 11548 <_Protected_heap_Get_block_size> 1140c: e2507000 subs r7, r0, #0 11410: 1a000004 bne 11428 errno = EINVAL; 11414: ebffeaff bl c018 <__errno> 11418: e3a03016 mov r3, #22 1141c: e5803000 str r3, [r0] return (void *) 0; 11420: e1a04007 mov r4, r7 11424: ea000015 b 11480 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 11428: e5960000 ldr r0, [r6] 1142c: e1a01004 mov r1, r4 11430: e1a02005 mov r2, r5 11434: eb000054 bl 1158c <_Protected_heap_Resize_block> 11438: e3500000 cmp r0, #0 1143c: 1a00000f bne 11480 * 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 ); 11440: e1a00005 mov r0, r5 11444: ebffc3dd bl 23c0 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11448: e59f3038 ldr r3, [pc, #56] ; 11488 1144c: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 11450: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 11454: e2422001 sub r2, r2, #1 11458: e5832004 str r2, [r3, #4] if ( !new_area ) { 1145c: 0a000006 beq 1147c return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 11460: e59d2000 ldr r2, [sp] 11464: e1a01004 mov r1, r4 11468: e1550002 cmp r5, r2 1146c: 31a02005 movcc r2, r5 11470: ebffed16 bl c8d0 free( ptr ); 11474: e1a00004 mov r0, r4 11478: ebffc301 bl 2084 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 1147c: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 11480: e1a00004 mov r0, r4 11484: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 000026d0 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 26d0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timestamp_Control uptime, total, ran, uptime_at_last_reset; #else uint32_t total_units = 0; #endif if ( !print ) 26d4: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 26d8: e24dd050 sub sp, sp, #80 ; 0x50 26dc: e1a09000 mov r9, r0 Timestamp_Control uptime, total, ran, uptime_at_last_reset; #else uint32_t total_units = 0; #endif if ( !print ) 26e0: 0a000060 beq 2868 * 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__ uptime_at_last_reset = CPU_usage_Uptime_at_last_reset; 26e4: e59f3184 ldr r3, [pc, #388] ; 2870 26e8: e8930018 ldm r3, {r3, r4} } } } #endif (*print)( 26ec: e59f1180 ldr r1, [pc, #384] ; 2874 * 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__ uptime_at_last_reset = CPU_usage_Uptime_at_last_reset; 26f0: e58d3028 str r3, [sp, #40] ; 0x28 26f4: e58d402c str r4, [sp, #44] ; 0x2c } } } #endif (*print)( 26f8: e1a0e00f mov lr, pc 26fc: e12fff1a bx sl 2700: e59f5170 ldr r5, [pc, #368] ; 2878 2704: e28d8040 add r8, sp, #64 ; 0x40 "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { #if !defined(RTEMS_POSIX_API) || defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) 2708: e5b53004 ldr r3, [r5, #4]! 270c: e3530000 cmp r3, #0 2710: 0a000048 beq 2838 continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 2714: e5936004 ldr r6, [r3, #4] if ( information ) { 2718: e3560000 cmp r6, #0 271c: 13a07001 movne r7, #1 _Timestamp_Add_to( &ran, &used ); } else { _TOD_Get_uptime( &uptime ); } _Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total ); _Timestamp_Divide( &ran, &total, &ival, &fval ); 2720: 128db030 addne fp, sp, #48 ; 0x30 if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 2724: 1a000040 bne 282c 2728: ea000042 b 2838 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 272c: e596301c ldr r3, [r6, #28] 2730: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 2734: e3540000 cmp r4, #0 2738: 0a00003a beq 2828 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 273c: e3a0100d mov r1, #13 2740: e28d2008 add r2, sp, #8 2744: e5940008 ldr r0, [r4, #8] 2748: eb000fde bl 66c8 (*print)( 274c: e5942008 ldr r2, [r4, #8] 2750: e28d3008 add r3, sp, #8 2754: e1a00009 mov r0, r9 2758: e59f111c ldr r1, [pc, #284] ; 287c 275c: e1a0e00f mov lr, pc 2760: 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; 2764: e2843084 add r3, r4, #132 ; 0x84 2768: e893000c ldm r3, {r2, r3} 276c: e58d2030 str r2, [sp, #48] ; 0x30 2770: e58d3034 str r3, [sp, #52] ; 0x34 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 2774: e59f2104 ldr r2, [pc, #260] ; 2880 2778: e5923004 ldr r3, [r2, #4] 277c: e5932008 ldr r2, [r3, #8] 2780: e5943008 ldr r3, [r4, #8] 2784: e1520003 cmp r2, r3 2788: 1a00000e bne 27c8 Timestamp_Control used; Timestamp_Control last = _Thread_Time_of_last_context_switch; 278c: e59f20f0 ldr r2, [pc, #240] ; 2884 2790: e8920018 ldm r2, {r3, r4} _TOD_Get_uptime( &uptime ); 2794: e1a00008 mov r0, r8 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; Timestamp_Control last = _Thread_Time_of_last_context_switch; 2798: e58d3018 str r3, [sp, #24] 279c: e58d401c str r4, [sp, #28] _TOD_Get_uptime( &uptime ); _Timestamp_Subtract( &last, &uptime, &used ); 27a0: e28d4020 add r4, sp, #32 */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; Timestamp_Control last = _Thread_Time_of_last_context_switch; _TOD_Get_uptime( &uptime ); 27a4: eb001453 bl 78f8 <_TOD_Get_uptime> _Timestamp_Subtract( &last, &uptime, &used ); 27a8: e28d0018 add r0, sp, #24 27ac: e1a01008 mov r1, r8 27b0: e1a02004 mov r2, r4 27b4: eb001d05 bl 9bd0 <_Timespec_Subtract> _Timestamp_Add_to( &ran, &used ); 27b8: e1a0000b mov r0, fp 27bc: e1a01004 mov r1, r4 27c0: eb001cc7 bl 9ae4 <_Timespec_Add_to> 27c4: ea000001 b 27d0 } else { _TOD_Get_uptime( &uptime ); 27c8: e1a00008 mov r0, r8 27cc: eb001449 bl 78f8 <_TOD_Get_uptime> } _Timestamp_Subtract( &uptime_at_last_reset, &uptime, &total ); 27d0: e28d0028 add r0, sp, #40 ; 0x28 27d4: e1a01008 mov r1, r8 27d8: e28d2038 add r2, sp, #56 ; 0x38 27dc: eb001cfb bl 9bd0 <_Timespec_Subtract> _Timestamp_Divide( &ran, &total, &ival, &fval ); 27e0: e28d204c add r2, sp, #76 ; 0x4c 27e4: e28d3048 add r3, sp, #72 ; 0x48 27e8: e1a0000b mov r0, fp 27ec: e28d1038 add r1, sp, #56 ; 0x38 27f0: eb001cd3 bl 9b44 <_Timespec_Divide> /* * Print the information */ (*print)( context, 27f4: e3a01ffa mov r1, #1000 ; 0x3e8 27f8: e59d0034 ldr r0, [sp, #52] ; 0x34 27fc: eb0052d9 bl 17368 <__aeabi_uidiv> 2800: e59d204c ldr r2, [sp, #76] ; 0x4c 2804: e58d2000 str r2, [sp] 2808: e59d2048 ldr r2, [sp, #72] ; 0x48 280c: e1a03000 mov r3, r0 2810: e58d2004 str r2, [sp, #4] 2814: e1a00009 mov r0, r9 2818: e59f1068 ldr r1, [pc, #104] ; 2888 281c: e59d2030 ldr r2, [sp, #48] ; 0x30 2820: e1a0e00f mov lr, pc 2824: e12fff1a bx sl continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 2828: e2877001 add r7, r7, #1 282c: e1d631b0 ldrh r3, [r6, #16] 2830: e1570003 cmp r7, r3 2834: 9affffbc bls 272c " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 2838: e59f304c ldr r3, [pc, #76] ; 288c 283c: e1550003 cmp r5, r3 2840: 1affffb0 bne 2708 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 2844: e3a01ffa mov r1, #1000 ; 0x3e8 2848: e59d003c ldr r0, [sp, #60] ; 0x3c 284c: eb0052c5 bl 17368 <__aeabi_uidiv> 2850: e59f1038 ldr r1, [pc, #56] ; 2890 2854: e1a03000 mov r3, r0 2858: e59d2038 ldr r2, [sp, #56] ; 0x38 285c: e1a00009 mov r0, r9 2860: e1a0e00f mov lr, pc 2864: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 2868: e28dd050 add sp, sp, #80 ; 0x50 286c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00002b64 : int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 2b64: e92d4070 push {r4, r5, r6, lr} 2b68: e1a06000 mov r6, r0 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); 2b6c: e3a00008 mov r0, #8 } return 0; } int rtems_gxx_key_create (__gthread_key_t *key, void (*dtor) (void *)) { 2b70: e1a05001 mov r5, r1 * pointer to the buffer that will hold the value of the key itself. * We have to to this, because the others functions on this interface * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); 2b74: eb0000fa bl 2f64 2b78: e1a04000 mov r4, r0 *key = new_key; 2b7c: e5860000 str r0, [r6] "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 2b80: e1a01004 mov r1, r4 * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; 2b84: e3a00000 mov r0, #0 "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 2b88: e1a02005 mov r2, r5 * deal with the value of the key, as used with the POSIX API. */ /* Do not pull your hair, trust me this works. :-) */ __gthread_key_t new_key = (__gthread_key_t) malloc( sizeof( *new_key ) ); *key = new_key; new_key->val = NULL; 2b8c: e8840021 stm r4, {r0, r5} "gxx_wrappers: create key=%x, dtor=%x, new_key=%x\n", key, dtor, new_key ); #endif /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_add( RTEMS_SELF, (void **)new_key, dtor ); 2b90: eb000e12 bl 63e0 if ( status == RTEMS_SUCCESSFUL ) 2b94: e3500000 cmp r0, #0 2b98: 08bd8070 popeq {r4, r5, r6, pc} return 0; free( new_key ); 2b9c: e1a00004 mov r0, r4 <== NOT EXECUTED 2ba0: ebffff95 bl 29fc <== NOT EXECUTED return -1; 2ba4: e3e00000 mvn r0, #0 <== NOT EXECUTED } 2ba8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00009908 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 9908: e2003006 and r3, r0, #6 990c: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; 9910: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 9914: 0a000005 beq 9930 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 9918: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; 991c: 13a03000 movne r3, #0 { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 9920: 1a000002 bne 9930 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 9924: e3100004 tst r0, #4 <== NOT EXECUTED 9928: 03a03000 moveq r3, #0 <== NOT EXECUTED 992c: 13a03001 movne r3, #1 <== NOT EXECUTED fcntl_flags |= O_RDONLY; } else if ( (flags & LIBIO_FLAGS_WRITE) == LIBIO_FLAGS_WRITE) { fcntl_flags |= O_WRONLY; } if ( (flags & LIBIO_FLAGS_NO_DELAY) == LIBIO_FLAGS_NO_DELAY ) { 9930: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; 9934: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 9938: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; 993c: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 9940: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; 9944: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } 9948: e1a00003 mov r0, r3 994c: e12fff1e bx lr =============================================================================== 00001898 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 1898: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 189c: e59f3078 ldr r3, [pc, #120] ; 191c 18a0: e5933004 ldr r3, [r3, #4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 18a4: e59300b8 ldr r0, [r3, #184] ; 0xb8 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 18a8: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 18ac: e15b0000 cmp fp, r0 return false; 18b0: 33a04000 movcc r4, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 18b4: 3a000004 bcc 18cc return false; } if ( sp > (the_stack->area + the_stack->size) ) { 18b8: e59340b4 ldr r4, [r3, #180] ; 0xb4 18bc: e0804004 add r4, r0, r4 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 18c0: e15b0004 cmp fp, r4 18c4: 83a04000 movhi r4, #0 18c8: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 18cc: e59f304c ldr r3, [pc, #76] ; 1920 18d0: e5933008 ldr r3, [r3, #8] 18d4: e3530000 cmp r3, #0 */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; bool sp_ok; bool pattern_ok = true; 18d8: 03a01001 moveq r1, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 18dc: 0a000005 beq 18f8 pattern_ok = (!memcmp( 18e0: e59f103c ldr r1, [pc, #60] ; 1924 18e4: e2800008 add r0, r0, #8 18e8: e3a02010 mov r2, #16 18ec: eb002c0b bl c920 18f0: e2701001 rsbs r1, r0, #1 18f4: 33a01000 movcc r1, #0 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 18f8: e3540000 cmp r4, #0 18fc: 0a000001 beq 1908 1900: e3510000 cmp r1, #0 1904: 1a000002 bne 1914 Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 1908: e59f300c ldr r3, [pc, #12] ; 191c <== NOT EXECUTED 190c: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 1910: ebffff9d bl 178c <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 1914: e3a00000 mov r0, #0 1918: e8bd8810 pop {r4, fp, pc} =============================================================================== 0000b264 : rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { b264: e92d41f1 push {r0, r4, r5, r6, r7, r8, lr} double result; char *end; if ( !n ) b268: e2516000 subs r6, r1, #0 rtems_status_code rtems_string_to_double ( const char *s, double *n, char **endptr ) { b26c: e1a07000 mov r7, r0 b270: e1a08002 mov r8, r2 double result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; b274: 03a00009 moveq r0, #9 ) { double result; char *end; if ( !n ) b278: 0a00002e beq b338 return RTEMS_INVALID_ADDRESS; errno = 0; b27c: eb000838 bl d364 <__errno> b280: e3a03000 mov r3, #0 b284: e5803000 str r3, [r0] *n = 0; b288: e3a04000 mov r4, #0 b28c: e3a03000 mov r3, #0 b290: e8860018 stm r6, {r3, r4} result = strtod( s, &end ); b294: e1a00007 mov r0, r7 b298: e1a0100d mov r1, sp b29c: eb0013a7 bl 10140 if ( endptr ) b2a0: e3580000 cmp r8, #0 *endptr = end; b2a4: 159d3000 ldrne r3, [sp] b2a8: 15883000 strne r3, [r8] if ( end == s ) b2ac: e59d3000 ldr r3, [sp] b2b0: e1530007 cmp r3, r7 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtod( s, &end ); b2b4: e1a04000 mov r4, r0 b2b8: e1a05001 mov r5, r1 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; b2bc: 03a0000b moveq r0, #11 result = strtod( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) b2c0: 0a00001c beq b338 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && b2c4: eb000826 bl d364 <__errno> b2c8: e5903000 ldr r3, [r0] b2cc: e3530022 cmp r3, #34 ; 0x22 b2d0: 1a000014 bne b328 b2d4: e1a00004 mov r0, r4 b2d8: e1a01005 mov r1, r5 b2dc: e3a02000 mov r2, #0 b2e0: e3a03000 mov r3, #0 b2e4: ebffe003 bl 32f8 <__cmpdf2> b2e8: e3500000 cmp r0, #0 b2ec: 0a000010 beq b334 (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) b2f0: e1a00004 mov r0, r4 b2f4: e1a01005 mov r1, r5 b2f8: e3e02000 mvn r2, #0 b2fc: e59f3038 ldr r3, [pc, #56] ; b33c b300: ebffdff8 bl 32e8 <__gedf2> b304: e3500000 cmp r0, #0 b308: ca000009 bgt b334 b30c: e1a00004 mov r0, r4 <== NOT EXECUTED b310: e1a01005 mov r1, r5 <== NOT EXECUTED b314: e3e02000 mvn r2, #0 <== NOT EXECUTED b318: e3e03601 mvn r3, #1048576 ; 0x100000 <== NOT EXECUTED b31c: ebffdff3 bl 32f0 <__ledf2> <== NOT EXECUTED b320: e3500000 cmp r0, #0 <== NOT EXECUTED b324: ba000002 blt b334 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; *n = result; b328: e8860030 stm r6, {r4, r5} return RTEMS_SUCCESSFUL; b32c: e3a00000 mov r0, #0 b330: ea000000 b b338 if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == HUGE_VAL ) || ( result == -HUGE_VAL ))) return RTEMS_INVALID_NUMBER; b334: e3a0000a mov r0, #10 *n = result; return RTEMS_SUCCESSFUL; } b338: e8bd81f8 pop {r3, r4, r5, r6, r7, r8, pc} =============================================================================== 0000b340 : rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { b340: e92d40f1 push {r0, r4, r5, r6, r7, lr} float result; char *end; if ( !n ) b344: e2516000 subs r6, r1, #0 rtems_status_code rtems_string_to_float ( const char *s, float *n, char **endptr ) { b348: e1a04000 mov r4, r0 b34c: e1a07002 mov r7, r2 float result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; b350: 03a00009 moveq r0, #9 ) { float result; char *end; if ( !n ) b354: 0a000026 beq b3f4 return RTEMS_INVALID_ADDRESS; errno = 0; b358: eb000801 bl d364 <__errno> b35c: e3a03000 mov r3, #0 b360: e5803000 str r3, [r0] *n = 0; b364: e3a03000 mov r3, #0 b368: e5863000 str r3, [r6] result = strtof( s, &end ); b36c: e1a00004 mov r0, r4 b370: e1a0100d mov r1, sp b374: eb001378 bl 1015c if ( endptr ) b378: e3570000 cmp r7, #0 *endptr = end; b37c: 159d3000 ldrne r3, [sp] b380: 15873000 strne r3, [r7] if ( end == s ) b384: e59d3000 ldr r3, [sp] b388: e1530004 cmp r3, r4 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtof( s, &end ); b38c: e1a05000 mov r5, r0 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; b390: 03a0000b moveq r0, #11 result = strtof( s, &end ); if ( endptr ) *endptr = end; if ( end == s ) b394: 0a000016 beq b3f4 return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && b398: eb0007f1 bl d364 <__errno> b39c: e5903000 ldr r3, [r0] b3a0: e3530022 cmp r3, #34 ; 0x22 b3a4: 1a00000e bne b3e4 b3a8: e1a00005 mov r0, r5 b3ac: e3a01000 mov r1, #0 b3b0: ebffe01b bl 3424 <__cmpsf2> b3b4: e3500000 cmp r0, #0 b3b8: 0a00000c beq b3f0 (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) b3bc: e1a00005 mov r0, r5 b3c0: e59f1030 ldr r1, [pc, #48] ; b3f8 b3c4: ebffe012 bl 3414 <__gesf2> b3c8: e3500000 cmp r0, #0 b3cc: ca000007 bgt b3f0 b3d0: e1a00005 mov r0, r5 <== NOT EXECUTED b3d4: e3e01502 mvn r1, #8388608 ; 0x800000 <== NOT EXECUTED b3d8: ebffe00f bl 341c <__lesf2> <== NOT EXECUTED b3dc: e3500000 cmp r0, #0 <== NOT EXECUTED b3e0: ba000002 blt b3f0 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; *n = result; b3e4: e5865000 str r5, [r6] return RTEMS_SUCCESSFUL; b3e8: e3a00000 mov r0, #0 b3ec: ea000000 b b3f4 if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == HUGE_VALF ) || ( result == -HUGE_VALF ))) return RTEMS_INVALID_NUMBER; b3f0: e3a0000a mov r0, #10 *n = result; return RTEMS_SUCCESSFUL; } b3f4: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 0000b3fc : const char *s, int *n, char **endptr, int base ) { b3fc: e92d40f1 push {r0, r4, r5, r6, r7, lr} long result; char *end; if ( !n ) b400: e2516000 subs r6, r1, #0 const char *s, int *n, char **endptr, int base ) { b404: e1a04000 mov r4, r0 b408: e1a05002 mov r5, r2 b40c: e1a07003 mov r7, r3 long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; b410: 03a00009 moveq r0, #9 ) { long result; char *end; if ( !n ) b414: 0a00001c beq b48c return RTEMS_INVALID_ADDRESS; errno = 0; b418: eb0007d1 bl d364 <__errno> b41c: e3a03000 mov r3, #0 b420: e5803000 str r3, [r0] *n = 0; result = strtol( s, &end, base ); b424: e1a02007 mov r2, r7 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; b428: e5863000 str r3, [r6] result = strtol( s, &end, base ); b42c: e1a00004 mov r0, r4 b430: e1a0100d mov r1, sp b434: eb0013ca bl 10364 if ( endptr ) b438: e3550000 cmp r5, #0 *endptr = end; b43c: 159d3000 ldrne r3, [sp] b440: 15853000 strne r3, [r5] if ( end == s ) b444: e59d3000 ldr r3, [sp] b448: e1530004 cmp r3, r4 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtol( s, &end, base ); b44c: e1a07000 mov r7, r0 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; b450: 03a0000b moveq r0, #11 result = strtol( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) b454: 0a00000c beq b48c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && b458: eb0007c1 bl d364 <__errno> b45c: e5903000 ldr r3, [r0] b460: e3530022 cmp r3, #34 ; 0x22 b464: 1a000004 bne b47c b468: e3770106 cmn r7, #-2147483647 ; 0x80000001 b46c: 13570000 cmpne r7, #0 b470: 0a000004 beq b488 (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) b474: e3570102 cmp r7, #-2147483648 ; 0x80000000 <== NOT EXECUTED b478: 0a000002 beq b488 <== NOT EXECUTED errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; b47c: e5867000 str r7, [r6] return RTEMS_SUCCESSFUL; b480: e3a00000 mov r0, #0 b484: ea000000 b b48c if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == LONG_MAX ) || ( result == LONG_MIN ))) return RTEMS_INVALID_NUMBER; b488: e3a0000a mov r0, #10 #endif *n = result; return RTEMS_SUCCESSFUL; } b48c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 0000b5f4 : const char *s, unsigned char *n, char **endptr, int base ) { b5f4: e92d40f1 push {r0, r4, r5, r6, r7, lr} unsigned long result; char *end; if ( !n ) b5f8: e2516000 subs r6, r1, #0 const char *s, unsigned char *n, char **endptr, int base ) { b5fc: e1a04000 mov r4, r0 b600: e1a05002 mov r5, r2 b604: e1a07003 mov r7, r3 unsigned long result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; b608: 03a00009 moveq r0, #9 ) { unsigned long result; char *end; if ( !n ) b60c: 0a00001e beq b68c return RTEMS_INVALID_ADDRESS; errno = 0; b610: eb000753 bl d364 <__errno> b614: e3a03000 mov r3, #0 b618: e5803000 str r3, [r0] *n = 0; result = strtoul( s, &end, base ); b61c: e1a02007 mov r2, r7 if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; b620: e5c63000 strb r3, [r6] result = strtoul( s, &end, base ); b624: e1a00004 mov r0, r4 b628: e1a0100d mov r1, sp b62c: eb00147b bl 10820 if ( endptr ) b630: e3550000 cmp r5, #0 *endptr = end; b634: 159d3000 ldrne r3, [sp] b638: 15853000 strne r3, [r5] if ( end == s ) b63c: e59d3000 ldr r3, [sp] b640: e1530004 cmp r3, r4 return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; result = strtoul( s, &end, base ); b644: e1a07000 mov r7, r0 if ( endptr ) *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; b648: 03a0000b moveq r0, #11 result = strtoul( s, &end, base ); if ( endptr ) *endptr = end; if ( end == s ) b64c: 0a00000e beq b68c return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && b650: eb000743 bl d364 <__errno> b654: e5903000 ldr r3, [r0] b658: e3530022 cmp r3, #34 ; 0x22 b65c: 1a000002 bne b66c (( result == 0 ) || ( result == ULONG_MAX ))) b660: e2473001 sub r3, r7, #1 <== NOT EXECUTED *endptr = end; if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && b664: e3730003 cmn r3, #3 <== NOT EXECUTED b668: 8a000006 bhi b688 <== NOT EXECUTED (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { b66c: e35700ff cmp r7, #255 ; 0xff errno = ERANGE; return RTEMS_INVALID_NUMBER; } #endif *n = result; b670: 95c67000 strbls r7, [r6] return RTEMS_SUCCESSFUL; b674: 93a00000 movls r0, #0 if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; #if (UCHAR_MAX < ULONG_MAX) if ( result > UCHAR_MAX ) { b678: 9a000003 bls b68c errno = ERANGE; b67c: eb000738 bl d364 <__errno> <== NOT EXECUTED b680: e3a03022 mov r3, #34 ; 0x22 <== NOT EXECUTED b684: e5803000 str r3, [r0] <== NOT EXECUTED if ( end == s ) return RTEMS_NOT_DEFINED; if ( ( errno == ERANGE ) && (( result == 0 ) || ( result == ULONG_MAX ))) return RTEMS_INVALID_NUMBER; b688: e3a0000a mov r0, #10 <== NOT EXECUTED #endif *n = result; return RTEMS_SUCCESSFUL; } b68c: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 00001c5c : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 1c5c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1c60: e24ddf6b sub sp, sp, #428 ; 0x1ac 1c64: e58d1010 str r1, [sp, #16] 1c68: e58d2018 str r2, [sp, #24] 1c6c: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 1c70: eb003a6e bl 10630 1c74: e3a02000 mov r2, #0 1c78: e1a01000 mov r1, r0 1c7c: e28d3f65 add r3, sp, #404 ; 0x194 1c80: e59d000c ldr r0, [sp, #12] 1c84: e58d2000 str r2, [sp] 1c88: eb00029b bl 26fc strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 1c8c: e2504000 subs r4, r0, #0 1c90: 1a00006c bne 1e48 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 1c94: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 1c98: e59f21c0 ldr r2, [pc, #448] ; 1e60 1c9c: e1530002 cmp r3, r2 1ca0: 0a000005 beq 1cbc 1ca4: e59f21b8 ldr r2, [pc, #440] ; 1e64 1ca8: e1530002 cmp r3, r2 1cac: 1a000065 bne 1e48 1cb0: ea000001 b 1cbc <== NOT EXECUTED 1cb4: e1a08004 mov r8, r4 1cb8: ea000006 b 1cd8 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1cbc: e28d2f65 add r2, sp, #404 ; 0x194 1cc0: e58d2004 str r2, [sp, #4] 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 1cc4: e1a08004 mov r8, r4 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 1cc8: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1ccc: e28d9d06 add r9, sp, #384 ; 0x180 * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); 1cd0: e28d501c add r5, sp, #28 1cd4: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 1cd8: e59d3018 ldr r3, [sp, #24] 1cdc: e2884c02 add r4, r8, #512 ; 0x200 1ce0: e1540003 cmp r4, r3 1ce4: 8a000059 bhi 1e50 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 1ce8: e59de010 ldr lr, [sp, #16] 1cec: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 1cf0: e2880c01 add r0, r8, #256 ; 0x100 1cf4: e2800001 add r0, r0, #1 1cf8: e59f1168 ldr r1, [pc, #360] ; 1e68 1cfc: e3a02005 mov r2, #5 1d00: eb003a62 bl 10690 1d04: e2506000 subs r6, r0, #0 1d08: 1a000050 bne 1e50 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 1d0c: e3a02063 mov r2, #99 ; 0x63 1d10: e1a01008 mov r1, r8 1d14: e1a00007 mov r0, r7 1d18: eb003abd bl 10814 filename[MAX_NAME_FIELD_SIZE] = '\0'; 1d1c: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1d20: e3a01008 mov r1, #8 1d24: e2880064 add r0, r8, #100 ; 0x64 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; 1d28: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1d2c: eb001d87 bl 9350 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1d30: e3a0100c mov r1, #12 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1d34: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1d38: e288007c add r0, r8, #124 ; 0x7c 1d3c: eb001d83 bl 9350 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1d40: e3a01008 mov r1, #8 strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); filename[MAX_NAME_FIELD_SIZE] = '\0'; linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1d44: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1d48: e2880094 add r0, r8, #148 ; 0x94 1d4c: eb001d7f bl 9350 <_rtems_octal2ulong> 1d50: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 1d54: e1a00008 mov r0, r8 1d58: e58d3008 str r3, [sp, #8] 1d5c: eb001d89 bl 9388 <_rtems_tar_header_checksum> 1d60: e59d3008 ldr r3, [sp, #8] 1d64: e1500003 cmp r0, r3 1d68: 1a000038 bne 1e50 * Generate an IMFS node depending on the file type. * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { 1d6c: e3560035 cmp r6, #53 ; 0x35 1d70: 1a000012 bne 1dc0 strcpy(full_filename, mountpoint); 1d74: e59d100c ldr r1, [sp, #12] 1d78: e1a00005 mov r0, r5 1d7c: eb003867 bl ff20 if (full_filename[strlen(full_filename)-1] != '/') 1d80: e1a00005 mov r0, r5 1d84: eb003a29 bl 10630 1d88: e28d2f6b add r2, sp, #428 ; 0x1ac 1d8c: e0820000 add r0, r2, r0 1d90: e5503191 ldrb r3, [r0, #-401] ; 0x191 1d94: e353002f cmp r3, #47 ; 0x2f strcat(full_filename, "/"); 1d98: 11a00005 movne r0, r5 1d9c: 159f10c8 ldrne r1, [pc, #200] ; 1e6c 1da0: 1b0037a7 blne fc44 strcat(full_filename, filename); 1da4: e1a01007 mov r1, r7 1da8: e1a00005 mov r0, r5 1dac: eb0037a4 bl fc44 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 1db0: e1a00005 mov r0, r5 1db4: e59f10b4 ldr r1, [pc, #180] ; 1e70 1db8: eb000464 bl 2f50 1dbc: eaffffbc b 1cb4 * IMFS_create_node 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. */ else if (linkflag == REGTYPE) { 1dc0: e3560030 cmp r6, #48 ; 0x30 1dc4: 1affffba bne 1cb4 const char *name; loc = root_loc; 1dc8: e59dc004 ldr ip, [sp, #4] 1dcc: e8bc000f ldm ip!, {r0, r1, r2, r3} 1dd0: e1a0e009 mov lr, r9 1dd4: e8ae000f stmia lr!, {r0, r1, r2, r3} 1dd8: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 1ddc: e1a00007 mov r0, r7 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1de0: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 1de4: e1a01009 mov r1, r9 1de8: e28d2f6a add r2, sp, #424 ; 0x1a8 1dec: eb002030 bl 9eb4 1df0: e2506000 subs r6, r0, #0 1df4: 1a00000d bne 1e30 node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 1df8: e59d2014 ldr r2, [sp, #20] 1dfc: e1a03b82 lsl r3, r2, #23 1e00: e1a03ba3 lsr r3, r3, #23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 1e04: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 1e08: e3833902 orr r3, r3, #32768 ; 0x8000 1e0c: e1a00009 mov r0, r9 1e10: e3a01006 mov r1, #6 1e14: e58d6000 str r6, [sp] 1e18: eb001ea3 bl 98ac IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; node->info.linearfile.direct = &tar_image[offset]; 1e1c: e59d2010 ldr r2, [sp, #16] 1e20: e0823004 add r3, r2, r4 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 1e24: e580b050 str fp, [r0, #80] ; 0x50 1e28: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; 1e2c: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; 1e30: e28bbf7f add fp, fp, #508 ; 0x1fc 1e34: e28bb003 add fp, fp, #3 offset += 512 * nblocks; 1e38: e3cbbf7f bic fp, fp, #508 ; 0x1fc 1e3c: e3cbb003 bic fp, fp, #3 1e40: e08b4004 add r4, fp, r4 1e44: eaffff9a b 1cb4 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 1e48: e3e04000 mvn r4, #0 1e4c: ea000000 b 1e54 1e50: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 1e54: e1a00004 mov r0, r4 1e58: e28ddf6b add sp, sp, #428 ; 0x1ac 1e5c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000033c4 : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 33c4: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { 33c8: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 33cc: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( 33d0: e59f317c ldr r3, [pc, #380] ; 3554 33d4: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 33d8: 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( 33dc: e1a02001 mov r2, r1 33e0: e5930000 ldr r0, [r3] 33e4: eb0007a5 bl 5280 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 33e8: e3500000 cmp r0, #0 33ec: 1a000024 bne 3484 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 33f0: e5943008 ldr r3, [r4, #8] 33f4: e2433001 sub r3, r3, #1 33f8: e3530000 cmp r3, #0 33fc: e5843008 str r3, [r4, #8] 3400: 1a00004e bne 3540 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3404: e59420cc ldr r2, [r4, #204] ; 0xcc 3408: e59f3148 ldr r3, [pc, #328] ; 3558 340c: e0833282 add r3, r3, r2, lsl #5 3410: e5931004 ldr r1, [r3, #4] 3414: e3510000 cmp r1, #0 3418: 0a000003 beq 342c /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 341c: e1a00004 mov r0, r4 3420: e1a0e00f mov lr, pc 3424: e12fff11 bx r1 3428: ea000008 b 3450 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 342c: e5940018 ldr r0, [r4, #24] 3430: e1a02001 mov r2, r1 3434: eb000791 bl 5280 if (sc != RTEMS_SUCCESSFUL) { 3438: e3500000 cmp r0, #0 343c: 1a000010 bne 3484 rtems_fatal_error_occurred (sc); } drainOutput (tty); 3440: e1a00004 mov r0, r4 3444: ebfffeb2 bl 2f14 rtems_semaphore_release (tty->osem); 3448: e5940018 ldr r0, [r4, #24] 344c: eb0007d1 bl 5398 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3450: e59430b4 ldr r3, [r4, #180] ; 0xb4 3454: e3530002 cmp r3, #2 3458: 1a00000a bne 3488 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 345c: e59400c4 ldr r0, [r4, #196] ; 0xc4 3460: e3a01001 mov r1, #1 3464: eb000673 bl 4e38 if (sc != RTEMS_SUCCESSFUL) 3468: e3500000 cmp r0, #0 346c: 1a000004 bne 3484 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 3470: e59400c8 ldr r0, [r4, #200] ; 0xc8 3474: e3a01001 mov r1, #1 3478: eb00066e bl 4e38 if (sc != RTEMS_SUCCESSFUL) 347c: e3500000 cmp r0, #0 3480: 0a000000 beq 3488 rtems_fatal_error_occurred (sc); 3484: eb000917 bl 58e8 <== NOT EXECUTED } if (tty->device.lastClose) 3488: e594309c ldr r3, [r4, #156] ; 0x9c 348c: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3490: 1284000c addne r0, r4, #12 3494: 18900003 ldmne r0, {r0, r1} 3498: 11a02005 movne r2, r5 349c: 11a0e00f movne lr, pc 34a0: 112fff13 bxne r3 if (tty->forw == NULL) { 34a4: e894000c ldm r4, {r2, r3} 34a8: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty->back; if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; } } else { tty->forw->back = tty->back; 34ac: 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) { 34b0: 1a000003 bne 34c4 rtems_termios_ttyTail = tty->back; 34b4: e59f10a0 ldr r1, [pc, #160] ; 355c if ( rtems_termios_ttyTail != NULL ) { 34b8: 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; 34bc: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 34c0: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 34c4: e5942004 ldr r2, [r4, #4] 34c8: e5943000 ldr r3, [r4] 34cc: e3520000 cmp r2, #0 rtems_termios_ttyHead = tty->forw; if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; } } else { tty->back->forw = tty->forw; 34d0: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 34d4: 1a000003 bne 34e8 rtems_termios_ttyHead = tty->forw; 34d8: e59f1080 ldr r1, [pc, #128] ; 3560 if ( rtems_termios_ttyHead != NULL ) { 34dc: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 34e0: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 34e4: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 34e8: e5940014 ldr r0, [r4, #20] 34ec: eb00073c bl 51e4 rtems_semaphore_delete (tty->osem); 34f0: e5940018 ldr r0, [r4, #24] 34f4: eb00073a bl 51e4 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 34f8: e594008c ldr r0, [r4, #140] ; 0x8c 34fc: eb000738 bl 51e4 if ((tty->device.pollRead == NULL) || 3500: e59430a0 ldr r3, [r4, #160] ; 0xa0 3504: e3530000 cmp r3, #0 3508: 0a000002 beq 3518 350c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3510: e3530002 cmp r3, #2 3514: 1a000001 bne 3520 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3518: e5940068 ldr r0, [r4, #104] ; 0x68 351c: eb000730 bl 51e4 free (tty->rawInBuf.theBuf); 3520: e5940058 ldr r0, [r4, #88] ; 0x58 3524: ebfffad6 bl 2084 free (tty->rawOutBuf.theBuf); 3528: e594007c ldr r0, [r4, #124] ; 0x7c 352c: ebfffad4 bl 2084 free (tty->cbuf); 3530: e594001c ldr r0, [r4, #28] 3534: ebfffad2 bl 2084 free (tty); 3538: e1a00004 mov r0, r4 353c: ebfffad0 bl 2084 } rtems_semaphore_release (rtems_termios_ttyMutex); 3540: e59f300c ldr r3, [pc, #12] ; 3554 3544: e5930000 ldr r0, [r3] 3548: eb000792 bl 5398 return RTEMS_SUCCESSFUL; } 354c: e3a00000 mov r0, #0 3550: e8bd8030 pop {r4, r5, pc} =============================================================================== 000048e0 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 48e0: e5902090 ldr r2, [r0, #144] ; 0x90 48e4: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 48e8: e59010b4 ldr r1, [r0, #180] ; 0xb4 48ec: e3510002 cmp r1, #2 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 48f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 48f4: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 48f8: 1a000004 bne 4910 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 48fc: e59000c8 ldr r0, [r0, #200] ; 0xc8 4900: eb00014c bl 4e38 if (sc != RTEMS_SUCCESSFUL) 4904: e2503000 subs r3, r0, #0 4908: 0a00000d beq 4944 rtems_fatal_error_occurred (sc); 490c: eb0003f5 bl 58e8 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 4910: e59030cc ldr r3, [r0, #204] ; 0xcc 4914: e3530005 cmp r3, #5 4918: 1a000007 bne 493c /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 491c: e59f3028 ldr r3, [pc, #40] ; 494c 4920: e59330b4 ldr r3, [r3, #180] ; 0xb4 4924: e3530000 cmp r3, #0 4928: 0a000005 beq 4944 rtems_termios_linesw[tty->t_line].l_start(tty); 492c: e1a0e00f mov lr, pc 4930: e12fff13 bx r3 } return 0; /* nothing to output in IRQ... */ 4934: e3a03000 mov r3, #0 4938: ea000001 b 4944 } return rtems_termios_refill_transmitter(tty); } 493c: e49de004 pop {lr} ; (ldr lr, [sp], #4) rtems_termios_linesw[tty->t_line].l_start(tty); } return 0; /* nothing to output in IRQ... */ } return rtems_termios_refill_transmitter(tty); 4940: eaffff5a b 46b0 } 4944: e1a00003 mov r0, r3 4948: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 000043ac : * 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) { 43ac: e92d4ff3 push {r0, r1, r4, r5, r6, r7, r8, r9, sl, fp, lr} 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) { 43b0: e59030cc ldr r3, [r0, #204] ; 0xcc 43b4: e59f7288 ldr r7, [pc, #648] ; 4644 43b8: e0873283 add r3, r7, r3, lsl #5 43bc: e5939010 ldr r9, [r3, #16] 43c0: e3590000 cmp r9, #0 * 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) { 43c4: e1a04000 mov r4, r0 43c8: e1a06001 mov r6, r1 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) { 43cc: 11a05002 movne r5, r2 43d0: 1a00000d bne 440c /* * 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); 43d4: e2803030 add r3, r0, #48 ; 0x30 43d8: e58d3000 str r3, [sp] 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, 43dc: e280304a add r3, r0, #74 ; 0x4a 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) { 43e0: e1a08002 mov r8, r2 43e4: e1a05009 mov r5, r9 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, 43e8: e58d3004 str r3, [sp, #4] 43ec: ea00008b b 4620 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); 43f0: e59430cc ldr r3, [r4, #204] ; 0xcc 43f4: e4d60001 ldrb r0, [r6], #1 43f8: e0873283 add r3, r7, r3, lsl #5 43fc: e1a01004 mov r1, r4 4400: e1a0e00f mov lr, pc 4404: e593f010 ldr pc, [r3, #16] 4408: e2455001 sub r5, r5, #1 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--) { 440c: e3550000 cmp r5, #0 4410: 1afffff6 bne 43f0 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4414: e59430e4 ldr r3, [r4, #228] ; 0xe4 4418: e3530000 cmp r3, #0 441c: 1a000086 bne 463c 4420: e59430dc ldr r3, [r4, #220] ; 0xdc 4424: e3530000 cmp r3, #0 4428: 0a000083 beq 463c (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 442c: e2840030 add r0, r4, #48 ; 0x30 4430: e59410e0 ldr r1, [r4, #224] ; 0xe0 4434: e1a0e00f mov lr, pc 4438: e12fff13 bx r3 tty->tty_rcvwakeup = 1; 443c: e3a03001 mov r3, #1 4440: e58430e4 str r3, [r4, #228] ; 0xe4 4444: ea00007c b 463c while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4448: e59430b8 ldr r3, [r4, #184] ; 0xb8 444c: e3130c02 tst r3, #512 ; 0x200 } return 0; } while (len--) { c = *buf++; 4450: e4d6a001 ldrb sl, [r6], #1 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4454: 0a00000f beq 4498 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 4458: e5d4204a ldrb r2, [r4, #74] ; 0x4a 445c: e152000a cmp r2, sl 4460: e5d43049 ldrb r3, [r4, #73] ; 0x49 4464: 1a000007 bne 4488 if (c == tty->termios.c_cc[VSTART]) { 4468: e1530002 cmp r3, r2 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 446c: 059430b8 ldreq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4470: 159430b8 ldrne r3, [r4, #184] ; 0xb8 /* 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; 4474: 02233010 eoreq r3, r3, #16 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4478: 13833010 orrne r3, r3, #16 447c: e58430b8 str r3, [r4, #184] ; 0xb8 * 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) { 4480: e3a09001 mov r9, #1 4484: ea000005 b 44a0 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4488: e153000a cmp r3, sl /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 448c: 059430b8 ldreq r3, [r4, #184] ; 0xb8 4490: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4494: 0afffff8 beq 447c /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 4498: e3590000 cmp r9, #0 449c: 0a000014 beq 44f4 /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 44a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 44a4: e2033030 and r3, r3, #48 ; 0x30 44a8: e3530020 cmp r3, #32 44ac: 1a00005a bne 461c /* disable interrupts */ rtems_interrupt_disable(level); 44b0: ebfffa93 bl 2f04 <== NOT EXECUTED 44b4: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 44b8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 44bc: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 44c0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 44c4: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 44c8: e3530000 cmp r3, #0 <== NOT EXECUTED 44cc: 0a000006 beq 44ec <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 44d0: 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)( 44d4: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 44d8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 44dc: e0811003 add r1, r1, r3 <== NOT EXECUTED 44e0: e3a02001 mov r2, #1 <== NOT EXECUTED 44e4: e1a0e00f mov lr, pc <== NOT EXECUTED 44e8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 44ec: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 44f0: ea000049 b 461c <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 44f4: e5940060 ldr r0, [r4, #96] ; 0x60 44f8: e5941064 ldr r1, [r4, #100] ; 0x64 44fc: e2800001 add r0, r0, #1 4500: eb002d1f bl f984 <__umodsi3> 4504: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 4508: ebfffa7d bl 2f04 450c: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4510: e594305c ldr r3, [r4, #92] ; 0x5c 4514: e5940064 ldr r0, [r4, #100] ; 0x64 4518: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && 451c: e5941064 ldr r1, [r4, #100] ; 0x64 4520: e0800007 add r0, r0, r7 4524: eb002d16 bl f984 <__umodsi3> } } 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) 4528: e59430c0 ldr r3, [r4, #192] ; 0xc0 452c: e1500003 cmp r0, r3 4530: 9a000025 bls 45cc % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 4534: 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) % tty->rawInBuf.Size) > tty->highwater) && 4538: e3130001 tst r3, #1 <== NOT EXECUTED 453c: 1a000022 bne 45cc <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 4540: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4544: e3833001 orr r3, r3, #1 <== NOT EXECUTED 4548: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 454c: e59f30f4 ldr r3, [pc, #244] ; 4648 <== NOT EXECUTED 4550: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 4554: e0023003 and r3, r2, r3 <== NOT EXECUTED 4558: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 455c: 1a00000e bne 459c <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 4560: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4564: e3130020 tst r3, #32 <== NOT EXECUTED 4568: 1a000002 bne 4578 <== NOT EXECUTED 456c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 4570: e3530000 cmp r3, #0 <== NOT EXECUTED 4574: 1a000014 bne 45cc <== NOT EXECUTED (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; 4578: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 457c: e3833002 orr r3, r3, #2 <== NOT EXECUTED 4580: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 4584: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4588: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 458c: e3a02001 mov r2, #1 <== NOT EXECUTED 4590: e1a0e00f mov lr, pc <== NOT EXECUTED 4594: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 4598: ea00000b b 45cc <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 459c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 45a0: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 45a4: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 45a8: 1a000007 bne 45cc <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 45ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 45b0: e3833004 orr r3, r3, #4 <== NOT EXECUTED 45b4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 45b8: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 45bc: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 45c0: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 45c4: 11a0e00f movne lr, pc <== NOT EXECUTED 45c8: 112fff13 bxne r3 <== NOT EXECUTED 45cc: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 45d0: e594305c ldr r3, [r4, #92] ; 0x5c 45d4: e1570003 cmp r7, r3 dropped++; 45d8: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 45dc: 0a00000e beq 461c dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 45e0: e5943058 ldr r3, [r4, #88] ; 0x58 45e4: e7c3a007 strb sl, [r3, r7] tty->rawInBuf.Tail = newTail; /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 45e8: e59430e4 ldr r3, [r4, #228] ; 0xe4 45ec: e3530000 cmp r3, #0 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 45f0: e5847060 str r7, [r4, #96] ; 0x60 /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 45f4: 1a000008 bne 461c 45f8: e59430dc ldr r3, [r4, #220] ; 0xdc 45fc: e3530000 cmp r3, #0 4600: 0a000005 beq 461c (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4604: e59d0000 ldr r0, [sp] <== NOT EXECUTED 4608: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 460c: e1a0e00f mov lr, pc <== NOT EXECUTED 4610: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4614: e3a03001 mov r3, #1 <== NOT EXECUTED 4618: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 461c: e2488001 sub r8, r8, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4620: e3580000 cmp r8, #0 4624: 1affff87 bne 4448 } } } } tty->rawInBufDropped += dropped; 4628: e5943078 ldr r3, [r4, #120] ; 0x78 462c: e0833005 add r3, r3, r5 4630: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 4634: e5940068 ldr r0, [r4, #104] ; 0x68 4638: eb000356 bl 5398 return dropped; } 463c: e1a00005 mov r0, r5 4640: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000357c : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 357c: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 3580: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3584: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3588: e3a01000 mov r1, #0 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; 358c: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; 3590: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { 3594: 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); 3598: e1a02001 mov r2, r1 359c: e5940018 ldr r0, [r4, #24] 35a0: eb000736 bl 5280 if (sc != RTEMS_SUCCESSFUL) { 35a4: e2506000 subs r6, r0, #0 35a8: 1a0000d4 bne 3900 args->ioctl_return = sc; return sc; } switch (args->command) { 35ac: e5953004 ldr r3, [r5, #4] 35b0: e3530004 cmp r3, #4 35b4: 0a0000a8 beq 385c 35b8: 8a000005 bhi 35d4 35bc: e3530002 cmp r3, #2 35c0: 0a000029 beq 366c 35c4: 8a00009d bhi 3840 35c8: e3530001 cmp r3, #1 35cc: 1a000010 bne 3614 35d0: ea00001b b 3644 35d4: e59f2330 ldr r2, [pc, #816] ; 390c 35d8: e1530002 cmp r3, r2 35dc: 0a0000ba beq 38cc 35e0: 8a000002 bhi 35f0 35e4: e3530005 cmp r3, #5 35e8: 1a000009 bne 3614 35ec: ea000096 b 384c 35f0: e59f2318 ldr r2, [pc, #792] ; 3910 35f4: e1530002 cmp r3, r2 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; 35f8: 05953008 ldreq r3, [r5, #8] 35fc: 059420cc ldreq r2, [r4, #204] ; 0xcc 3600: 05832000 streq r2, [r3] sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) { args->ioctl_return = sc; return sc; } switch (args->command) { 3604: 0a0000bb beq 38f8 3608: e2822105 add r2, r2, #1073741825 ; 0x40000001 360c: e1530002 cmp r3, r2 3610: 0a000095 beq 386c default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3614: e59420cc ldr r2, [r4, #204] ; 0xcc 3618: e59f32f4 ldr r3, [pc, #756] ; 3914 361c: e0833282 add r3, r3, r2, lsl #5 3620: e5933018 ldr r3, [r3, #24] 3624: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 3628: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 362c: 0a0000b1 beq 38f8 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 3630: e1a00004 mov r0, r4 3634: e1a01005 mov r1, r5 3638: e1a0e00f mov lr, pc 363c: e12fff13 bx r3 3640: ea00009f b 38c4 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3644: e5957008 ldr r7, [r5, #8] 3648: e284c030 add ip, r4, #48 ; 0x30 364c: e8bc000f ldm ip!, {r0, r1, r2, r3} 3650: e1a0e007 mov lr, r7 3654: e8ae000f stmia lr!, {r0, r1, r2, r3} 3658: e8bc000f ldm ip!, {r0, r1, r2, r3} 365c: e8ae000f stmia lr!, {r0, r1, r2, r3} 3660: e59c3000 ldr r3, [ip] 3664: e58e3000 str r3, [lr] break; 3668: ea0000a2 b 38f8 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 366c: e595e008 ldr lr, [r5, #8] 3670: e8be000f ldm lr!, {r0, r1, r2, r3} 3674: e284c030 add ip, r4, #48 ; 0x30 3678: e8ac000f stmia ip!, {r0, r1, r2, r3} 367c: e8be000f ldm lr!, {r0, r1, r2, r3} 3680: e8ac000f stmia ip!, {r0, r1, r2, r3} 3684: e59e3000 ldr r3, [lr] 3688: 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) && 368c: e59430b8 ldr r3, [r4, #184] ; 0xb8 3690: e3130c02 tst r3, #512 ; 0x200 3694: 0a000018 beq 36fc !(tty->termios.c_iflag & IXON)) { 3698: e5943030 ldr r3, [r4, #48] ; 0x30 /* * check for flow control options to be switched off */ /* check for outgoing XON/XOFF flow control switched off */ if (( tty->flow_ctrl & FL_MDXON) && 369c: e3130b01 tst r3, #1024 ; 0x400 36a0: 1a000015 bne 36fc !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 36a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 36a8: e3c33e21 bic r3, r3, #528 ; 0x210 36ac: e58430b8 str r3, [r4, #184] ; 0xb8 /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 36b0: e59430b8 ldr r3, [r4, #184] ; 0xb8 36b4: e3130020 tst r3, #32 36b8: 0a00000f beq 36fc /* disable interrupts */ rtems_interrupt_disable(level); 36bc: ebfffe10 bl 2f04 <== NOT EXECUTED 36c0: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 36c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 36c8: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 36cc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 36d0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 36d4: e3530000 cmp r3, #0 <== NOT EXECUTED 36d8: 0a000006 beq 36f8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 36dc: 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)( 36e0: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 36e4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 36e8: e0811003 add r1, r1, r3 <== NOT EXECUTED 36ec: e3a02001 mov r2, #1 <== NOT EXECUTED 36f0: e1a0e00f mov lr, pc <== NOT EXECUTED 36f4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 36f8: 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) && !(tty->termios.c_iflag & IXOFF)) { 36fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 3700: e3130b01 tst r3, #1024 ; 0x400 3704: 0a000008 beq 372c 3708: e5943030 ldr r3, [r4, #48] ; 0x30 370c: e3130a01 tst r3, #4096 ; 0x1000 3710: 1a000005 bne 372c /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3714: e59430b8 ldr r3, [r4, #184] ; 0xb8 3718: e3c33b01 bic r3, r3, #1024 ; 0x400 371c: e58430b8 str r3, [r4, #184] ; 0xb8 /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 3720: e59430b8 ldr r3, [r4, #184] ; 0xb8 3724: e3c33002 bic r3, r3, #2 3728: e58430b8 str r3, [r4, #184] ; 0xb8 } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 372c: e59430b8 ldr r3, [r4, #184] ; 0xb8 3730: e3130c01 tst r3, #256 ; 0x100 3734: 0a000010 beq 377c 3738: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 373c: e3530000 cmp r3, #0 <== NOT EXECUTED 3740: ba00000d blt 377c <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 3744: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3748: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 374c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* restart remote Tx, if it was stopped */ if ((tty->flow_ctrl & FL_IRTSOFF) && (tty->device.startRemoteTx != NULL)) { 3750: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3754: e3130004 tst r3, #4 <== NOT EXECUTED 3758: 0a000004 beq 3770 <== NOT EXECUTED 375c: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 3760: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3764: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3768: 11a0e00f movne lr, pc <== NOT EXECUTED 376c: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 3770: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3774: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3778: 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) { 377c: e5943038 ldr r3, [r4, #56] ; 0x38 3780: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 3784: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3788: b3833c01 orrlt r3, r3, #256 ; 0x100 378c: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3790: e5943030 ldr r3, [r4, #48] ; 0x30 3794: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3798: 159420b8 ldrne r2, [r4, #184] ; 0xb8 379c: 13822b01 orrne r2, r2, #1024 ; 0x400 37a0: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 37a4: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 37a8: 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) { 37ac: 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; 37b0: 13833c02 orrne r3, r3, #512 ; 0x200 37b4: 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) { 37b8: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 37bc: 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) { 37c0: 1a000013 bne 3814 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 37c4: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; 37c8: eb000519 bl 4c34 37cc: e3a0100a mov r1, #10 37d0: e0000098 mul r0, r8, r0 37d4: eb002fd2 bl f724 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { 37d8: e5d43046 ldrb r3, [r4, #70] ; 0x46 37dc: e3530000 cmp r3, #0 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 37e0: e5840054 str r0, [r4, #84] ; 0x54 37e4: e5d42047 ldrb r2, [r4, #71] ; 0x47 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 37e8: 0a000005 beq 3804 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 37ec: e3520000 cmp r2, #0 } 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; 37f0: e5840070 str r0, [r4, #112] ; 0x70 if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 37f4: 13a00000 movne r0, #0 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } 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; 37f8: e584706c str r7, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 37fc: e5840074 str r0, [r4, #116] ; 0x74 3800: ea000006 b 3820 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3804: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3808: 03a03001 moveq r3, #1 380c: 0584306c streq r3, [r4, #108] ; 0x6c if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3810: 0a000002 beq 3820 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3814: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3818: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 381c: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3820: e59430a8 ldr r3, [r4, #168] ; 0xa8 3824: e3530000 cmp r3, #0 3828: 0a000032 beq 38f8 (*tty->device.setAttributes)(tty->minor, &tty->termios); 382c: e5940010 ldr r0, [r4, #16] 3830: e2841030 add r1, r4, #48 ; 0x30 3834: e1a0e00f mov lr, pc 3838: e12fff13 bx r3 383c: ea00002d b 38f8 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 3840: e1a00004 mov r0, r4 3844: ebfffdb2 bl 2f14 break; 3848: ea00002a b 38f8 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 384c: e897000c ldm r7, {r2, r3} 3850: e58420d4 str r2, [r4, #212] ; 0xd4 3854: e58430d8 str r3, [r4, #216] ; 0xd8 break; 3858: ea000026 b 38f8 case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 385c: e897000c ldm r7, {r2, r3} 3860: e58420dc str r2, [r4, #220] ; 0xdc 3864: e58430e0 str r3, [r4, #224] ; 0xe0 break; 3868: ea000022 b 38f8 #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 386c: e59420cc ldr r2, [r4, #204] ; 0xcc 3870: e59f309c ldr r3, [pc, #156] ; 3914 3874: e0833282 add r3, r3, r2, lsl #5 3878: e5933004 ldr r3, [r3, #4] 387c: e3530000 cmp r3, #0 3880: 0a000003 beq 3894 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3884: e1a00004 mov r0, r4 3888: e1a0e00f mov lr, pc 388c: e12fff13 bx r3 3890: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); 3894: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ 3898: e3a02000 mov r2, #0 * 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); 389c: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ 38a0: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 38a4: e59f2068 ldr r2, [pc, #104] ; 3914 * 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); 38a8: e58430cc str r3, [r4, #204] ; 0xcc tty->t_sc = NULL; /* ensure that no more valid data */ /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 38ac: e7923283 ldr r3, [r2, r3, lsl #5] 38b0: e3530000 cmp r3, #0 38b4: 0a00000f beq 38f8 sc = rtems_termios_linesw[tty->t_line].l_open(tty); 38b8: e1a00004 mov r0, r4 38bc: e1a0e00f mov lr, pc 38c0: e12fff13 bx r3 38c4: e1a06000 mov r6, r0 38c8: ea00000a b 38f8 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 38cc: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 38d0: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 38d4: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 38d8: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 38dc: e2840020 add r0, r4, #32 <== NOT EXECUTED 38e0: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 38e4: e0401001 sub r1, r0, r1 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 38e8: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 38ec: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 38f0: e0813003 add r3, r1, r3 <== NOT EXECUTED 38f4: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 38f8: e5940018 ldr r0, [r4, #24] 38fc: eb0006a5 bl 5398 args->ioctl_return = sc; 3900: e585600c str r6, [r5, #12] return sc; } 3904: e1a00006 mov r0, r6 3908: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00002f70 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2f70: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 2f74: e58d300c str r3, [sp, #12] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2f78: e59f3404 ldr r3, [pc, #1028] ; 3384 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2f7c: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2f80: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2f84: e1a09000 mov r9, r0 2f88: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2f8c: e5930000 ldr r0, [r3] 2f90: e1a02001 mov r2, r1 2f94: eb0008b9 bl 5280 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2f98: e2506000 subs r6, r0, #0 2f9c: 1a0000ee bne 335c return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 2fa0: e59f33e0 ldr r3, [pc, #992] ; 3388 2fa4: e5937000 ldr r7, [r3] 2fa8: e1a05007 mov r5, r7 2fac: ea000006 b 2fcc if ((tty->major == major) && (tty->minor == minor)) 2fb0: e595300c ldr r3, [r5, #12] 2fb4: e1530009 cmp r3, r9 2fb8: 1a000002 bne 2fc8 2fbc: e5953010 ldr r3, [r5, #16] 2fc0: e153000a cmp r3, sl 2fc4: 0a0000c3 beq 32d8 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) { 2fc8: e5955000 ldr r5, [r5] 2fcc: e3550000 cmp r5, #0 2fd0: 1afffff6 bne 2fb0 2fd4: ea0000e3 b 3368 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 2fd8: e59f23ac ldr r2, [pc, #940] ; 338c 2fdc: e5923000 ldr r3, [r2] 2fe0: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2fe4: e5950064 ldr r0, [r5, #100] ; 0x64 2fe8: e58d2008 str r2, [sp, #8] 2fec: ebfffcf3 bl 23c0 if (tty->rawInBuf.theBuf == NULL) { 2ff0: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2ff4: e1a0b000 mov fp, r0 2ff8: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 2ffc: e59d2008 ldr r2, [sp, #8] 3000: 1a000006 bne 3020 free(tty); 3004: e1a00005 mov r0, r5 3008: ebfffc1d bl 2084 rtems_semaphore_release (rtems_termios_ttyMutex); 300c: e59f3370 ldr r3, [pc, #880] ; 3384 3010: e5930000 ldr r0, [r3] 3014: eb0008df bl 5398 return RTEMS_NO_MEMORY; 3018: e3a0601a mov r6, #26 301c: ea0000ce b 335c } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 3020: e5923004 ldr r3, [r2, #4] 3024: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3028: e5950088 ldr r0, [r5, #136] ; 0x88 302c: e58d2008 str r2, [sp, #8] 3030: ebfffce2 bl 23c0 if (tty->rawOutBuf.theBuf == NULL) { 3034: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 3038: e1a03000 mov r3, r0 303c: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 3040: e59d2008 ldr r2, [sp, #8] 3044: 0a000008 beq 306c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3048: e5920008 ldr r0, [r2, #8] 304c: e58d3008 str r3, [sp, #8] 3050: ebfffcda bl 23c0 if (tty->cbuf == NULL) { 3054: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 3058: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 305c: e59d3008 ldr r3, [sp, #8] 3060: 1a000004 bne 3078 free((void *)(tty->rawOutBuf.theBuf)); 3064: e1a00003 mov r0, r3 <== NOT EXECUTED 3068: ebfffc05 bl 2084 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 306c: e1a0000b mov r0, fp 3070: ebfffc03 bl 2084 3074: eaffffe2 b 3004 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3078: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 307c: e5853004 str r3, [r5, #4] if (rtems_termios_ttyHead != NULL) 3080: e1570003 cmp r7, r3 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 3084: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 3088: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 308c: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 3090: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 3094: 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; 3098: e59f32e8 ldr r3, [pc, #744] ; 3388 309c: e5834000 str r4, [r3] if (rtems_termios_ttyTail == NULL) 30a0: e59f32e8 ldr r3, [pc, #744] ; 3390 30a4: e5932000 ldr r2, [r3] * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 30a8: 15875004 strne r5, [r7, #4] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 30ac: e5857000 str r7, [r5] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 30b0: e59f72d4 ldr r7, [pc, #724] ; 338c 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) 30b4: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 30b8: 05834000 streq r4, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30bc: e59f02d0 ldr r0, [pc, #720] ; 3394 rtems_build_name ('T', 'R', 'i', c), 30c0: e5d7300c ldrb r3, [r7, #12] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30c4: e2842014 add r2, r4, #20 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 30c8: e584a010 str sl, [r4, #16] tty->major = major; 30cc: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30d0: e1830000 orr r0, r3, r0 30d4: e58d2000 str r2, [sp] 30d8: e3a03000 mov r3, #0 30dc: e3a01001 mov r1, #1 30e0: e3a02054 mov r2, #84 ; 0x54 30e4: eb0007d3 bl 5038 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) 30e8: e2503000 subs r3, r0, #0 30ec: 1a000096 bne 334c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), 30f0: e5d7200c ldrb r2, [r7, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30f4: e59f029c ldr r0, [pc, #668] ; 3398 30f8: e2841018 add r1, r4, #24 30fc: e58d1000 str r1, [sp] 3100: e1820000 orr r0, r2, r0 3104: e3a01001 mov r1, #1 3108: e3a02054 mov r2, #84 ; 0x54 310c: eb0007c9 bl 5038 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) 3110: e2501000 subs r1, r0, #0 3114: 1a00008c bne 334c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), 3118: e5d7300c ldrb r3, [r7, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 311c: e59f0278 ldr r0, [pc, #632] ; 339c 3120: e284208c add r2, r4, #140 ; 0x8c 3124: e58d2000 str r2, [sp] 3128: e1830000 orr r0, r3, r0 312c: e3a02020 mov r2, #32 3130: e1a03001 mov r3, r1 3134: eb0007bf bl 5038 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3138: e250b000 subs fp, r0, #0 313c: 1a000082 bne 334c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 3140: e59de00c ldr lr, [sp, #12] 3144: e8be000f ldm lr!, {r0, r1, r2, r3} 3148: e284c098 add ip, r4, #152 ; 0x98 314c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3150: e89e000f ldm lr, {r0, r1, r2, r3} 3154: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3158: e59430b4 ldr r3, [r4, #180] ; 0xb4 315c: 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; 3160: e584b094 str fp, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3164: 1a000017 bne 31c8 sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), 3168: e5d7300c ldrb r3, [r7, #12] /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 316c: e59f022c ldr r0, [pc, #556] ; 33a0 3170: e28420c8 add r2, r4, #200 ; 0xc8 3174: e58d2004 str r2, [sp, #4] 3178: e1830000 orr r0, r3, r0 317c: e3a02b01 mov r2, #1024 ; 0x400 3180: e3a0100a mov r1, #10 3184: e3a03c05 mov r3, #1280 ; 0x500 3188: e58db000 str fp, [sp] 318c: eb0008a8 bl 5434 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 3190: e2502000 subs r2, r0, #0 3194: 1a00006c bne 334c rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), 3198: e5d7300c ldrb r3, [r7, #12] RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 319c: e59f0200 ldr r0, [pc, #512] ; 33a4 31a0: e58d2000 str r2, [sp] 31a4: e28420c4 add r2, r4, #196 ; 0xc4 31a8: e58d2004 str r2, [sp, #4] 31ac: e1830000 orr r0, r3, r0 31b0: e3a01009 mov r1, #9 31b4: e3a02b01 mov r2, #1024 ; 0x400 31b8: e3a03c05 mov r3, #1280 ; 0x500 31bc: eb00089c bl 5434 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 31c0: e3500000 cmp r0, #0 31c4: 1a000060 bne 334c rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 31c8: e59430a0 ldr r3, [r4, #160] ; 0xa0 31cc: e3530000 cmp r3, #0 31d0: 0a000002 beq 31e0 31d4: e59430b4 ldr r3, [r4, #180] ; 0xb4 31d8: e3530002 cmp r3, #2 31dc: 1a00000b bne 3210 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), 31e0: e59f31a4 ldr r3, [pc, #420] ; 338c rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 31e4: e59f01bc ldr r0, [pc, #444] ; 33a8 rtems_build_name ('T', 'R', 'r', c), 31e8: e5d3300c ldrb r3, [r3, #12] rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 31ec: e2842068 add r2, r4, #104 ; 0x68 31f0: e3a01000 mov r1, #0 31f4: e58d2000 str r2, [sp] 31f8: e1830000 orr r0, r3, r0 31fc: e3a02024 mov r2, #36 ; 0x24 3200: e1a03001 mov r3, r1 3204: eb00078b bl 5038 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 3208: e3500000 cmp r0, #0 320c: 1a00004e bne 334c } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 3210: e59f3194 ldr r3, [pc, #404] ; 33ac 3214: e5843030 str r3, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 3218: e59f3190 ldr r3, [pc, #400] ; 33b0 321c: e5843034 str r3, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 3220: e59f318c ldr r3, [pc, #396] ; 33b4 3224: e5843038 str r3, [r4, #56] ; 0x38 tty->termios.c_lflag = 3228: e59f3188 ldr r3, [pc, #392] ; 33b8 322c: e584303c str r3, [r4, #60] ; 0x3c ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 3230: e3a03003 mov r3, #3 3234: e5c43041 strb r3, [r4, #65] ; 0x41 tty->termios.c_cc[VQUIT] = '\034'; 3238: e2833019 add r3, r3, #25 323c: e5c43042 strb r3, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 3240: e2833063 add r3, r3, #99 ; 0x63 3244: e5c43043 strb r3, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 3248: e3a03015 mov r3, #21 324c: e5c43044 strb r3, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 3250: e3a03004 mov r3, #4 3254: e5c43045 strb r3, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; 3258: 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; 325c: e58430b8 str r3, [r4, #184] ; 0xb8 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'; 3260: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 3264: e5c43051 strb r3, [r4, #81] ; 0x51 tty->termios.c_cc[VSTART] = '\021'; 3268: e3a02011 mov r2, #17 /* 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; 326c: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 3270: e5c42049 strb r2, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 3274: e2822002 add r2, r2, #2 3278: e5c4204a strb r2, [r4, #74] ; 0x4a /* 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; 327c: e1a030a3 lsr r3, r3, #1 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 3280: e2822007 add r2, r2, #7 3284: e5c4204b strb r2, [r4, #75] ; 0x4b /* 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; 3288: e58430bc str r3, [r4, #188] ; 0xbc tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 328c: e3a02012 mov r2, #18 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; 3290: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 3294: e5c4204d strb r2, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 3298: e3a0200f mov r2, #15 329c: e5c4204e strb r2, [r4, #78] ; 0x4e 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; 32a0: e0833083 add r3, r3, r3, lsl #1 tty->termios.c_cc[VSTART] = '\021'; 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'; 32a4: e2822008 add r2, r2, #8 32a8: e5c4204f strb r2, [r4, #79] ; 0x4f 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; 32ac: e1a03123 lsr r3, r3, #2 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'; 32b0: e3a02016 mov r2, #22 32b4: e5c42050 strb r2, [r4, #80] ; 0x50 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; 32b8: e58430c0 str r3, [r4, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') 32bc: e59f30c8 ldr r3, [pc, #200] ; 338c 32c0: e5d3200c ldrb r2, [r3, #12] 32c4: e352007a cmp r2, #122 ; 0x7a 32c8: e2821001 add r1, r2, #1 c = 'a'; 32cc: 03a02061 moveq r2, #97 ; 0x61 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 32d0: e5c3100c strb r1, [r3, #12] c = 'a'; 32d4: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; 32d8: e5983000 ldr r3, [r8] 32dc: e5835034 str r5, [r3, #52] ; 0x34 if (!tty->refcount++) { 32e0: e5953008 ldr r3, [r5, #8] 32e4: e2832001 add r2, r3, #1 32e8: e3530000 cmp r3, #0 32ec: e5852008 str r2, [r5, #8] 32f0: 1a000016 bne 3350 if (tty->device.firstOpen) 32f4: e5953098 ldr r3, [r5, #152] ; 0x98 32f8: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 32fc: 11a00009 movne r0, r9 3300: 11a0100a movne r1, sl 3304: 11a02008 movne r2, r8 3308: 11a0e00f movne lr, pc 330c: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 3310: e59530b4 ldr r3, [r5, #180] ; 0xb4 3314: e3530002 cmp r3, #2 3318: 1a00000c bne 3350 sc = rtems_task_start( 331c: e59500c4 ldr r0, [r5, #196] ; 0xc4 3320: e59f1094 ldr r1, [pc, #148] ; 33bc 3324: e1a02005 mov r2, r5 3328: eb0008e9 bl 56d4 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 332c: e3500000 cmp r0, #0 3330: 1a000005 bne 334c rtems_fatal_error_occurred (sc); sc = rtems_task_start( 3334: e59500c8 ldr r0, [r5, #200] ; 0xc8 3338: e59f1080 ldr r1, [pc, #128] ; 33c0 333c: e1a02005 mov r2, r5 3340: eb0008e3 bl 56d4 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 3344: e3500000 cmp r0, #0 3348: 0a000000 beq 3350 rtems_fatal_error_occurred (sc); 334c: eb000965 bl 58e8 } } rtems_semaphore_release (rtems_termios_ttyMutex); 3350: e59f302c ldr r3, [pc, #44] ; 3384 3354: e5930000 ldr r0, [r3] 3358: eb00080e bl 5398 return RTEMS_SUCCESSFUL; } 335c: e1a00006 mov r0, r6 3360: e28dd010 add sp, sp, #16 3364: e8bd8ff0 pop {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)); 3368: e3a00001 mov r0, #1 336c: e3a010e8 mov r1, #232 ; 0xe8 3370: ebfffadf bl 1ef4 if (tty == NULL) { 3374: e2504000 subs r4, r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 3378: e1a05000 mov r5, r0 if (tty == NULL) { 337c: 1affff15 bne 2fd8 3380: eaffff21 b 300c =============================================================================== 00004060 : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4060: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 4064: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 4068: e5934034 ldr r4, [r3, #52] ; 0x34 uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 406c: e3a01000 mov r1, #0 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; 4070: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; 4074: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 4078: e1a05000 mov r5, r0 struct rtems_termios_tty *tty = args->iop->data1; uint32_t count = args->count; char *buffer = args->buffer; rtems_status_code sc; sc = rtems_semaphore_obtain (tty->isem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 407c: e1a02001 mov r2, r1 4080: e5940014 ldr r0, [r4, #20] 4084: eb00047d bl 5280 if (sc != RTEMS_SUCCESSFUL) 4088: e2507000 subs r7, r0, #0 408c: 1a0000be bne 438c return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 4090: e59420cc ldr r2, [r4, #204] ; 0xcc 4094: e59f32f8 ldr r3, [pc, #760] ; 4394 4098: e0833282 add r3, r3, r2, lsl #5 409c: e5933008 ldr r3, [r3, #8] 40a0: e3530000 cmp r3, #0 40a4: 0a000005 beq 40c0 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 40a8: e1a00004 mov r0, r4 40ac: e1a01005 mov r1, r5 40b0: e1a0e00f mov lr, pc 40b4: e12fff13 bx r3 40b8: e1a07000 mov r7, r0 40bc: ea0000ae b 437c tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 40c0: e5942024 ldr r2, [r4, #36] ; 0x24 40c4: e5943020 ldr r3, [r4, #32] 40c8: e1520003 cmp r2, r3 40cc: 1a0000a1 bne 4358 tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 40d0: e5943028 ldr r3, [r4, #40] ; 0x28 40d4: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && 40d8: e59430a0 ldr r3, [r4, #160] ; 0xa0 40dc: e3530000 cmp r3, #0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 40e0: e5847020 str r7, [r4, #32] 40e4: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 40e8: 0a00003b beq 41dc 40ec: e59430b4 ldr r3, [r4, #180] ; 0xb4 40f0: e3530000 cmp r3, #0 40f4: 1a000038 bne 41dc static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 40f8: e594303c ldr r3, [r4, #60] ; 0x3c 40fc: e3130002 tst r3, #2 4100: 0a00000d beq 413c for (;;) { n = (*tty->device.pollRead)(tty->minor); 4104: e5940010 ldr r0, [r4, #16] 4108: e1a0e00f mov lr, pc 410c: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 4110: e3500000 cmp r0, #0 4114: aa000002 bge 4124 rtems_task_wake_after (1); 4118: e3a00001 mov r0, #1 411c: eb000584 bl 5734 4120: eafffff7 b 4104 } else { if (siproc (n, tty)) 4124: e20000ff and r0, r0, #255 ; 0xff 4128: e1a01004 mov r1, r4 412c: ebffff86 bl 3f4c 4130: e3500000 cmp r0, #0 4134: 0afffff2 beq 4104 4138: ea000086 b 4358 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 413c: eb0002c4 bl 4c54 4140: e1a06000 mov r6, r0 for (;;) { n = (*tty->device.pollRead)(tty->minor); 4144: e5940010 ldr r0, [r4, #16] 4148: e1a0e00f mov lr, pc 414c: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 4150: e3500000 cmp r0, #0 4154: aa000013 bge 41a8 if (tty->termios.c_cc[VMIN]) { 4158: e5d43047 ldrb r3, [r4, #71] ; 0x47 415c: e3530000 cmp r3, #0 4160: e5d43046 ldrb r3, [r4, #70] ; 0x46 4164: 0a000005 beq 4180 if (tty->termios.c_cc[VTIME] && tty->ccount) { 4168: e3530000 cmp r3, #0 416c: 0a00000a beq 419c 4170: e5943020 ldr r3, [r4, #32] 4174: e3530000 cmp r3, #0 4178: 0a000007 beq 419c 417c: ea000001 b 4188 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 4180: e3530000 cmp r3, #0 <== NOT EXECUTED 4184: 0a000073 beq 4358 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 4188: eb0002b1 bl 4c54 if ((now - then) > tty->vtimeTicks) { 418c: e5943054 ldr r3, [r4, #84] ; 0x54 4190: e0660000 rsb r0, r6, r0 4194: e1500003 cmp r0, r3 4198: 8a00006e bhi 4358 break; } } rtems_task_wake_after (1); 419c: e3a00001 mov r0, #1 41a0: eb000563 bl 5734 41a4: eaffffe6 b 4144 } else { siproc (n, tty); 41a8: e20000ff and r0, r0, #255 ; 0xff 41ac: e1a01004 mov r1, r4 41b0: ebffff65 bl 3f4c if (tty->ccount >= tty->termios.c_cc[VMIN]) 41b4: e5d43047 ldrb r3, [r4, #71] ; 0x47 41b8: e5942020 ldr r2, [r4, #32] 41bc: e1520003 cmp r2, r3 41c0: aa000064 bge 4358 break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 41c4: e3530000 cmp r3, #0 41c8: 0affffdd beq 4144 41cc: e5d43046 ldrb r3, [r4, #70] ; 0x46 41d0: e3530000 cmp r3, #0 41d4: 0affffda beq 4144 41d8: eaffffd7 b 413c 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)( 41dc: e2842049 add r2, r4, #73 ; 0x49 * Fill the input buffer from the raw input queue */ static rtems_status_code fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; 41e0: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; 41e4: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 41e8: e59f91a8 ldr r9, [pc, #424] ; 4398 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)( 41ec: e58d2000 str r2, [sp] 41f0: ea000040 b 42f8 while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { unsigned char c; unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; 41f4: e594005c ldr r0, [r4, #92] ; 0x5c 41f8: e5941064 ldr r1, [r4, #100] ; 0x64 41fc: e2800001 add r0, r0, #1 4200: eb002ddf bl f984 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 4204: e5943058 ldr r3, [r4, #88] ; 0x58 4208: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; 420c: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4210: e5943060 ldr r3, [r4, #96] ; 0x60 4214: e5942064 ldr r2, [r4, #100] ; 0x64 4218: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) 421c: e0600003 rsb r0, r0, r3 4220: e5941064 ldr r1, [r4, #100] ; 0x64 4224: eb002dd6 bl f984 <__umodsi3> unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 4228: e59430bc ldr r3, [r4, #188] ; 0xbc 422c: e1500003 cmp r0, r3 4230: 2a00001f bcs 42b4 % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 4234: e59430b8 ldr r3, [r4, #184] ; 0xb8 4238: e3c33001 bic r3, r3, #1 423c: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 4240: e59f3154 ldr r3, [pc, #340] ; 439c 4244: e59420b8 ldr r2, [r4, #184] ; 0xb8 4248: e0023003 and r3, r2, r3 424c: e59f2148 ldr r2, [pc, #328] ; 439c 4250: e1530002 cmp r3, r2 4254: 1a00000b bne 4288 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 4258: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 425c: e3530000 cmp r3, #0 <== NOT EXECUTED 4260: 0a000002 beq 4270 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 4264: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4268: e3130020 tst r3, #32 <== NOT EXECUTED 426c: 0a000005 beq 4288 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 4270: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4274: e59d1000 ldr r1, [sp] <== NOT EXECUTED 4278: e3a02001 mov r2, #1 <== NOT EXECUTED 427c: e1a0e00f mov lr, pc <== NOT EXECUTED 4280: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 4284: ea00000a b 42b4 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 4288: e59430b8 ldr r3, [r4, #184] ; 0xb8 428c: e3130c01 tst r3, #256 ; 0x100 4290: 0a000007 beq 42b4 tty->flow_ctrl &= ~FL_IRTSOFF; 4294: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4298: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 429c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 42a0: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 42a4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 42a8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 42ac: 11a0e00f movne lr, pc <== NOT EXECUTED 42b0: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 42b4: e594303c ldr r3, [r4, #60] ; 0x3c 42b8: e3130002 tst r3, #2 42bc: 0a000005 beq 42d8 if (siproc (c, tty)) 42c0: e1a0000a mov r0, sl 42c4: e1a01004 mov r1, r4 42c8: ebffff1f bl 3f4c wait = 0; 42cc: e3500000 cmp r0, #0 42d0: 13a06000 movne r6, #0 42d4: ea000006 b 42f4 } else { siproc (c, tty); 42d8: e1a0000a mov r0, sl <== NOT EXECUTED 42dc: e1a01004 mov r1, r4 <== NOT EXECUTED 42e0: ebffff19 bl 3f4c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 42e4: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 42e8: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; 42ec: e1520003 cmp r2, r3 <== NOT EXECUTED 42f0: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; 42f4: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 42f8: e594205c ldr r2, [r4, #92] ; 0x5c 42fc: e5943060 ldr r3, [r4, #96] ; 0x60 4300: e1520003 cmp r2, r3 4304: 0a000004 beq 431c (tty->ccount < (CBUFSIZE-1))) { 4308: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 430c: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 4310: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 4314: e1520003 cmp r2, r3 4318: baffffb5 blt 41f4 } /* * Wait for characters */ if ( wait ) { 431c: e3560000 cmp r6, #0 4320: 0a00000c beq 4358 sc = rtems_semaphore_obtain( 4324: e2840068 add r0, r4, #104 ; 0x68 4328: e8900003 ldm r0, {r0, r1} 432c: e1a0200a mov r2, sl 4330: eb0003d2 bl 5280 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 4334: e3500000 cmp r0, #0 4338: 0affffee beq 42f8 433c: ea000005 b 4358 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 4340: e594201c ldr r2, [r4, #28] 4344: e7d22003 ldrb r2, [r2, r3] 4348: e2833001 add r3, r3, #1 434c: e4cb2001 strb r2, [fp], #1 4350: e5843024 str r3, [r4, #36] ; 0x24 count--; 4354: e2488001 sub r8, r8, #1 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 4358: e3580000 cmp r8, #0 435c: 0a000003 beq 4370 4360: e2842020 add r2, r4, #32 4364: e892000c ldm r2, {r2, r3} 4368: e1530002 cmp r3, r2 436c: bafffff3 blt 4340 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 4370: e5953010 ldr r3, [r5, #16] 4374: e0688003 rsb r8, r8, r3 4378: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; 437c: e3a03000 mov r3, #0 4380: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 4384: e5940014 ldr r0, [r4, #20] 4388: eb000402 bl 5398 return sc; } 438c: e1a00007 mov r0, r7 4390: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000046b0 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 46b0: e59020b8 ldr r2, [r0, #184] ; 0xb8 46b4: e59f31b8 ldr r3, [pc, #440] ; 4874 46b8: e0023003 and r3, r2, r3 46bc: e59f21b4 ldr r2, [pc, #436] ; 4878 46c0: e1530002 cmp r3, r2 * 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) { 46c4: e92d4070 push {r4, r5, r6, lr} 46c8: e1a04000 mov r4, r0 int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 46cc: 1a00000c bne 4704 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 46d0: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 46d4: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 46d8: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 46dc: e1a0e00f mov lr, pc <== NOT EXECUTED 46e0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 46e4: ebfffa06 bl 2f04 <== NOT EXECUTED tty->t_dqlen--; 46e8: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 46ec: e2433001 sub r3, r3, #1 <== NOT EXECUTED 46f0: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 46f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 46f8: e3833002 orr r3, r3, #2 <== NOT EXECUTED 46fc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); 4700: ea00000f b 4744 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 4704: e59030b8 ldr r3, [r0, #184] ; 0xb8 4708: e2033003 and r3, r3, #3 470c: e3530002 cmp r3, #2 4710: 1a00000e bne 4750 * 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, (void *)&(tty->termios.c_cc[VSTART]), 1); 4714: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 4718: e3a02001 mov r2, #1 <== NOT EXECUTED 471c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 4720: e1a0e00f mov lr, pc <== NOT EXECUTED 4724: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 4728: ebfff9f5 bl 2f04 <== NOT EXECUTED tty->t_dqlen--; 472c: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 4730: e2433001 sub r3, r3, #1 <== NOT EXECUTED 4734: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 4738: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 473c: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 4740: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4744: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 4748: e3a05001 mov r5, #1 <== NOT EXECUTED 474c: ea000046 b 486c <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 4750: e5902080 ldr r2, [r0, #128] ; 0x80 4754: e5903084 ldr r3, [r0, #132] ; 0x84 4758: e1520003 cmp r2, r3 475c: 1a000005 bne 4778 /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 4760: e5903094 ldr r3, [r0, #148] ; 0x94 4764: e3530002 cmp r3, #2 4768: 1a00003e bne 4868 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 476c: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 4770: eb000308 bl 5398 <== NOT EXECUTED 4774: ea00003b b 4868 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 4778: ebfff9e1 bl 2f04 len = tty->t_dqlen; tty->t_dqlen = 0; 477c: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 4780: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; 4784: e5843090 str r3, [r4, #144] ; 0x90 4788: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 478c: e5943084 ldr r3, [r4, #132] ; 0x84 4790: e5941088 ldr r1, [r4, #136] ; 0x88 4794: e0820003 add r0, r2, r3 4798: eb002c79 bl f984 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 479c: e5943094 ldr r3, [r4, #148] ; 0x94 47a0: e3530002 cmp r3, #2 rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 47a4: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; 47a8: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 47ac: 0594008c ldreq r0, [r4, #140] ; 0x8c 47b0: 0b0002f8 bleq 5398 } if (newTail == tty->rawOutBuf.Head) { 47b4: e5943080 ldr r3, [r4, #128] ; 0x80 47b8: e1560003 cmp r6, r3 47bc: 1a00000a bne 47ec nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 47c0: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 47c4: e3a05000 mov r5, #0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 47c8: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 47cc: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; 47d0: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 47d4: 0a000021 beq 4860 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 47d8: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 47dc: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 47e0: e1a0e00f mov lr, pc <== NOT EXECUTED 47e4: e12fff13 bx r3 <== NOT EXECUTED 47e8: ea00001c b 4860 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 47ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 47f0: e2033e21 and r3, r3, #528 ; 0x210 47f4: e3530e21 cmp r3, #528 ; 0x210 47f8: 1a000008 bne 4820 == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 47fc: ebfff9c0 bl 2f04 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4800: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4804: e3833020 orr r3, r3, #32 <== NOT EXECUTED 4808: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 480c: e3a03001 mov r3, #1 <== NOT EXECUTED 4810: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED 4814: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; 4818: e3a05000 mov r5, #0 <== NOT EXECUTED 481c: ea00000f b 4860 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 4820: e5943080 ldr r3, [r4, #128] ; 0x80 4824: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; 4828: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; 482c: 95945080 ldrls r5, [r4, #128] ; 0x80 /* 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)) { 4830: e59430b8 ldr r3, [r4, #184] ; 0xb8 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; 4834: e0665005 rsb r5, r6, r5 /* 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)) { 4838: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( 483c: e594107c ldr r1, [r4, #124] ; 0x7c 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)) { nToSend = 1; 4840: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ 4844: e3a03001 mov r3, #1 4848: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( 484c: e5940010 ldr r0, [r4, #16] 4850: e0811006 add r1, r1, r6 4854: e1a02005 mov r2, r5 4858: e1a0e00f mov lr, pc 485c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 4860: e5846084 str r6, [r4, #132] ; 0x84 4864: ea000000 b 486c /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 4868: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 486c: e1a00005 mov r0, r5 4870: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00003fa8 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3fa8: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 3fac: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3fb0: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3fb4: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 3fb8: 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); 3fbc: e1a02001 mov r2, r1 3fc0: e5950018 ldr r0, [r5, #24] 3fc4: eb0004ad bl 5280 if (sc != RTEMS_SUCCESSFUL) 3fc8: e2506000 subs r6, r0, #0 3fcc: 1a000020 bne 4054 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 3fd0: e59520cc ldr r2, [r5, #204] ; 0xcc 3fd4: e59f3080 ldr r3, [pc, #128] ; 405c 3fd8: e0833282 add r3, r3, r2, lsl #5 3fdc: e593300c ldr r3, [r3, #12] 3fe0: e3530000 cmp r3, #0 3fe4: 0a000005 beq 4000 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 3fe8: e1a00005 mov r0, r5 3fec: e1a01004 mov r1, r4 3ff0: e1a0e00f mov lr, pc 3ff4: e12fff13 bx r3 3ff8: e1a06000 mov r6, r0 3ffc: ea000012 b 404c rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 4000: e5953034 ldr r3, [r5, #52] ; 0x34 4004: e3130001 tst r3, #1 uint32_t count = args->count; 4008: 15947010 ldrne r7, [r4, #16] char *buffer = args->buffer; 400c: 1594800c ldrne r8, [r4, #12] 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) { 4010: 1a000004 bne 4028 4014: ea000006 b 4034 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 4018: e4d80001 ldrb r0, [r8], #1 401c: e1a01005 mov r1, r5 4020: ebfffe7c bl 3a18 4024: e2477001 sub r7, r7, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 4028: e3570000 cmp r7, #0 402c: 1afffff9 bne 4018 4030: ea000003 b 4044 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 4034: e284000c add r0, r4, #12 <== NOT EXECUTED 4038: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 403c: e1a02005 mov r2, r5 <== NOT EXECUTED 4040: ebfffe34 bl 3918 <== NOT EXECUTED args->bytes_moved = args->count; 4044: e5943010 ldr r3, [r4, #16] 4048: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 404c: e5950018 ldr r0, [r5, #24] 4050: eb0004d0 bl 5398 return sc; } 4054: e1a00006 mov r0, r6 4058: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000065b4 : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 65b4: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 65b8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 65bc: e1a05000 mov r5, r0 65c0: e1a08001 mov r8, r1 65c4: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 65c8: 0a00000e beq 6608 if (rtems_panic_in_progress++) 65cc: e59f212c ldr r2, [pc, #300] ; 6700 65d0: e5923000 ldr r3, [r2] 65d4: e2831001 add r1, r3, #1 65d8: e3530000 cmp r3, #0 65dc: e5821000 str r1, [r2] 65e0: 0a000003 beq 65f4 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 65e4: e59f3118 ldr r3, [pc, #280] ; 6704 <== NOT EXECUTED 65e8: e5932000 ldr r2, [r3] <== NOT EXECUTED 65ec: e2822001 add r2, r2, #1 <== NOT EXECUTED 65f0: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 65f4: e59f3104 ldr r3, [pc, #260] ; 6700 65f8: e5933000 ldr r3, [r3] 65fc: e3530002 cmp r3, #2 return 0; 6600: c3a04000 movgt r4, #0 if (error_flag & RTEMS_ERROR_PANIC) { if (rtems_panic_in_progress++) _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6604: ca00003b bgt 66f8 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 6608: e59f30f8 ldr r3, [pc, #248] ; 6708 660c: e5933000 ldr r3, [r3] 6610: e5930008 ldr r0, [r3, #8] 6614: eb002bc3 bl 11528 status = error_flag & ~RTEMS_ERROR_MASK; 6618: e3c56207 bic r6, r5, #1879048192 ; 0x70000000 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 661c: e2155101 ands r5, r5, #1073741824 ; 0x40000000 6620: 0a000001 beq 662c local_errno = errno; 6624: eb002ac8 bl 1114c <__errno> 6628: e5905000 ldr r5, [r0] #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 662c: e59f70d4 ldr r7, [pc, #212] ; 6708 6630: e5973000 ldr r3, [r7] 6634: e1a02004 mov r2, r4 6638: e593000c ldr r0, [r3, #12] 663c: e1a01008 mov r1, r8 6640: eb0046f5 bl 1821c if (status) 6644: e3560000 cmp r6, #0 #if defined(RTEMS_MULTIPROCESSING) if (_System_state_Is_multiprocessing) fprintf(stderr, "[%" PRIu32 "] ", _Configuration_MP_table->node); #endif chars_written += vfprintf(stderr, printf_format, arglist); 6648: e1a04000 mov r4, r0 if (status) 664c: 0a000008 beq 6674 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 6650: e5973000 ldr r3, [r7] 6654: e1a00006 mov r0, r6 6658: e593700c ldr r7, [r3, #12] 665c: ebffffd0 bl 65a4 6660: e59f10a4 ldr r1, [pc, #164] ; 670c 6664: e1a02000 mov r2, r0 6668: e1a00007 mov r0, r7 666c: eb002c93 bl 118c0 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 6670: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 6674: e3550000 cmp r5, #0 6678: 0a000015 beq 66d4 if ((local_errno > 0) && *strerror(local_errno)) 667c: da00000d ble 66b8 6680: e1a00005 mov r0, r5 6684: eb002f90 bl 124cc 6688: e5d03000 ldrb r3, [r0] 668c: e3530000 cmp r3, #0 6690: 0a000008 beq 66b8 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 6694: e59f306c ldr r3, [pc, #108] ; 6708 6698: e5933000 ldr r3, [r3] 669c: e1a00005 mov r0, r5 66a0: e593600c ldr r6, [r3, #12] 66a4: eb002f88 bl 124cc 66a8: e59f1060 ldr r1, [pc, #96] ; 6710 66ac: e1a02000 mov r2, r0 66b0: e1a00006 mov r0, r6 66b4: ea000004 b 66cc else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 66b8: e59f3048 ldr r3, [pc, #72] ; 6708 66bc: e5933000 ldr r3, [r3] 66c0: e59f104c ldr r1, [pc, #76] ; 6714 66c4: e593000c ldr r0, [r3, #12] 66c8: e1a02005 mov r2, r5 66cc: eb002c7b bl 118c0 66d0: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); 66d4: e59f502c ldr r5, [pc, #44] ; 6708 66d8: e5953000 ldr r3, [r5] 66dc: e59f1034 ldr r1, [pc, #52] ; 6718 66e0: e593000c ldr r0, [r3, #12] 66e4: eb002c75 bl 118c0 (void) fflush(stderr); 66e8: e5953000 ldr r3, [r5] chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); } chars_written += fprintf(stderr, "\n"); 66ec: e0804004 add r4, r0, r4 (void) fflush(stderr); 66f0: e593000c ldr r0, [r3, #12] 66f4: eb002b8b bl 11528 return chars_written; } 66f8: e1a00004 mov r0, r4 66fc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00002780 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2780: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; 2784: e3a04000 mov r4, #0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2788: e58d1000 str r1, [sp] unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 278c: e59fb0d4 ldr fp, [pc, #212] ; 2868 limit++; continue; } sign = 1; } if (!isdigit(c)) 2790: e59f90d4 ldr r9, [pc, #212] ; 286c /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2794: e1a05000 mov r5, r0 int c; unsigned int i = 0; unsigned int limit = INT_MAX; 2798: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 279c: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 27a0: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 27a4: e5953004 ldr r3, [r5, #4] 27a8: e2433001 sub r3, r3, #1 27ac: e3530000 cmp r3, #0 27b0: e5853004 str r3, [r5, #4] 27b4: a5953000 ldrge r3, [r5] 27b8: a4d36001 ldrbge r6, [r3], #1 27bc: a5853000 strge r3, [r5] 27c0: aa000003 bge 27d4 27c4: e59b0000 ldr r0, [fp] <== NOT EXECUTED 27c8: e1a01005 mov r1, r5 <== NOT EXECUTED 27cc: eb0030f7 bl ebb0 <__srget_r> <== NOT EXECUTED 27d0: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 27d4: e356003a cmp r6, #58 ; 0x3a 27d8: 0a000019 beq 2844 break; if (sign == 0) { 27dc: e3540000 cmp r4, #0 27e0: 1a000004 bne 27f8 if (c == '-') { 27e4: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 27e8: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 27ec: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 27f0: 0affffeb beq 27a4 sign = -1; limit++; continue; } sign = 1; 27f4: e3a04001 mov r4, #1 } if (!isdigit(c)) 27f8: e5993000 ldr r3, [r9] 27fc: e0833006 add r3, r3, r6 2800: e5d30001 ldrb r0, [r3, #1] 2804: e2100004 ands r0, r0, #4 2808: 0a000015 beq 2864 return 0; d = c - '0'; if ((i > (limit / 10)) 280c: e1a00008 mov r0, r8 2810: e3a0100a mov r1, #10 2814: eb003a14 bl 1106c <__aeabi_uidiv> 2818: e1570000 cmp r7, r0 281c: 8a00000f bhi 2860 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 2820: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 2824: 1a000004 bne 283c 2828: e1a00008 mov r0, r8 282c: e3a0100a mov r1, #10 2830: eb003aa5 bl 112cc <__umodsi3> 2834: e1560000 cmp r6, r0 2838: 8a000008 bhi 2860 return 0; i = i * 10 + d; 283c: e027679a mla r7, sl, r7, r6 2840: eaffffd7 b 27a4 } if (sign == 0) 2844: e3540000 cmp r4, #0 return 0; 2848: 01a00004 moveq r0, r4 *val = i * sign; 284c: 10040497 mulne r4, r7, r4 2850: 159d3000 ldrne r3, [sp] return 1; 2854: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 2858: 15834000 strne r4, [r3] return 1; 285c: ea000000 b 2864 if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; 2860: e3a00000 mov r0, #0 } if (sign == 0) return 0; *val = i * sign; return 1; } 2864: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00003f4c : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3f4c: e591203c ldr r2, [r1, #60] ; 0x3c 3f50: e59f304c ldr r3, [pc, #76] ; 3fa4 3f54: e0023003 and r3, r2, r3 3f58: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 3f5c: e92d4030 push {r4, r5, lr} 3f60: e1a04001 mov r4, r1 3f64: e1a05000 mov r5, r0 int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3f68: 0a00000b beq 3f9c rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3f6c: e5910018 ldr r0, [r1, #24] 3f70: e3a01000 mov r1, #0 3f74: e1a02001 mov r2, r1 3f78: eb0004c0 bl 5280 i = iproc (c, tty); 3f7c: e1a01004 mov r1, r4 3f80: e1a00005 mov r0, r5 3f84: ebffff8b bl 3db8 3f88: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); 3f8c: e5940018 ldr r0, [r4, #24] 3f90: eb000500 bl 5398 } else { i = iproc (c, tty); } return i; } 3f94: e1a00005 mov r0, r5 3f98: e8bd8030 pop {r4, r5, pc} 3f9c: 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); 3fa0: eaffff84 b 3db8 <== NOT EXECUTED =============================================================================== 00005c28 : */ int unmount( const char *path ) { 5c28: e92d4070 push {r4, r5, r6, lr} 5c2c: e24dd018 sub sp, sp, #24 5c30: 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 ) ) 5c34: eb002222 bl e4c4 5c38: e28d4004 add r4, sp, #4 5c3c: e3a03001 mov r3, #1 5c40: e1a01000 mov r1, r0 5c44: e58d3000 str r3, [sp] 5c48: e1a00005 mov r0, r5 5c4c: e3a02000 mov r2, #0 5c50: e1a03004 mov r3, r4 5c54: ebfff46a bl 2e04 5c58: e3500000 cmp r0, #0 5c5c: 1a000040 bne 5d64 return -1; mt_entry = loc.mt_entry; 5c60: e59d5014 ldr r5, [sp, #20] /* * Verify this is the root node for the file system to be unmounted. */ if ( fs_root_loc->node_access != loc.node_access ){ 5c64: e59d3004 ldr r3, [sp, #4] 5c68: e595201c ldr r2, [r5, #28] 5c6c: e1520003 cmp r2, r3 5c70: 0a000004 beq 5c88 rtems_filesystem_freenode( &loc ); 5c74: e1a00004 mov r0, r4 5c78: ebfff491 bl 2ec4 rtems_set_errno_and_return_minus_one( EACCES ); 5c7c: eb001c98 bl cee4 <__errno> 5c80: e3a0300d mov r3, #13 5c84: ea000011 b 5cd0 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 5c88: e1a00004 mov r0, r4 5c8c: ebfff48c bl 2ec4 * 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 ) 5c90: e59f30d8 ldr r3, [pc, #216] ; 5d70 5c94: e5933000 ldr r3, [r3] 5c98: e5933014 ldr r3, [r3, #20] 5c9c: e1530005 cmp r3, r5 5ca0: 0a000008 beq 5cc8 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 5ca4: e59f00c8 ldr r0, [pc, #200] ; 5d74 5ca8: e595102c ldr r1, [r5, #44] ; 0x2c 5cac: ebfff6b1 bl 3778 5cb0: e3500000 cmp r0, #0 5cb4: 1a000003 bne 5cc8 * 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 ) 5cb8: e1a00005 mov r0, r5 5cbc: ebfff55b bl 3230 5cc0: e3500001 cmp r0, #1 5cc4: 1a000003 bne 5cd8 rtems_set_errno_and_return_minus_one( EBUSY ); 5cc8: eb001c85 bl cee4 <__errno> 5ccc: e3a03010 mov r3, #16 5cd0: e5803000 str r3, [r0] 5cd4: ea000022 b 5d64 * 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 ) 5cd8: e5953014 ldr r3, [r5, #20] 5cdc: e1a00005 mov r0, r5 5ce0: e1a0e00f mov lr, pc 5ce4: e593f028 ldr pc, [r3, #40] ; 0x28 5ce8: e2506000 subs r6, r0, #0 5cec: 1a00001c bne 5d64 * 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){ 5cf0: e5953028 ldr r3, [r5, #40] ; 0x28 5cf4: e1a00005 mov r0, r5 5cf8: e1a0e00f mov lr, pc 5cfc: e593f02c ldr pc, [r3, #44] ; 0x2c 5d00: e2504000 subs r4, r0, #0 5d04: 0a000007 beq 5d28 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 5d08: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 5d0c: e1a00005 mov r0, r5 <== NOT EXECUTED 5d10: e1a0e00f mov lr, pc <== NOT EXECUTED 5d14: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 5d18: e3500000 cmp r0, #0 <== NOT EXECUTED 5d1c: 0a000010 beq 5d64 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 5d20: e1a00006 mov r0, r6 <== NOT EXECUTED 5d24: eb0003c9 bl 6c50 <== NOT EXECUTED rtems_status_code rtems_libio_set_private_env(void); rtems_status_code rtems_libio_share_private_env(rtems_id task_id) ; static inline void rtems_libio_lock( void ) { rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT ); 5d28: e59f6048 ldr r6, [pc, #72] ; 5d78 5d2c: e1a01004 mov r1, r4 5d30: e1a02004 mov r2, r4 5d34: e5960000 ldr r0, [r6] 5d38: eb000242 bl 6648 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5d3c: e1a00005 mov r0, r5 5d40: eb000479 bl 6f2c <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 5d44: e5960000 ldr r0, [r6] 5d48: eb000284 bl 6760 /* * 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 ); 5d4c: e2850008 add r0, r5, #8 5d50: ebfff45b bl 2ec4 free( mt_entry ); 5d54: e1a00005 mov r0, r5 5d58: ebfff45e bl 2ed8 return 0; 5d5c: e1a00004 mov r0, r4 5d60: ea000000 b 5d68 */ if ((fs_root_loc->ops->fsunmount_me_h )( mt_entry ) != 0){ if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) rtems_fatal_error_occurred( 0 ); return -1; 5d64: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 5d68: e28dd018 add sp, sp, #24 5d6c: e8bd8070 pop {r4, r5, r6, pc}