=============================================================================== 00008728 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 8728: e5902000 ldr r2, [r0] 872c: 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; 8730: e5903010 ldr r3, [r0, #16] switch( node->type ) { 8734: 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; 8738: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 873c: e3520006 cmp r2, #6 8740: 979ff102 ldrls pc, [pc, r2, lsl #2] 8744: ea000010 b 878c <== NOT EXECUTED 8748: 00008764 .word 0x00008764 <== NOT EXECUTED 874c: 0000876c .word 0x0000876c <== NOT EXECUTED 8750: 00008774 .word 0x00008774 <== NOT EXECUTED 8754: 00008774 .word 0x00008774 <== NOT EXECUTED 8758: 0000877c .word 0x0000877c <== NOT EXECUTED 875c: 0000877c .word 0x0000877c <== NOT EXECUTED 8760: 00008784 .word 0x00008784 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 8764: e593300c ldr r3, [r3, #12] 8768: ea000006 b 8788 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 876c: e59f3020 ldr r3, [pc, #32] ; 8794 8770: ea000004 b 8788 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 8774: e59f301c ldr r3, [pc, #28] ; 8798 8778: ea000002 b 8788 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 877c: e5933008 ldr r3, [r3, #8] 8780: ea000000 b 8788 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 8784: e5933010 ldr r3, [r3, #16] 8788: e5803008 str r3, [r0, #8] break; } return 0; } 878c: e3a00000 mov r0, #0 8790: e12fff1e bx lr =============================================================================== 00008828 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8828: 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 ) ) { 882c: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 8830: e24dd040 sub sp, sp, #64 ; 0x40 8834: e58d0000 str r0, [sp] 8838: e1a06001 mov r6, r1 883c: e1a08002 mov r8, r2 8840: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8844: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 8848: 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 ); 884c: 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 ) ) { 8850: 0a000057 beq 89b4 rtems_set_errno_and_return_minus_one( EIO ); 8854: eb000cbb bl bb48 <__errno> <== NOT EXECUTED 8858: e3a03005 mov r3, #5 <== NOT EXECUTED 885c: ea00007e b 8a5c <== 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 ); 8860: e59d2000 ldr r2, [sp] 8864: e28d303c add r3, sp, #60 ; 0x3c 8868: e0820007 add r0, r2, r7 886c: e1a01006 mov r1, r6 8870: e1a0200a mov r2, sl 8874: eb0001ae bl 8f34 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 8878: e5943000 ldr r3, [r4] 887c: 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 ); 8880: e1a09000 mov r9, r0 pathnamelen -= len; 8884: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8888: 0a000041 beq 8994 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 888c: e3500000 cmp r0, #0 8890: 0a000006 beq 88b0 if ( node->type == IMFS_DIRECTORY ) 8894: e595104c ldr r1, [r5, #76] ; 0x4c 8898: e3510001 cmp r1, #1 889c: 1a000003 bne 88b0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 88a0: e1a00004 mov r0, r4 88a4: ebffffbc bl 879c 88a8: e3500000 cmp r0, #0 88ac: 0a000068 beq 8a54 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 88b0: 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; 88b4: e06b6006 rsb r6, fp, r6 i += len; 88b8: 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; 88bc: e5945000 ldr r5, [r4] switch( type ) { 88c0: 0a000014 beq 8918 88c4: e3590004 cmp r9, #4 88c8: 0a000036 beq 89a8 88cc: e3590002 cmp r9, #2 88d0: 1a000037 bne 89b4 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 88d4: e59fc194 ldr ip, [pc, #404] ; 8a70 88d8: e59c3000 ldr r3, [ip] 88dc: e5933018 ldr r3, [r3, #24] 88e0: e1550003 cmp r5, r3 88e4: 0a000032 beq 89b4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 88e8: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 88ec: e59e301c ldr r3, [lr, #28] 88f0: 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; 88f4: 028dc028 addeq ip, sp, #40 ; 0x28 88f8: 028ee008 addeq lr, lr, #8 88fc: 0a000037 beq 89e0 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 8900: e5955008 ldr r5, [r5, #8] 8904: e3550000 cmp r5, #0 8908: 1a000024 bne 89a0 rtems_set_errno_and_return_minus_one( ENOENT ); 890c: eb000c8d bl bb48 <__errno> 8910: e5809000 str r9, [r0] 8914: ea000051 b 8a60 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 8918: e595304c ldr r3, [r5, #76] ; 0x4c 891c: e3530003 cmp r3, #3 8920: 1a000004 bne 8938 IMFS_evaluate_hard_link( pathloc, 0 ); 8924: e1a00004 mov r0, r4 8928: e3a01000 mov r1, #0 892c: ebffffaa bl 87dc node = pathloc->node_access; 8930: e5945000 ldr r5, [r4] 8934: ea000008 b 895c * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 8938: e3530004 cmp r3, #4 893c: 1a000006 bne 895c result = IMFS_evaluate_sym_link( pathloc, 0 ); 8940: e1a00004 mov r0, r4 8944: e3a01000 mov r1, #0 8948: eb000049 bl 8a74 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 894c: e3700001 cmn r0, #1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 8950: e1a0b000 mov fp, r0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 8954: e5945000 ldr r5, [r4] if ( result == -1 ) 8958: 0a000041 beq 8a64 } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 895c: e595304c ldr r3, [r5, #76] ; 0x4c 8960: e3530001 cmp r3, #1 8964: 0a000002 beq 8974 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8968: eb000c76 bl bb48 <__errno> 896c: e3a03014 mov r3, #20 8970: ea000039 b 8a5c /* * 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 ) { 8974: e595e05c ldr lr, [r5, #92] ; 0x5c 8978: e35e0000 cmp lr, #0 897c: 1a000015 bne 89d8 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8980: e1a00005 mov r0, r5 8984: e1a0100a mov r1, sl 8988: eb000149 bl 8eb4 if ( !node ) 898c: e2505000 subs r5, r0, #0 8990: 1a000002 bne 89a0 rtems_set_errno_and_return_minus_one( ENOENT ); 8994: eb000c6b bl bb48 <__errno> 8998: e3a03002 mov r3, #2 899c: ea00002e b 8a5c /* * Set the node access to the point we have found. */ pathloc->node_access = node; 89a0: e5845000 str r5, [r4] 89a4: ea000002 b 89b4 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 89a8: eb000c66 bl bb48 <__errno> 89ac: e3a0305b mov r3, #91 ; 0x5b 89b0: ea000029 b 8a5c /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 89b4: e3590004 cmp r9, #4 89b8: 13590000 cmpne r9, #0 89bc: 1affffa7 bne 8860 * 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 ) { 89c0: e595304c ldr r3, [r5, #76] ; 0x4c 89c4: e3530001 cmp r3, #1 89c8: 1a000019 bne 8a34 if ( node->info.directory.mt_fs != NULL ) { 89cc: e595e05c ldr lr, [r5, #92] ; 0x5c 89d0: e35e0000 cmp lr, #0 89d4: 0a000016 beq 8a34 newloc = node->info.directory.mt_fs->mt_fs_root; 89d8: e28dc028 add ip, sp, #40 ; 0x28 89dc: e28ee01c add lr, lr, #28 89e0: e8be000f ldm lr!, {r0, r1, r2, r3} 89e4: e8ac000f stmia ip!, {r0, r1, r2, r3} 89e8: e59ee000 ldr lr, [lr] 89ec: e58ce000 str lr, [ip] *pathloc = newloc; 89f0: e28dc028 add ip, sp, #40 ; 0x28 89f4: e8bc000f ldm ip!, {r0, r1, r2, r3} 89f8: e1a0c004 mov ip, r4 89fc: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8a00: e59d103c ldr r1, [sp, #60] ; 0x3c 8a04: 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; 8a08: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8a0c: e0610007 rsb r0, r1, r7 8a10: e0820000 add r0, r2, r0 8a14: e594c00c ldr ip, [r4, #12] 8a18: e0861001 add r1, r6, r1 8a1c: e1a02008 mov r2, r8 8a20: e1a03004 mov r3, r4 8a24: e1a0e00f mov lr, pc 8a28: e59cf000 ldr pc, [ip] 8a2c: e1a0b000 mov fp, r0 8a30: ea00000b b 8a64 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8a34: e1a00004 mov r0, r4 8a38: ebffff3a bl 8728 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8a3c: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8a40: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8a44: e1a00004 mov r0, r4 8a48: ebffff53 bl 879c 8a4c: e3500000 cmp r0, #0 8a50: 1a000003 bne 8a64 rtems_set_errno_and_return_minus_one( EACCES ); 8a54: eb000c3b bl bb48 <__errno> 8a58: e3a0300d mov r3, #13 8a5c: e5803000 str r3, [r0] 8a60: e3e0b000 mvn fp, #0 return result; } 8a64: e1a0000b mov r0, fp 8a68: e28dd040 add sp, sp, #64 ; 0x40 8a6c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00008bb0 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8bb0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8bb4: e24dd03c sub sp, sp, #60 ; 0x3c 8bb8: e1a07000 mov r7, r0 8bbc: e1a04001 mov r4, r1 8bc0: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8bc4: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 8bc8: eb000fc8 bl caf0 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 8bcc: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8bd0: 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 ); 8bd4: e1a01008 mov r1, r8 8bd8: e28d3038 add r3, sp, #56 ; 0x38 8bdc: e0870005 add r0, r7, r5 8be0: e1a0200d mov r2, sp 8be4: eb0000d2 bl 8f34 pathlen -= len; i += len; if ( !pathloc->node_access ) 8be8: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8bec: e59db038 ldr fp, [sp, #56] ; 0x38 i += len; if ( !pathloc->node_access ) 8bf0: 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 ); 8bf4: e1a09000 mov r9, r0 pathlen -= len; 8bf8: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 8bfc: 0a000060 beq 8d84 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8c00: e3500000 cmp r0, #0 8c04: 0a000006 beq 8c24 if ( node->type == IMFS_DIRECTORY ) 8c08: e596104c ldr r1, [r6, #76] ; 0x4c 8c0c: e3510001 cmp r1, #1 8c10: 1a000003 bne 8c24 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8c14: e1a00004 mov r0, r4 8c18: ebfffedf bl 879c 8c1c: e3500000 cmp r0, #0 8c20: 0a00006c beq 8dd8 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 8c24: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 8c28: 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; 8c2c: e1a06003 mov r6, r3 switch( type ) { 8c30: e3590004 cmp r9, #4 8c34: 979ff109 ldrls pc, [pc, r9, lsl #2] 8c38: eaffffe5 b 8bd4 <== NOT EXECUTED 8c3c: 00008d48 .word 0x00008d48 <== NOT EXECUTED 8c40: 00008bd4 .word 0x00008bd4 <== NOT EXECUTED 8c44: 00008c50 .word 0x00008c50 <== NOT EXECUTED 8c48: 00008c8c .word 0x00008c8c <== NOT EXECUTED 8c4c: 00008d54 .word 0x00008d54 <== 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 ) 8c50: e59f119c ldr r1, [pc, #412] ; 8df4 8c54: e5912000 ldr r2, [r1] 8c58: e5922018 ldr r2, [r2, #24] 8c5c: e1530002 cmp r3, r2 8c60: 0affffdb beq 8bd4 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8c64: e594e010 ldr lr, [r4, #16] 8c68: e59e201c ldr r2, [lr, #28] 8c6c: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8c70: 028dc024 addeq ip, sp, #36 ; 0x24 8c74: 028ee008 addeq lr, lr, #8 8c78: 0a000019 beq 8ce4 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 8c7c: e5936008 ldr r6, [r3, #8] 8c80: e3560000 cmp r6, #0 8c84: 1a00002d bne 8d40 8c88: ea00003d b 8d84 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8c8c: e593304c ldr r3, [r3, #76] ; 0x4c 8c90: e3530003 cmp r3, #3 8c94: 0a000001 beq 8ca0 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8c98: e3530004 cmp r3, #4 8c9c: 1a000005 bne 8cb8 result = IMFS_evaluate_link( pathloc, 0 ); 8ca0: e1a00004 mov r0, r4 8ca4: e3a01000 mov r1, #0 8ca8: ebffff93 bl 8afc if ( result == -1 ) 8cac: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8cb0: e1a06000 mov r6, r0 if ( result == -1 ) 8cb4: 0a00004b beq 8de8 return -1; } node = pathloc->node_access; 8cb8: e5940000 ldr r0, [r4] if ( !node ) 8cbc: e3500000 cmp r0, #0 8cc0: 0a00003c beq 8db8 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8cc4: e590304c ldr r3, [r0, #76] ; 0x4c 8cc8: e3530001 cmp r3, #1 8ccc: 1a000039 bne 8db8 /* * 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 ) { 8cd0: e590e05c ldr lr, [r0, #92] ; 0x5c 8cd4: e35e0000 cmp lr, #0 8cd8: 0a000014 beq 8d30 newloc = node->info.directory.mt_fs->mt_fs_root; 8cdc: e28dc024 add ip, sp, #36 ; 0x24 8ce0: e28ee01c add lr, lr, #28 8ce4: e8be000f ldm lr!, {r0, r1, r2, r3} 8ce8: e8ac000f stmia ip!, {r0, r1, r2, r3} 8cec: e59ee000 ldr lr, [lr] 8cf0: e58ce000 str lr, [ip] *pathloc = newloc; 8cf4: e28dc024 add ip, sp, #36 ; 0x24 8cf8: e8bc000f ldm ip!, {r0, r1, r2, r3} 8cfc: e1a0c004 mov ip, r4 8d00: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8d04: 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; 8d08: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8d0c: e0625005 rsb r5, r2, r5 8d10: e594300c ldr r3, [r4, #12] 8d14: e0870005 add r0, r7, r5 8d18: e1a01004 mov r1, r4 8d1c: e1a0200a mov r2, sl 8d20: e1a0e00f mov lr, pc 8d24: e593f004 ldr pc, [r3, #4] 8d28: e1a06000 mov r6, r0 8d2c: ea00002d b 8de8 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8d30: e1a0100d mov r1, sp 8d34: eb00005e bl 8eb4 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8d38: e2506000 subs r6, r0, #0 8d3c: 0a000007 beq 8d60 done = true; else pathloc->node_access = node; 8d40: e5846000 str r6, [r4] 8d44: eaffffa2 b 8bd4 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8d48: eb000b7e bl bb48 <__errno> 8d4c: e3a03011 mov r3, #17 8d50: ea000022 b 8de0 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8d54: eb000b7b bl bb48 <__errno> 8d58: e3a0305b mov r3, #91 ; 0x5b 8d5c: ea00001f b 8de0 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8d60: e59d3038 ldr r3, [sp, #56] ; 0x38 8d64: e0633005 rsb r3, r3, r5 8d68: e0873003 add r3, r7, r3 8d6c: 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( 8d70: 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++) { 8d74: ea000005 b 8d90 if ( !IMFS_is_separator( path[ i ] ) ) 8d78: ebffe748 bl 2aa0 8d7c: e3500000 cmp r0, #0 8d80: 1a000002 bne 8d90 rtems_set_errno_and_return_minus_one( ENOENT ); 8d84: eb000b6f bl bb48 <__errno> 8d88: e3a03002 mov r3, #2 8d8c: ea000013 b 8de0 /* * 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++) { 8d90: e4d50001 ldrb r0, [r5], #1 8d94: e3500000 cmp r0, #0 8d98: 1afffff6 bne 8d78 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8d9c: e1a00004 mov r0, r4 8da0: ebfffe60 bl 8728 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 8da4: e5943000 ldr r3, [r4] 8da8: e593304c ldr r3, [r3, #76] ; 0x4c 8dac: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8db0: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 8db4: 0a000002 beq 8dc4 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8db8: eb000b62 bl bb48 <__errno> 8dbc: e3a03014 mov r3, #20 8dc0: ea000006 b 8de0 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 8dc4: e1a00004 mov r0, r4 8dc8: e3a01003 mov r1, #3 8dcc: ebfffe72 bl 879c 8dd0: e3500000 cmp r0, #0 8dd4: 1a000003 bne 8de8 rtems_set_errno_and_return_minus_one( EACCES ); 8dd8: eb000b5a bl bb48 <__errno> 8ddc: e3a0300d mov r3, #13 8de0: e5803000 str r3, [r0] 8de4: e3e06000 mvn r6, #0 return result; } 8de8: e1a00006 mov r0, r6 8dec: e28dd03c add sp, sp, #60 ; 0x3c 8df0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000879c : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 879c: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 87a0: 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 ) ) 87a4: 0a000004 beq 87bc rtems_set_errno_and_return_minus_one( EPERM ); 87a8: eb000ce6 bl bb48 <__errno> <== NOT EXECUTED 87ac: e3a03001 mov r3, #1 <== NOT EXECUTED 87b0: e5803000 str r3, [r0] <== NOT EXECUTED 87b4: e3e00000 mvn r0, #0 <== NOT EXECUTED 87b8: 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 ) 87bc: e5903000 ldr r3, [r0] 87c0: e5930030 ldr r0, [r3, #48] ; 0x30 */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 87c4: 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 ) 87c8: 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 ); 87cc: e1500001 cmp r0, r1 87d0: 13a00000 movne r0, #0 87d4: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 87d8: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00008df8 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 8df8: 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; 8dfc: e1a0c000 mov ip, r0 8e00: 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 ) { 8e04: e1a05000 mov r5, r0 8e08: 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; 8e0c: e8bc000f ldm ip!, {r0, r1, r2, r3} 8e10: e1a0e00d mov lr, sp 8e14: e8ae000f stmia lr!, {r0, r1, r2, r3} 8e18: e59c3000 ldr r3, [ip] 8e1c: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 8e20: e3a03000 mov r3, #0 8e24: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 8e28: e1a0500d mov r5, sp 8e2c: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 8e30: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 8e34: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 8e38: ebfffe3a bl 8728 if ( jnode->type != IMFS_DIRECTORY ) { 8e3c: e594304c ldr r3, [r4, #76] ; 0x4c 8e40: e3530001 cmp r3, #1 8e44: 1a000003 bne 8e58 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 8e48: e5942050 ldr r2, [r4, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8e4c: e2843054 add r3, r4, #84 ; 0x54 8e50: e1520003 cmp r2, r3 8e54: 1a000005 bne 8e70 result = IMFS_unlink( NULL, &loc ); 8e58: e3a00000 mov r0, #0 8e5c: e1a0100d mov r1, sp 8e60: ebffe263 bl 17f4 if (result != 0) 8e64: e3500000 cmp r0, #0 8e68: 1a00000c bne 8ea0 return -1; jnode = next; 8e6c: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 8e70: e3540000 cmp r4, #0 8e74: 0a00000b beq 8ea8 if ( jnode->type == IMFS_DIRECTORY ) { 8e78: e594304c ldr r3, [r4, #76] ; 0x4c 8e7c: e3530001 cmp r3, #1 8e80: 1affffe9 bne 8e2c if ( jnode_has_children( jnode ) ) 8e84: e5943050 ldr r3, [r4, #80] ; 0x50 8e88: e2842054 add r2, r4, #84 ; 0x54 8e8c: e1530002 cmp r3, r2 8e90: 0affffe5 beq 8e2c jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 8e94: e2534000 subs r4, r3, #0 8e98: 1affffe3 bne 8e2c 8e9c: ea000001 b 8ea8 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 8ea0: e3e00000 mvn r0, #0 <== NOT EXECUTED 8ea4: ea000000 b 8eac <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 8ea8: e1a00004 mov r0, r4 } 8eac: e28dd014 add sp, sp, #20 8eb0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000a6f0 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a6f0: e59f31e4 ldr r3, [pc, #484] ; a8dc #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a6f4: 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 ) { a6f8: e5935000 ldr r5, [r3] a6fc: e1a05125 lsr r5, r5, #2 a700: e2453001 sub r3, r5, #1 a704: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a708: e1a04000 mov r4, r0 a70c: e1a06001 mov r6, r1 a710: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a714: 8a00000e bhi a754 p = info->indirect; if ( malloc_it ) { a718: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a71c: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a720: 0a000007 beq a744 if ( !p ) { a724: e3500000 cmp r0, #0 a728: 1a000003 bne a73c p = memfile_alloc_block(); a72c: ebffffe2 bl a6bc if ( !p ) a730: e3500000 cmp r0, #0 a734: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; a738: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; a73c: e5940058 ldr r0, [r4, #88] ; 0x58 a740: ea000001 b a74c } if ( !p ) a744: e3500000 cmp r0, #0 a748: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; a74c: e0800106 add r0, r0, r6, lsl #2 a750: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a754: e2853001 add r3, r5, #1 a758: e0030395 mul r3, r5, r3 a75c: e2432001 sub r2, r3, #1 a760: e1510002 cmp r1, r2 a764: 8a000021 bhi a7f0 my_block -= FIRST_DOUBLY_INDIRECT; a768: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a76c: e1a00006 mov r0, r6 a770: e1a01005 mov r1, r5 a774: eb00132a bl f424 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a778: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a77c: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a780: e1a00006 mov r0, r6 a784: eb00128e bl f1c4 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a788: 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; a78c: e1a05000 mov r5, r0 p = info->doubly_indirect; a790: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { a794: 0a00000e beq a7d4 if ( !p ) { a798: e3500000 cmp r0, #0 a79c: 1a000003 bne a7b0 p = memfile_alloc_block(); a7a0: ebffffc5 bl a6bc if ( !p ) a7a4: e3500000 cmp r0, #0 a7a8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; a7ac: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; a7b0: e0804105 add r4, r0, r5, lsl #2 a7b4: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { a7b8: e3500000 cmp r0, #0 a7bc: 1a000009 bne a7e8 p1 = memfile_alloc_block(); a7c0: ebffffbd bl a6bc if ( !p1 ) a7c4: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a7c8: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) a7cc: 1a000005 bne a7e8 a7d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a7d4: e3500000 cmp r0, #0 a7d8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; a7dc: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) a7e0: e3500000 cmp r0, #0 a7e4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; a7e8: e0800107 add r0, r0, r7, lsl #2 a7ec: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { a7f0: e2832001 add r2, r3, #1 a7f4: e0020295 mul r2, r5, r2 a7f8: e2422001 sub r2, r2, #1 a7fc: e1510002 cmp r1, r2 a800: 8a000033 bhi a8d4 my_block -= FIRST_TRIPLY_INDIRECT; a804: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a808: e1a00006 mov r0, r6 a80c: e1a01005 mov r1, r5 a810: eb001303 bl f424 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a814: 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; a818: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a81c: e1a00006 mov r0, r6 a820: eb001267 bl f1c4 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a824: 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; a828: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a82c: eb001264 bl f1c4 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a830: 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; a834: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a838: e1a00006 mov r0, r6 a83c: eb0012f8 bl f424 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a840: 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; a844: e1a05000 mov r5, r0 p = info->triply_indirect; a848: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a84c: 0a000016 beq a8ac if ( !p ) { a850: e3500000 cmp r0, #0 a854: 1a000003 bne a868 p = memfile_alloc_block(); a858: ebffff97 bl a6bc if ( !p ) a85c: e3500000 cmp r0, #0 a860: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->triply_indirect = p; a864: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; a868: e0804107 add r4, r0, r7, lsl #2 a86c: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { a870: e3500000 cmp r0, #0 a874: 1a000003 bne a888 p1 = memfile_alloc_block(); a878: ebffff8f bl a6bc if ( !p1 ) a87c: e3500000 cmp r0, #0 a880: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p[ triply ] = (block_p) p1; a884: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; a888: e0804105 add r4, r0, r5, lsl #2 a88c: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { a890: e3500000 cmp r0, #0 a894: 1a00000c bne a8cc p2 = memfile_alloc_block(); a898: ebffff87 bl a6bc if ( !p2 ) a89c: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a8a0: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) a8a4: 1a000008 bne a8cc a8a8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a8ac: e3500000 cmp r0, #0 a8b0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p1 = (block_p *) p[ triply ]; a8b4: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a8b8: e3500000 cmp r0, #0 a8bc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p2 = (block_p *)p1[ doubly ]; a8c0: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) a8c4: e3500000 cmp r0, #0 a8c8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p2[ singly ]; a8cc: e080010a add r0, r0, sl, lsl #2 a8d0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * This means the requested block number is out of range. */ return 0; a8d4: e3a00000 mov r0, #0 <== NOT EXECUTED } a8d8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00001694 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 1694: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1698: e593204c ldr r2, [r3, #76] ; 0x4c 169c: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 16a0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 16a4: 0a000004 beq 16bc rtems_set_errno_and_return_minus_one( ENOTDIR ); 16a8: eb002926 bl bb48 <__errno> <== NOT EXECUTED 16ac: e3a03014 mov r3, #20 <== NOT EXECUTED 16b0: e5803000 str r3, [r0] <== NOT EXECUTED 16b4: e3e00000 mvn r0, #0 <== NOT EXECUTED 16b8: 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; 16bc: e583005c str r0, [r3, #92] ; 0x5c return 0; 16c0: e3a00000 mov r0, #0 } 16c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00004018 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 4018: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 401c: e59f50e0 ldr r5, [pc, #224] ; 4104 4020: e5953000 ldr r3, [r5] * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 4024: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 4028: e5931008 ldr r1, [r3, #8] 402c: e280000c add r0, r0, #12 4030: eb00309d bl 102ac switch( the_jnode->type ) { 4034: e594204c ldr r2, [r4, #76] ; 0x4c 4038: e2423001 sub r3, r2, #1 403c: e3530006 cmp r3, #6 4040: 979ff103 ldrls pc, [pc, r3, lsl #2] 4044: ea000026 b 40e4 <== NOT EXECUTED 4048: 00004064 .word 0x00004064 <== NOT EXECUTED 404c: 00004078 .word 0x00004078 <== NOT EXECUTED 4050: 000040c4 .word 0x000040c4 <== NOT EXECUTED 4054: 000040c4 .word 0x000040c4 <== NOT EXECUTED 4058: 000040ac .word 0x000040ac <== NOT EXECUTED 405c: 00004090 .word 0x00004090 <== NOT EXECUTED 4060: 000040d0 .word 0x000040d0 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 4064: e5953000 ldr r3, [r5] 4068: e3a0002f mov r0, #47 ; 0x2f 406c: e5931008 ldr r1, [r3, #8] 4070: eb003058 bl 101d8 break; 4074: ea00001f b 40f8 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 4078: e5953000 ldr r3, [r5] 407c: e59f1084 ldr r1, [pc, #132] ; 4108 4080: e5930008 ldr r0, [r3, #8] 4084: e2842050 add r2, r4, #80 ; 0x50 4088: e892000c ldm r2, {r2, r3} 408c: ea000004 b 40a4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 4090: e5953000 ldr r3, [r5] 4094: e59f1070 ldr r1, [pc, #112] ; 410c 4098: e5930008 ldr r0, [r3, #8] 409c: e5942050 ldr r2, [r4, #80] ; 0x50 40a0: e5943058 ldr r3, [r4, #88] ; 0x58 40a4: eb00302b bl 10158 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 40a8: ea000012 b 40f8 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 40ac: e5953000 ldr r3, [r5] 40b0: e59f1058 ldr r1, [pc, #88] ; 4110 40b4: e5930008 ldr r0, [r3, #8] 40b8: e5942050 ldr r2, [r4, #80] ; 0x50 40bc: eb003025 bl 10158 (uint32_t)the_jnode->info.file.size ); #endif break; 40c0: ea00000c b 40f8 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 40c4: e5953000 ldr r3, [r5] <== NOT EXECUTED 40c8: e59f0044 ldr r0, [pc, #68] ; 4114 <== NOT EXECUTED 40cc: ea000001 b 40d8 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 40d0: e5953000 ldr r3, [r5] <== NOT EXECUTED 40d4: e59f003c ldr r0, [pc, #60] ; 4118 <== NOT EXECUTED 40d8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 40dc: e8bd4030 pop {r4, r5, lr} <== NOT EXECUTED case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 40e0: ea003071 b 102ac <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 40e4: e5953000 ldr r3, [r5] <== NOT EXECUTED 40e8: e59f102c ldr r1, [pc, #44] ; 411c <== NOT EXECUTED 40ec: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 40f0: 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 ); 40f4: ea003017 b 10158 <== NOT EXECUTED return; } puts(""); 40f8: e59f0020 ldr r0, [pc, #32] ; 4120 } 40fc: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 4100: ea003743 b 11e14 =============================================================================== 000090dc : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 90dc: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 90e0: e593204c ldr r2, [r3, #76] ; 0x4c 90e4: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 90e8: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 90ec: e3520005 cmp r2, #5 90f0: 979ff102 ldrls pc, [pc, r2, lsl #2] 90f4: ea000012 b 9144 <== NOT EXECUTED 90f8: 00009110 .word 0x00009110 <== NOT EXECUTED 90fc: 00009144 .word 0x00009144 <== NOT EXECUTED 9100: 00009130 .word 0x00009130 <== NOT EXECUTED 9104: 00009124 .word 0x00009124 <== NOT EXECUTED 9108: 00009124 .word 0x00009124 <== NOT EXECUTED 910c: 00009130 .word 0x00009130 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 9110: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 9114: e593c050 ldr ip, [r3, #80] ; 0x50 9118: e581201c str r2, [r1, #28] 911c: e581c018 str ip, [r1, #24] break; 9120: ea00000c b 9158 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 9124: e283c050 add ip, r3, #80 ; 0x50 9128: e89c1800 ldm ip, {fp, ip} 912c: ea000001 b 9138 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 9130: e3a0b000 mov fp, #0 9134: e3a0c000 mov ip, #0 9138: e581b020 str fp, [r1, #32] 913c: e581c024 str ip, [r1, #36] ; 0x24 break; 9140: ea000004 b 9158 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 9144: eb000a7f bl bb48 <__errno> 9148: e3a03086 mov r3, #134 ; 0x86 914c: e5803000 str r3, [r0] 9150: e3e00000 mvn r0, #0 9154: 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; 9158: e5902010 ldr r2, [r0, #16] buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 915c: e5922034 ldr r2, [r2, #52] ; 0x34 9160: 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 = 9164: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 9168: e5932030 ldr r2, [r3, #48] ; 0x30 916c: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 9170: e1d323b4 ldrh r2, [r3, #52] ; 0x34 9174: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 9178: e5932038 ldr r2, [r3, #56] ; 0x38 917c: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 9180: e1d323bc ldrh r2, [r3, #60] ; 0x3c 9184: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 9188: e1d323be ldrh r2, [r3, #62] ; 0x3e 918c: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 9190: e5932040 ldr r2, [r3, #64] ; 0x40 9194: e59f001c ldr r0, [pc, #28] ; 91b8 9198: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 919c: e2832044 add r2, r3, #68 ; 0x44 91a0: 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 = 91a4: 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; 91a8: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 91ac: e5813038 str r3, [r1, #56] ; 0x38 return 0; 91b0: e3a00000 mov r0, #0 } 91b4: e8bd8800 pop {fp, pc} =============================================================================== 000017f4 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 17f4: 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; 17f8: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 17fc: e595304c ldr r3, [r5, #76] ; 0x4c 1800: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1804: e24dd01c sub sp, sp, #28 1808: e1a06000 mov r6, r0 180c: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1810: 1a000024 bne 18a8 if ( !node->info.hard_link.link_node ) 1814: e595e050 ldr lr, [r5, #80] ; 0x50 1818: e35e0000 cmp lr, #0 181c: 1a000003 bne 1830 rtems_set_errno_and_return_minus_one( EINVAL ); 1820: eb0028c8 bl bb48 <__errno> <== NOT EXECUTED 1824: e3a03016 mov r3, #22 <== NOT EXECUTED 1828: e5803000 str r3, [r0] <== NOT EXECUTED 182c: ea000023 b 18c0 <== NOT EXECUTED the_link = *loc; 1830: e1a07001 mov r7, r1 1834: e8b7000f ldm r7!, {r0, r1, r2, r3} 1838: e1a0c00d mov ip, sp 183c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1840: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; 1844: e28d701c add r7, sp, #28 1848: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); 184c: 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; 1850: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1854: eb001bb3 bl 8728 /* * 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) 1858: e5953050 ldr r3, [r5, #80] ; 0x50 185c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 1860: e3520001 cmp r2, #1 1864: 1a000007 bne 1888 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1868: e1a00006 mov r0, r6 186c: e1a0100d mov r1, sp 1870: e59d3008 ldr r3, [sp, #8] 1874: e1a0e00f mov lr, pc 1878: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 187c: e3500000 cmp r0, #0 1880: 0a000008 beq 18a8 1884: ea00000d b 18c0 return -1; } else { node->info.hard_link.link_node->st_nlink --; 1888: e2422001 sub r2, r2, #1 188c: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 1890: e28d0014 add r0, sp, #20 1894: e3a01000 mov r1, #0 1898: eb00012c bl 1d50 189c: e5953050 ldr r3, [r5, #80] ; 0x50 18a0: e59d2014 ldr r2, [sp, #20] 18a4: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 18a8: e5943008 ldr r3, [r4, #8] 18ac: e1a00006 mov r0, r6 18b0: e1a01004 mov r1, r4 18b4: e1a0e00f mov lr, pc 18b8: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 18bc: ea000000 b 18c4 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 18c0: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 18c4: e28dd01c add sp, sp, #28 18c8: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 000018cc : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 18cc: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 18d0: e593204c ldr r2, [r3, #76] ; 0x4c 18d4: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 18d8: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 18dc: 0a000002 beq 18ec rtems_set_errno_and_return_minus_one( ENOTDIR ); 18e0: eb002898 bl bb48 <__errno> <== NOT EXECUTED 18e4: e3a03014 mov r3, #20 <== NOT EXECUTED 18e8: ea000004 b 1900 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 18ec: e593205c ldr r2, [r3, #92] ; 0x5c 18f0: e3520000 cmp r2, #0 18f4: 1a000004 bne 190c rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 18f8: eb002892 bl bb48 <__errno> <== NOT EXECUTED 18fc: e3a03016 mov r3, #22 <== NOT EXECUTED 1900: e5803000 str r3, [r0] <== NOT EXECUTED 1904: e3e00000 mvn r0, #0 <== NOT EXECUTED 1908: 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; 190c: e3a00000 mov r0, #0 1910: e583005c str r0, [r3, #92] ; 0x5c return 0; } 1914: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00001204 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 1204: 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); 1208: e59030c4 ldr r3, [r0, #196] ; 0xc4 size = Stack_check_usable_stack_size(stack); 120c: e59070c0 ldr r7, [r0, #192] ; 0xc0 { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 1210: e2832010 add r2, r3, #16 size = Stack_check_usable_stack_size(stack); 1214: 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++) 1218: e3c71003 bic r1, r7, #3 static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 121c: e1a05000 mov r5, r0 current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 1220: e590b0f0 ldr fp, [r0, #240] ; 0xf0 /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 1224: e2820010 add r0, r2, #16 for (ebase = base + length; base < ebase; base++) 1228: 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( 122c: e2833020 add r3, r3, #32 * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 1230: e59f10c0 ldr r1, [pc, #192] ; 12f8 1234: ea000002 b 1244 1238: e493c004 ldr ip, [r3], #4 123c: e15c0001 cmp ip, r1 1240: 1a000004 bne 1258 * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 1244: e1530000 cmp r3, r0 if (*base != U32_PATTERN) 1248: 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++) 124c: 3afffff9 bcc 1238 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; 1250: e3a06000 mov r6, #0 <== NOT EXECUTED 1254: ea000002 b 1264 <== 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 ) 1258: e3560000 cmp r6, #0 used = Stack_check_Calculate_used( low, size, high_water_mark ); 125c: 10822007 addne r2, r2, r7 1260: 10666002 rsbne r6, r6, r2 #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 1264: e5958008 ldr r8, [r5, #8] 1268: e59f408c ldr r4, [pc, #140] ; 12fc 126c: e3a01005 mov r1, #5 1270: e28d2008 add r2, sp, #8 1274: e1a00008 mov r0, r8 1278: e8940600 ldm r4, {r9, sl} 127c: eb000eca bl 4dac 1280: e59f1078 ldr r1, [pc, #120] ; 1300 1284: e1a03000 mov r3, r0 1288: e1a02008 mov r2, r8 128c: e1a0000a mov r0, sl 1290: e1a0e00f mov lr, pc 1294: e12fff19 bx r9 (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 1298: e59530c0 ldr r3, [r5, #192] ; 0xc0 129c: e59520c4 ldr r2, [r5, #196] ; 0xc4 12a0: e2433001 sub r3, r3, #1 else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 12a4: e0823003 add r3, r2, r3 12a8: e58db000 str fp, [sp] 12ac: e58d7004 str r7, [sp, #4] 12b0: e5940004 ldr r0, [r4, #4] 12b4: e59f1048 ldr r1, [pc, #72] ; 1304 12b8: e1a0e00f mov lr, pc 12bc: e594f000 ldr pc, [r4] stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 12c0: e5943008 ldr r3, [r4, #8] 12c4: e3530000 cmp r3, #0 12c8: 1a000004 bne 12e0 (*print_handler)( print_context, "Unavailable\n" ); 12cc: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 12d0: e59f1030 ldr r1, [pc, #48] ; 1308 <== NOT EXECUTED 12d4: e1a0e00f mov lr, pc <== NOT EXECUTED 12d8: e594f000 ldr pc, [r4] <== NOT EXECUTED 12dc: ea000004 b 12f4 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 12e0: e5940004 ldr r0, [r4, #4] 12e4: e59f1020 ldr r1, [pc, #32] ; 130c 12e8: e1a02006 mov r2, r6 12ec: e1a0e00f mov lr, pc 12f0: e594f000 ldr pc, [r4] } } 12f4: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000013b4 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 13b4: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED 13b8: e1a06000 mov r6, r0 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 13bc: e59040c4 ldr r4, [r0, #196] ; 0xc4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 13c0: e59f0078 ldr r0, [pc, #120] ; 1440 <== NOT EXECUTED Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 13c4: e20150ff and r5, r1, #255 ; 0xff <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); char name [32]; printk("BLOWN STACK!!!\n"); 13c8: eb0005fe bl 2bc8 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 13cc: e59f0070 ldr r0, [pc, #112] ; 1444 <== NOT EXECUTED 13d0: e1a01006 mov r1, r6 <== NOT EXECUTED 13d4: eb0005fb bl 2bc8 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 13d8: e59f0068 ldr r0, [pc, #104] ; 1448 <== NOT EXECUTED 13dc: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED 13e0: eb0005f8 bl 2bc8 <== NOT EXECUTED printk( 13e4: e59f0060 ldr r0, [pc, #96] ; 144c <== NOT EXECUTED 13e8: e596100c ldr r1, [r6, #12] <== NOT EXECUTED 13ec: eb0005f5 bl 2bc8 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 13f0: e1a0200d mov r2, sp <== NOT EXECUTED 13f4: e3a01020 mov r1, #32 <== NOT EXECUTED 13f8: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED 13fc: eb000e6a bl 4dac <== NOT EXECUTED 1400: e1a01000 mov r1, r0 <== NOT EXECUTED 1404: e59f0044 ldr r0, [pc, #68] ; 1450 <== NOT EXECUTED 1408: eb0005ee bl 2bc8 <== NOT EXECUTED ); printk( "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) 140c: e28610c0 add r1, r6, #192 ; 0xc0 <== NOT EXECUTED 1410: e8910006 ldm r1, {r1, r2} <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 1414: e59f0038 ldr r0, [pc, #56] ; 1454 <== NOT EXECUTED 1418: e0823001 add r3, r2, r1 <== NOT EXECUTED 141c: eb0005e9 bl 2bc8 <== NOT EXECUTED "task stack area (%lu Bytes): 0x%08" PRIxPTR " .. 0x%08" PRIxPTR "\n", (unsigned long) stack->size, stack->area, ((char *) stack->area + stack->size) ); if (!pattern_ok) { 1420: e3550000 cmp r5, #0 <== NOT EXECUTED printk( 1424: 059f002c ldreq r0, [pc, #44] ; 1458 <== NOT EXECUTED 1428: 03a01010 moveq r1, #16 <== NOT EXECUTED 142c: 02842008 addeq r2, r4, #8 <== NOT EXECUTED 1430: 02843018 addeq r3, r4, #24 <== NOT EXECUTED 1434: 0b0005e3 bleq 2bc8 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 1438: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED 143c: eb00106b bl 55f0 <== NOT EXECUTED =============================================================================== 00014af0 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14af0: e590304c ldr r3, [r0, #76] ; 0x4c Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 14af4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14af8: e1520003 cmp r2, r3 Objects_Id id __attribute__((unused)), CORE_message_queue_API_mp_support_callout api_message_queue_mp_support __attribute__((unused)), #endif uint32_t *count ) { 14afc: e1a06000 mov r6, r0 14b00: e1a0a001 mov sl, r1 14b04: e1a07002 mov r7, r2 14b08: e59d8020 ldr r8, [sp, #32] Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14b0c: 8a000013 bhi 14b60 <_CORE_message_queue_Broadcast+0x70> * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 14b10: e5905048 ldr r5, [r0, #72] ; 0x48 14b14: e3550000 cmp r5, #0 *count = 0; 14b18: 13a00000 movne r0, #0 14b1c: 15880000 strne r0, [r8] * NOTE: This check is critical because threads can block on * send and receive and this ensures that we are broadcasting * the message to threads waiting to receive -- not to send. */ if ( the_message_queue->number_of_pending_messages != 0 ) { 14b20: 0a000007 beq 14b44 <_CORE_message_queue_Broadcast+0x54> 14b24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 14b28: e594002c ldr r0, [r4, #44] ; 0x2c 14b2c: e1a0100a mov r1, sl 14b30: e1a02007 mov r2, r7 14b34: eb001e4a bl 1c464 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 14b38: e5943028 ldr r3, [r4, #40] ; 0x28 14b3c: e5837000 str r7, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 14b40: e2855001 add r5, r5, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 14b44: e1a00006 mov r0, r6 14b48: eb00099b bl 171bc <_Thread_queue_Dequeue> 14b4c: e2504000 subs r4, r0, #0 14b50: 1afffff4 bne 14b28 <_CORE_message_queue_Broadcast+0x38> if ( !_Objects_Is_local_id( the_thread->Object.id ) ) (*api_message_queue_mp_support) ( the_thread, id ); #endif } *count = number_broadcasted; 14b54: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 14b58: e1a00004 mov r0, r4 14b5c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { return CORE_MESSAGE_QUEUE_STATUS_INVALID_SIZE; 14b60: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 14b64: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00009d78 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9d78: e1a03000 mov r3, r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9d7c: e59f2124 ldr r2, [pc, #292] ; 9ea8 <_CORE_mutex_Seize_interrupt_trylock+0x130> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9d80: e593c050 ldr ip, [r3, #80] ; 0x50 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9d84: e3a00000 mov r0, #0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9d88: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9d8c: e15c0000 cmp ip, r0 9d90: e92d4010 push {r4, lr} Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9d94: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9d98: 0a00002c beq 9e50 <_CORE_mutex_Seize_interrupt_trylock+0xd8> the_mutex->lock = CORE_MUTEX_LOCKED; 9d9c: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9da0: e5920008 ldr r0, [r2, #8] 9da4: e5830060 str r0, [r3, #96] ; 0x60 the_mutex->nest_count = 1; 9da8: e3a00001 mov r0, #1 9dac: e5830054 str r0, [r3, #84] ; 0x54 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9db0: e5930048 ldr r0, [r3, #72] ; 0x48 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9db4: e3500002 cmp r0, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 9db8: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9dbc: 0a000001 beq 9dc8 <_CORE_mutex_Seize_interrupt_trylock+0x50> 9dc0: e3500003 cmp r0, #3 9dc4: 1a000004 bne 9ddc <_CORE_mutex_Seize_interrupt_trylock+0x64> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9dc8: e592c01c ldr ip, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9dcc: e3500003 cmp r0, #3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9dd0: e28c4001 add r4, ip, #1 9dd4: e582401c str r4, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9dd8: 0a000000 beq 9de0 <_CORE_mutex_Seize_interrupt_trylock+0x68> _ISR_Enable( *level_p ); 9ddc: ea00002b b 9e90 <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9de0: e593004c ldr r0, [r3, #76] ; 0x4c current = executing->current_priority; 9de4: e5924014 ldr r4, [r2, #20] if ( current == ceiling ) { 9de8: e1540000 cmp r4, r0 9dec: 1a000000 bne 9df4 <_CORE_mutex_Seize_interrupt_trylock+0x7c> _ISR_Enable( *level_p ); 9df0: ea000026 b 9e90 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 9df4: 9a00000b bls 9e28 <_CORE_mutex_Seize_interrupt_trylock+0xb0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9df8: e59f20ac ldr r2, [pc, #172] ; 9eac <_CORE_mutex_Seize_interrupt_trylock+0x134> 9dfc: e5920000 ldr r0, [r2] 9e00: e2800001 add r0, r0, #1 9e04: e5820000 str r0, [r2] 9e08: e5912000 ldr r2, [r1] 9e0c: e129f002 msr CPSR_fc, r2 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 9e10: e3a02000 mov r2, #0 9e14: e593005c ldr r0, [r3, #92] ; 0x5c 9e18: e593104c ldr r1, [r3, #76] ; 0x4c 9e1c: ebfff29e bl 689c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 9e20: ebfff3e4 bl 6db8 <_Thread_Enable_dispatch> 9e24: ea00001b b 9e98 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9e28: e3a00006 mov r0, #6 9e2c: e5820034 str r0, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; 9e30: e3a00001 mov r0, #1 9e34: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ 9e38: e3a00000 mov r0, #0 9e3c: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ 9e40: e582c01c str ip, [r2, #28] 9e44: e5913000 ldr r3, [r1] 9e48: e129f003 msr CPSR_fc, r3 9e4c: e8bd8010 pop {r4, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 9e50: e593005c ldr r0, [r3, #92] ; 0x5c 9e54: e1500002 cmp r0, r2 /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 9e58: 13a00001 movne r0, #1 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 9e5c: 18bd8010 popne {r4, pc} switch ( the_mutex->Attributes.lock_nesting_behavior ) { 9e60: e5932040 ldr r2, [r3, #64] ; 0x40 9e64: e3520000 cmp r2, #0 9e68: 0a000002 beq 9e78 <_CORE_mutex_Seize_interrupt_trylock+0x100> 9e6c: e3520001 cmp r2, #1 9e70: 1a00000a bne 9ea0 <_CORE_mutex_Seize_interrupt_trylock+0x128> 9e74: ea000003 b 9e88 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9e78: e5932054 ldr r2, [r3, #84] ; 0x54 9e7c: e2822001 add r2, r2, #1 9e80: e5832054 str r2, [r3, #84] ; 0x54 _ISR_Enable( *level_p ); 9e84: ea000001 b 9e90 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 9e88: e3a03002 mov r3, #2 <== NOT EXECUTED 9e8c: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED 9e90: e5913000 ldr r3, [r1] 9e94: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; 9e98: e3a00000 mov r0, #0 9e9c: e8bd8010 pop {r4, pc} /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 9ea0: e3a00001 mov r0, #1 9ea4: e8bd8010 pop {r4, pc} =============================================================================== 00006c50 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6c50: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6c54: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6c58: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6c5c: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6c60: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6c64: e59f4500 ldr r4, [pc, #1280] ; 716c <_Heap_Walk+0x51c> ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6c68: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6c6c: e59f34fc ldr r3, [pc, #1276] ; 7170 <_Heap_Walk+0x520> 6c70: e31200ff tst r2, #255 ; 0xff 6c74: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6c78: e59f34f4 ldr r3, [pc, #1268] ; 7174 <_Heap_Walk+0x524> 6c7c: e5933000 ldr r3, [r3] bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6c80: e590c020 ldr ip, [r0, #32] Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 6c84: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6c88: e1a06000 mov r6, r0 6c8c: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 6c90: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6c94: e58dc020 str ip, [sp, #32] Heap_Block *const last_block = heap->last_block; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { 6c98: 1a000127 bne 713c <_Heap_Walk+0x4ec> Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; (*printer)( 6c9c: e59dc024 ldr ip, [sp, #36] ; 0x24 6ca0: e58dc000 str ip, [sp] 6ca4: e5903018 ldr r3, [r0, #24] 6ca8: e58d3004 str r3, [sp, #4] 6cac: e590301c ldr r3, [r0, #28] 6cb0: e59d2020 ldr r2, [sp, #32] 6cb4: e58d3008 str r3, [sp, #8] 6cb8: e59d3028 ldr r3, [sp, #40] ; 0x28 6cbc: e58d200c str r2, [sp, #12] 6cc0: e58d3010 str r3, [sp, #16] 6cc4: e5903008 ldr r3, [r0, #8] 6cc8: e58d3014 str r3, [sp, #20] 6ccc: e590300c ldr r3, [r0, #12] 6cd0: e59f24a0 ldr r2, [pc, #1184] ; 7178 <_Heap_Walk+0x528> 6cd4: e58d3018 str r3, [sp, #24] 6cd8: e1a00001 mov r0, r1 6cdc: e1a03009 mov r3, r9 6ce0: e3a01000 mov r1, #0 6ce4: e1a0e00f mov lr, pc 6ce8: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 6cec: e3590000 cmp r9, #0 6cf0: 1a000006 bne 6d10 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 6cf4: e1a00005 mov r0, r5 6cf8: e3a01001 mov r1, #1 6cfc: e59f2478 ldr r2, [pc, #1144] ; 717c <_Heap_Walk+0x52c> 6d00: e1a0e00f mov lr, pc 6d04: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6d08: e1a08009 mov r8, r9 6d0c: ea00010b b 7140 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 6d10: e2198003 ands r8, r9, #3 (*printer)( 6d14: 11a00005 movne r0, r5 6d18: 13a01001 movne r1, #1 6d1c: 159f245c ldrne r2, [pc, #1116] ; 7180 <_Heap_Walk+0x530> 6d20: 11a03009 movne r3, r9 6d24: 1a00010c bne 715c <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6d28: e59d0024 ldr r0, [sp, #36] ; 0x24 6d2c: e1a01009 mov r1, r9 6d30: ebffe79b bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6d34: e250b000 subs fp, r0, #0 6d38: 0a000006 beq 6d58 <_Heap_Walk+0x108> (*printer)( 6d3c: e1a00005 mov r0, r5 6d40: e3a01001 mov r1, #1 6d44: e59f2438 ldr r2, [pc, #1080] ; 7184 <_Heap_Walk+0x534> 6d48: e59d3024 ldr r3, [sp, #36] ; 0x24 6d4c: e1a0e00f mov lr, pc 6d50: e12fff14 bx r4 6d54: ea0000f9 b 7140 <_Heap_Walk+0x4f0> 6d58: e59dc020 ldr ip, [sp, #32] 6d5c: e1a01009 mov r1, r9 6d60: e28c0008 add r0, ip, #8 6d64: ebffe78e bl ba4 <__umodsi3> ); return false; } if ( 6d68: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 6d6c: 11a00005 movne r0, r5 6d70: 13a01001 movne r1, #1 6d74: 159f240c ldrne r2, [pc, #1036] ; 7188 <_Heap_Walk+0x538> 6d78: 159d3020 ldrne r3, [sp, #32] 6d7c: 1a0000cc bne 70b4 <_Heap_Walk+0x464> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 6d80: e59d2020 ldr r2, [sp, #32] 6d84: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6d88: e2188001 ands r8, r8, #1 (*printer)( 6d8c: 01a00005 moveq r0, r5 6d90: 03a01001 moveq r1, #1 6d94: 059f23f0 ldreq r2, [pc, #1008] ; 718c <_Heap_Walk+0x53c> 6d98: 0a000009 beq 6dc4 <_Heap_Walk+0x174> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 6d9c: e59d3028 ldr r3, [sp, #40] ; 0x28 6da0: e5937004 ldr r7, [r3, #4] 6da4: e3c77001 bic r7, r7, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 6da8: e0837007 add r7, r3, r7 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 6dac: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 6db0: e2188001 ands r8, r8, #1 6db4: 1a000005 bne 6dd0 <_Heap_Walk+0x180> (*printer)( 6db8: e59f23d0 ldr r2, [pc, #976] ; 7190 <_Heap_Walk+0x540> 6dbc: e1a00005 mov r0, r5 6dc0: e3a01001 mov r1, #1 6dc4: e1a0e00f mov lr, pc 6dc8: e12fff14 bx r4 6dcc: ea0000db b 7140 <_Heap_Walk+0x4f0> ); return false; } if ( 6dd0: e59dc020 ldr ip, [sp, #32] 6dd4: e157000c cmp r7, ip 6dd8: 0a000006 beq 6df8 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 6ddc: e1a00005 mov r0, r5 <== NOT EXECUTED 6de0: e3a01001 mov r1, #1 <== NOT EXECUTED 6de4: e59f23a8 ldr r2, [pc, #936] ; 7194 <_Heap_Walk+0x544> <== NOT EXECUTED 6de8: e1a0e00f mov lr, pc <== NOT EXECUTED 6dec: e12fff14 bx r4 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6df0: e1a0800a mov r8, sl <== NOT EXECUTED 6df4: ea0000d1 b 7140 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6df8: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 6dfc: e5968008 ldr r8, [r6, #8] Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); 6e00: e1a0a006 mov sl, r6 6e04: ea000034 b 6edc <_Heap_Walk+0x28c> const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 6e08: e5963020 ldr r3, [r6, #32] 6e0c: e1530008 cmp r3, r8 6e10: 83a0c000 movhi ip, #0 6e14: 8a000003 bhi 6e28 <_Heap_Walk+0x1d8> 6e18: e596c024 ldr ip, [r6, #36] ; 0x24 6e1c: e15c0008 cmp ip, r8 6e20: 33a0c000 movcc ip, #0 6e24: 23a0c001 movcs ip, #1 const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { if ( !_Heap_Is_block_in_heap( heap, free_block ) ) { 6e28: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 6e2c: 01a00005 moveq r0, r5 6e30: 03a01001 moveq r1, #1 6e34: 059f235c ldreq r2, [pc, #860] ; 7198 <_Heap_Walk+0x548> 6e38: 0a000012 beq 6e88 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6e3c: e2880008 add r0, r8, #8 6e40: e1a0100b mov r1, fp 6e44: ebffe756 bl ba4 <__umodsi3> ); return false; } if ( 6e48: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 6e4c: 11a00005 movne r0, r5 6e50: 13a01001 movne r1, #1 6e54: 159f2340 ldrne r2, [pc, #832] ; 719c <_Heap_Walk+0x54c> 6e58: 11a03008 movne r3, r8 6e5c: 1a0000be bne 715c <_Heap_Walk+0x50c> - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 6e60: e5983004 ldr r3, [r8, #4] 6e64: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 6e68: e0883003 add r3, r8, r3 block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 6e6c: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 6e70: e2133001 ands r3, r3, #1 6e74: e58d302c str r3, [sp, #44] ; 0x2c 6e78: 0a000009 beq 6ea4 <_Heap_Walk+0x254> (*printer)( 6e7c: e59f231c ldr r2, [pc, #796] ; 71a0 <_Heap_Walk+0x550> 6e80: e1a00005 mov r0, r5 6e84: e3a01001 mov r1, #1 6e88: e1a03008 mov r3, r8 6e8c: e58dc01c str ip, [sp, #28] 6e90: e1a0e00f mov lr, pc 6e94: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6e98: e59dc01c ldr ip, [sp, #28] 6e9c: e1a0800c mov r8, ip 6ea0: ea0000a6 b 7140 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 6ea4: e598300c ldr r3, [r8, #12] 6ea8: e153000a cmp r3, sl 6eac: 0a000008 beq 6ed4 <_Heap_Walk+0x284> (*printer)( 6eb0: e58d3000 str r3, [sp] 6eb4: e1a00005 mov r0, r5 6eb8: e1a03008 mov r3, r8 6ebc: e3a01001 mov r1, #1 6ec0: e59f22dc ldr r2, [pc, #732] ; 71a4 <_Heap_Walk+0x554> 6ec4: e1a0e00f mov lr, pc 6ec8: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6ecc: e59d802c ldr r8, [sp, #44] ; 0x2c 6ed0: ea00009a b 7140 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 6ed4: e1a0a008 mov sl, r8 6ed8: e5988008 ldr r8, [r8, #8] const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *const first_free_block = _Heap_Free_list_first( heap ); const Heap_Block *prev_block = free_list_tail; const Heap_Block *free_block = first_free_block; while ( free_block != free_list_tail ) { 6edc: e1580006 cmp r8, r6 6ee0: 1affffc8 bne 6e08 <_Heap_Walk+0x1b8> 6ee4: ea000000 b 6eec <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 6ee8: e1a07008 mov r7, r8 return true; } 6eec: e5973004 ldr r3, [r7, #4] const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 6ef0: e5962020 ldr r2, [r6, #32] - HEAP_BLOCK_HEADER_SIZE); } RTEMS_INLINE_ROUTINE uintptr_t _Heap_Block_size( const Heap_Block *block ) { return block->size_and_flag & ~HEAP_PREV_BLOCK_USED; 6ef4: e3c3a001 bic sl, r3, #1 RTEMS_INLINE_ROUTINE Heap_Block *_Heap_Block_at( const Heap_Block *block, uintptr_t offset ) { return (Heap_Block *) ((uintptr_t) block + offset); 6ef8: e087800a add r8, r7, sl const Heap_Control *heap, const Heap_Block *block ) { return (uintptr_t) block >= (uintptr_t) heap->first_block && (uintptr_t) block <= (uintptr_t) heap->last_block; 6efc: e1520008 cmp r2, r8 6f00: 83a0b000 movhi fp, #0 6f04: 8a000003 bhi 6f18 <_Heap_Walk+0x2c8> 6f08: e596b024 ldr fp, [r6, #36] ; 0x24 6f0c: e15b0008 cmp fp, r8 6f10: 33a0b000 movcc fp, #0 6f14: 23a0b001 movcs fp, #1 bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; if ( !_Heap_Is_block_in_heap( heap, next_block ) ) { 6f18: e21bb0ff ands fp, fp, #255 ; 0xff 6f1c: 1a000007 bne 6f40 <_Heap_Walk+0x2f0> (*printer)( 6f20: e58d8000 str r8, [sp] 6f24: e1a00005 mov r0, r5 6f28: e3a01001 mov r1, #1 6f2c: e59f2274 ldr r2, [pc, #628] ; 71a8 <_Heap_Walk+0x558> 6f30: e1a03007 mov r3, r7 6f34: e1a0e00f mov lr, pc 6f38: e12fff14 bx r4 6f3c: ea00005e b 70bc <_Heap_Walk+0x46c> uintptr_t const block_begin = (uintptr_t) block; uintptr_t const block_size = _Heap_Block_size( block ); bool const prev_used = _Heap_Is_prev_used( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); uintptr_t const next_block_begin = (uintptr_t) next_block; bool const is_not_last_block = block != last_block; 6f40: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6f44: e1a0000a mov r0, sl 6f48: e1a01009 mov r1, r9 6f4c: e057b002 subs fp, r7, r2 6f50: 13a0b001 movne fp, #1 6f54: e58d301c str r3, [sp, #28] 6f58: ebffe711 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 6f5c: e3500000 cmp r0, #0 6f60: e59d301c ldr r3, [sp, #28] 6f64: 0a000005 beq 6f80 <_Heap_Walk+0x330> 6f68: e35b0000 cmp fp, #0 (*printer)( 6f6c: 158da000 strne sl, [sp] 6f70: 11a00005 movne r0, r5 6f74: 13a01001 movne r1, #1 6f78: 159f222c ldrne r2, [pc, #556] ; 71ac <_Heap_Walk+0x55c> 6f7c: 1a000014 bne 6fd4 <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 6f80: e59dc024 ldr ip, [sp, #36] ; 0x24 6f84: e15a000c cmp sl, ip 6f88: 2a000009 bcs 6fb4 <_Heap_Walk+0x364> 6f8c: e35b0000 cmp fp, #0 6f90: 0a000007 beq 6fb4 <_Heap_Walk+0x364> (*printer)( 6f94: e88d1400 stm sp, {sl, ip} 6f98: e1a00005 mov r0, r5 6f9c: e3a01001 mov r1, #1 6fa0: e59f2208 ldr r2, [pc, #520] ; 71b0 <_Heap_Walk+0x560> 6fa4: e1a03007 mov r3, r7 6fa8: e1a0e00f mov lr, pc 6fac: e12fff14 bx r4 6fb0: ea00006b b 7164 <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 6fb4: e1580007 cmp r8, r7 6fb8: 8a000009 bhi 6fe4 <_Heap_Walk+0x394> 6fbc: e35b0000 cmp fp, #0 6fc0: 0a000007 beq 6fe4 <_Heap_Walk+0x394> (*printer)( 6fc4: e58d8000 str r8, [sp] 6fc8: e59f21e4 ldr r2, [pc, #484] ; 71b4 <_Heap_Walk+0x564> 6fcc: e1a00005 mov r0, r5 6fd0: e3a01001 mov r1, #1 6fd4: e1a03007 mov r3, r7 6fd8: e1a0e00f mov lr, pc 6fdc: e12fff14 bx r4 6fe0: ea00005f b 7164 <_Heap_Walk+0x514> block->size_and_flag = size | flag; } RTEMS_INLINE_ROUTINE bool _Heap_Is_prev_used( const Heap_Block *block ) { return block->size_and_flag & HEAP_PREV_BLOCK_USED; 6fe4: e203b001 and fp, r3, #1 6fe8: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 6fec: e3130001 tst r3, #1 6ff0: 1a00003b bne 70e4 <_Heap_Walk+0x494> false, "block 0x%08x: size %u, prev 0x%08x%s, next 0x%08x%s\n", block, block_size, block->prev, block->prev == first_free_block ? 6ff4: e597200c ldr r2, [r7, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 6ff8: e5963008 ldr r3, [r6, #8] 6ffc: e1520003 cmp r2, r3 block = next_block; } while ( block != first_block ); return true; } 7000: e596100c ldr r1, [r6, #12] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7004: 059f01ac ldreq r0, [pc, #428] ; 71b8 <_Heap_Walk+0x568> 7008: 0a000003 beq 701c <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 700c: e59f31a8 ldr r3, [pc, #424] ; 71bc <_Heap_Walk+0x56c> 7010: e1520006 cmp r2, r6 7014: e59f01a4 ldr r0, [pc, #420] ; 71c0 <_Heap_Walk+0x570> 7018: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 701c: e5973008 ldr r3, [r7, #8] Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 7020: e1530001 cmp r3, r1 7024: 059f1198 ldreq r1, [pc, #408] ; 71c4 <_Heap_Walk+0x574> 7028: 0a000003 beq 703c <_Heap_Walk+0x3ec> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") 702c: e59fc194 ldr ip, [pc, #404] ; 71c8 <_Heap_Walk+0x578> 7030: e1530006 cmp r3, r6 7034: e59f1184 ldr r1, [pc, #388] ; 71c0 <_Heap_Walk+0x570> 7038: 01a0100c moveq r1, ip Heap_Block *const last_free_block = _Heap_Free_list_last( heap ); bool const prev_used = _Heap_Is_prev_used( block ); uintptr_t const block_size = _Heap_Block_size( block ); Heap_Block *const next_block = _Heap_Block_at( block, block_size ); (*printer)( 703c: e58d2004 str r2, [sp, #4] 7040: e58d0008 str r0, [sp, #8] 7044: e58d300c str r3, [sp, #12] 7048: e58d1010 str r1, [sp, #16] 704c: e1a03007 mov r3, r7 7050: e58da000 str sl, [sp] 7054: e1a00005 mov r0, r5 7058: e3a01000 mov r1, #0 705c: e59f2168 ldr r2, [pc, #360] ; 71cc <_Heap_Walk+0x57c> 7060: e1a0e00f mov lr, pc 7064: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 7068: e5983000 ldr r3, [r8] 706c: e15a0003 cmp sl, r3 7070: 0a000009 beq 709c <_Heap_Walk+0x44c> (*printer)( 7074: e58d3004 str r3, [sp, #4] 7078: e58da000 str sl, [sp] 707c: e58d8008 str r8, [sp, #8] 7080: e1a00005 mov r0, r5 7084: e3a01001 mov r1, #1 7088: e59f2140 ldr r2, [pc, #320] ; 71d0 <_Heap_Walk+0x580> 708c: e1a03007 mov r3, r7 7090: e1a0e00f mov lr, pc 7094: e12fff14 bx r4 7098: ea000031 b 7164 <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 709c: e35b0000 cmp fp, #0 70a0: 1a000007 bne 70c4 <_Heap_Walk+0x474> (*printer)( 70a4: e59f2128 ldr r2, [pc, #296] ; 71d4 <_Heap_Walk+0x584> 70a8: e1a00005 mov r0, r5 70ac: e3a01001 mov r1, #1 70b0: e1a03007 mov r3, r7 70b4: e1a0e00f mov lr, pc 70b8: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 70bc: e1a0800b mov r8, fp 70c0: ea00001e b 7140 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 70c4: e5963008 ldr r3, [r6, #8] 70c8: ea000002 b 70d8 <_Heap_Walk+0x488> { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { if ( free_block == block ) { 70cc: e1530007 cmp r3, r7 70d0: 0a000016 beq 7130 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 70d4: e5933008 ldr r3, [r3, #8] ) { const Heap_Block *const free_list_tail = _Heap_Free_list_tail( heap ); const Heap_Block *free_block = _Heap_Free_list_first( heap ); while ( free_block != free_list_tail ) { 70d8: e1530006 cmp r3, r6 70dc: 1afffffa bne 70cc <_Heap_Walk+0x47c> 70e0: ea000019 b 714c <_Heap_Walk+0x4fc> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { 70e4: e35b0000 cmp fp, #0 70e8: 0a000007 beq 710c <_Heap_Walk+0x4bc> (*printer)( 70ec: e58da000 str sl, [sp] 70f0: e1a00005 mov r0, r5 70f4: e3a01000 mov r1, #0 70f8: e59f20d8 ldr r2, [pc, #216] ; 71d8 <_Heap_Walk+0x588> 70fc: e1a03007 mov r3, r7 7100: e1a0e00f mov lr, pc 7104: e12fff14 bx r4 7108: ea000008 b 7130 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 710c: e58da000 str sl, [sp] 7110: e5973000 ldr r3, [r7] 7114: e1a00005 mov r0, r5 7118: e58d3004 str r3, [sp, #4] 711c: e1a0100b mov r1, fp 7120: e59f20b4 ldr r2, [pc, #180] ; 71dc <_Heap_Walk+0x58c> 7124: e1a03007 mov r3, r7 7128: e1a0e00f mov lr, pc 712c: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 7130: e59d2020 ldr r2, [sp, #32] 7134: e1580002 cmp r8, r2 7138: 1affff6a bne 6ee8 <_Heap_Walk+0x298> Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; 713c: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 7140: e1a00008 mov r0, r8 7144: e28dd030 add sp, sp, #48 ; 0x30 7148: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 714c: e59f208c ldr r2, [pc, #140] ; 71e0 <_Heap_Walk+0x590> 7150: e1a00005 mov r0, r5 7154: e3a01001 mov r1, #1 7158: e1a03007 mov r3, r7 715c: e1a0e00f mov lr, pc 7160: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7164: e3a08000 mov r8, #0 7168: eafffff4 b 7140 <_Heap_Walk+0x4f0> =============================================================================== 00006070 <_Internal_error_Occurred>: bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 6070: e59f3038 ldr r3, [pc, #56] ; 60b0 <_Internal_error_Occurred+0x40> void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 6074: e20110ff and r1, r1, #255 ; 0xff 6078: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Internal_errors_What_happened.the_source = the_source; 607c: e5830000 str r0, [r3] _Internal_errors_What_happened.is_internal = is_internal; 6080: e5c31004 strb r1, [r3, #4] _Internal_errors_What_happened.the_error = the_error; 6084: e5832008 str r2, [r3, #8] void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 6088: e1a04002 mov r4, r2 _Internal_errors_What_happened.the_source = the_source; _Internal_errors_What_happened.is_internal = is_internal; _Internal_errors_What_happened.the_error = the_error; _User_extensions_Fatal( the_source, is_internal, the_error ); 608c: eb0006d6 bl 7bec <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 6090: e59f301c ldr r3, [pc, #28] ; 60b4 <_Internal_error_Occurred+0x44><== NOT EXECUTED 6094: e3a02005 mov r2, #5 <== NOT EXECUTED 6098: e5832000 str r2, [r3] <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 609c: e10f2000 mrs r2, CPSR <== NOT EXECUTED 60a0: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 60a4: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 60a8: e1a00004 mov r0, r4 <== NOT EXECUTED 60ac: eafffffe b 60ac <_Internal_error_Occurred+0x3c> <== NOT EXECUTED =============================================================================== 00013fc0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 13fc0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 13fc4: e24dd018 sub sp, sp, #24 13fc8: e28db00c add fp, sp, #12 RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); the_chain->permanent_null = NULL; 13fcc: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 13fd0: e28ba004 add sl, fp, #4 13fd4: e28d7004 add r7, sp, #4 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13fd8: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; 13fdc: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); 13fe0: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 13fe4: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; 13fe8: e98d2008 stmib sp, {r3, sp} 13fec: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 13ff0: e1a0500d mov r5, sp */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 13ff4: e2809030 add r9, r0, #48 ; 0x30 { /* * Afterwards all timer inserts are directed to this chain and the interval * and TOD chains will be no more modified by other parties. */ ts->insert_chain = insert_chain; 13ff8: e584b078 str fp, [r4, #120] ; 0x78 /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 13ffc: e2848068 add r8, r4, #104 ; 0x68 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 14000: e59f2150 ldr r2, [pc, #336] ; 14158 <_Timer_server_Body+0x198> 14004: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 14008: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1400c: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 14010: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14014: e0611003 rsb r1, r1, r3 14018: e1a00009 mov r0, r9 1401c: eb001075 bl 181f8 <_Watchdog_Adjust_to_chain> static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 14020: e59f3134 ldr r3, [pc, #308] ; 1415c <_Timer_server_Body+0x19c> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 14024: e5942074 ldr r2, [r4, #116] ; 0x74 static void _Timer_server_Process_tod_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = (Watchdog_Interval) _TOD_Seconds_since_epoch(); 14028: e5936000 ldr r6, [r3] /* * Process the seconds chain. Start by checking that the Time * of Day (TOD) has not been set backwards. If it has then * we want to adjust the watchdogs->Chain to indicate this. */ if ( snapshot > last_snapshot ) { 1402c: e1560002 cmp r6, r2 14030: 9a000004 bls 14048 <_Timer_server_Body+0x88> /* * This path is for normal forward movement and cases where the * TOD has been set forward. */ delta = snapshot - last_snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14034: e0621006 rsb r1, r2, r6 14038: e1a00008 mov r0, r8 1403c: e1a02005 mov r2, r5 14040: eb00106c bl 181f8 <_Watchdog_Adjust_to_chain> 14044: ea000003 b 14058 <_Timer_server_Body+0x98> /* * The current TOD is before the last TOD which indicates that * TOD has been set backwards. */ delta = last_snapshot - snapshot; _Watchdog_Adjust( &watchdogs->Chain, WATCHDOG_BACKWARD, delta ); 14048: 31a00008 movcc r0, r8 1404c: 33a01001 movcc r1, #1 14050: 30662002 rsbcc r2, r6, r2 14054: 3b00103f blcc 18158 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 14058: e5846074 str r6, [r4, #116] ; 0x74 } static void _Timer_server_Process_insertions( Timer_server_Control *ts ) { while ( true ) { Timer_Control *timer = (Timer_Control *) _Chain_Get( ts->insert_chain ); 1405c: e5940078 ldr r0, [r4, #120] ; 0x78 14060: eb000285 bl 14a7c <_Chain_Get> if ( timer == NULL ) { 14064: e2506000 subs r6, r0, #0 14068: 0a000009 beq 14094 <_Timer_server_Body+0xd4> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 1406c: e5963038 ldr r3, [r6, #56] ; 0x38 14070: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 14074: 01a00009 moveq r0, r9 static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { 14078: 0a000002 beq 14088 <_Timer_server_Body+0xc8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 1407c: e3530003 cmp r3, #3 14080: 1afffff5 bne 1405c <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 14084: e1a00008 mov r0, r8 14088: e2861010 add r1, r6, #16 1408c: eb001084 bl 182a4 <_Watchdog_Insert> 14090: eafffff1 b 1405c <_Timer_server_Body+0x9c> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); 14094: ebffff97 bl 13ef8 if ( _Chain_Is_empty( insert_chain ) ) { 14098: e59d300c ldr r3, [sp, #12] 1409c: e153000a cmp r3, sl 140a0: 1a000006 bne 140c0 <_Timer_server_Body+0x100> ts->insert_chain = NULL; 140a4: e5846078 str r6, [r4, #120] ; 0x78 140a8: e129f000 msr CPSR_fc, r0 _Chain_Initialize_empty( &fire_chain ); while ( true ) { _Timer_server_Get_watchdogs_that_fire_now( ts, &insert_chain, &fire_chain ); if ( !_Chain_Is_empty( &fire_chain ) ) { 140ac: e59d3000 ldr r3, [sp] 140b0: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; 140b4: 13a06000 movne r6, #0 140b8: 1a000002 bne 140c8 <_Timer_server_Body+0x108> 140bc: ea000013 b 14110 <_Timer_server_Body+0x150> 140c0: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 140c4: eaffffcd b 14000 <_Timer_server_Body+0x40> <== NOT EXECUTED /* * It is essential that interrupts are disable here since an interrupt * service routine may remove a watchdog from the chain. */ _ISR_Disable( level ); 140c8: ebffff8a bl 13ef8 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 140cc: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 140d0: e1530007 cmp r3, r7 140d4: 0a00000b beq 14108 <_Timer_server_Body+0x148> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 140d8: e5932000 ldr r2, [r3] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 140dc: e3530000 cmp r3, #0 the_chain->first = new_first; 140e0: e58d2000 str r2, [sp] new_first->previous = _Chain_Head(the_chain); 140e4: e5825004 str r5, [r2, #4] 140e8: 0a000006 beq 14108 <_Timer_server_Body+0x148> watchdog->state = WATCHDOG_INACTIVE; 140ec: e5836008 str r6, [r3, #8] 140f0: e129f000 msr CPSR_fc, r0 /* * The timer server may block here and wait for resources or time. * The system watchdogs are inactive and will remain inactive since * the active flag of the timer server is true. */ (*watchdog->routine)( watchdog->id, watchdog->user_data ); 140f4: e2830020 add r0, r3, #32 140f8: e8900003 ldm r0, {r0, r1} 140fc: e1a0e00f mov lr, pc 14100: e593f01c ldr pc, [r3, #28] } 14104: eaffffef b 140c8 <_Timer_server_Body+0x108> 14108: e129f000 msr CPSR_fc, r0 1410c: eaffffb9 b 13ff8 <_Timer_server_Body+0x38> } else { ts->active = false; 14110: e3a03000 mov r3, #0 14114: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 14118: ebffff7a bl 13f08 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 1411c: e3a01008 mov r1, #8 14120: e5940000 ldr r0, [r4] 14124: eb000dcb bl 17858 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 14128: e1a00004 mov r0, r4 1412c: ebffff7b bl 13f20 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 14130: e1a00004 mov r0, r4 14134: ebffff8d bl 13f70 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 14138: eb000b53 bl 16e8c <_Thread_Enable_dispatch> ts->active = true; 1413c: e3a03001 mov r3, #1 14140: e5c4307c strb r3, [r4, #124] ; 0x7c static void _Timer_server_Stop_interval_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->Interval_watchdogs.System_watchdog ); 14144: e2840008 add r0, r4, #8 14148: eb0010ab bl 183fc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 1414c: e2840040 add r0, r4, #64 ; 0x40 14150: eb0010a9 bl 183fc <_Watchdog_Remove> 14154: eaffffa7 b 13ff8 <_Timer_server_Body+0x38> =============================================================================== 000096f4 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 96f4: e5902000 ldr r2, [r0] 96f8: e5913000 ldr r3, [r1] 96fc: e1520003 cmp r2, r3 return true; 9700: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 9704: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) 9708: ba000005 blt 9724 <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( 970c: e5900004 ldr r0, [r0, #4] 9710: e5913004 ldr r3, [r1, #4] 9714: e1500003 cmp r0, r3 9718: d3a00000 movle r0, #0 971c: c3a00001 movgt r0, #1 9720: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 9724: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 9728: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000972c <_Timespec_Less_than>: bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 972c: e5902000 ldr r2, [r0] 9730: e5913000 ldr r3, [r1] 9734: e1520003 cmp r2, r3 return true; 9738: b3a00001 movlt r0, #1 bool _Timespec_Less_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec < rhs->tv_sec ) 973c: b12fff1e bxlt lr return true; if ( lhs->tv_sec > rhs->tv_sec ) 9740: ca000005 bgt 975c <_Timespec_Less_than+0x30> #include #include #include bool _Timespec_Less_than( 9744: e5900004 ldr r0, [r0, #4] 9748: e5913004 ldr r3, [r1, #4] 974c: e1500003 cmp r0, r3 9750: a3a00000 movge r0, #0 9754: b3a00001 movlt r0, #1 9758: e12fff1e bx lr { if ( lhs->tv_sec < rhs->tv_sec ) return true; if ( lhs->tv_sec > rhs->tv_sec ) return false; 975c: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec < rhs->tv_nsec ) return true; return false; } 9760: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00007bec <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 7bec: e92d41f0 push {r4, r5, r6, r7, r8, lr} Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 7bf0: e59f503c ldr r5, [pc, #60] ; 7c34 <_User_extensions_Fatal+0x48> void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 7bf4: e1a08000 mov r8, r0 7bf8: e1a07002 mov r7, r2 7bfc: e20160ff and r6, r1, #255 ; 0xff Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 7c00: e5954008 ldr r4, [r5, #8] 7c04: ea000007 b 7c28 <_User_extensions_Fatal+0x3c> !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) 7c08: e5943030 ldr r3, [r4, #48] ; 0x30 7c0c: e3530000 cmp r3, #0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 7c10: 11a00008 movne r0, r8 7c14: 11a01006 movne r1, r6 7c18: 11a02007 movne r2, r7 7c1c: 11a0e00f movne lr, pc 7c20: 112fff13 bxne r3 Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; !_Chain_Is_head( &_User_extensions_List, the_node ) ; the_node = the_node->previous ) { 7c24: e5944004 ldr r4, [r4, #4] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 7c28: e1540005 cmp r4, r5 7c2c: 1afffff5 bne 7c08 <_User_extensions_Fatal+0x1c> the_extension = (User_extensions_Control *) the_node; if ( the_extension->Callouts.fatal != NULL ) (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); } } 7c30: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 0001f4ac <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 1f4ac: e3a00000 mov r0, #0 <== NOT EXECUTED 1f4b0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00001db4 <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 1db4: eaffffe5 b 1d50 <== NOT EXECUTED =============================================================================== 00008444 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 8444: 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 ) ) 8448: e3d27007 bics r7, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 844c: e1a09000 mov r9, r0 8450: e1a04001 mov r4, r1 8454: 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 ) ) 8458: 0a000002 beq 8468 rtems_set_errno_and_return_minus_one( EPERM ); 845c: eb000657 bl 9dc0 <__errno> <== NOT EXECUTED 8460: e3a03001 mov r3, #1 <== NOT EXECUTED 8464: ea000005 b 8480 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 8468: e5936000 ldr r6, [r3] if (!device_name_table) 846c: e3560000 cmp r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 8470: 159fa094 ldrne sl, [pc, #148] ; 850c 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) 8474: 1a00001c bne 84ec rtems_set_errno_and_return_minus_one( EFAULT ); 8478: eb000650 bl 9dc0 <__errno> 847c: e3a0300e mov r3, #14 8480: e5803000 str r3, [r0] 8484: e3e00000 mvn r0, #0 8488: 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) 848c: e5968000 ldr r8, [r6] 8490: e3580000 cmp r8, #0 8494: 0a000012 beq 84e4 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8498: e1a00009 mov r0, r9 849c: e1a01008 mov r1, r8 84a0: e1a02004 mov r2, r4 84a4: eb0009cc bl abdc 84a8: e3500000 cmp r0, #0 84ac: 1a00000c bne 84e4 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 84b0: e7d80004 ldrb r0, [r8, r4] 84b4: e3500000 cmp r0, #0 84b8: 1a000009 bne 84e4 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 84bc: e59f304c ldr r3, [pc, #76] ; 8510 84c0: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 84c4: e59f3048 ldr r3, [pc, #72] ; 8514 84c8: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 84cc: e59f3044 ldr r3, [pc, #68] ; 8518 84d0: e5933000 ldr r3, [r3] 84d4: 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]; 84d8: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 84dc: e5853010 str r3, [r5, #16] return 0; 84e0: 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++) { 84e4: e2877001 add r7, r7, #1 84e8: e2866014 add r6, r6, #20 84ec: e59a3000 ldr r3, [sl] 84f0: e1570003 cmp r7, r3 84f4: 3affffe4 bcc 848c pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 84f8: eb000630 bl 9dc0 <__errno> 84fc: e3a03002 mov r3, #2 8500: e5803000 str r3, [r0] 8504: e3e00000 mvn r0, #0 } 8508: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 00002b10 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b10: e59030b4 ldr r3, [r0, #180] ; 0xb4 2b14: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2b18: e92d4030 push {r4, r5, lr} 2b1c: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b20: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 2b24: ebfffff5 bl 2b00 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2b28: 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) { 2b2c: ea000008 b 2b54 tty->rawOutBufState = rob_wait; 2b30: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2b34: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 2b38: e3a01000 mov r1, #0 <== NOT EXECUTED 2b3c: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2b40: e1a02001 mov r2, r1 <== NOT EXECUTED 2b44: eb0008cc bl 4e7c <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2b48: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2b4c: 1b000a60 blne 54d4 <== NOT EXECUTED rtems_interrupt_disable (level); 2b50: ebffffea bl 2b00 <== 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) { 2b54: e5942084 ldr r2, [r4, #132] ; 0x84 2b58: e5943080 ldr r3, [r4, #128] ; 0x80 2b5c: e1520003 cmp r2, r3 2b60: 1afffff2 bne 2b30 2b64: e129f000 msr CPSR_fc, r0 2b68: e8bd8030 pop {r4, r5, pc} =============================================================================== 000037f0 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 37f0: e5903020 ldr r3, [r0, #32] 37f4: 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) { 37f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 37fc: e1a04000 mov r4, r0 3800: e1a07001 mov r7, r1 if (tty->ccount == 0) 3804: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; if (lineFlag) { 3808: e3510000 cmp r1, #0 380c: 0a000060 beq 3994 if (!(tty->termios.c_lflag & ECHO)) { 3810: e590303c ldr r3, [r0, #60] ; 0x3c 3814: e2132008 ands r2, r3, #8 tty->ccount = 0; 3818: 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)) { 381c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 3820: e2133010 ands r3, r3, #16 3824: 1a00005a bne 3994 tty->ccount = 0; 3828: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 382c: e1a01004 mov r1, r4 <== NOT EXECUTED 3830: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 3834: ebffffca bl 3764 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 3838: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 383c: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 3840: 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) 3844: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 3848: ea00000b b 387c <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 384c: e2411001 sub r1, r1, #1 if (tty->termios.c_lflag & ECHO) { 3850: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3854: e594001c ldr r0, [r4, #28] 3858: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { 385c: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 3860: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { 3864: 0a000047 beq 3988 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 3868: e3570000 cmp r7, #0 386c: 1a000005 bne 3888 3870: e3130010 tst r3, #16 3874: 1a000003 bne 3888 echo (tty->termios.c_cc[VERASE], tty); 3878: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 387c: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 3880: 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); 3884: eaffffb6 b 3764 <== NOT EXECUTED } else if (c == '\t') { 3888: e3550009 cmp r5, #9 388c: 1a00001f bne 3910 int col = tty->read_start_column; 3890: 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)) { 3894: 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; 3898: 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) 389c: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 38a0: ea00000c b 38d8 c = tty->cbuf[i++]; 38a4: e7d0c002 ldrb ip, [r0, r2] if (c == '\t') { 38a8: e35c0009 cmp ip, #9 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 38ac: e2822001 add r2, r2, #1 if (c == '\t') { col = (col | 7) + 1; 38b0: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 38b4: 0a000006 beq 38d4 col = (col | 7) + 1; } else if (iscntrl (c)) { 38b8: e088c00c add ip, r8, ip 38bc: e5dcc001 ldrb ip, [ip, #1] 38c0: e31c0020 tst ip, #32 38c4: 0a000002 beq 38d4 if (tty->termios.c_lflag & ECHOCTL) 38c8: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 38cc: 12855002 addne r5, r5, #2 <== NOT EXECUTED 38d0: ea000000 b 38d8 <== NOT EXECUTED } else { col++; 38d4: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 38d8: e1520001 cmp r2, r1 38dc: 1afffff0 bne 38a4 38e0: ea000006 b 3900 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 38e4: e59f00bc ldr r0, [pc, #188] ; 39a8 38e8: e3a01001 mov r1, #1 38ec: e1a02004 mov r2, r4 38f0: ebffff07 bl 3514 tty->column--; 38f4: e5943028 ldr r3, [r4, #40] ; 0x28 38f8: e2433001 sub r3, r3, #1 38fc: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { 3900: e5943028 ldr r3, [r4, #40] ; 0x28 3904: e1530005 cmp r3, r5 3908: cafffff5 bgt 38e4 390c: ea00001d b 3988 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 3910: e5962000 ldr r2, [r6] 3914: e2855001 add r5, r5, #1 3918: e7d22005 ldrb r2, [r2, r5] 391c: e3120020 tst r2, #32 3920: 0a000009 beq 394c 3924: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3928: 0a000007 beq 394c <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 392c: e59f0078 ldr r0, [pc, #120] ; 39ac <== NOT EXECUTED 3930: e3a01003 mov r1, #3 <== NOT EXECUTED 3934: e1a02004 mov r2, r4 <== NOT EXECUTED 3938: ebfffef5 bl 3514 <== NOT EXECUTED if (tty->column) 393c: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3940: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3944: 12433001 subne r3, r3, #1 <== NOT EXECUTED 3948: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 394c: e5963000 ldr r3, [r6] 3950: e7d33005 ldrb r3, [r3, r5] 3954: e3130020 tst r3, #32 3958: 0a000002 beq 3968 395c: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 3960: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 3964: 0a000007 beq 3988 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 3968: e59f003c ldr r0, [pc, #60] ; 39ac 396c: e3a01003 mov r1, #3 3970: e1a02004 mov r2, r4 3974: ebfffee6 bl 3514 if (tty->column) 3978: e5943028 ldr r3, [r4, #40] ; 0x28 397c: e3530000 cmp r3, #0 tty->column--; 3980: 12433001 subne r3, r3, #1 3984: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) 3988: e3570000 cmp r7, #0 398c: 1a000001 bne 3998 3990: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3994: e59f6014 ldr r6, [pc, #20] ; 39b0 echo ('\n', tty); return; } } while (tty->ccount) { 3998: e5941020 ldr r1, [r4, #32] 399c: e3510000 cmp r1, #0 39a0: 1affffa9 bne 384c 39a4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000025ac : int fcntl( int fd, int cmd, ... ) { 25ac: e92d000e push {r1, r2, r3} 25b0: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25b4: e59f21a4 ldr r2, [pc, #420] ; 2760 25b8: e5921000 ldr r1, [r2] ... ) { int ret; va_list ap; va_start( ap, cmd ); 25bc: e28d301c add r3, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25c0: e1500001 cmp r0, r1 int fcntl( int fd, int cmd, ... ) { 25c4: e59d7018 ldr r7, [sp, #24] int ret; va_list ap; va_start( ap, cmd ); 25c8: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25cc: 2a000006 bcs 25ec iop = rtems_libio_iop( fd ); 25d0: e59f218c ldr r2, [pc, #396] ; 2764 25d4: e5922000 ldr r2, [r2] 25d8: e3a04038 mov r4, #56 ; 0x38 25dc: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); 25e0: e5940014 ldr r0, [r4, #20] 25e4: e3100c01 tst r0, #256 ; 0x100 25e8: 1a000002 bne 25f8 25ec: eb002936 bl cacc <__errno> 25f0: e3a03009 mov r3, #9 25f4: ea000047 b 2718 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 25f8: e3570009 cmp r7, #9 25fc: 979ff107 ldrls pc, [pc, r7, lsl #2] 2600: ea000042 b 2710 2604: 0000262c .word 0x0000262c <== NOT EXECUTED 2608: 0000269c .word 0x0000269c <== NOT EXECUTED 260c: 000026ac .word 0x000026ac <== NOT EXECUTED 2610: 000026cc .word 0x000026cc <== NOT EXECUTED 2614: 000026d8 .word 0x000026d8 <== NOT EXECUTED 2618: 00002704 .word 0x00002704 <== NOT EXECUTED 261c: 00002704 .word 0x00002704 <== NOT EXECUTED 2620: 00002704 .word 0x00002704 <== NOT EXECUTED 2624: 00002704 .word 0x00002704 <== NOT EXECUTED 2628: 00002704 .word 0x00002704 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 262c: e5933000 ldr r3, [r3] if ( fd2 ) 2630: e3530000 cmp r3, #0 2634: 0a000004 beq 264c diop = rtems_libio_iop( fd2 ); 2638: e1530001 cmp r3, r1 263c: 33a06038 movcc r6, #56 ; 0x38 2640: 30262693 mlacc r6, r3, r6, r2 2644: 3a000005 bcc 2660 2648: ea000003 b 265c <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 264c: eb000190 bl 2c94 if ( diop == 0 ) { 2650: e2506000 subs r6, r0, #0 2654: 1a000001 bne 2660 2658: ea00003b b 274c <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 265c: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 2660: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; 2664: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; 2668: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; 266c: e8b5000f ldm r5!, {r0, r1, r2, r3} 2670: e286c018 add ip, r6, #24 2674: e8ac000f stmia ip!, {r0, r1, r2, r3} 2678: e5953000 ldr r3, [r5] 267c: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); 2680: e59f30dc ldr r3, [pc, #220] ; 2764 2684: e5933000 ldr r3, [r3] 2688: e0636006 rsb r6, r3, r6 268c: e59f30d4 ldr r3, [pc, #212] ; 2768 2690: e1a061c6 asr r6, r6, #3 2694: e0060693 mul r6, r3, r6 2698: ea000020 b 2720 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 269c: e3100b02 tst r0, #2048 ; 0x800 26a0: 03a06000 moveq r6, #0 26a4: 13a06001 movne r6, #1 26a8: ea00001e b 2728 * 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 ) ) 26ac: e5936000 ldr r6, [r3] 26b0: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 26b4: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 26b8: 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; 26bc: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 26c0: 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 ) ) 26c4: 0a000017 beq 2728 26c8: ea00000b b 26fc else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 26cc: eb00015e bl 2c4c 26d0: e1a06000 mov r6, r0 26d4: ea000011 b 2720 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 26d8: e5930000 ldr r0, [r3] 26dc: eb00014d bl 2c18 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 26e0: e5942014 ldr r2, [r4, #20] 26e4: e59f3080 ldr r3, [pc, #128] ; 276c 26e8: e3c22c02 bic r2, r2, #512 ; 0x200 26ec: e0003003 and r3, r0, r3 26f0: e3c22001 bic r2, r2, #1 26f4: e1833002 orr r3, r3, r2 26f8: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 26fc: e3a06000 mov r6, #0 2700: ea000008 b 2728 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 2704: eb0028f0 bl cacc <__errno> 2708: e3a03086 mov r3, #134 ; 0x86 270c: ea000001 b 2718 ret = -1; break; default: errno = EINVAL; 2710: eb0028ed bl cacc <__errno> 2714: e3a03016 mov r3, #22 2718: e5803000 str r3, [r0] 271c: ea00000a b 274c /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2720: e3560000 cmp r6, #0 2724: ba000009 blt 2750 int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 2728: e5943020 ldr r3, [r4, #32] 272c: e1a01004 mov r1, r4 2730: e1a00007 mov r0, r7 2734: e1a0e00f mov lr, pc 2738: e593f030 ldr pc, [r3, #48] ; 0x30 if (err) { 273c: e2504000 subs r4, r0, #0 2740: 0a000002 beq 2750 errno = err; 2744: eb0028e0 bl cacc <__errno> <== NOT EXECUTED 2748: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; 274c: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2750: e1a00006 mov r0, r6 2754: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 2758: e28dd00c add sp, sp, #12 275c: e12fff1e bx lr =============================================================================== 0000b168 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b168: 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) { b16c: e59f5378 ldr r5, [pc, #888] ; b4ec b170: e5954000 ldr r4, [r5] b174: e3540000 cmp r4, #0 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { b178: e1a08000 mov r8, r0 b17c: e1a07001 mov r7, r1 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { b180: 1a000012 bne b1d0 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 ); b184: e59f3364 ldr r3, [pc, #868] ; b4f0 b188: e1a01004 mov r1, r4 b18c: e5930000 ldr r0, [r3] b190: e1a02004 mov r2, r4 b194: ebffef1d bl 6e10 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { b198: e5953000 ldr r3, [r5] b19c: e3530000 cmp r3, #0 b1a0: 1a000005 bne b1bc sc = rtems_semaphore_create( b1a4: e59f0348 ldr r0, [pc, #840] ; b4f4 b1a8: e3a01001 mov r1, #1 b1ac: e3a02054 mov r2, #84 ; 0x54 b1b0: e58d5000 str r5, [sp] b1b4: ebffee83 bl 6bc8 b1b8: e1a04000 mov r4, r0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); b1bc: e59f332c ldr r3, [pc, #812] ; b4f0 b1c0: e5930000 ldr r0, [r3] b1c4: ebffef57 bl 6f28 } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { b1c8: e3540000 cmp r4, #0 b1cc: 1a000006 bne b1ec sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); b1d0: e59f3314 ldr r3, [pc, #788] ; b4ec b1d4: e3a01000 mov r1, #0 b1d8: e5930000 ldr r0, [r3] b1dc: e1a02001 mov r2, r1 b1e0: ebffef0a bl 6e10 } if (sc == RTEMS_SUCCESSFUL) { b1e4: e2505000 subs r5, r0, #0 b1e8: 0a000000 beq b1f0 return 0; } else { return -ENOMEM; b1ec: e3e0500b mvn r5, #11 { pipe_control_t *pipe; int err = 0; err = pipe_lock(); if (err) b1f0: e2556000 subs r6, r5, #0 b1f4: 1a0000ba bne b4e4 return err; pipe = *pipep; b1f8: e5984000 ldr r4, [r8] if (pipe == NULL) { b1fc: e3540000 cmp r4, #0 b200: 1a00003c bne b2f8 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b204: e3a00034 mov r0, #52 ; 0x34 b208: ebffe31f bl 3e8c if (pipe == NULL) b20c: e250a000 subs sl, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); b210: e1a04000 mov r4, r0 if (pipe == NULL) b214: 0a000035 beq b2f0 return err; memset(pipe, 0, sizeof(pipe_control_t)); b218: e1a01005 mov r1, r5 b21c: e3a02034 mov r2, #52 ; 0x34 b220: eb000df0 bl e9e8 pipe->Size = PIPE_BUF; b224: e3a00c02 mov r0, #512 ; 0x200 b228: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); b22c: ebffe316 bl 3e8c if (! pipe->Buffer) b230: 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); b234: e5840000 str r0, [r4] if (! pipe->Buffer) b238: 0a00002a beq b2e8 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), b23c: e59f62b4 ldr r6, [pc, #692] ; b4f8 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( b240: e59f02b4 ldr r0, [pc, #692] ; b4fc rtems_build_name ('P', 'I', 'r', c), b244: e5d63000 ldrb r3, [r6] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( b248: e1a01005 mov r1, r5 b24c: e1830000 orr r0, r3, r0 b250: e1a02005 mov r2, r5 b254: e284302c add r3, r4, #44 ; 0x2c b258: eb0003dd bl c1d4 b25c: e3500000 cmp r0, #0 b260: 1a00001e bne b2e0 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), b264: 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( b268: e59f0290 ldr r0, [pc, #656] ; b500 b26c: e1a01005 mov r1, r5 b270: e1830000 orr r0, r3, r0 b274: e1a02005 mov r2, r5 b278: e2843030 add r3, r4, #48 ; 0x30 b27c: eb0003d4 bl c1d4 b280: e3500000 cmp r0, #0 b284: 1a000013 bne b2d8 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, b288: 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( b28c: e59f0270 ldr r0, [pc, #624] ; b504 b290: e2842028 add r2, r4, #40 ; 0x28 b294: e58d2000 str r2, [sp] b298: e1830000 orr r0, r3, r0 b29c: e3a01001 mov r1, #1 b2a0: e3a02010 mov r2, #16 b2a4: e1a03005 mov r3, r5 b2a8: ebffee46 bl 6bc8 b2ac: e3500000 cmp r0, #0 b2b0: 1a000006 bne b2d0 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b2b4: e5d63000 ldrb r3, [r6] b2b8: e353007a cmp r3, #122 ; 0x7a b2bc: e2832001 add r2, r3, #1 c = 'a'; b2c0: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') b2c4: e5c62000 strb r2, [r6] c = 'a'; b2c8: 05c63000 strbeq r3, [r6] b2cc: ea000009 b b2f8 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); b2d0: e59a0030 ldr r0, [sl, #48] ; 0x30 b2d4: eb0003ee bl c294 err_wbar: rtems_barrier_delete(pipe->readBarrier); b2d8: e59a002c ldr r0, [sl, #44] ; 0x2c b2dc: eb0003ec bl c294 err_rbar: free(pipe->Buffer); b2e0: e59a0000 ldr r0, [sl] b2e4: ebffe115 bl 3740 err_buf: free(pipe); b2e8: e1a0000a mov r0, sl b2ec: ebffe113 bl 3740 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; b2f0: e3e0600b mvn r6, #11 b2f4: ea00000d b b330 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) b2f8: e3a01000 mov r1, #0 b2fc: e5940028 ldr r0, [r4, #40] ; 0x28 b300: e1a02001 mov r2, r1 b304: ebffeec1 bl 6e10 err = -EINTR; if (*pipep == NULL) { b308: e5983000 ldr r3, [r8] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; b30c: e3500000 cmp r0, #0 b310: 03a06000 moveq r6, #0 b314: 13e06003 mvnne r6, #3 if (*pipep == NULL) { b318: e3530000 cmp r3, #0 b31c: 1a000003 bne b330 if (err) b320: e3560000 cmp r6, #0 pipe_free(pipe); else *pipep = pipe; b324: 05884000 streq r4, [r8] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); b328: 11a00004 movne r0, r4 b32c: 1bffff54 blne b084 else *pipep = pipe; } out: pipe_unlock(); b330: ebffff4f bl b074 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) b334: e3560000 cmp r6, #0 b338: 1a000069 bne b4e4 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { b33c: e5973014 ldr r3, [r7, #20] b340: e2033006 and r3, r3, #6 b344: e3530004 cmp r3, #4 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; b348: e5984000 ldr r4, [r8] switch (LIBIO_ACCMODE(iop)) { b34c: 0a000024 beq b3e4 b350: e3530006 cmp r3, #6 b354: 0a000047 beq b478 b358: e3530002 cmp r3, #2 b35c: 1a000059 bne b4c8 case LIBIO_FLAGS_READ: pipe->readerCounter ++; b360: e5943020 ldr r3, [r4, #32] b364: e2833001 add r3, r3, #1 b368: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) b36c: e5943010 ldr r3, [r4, #16] b370: e2832001 add r2, r3, #1 b374: e3530000 cmp r3, #0 b378: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); b37c: 05940030 ldreq r0, [r4, #48] ; 0x30 b380: 028d1004 addeq r1, sp, #4 b384: 0b0003ea bleq c334 if (pipe->Writers == 0) { b388: e5943014 ldr r3, [r4, #20] b38c: e3530000 cmp r3, #0 b390: 1a00004c bne b4c8 /* Not an error */ if (LIBIO_NODELAY(iop)) b394: e5973014 ldr r3, [r7, #20] b398: e3130001 tst r3, #1 b39c: 1a000049 bne b4c8 break; prevCounter = pipe->writerCounter; b3a0: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); b3a4: e5940028 ldr r0, [r4, #40] ; 0x28 b3a8: ebffeede bl 6f28 if (! PIPE_READWAIT(pipe)) b3ac: e3a01000 mov r1, #0 b3b0: e594002c ldr r0, [r4, #44] ; 0x2c b3b4: eb0003f4 bl c38c b3b8: e2501000 subs r1, r0, #0 b3bc: 1a000044 bne b4d4 goto out_error; if (! PIPE_LOCK(pipe)) b3c0: e5940028 ldr r0, [r4, #40] ; 0x28 b3c4: e1a02001 mov r2, r1 b3c8: ebffee90 bl 6e10 b3cc: e3500000 cmp r0, #0 b3d0: 1a00003f bne b4d4 goto out_error; } while (prevCounter == pipe->writerCounter); b3d4: e5943024 ldr r3, [r4, #36] ; 0x24 b3d8: e1550003 cmp r5, r3 b3dc: 0afffff0 beq b3a4 b3e0: ea000038 b b4c8 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; b3e4: e5943024 ldr r3, [r4, #36] ; 0x24 b3e8: e2833001 add r3, r3, #1 b3ec: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) b3f0: e5943014 ldr r3, [r4, #20] b3f4: e2832001 add r2, r3, #1 b3f8: e3530000 cmp r3, #0 b3fc: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); b400: 0594002c ldreq r0, [r4, #44] ; 0x2c b404: 028d1004 addeq r1, sp, #4 b408: 0b0003c9 bleq c334 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b40c: e5943010 ldr r3, [r4, #16] b410: e3530000 cmp r3, #0 b414: 1a00002b bne b4c8 b418: e5973014 ldr r3, [r7, #20] b41c: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; b420: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { b424: 0a000003 beq b438 PIPE_UNLOCK(pipe); b428: e5940028 ldr r0, [r4, #40] ; 0x28 b42c: ebffeebd bl 6f28 err = -ENXIO; b430: e3e06005 mvn r6, #5 goto out_error; b434: ea000027 b b4d8 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); b438: e5940028 ldr r0, [r4, #40] ; 0x28 b43c: ebffeeb9 bl 6f28 if (! PIPE_WRITEWAIT(pipe)) b440: e3a01000 mov r1, #0 b444: e5940030 ldr r0, [r4, #48] ; 0x30 b448: eb0003cf bl c38c b44c: e2501000 subs r1, r0, #0 b450: 1a00001f bne b4d4 goto out_error; if (! PIPE_LOCK(pipe)) b454: e5940028 ldr r0, [r4, #40] ; 0x28 b458: e1a02001 mov r2, r1 b45c: ebffee6b bl 6e10 b460: e3500000 cmp r0, #0 b464: 1a00001a bne b4d4 goto out_error; } while (prevCounter == pipe->readerCounter); b468: e5943020 ldr r3, [r4, #32] b46c: e1550003 cmp r5, r3 b470: 0afffff0 beq b438 b474: ea000013 b b4c8 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; b478: e5943020 ldr r3, [r4, #32] b47c: e2833001 add r3, r3, #1 b480: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) b484: e5943010 ldr r3, [r4, #16] b488: e2832001 add r2, r3, #1 b48c: e3530000 cmp r3, #0 b490: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); b494: 05940030 ldreq r0, [r4, #48] ; 0x30 b498: 028d1004 addeq r1, sp, #4 b49c: 0b0003a4 bleq c334 pipe->writerCounter ++; b4a0: e5943024 ldr r3, [r4, #36] ; 0x24 b4a4: e2833001 add r3, r3, #1 b4a8: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) b4ac: e5943014 ldr r3, [r4, #20] b4b0: e2832001 add r2, r3, #1 b4b4: e3530000 cmp r3, #0 b4b8: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); b4bc: 0594002c ldreq r0, [r4, #44] ; 0x2c b4c0: 028d1004 addeq r1, sp, #4 b4c4: 0b00039a bleq c334 break; } PIPE_UNLOCK(pipe); b4c8: e5940028 ldr r0, [r4, #40] ; 0x28 b4cc: ebffee95 bl 6f28 return 0; b4d0: ea000003 b b4e4 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; b4d4: e3e06003 mvn r6, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); b4d8: e1a00008 mov r0, r8 b4dc: e1a01007 mov r1, r7 b4e0: ebfffef4 bl b0b8 return err; } b4e4: e1a00006 mov r0, r6 b4e8: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 000027f0 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 27f0: e59f3104 ldr r3, [pc, #260] ; 28fc 27f4: e5933000 ldr r3, [r3] 27f8: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 27fc: 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); 2800: 2a000006 bcs 2820 iop = rtems_libio_iop(fd); 2804: e59f30f4 ldr r3, [pc, #244] ; 2900 2808: e5933000 ldr r3, [r3] 280c: e3a02038 mov r2, #56 ; 0x38 2810: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); 2814: e5903014 ldr r3, [r0, #20] 2818: e3130c01 tst r3, #256 ; 0x100 281c: 1a000002 bne 282c 2820: eb0028a9 bl cacc <__errno> 2824: e3a03009 mov r3, #9 2828: ea000003 b 283c rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 282c: e3130002 tst r3, #2 2830: 1a000004 bne 2848 2834: eb0028a4 bl cacc <__errno> 2838: e3a03016 mov r3, #22 283c: e5803000 str r3, [r0] 2840: e3e00000 mvn r0, #0 2844: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2848: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 284c: e351000b cmp r1, #11 2850: 979ff101 ldrls pc, [pc, r1, lsl #2] 2854: ea000023 b 28e8 2858: 00002888 .word 0x00002888 <== NOT EXECUTED 285c: 00002890 .word 0x00002890 <== NOT EXECUTED 2860: 00002898 .word 0x00002898 <== NOT EXECUTED 2864: 000028a0 .word 0x000028a0 <== NOT EXECUTED 2868: 000028a8 .word 0x000028a8 <== NOT EXECUTED 286c: 000028b0 .word 0x000028b0 <== NOT EXECUTED 2870: 000028b8 .word 0x000028b8 <== NOT EXECUTED 2874: 000028c0 .word 0x000028c0 <== NOT EXECUTED 2878: 000028c8 .word 0x000028c8 <== NOT EXECUTED 287c: 000028d0 .word 0x000028d0 <== NOT EXECUTED 2880: 000028d8 .word 0x000028d8 <== NOT EXECUTED 2884: 000028e0 .word 0x000028e0 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 2888: e5930038 ldr r0, [r3, #56] ; 0x38 break; 288c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 2890: e593003c ldr r0, [r3, #60] ; 0x3c break; 2894: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 2898: e5930040 ldr r0, [r3, #64] ; 0x40 break; 289c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 28a0: e5930044 ldr r0, [r3, #68] ; 0x44 break; 28a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 28a8: e5930048 ldr r0, [r3, #72] ; 0x48 break; 28ac: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 28b0: e593004c ldr r0, [r3, #76] ; 0x4c break; 28b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 28b8: e5930054 ldr r0, [r3, #84] ; 0x54 break; 28bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 28c0: e5930058 ldr r0, [r3, #88] ; 0x58 break; 28c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 28c8: e5930064 ldr r0, [r3, #100] ; 0x64 break; 28cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 28d0: e5930050 ldr r0, [r3, #80] ; 0x50 break; 28d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 28d8: e593005c ldr r0, [r3, #92] ; 0x5c break; 28dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 28e0: e5930060 ldr r0, [r3, #96] ; 0x60 break; 28e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 28e8: eb002877 bl cacc <__errno> 28ec: e3a03016 mov r3, #22 28f0: e5803000 str r3, [r0] 28f4: e3e00000 mvn r0, #0 break; } return return_value; } 28f8: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00001d50 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 1d50: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 1d54: e2504000 subs r4, r0, #0 1d58: 1a000004 bne 1d70 rtems_set_errno_and_return_minus_one( EFAULT ); 1d5c: eb002779 bl bb48 <__errno> <== NOT EXECUTED 1d60: e3a0300e mov r3, #14 <== NOT EXECUTED 1d64: e5803000 str r3, [r0] <== NOT EXECUTED 1d68: e3e00000 mvn r0, #0 <== NOT EXECUTED 1d6c: ea00000c b 1da4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1d70: e10f5000 mrs r5, CPSR 1d74: e3853080 orr r3, r5, #128 ; 0x80 1d78: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 1d7c: e1a0000d mov r0, sp 1d80: eb000f7c bl 5b78 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1d84: 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; 1d88: 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; 1d8c: e59d0004 ldr r0, [sp, #4] time->tv_sec = now.tv_sec; 1d90: 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; 1d94: e3a01ffa mov r1, #1000 ; 0x3e8 1d98: eb00354f bl f2dc <__aeabi_idiv> time->tv_sec = now.tv_sec; time->tv_usec = useconds; 1d9c: 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; 1da0: e3a00000 mov r0, #0 } 1da4: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== 0000b33c : 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 ) b33c: e5903018 ldr r3, [r0, #24] b340: e593304c ldr r3, [r3, #76] ; 0x4c b344: e3530001 cmp r3, #1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { b348: 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 ) b34c: 1a000005 bne b368 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; b350: e3a03000 mov r3, #0 b354: e3a04000 mov r4, #0 b358: e580300c str r3, [r0, #12] b35c: e5804010 str r4, [r0, #16] return 0; b360: e3a00000 mov r0, #0 b364: 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 */ b368: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } b36c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 000039b4 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 39b4: e5913030 ldr r3, [r1, #48] ; 0x30 39b8: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 39bc: e92d4030 push {r4, r5, lr} 39c0: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 39c4: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) 39c8: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 39cc: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 39d0: 0a000007 beq 39f4 c = tolower (c); 39d4: e59f2164 ldr r2, [pc, #356] ; 3b40 39d8: e5922000 ldr r2, [r2] 39dc: e0822005 add r2, r2, r5 39e0: e5d22001 ldrb r2, [r2, #1] 39e4: e2022003 and r2, r2, #3 39e8: e3520001 cmp r2, #1 39ec: 02855020 addeq r5, r5, #32 39f0: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { 39f4: e355000d cmp r5, #13 39f8: 1a000005 bne 3a14 if (tty->termios.c_iflag & IGNCR) 39fc: e3130080 tst r3, #128 ; 0x80 3a00: 1a000048 bne 3b28 return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; 3a04: e3130c01 tst r3, #256 ; 0x100 3a08: 03a0500d moveq r5, #13 3a0c: 13a0500a movne r5, #10 3a10: ea000007 b 3a34 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3a14: e355000a cmp r5, #10 3a18: 1a000003 bne 3a2c c = '\r'; 3a1c: e3130040 tst r3, #64 ; 0x40 3a20: 03a0500a moveq r5, #10 3a24: 13a0500d movne r5, #13 3a28: ea000001 b 3a34 } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 3a2c: e3550000 cmp r5, #0 3a30: 0a00002c beq 3ae8 3a34: e594303c ldr r3, [r4, #60] ; 0x3c 3a38: e3130002 tst r3, #2 3a3c: 0a000029 beq 3ae8 if (c == tty->termios.c_cc[VERASE]) { 3a40: e5d42043 ldrb r2, [r4, #67] ; 0x43 3a44: e1520005 cmp r2, r5 erase (tty, 0); 3a48: 01a00004 moveq r0, r4 3a4c: 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]) { 3a50: 0a000004 beq 3a68 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3a54: e5d42044 ldrb r2, [r4, #68] ; 0x44 3a58: e1520005 cmp r2, r5 3a5c: 1a000003 bne 3a70 erase (tty, 1); 3a60: e1a00004 mov r0, r4 3a64: e3a01001 mov r1, #1 3a68: ebffff60 bl 37f0 3a6c: ea00002d b 3b28 return 0; } else if (c == tty->termios.c_cc[VEOF]) { 3a70: e5d42045 ldrb r2, [r4, #69] ; 0x45 3a74: e1520005 cmp r2, r5 3a78: 0a00002c beq 3b30 return 1; } else if (c == '\n') { 3a7c: e355000a cmp r5, #10 3a80: 1a000008 bne 3aa8 if (tty->termios.c_lflag & (ECHO | ECHONL)) 3a84: e3130048 tst r3, #72 ; 0x48 echo (c, tty); 3a88: 11a00005 movne r0, r5 3a8c: 11a01004 movne r1, r4 3a90: 1bffff33 blne 3764 tty->cbuf[tty->ccount++] = c; 3a94: e284201c add r2, r4, #28 3a98: e892000c ldm r2, {r2, r3} 3a9c: e3a0100a mov r1, #10 3aa0: e7c21003 strb r1, [r2, r3] 3aa4: ea00000c b 3adc return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 3aa8: e5d4204c ldrb r2, [r4, #76] ; 0x4c 3aac: e1520005 cmp r2, r5 3ab0: 0a000002 beq 3ac0 3ab4: e5d42051 ldrb r2, [r4, #81] ; 0x51 3ab8: e1520005 cmp r2, r5 3abc: 1a000009 bne 3ae8 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 3ac0: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 3ac4: 11a00005 movne r0, r5 <== NOT EXECUTED 3ac8: 11a01004 movne r1, r4 <== NOT EXECUTED 3acc: 1bffff24 blne 3764 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3ad0: e284201c add r2, r4, #28 <== NOT EXECUTED 3ad4: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 3ad8: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED 3adc: e2833001 add r3, r3, #1 3ae0: e5843020 str r3, [r4, #32] 3ae4: ea000011 b 3b30 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 3ae8: e59f3054 ldr r3, [pc, #84] ; 3b44 3aec: e5933008 ldr r3, [r3, #8] 3af0: e5942020 ldr r2, [r4, #32] 3af4: e2433001 sub r3, r3, #1 3af8: e1520003 cmp r2, r3 3afc: aa00000d bge 3b38 if (tty->termios.c_lflag & ECHO) 3b00: e594303c ldr r3, [r4, #60] ; 0x3c 3b04: e3130008 tst r3, #8 echo (c, tty); 3b08: 11a00005 movne r0, r5 3b0c: 11a01004 movne r1, r4 3b10: 1bffff13 blne 3764 tty->cbuf[tty->ccount++] = c; 3b14: e284201c add r2, r4, #28 3b18: e892000c ldm r2, {r2, r3} 3b1c: e7c25003 strb r5, [r2, r3] 3b20: e2833001 add r3, r3, #1 3b24: 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; 3b28: e3a00000 mov r0, #0 3b2c: 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; 3b30: e3a00001 mov r0, #1 3b34: 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; 3b38: e3a00000 mov r0, #0 <== NOT EXECUTED } 3b3c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 0001f49c : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 1f49c: e3a00000 mov r0, #0 <== NOT EXECUTED 1f4a0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000b0ac : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { b0ac: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; b0b0: e5905018 ldr r5, [r0, #24] if (the_jnode->type == IMFS_LINEAR_FILE) { b0b4: e595304c ldr r3, [r5, #76] ; 0x4c b0b8: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { b0bc: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { b0c0: 1a00000b bne b0f4 if (iop->offset > the_jnode->info.linearfile.size) b0c4: e5953054 ldr r3, [r5, #84] ; 0x54 b0c8: e5901010 ldr r1, [r0, #16] b0cc: e1510003 cmp r1, r3 b0d0: e5952050 ldr r2, [r5, #80] ; 0x50 b0d4: ca000003 bgt b0e8 b0d8: 1a000014 bne b130 b0dc: e590100c ldr r1, [r0, #12] b0e0: e1510002 cmp r1, r2 b0e4: 9a000011 bls b130 iop->offset = the_jnode->info.linearfile.size; b0e8: e584200c str r2, [r4, #12] <== NOT EXECUTED b0ec: e5843010 str r3, [r4, #16] <== NOT EXECUTED b0f0: ea00000e b b130 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) b0f4: e1a00005 mov r0, r5 b0f8: e284200c add r2, r4, #12 b0fc: e8920006 ldm r2, {r1, r2} b100: ebfffeed bl acbc b104: e3500000 cmp r0, #0 b108: 0a000005 beq b124 rtems_set_errno_and_return_minus_one( ENOSPC ); b10c: eb00028d bl bb48 <__errno> b110: e3a0301c mov r3, #28 b114: e5803000 str r3, [r0] b118: e3e04000 mvn r4, #0 b11c: e3e03000 mvn r3, #0 b120: ea000004 b b138 iop->size = the_jnode->info.file.size; b124: e2853050 add r3, r5, #80 ; 0x50 b128: e893000c ldm r3, {r2, r3} b12c: e984000c stmib r4, {r2, r3} } return iop->offset; b130: e284400c add r4, r4, #12 b134: e8940018 ldm r4, {r3, r4} } b138: e1a00003 mov r0, r3 b13c: e1a01004 mov r1, r4 b140: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000afb8 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) afb8: e5903014 ldr r3, [r0, #20] afbc: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { afc0: e92d4031 push {r0, r4, r5, lr} afc4: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; afc8: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) afcc: 0a000015 beq b028 && (the_jnode->type == IMFS_LINEAR_FILE)) { afd0: e594304c ldr r3, [r4, #76] ; 0x4c afd4: e3530006 cmp r3, #6 afd8: 1a000012 bne b028 uint32_t count = the_jnode->info.linearfile.size; afdc: 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; afe0: 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; afe4: e3a02005 mov r2, #5 <== NOT EXECUTED afe8: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; afec: e3a01000 mov r1, #0 <== NOT EXECUTED aff0: 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) aff4: 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; aff8: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; affc: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED b000: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; b004: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; b008: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; b00c: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) b010: 0a000004 beq b028 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) b014: e1a00004 mov r0, r4 <== NOT EXECUTED b018: e58dc000 str ip, [sp] <== NOT EXECUTED b01c: ebffff6d bl add8 <== NOT EXECUTED b020: e3700001 cmn r0, #1 <== NOT EXECUTED b024: 0a000009 beq b050 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) b028: e5953014 ldr r3, [r5, #20] b02c: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; b030: 12843050 addne r3, r4, #80 ; 0x50 b034: 1893000c ldmne r3, {r2, r3} b038: 1585200c strne r2, [r5, #12] b03c: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; b040: e2844050 add r4, r4, #80 ; 0x50 b044: e8940018 ldm r4, {r3, r4} b048: e9850018 stmib r5, {r3, r4} return 0; b04c: e3a00000 mov r0, #0 } b050: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 00002220 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2220: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 2224: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 2228: e24dd02c sub sp, sp, #44 ; 0x2c 222c: e1a06000 mov r6, r0 2230: e1a0b001 mov fp, r1 2234: e1a0a002 mov sl, r2 2238: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 223c: 8a000004 bhi 2254 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 2240: e1a00002 mov r0, r2 2244: eb001d02 bl 9654 if ( !mount_h ) 2248: e3500000 cmp r0, #0 224c: e58d0014 str r0, [sp, #20] 2250: 1a000002 bne 2260 rtems_set_errno_and_return_minus_one( EINVAL ); 2254: eb00263b bl bb48 <__errno> 2258: e3a03016 mov r3, #22 225c: ea00003b b 2350 { 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; 2260: e25b5000 subs r5, fp, #0 2264: 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 : "/"; 2268: e59f3258 ldr r3, [pc, #600] ; 24c8 226c: e3550000 cmp r5, #0 2270: 11a0300b movne r3, fp size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2274: 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 : "/"; 2278: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; 227c: eb002a1b bl caf0 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2280: 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; 2284: e2809001 add r9, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2288: 01a07006 moveq r7, r6 228c: 0a000002 beq 229c 2290: e1a00006 mov r0, r6 2294: eb002a15 bl caf0 2298: e2807001 add r7, r0, #1 size_t target_size = strlen( target ) + 1; 229c: e59d0004 ldr r0, [sp, #4] 22a0: eb002a12 bl caf0 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 22a4: 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; 22a8: e2803001 add r3, r0, #1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 22ac: 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; 22b0: 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 ); 22b4: e0811003 add r1, r1, r3 22b8: 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; 22bc: 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 ); 22c0: ebfffe15 bl 1b1c if ( mt_entry != NULL ) { 22c4: e2504000 subs r4, r0, #0 22c8: 0a00001e beq 2348 char *str = (char *) mt_entry + sizeof( *mt_entry ); 22cc: e2848074 add r8, r4, #116 ; 0x74 memcpy( str, filesystemtype, filesystemtype_size ); 22d0: e1a00008 mov r0, r8 22d4: e1a0100a mov r1, sl 22d8: e1a02009 mov r2, r9 22dc: eb002847 bl c400 mt_entry->type = str; 22e0: e584806c str r8, [r4, #108] ; 0x6c str += filesystemtype_size; 22e4: e0888009 add r8, r8, r9 memcpy( str, source_or_null, source_size ); 22e8: e1a00008 mov r0, r8 22ec: e1a01006 mov r1, r6 22f0: e1a02007 mov r2, r7 22f4: eb002841 bl c400 mt_entry->dev = str; 22f8: e5848070 str r8, [r4, #112] ; 0x70 str += source_size; 22fc: e0888007 add r8, r8, r7 memcpy( str, target, target_size ); 2300: e99d0006 ldmib sp, {r1, r2} 2304: e1a00008 mov r0, r8 2308: eb00283c bl c400 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 230c: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2310: e59fe1b4 ldr lr, [pc, #436] ; 24cc ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 2314: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2318: e8be000f ldm lr!, {r0, r1, r2, r3} 231c: e284c038 add ip, r4, #56 ; 0x38 2320: e8ac000f stmia ip!, {r0, r1, r2, r3} 2324: e8be000f ldm lr!, {r0, r1, r2, r3} 2328: e8ac000f stmia ip!, {r0, r1, r2, r3} 232c: 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 ) { 2330: 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; 2334: 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; 2338: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 233c: 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 ) { 2340: 0a00002e beq 2400 2344: ea000003 b 2358 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 2348: eb0025fe bl bb48 <__errno> <== NOT EXECUTED 234c: e3a0300c mov r3, #12 <== NOT EXECUTED 2350: e5803000 str r3, [r0] 2354: ea000058 b 24bc * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 2358: e3a03001 mov r3, #1 235c: e28d6018 add r6, sp, #24 2360: e58d3000 str r3, [sp] 2364: e1a0000b mov r0, fp 2368: e59d1010 ldr r1, [sp, #16] 236c: e3a02007 mov r2, #7 2370: e1a03006 mov r3, r6 2374: ebfffe17 bl 1bd8 2378: e3700001 cmn r0, #1 237c: 0a000048 beq 24a4 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2380: e1a00006 mov r0, r6 2384: e59d3024 ldr r3, [sp, #36] ; 0x24 2388: e1a0e00f mov lr, pc 238c: e593f010 ldr pc, [r3, #16] 2390: e3500001 cmp r0, #1 2394: 0a000002 beq 23a4 errno = ENOTDIR; 2398: eb0025ea bl bb48 <__errno> 239c: e3a03014 mov r3, #20 23a0: ea000006 b 23c0 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 23a4: e59f0124 ldr r0, [pc, #292] ; 24d0 23a8: e59d1018 ldr r1, [sp, #24] 23ac: ebffff85 bl 21c8 23b0: e3500000 cmp r0, #0 23b4: 0a000003 beq 23c8 errno = EBUSY; 23b8: eb0025e2 bl bb48 <__errno> 23bc: e3a03010 mov r3, #16 23c0: e5803000 str r3, [r0] goto cleanup_and_bail; 23c4: ea000037 b 24a8 * 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; 23c8: e59d3018 ldr r3, [sp, #24] 23cc: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 23d0: e59d3020 ldr r3, [sp, #32] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 23d4: 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; 23d8: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; 23dc: e59d3024 ldr r3, [sp, #36] ; 0x24 mt_entry->mt_point_node.mt_entry = loc.mt_entry; 23e0: 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; 23e4: 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 ) ) { 23e8: e1a00004 mov r0, r4 23ec: e1a0e00f mov lr, pc 23f0: e593f020 ldr pc, [r3, #32] 23f4: e3500000 cmp r0, #0 23f8: 0a00000b beq 242c 23fc: ea000029 b 24a8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2400: e59f30cc ldr r3, [pc, #204] ; 24d4 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2404: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2408: e5933000 ldr r3, [r3] 240c: 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; 2410: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2414: 0a000004 beq 242c errno = EINVAL; 2418: eb0025ca bl bb48 <__errno> <== NOT EXECUTED 241c: e3a03016 mov r3, #22 <== NOT EXECUTED 2420: e5803000 str r3, [r0] <== NOT EXECUTED ) { 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; 2424: e1a06005 mov r6, r5 <== NOT EXECUTED /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { errno = EINVAL; goto cleanup_and_bail; 2428: ea00001e b 24a8 <== NOT EXECUTED * mt_point_node.node_access will be left to null to indicate that this * is the root of the entire file system. */ } if ( (*mount_h)( mt_entry, data ) ) { 242c: e1a00004 mov r0, r4 2430: e59d1050 ldr r1, [sp, #80] ; 0x50 2434: e59d3014 ldr r3, [sp, #20] 2438: e1a0e00f mov lr, pc 243c: e12fff13 bx r3 2440: e2507000 subs r7, r0, #0 2444: 0a000004 beq 245c /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 2448: e1a00004 mov r0, r4 244c: e59d3024 ldr r3, [sp, #36] ; 0x24 2450: e1a0e00f mov lr, pc 2454: e593f028 ldr pc, [r3, #40] ; 0x28 goto cleanup_and_bail; 2458: ea000012 b 24a8 } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 245c: ebffff4f bl 21a0 2460: e59f006c ldr r0, [pc, #108] ; 24d4 2464: e1a01004 mov r1, r4 2468: eb000cc4 bl 5780 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 246c: ebffff51 bl 21b8 if ( !has_target ) 2470: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 2474: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 2478: 1a000010 bne 24c0 rtems_filesystem_root = mt_entry->mt_fs_root; 247c: e59f3054 ldr r3, [pc, #84] ; 24d8 2480: e284401c add r4, r4, #28 2484: e593c000 ldr ip, [r3] 2488: e8b4000f ldm r4!, {r0, r1, r2, r3} 248c: e28cc018 add ip, ip, #24 2490: e8ac000f stmia ip!, {r0, r1, r2, r3} 2494: e5943000 ldr r3, [r4] return 0; 2498: 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; 249c: e58c3000 str r3, [ip] 24a0: ea000006 b 24c0 ) { 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; 24a4: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 24a8: e1a00004 mov r0, r4 24ac: ebfffdfe bl 1cac if ( loc_to_free ) 24b0: e3560000 cmp r6, #0 rtems_filesystem_freenode( loc_to_free ); 24b4: 11a00006 movne r0, r6 24b8: 1bfffdf6 blne 1c98 return -1; 24bc: e3e00000 mvn r0, #0 } 24c0: e28dd02c add sp, sp, #44 ; 0x2c 24c4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000024e0 : */ int newlib_free_buffers( FILE *fp ) { 24e0: e92d4010 push {r4, lr} 24e4: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 24e8: eb002699 bl bf54 24ec: e3500002 cmp r0, #2 24f0: 8a00000b bhi 2524 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 24f4: e1d430bc ldrh r3, [r4, #12] 24f8: e3130080 tst r3, #128 ; 0x80 24fc: 0a00000a beq 252c free( fp->_bf._base ); 2500: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2504: ebfffde8 bl 1cac <== NOT EXECUTED fp->_flags &= ~__SMBF; 2508: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED 250c: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED 2510: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2514: e3a03000 mov r3, #0 <== NOT EXECUTED 2518: e5843000 str r3, [r4] <== NOT EXECUTED 251c: e5843010 str r3, [r4, #16] <== NOT EXECUTED 2520: ea000001 b 252c <== NOT EXECUTED } break; default: fclose(fp); 2524: e1a00004 mov r0, r4 <== NOT EXECUTED 2528: eb0025d4 bl bc80 <== NOT EXECUTED } return 0; } 252c: e3a00000 mov r0, #0 2530: e8bd8010 pop {r4, pc} =============================================================================== 00003614 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3614: e92d4011 push {r0, r4, lr} 3618: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 361c: e5913034 ldr r3, [r1, #52] ; 0x34 3620: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3624: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { 3628: 0a000045 beq 3744 switch (c) { 362c: e5dd2000 ldrb r2, [sp] 3630: e2421008 sub r1, r2, #8 3634: e3510005 cmp r1, #5 3638: 979ff101 ldrls pc, [pc, r1, lsl #2] 363c: ea00002c b 36f4 3640: 000036e0 .word 0x000036e0 <== NOT EXECUTED 3644: 000036b8 .word 0x000036b8 <== NOT EXECUTED 3648: 00003658 .word 0x00003658 <== NOT EXECUTED 364c: 000036f4 .word 0x000036f4 <== NOT EXECUTED 3650: 000036f4 .word 0x000036f4 <== NOT EXECUTED 3654: 00003680 .word 0x00003680 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 3658: e3130020 tst r3, #32 tty->column = 0; 365c: 13a02000 movne r2, #0 3660: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 3664: e3130004 tst r3, #4 3668: 0a000035 beq 3744 rtems_termios_puts ("\r", 1, tty); 366c: e59f00e4 ldr r0, [pc, #228] ; 3758 3670: e3a01001 mov r1, #1 3674: e1a02004 mov r2, r4 3678: ebffffa5 bl 3514 367c: ea00000b b 36b0 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 3680: e3130010 tst r3, #16 <== NOT EXECUTED 3684: 0a000002 beq 3694 <== NOT EXECUTED 3688: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 368c: e3520000 cmp r2, #0 <== NOT EXECUTED 3690: 0a00002f beq 3754 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 3694: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 3698: 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) { 369c: 0a000028 beq 3744 <== NOT EXECUTED c = '\n'; 36a0: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 36a4: 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'; 36a8: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 36ac: 0a000024 beq 3744 <== NOT EXECUTED tty->column = 0; 36b0: e3a03000 mov r3, #0 36b4: ea000021 b 3740 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 36b8: e5942028 ldr r2, [r4, #40] ; 0x28 36bc: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 36c0: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 36c4: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 36c8: e3530b06 cmp r3, #6144 ; 0x1800 36cc: e0813002 add r3, r1, r2 tty->column += i; 36d0: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 36d4: 059f0080 ldreq r0, [pc, #128] ; 375c tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 36d8: 1a000018 bne 3740 36dc: ea00001a b 374c } tty->column += i; break; case '\b': if (tty->column > 0) 36e0: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 36e4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 36e8: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 36ec: ca000013 bgt 3740 <== NOT EXECUTED 36f0: ea000013 b 3744 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 36f4: e3130002 tst r3, #2 36f8: 0a000007 beq 371c c = toupper(c); 36fc: e59f305c ldr r3, [pc, #92] ; 3760 <== NOT EXECUTED 3700: e5933000 ldr r3, [r3] <== NOT EXECUTED 3704: e0833002 add r3, r3, r2 <== NOT EXECUTED 3708: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 370c: e2033003 and r3, r3, #3 <== NOT EXECUTED 3710: e3530002 cmp r3, #2 <== NOT EXECUTED 3714: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 3718: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 371c: e59f203c ldr r2, [pc, #60] ; 3760 3720: e5dd3000 ldrb r3, [sp] 3724: e5922000 ldr r2, [r2] 3728: e0823003 add r3, r2, r3 372c: e5d33001 ldrb r3, [r3, #1] 3730: e3130020 tst r3, #32 3734: 1a000002 bne 3744 tty->column++; 3738: e5943028 ldr r3, [r4, #40] ; 0x28 373c: e2833001 add r3, r3, #1 3740: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 3744: e1a0000d mov r0, sp 3748: e3a01001 mov r1, #1 374c: e1a02004 mov r2, r4 3750: ebffff6f bl 3514 } 3754: e8bd8018 pop {r3, r4, pc} =============================================================================== 0000b820 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { b820: e59f3058 ldr r3, [pc, #88] ; b880 b824: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { b828: e92d4070 push {r4, r5, r6, lr} b82c: e1a04000 mov r4, r0 b830: e1a05002 mov r5, r2 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; b834: 13e00015 mvnne r0, #21 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { b838: 18bd8070 popne {r4, r5, r6, pc} if (buffer == NULL) b83c: e3520000 cmp r2, #0 return -EFAULT; b840: 03e0000d mvneq r0, #13 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) b844: 08bd8070 popeq {r4, r5, r6, pc} return -EFAULT; if (! PIPE_LOCK(pipe)) b848: e3a01000 mov r1, #0 b84c: e5940028 ldr r0, [r4, #40] ; 0x28 b850: e1a02001 mov r2, r1 b854: ebffed6d bl 6e10 b858: e2506000 subs r6, r0, #0 b85c: 1a000005 bne b878 return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; b860: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); b864: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; b868: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); b86c: ebffedad bl 6f28 return 0; b870: e1a00006 mov r0, r6 b874: e8bd8070 pop {r4, r5, r6, pc} if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) return -EINTR; b878: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } b87c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0000b508 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b508: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} b50c: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b510: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b514: e1a04000 mov r4, r0 b518: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b51c: e5900028 ldr r0, [r0, #40] ; 0x28 b520: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { b524: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b528: ebffee38 bl 6e10 b52c: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); b530: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) b534: 0a000043 beq b648 b538: ea00004e b b678 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) b53c: e5947014 ldr r7, [r4, #20] b540: e3570000 cmp r7, #0 b544: 0a000044 beq b65c goto out_locked; if (LIBIO_NODELAY(iop)) { b548: e59a8014 ldr r8, [sl, #20] b54c: e2188001 ands r8, r8, #1 b550: 1a000040 bne b658 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; b554: e5943018 ldr r3, [r4, #24] b558: e2833001 add r3, r3, #1 b55c: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); b560: e5940028 ldr r0, [r4, #40] ; 0x28 b564: ebffee6f bl 6f28 if (! PIPE_READWAIT(pipe)) b568: e1a01008 mov r1, r8 b56c: e594002c ldr r0, [r4, #44] ; 0x2c b570: eb000385 bl c38c b574: e3500000 cmp r0, #0 b578: 01a07000 moveq r7, r0 b57c: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { b580: e1a01008 mov r1, r8 b584: e5940028 ldr r0, [r4, #40] ; 0x28 b588: e1a02008 mov r2, r8 b58c: ebffee1f bl 6e10 b590: e3500000 cmp r0, #0 b594: 1a000033 bne b668 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; b598: e5943018 ldr r3, [r4, #24] if (ret != 0) b59c: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; b5a0: e2433001 sub r3, r3, #1 b5a4: e5843018 str r3, [r4, #24] if (ret != 0) b5a8: 1a00002b bne b65c if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { b5ac: e594300c ldr r3, [r4, #12] b5b0: e3530000 cmp r3, #0 b5b4: 0affffe0 beq b53c if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); b5b8: e0667005 rsb r7, r6, r5 b5bc: e1530007 cmp r3, r7 b5c0: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; b5c4: e5948004 ldr r8, [r4, #4] b5c8: e5943008 ldr r3, [r4, #8] b5cc: e5941000 ldr r1, [r4] b5d0: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { b5d4: e1570008 cmp r7, r8 b5d8: 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); b5dc: d0811003 addle r1, r1, r3 b5e0: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { b5e4: da000006 ble b604 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); b5e8: e0811003 add r1, r1, r3 b5ec: e1a02008 mov r2, r8 b5f0: eb000c80 bl e7f8 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); b5f4: e0860008 add r0, r6, r8 b5f8: e5941000 ldr r1, [r4] b5fc: e0890000 add r0, r9, r0 b600: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); b604: eb000c7b bl e7f8 pipe->Start += chunk; b608: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; b60c: e5941004 ldr r1, [r4, #4] b610: e0870000 add r0, r7, r0 b614: eb0038c2 bl 19924 <__umodsi3> pipe->Length -= chunk; b618: e594300c ldr r3, [r4, #12] b61c: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) b620: e3530000 cmp r3, #0 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; b624: e5840008 str r0, [r4, #8] pipe->Length -= chunk; b628: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; b62c: 05843008 streq r3, [r4, #8] if (pipe->waitingWriters > 0) b630: e594301c ldr r3, [r4, #28] b634: e3530000 cmp r3, #0 PIPE_WAKEUPWRITERS(pipe); b638: 15940030 ldrne r0, [r4, #48] ; 0x30 b63c: 11a0100d movne r1, sp b640: 1b00033b blne c334 read += chunk; b644: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { b648: e1560005 cmp r6, r5 b64c: 3affffd6 bcc b5ac b650: e3a07000 mov r7, #0 b654: ea000000 b b65c /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; b658: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); b65c: e5940028 ldr r0, [r4, #40] ; 0x28 b660: ebffee30 bl 6f28 b664: ea000000 b b66c PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; b668: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; b66c: e3560000 cmp r6, #0 b670: d1a06007 movle r6, r7 b674: ea000000 b b67c ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; b678: e3e06003 mvn r6, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } b67c: e1a00006 mov r0, r6 b680: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000b684 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { b684: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) b688: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { b68c: e1a04000 mov r4, r0 b690: e1a0b001 mov fp, r1 b694: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; b698: 01a05007 moveq r5, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) b69c: 0a00005d beq b818 return 0; if (! PIPE_LOCK(pipe)) b6a0: e3a01000 mov r1, #0 b6a4: e5900028 ldr r0, [r0, #40] ; 0x28 b6a8: e1a02001 mov r2, r1 b6ac: ebffedd7 bl 6e10 b6b0: e3500000 cmp r0, #0 return -EINTR; b6b4: 13e05003 mvnne r5, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) b6b8: 1a000056 bne b818 return -EINTR; if (pipe->Readers == 0) { b6bc: e5945010 ldr r5, [r4, #16] b6c0: e3550000 cmp r5, #0 b6c4: 0a00004c beq b7fc ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; b6c8: e5949004 ldr r9, [r4, #4] b6cc: e1570009 cmp r7, r9 b6d0: 91a09007 movls r9, r7 b6d4: 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; b6d8: e1a05000 mov r5, r0 b6dc: ea000040 b b7e4 /* 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)) { b6e0: e598a014 ldr sl, [r8, #20] b6e4: e21aa001 ands sl, sl, #1 b6e8: 1a000041 bne b7f4 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; b6ec: e594301c ldr r3, [r4, #28] b6f0: e2833001 add r3, r3, #1 b6f4: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); b6f8: e5940028 ldr r0, [r4, #40] ; 0x28 b6fc: ebffee09 bl 6f28 if (! PIPE_WRITEWAIT(pipe)) b700: e1a0100a mov r1, sl b704: e5940030 ldr r0, [r4, #48] ; 0x30 b708: eb00031f bl c38c b70c: e3500000 cmp r0, #0 b710: 01a06000 moveq r6, r0 b714: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { b718: e1a0100a mov r1, sl b71c: e5940028 ldr r0, [r4, #40] ; 0x28 b720: e1a0200a mov r2, sl b724: ebffedb9 bl 6e10 b728: e3500000 cmp r0, #0 b72c: 1a000036 bne b80c /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b730: e594301c ldr r3, [r4, #28] if (ret != 0) b734: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; b738: e2433001 sub r3, r3, #1 b73c: e584301c str r3, [r4, #28] if (ret != 0) b740: 1a00002e bne b800 goto out_locked; if (pipe->Readers == 0) { b744: e5943010 ldr r3, [r4, #16] b748: e3530000 cmp r3, #0 b74c: 0a00002a beq b7fc /* 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) { b750: e594a004 ldr sl, [r4, #4] b754: e594300c ldr r3, [r4, #12] b758: e063200a rsb r2, r3, sl b75c: e1520009 cmp r2, r9 b760: 3affffde bcc b6e0 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); b764: e5940008 ldr r0, [r4, #8] b768: e1a0100a mov r1, sl b76c: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); b770: e0656007 rsb r6, r5, r7 b774: e1520006 cmp r2, r6 b778: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); b77c: eb003868 bl 19924 <__umodsi3> b780: e5943000 ldr r3, [r4] b784: e060a00a rsb sl, r0, sl if (chunk > chunk1) { b788: e156000a cmp r6, sl b78c: 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); b790: d0830000 addle r0, r3, r0 b794: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { b798: da000006 ble b7b8 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); b79c: e1a0200a mov r2, sl b7a0: e0830000 add r0, r3, r0 b7a4: eb000c13 bl e7f8 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); b7a8: e08a1005 add r1, sl, r5 b7ac: e5940000 ldr r0, [r4] b7b0: e08b1001 add r1, fp, r1 b7b4: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); b7b8: eb000c0e bl e7f8 pipe->Length += chunk; b7bc: e594300c ldr r3, [r4, #12] b7c0: e0833006 add r3, r3, r6 b7c4: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) b7c8: e5943018 ldr r3, [r4, #24] b7cc: e3530000 cmp r3, #0 PIPE_WAKEUPREADERS(pipe); b7d0: 1594002c ldrne r0, [r4, #44] ; 0x2c b7d4: 11a0100d movne r1, sp b7d8: 1b0002d5 blne c334 written += chunk; b7dc: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; b7e0: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { b7e4: e1550007 cmp r5, r7 b7e8: 3affffd8 bcc b750 b7ec: e3a06000 mov r6, #0 b7f0: ea000002 b b800 while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; b7f4: e3e0600a mvn r6, #10 b7f8: ea000000 b b800 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; b7fc: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); b800: e5940028 ldr r0, [r4, #40] ; 0x28 b804: ebffedc7 bl 6f28 b808: ea000000 b b810 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; b80c: e3e06003 mvn r6, #3 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; b810: e3550000 cmp r5, #0 b814: d1a05006 movle r5, r6 } b818: e1a00005 mov r0, r5 b81c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00010e14 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 10e14: e59f310c ldr r3, [pc, #268] ; 10f28 10e18: e5932010 ldr r2, [r3, #16] 10e1c: e2822001 add r2, r2, #1 void *realloc( void *ptr, size_t size ) { 10e20: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 10e24: 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())) { 10e28: e59f30fc ldr r3, [pc, #252] ; 10f2c 10e2c: e5933000 ldr r3, [r3] 10e30: e3530003 cmp r3, #3 void *realloc( void *ptr, size_t size ) { 10e34: e1a04000 mov r4, r0 10e38: 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())) { 10e3c: 1a000009 bne 10e68 if (_Thread_Dispatch_disable_level > 0) 10e40: e59f30e8 ldr r3, [pc, #232] ; 10f30 10e44: e5933000 ldr r3, [r3] 10e48: e3530000 cmp r3, #0 return (void *) 0; 10e4c: 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) 10e50: 1a000032 bne 10f20 return (void *) 0; if (_ISR_Nest_level > 0) 10e54: e59f20d8 ldr r2, [pc, #216] ; 10f34 10e58: e5922000 ldr r2, [r2] 10e5c: e3520000 cmp r2, #0 return (void *) 0; 10e60: 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) 10e64: 1a00002d bne 10f20 } /* * Continue with realloc(). */ if ( !ptr ) 10e68: e3540000 cmp r4, #0 10e6c: 1a000003 bne 10e80 return malloc( size ); 10e70: e1a00005 mov r0, r5 10e74: ebffc45b bl 1fe8 10e78: e1a04000 mov r4, r0 10e7c: ea000027 b 10f20 if ( !size ) { 10e80: e3550000 cmp r5, #0 10e84: 1a000003 bne 10e98 free( ptr ); 10e88: e1a00004 mov r0, r4 <== NOT EXECUTED 10e8c: ebffc386 bl 1cac <== NOT EXECUTED return (void *) 0; 10e90: e1a04005 mov r4, r5 <== NOT EXECUTED 10e94: ea000021 b 10f20 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 10e98: e59f6098 ldr r6, [pc, #152] ; 10f38 10e9c: e1a01004 mov r1, r4 10ea0: e5960000 ldr r0, [r6] 10ea4: e1a0200d mov r2, sp 10ea8: eb00004e bl 10fe8 <_Protected_heap_Get_block_size> 10eac: e2507000 subs r7, r0, #0 10eb0: 1a000004 bne 10ec8 errno = EINVAL; 10eb4: ebffeb23 bl bb48 <__errno> 10eb8: e3a03016 mov r3, #22 10ebc: e5803000 str r3, [r0] return (void *) 0; 10ec0: e1a04007 mov r4, r7 10ec4: ea000015 b 10f20 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 10ec8: e5960000 ldr r0, [r6] 10ecc: e1a01004 mov r1, r4 10ed0: e1a02005 mov r2, r5 10ed4: eb000054 bl 1102c <_Protected_heap_Resize_block> 10ed8: e3500000 cmp r0, #0 10edc: 1a00000f bne 10f20 * 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 ); 10ee0: e1a00005 mov r0, r5 10ee4: ebffc43f bl 1fe8 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 10ee8: e59f3038 ldr r3, [pc, #56] ; 10f28 10eec: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 10ef0: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 10ef4: e2422001 sub r2, r2, #1 10ef8: e5832004 str r2, [r3, #4] if ( !new_area ) { 10efc: 0a000006 beq 10f1c return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 10f00: e59d2000 ldr r2, [sp] 10f04: e1a01004 mov r1, r4 10f08: e1550002 cmp r5, r2 10f0c: 31a02005 movcc r2, r5 10f10: ebffed3a bl c400 free( ptr ); 10f14: e1a00004 mov r0, r4 10f18: ebffc363 bl 1cac new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 10f1c: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 10f20: e1a00004 mov r0, r4 10f24: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 000022f8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 22f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 22fc: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 2300: e24dd040 sub sp, sp, #64 ; 0x40 2304: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 2308: 0a000055 beq 2464 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 230c: e28d5030 add r5, sp, #48 ; 0x30 2310: e1a00005 mov r0, r5 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2314: e28d4028 add r4, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2318: eb001467 bl 74bc <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 231c: e1a01005 mov r1, r5 2320: e59f0144 ldr r0, [pc, #324] ; 246c 2324: e1a02004 mov r2, r4 2328: eb001d18 bl 9790 <_Timespec_Subtract> } } } #endif (*print)( 232c: e1a00008 mov r0, r8 2330: e59f1138 ldr r1, [pc, #312] ; 2470 2334: e1a0e00f mov lr, pc 2338: e12fff1a bx sl 233c: e59f5130 ldr r5, [pc, #304] ; 2474 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2340: e28db008 add fp, sp, #8 #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 2344: e5b53004 ldr r3, [r5, #4]! 2348: e5936004 ldr r6, [r3, #4] if ( information ) { 234c: e3560000 cmp r6, #0 2350: 13a07001 movne r7, #1 * since the last context switch. */ ran = the_thread->cpu_time_used; if ( _Thread_Executing->Object.id == the_thread->Object.id ) { Timestamp_Control used; _Timestamp_Subtract( 2354: 128d9018 addne r9, sp, #24 if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 2358: 1a000032 bne 2428 235c: ea000034 b 2434 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 2360: e596301c ldr r3, [r6, #28] 2364: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 2368: e3540000 cmp r4, #0 236c: 0a00002c beq 2424 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2370: e3a0100d mov r1, #13 2374: e1a0200b mov r2, fp 2378: e5940008 ldr r0, [r4, #8] 237c: eb000fc5 bl 6298 (*print)( 2380: e5942008 ldr r2, [r4, #8] 2384: e1a0300b mov r3, fp 2388: e1a00008 mov r0, r8 238c: e59f10e4 ldr r1, [pc, #228] ; 2478 2390: e1a0e00f mov lr, pc 2394: 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; 2398: e2843084 add r3, r4, #132 ; 0x84 239c: e893000c ldm r3, {r2, r3} 23a0: e58d2020 str r2, [sp, #32] 23a4: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 23a8: e59f20cc ldr r2, [pc, #204] ; 247c 23ac: e5923004 ldr r3, [r2, #4] 23b0: e5932008 ldr r2, [r3, #8] 23b4: e5943008 ldr r3, [r4, #8] 23b8: e1520003 cmp r2, r3 23bc: 1a000006 bne 23dc Timestamp_Control used; _Timestamp_Subtract( 23c0: e59f00b8 ldr r0, [pc, #184] ; 2480 23c4: e28d1030 add r1, sp, #48 ; 0x30 23c8: e1a02009 mov r2, r9 23cc: eb001cef bl 9790 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 23d0: e28d0020 add r0, sp, #32 23d4: e1a01009 mov r1, r9 23d8: eb001cb1 bl 96a4 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 23dc: e28d203c add r2, sp, #60 ; 0x3c 23e0: e28d3038 add r3, sp, #56 ; 0x38 23e4: e28d0020 add r0, sp, #32 23e8: e28d1028 add r1, sp, #40 ; 0x28 23ec: eb001cc4 bl 9704 <_Timespec_Divide> /* * Print the information */ (*print)( context, 23f0: e3a01ffa mov r1, #1000 ; 0x3e8 23f4: e59d0024 ldr r0, [sp, #36] ; 0x24 23f8: eb005157 bl 1695c <__aeabi_uidiv> 23fc: e59d203c ldr r2, [sp, #60] ; 0x3c 2400: e58d2000 str r2, [sp] 2404: e59d2038 ldr r2, [sp, #56] ; 0x38 2408: e1a03000 mov r3, r0 240c: e58d2004 str r2, [sp, #4] 2410: e1a00008 mov r0, r8 2414: e59f1068 ldr r1, [pc, #104] ; 2484 2418: e59d2020 ldr r2, [sp, #32] 241c: e1a0e00f mov lr, pc 2420: e12fff1a bx sl continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 2424: e2877001 add r7, r7, #1 2428: e1d631b0 ldrh r3, [r6, #16] 242c: e1570003 cmp r7, r3 2430: 9affffca bls 2360 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 2434: e59f304c ldr r3, [pc, #76] ; 2488 2438: e1550003 cmp r5, r3 243c: 1affffc0 bne 2344 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 2440: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 2444: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED 2448: eb005143 bl 1695c <__aeabi_uidiv> <== NOT EXECUTED 244c: e59f1038 ldr r1, [pc, #56] ; 248c <== NOT EXECUTED 2450: e1a03000 mov r3, r0 <== NOT EXECUTED 2454: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 2458: e1a00008 mov r0, r8 <== NOT EXECUTED 245c: e1a0e00f mov lr, pc <== NOT EXECUTED 2460: e12fff1a bx sl <== NOT EXECUTED "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 2464: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED 2468: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 00001a0c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1a0c: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1a10: e59f60e0 ldr r6, [pc, #224] ; 1af8 1a14: e5963000 ldr r3, [r6] 1a18: e3a02012 mov r2, #18 1a1c: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1a20: e59f30d4 ldr r3, [pc, #212] ; 1afc 1a24: e5933000 ldr r3, [r3] 1a28: e3530000 cmp r3, #0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1a2c: e24dd018 sub sp, sp, #24 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 1a30: 059f00c8 ldreq r0, [pc, #200] ; 1b00 rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1a34: 0a00000a beq 1a64 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1a38: e59f30c4 ldr r3, [pc, #196] ; 1b04 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1a3c: e3a05000 mov r5, #0 * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1a40: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1a44: e58d5000 str r5, [sp] 1a48: e2830008 add r0, r3, #8 1a4c: e8900003 ldm r0, {r0, r1} 1a50: e893000c ldm r3, {r2, r3} 1a54: eb0001f1 bl 2220 if ( status == -1 ) 1a58: e3700001 cmn r0, #1 1a5c: 1a000001 bne 1a68 rtems_fatal_error_occurred( 0xABCD0002 ); 1a60: e59f00a0 ldr r0, [pc, #160] ; 1b08 <== NOT EXECUTED 1a64: eb000e9a bl 54d4 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 1a68: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1a6c: e28d4004 add r4, sp, #4 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); if ( status == -1 ) rtems_fatal_error_occurred( 0xABCD0002 ); rtems_filesystem_link_counts = 0; 1a70: e1c353b0 strh r5, [r3, #48] ; 0x30 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1a74: e3a01001 mov r1, #1 1a78: e1a03004 mov r3, r4 1a7c: e1a02005 mov r2, r5 1a80: e59f0084 ldr r0, [pc, #132] ; 1b0c rtems_filesystem_root = loc; 1a84: e1a07004 mov r7, r4 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1a88: e58d5000 str r5, [sp] 1a8c: eb000051 bl 1bd8 rtems_filesystem_root = loc; 1a90: e596c000 ldr ip, [r6] 1a94: e8b7000f ldm r7!, {r0, r1, r2, r3} 1a98: e28cc018 add ip, ip, #24 1a9c: e8ac000f stmia ip!, {r0, r1, r2, r3} 1aa0: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1aa4: e3a01001 mov r1, #1 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 1aa8: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1aac: e1a02005 mov r2, r5 1ab0: e1a03004 mov r3, r4 1ab4: e59f0050 ldr r0, [pc, #80] ; 1b0c 1ab8: e58d5000 str r5, [sp] 1abc: eb000045 bl 1bd8 rtems_filesystem_current = loc; 1ac0: e596c000 ldr ip, [r6] 1ac4: e8b4000f ldm r4!, {r0, r1, r2, r3} 1ac8: e28cc004 add ip, ip, #4 1acc: e8ac000f stmia ip!, {r0, r1, r2, r3} 1ad0: e5973000 ldr r3, [r7] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 1ad4: e59f0034 ldr r0, [pc, #52] ; 1b10 /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_current = loc; 1ad8: e58c3000 str r3, [ip] * * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); 1adc: e59f1030 ldr r1, [pc, #48] ; 1b14 1ae0: eb00017c bl 20d8 if ( status != 0 ) 1ae4: e3500000 cmp r0, #0 rtems_fatal_error_occurred( 0xABCD0003 ); 1ae8: 159f0028 ldrne r0, [pc, #40] ; 1b18 * NOTE: UNIX root is 755 and owned by root/root (0/0). It is actually * created that way by the IMFS. */ status = mkdir( "/dev", 0777); if ( status != 0 ) 1aec: 1affffdc bne 1a64 * it will be mounted onto is created. Moreover, if it is going to * use a device, then it is REALLY unfair to attempt this * before device drivers are initialized. So we return via a base * filesystem image and nothing auto-mounted at this point. */ } 1af0: e28dd018 add sp, sp, #24 1af4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00007a8c : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 7a8c: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 7a90: e2508000 subs r8, r0, #0 7a94: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} 7a98: e59f4048 ldr r4, [pc, #72] ; 7ae8 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 7a9c: e284700c add r7, r4, #12 #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 7aa0: e5b43004 ldr r3, [r4, #4]! 7aa4: e5936004 ldr r6, [r3, #4] if ( !information ) 7aa8: e3560000 cmp r6, #0 7aac: 13a05001 movne r5, #1 7ab0: 1a000006 bne 7ad0 7ab4: ea000008 b 7adc continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 7ab8: e596301c ldr r3, [r6, #28] 7abc: e7930105 ldr r0, [r3, r5, lsl #2] if ( !the_thread ) 7ac0: e3500000 cmp r0, #0 continue; (*routine)(the_thread); 7ac4: 11a0e00f movne lr, pc 7ac8: 112fff18 bxne r8 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 7acc: e2855001 add r5, r5, #1 7ad0: e1d631b0 ldrh r3, [r6, #16] 7ad4: e1550003 cmp r5, r3 7ad8: 9afffff6 bls 7ab8 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 7adc: e1540007 cmp r4, r7 7ae0: 1affffee bne 7aa0 7ae4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00009364 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 9364: e2003006 and r3, r0, #6 9368: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; 936c: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 9370: 0a000005 beq 938c fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 9374: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; 9378: 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) { 937c: 1a000002 bne 938c ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 9380: e3100004 tst r0, #4 <== NOT EXECUTED 9384: 03a03000 moveq r3, #0 <== NOT EXECUTED 9388: 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 ) { 938c: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; 9390: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 9394: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; 9398: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 939c: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; 93a0: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } 93a4: e1a00003 mov r0, r3 93a8: e12fff1e bx lr =============================================================================== 0000b744 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { b744: e92d4010 push {r4, lr} Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) b748: e2514000 subs r4, r1, #0 rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { b74c: e1a03000 mov r3, r0 b750: e24dd014 sub sp, sp, #20 Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) return RTEMS_INVALID_ADDRESS; b754: 03a00009 moveq r0, #9 Objects_Locations location; Rate_monotonic_Period_time_t since_last_period; Rate_monotonic_Control *the_period; bool valid_status; if ( !status ) b758: 0a000023 beq b7ec b75c: e1a01003 mov r1, r3 b760: e28d2010 add r2, sp, #16 b764: e59f0088 ldr r0, [pc, #136] ; b7f4 b768: ebfff221 bl 7ff4 <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { b76c: e59d2010 ldr r2, [sp, #16] b770: e3520000 cmp r2, #0 b774: e1a03000 mov r3, r0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; b778: 13a00004 movne r0, #4 if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { b77c: 1a00001a bne b7ec case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; b780: e5932040 ldr r2, [r3, #64] ; 0x40 status->state = the_period->state; b784: e5933038 ldr r3, [r3, #56] ; 0x38 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; b788: e5922008 ldr r2, [r2, #8] status->state = the_period->state; /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { b78c: e3530000 cmp r3, #0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; b790: e884000c stm r4, {r2, r3} /* * If the period is inactive, there is no information. */ if ( status->state == RATE_MONOTONIC_INACTIVE ) { #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timespec_Set_to_zero( &status->since_last_period ); b794: 05843008 streq r3, [r4, #8] b798: 0584300c streq r3, [r4, #12] _Timespec_Set_to_zero( &status->executed_since_last_period ); b79c: 05843010 streq r3, [r4, #16] b7a0: 05843014 streq r3, [r4, #20] b7a4: 0a00000e beq b7e4 } else { /* * Grab the current status. */ valid_status = b7a8: e1a0100d mov r1, sp b7ac: e28d2008 add r2, sp, #8 b7b0: ebffe957 bl 5d14 <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { b7b4: e3500000 cmp r0, #0 b7b8: 1a000002 bne b7c8 _Thread_Enable_dispatch(); b7bc: ebfff42a bl 886c <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_NOT_DEFINED; b7c0: e3a0000b mov r0, #11 <== NOT EXECUTED b7c4: ea000008 b b7ec <== NOT EXECUTED } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( b7c8: e89d000c ldm sp, {r2, r3} b7cc: e5842008 str r2, [r4, #8] b7d0: e584300c str r3, [r4, #12] &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( b7d4: e28d3008 add r3, sp, #8 b7d8: e893000c ldm r3, {r2, r3} b7dc: e5842010 str r2, [r4, #16] b7e0: e5843014 str r3, [r4, #20] status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); b7e4: ebfff420 bl 886c <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; b7e8: e3a00000 mov r0, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } b7ec: e28dd014 add sp, sp, #20 b7f0: e8bd8010 pop {r4, pc} =============================================================================== 000014c0 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 14c0: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 14c4: e59f3078 ldr r3, [pc, #120] ; 1544 14c8: e5933004 ldr r3, [r3, #4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 14cc: e59300c4 ldr r0, [r3, #196] ; 0xc4 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 14d0: e28db008 add fp, sp, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 14d4: e15b0000 cmp fp, r0 return false; 14d8: 33a04000 movcc r4, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 14dc: 3a000004 bcc 14f4 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 14e0: e59340c0 ldr r4, [r3, #192] ; 0xc0 14e4: e0804004 add r4, r0, r4 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 14e8: e15b0004 cmp fp, r4 14ec: 83a04000 movhi r4, #0 14f0: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 14f4: e59f304c ldr r3, [pc, #76] ; 1548 14f8: e5933008 ldr r3, [r3, #8] 14fc: 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; 1500: 03a01001 moveq r1, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 1504: 0a000005 beq 1520 pattern_ok = (!memcmp( 1508: e59f103c ldr r1, [pc, #60] ; 154c 150c: e2800008 add r0, r0, #8 1510: e3a02010 mov r2, #16 1514: eb002bd1 bl c460 1518: e2701001 rsbs r1, r0, #1 151c: 33a01000 movcc r1, #0 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 1520: e3540000 cmp r4, #0 1524: 0a000001 beq 1530 1528: e3510000 cmp r1, #0 152c: 1a000002 bne 153c Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 1530: e59f300c ldr r3, [pc, #12] ; 1544 <== NOT EXECUTED 1534: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 1538: ebffff9d bl 13b4 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 153c: e3a00000 mov r0, #0 1540: e8bd8810 pop {r4, fp, pc} =============================================================================== 00001550 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 1550: e92d4070 push {r4, r5, r6, lr} if ( !print ) 1554: e2515000 subs r5, r1, #0 void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 1558: e1a06000 mov r6, r0 if ( !print ) 155c: 08bd8070 popeq {r4, r5, r6, pc} return; print_context = context; 1560: e59f4038 ldr r4, [pc, #56] ; 15a0 print_handler = print; (*print)( context, "Stack usage by thread\n"); 1564: e59f1038 ldr r1, [pc, #56] ; 15a4 ) { if ( !print ) return; print_context = context; 1568: e5840004 str r0, [r4, #4] print_handler = print; 156c: e5845000 str r5, [r4] (*print)( context, "Stack usage by thread\n"); 1570: e1a0e00f mov lr, pc 1574: e12fff15 bx r5 (*print)( context, 1578: e59f1028 ldr r1, [pc, #40] ; 15a8 157c: e1a00006 mov r0, r6 1580: e1a0e00f mov lr, pc 1584: e12fff15 bx r5 " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 1588: e59f001c ldr r0, [pc, #28] ; 15ac 158c: eb0012f6 bl 616c #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); #endif print_context = NULL; 1590: e3a03000 mov r3, #0 <== NOT EXECUTED 1594: e5843004 str r3, [r4, #4] <== NOT EXECUTED print_handler = NULL; 1598: e5843000 str r3, [r4] <== NOT EXECUTED 159c: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0000145c : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 145c: e92d4830 push {r4, r5, fp, lr} Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 1460: e59030c4 ldr r3, [r0, #196] ; 0xc4 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 1464: e28db00c add fp, sp, #12 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1468: e15b0003 cmp fp, r3 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 146c: e1a04000 mov r4, r0 { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 1470: 33a05000 movcc r5, #0 Stack_Control *the_stack = &running->Start.Initial_stack; void *pattern; bool sp_ok; bool pattern_ok = true; pattern = (void *) Stack_check_Get_pattern_area(the_stack)->pattern; 1474: e2830008 add r0, r3, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 1478: 3a000004 bcc 1490 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 147c: e59450c0 ldr r5, [r4, #192] ; 0xc0 1480: e0835005 add r5, r3, r5 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 1484: e15b0005 cmp fp, r5 1488: 83a05000 movhi r5, #0 148c: 93a05001 movls r5, #1 /* * Check for an out of bounds stack pointer or an overwrite */ sp_ok = Stack_check_Frame_pointer_in_range( the_stack ); pattern_ok = (!memcmp( pattern, 1490: e59f1024 ldr r1, [pc, #36] ; 14bc 1494: e3a02010 mov r2, #16 1498: eb002bf0 bl c460 149c: e2701001 rsbs r1, r0, #1 14a0: 33a01000 movcc r1, #0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 14a4: e3550000 cmp r5, #0 14a8: 0a000001 beq 14b4 14ac: e3510000 cmp r1, #0 14b0: 18bd8830 popne {r4, r5, fp, pc} Stack_check_report_blown_task( running, pattern_ok ); 14b4: e1a00004 mov r0, r4 <== NOT EXECUTED 14b8: ebffffbd bl 13b4 <== NOT EXECUTED =============================================================================== 0000afbc : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { afbc: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) afc0: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { afc4: e1a05000 mov r5, r0 afc8: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; afcc: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) afd0: 0a000018 beq b038 return RTEMS_INVALID_ADDRESS; errno = 0; afd4: eb000792 bl ce24 <__errno> afd8: e3a03000 mov r3, #0 afdc: e5803000 str r3, [r0] *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); afe0: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; afe4: e5843000 str r3, [r4] #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); afe8: e1a00005 mov r0, r5 afec: e3a02010 mov r2, #16 aff0: eb0014ba bl 102e0 #elif defined(STRING_TO_INTEGER) result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) aff4: e3560000 cmp r6, #0 *endptr = end; aff8: 159d3000 ldrne r3, [sp] affc: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) b000: e59d3000 ldr r3, [sp] b004: e1530005 cmp r3, r5 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); b008: e1a07000 mov r7, r0 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; b00c: 03a0000b moveq r0, #11 /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) b010: 0a000008 beq b038 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) b014: e3770001 cmn r7, #1 b018: 1a000004 bne b030 b01c: eb000780 bl ce24 <__errno> <== NOT EXECUTED b020: e5903000 ldr r3, [r0] <== NOT EXECUTED b024: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; b028: 03a0000a moveq r0, #10 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) b02c: 0a000001 beq b038 <== NOT EXECUTED if ( (result == STRING_TO_MIN) && (errno == ERANGE)) return RTEMS_INVALID_NUMBER; #endif #if defined(STRING_TO_POINTER) *n = (STRING_TO_TYPE) (uintptr_t)result; b030: e5847000 str r7, [r4] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; b034: e3a00000 mov r0, #0 } b038: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 00001884 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 1884: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1888: e24ddf6b sub sp, sp, #428 ; 0x1ac 188c: e58d1010 str r1, [sp, #16] 1890: e58d2018 str r2, [sp, #24] 1894: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 1898: eb003a33 bl 1016c 189c: e3a02000 mov r2, #0 18a0: e1a01000 mov r1, r0 18a4: e28d3f65 add r3, sp, #404 ; 0x194 18a8: e59d000c ldr r0, [sp, #12] 18ac: e58d2000 str r2, [sp] 18b0: eb00029b bl 2324 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 18b4: e2504000 subs r4, r0, #0 18b8: 1a00006c bne 1a70 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 18bc: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 18c0: e59f21c0 ldr r2, [pc, #448] ; 1a88 18c4: e1530002 cmp r3, r2 18c8: 0a000005 beq 18e4 18cc: e59f21b8 ldr r2, [pc, #440] ; 1a8c 18d0: e1530002 cmp r3, r2 18d4: 1a000065 bne 1a70 18d8: ea000001 b 18e4 <== NOT EXECUTED 18dc: e1a08004 mov r8, r4 18e0: ea000006 b 1900 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 18e4: e28d2f65 add r2, sp, #404 ; 0x194 18e8: e58d2004 str r2, [sp, #4] 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 18ec: 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); 18f0: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 18f4: 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); 18f8: e28d501c add r5, sp, #28 18fc: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 1900: e59d3018 ldr r3, [sp, #24] 1904: e2884c02 add r4, r8, #512 ; 0x200 1908: e1540003 cmp r4, r3 190c: 8a000059 bhi 1a78 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 1910: e59de010 ldr lr, [sp, #16] 1914: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 1918: e2880c01 add r0, r8, #256 ; 0x100 191c: e2800001 add r0, r0, #1 1920: e59f1168 ldr r1, [pc, #360] ; 1a90 1924: e3a02005 mov r2, #5 1928: eb003a27 bl 101cc 192c: e2506000 subs r6, r0, #0 1930: 1a000050 bne 1a78 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 1934: e3a02063 mov r2, #99 ; 0x63 1938: e1a01008 mov r1, r8 193c: e1a00007 mov r0, r7 1940: eb003a7d bl 1033c filename[MAX_NAME_FIELD_SIZE] = '\0'; 1944: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1948: e3a01008 mov r1, #8 194c: 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]; 1950: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1954: eb001d1a bl 8dc4 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1958: 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); 195c: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1960: e288007c add r0, r8, #124 ; 0x7c 1964: eb001d16 bl 8dc4 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1968: 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); 196c: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1970: e2880094 add r0, r8, #148 ; 0x94 1974: eb001d12 bl 8dc4 <_rtems_octal2ulong> 1978: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 197c: e1a00008 mov r0, r8 1980: e58d3008 str r3, [sp, #8] 1984: eb001d1c bl 8dfc <_rtems_tar_header_checksum> 1988: e59d3008 ldr r3, [sp, #8] 198c: e1500003 cmp r0, r3 1990: 1a000038 bne 1a78 * 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) { 1994: e3560035 cmp r6, #53 ; 0x35 1998: 1a000012 bne 19e8 strcpy(full_filename, mountpoint); 199c: e59d100c ldr r1, [sp, #12] 19a0: e1a00005 mov r0, r5 19a4: eb00382c bl fa5c if (full_filename[strlen(full_filename)-1] != '/') 19a8: e1a00005 mov r0, r5 19ac: eb0039ee bl 1016c 19b0: e28d2f6b add r2, sp, #428 ; 0x1ac 19b4: e0820000 add r0, r2, r0 19b8: e5503191 ldrb r3, [r0, #-401] ; 0x191 19bc: e353002f cmp r3, #47 ; 0x2f strcat(full_filename, "/"); 19c0: 11a00005 movne r0, r5 19c4: 159f10c8 ldrne r1, [pc, #200] ; 1a94 19c8: 1b00376c blne f780 strcat(full_filename, filename); 19cc: e1a01007 mov r1, r7 19d0: e1a00005 mov r0, r5 19d4: eb003769 bl f780 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 19d8: e1a00005 mov r0, r5 19dc: e59f10b4 ldr r1, [pc, #180] ; 1a98 19e0: eb000464 bl 2b78 19e4: eaffffbc b 18dc * 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) { 19e8: e3560030 cmp r6, #48 ; 0x30 19ec: 1affffba bne 18dc const char *name; loc = root_loc; 19f0: e59dc004 ldr ip, [sp, #4] 19f4: e8bc000f ldm ip!, {r0, r1, r2, r3} 19f8: e1a0e009 mov lr, r9 19fc: e8ae000f stmia lr!, {r0, r1, r2, r3} 1a00: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 1a04: e1a00007 mov r0, r7 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 1a08: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 1a0c: e1a01009 mov r1, r9 1a10: e28d2f6a add r2, sp, #424 ; 0x1a8 1a14: eb001fc3 bl 9928 1a18: e2506000 subs r6, r0, #0 1a1c: 1a00000d bne 1a58 node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 1a20: e59d2014 ldr r2, [sp, #20] 1a24: e1a03b82 lsl r3, r2, #23 1a28: 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( 1a2c: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 1a30: e3833902 orr r3, r3, #32768 ; 0x8000 1a34: e1a00009 mov r0, r9 1a38: e3a01006 mov r1, #6 1a3c: e58d6000 str r6, [sp] 1a40: eb001e36 bl 9320 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]; 1a44: e59d2010 ldr r2, [sp, #16] 1a48: 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; 1a4c: e580b050 str fp, [r0, #80] ; 0x50 1a50: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; 1a54: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; 1a58: e28bbf7f add fp, fp, #508 ; 0x1fc 1a5c: e28bb003 add fp, fp, #3 offset += 512 * nblocks; 1a60: e3cbbf7f bic fp, fp, #508 ; 0x1fc 1a64: e3cbb003 bic fp, fp, #3 1a68: e08b4004 add r4, fp, r4 1a6c: eaffff9a b 18dc ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 1a70: e3e04000 mvn r4, #0 1a74: ea000000 b 1a7c 1a78: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 1a7c: e1a00004 mov r0, r4 1a80: e28ddf6b add sp, sp, #428 ; 0x1ac 1a84: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000b700 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { b700: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) b704: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { b708: e1a04000 mov r4, r0 b70c: e1a05001 mov r5, r1 bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; b710: 03a00009 moveq r0, #9 ASR_Information *asr; bool is_asr_enabled = false; bool needs_asr_dispatching = false; rtems_mode old_mode; if ( !previous_mode_set ) b714: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; b718: e59f313c ldr r3, [pc, #316] ; b85c b71c: e5937004 ldr r7, [r3, #4] api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; b720: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; b724: e5976100 ldr r6, [r7, #256] ; 0x100 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) b728: e597307c ldr r3, [r7, #124] ; 0x7c executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; b72c: e3580000 cmp r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; b730: e5d69008 ldrb r9, [r6, #8] executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; b734: 03a08c01 moveq r8, #256 ; 0x100 b738: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) b73c: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; b740: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; b744: e3590000 cmp r9, #0 b748: 03a09b01 moveq r9, #1024 ; 0x400 b74c: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); b750: ebfff333 bl 8424 <_CPU_ISR_Get_level> if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; b754: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); b758: e1898008 orr r8, r9, r8 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) b75c: e3150c01 tst r5, #256 ; 0x100 old_mode |= RTEMS_TIMESLICE; old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; old_mode |= _ISR_Get_level(); *previous_mode_set = old_mode; b760: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) b764: 0a000003 beq b778 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; b768: e3140c01 tst r4, #256 ; 0x100 b76c: 13a03000 movne r3, #0 b770: 03a03001 moveq r3, #1 b774: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { b778: e3150c02 tst r5, #512 ; 0x200 b77c: 0a000006 beq b79c if ( _Modes_Is_timeslice(mode_set) ) { b780: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; b784: 13a03001 movne r3, #1 b788: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; b78c: 159f30cc ldrne r3, [pc, #204] ; b860 b790: 15933000 ldrne r3, [r3] } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; b794: 0587307c streq r3, [r7, #124] ; 0x7c executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; if ( mask & RTEMS_TIMESLICE_MASK ) { if ( _Modes_Is_timeslice(mode_set) ) { executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; executing->cpu_time_budget = _Thread_Ticks_per_timeslice; b798: 15873078 strne r3, [r7, #120] ; 0x78 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) b79c: e3150080 tst r5, #128 ; 0x80 b7a0: 0a000001 beq b7ac */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); b7a4: e2040080 and r0, r4, #128 ; 0x80 b7a8: ebfff318 bl 8410 <_CPU_ISR_Set_level> * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { b7ac: e2150b01 ands r0, r5, #1024 ; 0x400 b7b0: 0a000013 beq b804 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( b7b4: e3140b01 tst r4, #1024 ; 0x400 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { b7b8: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( b7bc: 13a03000 movne r3, #0 b7c0: 03a03001 moveq r3, #1 is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { b7c4: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; b7c8: 03a00000 moveq r0, #0 if ( mask & RTEMS_ASR_MASK ) { is_asr_enabled = _Modes_Is_asr_disabled( mode_set ) ? false : true; if ( is_asr_enabled != asr->is_enabled ) { b7cc: 0a00000c beq b804 asr->is_enabled = is_asr_enabled; b7d0: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( b7d4: e10f3000 mrs r3, CPSR b7d8: e3832080 orr r2, r3, #128 ; 0x80 b7dc: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; b7e0: e2861014 add r1, r6, #20 b7e4: e8910006 ldm r1, {r1, r2} information->signals_pending = information->signals_posted; information->signals_posted = _signals; b7e8: e5862014 str r2, [r6, #20] rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; information->signals_pending = information->signals_posted; b7ec: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( b7f0: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { b7f4: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; b7f8: e3500000 cmp r0, #0 b7fc: 13a00001 movne r0, #1 b800: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { b804: e59f3058 ldr r3, [pc, #88] ; b864 b808: e5933000 ldr r3, [r3] b80c: e3530003 cmp r3, #3 b810: 1a00000f bne b854 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; b814: e59f2040 ldr r2, [pc, #64] ; b85c if ( are_signals_pending || b818: e3500000 cmp r0, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; b81c: e5923004 ldr r3, [r2, #4] if ( are_signals_pending || b820: 1a000005 bne b83c b824: e5922008 ldr r2, [r2, #8] b828: e1530002 cmp r3, r2 b82c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { b830: e5d33074 ldrb r3, [r3, #116] ; 0x74 b834: e3530000 cmp r3, #0 b838: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch_necessary = true; b83c: e59f3018 ldr r3, [pc, #24] ; b85c b840: e3a02001 mov r2, #1 b844: e5c32010 strb r2, [r3, #16] if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); b848: ebffed16 bl 6ca8 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; b84c: e3a00000 mov r0, #0 b850: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} b854: e3a00000 mov r0, #0 <== NOT EXECUTED } b858: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 00002fc0 : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2fc0: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { 2fc4: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 2fc8: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( 2fcc: e59f317c ldr r3, [pc, #380] ; 3150 2fd0: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 2fd4: 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( 2fd8: e1a02001 mov r2, r1 2fdc: e5930000 ldr r0, [r3] 2fe0: eb0007a5 bl 4e7c rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2fe4: e3500000 cmp r0, #0 2fe8: 1a000024 bne 3080 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 2fec: e5943008 ldr r3, [r4, #8] 2ff0: e2433001 sub r3, r3, #1 2ff4: e3530000 cmp r3, #0 2ff8: e5843008 str r3, [r4, #8] 2ffc: 1a00004e bne 313c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3000: e59420cc ldr r2, [r4, #204] ; 0xcc 3004: e59f3148 ldr r3, [pc, #328] ; 3154 3008: e0833282 add r3, r3, r2, lsl #5 300c: e5931004 ldr r1, [r3, #4] 3010: e3510000 cmp r1, #0 3014: 0a000003 beq 3028 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3018: e1a00004 mov r0, r4 301c: e1a0e00f mov lr, pc 3020: e12fff11 bx r1 3024: ea000008 b 304c } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3028: e5940018 ldr r0, [r4, #24] 302c: e1a02001 mov r2, r1 3030: eb000791 bl 4e7c if (sc != RTEMS_SUCCESSFUL) { 3034: e3500000 cmp r0, #0 3038: 1a000010 bne 3080 rtems_fatal_error_occurred (sc); } drainOutput (tty); 303c: e1a00004 mov r0, r4 3040: ebfffeb2 bl 2b10 rtems_semaphore_release (tty->osem); 3044: e5940018 ldr r0, [r4, #24] 3048: eb0007d1 bl 4f94 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 304c: e59430b4 ldr r3, [r4, #180] ; 0xb4 3050: e3530002 cmp r3, #2 3054: 1a00000a bne 3084 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 3058: e59400c4 ldr r0, [r4, #196] ; 0xc4 305c: e3a01001 mov r1, #1 3060: eb000673 bl 4a34 if (sc != RTEMS_SUCCESSFUL) 3064: e3500000 cmp r0, #0 3068: 1a000004 bne 3080 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 306c: e59400c8 ldr r0, [r4, #200] ; 0xc8 3070: e3a01001 mov r1, #1 3074: eb00066e bl 4a34 if (sc != RTEMS_SUCCESSFUL) 3078: e3500000 cmp r0, #0 307c: 0a000000 beq 3084 rtems_fatal_error_occurred (sc); 3080: eb000913 bl 54d4 <== NOT EXECUTED } if (tty->device.lastClose) 3084: e594309c ldr r3, [r4, #156] ; 0x9c 3088: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 308c: 1284000c addne r0, r4, #12 3090: 18900003 ldmne r0, {r0, r1} 3094: 11a02005 movne r2, r5 3098: 11a0e00f movne lr, pc 309c: 112fff13 bxne r3 if (tty->forw == NULL) { 30a0: e894000c ldm r4, {r2, r3} 30a4: 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; 30a8: 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) { 30ac: 1a000003 bne 30c0 rtems_termios_ttyTail = tty->back; 30b0: e59f10a0 ldr r1, [pc, #160] ; 3158 if ( rtems_termios_ttyTail != NULL ) { 30b4: 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; 30b8: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 30bc: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 30c0: e5942004 ldr r2, [r4, #4] 30c4: e5943000 ldr r3, [r4] 30c8: 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; 30cc: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 30d0: 1a000003 bne 30e4 rtems_termios_ttyHead = tty->forw; 30d4: e59f1080 ldr r1, [pc, #128] ; 315c if ( rtems_termios_ttyHead != NULL ) { 30d8: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 30dc: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 30e0: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 30e4: e5940014 ldr r0, [r4, #20] 30e8: eb00073c bl 4de0 rtems_semaphore_delete (tty->osem); 30ec: e5940018 ldr r0, [r4, #24] 30f0: eb00073a bl 4de0 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 30f4: e594008c ldr r0, [r4, #140] ; 0x8c 30f8: eb000738 bl 4de0 if ((tty->device.pollRead == NULL) || 30fc: e59430a0 ldr r3, [r4, #160] ; 0xa0 3100: e3530000 cmp r3, #0 3104: 0a000002 beq 3114 3108: e59430b4 ldr r3, [r4, #180] ; 0xb4 310c: e3530002 cmp r3, #2 3110: 1a000001 bne 311c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3114: e5940068 ldr r0, [r4, #104] ; 0x68 3118: eb000730 bl 4de0 free (tty->rawInBuf.theBuf); 311c: e5940058 ldr r0, [r4, #88] ; 0x58 3120: ebfffae1 bl 1cac free (tty->rawOutBuf.theBuf); 3124: e594007c ldr r0, [r4, #124] ; 0x7c 3128: ebfffadf bl 1cac free (tty->cbuf); 312c: e594001c ldr r0, [r4, #28] 3130: ebfffadd bl 1cac free (tty); 3134: e1a00004 mov r0, r4 3138: ebfffadb bl 1cac } rtems_semaphore_release (rtems_termios_ttyMutex); 313c: e59f300c ldr r3, [pc, #12] ; 3150 3140: e5930000 ldr r0, [r3] 3144: eb000792 bl 4f94 return RTEMS_SUCCESSFUL; } 3148: e3a00000 mov r0, #0 314c: e8bd8030 pop {r4, r5, pc} =============================================================================== 000044dc : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44dc: e5902090 ldr r2, [r0, #144] ; 0x90 44e0: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44e4: e59010b4 ldr r1, [r0, #180] ; 0xb4 44e8: 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) { 44ec: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 44f0: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 44f4: 1a000004 bne 450c /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 44f8: e59000c8 ldr r0, [r0, #200] ; 0xc8 44fc: eb00014c bl 4a34 if (sc != RTEMS_SUCCESSFUL) 4500: e2503000 subs r3, r0, #0 4504: 0a00000d beq 4540 rtems_fatal_error_occurred (sc); 4508: eb0003f1 bl 54d4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 450c: e59030cc ldr r3, [r0, #204] ; 0xcc 4510: e3530005 cmp r3, #5 4514: 1a000007 bne 4538 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4518: e59f3028 ldr r3, [pc, #40] ; 4548 451c: e59330b4 ldr r3, [r3, #180] ; 0xb4 4520: e3530000 cmp r3, #0 4524: 0a000005 beq 4540 rtems_termios_linesw[tty->t_line].l_start(tty); 4528: e1a0e00f mov lr, pc 452c: e12fff13 bx r3 } return 0; /* nothing to output in IRQ... */ 4530: e3a03000 mov r3, #0 4534: ea000001 b 4540 } return rtems_termios_refill_transmitter(tty); } 4538: 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); 453c: eaffff5a b 42ac } 4540: e1a00003 mov r0, r3 4544: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00003fa8 : * 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) { 3fa8: 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) { 3fac: e59030cc ldr r3, [r0, #204] ; 0xcc 3fb0: e59f7288 ldr r7, [pc, #648] ; 4240 3fb4: e0873283 add r3, r7, r3, lsl #5 3fb8: e5939010 ldr r9, [r3, #16] 3fbc: 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) { 3fc0: e1a04000 mov r4, r0 3fc4: 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) { 3fc8: 11a05002 movne r5, r2 3fcc: 1a00000d bne 4008 /* * 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); 3fd0: e2803030 add r3, r0, #48 ; 0x30 3fd4: 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, 3fd8: 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) { 3fdc: e1a08002 mov r8, r2 3fe0: 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, 3fe4: e58d3004 str r3, [sp, #4] 3fe8: ea00008b b 421c 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); 3fec: e59430cc ldr r3, [r4, #204] ; 0xcc 3ff0: e4d60001 ldrb r0, [r6], #1 3ff4: e0873283 add r3, r7, r3, lsl #5 3ff8: e1a01004 mov r1, r4 3ffc: e1a0e00f mov lr, pc 4000: e593f010 ldr pc, [r3, #16] 4004: 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--) { 4008: e3550000 cmp r5, #0 400c: 1afffff6 bne 3fec } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4010: e59430e4 ldr r3, [r4, #228] ; 0xe4 4014: e3530000 cmp r3, #0 4018: 1a000086 bne 4238 401c: e59430dc ldr r3, [r4, #220] ; 0xdc 4020: e3530000 cmp r3, #0 4024: 0a000083 beq 4238 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4028: e2840030 add r0, r4, #48 ; 0x30 402c: e59410e0 ldr r1, [r4, #224] ; 0xe0 4030: e1a0e00f mov lr, pc 4034: e12fff13 bx r3 tty->tty_rcvwakeup = 1; 4038: e3a03001 mov r3, #1 403c: e58430e4 str r3, [r4, #228] ; 0xe4 4040: ea00007c b 4238 while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 4044: e59430b8 ldr r3, [r4, #184] ; 0xb8 4048: e3130c02 tst r3, #512 ; 0x200 } return 0; } while (len--) { c = *buf++; 404c: 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) { 4050: 0a00000f beq 4094 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 4054: e5d4204a ldrb r2, [r4, #74] ; 0x4a 4058: e152000a cmp r2, sl 405c: e5d43049 ldrb r3, [r4, #73] ; 0x49 4060: 1a000007 bne 4084 if (c == tty->termios.c_cc[VSTART]) { 4064: e1530002 cmp r3, r2 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 4068: 059430b8 ldreq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 406c: 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; 4070: 02233010 eoreq r3, r3, #16 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 4074: 13833010 orrne r3, r3, #16 4078: 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) { 407c: e3a09001 mov r9, #1 4080: ea000005 b 409c /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4084: e153000a cmp r3, sl /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4088: 059430b8 ldreq r3, [r4, #184] ; 0xb8 408c: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4090: 0afffff8 beq 4078 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 4094: e3590000 cmp r9, #0 4098: 0a000014 beq 40f0 /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 409c: e59430b8 ldr r3, [r4, #184] ; 0xb8 40a0: e2033030 and r3, r3, #48 ; 0x30 40a4: e3530020 cmp r3, #32 40a8: 1a00005a bne 4218 /* disable interrupts */ rtems_interrupt_disable(level); 40ac: ebfffa93 bl 2b00 <== NOT EXECUTED 40b0: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 40b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 40b8: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 40bc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 40c0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 40c4: e3530000 cmp r3, #0 <== NOT EXECUTED 40c8: 0a000006 beq 40e8 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 40cc: 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)( 40d0: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 40d4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 40d8: e0811003 add r1, r1, r3 <== NOT EXECUTED 40dc: e3a02001 mov r2, #1 <== NOT EXECUTED 40e0: e1a0e00f mov lr, pc <== NOT EXECUTED 40e4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 40e8: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 40ec: ea000049 b 4218 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 40f0: e5940060 ldr r0, [r4, #96] ; 0x60 40f4: e5941064 ldr r1, [r4, #100] ; 0x64 40f8: e2800001 add r0, r0, #1 40fc: eb002cc8 bl f424 <__umodsi3> 4100: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 4104: ebfffa7d bl 2b00 4108: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 410c: e594305c ldr r3, [r4, #92] ; 0x5c 4110: e5940064 ldr r0, [r4, #100] ; 0x64 4114: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && 4118: e5941064 ldr r1, [r4, #100] ; 0x64 411c: e0800007 add r0, r0, r7 4120: eb002cbf bl f424 <__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) 4124: e59430c0 ldr r3, [r4, #192] ; 0xc0 4128: e1500003 cmp r0, r3 412c: 9a000025 bls 41c8 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 4130: 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) && 4134: e3130001 tst r3, #1 <== NOT EXECUTED 4138: 1a000022 bne 41c8 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 413c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4140: e3833001 orr r3, r3, #1 <== NOT EXECUTED 4144: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 4148: e59f30f4 ldr r3, [pc, #244] ; 4244 <== NOT EXECUTED 414c: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 4150: e0023003 and r3, r2, r3 <== NOT EXECUTED 4154: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 4158: 1a00000e bne 4198 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 415c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4160: e3130020 tst r3, #32 <== NOT EXECUTED 4164: 1a000002 bne 4174 <== NOT EXECUTED 4168: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 416c: e3530000 cmp r3, #0 <== NOT EXECUTED 4170: 1a000014 bne 41c8 <== 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; 4174: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4178: e3833002 orr r3, r3, #2 <== NOT EXECUTED 417c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 4180: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4184: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 4188: e3a02001 mov r2, #1 <== NOT EXECUTED 418c: e1a0e00f mov lr, pc <== NOT EXECUTED 4190: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 4194: ea00000b b 41c8 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 4198: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 419c: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 41a0: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 41a4: 1a000007 bne 41c8 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 41a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 41ac: e3833004 orr r3, r3, #4 <== NOT EXECUTED 41b0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 41b4: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 41b8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 41bc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 41c0: 11a0e00f movne lr, pc <== NOT EXECUTED 41c4: 112fff13 bxne r3 <== NOT EXECUTED 41c8: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 41cc: e594305c ldr r3, [r4, #92] ; 0x5c 41d0: e1570003 cmp r7, r3 dropped++; 41d4: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 41d8: 0a00000e beq 4218 dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 41dc: e5943058 ldr r3, [r4, #88] ; 0x58 41e0: 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 )) { 41e4: e59430e4 ldr r3, [r4, #228] ; 0xe4 41e8: e3530000 cmp r3, #0 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 41ec: 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 )) { 41f0: 1a000008 bne 4218 41f4: e59430dc ldr r3, [r4, #220] ; 0xdc 41f8: e3530000 cmp r3, #0 41fc: 0a000005 beq 4218 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4200: e59d0000 ldr r0, [sp] <== NOT EXECUTED 4204: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 4208: e1a0e00f mov lr, pc <== NOT EXECUTED 420c: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4210: e3a03001 mov r3, #1 <== NOT EXECUTED 4214: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 4218: e2488001 sub r8, r8, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 421c: e3580000 cmp r8, #0 4220: 1affff87 bne 4044 } } } } tty->rawInBufDropped += dropped; 4224: e5943078 ldr r3, [r4, #120] ; 0x78 4228: e0833005 add r3, r3, r5 422c: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 4230: e5940068 ldr r0, [r4, #104] ; 0x68 4234: eb000356 bl 4f94 return dropped; } 4238: e1a00005 mov r0, r5 423c: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00003178 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3178: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 317c: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3180: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 3184: 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; 3188: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; 318c: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { 3190: 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); 3194: e1a02001 mov r2, r1 3198: e5940018 ldr r0, [r4, #24] 319c: eb000736 bl 4e7c if (sc != RTEMS_SUCCESSFUL) { 31a0: e2506000 subs r6, r0, #0 31a4: 1a0000d4 bne 34fc args->ioctl_return = sc; return sc; } switch (args->command) { 31a8: e5953004 ldr r3, [r5, #4] 31ac: e3530004 cmp r3, #4 31b0: 0a0000a8 beq 3458 31b4: 8a000005 bhi 31d0 31b8: e3530002 cmp r3, #2 31bc: 0a000029 beq 3268 31c0: 8a00009d bhi 343c 31c4: e3530001 cmp r3, #1 31c8: 1a000010 bne 3210 31cc: ea00001b b 3240 31d0: e59f2330 ldr r2, [pc, #816] ; 3508 31d4: e1530002 cmp r3, r2 31d8: 0a0000ba beq 34c8 31dc: 8a000002 bhi 31ec 31e0: e3530005 cmp r3, #5 31e4: 1a000009 bne 3210 31e8: ea000096 b 3448 31ec: e59f2318 ldr r2, [pc, #792] ; 350c 31f0: 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; 31f4: 05953008 ldreq r3, [r5, #8] 31f8: 059420cc ldreq r2, [r4, #204] ; 0xcc 31fc: 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) { 3200: 0a0000bb beq 34f4 3204: e2822105 add r2, r2, #1073741825 ; 0x40000001 3208: e1530002 cmp r3, r2 320c: 0a000095 beq 3468 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3210: e59420cc ldr r2, [r4, #204] ; 0xcc 3214: e59f32f4 ldr r3, [pc, #756] ; 3510 3218: e0833282 add r3, r3, r2, lsl #5 321c: e5933018 ldr r3, [r3, #24] 3220: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 3224: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3228: 0a0000b1 beq 34f4 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 322c: e1a00004 mov r0, r4 3230: e1a01005 mov r1, r5 3234: e1a0e00f mov lr, pc 3238: e12fff13 bx r3 323c: ea00009f b 34c0 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3240: e5957008 ldr r7, [r5, #8] 3244: e284c030 add ip, r4, #48 ; 0x30 3248: e8bc000f ldm ip!, {r0, r1, r2, r3} 324c: e1a0e007 mov lr, r7 3250: e8ae000f stmia lr!, {r0, r1, r2, r3} 3254: e8bc000f ldm ip!, {r0, r1, r2, r3} 3258: e8ae000f stmia lr!, {r0, r1, r2, r3} 325c: e59c3000 ldr r3, [ip] 3260: e58e3000 str r3, [lr] break; 3264: ea0000a2 b 34f4 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 3268: e595e008 ldr lr, [r5, #8] 326c: e8be000f ldm lr!, {r0, r1, r2, r3} 3270: e284c030 add ip, r4, #48 ; 0x30 3274: e8ac000f stmia ip!, {r0, r1, r2, r3} 3278: e8be000f ldm lr!, {r0, r1, r2, r3} 327c: e8ac000f stmia ip!, {r0, r1, r2, r3} 3280: e59e3000 ldr r3, [lr] 3284: 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) && 3288: e59430b8 ldr r3, [r4, #184] ; 0xb8 328c: e3130c02 tst r3, #512 ; 0x200 3290: 0a000018 beq 32f8 !(tty->termios.c_iflag & IXON)) { 3294: 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) && 3298: e3130b01 tst r3, #1024 ; 0x400 329c: 1a000015 bne 32f8 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 32a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 32a4: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 32a8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 32ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 32b0: e3130020 tst r3, #32 <== NOT EXECUTED 32b4: 0a00000f beq 32f8 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 32b8: ebfffe10 bl 2b00 <== NOT EXECUTED 32bc: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 32c0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 32c4: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 32c8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 32cc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 32d0: e3530000 cmp r3, #0 <== NOT EXECUTED 32d4: 0a000006 beq 32f4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 32d8: 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)( 32dc: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 32e0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 32e4: e0811003 add r1, r1, r3 <== NOT EXECUTED 32e8: e3a02001 mov r2, #1 <== NOT EXECUTED 32ec: e1a0e00f mov lr, pc <== NOT EXECUTED 32f0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 32f4: 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)) { 32f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 32fc: e3130b01 tst r3, #1024 ; 0x400 3300: 0a000008 beq 3328 3304: e5943030 ldr r3, [r4, #48] ; 0x30 3308: e3130a01 tst r3, #4096 ; 0x1000 330c: 1a000005 bne 3328 /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3310: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3314: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3318: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* FIXME: what happens, if we had sent XOFF but not yet XON? */ tty->flow_ctrl &= ~(FL_ISNTXOF); 331c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3320: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 3324: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } /* check for incoming RTS/CTS flow control switched off */ if (( tty->flow_ctrl & FL_MDRTS) && !(tty->termios.c_cflag & CRTSCTS)) { 3328: e59430b8 ldr r3, [r4, #184] ; 0xb8 332c: e3130c01 tst r3, #256 ; 0x100 3330: 0a000010 beq 3378 3334: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 3338: e3530000 cmp r3, #0 <== NOT EXECUTED 333c: ba00000d blt 3378 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 3340: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3344: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 3348: 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)) { 334c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3350: e3130004 tst r3, #4 <== NOT EXECUTED 3354: 0a000004 beq 336c <== NOT EXECUTED 3358: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 335c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3360: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3364: 11a0e00f movne lr, pc <== NOT EXECUTED 3368: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 336c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3370: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3374: 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) { 3378: e5943038 ldr r3, [r4, #56] ; 0x38 337c: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 3380: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 3384: b3833c01 orrlt r3, r3, #256 ; 0x100 3388: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 338c: e5943030 ldr r3, [r4, #48] ; 0x30 3390: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 3394: 159420b8 ldrne r2, [r4, #184] ; 0xb8 3398: 13822b01 orrne r2, r2, #1024 ; 0x400 339c: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 33a0: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 33a4: 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) { 33a8: 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; 33ac: 13833c02 orrne r3, r3, #512 ; 0x200 33b0: 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) { 33b4: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 33b8: 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) { 33bc: 1a000013 bne 3410 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 33c0: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; 33c4: eb000519 bl 4830 33c8: e3a0100a mov r1, #10 33cc: e0000098 mul r0, r8, r0 33d0: eb002f7b bl f1c4 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { 33d4: e5d43046 ldrb r3, [r4, #70] ; 0x46 33d8: 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] * 33dc: e5840054 str r0, [r4, #84] ; 0x54 33e0: e5d42047 ldrb r2, [r4, #71] ; 0x47 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 33e4: 0a000005 beq 3400 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 33e8: 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; 33ec: e5840070 str r0, [r4, #112] ; 0x70 if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 33f0: 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; 33f4: e584706c str r7, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 33f8: e5840074 str r0, [r4, #116] ; 0x74 33fc: ea000006 b 341c else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3400: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3404: 03a03001 moveq r3, #1 3408: 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]) { 340c: 0a000002 beq 341c tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3410: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3414: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3418: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 341c: e59430a8 ldr r3, [r4, #168] ; 0xa8 3420: e3530000 cmp r3, #0 3424: 0a000032 beq 34f4 (*tty->device.setAttributes)(tty->minor, &tty->termios); 3428: e5940010 ldr r0, [r4, #16] 342c: e2841030 add r1, r4, #48 ; 0x30 3430: e1a0e00f mov lr, pc 3434: e12fff13 bx r3 3438: ea00002d b 34f4 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 343c: e1a00004 mov r0, r4 3440: ebfffdb2 bl 2b10 break; 3444: ea00002a b 34f4 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 3448: e897000c ldm r7, {r2, r3} 344c: e58420d4 str r2, [r4, #212] ; 0xd4 3450: e58430d8 str r3, [r4, #216] ; 0xd8 break; 3454: ea000026 b 34f4 case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 3458: e897000c ldm r7, {r2, r3} 345c: e58420dc str r2, [r4, #220] ; 0xdc 3460: e58430e0 str r3, [r4, #224] ; 0xe0 break; 3464: ea000022 b 34f4 #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3468: e59420cc ldr r2, [r4, #204] ; 0xcc 346c: e59f309c ldr r3, [pc, #156] ; 3510 3470: e0833282 add r3, r3, r2, lsl #5 3474: e5933004 ldr r3, [r3, #4] 3478: e3530000 cmp r3, #0 347c: 0a000003 beq 3490 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3480: e1a00004 mov r0, r4 3484: e1a0e00f mov lr, pc 3488: e12fff13 bx r3 348c: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); 3490: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ 3494: 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); 3498: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ 349c: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 34a0: e59f2068 ldr r2, [pc, #104] ; 3510 * 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); 34a4: 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) { 34a8: e7923283 ldr r3, [r2, r3, lsl #5] 34ac: e3530000 cmp r3, #0 34b0: 0a00000f beq 34f4 sc = rtems_termios_linesw[tty->t_line].l_open(tty); 34b4: e1a00004 mov r0, r4 34b8: e1a0e00f mov lr, pc 34bc: e12fff13 bx r3 34c0: e1a06000 mov r6, r0 34c4: ea00000a b 34f4 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 34c8: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 34cc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 34d0: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 34d4: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 34d8: e2840020 add r0, r4, #32 <== NOT EXECUTED 34dc: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 34e0: 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; 34e4: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 34e8: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 34ec: e0813003 add r3, r1, r3 <== NOT EXECUTED 34f0: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 34f4: e5940018 ldr r0, [r4, #24] 34f8: eb0006a5 bl 4f94 args->ioctl_return = sc; 34fc: e585600c str r6, [r5, #12] return sc; } 3500: e1a00006 mov r0, r6 3504: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00003c5c : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3c5c: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3c60: 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; 3c64: 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); 3c68: 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; 3c6c: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; 3c70: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3c74: 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); 3c78: e1a02001 mov r2, r1 3c7c: e5940014 ldr r0, [r4, #20] 3c80: eb00047d bl 4e7c if (sc != RTEMS_SUCCESSFUL) 3c84: e2507000 subs r7, r0, #0 3c88: 1a0000be bne 3f88 return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 3c8c: e59420cc ldr r2, [r4, #204] ; 0xcc 3c90: e59f32f8 ldr r3, [pc, #760] ; 3f90 3c94: e0833282 add r3, r3, r2, lsl #5 3c98: e5933008 ldr r3, [r3, #8] 3c9c: e3530000 cmp r3, #0 3ca0: 0a000005 beq 3cbc sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3ca4: e1a00004 mov r0, r4 3ca8: e1a01005 mov r1, r5 3cac: e1a0e00f mov lr, pc 3cb0: e12fff13 bx r3 3cb4: e1a07000 mov r7, r0 3cb8: ea0000ae b 3f78 tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 3cbc: e5942024 ldr r2, [r4, #36] ; 0x24 3cc0: e5943020 ldr r3, [r4, #32] 3cc4: e1520003 cmp r2, r3 3cc8: 1a0000a1 bne 3f54 tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 3ccc: e5943028 ldr r3, [r4, #40] ; 0x28 3cd0: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && 3cd4: e59430a0 ldr r3, [r4, #160] ; 0xa0 3cd8: e3530000 cmp r3, #0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 3cdc: e5847020 str r7, [r4, #32] 3ce0: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 3ce4: 0a00003b beq 3dd8 3ce8: e59430b4 ldr r3, [r4, #180] ; 0xb4 3cec: e3530000 cmp r3, #0 3cf0: 1a000038 bne 3dd8 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3cf4: e594303c ldr r3, [r4, #60] ; 0x3c 3cf8: e3130002 tst r3, #2 3cfc: 0a00000d beq 3d38 for (;;) { n = (*tty->device.pollRead)(tty->minor); 3d00: e5940010 ldr r0, [r4, #16] 3d04: e1a0e00f mov lr, pc 3d08: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 3d0c: e3500000 cmp r0, #0 3d10: aa000002 bge 3d20 rtems_task_wake_after (1); 3d14: e3a00001 mov r0, #1 3d18: eb000584 bl 5330 3d1c: eafffff7 b 3d00 } else { if (siproc (n, tty)) 3d20: e20000ff and r0, r0, #255 ; 0xff 3d24: e1a01004 mov r1, r4 3d28: ebffff86 bl 3b48 3d2c: e3500000 cmp r0, #0 3d30: 0afffff2 beq 3d00 3d34: ea000086 b 3f54 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 3d38: eb0002c4 bl 4850 3d3c: e1a06000 mov r6, r0 for (;;) { n = (*tty->device.pollRead)(tty->minor); 3d40: e5940010 ldr r0, [r4, #16] 3d44: e1a0e00f mov lr, pc 3d48: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 3d4c: e3500000 cmp r0, #0 3d50: aa000013 bge 3da4 if (tty->termios.c_cc[VMIN]) { 3d54: e5d43047 ldrb r3, [r4, #71] ; 0x47 3d58: e3530000 cmp r3, #0 3d5c: e5d43046 ldrb r3, [r4, #70] ; 0x46 3d60: 0a000005 beq 3d7c if (tty->termios.c_cc[VTIME] && tty->ccount) { 3d64: e3530000 cmp r3, #0 3d68: 0a00000a beq 3d98 3d6c: e5943020 ldr r3, [r4, #32] 3d70: e3530000 cmp r3, #0 3d74: 0a000007 beq 3d98 3d78: ea000001 b 3d84 if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 3d7c: e3530000 cmp r3, #0 <== NOT EXECUTED 3d80: 0a000073 beq 3f54 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 3d84: eb0002b1 bl 4850 if ((now - then) > tty->vtimeTicks) { 3d88: e5943054 ldr r3, [r4, #84] ; 0x54 3d8c: e0660000 rsb r0, r6, r0 3d90: e1500003 cmp r0, r3 3d94: 8a00006e bhi 3f54 break; } } rtems_task_wake_after (1); 3d98: e3a00001 mov r0, #1 3d9c: eb000563 bl 5330 3da0: eaffffe6 b 3d40 } else { siproc (n, tty); 3da4: e20000ff and r0, r0, #255 ; 0xff 3da8: e1a01004 mov r1, r4 3dac: ebffff65 bl 3b48 if (tty->ccount >= tty->termios.c_cc[VMIN]) 3db0: e5d43047 ldrb r3, [r4, #71] ; 0x47 3db4: e5942020 ldr r2, [r4, #32] 3db8: e1520003 cmp r2, r3 3dbc: aa000064 bge 3f54 break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3dc0: e3530000 cmp r3, #0 3dc4: 0affffdd beq 3d40 3dc8: e5d43046 ldrb r3, [r4, #70] ; 0x46 3dcc: e3530000 cmp r3, #0 3dd0: 0affffda beq 3d40 3dd4: eaffffd7 b 3d38 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)( 3dd8: 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; 3ddc: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; 3de0: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 3de4: e59f91a8 ldr r9, [pc, #424] ; 3f94 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)( 3de8: e58d2000 str r2, [sp] 3dec: ea000040 b 3ef4 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; 3df0: e594005c ldr r0, [r4, #92] ; 0x5c 3df4: e5941064 ldr r1, [r4, #100] ; 0x64 3df8: e2800001 add r0, r0, #1 3dfc: eb002d88 bl f424 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 3e00: e5943058 ldr r3, [r4, #88] ; 0x58 3e04: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; 3e08: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 3e0c: e5943060 ldr r3, [r4, #96] ; 0x60 3e10: e5942064 ldr r2, [r4, #100] ; 0x64 3e14: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) 3e18: e0600003 rsb r0, r0, r3 3e1c: e5941064 ldr r1, [r4, #100] ; 0x64 3e20: eb002d7f bl f424 <__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) 3e24: e59430bc ldr r3, [r4, #188] ; 0xbc 3e28: e1500003 cmp r0, r3 3e2c: 2a00001f bcs 3eb0 % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 3e30: e59430b8 ldr r3, [r4, #184] ; 0xb8 3e34: e3c33001 bic r3, r3, #1 3e38: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3e3c: e59f3154 ldr r3, [pc, #340] ; 3f98 3e40: e59420b8 ldr r2, [r4, #184] ; 0xb8 3e44: e0023003 and r3, r2, r3 3e48: e59f2148 ldr r2, [pc, #328] ; 3f98 3e4c: e1530002 cmp r3, r2 3e50: 1a00000b bne 3e84 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 3e54: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3e58: e3530000 cmp r3, #0 <== NOT EXECUTED 3e5c: 0a000002 beq 3e6c <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 3e60: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3e64: e3130020 tst r3, #32 <== NOT EXECUTED 3e68: 0a000005 beq 3e84 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 3e6c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3e70: e59d1000 ldr r1, [sp] <== NOT EXECUTED 3e74: e3a02001 mov r2, #1 <== NOT EXECUTED 3e78: e1a0e00f mov lr, pc <== NOT EXECUTED 3e7c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3e80: ea00000a b 3eb0 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 3e84: e59430b8 ldr r3, [r4, #184] ; 0xb8 3e88: e3130c01 tst r3, #256 ; 0x100 3e8c: 0a000007 beq 3eb0 tty->flow_ctrl &= ~FL_IRTSOFF; 3e90: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3e94: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3e98: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 3e9c: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 3ea0: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3ea4: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3ea8: 11a0e00f movne lr, pc <== NOT EXECUTED 3eac: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 3eb0: e594303c ldr r3, [r4, #60] ; 0x3c 3eb4: e3130002 tst r3, #2 3eb8: 0a000005 beq 3ed4 if (siproc (c, tty)) 3ebc: e1a0000a mov r0, sl 3ec0: e1a01004 mov r1, r4 3ec4: ebffff1f bl 3b48 wait = 0; 3ec8: e3500000 cmp r0, #0 3ecc: 13a06000 movne r6, #0 3ed0: ea000006 b 3ef0 } else { siproc (c, tty); 3ed4: e1a0000a mov r0, sl <== NOT EXECUTED 3ed8: e1a01004 mov r1, r4 <== NOT EXECUTED 3edc: ebffff19 bl 3b48 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3ee0: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3ee4: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; 3ee8: e1520003 cmp r2, r3 <== NOT EXECUTED 3eec: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; 3ef0: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3ef4: e594205c ldr r2, [r4, #92] ; 0x5c 3ef8: e5943060 ldr r3, [r4, #96] ; 0x60 3efc: e1520003 cmp r2, r3 3f00: 0a000004 beq 3f18 (tty->ccount < (CBUFSIZE-1))) { 3f04: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3f08: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 3f0c: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3f10: e1520003 cmp r2, r3 3f14: baffffb5 blt 3df0 } /* * Wait for characters */ if ( wait ) { 3f18: e3560000 cmp r6, #0 3f1c: 0a00000c beq 3f54 sc = rtems_semaphore_obtain( 3f20: e2840068 add r0, r4, #104 ; 0x68 3f24: e8900003 ldm r0, {r0, r1} 3f28: e1a0200a mov r2, sl 3f2c: eb0003d2 bl 4e7c tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 3f30: e3500000 cmp r0, #0 3f34: 0affffee beq 3ef4 3f38: ea000005 b 3f54 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 3f3c: e594201c ldr r2, [r4, #28] 3f40: e7d22003 ldrb r2, [r2, r3] 3f44: e2833001 add r3, r3, #1 3f48: e4cb2001 strb r2, [fp], #1 3f4c: e5843024 str r3, [r4, #36] ; 0x24 count--; 3f50: e2488001 sub r8, r8, #1 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 3f54: e3580000 cmp r8, #0 3f58: 0a000003 beq 3f6c 3f5c: e2842020 add r2, r4, #32 3f60: e892000c ldm r2, {r2, r3} 3f64: e1530002 cmp r3, r2 3f68: bafffff3 blt 3f3c *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 3f6c: e5953010 ldr r3, [r5, #16] 3f70: e0688003 rsb r8, r8, r3 3f74: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; 3f78: e3a03000 mov r3, #0 3f7c: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 3f80: e5940014 ldr r0, [r4, #20] 3f84: eb000402 bl 4f94 return sc; } 3f88: e1a00007 mov r0, r7 3f8c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000042ac : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 42ac: e59020b8 ldr r2, [r0, #184] ; 0xb8 42b0: e59f31b8 ldr r3, [pc, #440] ; 4470 42b4: e0023003 and r3, r2, r3 42b8: e59f21b4 ldr r2, [pc, #436] ; 4474 42bc: 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) { 42c0: e92d4070 push {r4, r5, r6, lr} 42c4: 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)) 42c8: 1a00000c bne 4300 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 42cc: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 42d0: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 42d4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 42d8: e1a0e00f mov lr, pc <== NOT EXECUTED 42dc: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 42e0: ebfffa06 bl 2b00 <== NOT EXECUTED tty->t_dqlen--; 42e4: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 42e8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 42ec: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 42f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 42f4: e3833002 orr r3, r3, #2 <== NOT EXECUTED 42f8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); 42fc: ea00000f b 4340 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 4300: e59030b8 ldr r3, [r0, #184] ; 0xb8 4304: e2033003 and r3, r3, #3 4308: e3530002 cmp r3, #2 430c: 1a00000e bne 434c * 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); 4310: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 4314: e3a02001 mov r2, #1 <== NOT EXECUTED 4318: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 431c: e1a0e00f mov lr, pc <== NOT EXECUTED 4320: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 4324: ebfff9f5 bl 2b00 <== NOT EXECUTED tty->t_dqlen--; 4328: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 432c: e2433001 sub r3, r3, #1 <== NOT EXECUTED 4330: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 4334: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4338: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 433c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4340: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 4344: e3a05001 mov r5, #1 <== NOT EXECUTED 4348: ea000046 b 4468 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 434c: e5902080 ldr r2, [r0, #128] ; 0x80 4350: e5903084 ldr r3, [r0, #132] ; 0x84 4354: e1520003 cmp r2, r3 4358: 1a000005 bne 4374 /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 435c: e5903094 ldr r3, [r0, #148] ; 0x94 4360: e3530002 cmp r3, #2 4364: 1a00003e bne 4464 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4368: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 436c: eb000308 bl 4f94 <== NOT EXECUTED 4370: ea00003b b 4464 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 4374: ebfff9e1 bl 2b00 len = tty->t_dqlen; tty->t_dqlen = 0; 4378: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 437c: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; 4380: e5843090 str r3, [r4, #144] ; 0x90 4384: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 4388: e5943084 ldr r3, [r4, #132] ; 0x84 438c: e5941088 ldr r1, [r4, #136] ; 0x88 4390: e0820003 add r0, r2, r3 4394: eb002c22 bl f424 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 4398: e5943094 ldr r3, [r4, #148] ; 0x94 439c: 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; 43a0: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; 43a4: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 43a8: 0594008c ldreq r0, [r4, #140] ; 0x8c 43ac: 0b0002f8 bleq 4f94 } if (newTail == tty->rawOutBuf.Head) { 43b0: e5943080 ldr r3, [r4, #128] ; 0x80 43b4: e1560003 cmp r6, r3 43b8: 1a00000a bne 43e8 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43bc: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43c0: e3a05000 mov r5, #0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43c4: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 43c8: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; 43cc: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 43d0: 0a000021 beq 445c (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 43d4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 43d8: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 43dc: e1a0e00f mov lr, pc <== NOT EXECUTED 43e0: e12fff13 bx r3 <== NOT EXECUTED 43e4: ea00001c b 445c <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 43e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 43ec: e2033e21 and r3, r3, #528 ; 0x210 43f0: e3530e21 cmp r3, #528 ; 0x210 43f4: 1a000008 bne 441c == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 43f8: ebfff9c0 bl 2b00 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 43fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4400: e3833020 orr r3, r3, #32 <== NOT EXECUTED 4404: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4408: e3a03001 mov r3, #1 <== NOT EXECUTED 440c: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED 4410: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; 4414: e3a05000 mov r5, #0 <== NOT EXECUTED 4418: ea00000f b 445c <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 441c: e5943080 ldr r3, [r4, #128] ; 0x80 4420: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; 4424: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; 4428: 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)) { 442c: 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; 4430: 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)) { 4434: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( 4438: 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; 443c: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ 4440: e3a03001 mov r3, #1 4444: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( 4448: e5940010 ldr r0, [r4, #16] 444c: e0811006 add r1, r1, r6 4450: e1a02005 mov r2, r5 4454: e1a0e00f mov lr, pc 4458: e594f0a4 ldr pc, [r4, #164] ; 0xa4 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 445c: e5846084 str r6, [r4, #132] ; 0x84 4460: ea000000 b 4468 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 4464: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 4468: e1a00005 mov r0, r5 446c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00003ba4 : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3ba4: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 3ba8: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3bac: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3bb0: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 3bb4: 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); 3bb8: e1a02001 mov r2, r1 3bbc: e5950018 ldr r0, [r5, #24] 3bc0: eb0004ad bl 4e7c if (sc != RTEMS_SUCCESSFUL) 3bc4: e2506000 subs r6, r0, #0 3bc8: 1a000020 bne 3c50 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 3bcc: e59520cc ldr r2, [r5, #204] ; 0xcc 3bd0: e59f3080 ldr r3, [pc, #128] ; 3c58 3bd4: e0833282 add r3, r3, r2, lsl #5 3bd8: e593300c ldr r3, [r3, #12] 3bdc: e3530000 cmp r3, #0 3be0: 0a000005 beq 3bfc sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 3be4: e1a00005 mov r0, r5 3be8: e1a01004 mov r1, r4 3bec: e1a0e00f mov lr, pc 3bf0: e12fff13 bx r3 3bf4: e1a06000 mov r6, r0 3bf8: ea000012 b 3c48 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 3bfc: e5953034 ldr r3, [r5, #52] ; 0x34 3c00: e3130001 tst r3, #1 uint32_t count = args->count; 3c04: 15947010 ldrne r7, [r4, #16] char *buffer = args->buffer; 3c08: 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) { 3c0c: 1a000004 bne 3c24 3c10: ea000006 b 3c30 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 3c14: e4d80001 ldrb r0, [r8], #1 3c18: e1a01005 mov r1, r5 3c1c: ebfffe7c bl 3614 3c20: e2477001 sub r7, r7, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 3c24: e3570000 cmp r7, #0 3c28: 1afffff9 bne 3c14 3c2c: ea000003 b 3c40 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 3c30: e284000c add r0, r4, #12 <== NOT EXECUTED 3c34: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3c38: e1a02005 mov r2, r5 <== NOT EXECUTED 3c3c: ebfffe34 bl 3514 <== NOT EXECUTED args->bytes_moved = args->count; 3c40: e5943010 ldr r3, [r4, #16] 3c44: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 3c48: e5950018 ldr r0, [r5, #24] 3c4c: eb0004d0 bl 4f94 return sc; } 3c50: e1a00006 mov r0, r6 3c54: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000061a0 : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 61a0: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 61a4: e92d41f0 push {r4, r5, r6, r7, r8, lr} 61a8: e1a05000 mov r5, r0 61ac: e1a08001 mov r8, r1 61b0: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 61b4: 0a00000e beq 61f4 if (rtems_panic_in_progress++) 61b8: e59f212c ldr r2, [pc, #300] ; 62ec 61bc: e5923000 ldr r3, [r2] 61c0: e2831001 add r1, r3, #1 61c4: e3530000 cmp r3, #0 61c8: e5821000 str r1, [r2] 61cc: 0a000003 beq 61e0 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 61d0: e59f3118 ldr r3, [pc, #280] ; 62f0 <== NOT EXECUTED 61d4: e5932000 ldr r2, [r3] <== NOT EXECUTED 61d8: e2822001 add r2, r2, #1 <== NOT EXECUTED 61dc: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 61e0: e59f3104 ldr r3, [pc, #260] ; 62ec 61e4: e5933000 ldr r3, [r3] 61e8: e3530002 cmp r3, #2 return 0; 61ec: 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) 61f0: ca00003b bgt 62e4 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 61f4: e59f30f8 ldr r3, [pc, #248] ; 62f4 61f8: e5933000 ldr r3, [r3] 61fc: e5930008 ldr r0, [r3, #8] 6200: eb002b85 bl 1101c status = error_flag & ~RTEMS_ERROR_MASK; 6204: e3c56207 bic r6, r5, #1879048192 ; 0x70000000 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 6208: e2155101 ands r5, r5, #1073741824 ; 0x40000000 620c: 0a000001 beq 6218 local_errno = errno; 6210: eb002a8a bl 10c40 <__errno> 6214: 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); 6218: e59f70d4 ldr r7, [pc, #212] ; 62f4 621c: e5973000 ldr r3, [r7] 6220: e1a02004 mov r2, r4 6224: e593000c ldr r0, [r3, #12] 6228: e1a01008 mov r1, r8 622c: eb0043ec bl 171e4 if (status) 6230: 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); 6234: e1a04000 mov r4, r0 if (status) 6238: 0a000008 beq 6260 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 623c: e5973000 ldr r3, [r7] 6240: e1a00006 mov r0, r6 6244: e593700c ldr r7, [r3, #12] 6248: ebffffd0 bl 6190 624c: e59f10a4 ldr r1, [pc, #164] ; 62f8 6250: e1a02000 mov r2, r0 6254: e1a00007 mov r0, r7 6258: eb002c55 bl 113b4 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 625c: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 6260: e3550000 cmp r5, #0 6264: 0a000015 beq 62c0 if ((local_errno > 0) && *strerror(local_errno)) 6268: da00000d ble 62a4 626c: e1a00005 mov r0, r5 6270: eb002f52 bl 11fc0 6274: e5d03000 ldrb r3, [r0] 6278: e3530000 cmp r3, #0 627c: 0a000008 beq 62a4 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 6280: e59f306c ldr r3, [pc, #108] ; 62f4 6284: e5933000 ldr r3, [r3] 6288: e1a00005 mov r0, r5 628c: e593600c ldr r6, [r3, #12] 6290: eb002f4a bl 11fc0 6294: e59f1060 ldr r1, [pc, #96] ; 62fc 6298: e1a02000 mov r2, r0 629c: e1a00006 mov r0, r6 62a0: ea000004 b 62b8 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 62a4: e59f3048 ldr r3, [pc, #72] ; 62f4 62a8: e5933000 ldr r3, [r3] 62ac: e59f104c ldr r1, [pc, #76] ; 6300 62b0: e593000c ldr r0, [r3, #12] 62b4: e1a02005 mov r2, r5 62b8: eb002c3d bl 113b4 62bc: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); 62c0: e59f502c ldr r5, [pc, #44] ; 62f4 62c4: e5953000 ldr r3, [r5] 62c8: e59f1034 ldr r1, [pc, #52] ; 6304 62cc: e593000c ldr r0, [r3, #12] 62d0: eb002c37 bl 113b4 (void) fflush(stderr); 62d4: 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"); 62d8: e0804004 add r4, r0, r4 (void) fflush(stderr); 62dc: e593000c ldr r0, [r3, #12] 62e0: eb002b4d bl 1101c return chars_written; } 62e4: e1a00004 mov r0, r4 62e8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000023a8 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 23a8: 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; 23ac: e3a04000 mov r4, #0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 23b0: e58d1000 str r1, [sp] unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 23b4: e59fb0d4 ldr fp, [pc, #212] ; 2490 limit++; continue; } sign = 1; } if (!isdigit(c)) 23b8: e59f90d4 ldr r9, [pc, #212] ; 2494 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 23bc: e1a05000 mov r5, r0 int c; unsigned int i = 0; unsigned int limit = INT_MAX; 23c0: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 23c4: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 23c8: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 23cc: e5953004 ldr r3, [r5, #4] 23d0: e2433001 sub r3, r3, #1 23d4: e3530000 cmp r3, #0 23d8: e5853004 str r3, [r5, #4] 23dc: a5953000 ldrge r3, [r5] 23e0: a4d36001 ldrbge r6, [r3], #1 23e4: a5853000 strge r3, [r5] 23e8: aa000003 bge 23fc 23ec: e59b0000 ldr r0, [fp] <== NOT EXECUTED 23f0: e1a01005 mov r1, r5 <== NOT EXECUTED 23f4: eb0030ba bl e6e4 <__srget_r> <== NOT EXECUTED 23f8: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 23fc: e356003a cmp r6, #58 ; 0x3a 2400: 0a000019 beq 246c break; if (sign == 0) { 2404: e3540000 cmp r4, #0 2408: 1a000004 bne 2420 if (c == '-') { 240c: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 2410: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 2414: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 2418: 0affffeb beq 23cc sign = -1; limit++; continue; } sign = 1; 241c: e3a04001 mov r4, #1 } if (!isdigit(c)) 2420: e5993000 ldr r3, [r9] 2424: e0833006 add r3, r3, r6 2428: e5d30001 ldrb r0, [r3, #1] 242c: e2100004 ands r0, r0, #4 2430: 0a000015 beq 248c return 0; d = c - '0'; if ((i > (limit / 10)) 2434: e1a00008 mov r0, r8 2438: e3a0100a mov r1, #10 243c: eb0039b2 bl 10b0c <__aeabi_uidiv> 2440: e1570000 cmp r7, r0 2444: 8a00000f bhi 2488 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 2448: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 244c: 1a000004 bne 2464 2450: e1a00008 mov r0, r8 2454: e3a0100a mov r1, #10 2458: eb003a43 bl 10d6c <__umodsi3> 245c: e1560000 cmp r6, r0 2460: 8a000008 bhi 2488 return 0; i = i * 10 + d; 2464: e027679a mla r7, sl, r7, r6 2468: eaffffd7 b 23cc } if (sign == 0) 246c: e3540000 cmp r4, #0 return 0; 2470: 01a00004 moveq r0, r4 *val = i * sign; 2474: 10040497 mulne r4, r7, r4 2478: 159d3000 ldrne r3, [sp] return 1; 247c: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 2480: 15834000 strne r4, [r3] return 1; 2484: ea000000 b 248c if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; 2488: e3a00000 mov r0, #0 } if (sign == 0) return 0; *val = i * sign; return 1; } 248c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00003b48 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3b48: e591203c ldr r2, [r1, #60] ; 0x3c 3b4c: e59f304c ldr r3, [pc, #76] ; 3ba0 3b50: e0023003 and r3, r2, r3 3b54: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 3b58: e92d4030 push {r4, r5, lr} 3b5c: e1a04001 mov r4, r1 3b60: 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)) { 3b64: 0a00000b beq 3b98 rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3b68: e5910018 ldr r0, [r1, #24] 3b6c: e3a01000 mov r1, #0 3b70: e1a02001 mov r2, r1 3b74: eb0004c0 bl 4e7c i = iproc (c, tty); 3b78: e1a01004 mov r1, r4 3b7c: e1a00005 mov r0, r5 3b80: ebffff8b bl 39b4 3b84: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); 3b88: e5940018 ldr r0, [r4, #24] 3b8c: eb000500 bl 4f94 } else { i = iproc (c, tty); } return i; } 3b90: e1a00005 mov r0, r5 3b94: e8bd8030 pop {r4, r5, pc} 3b98: 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); 3b9c: eaffff84 b 39b4 <== NOT EXECUTED =============================================================================== 00005824 : */ int unmount( const char *path ) { 5824: e92d4070 push {r4, r5, r6, lr} 5828: e24dd018 sub sp, sp, #24 582c: 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 ) ) 5830: eb0021f5 bl e00c 5834: e28d4004 add r4, sp, #4 5838: e3a03001 mov r3, #1 583c: e1a01000 mov r1, r0 5840: e58d3000 str r3, [sp] 5844: e1a00005 mov r0, r5 5848: e3a02000 mov r2, #0 584c: e1a03004 mov r3, r4 5850: ebfff475 bl 2a2c 5854: e3500000 cmp r0, #0 5858: 1a000040 bne 5960 return -1; mt_entry = loc.mt_entry; 585c: 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 ){ 5860: e59d3004 ldr r3, [sp, #4] 5864: e595201c ldr r2, [r5, #28] 5868: e1520003 cmp r2, r3 586c: 0a000004 beq 5884 rtems_filesystem_freenode( &loc ); 5870: e1a00004 mov r0, r4 5874: ebfff49c bl 2aec rtems_set_errno_and_return_minus_one( EACCES ); 5878: eb001c6b bl ca2c <__errno> 587c: e3a0300d mov r3, #13 5880: ea000011 b 58cc /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 5884: e1a00004 mov r0, r4 5888: ebfff497 bl 2aec * 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 ) 588c: e59f30d8 ldr r3, [pc, #216] ; 596c 5890: e5933000 ldr r3, [r3] 5894: e5933014 ldr r3, [r3, #20] 5898: e1530005 cmp r3, r5 589c: 0a000008 beq 58c4 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 58a0: e59f00c8 ldr r0, [pc, #200] ; 5970 58a4: e595102c ldr r1, [r5, #44] ; 0x2c 58a8: ebfff6b1 bl 3374 58ac: e3500000 cmp r0, #0 58b0: 1a000003 bne 58c4 * 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 ) 58b4: e1a00005 mov r0, r5 58b8: ebfff566 bl 2e58 58bc: e3500001 cmp r0, #1 58c0: 1a000003 bne 58d4 rtems_set_errno_and_return_minus_one( EBUSY ); 58c4: eb001c58 bl ca2c <__errno> 58c8: e3a03010 mov r3, #16 58cc: e5803000 str r3, [r0] 58d0: ea000022 b 5960 * 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 ) 58d4: e5953014 ldr r3, [r5, #20] 58d8: e1a00005 mov r0, r5 58dc: e1a0e00f mov lr, pc 58e0: e593f028 ldr pc, [r3, #40] ; 0x28 58e4: e2506000 subs r6, r0, #0 58e8: 1a00001c bne 5960 * 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){ 58ec: e5953028 ldr r3, [r5, #40] ; 0x28 58f0: e1a00005 mov r0, r5 58f4: e1a0e00f mov lr, pc 58f8: e593f02c ldr pc, [r3, #44] ; 0x2c 58fc: e2504000 subs r4, r0, #0 5900: 0a000007 beq 5924 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 5904: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 5908: e1a00005 mov r0, r5 <== NOT EXECUTED 590c: e1a0e00f mov lr, pc <== NOT EXECUTED 5910: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 5914: e3500000 cmp r0, #0 <== NOT EXECUTED 5918: 0a000010 beq 5960 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 591c: e1a00006 mov r0, r6 <== NOT EXECUTED 5920: eb0003c5 bl 683c <== 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 ); 5924: e59f6048 ldr r6, [pc, #72] ; 5974 5928: e1a01004 mov r1, r4 592c: e1a02004 mov r2, r4 5930: e5960000 ldr r0, [r6] 5934: eb000242 bl 6244 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 5938: e1a00005 mov r0, r5 593c: eb000474 bl 6b14 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 5940: e5960000 ldr r0, [r6] 5944: eb000284 bl 635c /* * 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 ); 5948: e2850008 add r0, r5, #8 594c: ebfff466 bl 2aec free( mt_entry ); 5950: e1a00005 mov r0, r5 5954: ebfff469 bl 2b00 return 0; 5958: e1a00004 mov r0, r4 595c: ea000000 b 5964 */ 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; 5960: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 5964: e28dd018 add sp, sp, #24 5968: e8bd8070 pop {r4, r5, r6, pc}