=============================================================================== 30008880 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 30008880: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 30008884: e5903010 ldr r3, [r0, #16] switch( node->type ) { 30008888: 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; 3000888c: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 30008890: e2422001 sub r2, r2, #1 30008894: e3520006 cmp r2, #6 30008898: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000889c: ea000010 b 300088e4 <== NOT EXECUTED 300088a0: 300088bc .word 0x300088bc <== NOT EXECUTED 300088a4: 300088c4 .word 0x300088c4 <== NOT EXECUTED 300088a8: 300088cc .word 0x300088cc <== NOT EXECUTED 300088ac: 300088cc .word 0x300088cc <== NOT EXECUTED 300088b0: 300088d4 .word 0x300088d4 <== NOT EXECUTED 300088b4: 300088d4 .word 0x300088d4 <== NOT EXECUTED 300088b8: 300088dc .word 0x300088dc <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 300088bc: e593300c ldr r3, [r3, #12] 300088c0: ea000006 b 300088e0 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 300088c4: e59f3020 ldr r3, [pc, #32] ; 300088ec 300088c8: ea000004 b 300088e0 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 300088cc: e59f301c ldr r3, [pc, #28] ; 300088f0 300088d0: ea000002 b 300088e0 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 300088d4: e5933008 ldr r3, [r3, #8] 300088d8: ea000000 b 300088e0 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 300088dc: e5933010 ldr r3, [r3, #16] 300088e0: e5803008 str r3, [r0, #8] break; } return 0; } 300088e4: e3a00000 mov r0, #0 300088e8: e12fff1e bx lr =============================================================================== 30008980 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30008980: 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 ) ) { 30008984: e3d27007 bics r7, r2, #7 const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30008988: e24dd040 sub sp, sp, #64 ; 0x40 3000898c: e58d0000 str r0, [sp] 30008990: e1a06001 mov r6, r1 30008994: e1a08002 mov r8, r2 30008998: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 3000899c: 05935000 ldreq r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 300089a0: 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 ); 300089a4: 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 ) ) { 300089a8: 0a000057 beq 30008b0c rtems_set_errno_and_return_minus_one( EIO ); 300089ac: eb000cba bl 3000bc9c <__errno> <== NOT EXECUTED 300089b0: e3a03005 mov r3, #5 <== NOT EXECUTED 300089b4: ea00007e b 30008bb4 <== 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 ); 300089b8: e59d2000 ldr r2, [sp] 300089bc: e28d303c add r3, sp, #60 ; 0x3c 300089c0: e0820007 add r0, r2, r7 300089c4: e1a01006 mov r1, r6 300089c8: e1a0200a mov r2, sl 300089cc: eb0001ae bl 3000908c pathnamelen -= len; i += len; if ( !pathloc->node_access ) 300089d0: e5943000 ldr r3, [r4] * 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 ); 300089d4: e1a09000 mov r9, r0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 300089d8: e3530000 cmp r3, #0 */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); pathnamelen -= len; 300089dc: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 300089e0: 0a000041 beq 30008aec rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 300089e4: e3500000 cmp r0, #0 300089e8: 0a000006 beq 30008a08 if ( node->type == IMFS_DIRECTORY ) 300089ec: e595104c ldr r1, [r5, #76] ; 0x4c 300089f0: e3510001 cmp r1, #1 300089f4: 1a000003 bne 30008a08 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 300089f8: e1a00004 mov r0, r4 300089fc: ebffffbc bl 300088f4 30008a00: e3500000 cmp r0, #0 30008a04: 0a000068 beq 30008bac rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 30008a08: 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; 30008a0c: e06b6006 rsb r6, fp, r6 i += len; 30008a10: 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; 30008a14: e5945000 ldr r5, [r4] switch( type ) { 30008a18: 0a000014 beq 30008a70 30008a1c: e3590004 cmp r9, #4 30008a20: 0a000036 beq 30008b00 30008a24: e3590002 cmp r9, #2 30008a28: 1a000037 bne 30008b0c case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30008a2c: e59fc194 ldr ip, [pc, #404] ; 30008bc8 30008a30: e59c3000 ldr r3, [ip] 30008a34: e5933018 ldr r3, [r3, #24] 30008a38: e1550003 cmp r5, r3 30008a3c: 0a000032 beq 30008b0c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 30008a40: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 30008a44: e59e301c ldr r3, [lr, #28] 30008a48: 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; 30008a4c: 028dc028 addeq ip, sp, #40 ; 0x28 30008a50: 028ee008 addeq lr, lr, #8 30008a54: 0a000037 beq 30008b38 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 30008a58: e5955008 ldr r5, [r5, #8] 30008a5c: e3550000 cmp r5, #0 30008a60: 1a000024 bne 30008af8 rtems_set_errno_and_return_minus_one( ENOENT ); 30008a64: eb000c8c bl 3000bc9c <__errno> 30008a68: e5809000 str r9, [r0] 30008a6c: ea000051 b 30008bb8 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 30008a70: e595304c ldr r3, [r5, #76] ; 0x4c 30008a74: e3530003 cmp r3, #3 30008a78: 1a000004 bne 30008a90 IMFS_evaluate_hard_link( pathloc, 0 ); 30008a7c: e1a00004 mov r0, r4 30008a80: e3a01000 mov r1, #0 30008a84: ebffffaa bl 30008934 node = pathloc->node_access; 30008a88: e5945000 ldr r5, [r4] 30008a8c: ea000008 b 30008ab4 * It would be a design error if we evaluated the link and * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { 30008a90: e3530004 cmp r3, #4 30008a94: 1a000006 bne 30008ab4 result = IMFS_evaluate_sym_link( pathloc, 0 ); 30008a98: e1a00004 mov r0, r4 30008a9c: e3a01000 mov r1, #0 30008aa0: eb000049 bl 30008bcc /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; if ( result == -1 ) 30008aa4: e3700001 cmn r0, #1 * was broken. */ IMFS_assert( node ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 30008aa8: e1a0b000 mov fp, r0 /* * In contrast to a hard link, it is possible to have a broken * symbolic link. */ node = pathloc->node_access; 30008aac: e5945000 ldr r5, [r4] if ( result == -1 ) 30008ab0: 0a000041 beq 30008bbc } /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30008ab4: e595304c ldr r3, [r5, #76] ; 0x4c 30008ab8: e3530001 cmp r3, #1 30008abc: 0a000002 beq 30008acc rtems_set_errno_and_return_minus_one( ENOTDIR ); 30008ac0: eb000c75 bl 3000bc9c <__errno> 30008ac4: e3a03014 mov r3, #20 30008ac8: ea000039 b 30008bb4 /* * 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 ) { 30008acc: e595e05c ldr lr, [r5, #92] ; 0x5c 30008ad0: e35e0000 cmp lr, #0 30008ad4: 1a000015 bne 30008b30 } /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 30008ad8: e1a00005 mov r0, r5 30008adc: e1a0100a mov r1, sl 30008ae0: eb000149 bl 3000900c if ( !node ) 30008ae4: e2505000 subs r5, r0, #0 30008ae8: 1a000002 bne 30008af8 rtems_set_errno_and_return_minus_one( ENOENT ); 30008aec: eb000c6a bl 3000bc9c <__errno> 30008af0: e3a03002 mov r3, #2 30008af4: ea00002e b 30008bb4 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 30008af8: e5845000 str r5, [r4] 30008afc: ea000002 b 30008b0c case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30008b00: eb000c65 bl 3000bc9c <__errno> 30008b04: e3a0305b mov r3, #91 ; 0x5b 30008b08: ea000029 b 30008bb4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 30008b0c: e3590004 cmp r9, #4 30008b10: 13590000 cmpne r9, #0 30008b14: 1affffa7 bne 300089b8 * 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 ) { 30008b18: e595304c ldr r3, [r5, #76] ; 0x4c 30008b1c: e3530001 cmp r3, #1 30008b20: 1a000019 bne 30008b8c if ( node->info.directory.mt_fs != NULL ) { 30008b24: e595e05c ldr lr, [r5, #92] ; 0x5c 30008b28: e35e0000 cmp lr, #0 30008b2c: 0a000016 beq 30008b8c newloc = node->info.directory.mt_fs->mt_fs_root; 30008b30: e28dc028 add ip, sp, #40 ; 0x28 30008b34: e28ee01c add lr, lr, #28 30008b38: e8be000f ldm lr!, {r0, r1, r2, r3} 30008b3c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30008b40: e59ee000 ldr lr, [lr] 30008b44: e58ce000 str lr, [ip] *pathloc = newloc; 30008b48: e28dc028 add ip, sp, #40 ; 0x28 30008b4c: e8bc000f ldm ip!, {r0, r1, r2, r3} 30008b50: e1a0c004 mov ip, r4 30008b54: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 30008b58: e59d103c ldr r1, [sp, #60] ; 0x3c 30008b5c: 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; 30008b60: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 30008b64: e0610007 rsb r0, r1, r7 30008b68: e0820000 add r0, r2, r0 30008b6c: e594c00c ldr ip, [r4, #12] 30008b70: e0861001 add r1, r6, r1 30008b74: e1a02008 mov r2, r8 30008b78: e1a03004 mov r3, r4 30008b7c: e1a0e00f mov lr, pc 30008b80: e59cf000 ldr pc, [ip] 30008b84: e1a0b000 mov fp, r0 30008b88: ea00000b b 30008bbc flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30008b8c: e1a00004 mov r0, r4 30008b90: ebffff3a bl 30008880 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30008b94: e1a01008 mov r1, r8 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30008b98: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30008b9c: e1a00004 mov r0, r4 30008ba0: ebffff53 bl 300088f4 30008ba4: e3500000 cmp r0, #0 30008ba8: 1a000003 bne 30008bbc rtems_set_errno_and_return_minus_one( EACCES ); 30008bac: eb000c3a bl 3000bc9c <__errno> 30008bb0: e3a0300d mov r3, #13 30008bb4: e5803000 str r3, [r0] 30008bb8: e3e0b000 mvn fp, #0 return result; } 30008bbc: e1a0000b mov r0, fp 30008bc0: e28dd040 add sp, sp, #64 ; 0x40 30008bc4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30008d08 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 30008d08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30008d0c: e24dd03c sub sp, sp, #60 ; 0x3c 30008d10: e1a07000 mov r7, r0 30008d14: e1a04001 mov r4, r1 30008d18: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30008d1c: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 30008d20: eb000fc7 bl 3000cc44 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 30008d24: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 30008d28: 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 ); 30008d2c: e1a01008 mov r1, r8 30008d30: e28d3038 add r3, sp, #56 ; 0x38 30008d34: e0870005 add r0, r7, r5 30008d38: e1a0200d mov r2, sp 30008d3c: eb0000d2 bl 3000908c pathlen -= len; i += len; if ( !pathloc->node_access ) 30008d40: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 30008d44: e59db038 ldr fp, [sp, #56] ; 0x38 i += len; if ( !pathloc->node_access ) 30008d48: 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 ); 30008d4c: e1a09000 mov r9, r0 pathlen -= len; 30008d50: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 30008d54: 0a000060 beq 30008edc /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30008d58: e3500000 cmp r0, #0 30008d5c: 0a000006 beq 30008d7c if ( node->type == IMFS_DIRECTORY ) 30008d60: e596104c ldr r1, [r6, #76] ; 0x4c 30008d64: e3510001 cmp r1, #1 30008d68: 1a000003 bne 30008d7c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30008d6c: e1a00004 mov r0, r4 30008d70: ebfffedf bl 300088f4 30008d74: e3500000 cmp r0, #0 30008d78: 0a00006c beq 30008f30 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 30008d7c: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 30008d80: 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; 30008d84: e1a06003 mov r6, r3 switch( type ) { 30008d88: e3590004 cmp r9, #4 30008d8c: 979ff109 ldrls pc, [pc, r9, lsl #2] 30008d90: eaffffe5 b 30008d2c <== NOT EXECUTED 30008d94: 30008ea0 .word 0x30008ea0 <== NOT EXECUTED 30008d98: 30008d2c .word 0x30008d2c <== NOT EXECUTED 30008d9c: 30008da8 .word 0x30008da8 <== NOT EXECUTED 30008da0: 30008de4 .word 0x30008de4 <== NOT EXECUTED 30008da4: 30008eac .word 0x30008eac <== 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 ) 30008da8: e59f119c ldr r1, [pc, #412] ; 30008f4c 30008dac: e5912000 ldr r2, [r1] 30008db0: e5922018 ldr r2, [r2, #24] 30008db4: e1530002 cmp r3, r2 30008db8: 0affffdb beq 30008d2c /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 30008dbc: e594e010 ldr lr, [r4, #16] 30008dc0: e59e201c ldr r2, [lr, #28] 30008dc4: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 30008dc8: 028dc024 addeq ip, sp, #36 ; 0x24 30008dcc: 028ee008 addeq lr, lr, #8 30008dd0: 0a000019 beq 30008e3c *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 30008dd4: e5936008 ldr r6, [r3, #8] 30008dd8: e3560000 cmp r6, #0 30008ddc: 1a00002d bne 30008e98 30008de0: ea00003d b 30008edc pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 30008de4: e593304c ldr r3, [r3, #76] ; 0x4c 30008de8: e3530003 cmp r3, #3 30008dec: 0a000001 beq 30008df8 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 30008df0: e3530004 cmp r3, #4 30008df4: 1a000005 bne 30008e10 result = IMFS_evaluate_link( pathloc, 0 ); 30008df8: e1a00004 mov r0, r4 30008dfc: e3a01000 mov r1, #0 30008e00: ebffff93 bl 30008c54 if ( result == -1 ) 30008e04: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 30008e08: e1a06000 mov r6, r0 if ( result == -1 ) 30008e0c: 0a00004b beq 30008f40 return -1; } node = pathloc->node_access; 30008e10: e5940000 ldr r0, [r4] if ( !node ) 30008e14: e3500000 cmp r0, #0 30008e18: 0a00003c beq 30008f10 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30008e1c: e590304c ldr r3, [r0, #76] ; 0x4c 30008e20: e3530001 cmp r3, #1 30008e24: 1a000039 bne 30008f10 /* * 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 ) { 30008e28: e590e05c ldr lr, [r0, #92] ; 0x5c 30008e2c: e35e0000 cmp lr, #0 30008e30: 0a000014 beq 30008e88 newloc = node->info.directory.mt_fs->mt_fs_root; 30008e34: e28dc024 add ip, sp, #36 ; 0x24 30008e38: e28ee01c add lr, lr, #28 30008e3c: e8be000f ldm lr!, {r0, r1, r2, r3} 30008e40: e8ac000f stmia ip!, {r0, r1, r2, r3} 30008e44: e59ee000 ldr lr, [lr] 30008e48: e58ce000 str lr, [ip] *pathloc = newloc; 30008e4c: e28dc024 add ip, sp, #36 ; 0x24 30008e50: e8bc000f ldm ip!, {r0, r1, r2, r3} 30008e54: e1a0c004 mov ip, r4 30008e58: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30008e5c: 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; 30008e60: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30008e64: e0625005 rsb r5, r2, r5 30008e68: e594300c ldr r3, [r4, #12] 30008e6c: e0870005 add r0, r7, r5 30008e70: e1a01004 mov r1, r4 30008e74: e1a0200a mov r2, sl 30008e78: e1a0e00f mov lr, pc 30008e7c: e593f004 ldr pc, [r3, #4] 30008e80: e1a06000 mov r6, r0 30008e84: ea00002d b 30008f40 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 30008e88: e1a0100d mov r1, sp 30008e8c: eb00005e bl 3000900c /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 30008e90: e2506000 subs r6, r0, #0 30008e94: 0a000007 beq 30008eb8 done = true; else pathloc->node_access = node; 30008e98: e5846000 str r6, [r4] 30008e9c: eaffffa2 b 30008d2c break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 30008ea0: eb000b7d bl 3000bc9c <__errno> 30008ea4: e3a03011 mov r3, #17 30008ea8: ea000022 b 30008f38 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30008eac: eb000b7a bl 3000bc9c <__errno> 30008eb0: e3a0305b mov r3, #91 ; 0x5b 30008eb4: ea00001f b 30008f38 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 30008eb8: e59d3038 ldr r3, [sp, #56] ; 0x38 30008ebc: e0633005 rsb r3, r3, r5 30008ec0: e0873003 add r3, r7, r3 30008ec4: 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( 30008ec8: 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++) { 30008ecc: ea000005 b 30008ee8 if ( !IMFS_is_separator( path[ i ] ) ) 30008ed0: ebffe748 bl 30002bf8 30008ed4: e3500000 cmp r0, #0 30008ed8: 1a000002 bne 30008ee8 rtems_set_errno_and_return_minus_one( ENOENT ); 30008edc: eb000b6e bl 3000bc9c <__errno> 30008ee0: e3a03002 mov r3, #2 30008ee4: ea000013 b 30008f38 /* * 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++) { 30008ee8: e4d50001 ldrb r0, [r5], #1 30008eec: e3500000 cmp r0, #0 30008ef0: 1afffff6 bne 30008ed0 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 30008ef4: e1a00004 mov r0, r4 30008ef8: ebfffe60 bl 30008880 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 30008efc: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 30008f00: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 30008f04: e593304c ldr r3, [r3, #76] ; 0x4c 30008f08: e3530001 cmp r3, #1 30008f0c: 0a000002 beq 30008f1c rtems_set_errno_and_return_minus_one( ENOTDIR ); 30008f10: eb000b61 bl 3000bc9c <__errno> 30008f14: e3a03014 mov r3, #20 30008f18: ea000006 b 30008f38 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 30008f1c: e1a00004 mov r0, r4 30008f20: e3a01003 mov r1, #3 30008f24: ebfffe72 bl 300088f4 30008f28: e3500000 cmp r0, #0 30008f2c: 1a000003 bne 30008f40 rtems_set_errno_and_return_minus_one( EACCES ); 30008f30: eb000b59 bl 3000bc9c <__errno> 30008f34: e3a0300d mov r3, #13 30008f38: e5803000 str r3, [r0] 30008f3c: e3e06000 mvn r6, #0 return result; } 30008f40: e1a00006 mov r0, r6 30008f44: e28dd03c add sp, sp, #60 ; 0x3c 30008f48: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 300088f4 : uid_t st_uid; gid_t st_gid; IMFS_jnode_t *jnode; int flags_to_test; if ( !rtems_libio_is_valid_perms( flags ) ) 300088f4: e3d13007 bics r3, r1, #7 */ int IMFS_evaluate_permission( rtems_filesystem_location_info_t *node, int flags ) { 300088f8: 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 ) ) 300088fc: 0a000004 beq 30008914 rtems_set_errno_and_return_minus_one( EPERM ); 30008900: eb000ce5 bl 3000bc9c <__errno> <== NOT EXECUTED 30008904: e3a03001 mov r3, #1 <== NOT EXECUTED 30008908: e5803000 str r3, [r0] <== NOT EXECUTED 3000890c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30008910: 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 ) 30008914: e5903000 ldr r3, [r0] */ flags_to_test = flags; if ( st_uid == jnode->st_uid ) flags_to_test <<= 6; 30008918: 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 ) 3000891c: e5930030 ldr r0, [r3, #48] ; 0x30 30008920: 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 ); 30008924: e1500001 cmp r0, r1 30008928: 13a00000 movne r0, #0 3000892c: 03a00001 moveq r0, #1 */ if ( ( flags_to_test & jnode->st_mode) == flags_to_test ) return 1; return 0; } 30008930: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30008f50 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 30008f50: 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; 30008f54: e1a0c000 mov ip, r0 ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 30008f58: 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; 30008f5c: e5bc401c ldr r4, [ip, #28]! loc = temp_mt_entry->mt_fs_root; 30008f60: e1a0e00d mov lr, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 30008f64: e1a05000 mov r5, r0 * 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; 30008f68: e8bc000f ldm ip!, {r0, r1, r2, r3} 30008f6c: e8ae000f stmia lr!, {r0, r1, r2, r3} 30008f70: e59c3000 ldr r3, [ip] 30008f74: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 30008f78: e3a03000 mov r3, #0 30008f7c: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 30008f80: e1a0500d mov r5, sp 30008f84: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 30008f88: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 30008f8c: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 30008f90: ebfffe3a bl 30008880 if ( jnode->type != IMFS_DIRECTORY ) { 30008f94: e594304c ldr r3, [r4, #76] ; 0x4c 30008f98: e3530001 cmp r3, #1 30008f9c: 1a000003 bne 30008fb0 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 30008fa0: e5942050 ldr r2, [r4, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30008fa4: e2843054 add r3, r4, #84 ; 0x54 30008fa8: e1520003 cmp r2, r3 30008fac: 1a000005 bne 30008fc8 result = IMFS_unlink( NULL, &loc ); 30008fb0: e3a00000 mov r0, #0 30008fb4: e1a0100d mov r1, sp 30008fb8: ebffe263 bl 3000194c if (result != 0) 30008fbc: e3500000 cmp r0, #0 30008fc0: 1a00000c bne 30008ff8 return -1; jnode = next; 30008fc4: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 30008fc8: e3540000 cmp r4, #0 30008fcc: 0a00000b beq 30009000 if ( jnode->type == IMFS_DIRECTORY ) { 30008fd0: e594304c ldr r3, [r4, #76] ; 0x4c 30008fd4: e3530001 cmp r3, #1 30008fd8: 1affffe9 bne 30008f84 if ( jnode_has_children( jnode ) ) 30008fdc: e5943050 ldr r3, [r4, #80] ; 0x50 30008fe0: e2842054 add r2, r4, #84 ; 0x54 30008fe4: e1530002 cmp r3, r2 30008fe8: 0affffe5 beq 30008f84 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 30008fec: e2534000 subs r4, r3, #0 30008ff0: 1affffe3 bne 30008f84 30008ff4: ea000001 b 30009000 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 30008ff8: e3e00000 mvn r0, #0 <== NOT EXECUTED 30008ffc: ea000000 b 30009004 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 30009000: e1a00004 mov r0, r4 } 30009004: e28dd014 add sp, sp, #20 30009008: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 3000a844 : my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000a844: e59f31e4 ldr r3, [pc, #484] ; 3000aa30 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000a848: 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 ) { 3000a84c: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000a850: e1a04000 mov r4, r0 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000a854: e1a05125 lsr r5, r5, #2 3000a858: e2453001 sub r3, r5, #1 3000a85c: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000a860: e1a06001 mov r6, r1 3000a864: e1a08002 mov r8, r2 my_block = block; /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000a868: 8a00000e bhi 3000a8a8 p = info->indirect; if ( malloc_it ) { 3000a86c: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 3000a870: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 3000a874: 0a000007 beq 3000a898 if ( !p ) { 3000a878: e3500000 cmp r0, #0 3000a87c: 1a000003 bne 3000a890 p = memfile_alloc_block(); 3000a880: ebffffe2 bl 3000a810 if ( !p ) 3000a884: e3500000 cmp r0, #0 3000a888: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; 3000a88c: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; 3000a890: e5940058 ldr r0, [r4, #88] ; 0x58 3000a894: ea000001 b 3000a8a0 } if ( !p ) 3000a898: e3500000 cmp r0, #0 3000a89c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; 3000a8a0: e0800106 add r0, r0, r6, lsl #2 3000a8a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 3000a8a8: e2853001 add r3, r5, #1 3000a8ac: e0030395 mul r3, r5, r3 3000a8b0: e2432001 sub r2, r3, #1 3000a8b4: e1510002 cmp r1, r2 3000a8b8: 8a000021 bhi 3000a944 my_block -= FIRST_DOUBLY_INDIRECT; 3000a8bc: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000a8c0: e1a00006 mov r0, r6 3000a8c4: e1a01005 mov r1, r5 3000a8c8: eb00132a bl 3000f578 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000a8cc: e1a01005 mov r1, r5 */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000a8d0: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000a8d4: e1a00006 mov r0, r6 3000a8d8: eb00128e bl 3000f318 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 3000a8dc: 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; 3000a8e0: e1a05000 mov r5, r0 p = info->doubly_indirect; 3000a8e4: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { 3000a8e8: 0a00000e beq 3000a928 if ( !p ) { 3000a8ec: e3500000 cmp r0, #0 3000a8f0: 1a000003 bne 3000a904 p = memfile_alloc_block(); 3000a8f4: ebffffc5 bl 3000a810 if ( !p ) 3000a8f8: e3500000 cmp r0, #0 3000a8fc: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; 3000a900: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; 3000a904: e0804105 add r4, r0, r5, lsl #2 3000a908: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { 3000a90c: e3500000 cmp r0, #0 3000a910: 1a000009 bne 3000a93c p1 = memfile_alloc_block(); 3000a914: ebffffbd bl 3000a810 if ( !p1 ) 3000a918: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 3000a91c: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 3000a920: 1a000005 bne 3000a93c 3000a924: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 3000a928: e3500000 cmp r0, #0 3000a92c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; 3000a930: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) 3000a934: e3500000 cmp r0, #0 3000a938: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p[ singly ]; 3000a93c: e0800107 add r0, r0, r7, lsl #2 3000a940: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000a944: e2832001 add r2, r3, #1 3000a948: e0020295 mul r2, r5, r2 3000a94c: e2422001 sub r2, r2, #1 3000a950: e1510002 cmp r1, r2 3000a954: 8a000033 bhi 3000aa28 my_block -= FIRST_TRIPLY_INDIRECT; 3000a958: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000a95c: e1a00006 mov r0, r6 3000a960: e1a01005 mov r1, r5 3000a964: eb001303 bl 3000f578 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000a968: 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; 3000a96c: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000a970: e1a00006 mov r0, r6 3000a974: eb001267 bl 3000f318 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000a978: 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; 3000a97c: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000a980: eb001264 bl 3000f318 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000a984: 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; 3000a988: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000a98c: e1a00006 mov r0, r6 3000a990: eb0012f8 bl 3000f578 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { 3000a994: 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; 3000a998: e1a05000 mov r5, r0 p = info->triply_indirect; 3000a99c: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { 3000a9a0: 0a000016 beq 3000aa00 if ( !p ) { 3000a9a4: e3500000 cmp r0, #0 3000a9a8: 1a000003 bne 3000a9bc p = memfile_alloc_block(); 3000a9ac: ebffff97 bl 3000a810 if ( !p ) 3000a9b0: e3500000 cmp r0, #0 3000a9b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->triply_indirect = p; 3000a9b8: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; 3000a9bc: e0804107 add r4, r0, r7, lsl #2 3000a9c0: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { 3000a9c4: e3500000 cmp r0, #0 3000a9c8: 1a000003 bne 3000a9dc p1 = memfile_alloc_block(); 3000a9cc: ebffff8f bl 3000a810 if ( !p1 ) 3000a9d0: e3500000 cmp r0, #0 3000a9d4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p[ triply ] = (block_p) p1; 3000a9d8: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; 3000a9dc: e0804105 add r4, r0, r5, lsl #2 3000a9e0: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { 3000a9e4: e3500000 cmp r0, #0 3000a9e8: 1a00000c bne 3000aa20 p2 = memfile_alloc_block(); 3000a9ec: ebffff87 bl 3000a810 if ( !p2 ) 3000a9f0: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; 3000a9f4: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 3000a9f8: 1a000008 bne 3000aa20 3000a9fc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3000aa00: e3500000 cmp r0, #0 3000aa04: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p1 = (block_p *) p[ triply ]; 3000aa08: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) 3000aa0c: e3500000 cmp r0, #0 3000aa10: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p2 = (block_p *)p1[ doubly ]; 3000aa14: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) 3000aa18: e3500000 cmp r0, #0 3000aa1c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return (block_p *)&p2[ singly ]; 3000aa20: e080010a add r0, r0, sl, lsl #2 3000aa24: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } /* * This means the requested block number is out of range. */ return 0; 3000aa28: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000aa2c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 300017ec : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 300017ec: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 300017f0: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 300017f4: e593204c ldr r2, [r3, #76] ; 0x4c 300017f8: e3520001 cmp r2, #1 300017fc: 0a000004 beq 30001814 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30001800: eb002925 bl 3000bc9c <__errno> <== NOT EXECUTED 30001804: e3a03014 mov r3, #20 <== NOT EXECUTED 30001808: e5803000 str r3, [r0] <== NOT EXECUTED 3000180c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001810: 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; 30001814: e583005c str r0, [r3, #92] ; 0x5c return 0; 30001818: e3a00000 mov r0, #0 } 3000181c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30004170 : * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 30004170: e92d4030 push {r4, r5, lr} IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 30004174: e59f50e0 ldr r5, [pc, #224] ; 3000425c * This routine prints the contents of the specified jnode. */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 30004178: e1a04000 mov r4, r0 IMFS_assert( the_jnode ); fprintf(stdout, "%s", the_jnode->name ); 3000417c: e5953000 ldr r3, [r5] 30004180: e280000c add r0, r0, #12 30004184: e5931008 ldr r1, [r3, #8] 30004188: eb00309c bl 30010400 switch( the_jnode->type ) { 3000418c: e594204c ldr r2, [r4, #76] ; 0x4c 30004190: e2423001 sub r3, r2, #1 30004194: e3530006 cmp r3, #6 30004198: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000419c: ea000026 b 3000423c <== NOT EXECUTED 300041a0: 300041bc .word 0x300041bc <== NOT EXECUTED 300041a4: 300041d0 .word 0x300041d0 <== NOT EXECUTED 300041a8: 3000421c .word 0x3000421c <== NOT EXECUTED 300041ac: 3000421c .word 0x3000421c <== NOT EXECUTED 300041b0: 30004204 .word 0x30004204 <== NOT EXECUTED 300041b4: 300041e8 .word 0x300041e8 <== NOT EXECUTED 300041b8: 30004228 .word 0x30004228 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 300041bc: e5953000 ldr r3, [r5] 300041c0: e3a0002f mov r0, #47 ; 0x2f 300041c4: e5931008 ldr r1, [r3, #8] 300041c8: eb003057 bl 3001032c break; 300041cc: ea00001f b 30004250 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 300041d0: e5953000 ldr r3, [r5] 300041d4: e59f1084 ldr r1, [pc, #132] ; 30004260 300041d8: e5930008 ldr r0, [r3, #8] 300041dc: e5942050 ldr r2, [r4, #80] ; 0x50 300041e0: e5943054 ldr r3, [r4, #84] ; 0x54 300041e4: ea000004 b 300041fc the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 300041e8: e5953000 ldr r3, [r5] 300041ec: e59f1070 ldr r1, [pc, #112] ; 30004264 300041f0: e5930008 ldr r0, [r3, #8] 300041f4: e5942050 ldr r2, [r4, #80] ; 0x50 300041f8: e5943058 ldr r3, [r4, #88] ; 0x58 300041fc: eb00302a bl 300102ac (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 30004200: ea000012 b 30004250 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 30004204: e5953000 ldr r3, [r5] 30004208: e59f1058 ldr r1, [pc, #88] ; 30004268 3000420c: e5930008 ldr r0, [r3, #8] 30004210: e5942050 ldr r2, [r4, #80] ; 0x50 30004214: eb003024 bl 300102ac (uint32_t)the_jnode->info.file.size ); #endif break; 30004218: ea00000c b 30004250 case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3000421c: e5953000 ldr r3, [r5] <== NOT EXECUTED 30004220: e59f0044 ldr r0, [pc, #68] ; 3000426c <== NOT EXECUTED 30004224: ea000001 b 30004230 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 30004228: e5953000 ldr r3, [r5] <== NOT EXECUTED 3000422c: e59f003c ldr r0, [pc, #60] ; 30004270 <== NOT EXECUTED 30004230: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 30004234: 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" ); 30004238: ea003070 b 30010400 <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 3000423c: e5953000 ldr r3, [r5] <== NOT EXECUTED 30004240: e59f102c ldr r1, [pc, #44] ; 30004274 <== NOT EXECUTED 30004244: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 30004248: 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 ); 3000424c: ea003016 b 300102ac <== NOT EXECUTED return; } puts(""); 30004250: e59f0020 ldr r0, [pc, #32] ; 30004278 } 30004254: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 30004258: ea003742 b 30011f68 =============================================================================== 30009234 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 30009234: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 30009238: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 3000923c: e593204c ldr r2, [r3, #76] ; 0x4c 30009240: e2422002 sub r2, r2, #2 30009244: e3520005 cmp r2, #5 30009248: 979ff102 ldrls pc, [pc, r2, lsl #2] 3000924c: ea000012 b 3000929c <== NOT EXECUTED 30009250: 30009268 .word 0x30009268 <== NOT EXECUTED 30009254: 3000929c .word 0x3000929c <== NOT EXECUTED 30009258: 30009288 .word 0x30009288 <== NOT EXECUTED 3000925c: 3000927c .word 0x3000927c <== NOT EXECUTED 30009260: 3000927c .word 0x3000927c <== NOT EXECUTED 30009264: 30009288 .word 0x30009288 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 30009268: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 3000926c: e593c050 ldr ip, [r3, #80] ; 0x50 30009270: e581201c str r2, [r1, #28] 30009274: e581c018 str ip, [r1, #24] break; 30009278: ea00000c b 300092b0 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 3000927c: e283c050 add ip, r3, #80 ; 0x50 30009280: e89c1800 ldm ip, {fp, ip} 30009284: ea000001 b 30009290 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 30009288: e3a0b000 mov fp, #0 3000928c: e3a0c000 mov ip, #0 30009290: e581b020 str fp, [r1, #32] 30009294: e581c024 str ip, [r1, #36] ; 0x24 break; 30009298: ea000004 b 300092b0 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 3000929c: eb000a7e bl 3000bc9c <__errno> 300092a0: e3a03086 mov r3, #134 ; 0x86 300092a4: e5803000 str r3, [r0] 300092a8: e3e00000 mvn r0, #0 300092ac: 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; 300092b0: e5902010 ldr r2, [r0, #16] 300092b4: e59f0050 ldr r0, [pc, #80] ; 3000930c buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 300092b8: e5922034 ldr r2, [r2, #52] ; 0x34 300092bc: 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 = 300092c0: e8810005 stm r1, {r0, r2} rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 300092c4: e5932030 ldr r2, [r3, #48] ; 0x30 buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; 300092c8: e3a00000 mov r0, #0 */ fs_info = loc->mt_entry->fs_info; buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 300092cc: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 300092d0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 300092d4: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 300092d8: e5932038 ldr r2, [r3, #56] ; 0x38 300092dc: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 300092e0: e1d323bc ldrh r2, [r3, #60] ; 0x3c 300092e4: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 300092e8: e1d323be ldrh r2, [r3, #62] ; 0x3e 300092ec: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 300092f0: e5932040 ldr r2, [r3, #64] ; 0x40 300092f4: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 300092f8: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; 300092fc: e5933048 ldr r3, [r3, #72] ; 0x48 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; 30009300: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 30009304: e5813038 str r3, [r1, #56] ; 0x38 return 0; } 30009308: e8bd8800 pop {fp, pc} =============================================================================== 3000194c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 3000194c: 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; 30001950: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30001954: e24dd01c sub sp, sp, #28 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30001958: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 3000195c: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30001960: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30001964: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30001968: 1a000024 bne 30001a00 if ( !node->info.hard_link.link_node ) 3000196c: e595e050 ldr lr, [r5, #80] ; 0x50 30001970: e35e0000 cmp lr, #0 30001974: 1a000003 bne 30001988 rtems_set_errno_and_return_minus_one( EINVAL ); 30001978: eb0028c7 bl 3000bc9c <__errno> <== NOT EXECUTED 3000197c: e3a03016 mov r3, #22 <== NOT EXECUTED 30001980: e5803000 str r3, [r0] <== NOT EXECUTED 30001984: ea000023 b 30001a18 <== NOT EXECUTED the_link = *loc; 30001988: e1a0c00d mov ip, sp 3000198c: e1a07001 mov r7, r1 30001990: e8b7000f ldm r7!, {r0, r1, r2, r3} 30001994: e8ac000f stmia ip!, {r0, r1, r2, r3} 30001998: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; 3000199c: e28d701c add r7, sp, #28 300019a0: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); 300019a4: 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; 300019a8: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 300019ac: eb001bb3 bl 30008880 /* * 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) 300019b0: e5953050 ldr r3, [r5, #80] ; 0x50 300019b4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 300019b8: e3520001 cmp r2, #1 300019bc: 1a000007 bne 300019e0 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 300019c0: e1a00006 mov r0, r6 300019c4: e1a0100d mov r1, sp 300019c8: e59d3008 ldr r3, [sp, #8] 300019cc: e1a0e00f mov lr, pc 300019d0: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 300019d4: e3500000 cmp r0, #0 300019d8: 0a000008 beq 30001a00 300019dc: ea00000d b 30001a18 return -1; } else { node->info.hard_link.link_node->st_nlink --; 300019e0: e2422001 sub r2, r2, #1 300019e4: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 300019e8: e28d0014 add r0, sp, #20 300019ec: e3a01000 mov r1, #0 300019f0: eb00012c bl 30001ea8 300019f4: e5953050 ldr r3, [r5, #80] ; 0x50 300019f8: e59d2014 ldr r2, [sp, #20] 300019fc: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 30001a00: e5943008 ldr r3, [r4, #8] 30001a04: e1a00006 mov r0, r6 30001a08: e1a01004 mov r1, r4 30001a0c: e1a0e00f mov lr, pc 30001a10: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 30001a14: ea000000 b 30001a1c if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 30001a18: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 30001a1c: e28dd01c add sp, sp, #28 30001a20: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30001a24 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30001a24: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30001a28: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30001a2c: e593204c ldr r2, [r3, #76] ; 0x4c 30001a30: e3520001 cmp r2, #1 30001a34: 0a000002 beq 30001a44 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30001a38: eb002897 bl 3000bc9c <__errno> <== NOT EXECUTED 30001a3c: e3a03014 mov r3, #20 <== NOT EXECUTED 30001a40: ea000004 b 30001a58 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 30001a44: e593205c ldr r2, [r3, #92] ; 0x5c 30001a48: e3520000 cmp r2, #0 30001a4c: 1a000004 bne 30001a64 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 30001a50: eb002891 bl 3000bc9c <__errno> <== NOT EXECUTED 30001a54: e3a03016 mov r3, #22 <== NOT EXECUTED 30001a58: e5803000 str r3, [r0] <== NOT EXECUTED 30001a5c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001a60: 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; 30001a64: e3a00000 mov r0, #0 30001a68: e583005c str r0, [r3, #92] ; 0x5c return 0; } 30001a6c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30001548 : static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 30001548: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr}<== NOT EXECUTED { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 3000154c: e59030c4 ldr r3, [r0, #196] ; 0xc4 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 30001550: e59070c0 ldr r7, [r0, #192] ; 0xc0 <== NOT EXECUTED { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } low = Stack_check_usable_stack_start(stack); 30001554: e2832010 add r2, r3, #16 <== NOT EXECUTED size = Stack_check_usable_stack_size(stack); 30001558: e2477010 sub r7, r7, #16 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 3000155c: e3c71003 bic r1, r7, #3 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 30001560: e1a05000 mov r5, r0 <== NOT EXECUTED current = 0; } else #endif { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 30001564: e590b0f0 ldr fp, [r0, #240] ; 0xf0 <== NOT EXECUTED /* * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; 30001568: e2820010 add r0, r2, #16 <== NOT EXECUTED for (ebase = base + length; base < ebase; base++) 3000156c: e0800001 add r0, r0, r1 <== NOT EXECUTED * 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( 30001570: e2833020 add r3, r3, #32 <== NOT EXECUTED * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) if (*base != U32_PATTERN) 30001574: e59f10c0 ldr r1, [pc, #192] ; 3000163c <== NOT EXECUTED 30001578: ea000002 b 30001588 <== NOT EXECUTED 3000157c: e493c004 ldr ip, [r3], #4 <== NOT EXECUTED 30001580: e15c0001 cmp ip, r1 <== NOT EXECUTED 30001584: 1a000004 bne 3000159c <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 30001588: e1530000 cmp r3, r0 <== NOT EXECUTED if (*base != U32_PATTERN) 3000158c: e1a06003 mov r6, r3 <== NOT EXECUTED * start at lower memory and find first word that does not * match pattern */ base += PATTERN_SIZE_WORDS; for (ebase = base + length; base < ebase; base++) 30001590: 3afffff9 bcc 3000157c <== NOT EXECUTED 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; 30001594: e3a06000 mov r6, #0 <== NOT EXECUTED 30001598: ea000002 b 300015a8 <== 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 ) 3000159c: e3560000 cmp r6, #0 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); 300015a0: 10822007 addne r2, r2, r7 <== NOT EXECUTED 300015a4: 10666002 rsbne r6, r6, r2 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) if ( the_thread ) #endif { (*print_handler)( 300015a8: e5958008 ldr r8, [r5, #8] <== NOT EXECUTED 300015ac: e59f408c ldr r4, [pc, #140] ; 30001640 <== NOT EXECUTED 300015b0: e3a01005 mov r1, #5 <== NOT EXECUTED 300015b4: e28d2008 add r2, sp, #8 <== NOT EXECUTED 300015b8: e1a00008 mov r0, r8 <== NOT EXECUTED 300015bc: e8940600 ldm r4, {r9, sl} <== NOT EXECUTED 300015c0: eb000ee3 bl 30005154 <== NOT EXECUTED 300015c4: e59f1078 ldr r1, [pc, #120] ; 30001644 <== NOT EXECUTED 300015c8: e1a03000 mov r3, r0 <== NOT EXECUTED 300015cc: e1a02008 mov r2, r8 <== NOT EXECUTED 300015d0: e1a0000a mov r0, sl <== NOT EXECUTED 300015d4: e1a0e00f mov lr, pc <== NOT EXECUTED 300015d8: e12fff19 bx r9 <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 300015dc: e59530c0 ldr r3, [r5, #192] ; 0xc0 <== NOT EXECUTED 300015e0: e59520c4 ldr r2, [r5, #196] ; 0xc4 <== NOT EXECUTED 300015e4: e2433001 sub r3, r3, #1 <== NOT EXECUTED else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } #endif (*print_handler)( 300015e8: e0823003 add r3, r2, r3 <== NOT EXECUTED 300015ec: e58db000 str fp, [sp] <== NOT EXECUTED 300015f0: e58d7004 str r7, [sp, #4] <== NOT EXECUTED 300015f4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 300015f8: e59f1048 ldr r1, [pc, #72] ; 30001648 <== NOT EXECUTED 300015fc: e1a0e00f mov lr, pc <== NOT EXECUTED 30001600: e594f000 ldr pc, [r4] <== NOT EXECUTED stack->area + stack->size - 1, current, size ); if (Stack_check_Initialized == 0) { 30001604: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 30001608: e3530000 cmp r3, #0 <== NOT EXECUTED 3000160c: 1a000004 bne 30001624 <== NOT EXECUTED (*print_handler)( print_context, "Unavailable\n" ); 30001610: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 30001614: e59f1030 ldr r1, [pc, #48] ; 3000164c <== NOT EXECUTED 30001618: e1a0e00f mov lr, pc <== NOT EXECUTED 3000161c: e594f000 ldr pc, [r4] <== NOT EXECUTED 30001620: ea000004 b 30001638 <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); 30001624: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 30001628: e59f1020 ldr r1, [pc, #32] ; 30001650 <== NOT EXECUTED 3000162c: e1a02006 mov r2, r6 <== NOT EXECUTED 30001630: e1a0e00f mov lr, pc <== NOT EXECUTED 30001634: e594f000 ldr pc, [r4] <== NOT EXECUTED } } 30001638: e8bd8fff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc}<== NOT EXECUTED =============================================================================== 300016f8 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 300016f8: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED 300016fc: e1a06000 mov r6, r0 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 30001700: e59040c4 ldr r4, [r0, #196] ; 0xc4 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 30001704: e59f0078 ldr r0, [pc, #120] ; 30001784 <== 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) { 30001708: 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"); 3000170c: eb0005fe bl 30002f0c <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 30001710: e59f0070 ldr r0, [pc, #112] ; 30001788 <== NOT EXECUTED 30001714: e1a01006 mov r1, r6 <== NOT EXECUTED 30001718: eb0005fb bl 30002f0c <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 3000171c: e59f0068 ldr r0, [pc, #104] ; 3000178c <== NOT EXECUTED 30001720: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED 30001724: eb0005f8 bl 30002f0c <== NOT EXECUTED printk( 30001728: e59f0060 ldr r0, [pc, #96] ; 30001790 <== NOT EXECUTED 3000172c: e596100c ldr r1, [r6, #12] <== NOT EXECUTED 30001730: eb0005f5 bl 30002f0c <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 30001734: e1a0200d mov r2, sp <== NOT EXECUTED 30001738: e3a01020 mov r1, #32 <== NOT EXECUTED 3000173c: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED 30001740: eb000e83 bl 30005154 <== NOT EXECUTED 30001744: e1a01000 mov r1, r0 <== NOT EXECUTED 30001748: e59f0044 ldr r0, [pc, #68] ; 30001794 <== NOT EXECUTED 3000174c: eb0005ee bl 30002f0c <== 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) 30001750: e59620c4 ldr r2, [r6, #196] ; 0xc4 <== NOT EXECUTED 30001754: e59610c0 ldr r1, [r6, #192] ; 0xc0 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 30001758: e59f0038 ldr r0, [pc, #56] ; 30001798 <== NOT EXECUTED 3000175c: e0823001 add r3, r2, r1 <== NOT EXECUTED 30001760: eb0005e9 bl 30002f0c <== 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) { 30001764: e3550000 cmp r5, #0 <== NOT EXECUTED printk( 30001768: 059f002c ldreq r0, [pc, #44] ; 3000179c <== NOT EXECUTED 3000176c: 03a01010 moveq r1, #16 <== NOT EXECUTED 30001770: 02842008 addeq r2, r4, #8 <== NOT EXECUTED 30001774: 02843018 addeq r3, r4, #24 <== NOT EXECUTED 30001778: 0b0005e3 bleq 30002f0c <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 3000177c: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED 30001780: eb001084 bl 30005998 <== NOT EXECUTED =============================================================================== 30014c48 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30014c48: 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 ) { 30014c4c: 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 ) { 30014c50: 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 ) { 30014c54: e1a06000 mov r6, r0 30014c58: e1a0a001 mov sl, r1 30014c5c: e1a07002 mov r7, r2 30014c60: 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 ) { 30014c64: 8a000013 bhi 30014cb8 <_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 ) { 30014c68: e5905048 ldr r5, [r0, #72] ; 0x48 30014c6c: e3550000 cmp r5, #0 *count = 0; 30014c70: 13a00000 movne r0, #0 30014c74: 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 ) { 30014c78: 0a000007 beq 30014c9c <_CORE_message_queue_Broadcast+0x54> 30014c7c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30014c80: e594002c ldr r0, [r4, #44] ; 0x2c 30014c84: e1a0100a mov r1, sl 30014c88: e1a02007 mov r2, r7 30014c8c: eb001e49 bl 3001c5b8 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30014c90: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 30014c94: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30014c98: e5837000 str r7, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 30014c9c: e1a00006 mov r0, r6 30014ca0: eb00099b bl 30017314 <_Thread_queue_Dequeue> 30014ca4: e2504000 subs r4, r0, #0 30014ca8: 1afffff4 bne 30014c80 <_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; 30014cac: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 30014cb0: e1a00004 mov r0, r4 30014cb4: 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; 30014cb8: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30014cbc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 30009ecc <_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 ) { 30009ecc: e1a03000 mov r3, r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 30009ed0: e59f2124 ldr r2, [pc, #292] ; 30009ffc <_CORE_mutex_Seize_interrupt_trylock+0x130> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 30009ed4: 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; 30009ed8: e3a00000 mov r0, #0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 30009edc: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 30009ee0: e15c0000 cmp ip, r0 30009ee4: e92d4010 push {r4, lr} Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 30009ee8: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 30009eec: 0a00002c beq 30009fa4 <_CORE_mutex_Seize_interrupt_trylock+0xd8> the_mutex->lock = CORE_MUTEX_LOCKED; 30009ef0: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 30009ef4: e5920008 ldr r0, [r2, #8] 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; 30009ef8: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; 30009efc: e5830060 str r0, [r3, #96] ; 0x60 the_mutex->nest_count = 1; 30009f00: e3a00001 mov r0, #1 30009f04: e5830054 str r0, [r3, #84] ; 0x54 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 30009f08: e5930048 ldr r0, [r3, #72] ; 0x48 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 30009f0c: e3500002 cmp r0, #2 30009f10: 0a000001 beq 30009f1c <_CORE_mutex_Seize_interrupt_trylock+0x50> 30009f14: e3500003 cmp r0, #3 30009f18: 1a000004 bne 30009f30 <_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++; 30009f1c: e592c01c ldr ip, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 30009f20: 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++; 30009f24: e28c4001 add r4, ip, #1 30009f28: e582401c str r4, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 30009f2c: 0a000000 beq 30009f34 <_CORE_mutex_Seize_interrupt_trylock+0x68> _ISR_Enable( *level_p ); 30009f30: ea00002b b 30009fe4 <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 30009f34: e593004c ldr r0, [r3, #76] ; 0x4c current = executing->current_priority; 30009f38: e5924014 ldr r4, [r2, #20] if ( current == ceiling ) { 30009f3c: e1540000 cmp r4, r0 30009f40: 1a000000 bne 30009f48 <_CORE_mutex_Seize_interrupt_trylock+0x7c> _ISR_Enable( *level_p ); 30009f44: ea000026 b 30009fe4 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 30009f48: 9a00000b bls 30009f7c <_CORE_mutex_Seize_interrupt_trylock+0xb0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 30009f4c: e59f20ac ldr r2, [pc, #172] ; 3000a000 <_CORE_mutex_Seize_interrupt_trylock+0x134> 30009f50: e5920000 ldr r0, [r2] 30009f54: e2800001 add r0, r0, #1 30009f58: e5820000 str r0, [r2] 30009f5c: e5912000 ldr r2, [r1] 30009f60: e129f002 msr CPSR_fc, r2 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 30009f64: e3a02000 mov r2, #0 30009f68: e593005c ldr r0, [r3, #92] ; 0x5c 30009f6c: e593104c ldr r1, [r3, #76] ; 0x4c 30009f70: ebfff29f bl 300069f4 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 30009f74: ebfff3e5 bl 30006f10 <_Thread_Enable_dispatch> 30009f78: ea00001b b 30009fec <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 30009f7c: e3a00006 mov r0, #6 30009f80: e5820034 str r0, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; 30009f84: e3a00001 mov r0, #1 30009f88: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ 30009f8c: e3a00000 mov r0, #0 30009f90: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ 30009f94: e582c01c str ip, [r2, #28] 30009f98: e5913000 ldr r3, [r1] 30009f9c: e129f003 msr CPSR_fc, r3 30009fa0: 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 ) ) { 30009fa4: e593005c ldr r0, [r3, #92] ; 0x5c 30009fa8: e1500002 cmp r0, r2 /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 30009fac: 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 ) ) { 30009fb0: 18bd8010 popne {r4, pc} switch ( the_mutex->Attributes.lock_nesting_behavior ) { 30009fb4: e5932040 ldr r2, [r3, #64] ; 0x40 30009fb8: e3520000 cmp r2, #0 30009fbc: 0a000002 beq 30009fcc <_CORE_mutex_Seize_interrupt_trylock+0x100> 30009fc0: e3520001 cmp r2, #1 30009fc4: 1a00000a bne 30009ff4 <_CORE_mutex_Seize_interrupt_trylock+0x128> 30009fc8: ea000003 b 30009fdc <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 30009fcc: e5932054 ldr r2, [r3, #84] ; 0x54 30009fd0: e2822001 add r2, r2, #1 30009fd4: e5832054 str r2, [r3, #84] ; 0x54 _ISR_Enable( *level_p ); 30009fd8: ea000001 b 30009fe4 <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 30009fdc: e3a03002 mov r3, #2 <== NOT EXECUTED 30009fe0: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED 30009fe4: e5913000 ldr r3, [r1] 30009fe8: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; 30009fec: e3a00000 mov r0, #0 30009ff0: e8bd8010 pop {r4, pc} /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 30009ff4: e3a00001 mov r0, #1 30009ff8: e8bd8010 pop {r4, pc} =============================================================================== 30006da8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006da8: 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; 30006dac: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006db0: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 30006db4: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 30006db8: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 30006dbc: e59f4500 ldr r4, [pc, #1280] ; 300072c4 <_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; 30006dc0: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 30006dc4: e59f34fc ldr r3, [pc, #1276] ; 300072c8 <_Heap_Walk+0x520> 30006dc8: e31200ff tst r2, #255 ; 0xff 30006dcc: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006dd0: e59f34f4 ldr r3, [pc, #1268] ; 300072cc <_Heap_Walk+0x524> 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; 30006dd4: 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() ) ) { 30006dd8: e5933000 ldr r3, [r3] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006ddc: e1a06000 mov r6, r0 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() ) ) { 30006de0: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006de4: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 30006de8: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 30006dec: 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() ) ) { 30006df0: 1a000127 bne 30007294 <_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)( 30006df4: e59dc024 ldr ip, [sp, #36] ; 0x24 30006df8: e59d2020 ldr r2, [sp, #32] 30006dfc: e58dc000 str ip, [sp] 30006e00: e5903018 ldr r3, [r0, #24] 30006e04: e58d3004 str r3, [sp, #4] 30006e08: e590301c ldr r3, [r0, #28] 30006e0c: e58d200c str r2, [sp, #12] 30006e10: e58d3008 str r3, [sp, #8] 30006e14: e59d3028 ldr r3, [sp, #40] ; 0x28 30006e18: e59f24b0 ldr r2, [pc, #1200] ; 300072d0 <_Heap_Walk+0x528> 30006e1c: e58d3010 str r3, [sp, #16] 30006e20: e5903008 ldr r3, [r0, #8] 30006e24: e58d3014 str r3, [sp, #20] 30006e28: e590300c ldr r3, [r0, #12] 30006e2c: e1a00001 mov r0, r1 30006e30: e58d3018 str r3, [sp, #24] 30006e34: e3a01000 mov r1, #0 30006e38: e1a03009 mov r3, r9 30006e3c: e1a0e00f mov lr, pc 30006e40: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 30006e44: e3590000 cmp r9, #0 30006e48: 1a000006 bne 30006e68 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 30006e4c: e1a00005 mov r0, r5 30006e50: e3a01001 mov r1, #1 30006e54: e59f2478 ldr r2, [pc, #1144] ; 300072d4 <_Heap_Walk+0x52c> 30006e58: e1a0e00f mov lr, pc 30006e5c: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30006e60: e1a08009 mov r8, r9 30006e64: ea00010b b 30007298 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 30006e68: e2198003 ands r8, r9, #3 (*printer)( 30006e6c: 11a00005 movne r0, r5 30006e70: 13a01001 movne r1, #1 30006e74: 159f245c ldrne r2, [pc, #1116] ; 300072d8 <_Heap_Walk+0x530> 30006e78: 11a03009 movne r3, r9 30006e7c: 1a00010c bne 300072b4 <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30006e80: e59d0024 ldr r0, [sp, #36] ; 0x24 30006e84: e1a01009 mov r1, r9 30006e88: ebffe743 bl 30000b9c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 30006e8c: e250b000 subs fp, r0, #0 30006e90: 0a000006 beq 30006eb0 <_Heap_Walk+0x108> (*printer)( 30006e94: e1a00005 mov r0, r5 30006e98: e3a01001 mov r1, #1 30006e9c: e59f2438 ldr r2, [pc, #1080] ; 300072dc <_Heap_Walk+0x534> 30006ea0: e59d3024 ldr r3, [sp, #36] ; 0x24 30006ea4: e1a0e00f mov lr, pc 30006ea8: e12fff14 bx r4 30006eac: ea0000f9 b 30007298 <_Heap_Walk+0x4f0> 30006eb0: e59dc020 ldr ip, [sp, #32] 30006eb4: e1a01009 mov r1, r9 30006eb8: e28c0008 add r0, ip, #8 30006ebc: ebffe736 bl 30000b9c <__umodsi3> ); return false; } if ( 30006ec0: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 30006ec4: 11a00005 movne r0, r5 30006ec8: 13a01001 movne r1, #1 30006ecc: 159f240c ldrne r2, [pc, #1036] ; 300072e0 <_Heap_Walk+0x538> 30006ed0: 159d3020 ldrne r3, [sp, #32] 30006ed4: 1a0000cc bne 3000720c <_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; 30006ed8: e59d2020 ldr r2, [sp, #32] 30006edc: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 30006ee0: e2188001 ands r8, r8, #1 (*printer)( 30006ee4: 01a00005 moveq r0, r5 30006ee8: 03a01001 moveq r1, #1 30006eec: 059f23f0 ldreq r2, [pc, #1008] ; 300072e4 <_Heap_Walk+0x53c> 30006ef0: 0a000009 beq 30006f1c <_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; 30006ef4: e59d3028 ldr r3, [sp, #40] ; 0x28 30006ef8: e5937004 ldr r7, [r3, #4] 30006efc: 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); 30006f00: 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; 30006f04: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 30006f08: e2188001 ands r8, r8, #1 30006f0c: 1a000005 bne 30006f28 <_Heap_Walk+0x180> (*printer)( 30006f10: e59f23d0 ldr r2, [pc, #976] ; 300072e8 <_Heap_Walk+0x540> 30006f14: e1a00005 mov r0, r5 30006f18: e3a01001 mov r1, #1 30006f1c: e1a0e00f mov lr, pc 30006f20: e12fff14 bx r4 30006f24: ea0000db b 30007298 <_Heap_Walk+0x4f0> ); return false; } if ( 30006f28: e59dc020 ldr ip, [sp, #32] 30006f2c: e157000c cmp r7, ip 30006f30: 0a000006 beq 30006f50 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 30006f34: e1a00005 mov r0, r5 <== NOT EXECUTED 30006f38: e3a01001 mov r1, #1 <== NOT EXECUTED 30006f3c: e59f23a8 ldr r2, [pc, #936] ; 300072ec <_Heap_Walk+0x544> <== NOT EXECUTED 30006f40: e1a0e00f mov lr, pc <== NOT EXECUTED 30006f44: 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; 30006f48: e1a0800a mov r8, sl <== NOT EXECUTED 30006f4c: ea0000d1 b 30007298 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30006f50: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 30006f54: 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 ); 30006f58: e1a0a006 mov sl, r6 30006f5c: ea000034 b 30007034 <_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; 30006f60: e5963020 ldr r3, [r6, #32] 30006f64: e1530008 cmp r3, r8 30006f68: 83a0c000 movhi ip, #0 30006f6c: 8a000003 bhi 30006f80 <_Heap_Walk+0x1d8> 30006f70: e596c024 ldr ip, [r6, #36] ; 0x24 30006f74: e15c0008 cmp ip, r8 30006f78: 33a0c000 movcc ip, #0 30006f7c: 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 ) ) { 30006f80: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 30006f84: 01a00005 moveq r0, r5 30006f88: 03a01001 moveq r1, #1 30006f8c: 059f235c ldreq r2, [pc, #860] ; 300072f0 <_Heap_Walk+0x548> 30006f90: 0a000012 beq 30006fe0 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30006f94: e2880008 add r0, r8, #8 30006f98: e1a0100b mov r1, fp 30006f9c: ebffe6fe bl 30000b9c <__umodsi3> ); return false; } if ( 30006fa0: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 30006fa4: 11a00005 movne r0, r5 30006fa8: 13a01001 movne r1, #1 30006fac: 159f2340 ldrne r2, [pc, #832] ; 300072f4 <_Heap_Walk+0x54c> 30006fb0: 11a03008 movne r3, r8 30006fb4: 1a0000be bne 300072b4 <_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; 30006fb8: e5983004 ldr r3, [r8, #4] 30006fbc: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 30006fc0: 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; 30006fc4: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30006fc8: e2133001 ands r3, r3, #1 30006fcc: e58d302c str r3, [sp, #44] ; 0x2c 30006fd0: 0a000009 beq 30006ffc <_Heap_Walk+0x254> (*printer)( 30006fd4: e59f231c ldr r2, [pc, #796] ; 300072f8 <_Heap_Walk+0x550> 30006fd8: e1a00005 mov r0, r5 30006fdc: e3a01001 mov r1, #1 30006fe0: e1a03008 mov r3, r8 30006fe4: e58dc01c str ip, [sp, #28] 30006fe8: e1a0e00f mov lr, pc 30006fec: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30006ff0: e59dc01c ldr ip, [sp, #28] 30006ff4: e1a0800c mov r8, ip 30006ff8: ea0000a6 b 30007298 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 30006ffc: e598300c ldr r3, [r8, #12] 30007000: e153000a cmp r3, sl 30007004: 0a000008 beq 3000702c <_Heap_Walk+0x284> (*printer)( 30007008: e58d3000 str r3, [sp] 3000700c: e1a00005 mov r0, r5 30007010: e1a03008 mov r3, r8 30007014: e3a01001 mov r1, #1 30007018: e59f22dc ldr r2, [pc, #732] ; 300072fc <_Heap_Walk+0x554> 3000701c: e1a0e00f mov lr, pc 30007020: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30007024: e59d802c ldr r8, [sp, #44] ; 0x2c 30007028: ea00009a b 30007298 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 3000702c: e1a0a008 mov sl, r8 30007030: 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 ) { 30007034: e1580006 cmp r8, r6 30007038: 1affffc8 bne 30006f60 <_Heap_Walk+0x1b8> 3000703c: ea000000 b 30007044 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 30007040: e1a07008 mov r7, r8 return true; } 30007044: 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; 30007048: 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; 3000704c: 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); 30007050: 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; 30007054: e1520008 cmp r2, r8 30007058: 83a0b000 movhi fp, #0 3000705c: 8a000003 bhi 30007070 <_Heap_Walk+0x2c8> 30007060: e596b024 ldr fp, [r6, #36] ; 0x24 30007064: e15b0008 cmp fp, r8 30007068: 33a0b000 movcc fp, #0 3000706c: 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 ) ) { 30007070: e21bb0ff ands fp, fp, #255 ; 0xff 30007074: 1a000007 bne 30007098 <_Heap_Walk+0x2f0> (*printer)( 30007078: e58d8000 str r8, [sp] 3000707c: e1a00005 mov r0, r5 30007080: e3a01001 mov r1, #1 30007084: e59f2274 ldr r2, [pc, #628] ; 30007300 <_Heap_Walk+0x558> 30007088: e1a03007 mov r3, r7 3000708c: e1a0e00f mov lr, pc 30007090: e12fff14 bx r4 30007094: ea00005e b 30007214 <_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; 30007098: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 3000709c: e1a0000a mov r0, sl 300070a0: e1a01009 mov r1, r9 300070a4: e057b002 subs fp, r7, r2 300070a8: 13a0b001 movne fp, #1 300070ac: e58d301c str r3, [sp, #28] 300070b0: ebffe6b9 bl 30000b9c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 300070b4: e3500000 cmp r0, #0 300070b8: e59d301c ldr r3, [sp, #28] 300070bc: 0a000005 beq 300070d8 <_Heap_Walk+0x330> 300070c0: e35b0000 cmp fp, #0 (*printer)( 300070c4: 158da000 strne sl, [sp] 300070c8: 11a00005 movne r0, r5 300070cc: 13a01001 movne r1, #1 300070d0: 159f222c ldrne r2, [pc, #556] ; 30007304 <_Heap_Walk+0x55c> 300070d4: 1a000014 bne 3000712c <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 300070d8: e59dc024 ldr ip, [sp, #36] ; 0x24 300070dc: e15a000c cmp sl, ip 300070e0: 2a000009 bcs 3000710c <_Heap_Walk+0x364> 300070e4: e35b0000 cmp fp, #0 300070e8: 0a000007 beq 3000710c <_Heap_Walk+0x364> (*printer)( 300070ec: e88d1400 stm sp, {sl, ip} 300070f0: e1a00005 mov r0, r5 300070f4: e3a01001 mov r1, #1 300070f8: e59f2208 ldr r2, [pc, #520] ; 30007308 <_Heap_Walk+0x560> 300070fc: e1a03007 mov r3, r7 30007100: e1a0e00f mov lr, pc 30007104: e12fff14 bx r4 30007108: ea00006b b 300072bc <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 3000710c: e1580007 cmp r8, r7 30007110: 8a000009 bhi 3000713c <_Heap_Walk+0x394> 30007114: e35b0000 cmp fp, #0 30007118: 0a000007 beq 3000713c <_Heap_Walk+0x394> (*printer)( 3000711c: e59f21e8 ldr r2, [pc, #488] ; 3000730c <_Heap_Walk+0x564> 30007120: e58d8000 str r8, [sp] 30007124: e1a00005 mov r0, r5 30007128: e3a01001 mov r1, #1 3000712c: e1a03007 mov r3, r7 30007130: e1a0e00f mov lr, pc 30007134: e12fff14 bx r4 30007138: ea00005f b 300072bc <_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; 3000713c: e203b001 and fp, r3, #1 30007140: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 30007144: e3130001 tst r3, #1 30007148: 1a00003b bne 3000723c <_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 ? 3000714c: 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)( 30007150: e5963008 ldr r3, [r6, #8] block = next_block; } while ( block != first_block ); return true; } 30007154: 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)( 30007158: e1520003 cmp r2, r3 3000715c: 059f01ac ldreq r0, [pc, #428] ; 30007310 <_Heap_Walk+0x568> 30007160: 0a000003 beq 30007174 <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 30007164: e59f31a8 ldr r3, [pc, #424] ; 30007314 <_Heap_Walk+0x56c> 30007168: e1520006 cmp r2, r6 3000716c: e59f01a4 ldr r0, [pc, #420] ; 30007318 <_Heap_Walk+0x570> 30007170: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 30007174: 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)( 30007178: e1530001 cmp r3, r1 3000717c: 059f1198 ldreq r1, [pc, #408] ; 3000731c <_Heap_Walk+0x574> 30007180: 0a000003 beq 30007194 <_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)" : "") 30007184: e59fc194 ldr ip, [pc, #404] ; 30007320 <_Heap_Walk+0x578> 30007188: e1530006 cmp r3, r6 3000718c: e59f1184 ldr r1, [pc, #388] ; 30007318 <_Heap_Walk+0x570> 30007190: 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)( 30007194: e58d2004 str r2, [sp, #4] 30007198: e58d0008 str r0, [sp, #8] 3000719c: e58d300c str r3, [sp, #12] 300071a0: e58d1010 str r1, [sp, #16] 300071a4: e1a03007 mov r3, r7 300071a8: e58da000 str sl, [sp] 300071ac: e1a00005 mov r0, r5 300071b0: e3a01000 mov r1, #0 300071b4: e59f2168 ldr r2, [pc, #360] ; 30007324 <_Heap_Walk+0x57c> 300071b8: e1a0e00f mov lr, pc 300071bc: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 300071c0: e5983000 ldr r3, [r8] 300071c4: e15a0003 cmp sl, r3 300071c8: 0a000009 beq 300071f4 <_Heap_Walk+0x44c> (*printer)( 300071cc: e58d3004 str r3, [sp, #4] 300071d0: e58da000 str sl, [sp] 300071d4: e58d8008 str r8, [sp, #8] 300071d8: e1a00005 mov r0, r5 300071dc: e3a01001 mov r1, #1 300071e0: e59f2140 ldr r2, [pc, #320] ; 30007328 <_Heap_Walk+0x580> 300071e4: e1a03007 mov r3, r7 300071e8: e1a0e00f mov lr, pc 300071ec: e12fff14 bx r4 300071f0: ea000031 b 300072bc <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 300071f4: e35b0000 cmp fp, #0 300071f8: 1a000007 bne 3000721c <_Heap_Walk+0x474> (*printer)( 300071fc: e59f2128 ldr r2, [pc, #296] ; 3000732c <_Heap_Walk+0x584> 30007200: e1a00005 mov r0, r5 30007204: e3a01001 mov r1, #1 30007208: e1a03007 mov r3, r7 3000720c: e1a0e00f mov lr, pc 30007210: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 30007214: e1a0800b mov r8, fp 30007218: ea00001e b 30007298 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 3000721c: e5963008 ldr r3, [r6, #8] 30007220: ea000002 b 30007230 <_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 ) { 30007224: e1530007 cmp r3, r7 30007228: 0a000016 beq 30007288 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 3000722c: 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 ) { 30007230: e1530006 cmp r3, r6 30007234: 1afffffa bne 30007224 <_Heap_Walk+0x47c> 30007238: ea000019 b 300072a4 <_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) { 3000723c: e35b0000 cmp fp, #0 30007240: 0a000007 beq 30007264 <_Heap_Walk+0x4bc> (*printer)( 30007244: e58da000 str sl, [sp] 30007248: e1a00005 mov r0, r5 3000724c: e3a01000 mov r1, #0 30007250: e59f20d8 ldr r2, [pc, #216] ; 30007330 <_Heap_Walk+0x588> 30007254: e1a03007 mov r3, r7 30007258: e1a0e00f mov lr, pc 3000725c: e12fff14 bx r4 30007260: ea000008 b 30007288 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 30007264: e58da000 str sl, [sp] 30007268: e5973000 ldr r3, [r7] 3000726c: e1a00005 mov r0, r5 30007270: e58d3004 str r3, [sp, #4] 30007274: e1a0100b mov r1, fp 30007278: e59f20b4 ldr r2, [pc, #180] ; 30007334 <_Heap_Walk+0x58c> 3000727c: e1a03007 mov r3, r7 30007280: e1a0e00f mov lr, pc 30007284: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 30007288: e59d2020 ldr r2, [sp, #32] 3000728c: e1580002 cmp r8, r2 30007290: 1affff6a bne 30007040 <_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; 30007294: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 30007298: e1a00008 mov r0, r8 3000729c: e28dd030 add sp, sp, #48 ; 0x30 300072a0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 300072a4: e59f208c ldr r2, [pc, #140] ; 30007338 <_Heap_Walk+0x590> 300072a8: e1a00005 mov r0, r5 300072ac: e3a01001 mov r1, #1 300072b0: e1a03007 mov r3, r7 300072b4: e1a0e00f mov lr, pc 300072b8: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 300072bc: e3a08000 mov r8, #0 300072c0: eafffff4 b 30007298 <_Heap_Walk+0x4f0> =============================================================================== 300061c8 <_Internal_error_Occurred>: bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 300061c8: e59f3038 ldr r3, [pc, #56] ; 30006208 <_Internal_error_Occurred+0x40> void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 300061cc: e20110ff and r1, r1, #255 ; 0xff 300061d0: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Internal_errors_What_happened.the_source = the_source; 300061d4: e5830000 str r0, [r3] _Internal_errors_What_happened.is_internal = is_internal; 300061d8: e5c31004 strb r1, [r3, #4] _Internal_errors_What_happened.the_error = the_error; 300061dc: e5832008 str r2, [r3, #8] void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 300061e0: 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 ); 300061e4: eb0006d6 bl 30007d44 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 300061e8: e59f301c ldr r3, [pc, #28] ; 3000620c <_Internal_error_Occurred+0x44><== NOT EXECUTED 300061ec: e3a02005 mov r2, #5 <== NOT EXECUTED 300061f0: e5832000 str r2, [r3] <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300061f4: e10f2000 mrs r2, CPSR <== NOT EXECUTED 300061f8: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 300061fc: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 30006200: e1a00004 mov r0, r4 <== NOT EXECUTED 30006204: eafffffe b 30006204 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED =============================================================================== 30014118 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 30014118: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3001411c: e24dd018 sub sp, sp, #24 30014120: 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; 30014124: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30014128: e28ba004 add sl, fp, #4 3001412c: e28d7004 add r7, sp, #4 30014130: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30014134: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; 30014138: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); 3001413c: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30014140: e1a0500d mov r5, sp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30014144: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; 30014148: e98d2008 stmib sp, {r3, sp} */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 3001414c: 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; 30014150: 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 ); 30014154: 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; 30014158: e59f2150 ldr r2, [pc, #336] ; 300142b0 <_Timer_server_Body+0x198> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 3001415c: e1a00009 mov r0, r9 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; 30014160: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 30014164: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30014168: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 3001416c: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30014170: e0611003 rsb r1, r1, r3 30014174: eb001075 bl 30018350 <_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(); 30014178: e59f3134 ldr r3, [pc, #308] ; 300142b4 <_Timer_server_Body+0x19c> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 3001417c: 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(); 30014180: 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 ) { 30014184: e1560002 cmp r6, r2 30014188: 9a000004 bls 300141a0 <_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 ); 3001418c: e0621006 rsb r1, r2, r6 30014190: e1a00008 mov r0, r8 30014194: e1a02005 mov r2, r5 30014198: eb00106c bl 30018350 <_Watchdog_Adjust_to_chain> 3001419c: ea000003 b 300141b0 <_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 ); 300141a0: 31a00008 movcc r0, r8 300141a4: 33a01001 movcc r1, #1 300141a8: 30662002 rsbcc r2, r6, r2 300141ac: 3b00103f blcc 300182b0 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 300141b0: 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 ); 300141b4: e5940078 ldr r0, [r4, #120] ; 0x78 300141b8: eb000285 bl 30014bd4 <_Chain_Get> if ( timer == NULL ) { 300141bc: e2506000 subs r6, r0, #0 300141c0: 0a000009 beq 300141ec <_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 ) { 300141c4: e5963038 ldr r3, [r6, #56] ; 0x38 300141c8: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 300141cc: 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 ) { 300141d0: 0a000002 beq 300141e0 <_Timer_server_Body+0xc8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 300141d4: e3530003 cmp r3, #3 300141d8: 1afffff5 bne 300141b4 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 300141dc: e1a00008 mov r0, r8 300141e0: e2861010 add r1, r6, #16 300141e4: eb001084 bl 300183fc <_Watchdog_Insert> 300141e8: eafffff1 b 300141b4 <_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 ); 300141ec: ebffff97 bl 30014050 if ( _Chain_Is_empty( insert_chain ) ) { 300141f0: e59d300c ldr r3, [sp, #12] 300141f4: e153000a cmp r3, sl 300141f8: 1a000006 bne 30014218 <_Timer_server_Body+0x100> ts->insert_chain = NULL; 300141fc: e5846078 str r6, [r4, #120] ; 0x78 30014200: 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 ) ) { 30014204: e59d3000 ldr r3, [sp] 30014208: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; 3001420c: 13a06000 movne r6, #0 30014210: 1a000002 bne 30014220 <_Timer_server_Body+0x108> 30014214: ea000013 b 30014268 <_Timer_server_Body+0x150> 30014218: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 3001421c: eaffffcd b 30014158 <_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 ); 30014220: ebffff8a bl 30014050 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30014224: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 30014228: e1530007 cmp r3, r7 3001422c: 0a00000b beq 30014260 <_Timer_server_Body+0x148> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 30014230: e5932000 ldr r2, [r3] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 30014234: e3530000 cmp r3, #0 the_chain->first = new_first; 30014238: e58d2000 str r2, [sp] new_first->previous = _Chain_Head(the_chain); 3001423c: e5825004 str r5, [r2, #4] 30014240: 0a000006 beq 30014260 <_Timer_server_Body+0x148> watchdog->state = WATCHDOG_INACTIVE; 30014244: e5836008 str r6, [r3, #8] 30014248: 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 ); 3001424c: e5930020 ldr r0, [r3, #32] 30014250: e5931024 ldr r1, [r3, #36] ; 0x24 30014254: e1a0e00f mov lr, pc 30014258: e593f01c ldr pc, [r3, #28] } 3001425c: eaffffef b 30014220 <_Timer_server_Body+0x108> 30014260: e129f000 msr CPSR_fc, r0 30014264: eaffffb9 b 30014150 <_Timer_server_Body+0x38> } else { ts->active = false; 30014268: e3a03000 mov r3, #0 3001426c: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 30014270: ebffff7a bl 30014060 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 30014274: e3a01008 mov r1, #8 30014278: e5940000 ldr r0, [r4] 3001427c: eb000dcb bl 300179b0 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 30014280: e1a00004 mov r0, r4 30014284: ebffff7b bl 30014078 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 30014288: e1a00004 mov r0, r4 3001428c: ebffff8d bl 300140c8 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 30014290: eb000b53 bl 30016fe4 <_Thread_Enable_dispatch> ts->active = true; 30014294: e3a03001 mov r3, #1 30014298: 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 ); 3001429c: e2840008 add r0, r4, #8 300142a0: eb0010ab bl 30018554 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 300142a4: e2840040 add r0, r4, #64 ; 0x40 300142a8: eb0010a9 bl 30018554 <_Watchdog_Remove> 300142ac: eaffffa7 b 30014150 <_Timer_server_Body+0x38> =============================================================================== 3000984c <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 3000984c: e5902000 ldr r2, [r0] 30009850: e5913000 ldr r3, [r1] 30009854: e1520003 cmp r2, r3 return true; 30009858: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 3000985c: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) 30009860: ba000005 blt 3000987c <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( 30009864: e5900004 ldr r0, [r0, #4] 30009868: e5913004 ldr r3, [r1, #4] 3000986c: e1500003 cmp r0, r3 30009870: d3a00000 movle r0, #0 30009874: c3a00001 movgt r0, #1 30009878: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 3000987c: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 30009880: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30007d44 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30007d44: e92d41f0 push {r4, r5, r6, r7, r8, lr} Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 30007d48: e59f503c ldr r5, [pc, #60] ; 30007d8c <_User_extensions_Fatal+0x48> void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30007d4c: e1a08000 mov r8, r0 30007d50: e1a07002 mov r7, r2 30007d54: e20160ff and r6, r1, #255 ; 0xff Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 30007d58: e5954008 ldr r4, [r5, #8] 30007d5c: ea000007 b 30007d80 <_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 ) 30007d60: e5943030 ldr r3, [r4, #48] ; 0x30 30007d64: e3530000 cmp r3, #0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 30007d68: 11a00008 movne r0, r8 30007d6c: 11a01006 movne r1, r6 30007d70: 11a02007 movne r2, r7 30007d74: 11a0e00f movne lr, pc 30007d78: 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 ) { 30007d7c: e5944004 ldr r4, [r4, #4] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 30007d80: e1540005 cmp r4, r5 30007d84: 1afffff5 bne 30007d60 <_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 ); } } 30007d88: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 3001f4a8 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 3001f4a8: e3a00000 mov r0, #0 <== NOT EXECUTED 3001f4ac: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30001f0c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 30001f0c: eaffffe5 b 30001ea8 <== NOT EXECUTED =============================================================================== 3000859c : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 3000859c: 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 ) ) 300085a0: e3d27007 bics r7, r2, #7 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 300085a4: e1a09000 mov r9, r0 300085a8: e1a04001 mov r4, r1 300085ac: 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 ) ) 300085b0: 0a000002 beq 300085c0 rtems_set_errno_and_return_minus_one( EPERM ); 300085b4: eb000657 bl 30009f18 <__errno> <== NOT EXECUTED 300085b8: e3a03001 mov r3, #1 <== NOT EXECUTED 300085bc: ea000005 b 300085d8 <== NOT EXECUTED /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 300085c0: e5936000 ldr r6, [r3] if (!device_name_table) 300085c4: e3560000 cmp r6, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 300085c8: 159fa094 ldrne sl, [pc, #148] ; 30008664 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) 300085cc: 1a00001c bne 30008644 rtems_set_errno_and_return_minus_one( EFAULT ); 300085d0: eb000650 bl 30009f18 <__errno> 300085d4: e3a0300e mov r3, #14 300085d8: e5803000 str r3, [r0] 300085dc: e3e00000 mvn r0, #0 300085e0: 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) 300085e4: e5968000 ldr r8, [r6] 300085e8: e3580000 cmp r8, #0 300085ec: 0a000012 beq 3000863c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 300085f0: e1a00009 mov r0, r9 300085f4: e1a01008 mov r1, r8 300085f8: e1a02004 mov r2, r4 300085fc: eb0009cc bl 3000ad34 30008600: e3500000 cmp r0, #0 30008604: 1a00000c bne 3000863c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 30008608: e7d80004 ldrb r0, [r8, r4] 3000860c: e3500000 cmp r0, #0 30008610: 1a000009 bne 3000863c continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 30008614: e59f304c ldr r3, [pc, #76] ; 30008668 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 30008618: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; 3000861c: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 30008620: e59f3044 ldr r3, [pc, #68] ; 3000866c 30008624: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 30008628: e59f3040 ldr r3, [pc, #64] ; 30008670 3000862c: e5933000 ldr r3, [r3] 30008630: e5933028 ldr r3, [r3, #40] ; 0x28 30008634: e5853010 str r3, [r5, #16] return 0; 30008638: 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++) { 3000863c: e2877001 add r7, r7, #1 30008640: e2866014 add r6, r6, #20 30008644: e59a3000 ldr r3, [sl] 30008648: e1570003 cmp r7, r3 3000864c: 3affffe4 bcc 300085e4 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 30008650: eb000630 bl 30009f18 <__errno> 30008654: e3a03002 mov r3, #2 30008658: e5803000 str r3, [r0] 3000865c: e3e00000 mvn r0, #0 } 30008660: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 30002c68 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002c68: e59030b4 ldr r3, [r0, #180] ; 0xb4 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002c6c: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002c70: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002c74: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002c78: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 30002c7c: ebfffff5 bl 30002c58 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 30002c80: 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) { 30002c84: ea000008 b 30002cac tty->rawOutBufState = rob_wait; 30002c88: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002c8c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 30002c90: e3a01000 mov r1, #0 <== NOT EXECUTED 30002c94: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 30002c98: e1a02001 mov r2, r1 <== NOT EXECUTED 30002c9c: eb0008cc bl 30004fd4 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30002ca0: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 30002ca4: 1b000a60 blne 3000562c <== NOT EXECUTED rtems_interrupt_disable (level); 30002ca8: ebffffea bl 30002c58 <== 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) { 30002cac: e5942084 ldr r2, [r4, #132] ; 0x84 30002cb0: e5943080 ldr r3, [r4, #128] ; 0x80 30002cb4: e1520003 cmp r2, r3 30002cb8: 1afffff2 bne 30002c88 30002cbc: e129f000 msr CPSR_fc, r0 30002cc0: e8bd8030 pop {r4, r5, pc} =============================================================================== 30003948 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 30003948: e5903020 ldr r3, [r0, #32] * 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) { 3000394c: e92d41f0 push {r4, r5, r6, r7, r8, lr} if (tty->ccount == 0) 30003950: 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) { 30003954: e1a04000 mov r4, r0 30003958: e1a07001 mov r7, r1 if (tty->ccount == 0) 3000395c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; if (lineFlag) { 30003960: e3510000 cmp r1, #0 30003964: 0a000060 beq 30003aec if (!(tty->termios.c_lflag & ECHO)) { 30003968: e590303c ldr r3, [r0, #60] ; 0x3c 3000396c: e2132008 ands r2, r3, #8 tty->ccount = 0; 30003970: 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)) { 30003974: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 30003978: e2133010 ands r3, r3, #16 3000397c: 1a00005a bne 30003aec tty->ccount = 0; 30003980: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 30003984: e1a01004 mov r1, r4 <== NOT EXECUTED 30003988: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 3000398c: ebffffca bl 300038bc <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 30003990: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30003994: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 30003998: 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) 3000399c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 300039a0: ea00000b b 300039d4 <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 300039a4: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 300039a8: e2411001 sub r1, r1, #1 300039ac: e594001c ldr r0, [r4, #28] 300039b0: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { 300039b4: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 300039b8: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { 300039bc: 0a000047 beq 30003ae0 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 300039c0: e3570000 cmp r7, #0 300039c4: 1a000005 bne 300039e0 300039c8: e3130010 tst r3, #16 300039cc: 1a000003 bne 300039e0 echo (tty->termios.c_cc[VERASE], tty); 300039d0: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 300039d4: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 300039d8: 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); 300039dc: eaffffb6 b 300038bc <== NOT EXECUTED } else if (c == '\t') { 300039e0: e3550009 cmp r5, #9 300039e4: 1a00001f bne 30003a68 int col = tty->read_start_column; 300039e8: 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)) { 300039ec: 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; 300039f0: 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) 300039f4: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 300039f8: ea00000c b 30003a30 c = tty->cbuf[i++]; 300039fc: e7d0c002 ldrb ip, [r0, r2] 30003a00: e2822001 add r2, r2, #1 if (c == '\t') { 30003a04: e35c0009 cmp ip, #9 col = (col | 7) + 1; 30003a08: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 30003a0c: 0a000006 beq 30003a2c col = (col | 7) + 1; } else if (iscntrl (c)) { 30003a10: e088c00c add ip, r8, ip 30003a14: e5dcc001 ldrb ip, [ip, #1] 30003a18: e31c0020 tst ip, #32 30003a1c: 0a000002 beq 30003a2c if (tty->termios.c_lflag & ECHOCTL) 30003a20: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 30003a24: 12855002 addne r5, r5, #2 <== NOT EXECUTED 30003a28: ea000000 b 30003a30 <== NOT EXECUTED } else { col++; 30003a2c: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30003a30: e1520001 cmp r2, r1 30003a34: 1afffff0 bne 300039fc 30003a38: ea000006 b 30003a58 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 30003a3c: e59f00bc ldr r0, [pc, #188] ; 30003b00 30003a40: e3a01001 mov r1, #1 30003a44: e1a02004 mov r2, r4 30003a48: ebffff07 bl 3000366c tty->column--; 30003a4c: e5943028 ldr r3, [r4, #40] ; 0x28 30003a50: e2433001 sub r3, r3, #1 30003a54: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { 30003a58: e5943028 ldr r3, [r4, #40] ; 0x28 30003a5c: e1530005 cmp r3, r5 30003a60: cafffff5 bgt 30003a3c 30003a64: ea00001d b 30003ae0 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 30003a68: e5962000 ldr r2, [r6] 30003a6c: e2855001 add r5, r5, #1 30003a70: e7d22005 ldrb r2, [r2, r5] 30003a74: e3120020 tst r2, #32 30003a78: 0a000009 beq 30003aa4 30003a7c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 30003a80: 0a000007 beq 30003aa4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 30003a84: e59f0078 ldr r0, [pc, #120] ; 30003b04 <== NOT EXECUTED 30003a88: e3a01003 mov r1, #3 <== NOT EXECUTED 30003a8c: e1a02004 mov r2, r4 <== NOT EXECUTED 30003a90: ebfffef5 bl 3000366c <== NOT EXECUTED if (tty->column) 30003a94: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003a98: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 30003a9c: 12433001 subne r3, r3, #1 <== NOT EXECUTED 30003aa0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 30003aa4: e5963000 ldr r3, [r6] 30003aa8: e7d33005 ldrb r3, [r3, r5] 30003aac: e3130020 tst r3, #32 30003ab0: 0a000002 beq 30003ac0 30003ab4: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30003ab8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 30003abc: 0a000007 beq 30003ae0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 30003ac0: e59f003c ldr r0, [pc, #60] ; 30003b04 30003ac4: e3a01003 mov r1, #3 30003ac8: e1a02004 mov r2, r4 30003acc: ebfffee6 bl 3000366c if (tty->column) 30003ad0: e5943028 ldr r3, [r4, #40] ; 0x28 30003ad4: e3530000 cmp r3, #0 tty->column--; 30003ad8: 12433001 subne r3, r3, #1 30003adc: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) 30003ae0: e3570000 cmp r7, #0 30003ae4: 1a000001 bne 30003af0 30003ae8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30003aec: e59f6014 ldr r6, [pc, #20] ; 30003b08 echo ('\n', tty); return; } } while (tty->ccount) { 30003af0: e5941020 ldr r1, [r4, #32] 30003af4: e3510000 cmp r1, #0 30003af8: 1affffa9 bne 300039a4 30003afc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 30002704 : int fcntl( int fd, int cmd, ... ) { 30002704: e92d000e push {r1, r2, r3} 30002708: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3000270c: e59f21a4 ldr r2, [pc, #420] ; 300028b8 ... ) { int ret; va_list ap; va_start( ap, cmd ); 30002710: e28d301c add r3, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30002714: e5921000 ldr r1, [r2] int fcntl( int fd, int cmd, ... ) { 30002718: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 3000271c: e1500001 cmp r0, r1 ... ) { int ret; va_list ap; va_start( ap, cmd ); 30002720: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30002724: 2a000006 bcs 30002744 iop = rtems_libio_iop( fd ); 30002728: e59f218c ldr r2, [pc, #396] ; 300028bc 3000272c: e3a04038 mov r4, #56 ; 0x38 30002730: e5922000 ldr r2, [r2] 30002734: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); 30002738: e5940014 ldr r0, [r4, #20] 3000273c: e3100c01 tst r0, #256 ; 0x100 30002740: 1a000002 bne 30002750 30002744: eb002935 bl 3000cc20 <__errno> 30002748: e3a03009 mov r3, #9 3000274c: ea000047 b 30002870 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 30002750: e3570009 cmp r7, #9 30002754: 979ff107 ldrls pc, [pc, r7, lsl #2] 30002758: ea000042 b 30002868 3000275c: 30002784 .word 0x30002784 <== NOT EXECUTED 30002760: 300027f4 .word 0x300027f4 <== NOT EXECUTED 30002764: 30002804 .word 0x30002804 <== NOT EXECUTED 30002768: 30002824 .word 0x30002824 <== NOT EXECUTED 3000276c: 30002830 .word 0x30002830 <== NOT EXECUTED 30002770: 3000285c .word 0x3000285c <== NOT EXECUTED 30002774: 3000285c .word 0x3000285c <== NOT EXECUTED 30002778: 3000285c .word 0x3000285c <== NOT EXECUTED 3000277c: 3000285c .word 0x3000285c <== NOT EXECUTED 30002780: 3000285c .word 0x3000285c <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 30002784: e5933000 ldr r3, [r3] if ( fd2 ) 30002788: e3530000 cmp r3, #0 3000278c: 0a000004 beq 300027a4 diop = rtems_libio_iop( fd2 ); 30002790: e1530001 cmp r3, r1 30002794: 33a06038 movcc r6, #56 ; 0x38 30002798: 30262693 mlacc r6, r3, r6, r2 3000279c: 3a000005 bcc 300027b8 300027a0: ea000003 b 300027b4 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 300027a4: eb000190 bl 30002dec if ( diop == 0 ) { 300027a8: e2506000 subs r6, r0, #0 300027ac: 1a000001 bne 300027b8 300027b0: ea00003b b 300028a4 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 300027b4: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 300027b8: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; 300027bc: e286c018 add ip, r6, #24 300027c0: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; 300027c4: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; 300027c8: e8b5000f ldm r5!, {r0, r1, r2, r3} 300027cc: e8ac000f stmia ip!, {r0, r1, r2, r3} 300027d0: e5953000 ldr r3, [r5] 300027d4: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); 300027d8: e59f30dc ldr r3, [pc, #220] ; 300028bc 300027dc: e5933000 ldr r3, [r3] 300027e0: e0636006 rsb r6, r3, r6 300027e4: e59f30d4 ldr r3, [pc, #212] ; 300028c0 300027e8: e1a061c6 asr r6, r6, #3 300027ec: e0060693 mul r6, r3, r6 300027f0: ea000020 b 30002878 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 300027f4: e3100b02 tst r0, #2048 ; 0x800 300027f8: 03a06000 moveq r6, #0 300027fc: 13a06001 movne r6, #1 30002800: ea00001e b 30002880 * 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 ) ) 30002804: e5936000 ldr r6, [r3] 30002808: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 3000280c: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 30002810: 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; 30002814: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 30002818: 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 ) ) 3000281c: 0a000017 beq 30002880 30002820: ea00000b b 30002854 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 30002824: eb00015e bl 30002da4 30002828: e1a06000 mov r6, r0 3000282c: ea000011 b 30002878 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 30002830: e5930000 ldr r0, [r3] 30002834: eb00014d bl 30002d70 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 30002838: e5942014 ldr r2, [r4, #20] 3000283c: e59f3080 ldr r3, [pc, #128] ; 300028c4 30002840: e3c22c02 bic r2, r2, #512 ; 0x200 30002844: e0003003 and r3, r0, r3 30002848: e3c22001 bic r2, r2, #1 3000284c: e1833002 orr r3, r3, r2 30002850: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 30002854: e3a06000 mov r6, #0 30002858: ea000008 b 30002880 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 3000285c: eb0028ef bl 3000cc20 <__errno> 30002860: e3a03086 mov r3, #134 ; 0x86 30002864: ea000001 b 30002870 ret = -1; break; default: errno = EINVAL; 30002868: eb0028ec bl 3000cc20 <__errno> 3000286c: e3a03016 mov r3, #22 30002870: e5803000 str r3, [r0] 30002874: ea00000a b 300028a4 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 30002878: e3560000 cmp r6, #0 3000287c: ba000009 blt 300028a8 int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 30002880: e5943020 ldr r3, [r4, #32] 30002884: e1a01004 mov r1, r4 30002888: e1a00007 mov r0, r7 3000288c: e1a0e00f mov lr, pc 30002890: e593f030 ldr pc, [r3, #48] ; 0x30 if (err) { 30002894: e2504000 subs r4, r0, #0 30002898: 0a000002 beq 300028a8 errno = err; 3000289c: eb0028df bl 3000cc20 <__errno> <== NOT EXECUTED 300028a0: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; 300028a4: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 300028a8: e1a00006 mov r0, r6 300028ac: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 300028b0: e28dd00c add sp, sp, #12 300028b4: e12fff1e bx lr =============================================================================== 3000b2bc : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000b2bc: 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) { 3000b2c0: e59f5378 ldr r5, [pc, #888] ; 3000b640 */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000b2c4: e1a08000 mov r8, r0 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 3000b2c8: e5954000 ldr r4, [r5] */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000b2cc: e1a07001 mov r7, r1 static rtems_status_code pipe_lock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; if (pipe_semaphore == RTEMS_ID_NONE) { 3000b2d0: e3540000 cmp r4, #0 3000b2d4: 1a000012 bne 3000b324 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 ); 3000b2d8: e59f3364 ldr r3, [pc, #868] ; 3000b644 3000b2dc: e1a01004 mov r1, r4 3000b2e0: e5930000 ldr r0, [r3] 3000b2e4: e1a02004 mov r2, r4 3000b2e8: ebffef1d bl 30006f64 rtems_libio_lock(); if (pipe_semaphore == RTEMS_ID_NONE) { 3000b2ec: e5953000 ldr r3, [r5] 3000b2f0: e3530000 cmp r3, #0 3000b2f4: 1a000005 bne 3000b310 sc = rtems_semaphore_create( 3000b2f8: e59f0348 ldr r0, [pc, #840] ; 3000b648 3000b2fc: e3a01001 mov r1, #1 3000b300: e3a02054 mov r2, #84 ; 0x54 3000b304: e58d5000 str r5, [sp] 3000b308: ebffee83 bl 30006d1c 3000b30c: e1a04000 mov r4, r0 } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 3000b310: e59f332c ldr r3, [pc, #812] ; 3000b644 3000b314: e5930000 ldr r0, [r3] 3000b318: ebffef57 bl 3000707c } rtems_libio_unlock(); } if (sc == RTEMS_SUCCESSFUL) { 3000b31c: e3540000 cmp r4, #0 3000b320: 1a000006 bne 3000b340 sc = rtems_semaphore_obtain(pipe_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3000b324: e59f3314 ldr r3, [pc, #788] ; 3000b640 3000b328: e3a01000 mov r1, #0 3000b32c: e5930000 ldr r0, [r3] 3000b330: e1a02001 mov r2, r1 3000b334: ebffef0a bl 30006f64 } if (sc == RTEMS_SUCCESSFUL) { 3000b338: e2505000 subs r5, r0, #0 3000b33c: 0a000000 beq 3000b344 return 0; } else { return -ENOMEM; 3000b340: e3e0500b mvn r5, #11 { pipe_control_t *pipe; int err = 0; err = pipe_lock(); if (err) 3000b344: e2556000 subs r6, r5, #0 3000b348: 1a0000ba bne 3000b638 return err; pipe = *pipep; 3000b34c: e5984000 ldr r4, [r8] if (pipe == NULL) { 3000b350: e3540000 cmp r4, #0 3000b354: 1a00003c bne 3000b44c { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 3000b358: e3a00034 mov r0, #52 ; 0x34 3000b35c: ebffe31f bl 30003fe0 if (pipe == NULL) 3000b360: e250a000 subs sl, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 3000b364: e1a04000 mov r4, r0 if (pipe == NULL) 3000b368: 0a000035 beq 3000b444 return err; memset(pipe, 0, sizeof(pipe_control_t)); 3000b36c: e1a01005 mov r1, r5 3000b370: e3a02034 mov r2, #52 ; 0x34 3000b374: eb000df0 bl 3000eb3c pipe->Size = PIPE_BUF; 3000b378: e3a00c02 mov r0, #512 ; 0x200 3000b37c: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); 3000b380: ebffe316 bl 30003fe0 if (! pipe->Buffer) 3000b384: 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); 3000b388: e5840000 str r0, [r4] if (! pipe->Buffer) 3000b38c: 0a00002a beq 3000b43c goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 3000b390: e59f62b4 ldr r6, [pc, #692] ; 3000b64c if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 3000b394: e59f02b4 ldr r0, [pc, #692] ; 3000b650 rtems_build_name ('P', 'I', 'r', c), 3000b398: e5d63000 ldrb r3, [r6] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 3000b39c: e1a01005 mov r1, r5 3000b3a0: e1830000 orr r0, r3, r0 3000b3a4: e1a02005 mov r2, r5 3000b3a8: e284302c add r3, r4, #44 ; 0x2c 3000b3ac: eb0003dd bl 3000c328 3000b3b0: e3500000 cmp r0, #0 3000b3b4: 1a00001e bne 3000b434 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), 3000b3b8: 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( 3000b3bc: e59f0290 ldr r0, [pc, #656] ; 3000b654 3000b3c0: e1a01005 mov r1, r5 3000b3c4: e1830000 orr r0, r3, r0 3000b3c8: e1a02005 mov r2, r5 3000b3cc: e2843030 add r3, r4, #48 ; 0x30 3000b3d0: eb0003d4 bl 3000c328 3000b3d4: e3500000 cmp r0, #0 3000b3d8: 1a000013 bne 3000b42c 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, 3000b3dc: 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( 3000b3e0: e59f0270 ldr r0, [pc, #624] ; 3000b658 3000b3e4: e2842028 add r2, r4, #40 ; 0x28 3000b3e8: e58d2000 str r2, [sp] 3000b3ec: e1830000 orr r0, r3, r0 3000b3f0: e3a01001 mov r1, #1 3000b3f4: e3a02010 mov r2, #16 3000b3f8: e1a03005 mov r3, r5 3000b3fc: ebffee46 bl 30006d1c 3000b400: e3500000 cmp r0, #0 3000b404: 1a000006 bne 3000b424 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 3000b408: e5d63000 ldrb r3, [r6] 3000b40c: e353007a cmp r3, #122 ; 0x7a 3000b410: e2832001 add r2, r3, #1 c = 'a'; 3000b414: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 3000b418: e5c62000 strb r2, [r6] c = 'a'; 3000b41c: 05c63000 strbeq r3, [r6] 3000b420: ea000009 b 3000b44c return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 3000b424: e59a0030 ldr r0, [sl, #48] ; 0x30 3000b428: eb0003ee bl 3000c3e8 err_wbar: rtems_barrier_delete(pipe->readBarrier); 3000b42c: e59a002c ldr r0, [sl, #44] ; 0x2c 3000b430: eb0003ec bl 3000c3e8 err_rbar: free(pipe->Buffer); 3000b434: e59a0000 ldr r0, [sl] 3000b438: ebffe115 bl 30003894 err_buf: free(pipe); 3000b43c: e1a0000a mov r0, sl 3000b440: ebffe113 bl 30003894 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 3000b444: e3e0600b mvn r6, #11 3000b448: ea00000d b 3000b484 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 3000b44c: e3a01000 mov r1, #0 3000b450: e5940028 ldr r0, [r4, #40] ; 0x28 3000b454: e1a02001 mov r2, r1 3000b458: ebffeec1 bl 30006f64 err = -EINTR; if (*pipep == NULL) { 3000b45c: e5983000 ldr r3, [r8] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 3000b460: e3500000 cmp r0, #0 3000b464: 03a06000 moveq r6, #0 3000b468: 13e06003 mvnne r6, #3 if (*pipep == NULL) { 3000b46c: e3530000 cmp r3, #0 3000b470: 1a000003 bne 3000b484 if (err) 3000b474: e3560000 cmp r6, #0 pipe_free(pipe); else *pipep = pipe; 3000b478: 05884000 streq r4, [r8] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); 3000b47c: 11a00004 movne r0, r4 3000b480: 1bffff54 blne 3000b1d8 else *pipep = pipe; } out: pipe_unlock(); 3000b484: ebffff4f bl 3000b1c8 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 3000b488: e3560000 cmp r6, #0 3000b48c: 1a000069 bne 3000b638 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 3000b490: e5973014 ldr r3, [r7, #20] int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 3000b494: e5984000 ldr r4, [r8] switch (LIBIO_ACCMODE(iop)) { 3000b498: e2033006 and r3, r3, #6 3000b49c: e3530004 cmp r3, #4 3000b4a0: 0a000024 beq 3000b538 3000b4a4: e3530006 cmp r3, #6 3000b4a8: 0a000047 beq 3000b5cc 3000b4ac: e3530002 cmp r3, #2 3000b4b0: 1a000059 bne 3000b61c case LIBIO_FLAGS_READ: pipe->readerCounter ++; 3000b4b4: e5943020 ldr r3, [r4, #32] 3000b4b8: e2833001 add r3, r3, #1 3000b4bc: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) 3000b4c0: e5943010 ldr r3, [r4, #16] 3000b4c4: e2832001 add r2, r3, #1 3000b4c8: e3530000 cmp r3, #0 3000b4cc: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); 3000b4d0: 05940030 ldreq r0, [r4, #48] ; 0x30 3000b4d4: 028d1004 addeq r1, sp, #4 3000b4d8: 0b0003ea bleq 3000c488 if (pipe->Writers == 0) { 3000b4dc: e5943014 ldr r3, [r4, #20] 3000b4e0: e3530000 cmp r3, #0 3000b4e4: 1a00004c bne 3000b61c /* Not an error */ if (LIBIO_NODELAY(iop)) 3000b4e8: e5973014 ldr r3, [r7, #20] 3000b4ec: e3130001 tst r3, #1 3000b4f0: 1a000049 bne 3000b61c break; prevCounter = pipe->writerCounter; 3000b4f4: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 3000b4f8: e5940028 ldr r0, [r4, #40] ; 0x28 3000b4fc: ebffeede bl 3000707c if (! PIPE_READWAIT(pipe)) 3000b500: e3a01000 mov r1, #0 3000b504: e594002c ldr r0, [r4, #44] ; 0x2c 3000b508: eb0003f4 bl 3000c4e0 3000b50c: e2501000 subs r1, r0, #0 3000b510: 1a000044 bne 3000b628 goto out_error; if (! PIPE_LOCK(pipe)) 3000b514: e5940028 ldr r0, [r4, #40] ; 0x28 3000b518: e1a02001 mov r2, r1 3000b51c: ebffee90 bl 30006f64 3000b520: e3500000 cmp r0, #0 3000b524: 1a00003f bne 3000b628 goto out_error; } while (prevCounter == pipe->writerCounter); 3000b528: e5943024 ldr r3, [r4, #36] ; 0x24 3000b52c: e1550003 cmp r5, r3 3000b530: 0afffff0 beq 3000b4f8 3000b534: ea000038 b 3000b61c } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 3000b538: e5943024 ldr r3, [r4, #36] ; 0x24 3000b53c: e2833001 add r3, r3, #1 3000b540: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) 3000b544: e5943014 ldr r3, [r4, #20] 3000b548: e2832001 add r2, r3, #1 3000b54c: e3530000 cmp r3, #0 3000b550: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); 3000b554: 0594002c ldreq r0, [r4, #44] ; 0x2c 3000b558: 028d1004 addeq r1, sp, #4 3000b55c: 0b0003c9 bleq 3000c488 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 3000b560: e5943010 ldr r3, [r4, #16] 3000b564: e3530000 cmp r3, #0 3000b568: 1a00002b bne 3000b61c 3000b56c: e5973014 ldr r3, [r7, #20] 3000b570: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 3000b574: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 3000b578: 0a000003 beq 3000b58c PIPE_UNLOCK(pipe); 3000b57c: e5940028 ldr r0, [r4, #40] ; 0x28 3000b580: ebffeebd bl 3000707c err = -ENXIO; 3000b584: e3e06005 mvn r6, #5 goto out_error; 3000b588: ea000027 b 3000b62c if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 3000b58c: e5940028 ldr r0, [r4, #40] ; 0x28 3000b590: ebffeeb9 bl 3000707c if (! PIPE_WRITEWAIT(pipe)) 3000b594: e3a01000 mov r1, #0 3000b598: e5940030 ldr r0, [r4, #48] ; 0x30 3000b59c: eb0003cf bl 3000c4e0 3000b5a0: e2501000 subs r1, r0, #0 3000b5a4: 1a00001f bne 3000b628 goto out_error; if (! PIPE_LOCK(pipe)) 3000b5a8: e5940028 ldr r0, [r4, #40] ; 0x28 3000b5ac: e1a02001 mov r2, r1 3000b5b0: ebffee6b bl 30006f64 3000b5b4: e3500000 cmp r0, #0 3000b5b8: 1a00001a bne 3000b628 goto out_error; } while (prevCounter == pipe->readerCounter); 3000b5bc: e5943020 ldr r3, [r4, #32] 3000b5c0: e1550003 cmp r5, r3 3000b5c4: 0afffff0 beq 3000b58c 3000b5c8: ea000013 b 3000b61c } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 3000b5cc: e5943020 ldr r3, [r4, #32] 3000b5d0: e2833001 add r3, r3, #1 3000b5d4: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) 3000b5d8: e5943010 ldr r3, [r4, #16] 3000b5dc: e2832001 add r2, r3, #1 3000b5e0: e3530000 cmp r3, #0 3000b5e4: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); 3000b5e8: 05940030 ldreq r0, [r4, #48] ; 0x30 3000b5ec: 028d1004 addeq r1, sp, #4 3000b5f0: 0b0003a4 bleq 3000c488 pipe->writerCounter ++; 3000b5f4: e5943024 ldr r3, [r4, #36] ; 0x24 3000b5f8: e2833001 add r3, r3, #1 3000b5fc: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) 3000b600: e5943014 ldr r3, [r4, #20] 3000b604: e2832001 add r2, r3, #1 3000b608: e3530000 cmp r3, #0 3000b60c: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); 3000b610: 0594002c ldreq r0, [r4, #44] ; 0x2c 3000b614: 028d1004 addeq r1, sp, #4 3000b618: 0b00039a bleq 3000c488 break; } PIPE_UNLOCK(pipe); 3000b61c: e5940028 ldr r0, [r4, #40] ; 0x28 3000b620: ebffee95 bl 3000707c return 0; 3000b624: ea000003 b 3000b638 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 3000b628: e3e06003 mvn r6, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 3000b62c: e1a00008 mov r0, r8 3000b630: e1a01007 mov r1, r7 3000b634: ebfffef4 bl 3000b20c return err; } 3000b638: e1a00006 mov r0, r6 3000b63c: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 30002948 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 30002948: e59f3104 ldr r3, [pc, #260] ; 30002a54 long fpathconf( int fd, int name ) { 3000294c: 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); 30002950: e5933000 ldr r3, [r3] 30002954: e1500003 cmp r0, r3 30002958: 2a000006 bcs 30002978 iop = rtems_libio_iop(fd); 3000295c: e59f30f4 ldr r3, [pc, #244] ; 30002a58 30002960: e3a02038 mov r2, #56 ; 0x38 30002964: e5933000 ldr r3, [r3] 30002968: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); 3000296c: e5903014 ldr r3, [r0, #20] 30002970: e3130c01 tst r3, #256 ; 0x100 30002974: 1a000002 bne 30002984 30002978: eb0028a8 bl 3000cc20 <__errno> 3000297c: e3a03009 mov r3, #9 30002980: ea000003 b 30002994 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 30002984: e3130002 tst r3, #2 30002988: 1a000004 bne 300029a0 3000298c: eb0028a3 bl 3000cc20 <__errno> 30002990: e3a03016 mov r3, #22 30002994: e5803000 str r3, [r0] 30002998: e3e00000 mvn r0, #0 3000299c: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 300029a0: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 300029a4: e351000b cmp r1, #11 300029a8: 979ff101 ldrls pc, [pc, r1, lsl #2] 300029ac: ea000023 b 30002a40 300029b0: 300029e0 .word 0x300029e0 <== NOT EXECUTED 300029b4: 300029e8 .word 0x300029e8 <== NOT EXECUTED 300029b8: 300029f0 .word 0x300029f0 <== NOT EXECUTED 300029bc: 300029f8 .word 0x300029f8 <== NOT EXECUTED 300029c0: 30002a00 .word 0x30002a00 <== NOT EXECUTED 300029c4: 30002a08 .word 0x30002a08 <== NOT EXECUTED 300029c8: 30002a10 .word 0x30002a10 <== NOT EXECUTED 300029cc: 30002a18 .word 0x30002a18 <== NOT EXECUTED 300029d0: 30002a20 .word 0x30002a20 <== NOT EXECUTED 300029d4: 30002a28 .word 0x30002a28 <== NOT EXECUTED 300029d8: 30002a30 .word 0x30002a30 <== NOT EXECUTED 300029dc: 30002a38 .word 0x30002a38 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 300029e0: e5930038 ldr r0, [r3, #56] ; 0x38 break; 300029e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 300029e8: e593003c ldr r0, [r3, #60] ; 0x3c break; 300029ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 300029f0: e5930040 ldr r0, [r3, #64] ; 0x40 break; 300029f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 300029f8: e5930044 ldr r0, [r3, #68] ; 0x44 break; 300029fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 30002a00: e5930048 ldr r0, [r3, #72] ; 0x48 break; 30002a04: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 30002a08: e593004c ldr r0, [r3, #76] ; 0x4c break; 30002a0c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 30002a10: e5930054 ldr r0, [r3, #84] ; 0x54 break; 30002a14: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 30002a18: e5930058 ldr r0, [r3, #88] ; 0x58 break; 30002a1c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 30002a20: e5930064 ldr r0, [r3, #100] ; 0x64 break; 30002a24: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 30002a28: e5930050 ldr r0, [r3, #80] ; 0x50 break; 30002a2c: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 30002a30: e593005c ldr r0, [r3, #92] ; 0x5c break; 30002a34: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 30002a38: e5930060 ldr r0, [r3, #96] ; 0x60 break; 30002a3c: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 30002a40: eb002876 bl 3000cc20 <__errno> 30002a44: e3a03016 mov r3, #22 30002a48: e5803000 str r3, [r0] 30002a4c: e3e00000 mvn r0, #0 break; } return return_value; } 30002a50: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30001ea8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 30001ea8: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 30001eac: e2504000 subs r4, r0, #0 30001eb0: 1a000004 bne 30001ec8 rtems_set_errno_and_return_minus_one( EFAULT ); 30001eb4: eb002778 bl 3000bc9c <__errno> <== NOT EXECUTED 30001eb8: e3a0300e mov r3, #14 <== NOT EXECUTED 30001ebc: e5803000 str r3, [r0] <== NOT EXECUTED 30001ec0: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001ec4: ea00000c b 30001efc <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30001ec8: e10f5000 mrs r5, CPSR 30001ecc: e3853080 orr r3, r5, #128 ; 0x80 30001ed0: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 30001ed4: e1a0000d mov r0, sp 30001ed8: eb000f7c bl 30005cd0 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30001edc: 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; 30001ee0: 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; 30001ee4: e59d0004 ldr r0, [sp, #4] time->tv_sec = now.tv_sec; 30001ee8: 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; 30001eec: e3a01ffa mov r1, #1000 ; 0x3e8 30001ef0: eb00354e bl 3000f430 <__aeabi_idiv> time->tv_sec = now.tv_sec; time->tv_usec = useconds; 30001ef4: 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; 30001ef8: e3a00000 mov r0, #0 } 30001efc: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== 3000b490 : 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 ) 3000b490: e5903018 ldr r3, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3000b494: 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 ) 3000b498: e593304c ldr r3, [r3, #76] ; 0x4c 3000b49c: e3530001 cmp r3, #1 3000b4a0: 1a000005 bne 3000b4bc return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 3000b4a4: e3a03000 mov r3, #0 3000b4a8: e3a04000 mov r4, #0 3000b4ac: e580300c str r3, [r0, #12] 3000b4b0: e5804010 str r4, [r0, #16] return 0; 3000b4b4: e3a00000 mov r0, #0 3000b4b8: 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 */ 3000b4bc: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } 3000b4c0: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 30003b0c : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 30003b0c: e5913030 ldr r3, [r1, #48] ; 0x30 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30003b10: e92d4030 push {r4, r5, lr} if (tty->termios.c_iflag & ISTRIP) 30003b14: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30003b18: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 30003b1c: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) 30003b20: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30003b24: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 30003b28: 0a000007 beq 30003b4c c = tolower (c); 30003b2c: e59f2164 ldr r2, [pc, #356] ; 30003c98 30003b30: e5922000 ldr r2, [r2] 30003b34: e0822005 add r2, r2, r5 30003b38: e5d22001 ldrb r2, [r2, #1] 30003b3c: e2022003 and r2, r2, #3 30003b40: e3520001 cmp r2, #1 30003b44: 02855020 addeq r5, r5, #32 30003b48: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { 30003b4c: e355000d cmp r5, #13 30003b50: 1a000005 bne 30003b6c if (tty->termios.c_iflag & IGNCR) 30003b54: e3130080 tst r3, #128 ; 0x80 30003b58: 1a000048 bne 30003c80 return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; 30003b5c: e3130c01 tst r3, #256 ; 0x100 30003b60: 03a0500d moveq r5, #13 30003b64: 13a0500a movne r5, #10 30003b68: ea000007 b 30003b8c } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 30003b6c: e355000a cmp r5, #10 30003b70: 1a000003 bne 30003b84 c = '\r'; 30003b74: e3130040 tst r3, #64 ; 0x40 30003b78: 03a0500a moveq r5, #10 30003b7c: 13a0500d movne r5, #13 30003b80: ea000001 b 30003b8c } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 30003b84: e3550000 cmp r5, #0 30003b88: 0a00002c beq 30003c40 30003b8c: e594303c ldr r3, [r4, #60] ; 0x3c 30003b90: e3130002 tst r3, #2 30003b94: 0a000029 beq 30003c40 if (c == tty->termios.c_cc[VERASE]) { 30003b98: e5d42043 ldrb r2, [r4, #67] ; 0x43 30003b9c: e1520005 cmp r2, r5 erase (tty, 0); 30003ba0: 01a00004 moveq r0, r4 30003ba4: 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]) { 30003ba8: 0a000004 beq 30003bc0 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 30003bac: e5d42044 ldrb r2, [r4, #68] ; 0x44 30003bb0: e1520005 cmp r2, r5 30003bb4: 1a000003 bne 30003bc8 erase (tty, 1); 30003bb8: e1a00004 mov r0, r4 30003bbc: e3a01001 mov r1, #1 30003bc0: ebffff60 bl 30003948 30003bc4: ea00002d b 30003c80 return 0; } else if (c == tty->termios.c_cc[VEOF]) { 30003bc8: e5d42045 ldrb r2, [r4, #69] ; 0x45 30003bcc: e1520005 cmp r2, r5 30003bd0: 0a00002c beq 30003c88 return 1; } else if (c == '\n') { 30003bd4: e355000a cmp r5, #10 30003bd8: 1a000008 bne 30003c00 if (tty->termios.c_lflag & (ECHO | ECHONL)) 30003bdc: e3130048 tst r3, #72 ; 0x48 echo (c, tty); 30003be0: 11a00005 movne r0, r5 30003be4: 11a01004 movne r1, r4 30003be8: 1bffff33 blne 300038bc tty->cbuf[tty->ccount++] = c; 30003bec: e5943020 ldr r3, [r4, #32] 30003bf0: e594201c ldr r2, [r4, #28] 30003bf4: e3a0100a mov r1, #10 30003bf8: e7c21003 strb r1, [r2, r3] 30003bfc: ea00000c b 30003c34 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 30003c00: e5d4204c ldrb r2, [r4, #76] ; 0x4c 30003c04: e1520005 cmp r2, r5 30003c08: 0a000002 beq 30003c18 30003c0c: e5d42051 ldrb r2, [r4, #81] ; 0x51 30003c10: e1520005 cmp r2, r5 30003c14: 1a000009 bne 30003c40 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 30003c18: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 30003c1c: 11a00005 movne r0, r5 <== NOT EXECUTED 30003c20: 11a01004 movne r1, r4 <== NOT EXECUTED 30003c24: 1bffff24 blne 300038bc <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30003c28: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003c2c: e594201c ldr r2, [r4, #28] <== NOT EXECUTED 30003c30: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED 30003c34: e2833001 add r3, r3, #1 30003c38: e5843020 str r3, [r4, #32] 30003c3c: ea000011 b 30003c88 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 30003c40: e59f3054 ldr r3, [pc, #84] ; 30003c9c 30003c44: e5942020 ldr r2, [r4, #32] 30003c48: e5933008 ldr r3, [r3, #8] 30003c4c: e2433001 sub r3, r3, #1 30003c50: e1520003 cmp r2, r3 30003c54: aa00000d bge 30003c90 if (tty->termios.c_lflag & ECHO) 30003c58: e594303c ldr r3, [r4, #60] ; 0x3c 30003c5c: e3130008 tst r3, #8 echo (c, tty); 30003c60: 11a00005 movne r0, r5 30003c64: 11a01004 movne r1, r4 30003c68: 1bffff13 blne 300038bc tty->cbuf[tty->ccount++] = c; 30003c6c: e5943020 ldr r3, [r4, #32] 30003c70: e594201c ldr r2, [r4, #28] 30003c74: e7c25003 strb r5, [r2, r3] 30003c78: e2833001 add r3, r3, #1 30003c7c: 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; 30003c80: e3a00000 mov r0, #0 30003c84: 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; 30003c88: e3a00001 mov r0, #1 30003c8c: 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; 30003c90: e3a00000 mov r0, #0 <== NOT EXECUTED } 30003c94: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3001f498 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 3001f498: e3a00000 mov r0, #0 <== NOT EXECUTED 3001f49c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 3000b200 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 3000b200: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 3000b204: e5905018 ldr r5, [r0, #24] rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 3000b208: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 3000b20c: e595304c ldr r3, [r5, #76] ; 0x4c 3000b210: e3530006 cmp r3, #6 3000b214: 1a00000b bne 3000b248 if (iop->offset > the_jnode->info.linearfile.size) 3000b218: e5953054 ldr r3, [r5, #84] ; 0x54 3000b21c: e5901010 ldr r1, [r0, #16] 3000b220: e5952050 ldr r2, [r5, #80] ; 0x50 3000b224: e1510003 cmp r1, r3 3000b228: ca000003 bgt 3000b23c 3000b22c: 1a000014 bne 3000b284 3000b230: e590100c ldr r1, [r0, #12] 3000b234: e1510002 cmp r1, r2 3000b238: 9a000011 bls 3000b284 iop->offset = the_jnode->info.linearfile.size; 3000b23c: e584200c str r2, [r4, #12] <== NOT EXECUTED 3000b240: e5843010 str r3, [r4, #16] <== NOT EXECUTED 3000b244: ea00000e b 3000b284 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 3000b248: e1a00005 mov r0, r5 3000b24c: e284200c add r2, r4, #12 3000b250: e8920006 ldm r2, {r1, r2} 3000b254: ebfffeed bl 3000ae10 3000b258: e3500000 cmp r0, #0 3000b25c: 0a000005 beq 3000b278 rtems_set_errno_and_return_minus_one( ENOSPC ); 3000b260: eb00028d bl 3000bc9c <__errno> 3000b264: e3a0301c mov r3, #28 3000b268: e5803000 str r3, [r0] 3000b26c: e3e04000 mvn r4, #0 3000b270: e3e03000 mvn r3, #0 3000b274: ea000004 b 3000b28c iop->size = the_jnode->info.file.size; 3000b278: e2853050 add r3, r5, #80 ; 0x50 3000b27c: e893000c ldm r3, {r2, r3} 3000b280: e984000c stmib r4, {r2, r3} } return iop->offset; 3000b284: e284400c add r4, r4, #12 3000b288: e8940018 ldm r4, {r3, r4} } 3000b28c: e1a00003 mov r0, r3 3000b290: e1a01004 mov r1, r4 3000b294: e8bd8030 pop {r4, r5, pc} =============================================================================== 3000b10c : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 3000b10c: e5903014 ldr r3, [r0, #20] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3000b110: e92d4031 push {r0, r4, r5, lr} the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 3000b114: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3000b118: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 3000b11c: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 3000b120: 0a000015 beq 3000b17c && (the_jnode->type == IMFS_LINEAR_FILE)) { 3000b124: e594304c ldr r3, [r4, #76] ; 0x4c 3000b128: e3530006 cmp r3, #6 3000b12c: 1a000012 bne 3000b17c uint32_t count = the_jnode->info.linearfile.size; 3000b130: 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; 3000b134: 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; 3000b138: e3a02005 mov r2, #5 <== NOT EXECUTED 3000b13c: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; 3000b140: e3a01000 mov r1, #0 <== NOT EXECUTED 3000b144: 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) 3000b148: 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; 3000b14c: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 3000b150: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED 3000b154: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; 3000b158: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 3000b15c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 3000b160: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) 3000b164: 0a000004 beq 3000b17c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 3000b168: e1a00004 mov r0, r4 <== NOT EXECUTED 3000b16c: e58dc000 str ip, [sp] <== NOT EXECUTED 3000b170: ebffff6d bl 3000af2c <== NOT EXECUTED 3000b174: e3700001 cmn r0, #1 <== NOT EXECUTED 3000b178: 0a000009 beq 3000b1a4 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 3000b17c: e5953014 ldr r3, [r5, #20] 3000b180: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 3000b184: 12843050 addne r3, r4, #80 ; 0x50 3000b188: 1893000c ldmne r3, {r2, r3} 3000b18c: 1585200c strne r2, [r5, #12] 3000b190: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; 3000b194: e2844050 add r4, r4, #80 ; 0x50 3000b198: e8940018 ldm r4, {r3, r4} 3000b19c: e9850018 stmib r5, {r3, r4} return 0; 3000b1a0: e3a00000 mov r0, #0 } 3000b1a4: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 30002378 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 30002378: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 3000237c: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 30002380: e24dd02c sub sp, sp, #44 ; 0x2c 30002384: e1a06000 mov r6, r0 30002388: e1a0b001 mov fp, r1 3000238c: e1a0a002 mov sl, r2 30002390: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 30002394: 8a000004 bhi 300023ac rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 30002398: e1a00002 mov r0, r2 3000239c: eb001d01 bl 300097a8 if ( !mount_h ) 300023a0: e3500000 cmp r0, #0 300023a4: e58d0014 str r0, [sp, #20] 300023a8: 1a000002 bne 300023b8 rtems_set_errno_and_return_minus_one( EINVAL ); 300023ac: eb00263a bl 3000bc9c <__errno> 300023b0: e3a03016 mov r3, #22 300023b4: ea00003b b 300024a8 { 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; 300023b8: e25b5000 subs r5, fp, #0 300023bc: 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 : "/"; 300023c0: e59f3258 ldr r3, [pc, #600] ; 30002620 300023c4: e3550000 cmp r5, #0 300023c8: 11a0300b movne r3, fp size_t filesystemtype_size = strlen( filesystemtype ) + 1; 300023cc: 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 : "/"; 300023d0: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; 300023d4: eb002a1a bl 3000cc44 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 300023d8: 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; 300023dc: e2809001 add r9, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 300023e0: 01a07006 moveq r7, r6 300023e4: 0a000002 beq 300023f4 300023e8: e1a00006 mov r0, r6 300023ec: eb002a14 bl 3000cc44 300023f0: e2807001 add r7, r0, #1 size_t target_size = strlen( target ) + 1; 300023f4: e59d0004 ldr r0, [sp, #4] 300023f8: eb002a11 bl 3000cc44 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 300023fc: 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; 30002400: e2803001 add r3, r0, #1 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_size; 30002404: 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; 30002408: 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 ); 3000240c: e0811003 add r1, r1, r3 30002410: 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; 30002414: 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 ); 30002418: ebfffe15 bl 30001c74 if ( mt_entry != NULL ) { 3000241c: e2504000 subs r4, r0, #0 30002420: 0a00001e beq 300024a0 char *str = (char *) mt_entry + sizeof( *mt_entry ); 30002424: e2848074 add r8, r4, #116 ; 0x74 memcpy( str, filesystemtype, filesystemtype_size ); 30002428: e1a00008 mov r0, r8 3000242c: e1a0100a mov r1, sl 30002430: e1a02009 mov r2, r9 30002434: eb002846 bl 3000c554 mt_entry->type = str; 30002438: e584806c str r8, [r4, #108] ; 0x6c str += filesystemtype_size; 3000243c: e0888009 add r8, r8, r9 memcpy( str, source_or_null, source_size ); 30002440: e1a00008 mov r0, r8 30002444: e1a01006 mov r1, r6 30002448: e1a02007 mov r2, r7 3000244c: eb002840 bl 3000c554 mt_entry->dev = str; 30002450: e5848070 str r8, [r4, #112] ; 0x70 str += source_size; 30002454: e0888007 add r8, r8, r7 memcpy( str, target, target_size ); 30002458: e99d0006 ldmib sp, {r1, r2} 3000245c: e1a00008 mov r0, r8 30002460: eb00283b bl 3000c554 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 30002464: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 30002468: e59fe1b4 ldr lr, [pc, #436] ; 30002624 3000246c: e284c038 add ip, r4, #56 ; 0x38 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 30002470: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 30002474: e8be000f ldm lr!, {r0, r1, r2, r3} 30002478: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000247c: e8be000f ldm lr!, {r0, r1, r2, r3} 30002480: e8ac000f stmia ip!, {r0, r1, r2, r3} 30002484: 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 ) { 30002488: 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; 3000248c: 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; 30002490: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 30002494: 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 ) { 30002498: 0a00002e beq 30002558 3000249c: ea000003 b 300024b0 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 300024a0: eb0025fd bl 3000bc9c <__errno> <== NOT EXECUTED 300024a4: e3a0300c mov r3, #12 <== NOT EXECUTED 300024a8: e5803000 str r3, [r0] 300024ac: ea000058 b 30002614 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 300024b0: e3a03001 mov r3, #1 300024b4: e28d6018 add r6, sp, #24 300024b8: e58d3000 str r3, [sp] 300024bc: e1a0000b mov r0, fp 300024c0: e59d1010 ldr r1, [sp, #16] 300024c4: e3a02007 mov r2, #7 300024c8: e1a03006 mov r3, r6 300024cc: ebfffe17 bl 30001d30 300024d0: e3700001 cmn r0, #1 300024d4: 0a000048 beq 300025fc /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 300024d8: e1a00006 mov r0, r6 300024dc: e59d3024 ldr r3, [sp, #36] ; 0x24 300024e0: e1a0e00f mov lr, pc 300024e4: e593f010 ldr pc, [r3, #16] 300024e8: e3500001 cmp r0, #1 300024ec: 0a000002 beq 300024fc errno = ENOTDIR; 300024f0: eb0025e9 bl 3000bc9c <__errno> 300024f4: e3a03014 mov r3, #20 300024f8: ea000006 b 30002518 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 300024fc: e59f0124 ldr r0, [pc, #292] ; 30002628 30002500: e59d1018 ldr r1, [sp, #24] 30002504: ebffff85 bl 30002320 30002508: e3500000 cmp r0, #0 3000250c: 0a000003 beq 30002520 errno = EBUSY; 30002510: eb0025e1 bl 3000bc9c <__errno> 30002514: e3a03010 mov r3, #16 30002518: e5803000 str r3, [r0] goto cleanup_and_bail; 3000251c: ea000037 b 30002600 * 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; 30002520: e59d3018 ldr r3, [sp, #24] mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 30002524: e59d2028 ldr r2, [sp, #40] ; 0x28 * 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; 30002528: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 3000252c: e59d3020 ldr r3, [sp, #32] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 30002530: e5842018 str r2, [r4, #24] * 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; 30002534: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; 30002538: e59d3024 ldr r3, [sp, #36] ; 0x24 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { 3000253c: e1a00004 mov r0, r4 * 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; 30002540: 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 ) ) { 30002544: e1a0e00f mov lr, pc 30002548: e593f020 ldr pc, [r3, #32] 3000254c: e3500000 cmp r0, #0 30002550: 0a00000b beq 30002584 30002554: ea000029 b 30002600 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30002558: e59f30cc ldr r3, [pc, #204] ; 3000262c */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000255c: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 30002560: e5933000 ldr r3, [r3] 30002564: 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; 30002568: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 3000256c: 0a000004 beq 30002584 errno = EINVAL; 30002570: eb0025c9 bl 3000bc9c <__errno> <== NOT EXECUTED 30002574: e3a03016 mov r3, #22 <== NOT EXECUTED 30002578: 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; 3000257c: 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; 30002580: ea00001e b 30002600 <== 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 ) ) { 30002584: e1a00004 mov r0, r4 30002588: e59d1050 ldr r1, [sp, #80] ; 0x50 3000258c: e59d3014 ldr r3, [sp, #20] 30002590: e1a0e00f mov lr, pc 30002594: e12fff13 bx r3 30002598: e2507000 subs r7, r0, #0 3000259c: 0a000004 beq 300025b4 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 300025a0: e1a00004 mov r0, r4 300025a4: e59d3024 ldr r3, [sp, #36] ; 0x24 300025a8: e1a0e00f mov lr, pc 300025ac: e593f028 ldr pc, [r3, #40] ; 0x28 goto cleanup_and_bail; 300025b0: ea000012 b 30002600 } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 300025b4: ebffff4f bl 300022f8 300025b8: e59f006c ldr r0, [pc, #108] ; 3000262c 300025bc: e1a01004 mov r1, r4 300025c0: eb000cc4 bl 300058d8 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 300025c4: ebffff51 bl 30002310 if ( !has_target ) 300025c8: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 300025cc: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 300025d0: 1a000010 bne 30002618 rtems_filesystem_root = mt_entry->mt_fs_root; 300025d4: e59f3054 ldr r3, [pc, #84] ; 30002630 300025d8: e284401c add r4, r4, #28 300025dc: e593c000 ldr ip, [r3] 300025e0: e8b4000f ldm r4!, {r0, r1, r2, r3} 300025e4: e28cc018 add ip, ip, #24 300025e8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300025ec: e5943000 ldr r3, [r4] return 0; 300025f0: 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; 300025f4: e58c3000 str r3, [ip] 300025f8: ea000006 b 30002618 ) { 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; 300025fc: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 30002600: e1a00004 mov r0, r4 30002604: ebfffdfe bl 30001e04 if ( loc_to_free ) 30002608: e3560000 cmp r6, #0 rtems_filesystem_freenode( loc_to_free ); 3000260c: 11a00006 movne r0, r6 30002610: 1bfffdf6 blne 30001df0 return -1; 30002614: e3e00000 mvn r0, #0 } 30002618: e28dd02c add sp, sp, #44 ; 0x2c 3000261c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30002638 : */ int newlib_free_buffers( FILE *fp ) { 30002638: e92d4010 push {r4, lr} 3000263c: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 30002640: eb002698 bl 3000c0a8 30002644: e3500002 cmp r0, #2 30002648: 8a00000b bhi 3000267c case 0: case 1: case 2: if (fp->_flags & __SMBF) { 3000264c: e1d430bc ldrh r3, [r4, #12] 30002650: e3130080 tst r3, #128 ; 0x80 30002654: 0a00000a beq 30002684 free( fp->_bf._base ); 30002658: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000265c: ebfffde8 bl 30001e04 <== NOT EXECUTED fp->_flags &= ~__SMBF; 30002660: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED 30002664: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED 30002668: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 3000266c: e3a03000 mov r3, #0 <== NOT EXECUTED 30002670: e5843000 str r3, [r4] <== NOT EXECUTED 30002674: e5843010 str r3, [r4, #16] <== NOT EXECUTED 30002678: ea000001 b 30002684 <== NOT EXECUTED } break; default: fclose(fp); 3000267c: e1a00004 mov r0, r4 <== NOT EXECUTED 30002680: eb0025d3 bl 3000bdd4 <== NOT EXECUTED } return 0; } 30002684: e3a00000 mov r0, #0 30002688: e8bd8010 pop {r4, pc} =============================================================================== 3000376c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 3000376c: e92d4011 push {r0, r4, lr} 30003770: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 30003774: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 30003778: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { 3000377c: e3130001 tst r3, #1 30003780: 0a000045 beq 3000389c switch (c) { 30003784: e5dd2000 ldrb r2, [sp] 30003788: e2421008 sub r1, r2, #8 3000378c: e3510005 cmp r1, #5 30003790: 979ff101 ldrls pc, [pc, r1, lsl #2] 30003794: ea00002c b 3000384c 30003798: 30003838 .word 0x30003838 <== NOT EXECUTED 3000379c: 30003810 .word 0x30003810 <== NOT EXECUTED 300037a0: 300037b0 .word 0x300037b0 <== NOT EXECUTED 300037a4: 3000384c .word 0x3000384c <== NOT EXECUTED 300037a8: 3000384c .word 0x3000384c <== NOT EXECUTED 300037ac: 300037d8 .word 0x300037d8 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 300037b0: e3130020 tst r3, #32 tty->column = 0; 300037b4: 13a02000 movne r2, #0 300037b8: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 300037bc: e3130004 tst r3, #4 300037c0: 0a000035 beq 3000389c rtems_termios_puts ("\r", 1, tty); 300037c4: e59f00e4 ldr r0, [pc, #228] ; 300038b0 300037c8: e3a01001 mov r1, #1 300037cc: e1a02004 mov r2, r4 300037d0: ebffffa5 bl 3000366c 300037d4: ea00000b b 30003808 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 300037d8: e3130010 tst r3, #16 <== NOT EXECUTED 300037dc: 0a000002 beq 300037ec <== NOT EXECUTED 300037e0: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 300037e4: e3520000 cmp r2, #0 <== NOT EXECUTED 300037e8: 0a00002f beq 300038ac <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 300037ec: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 300037f0: 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) { 300037f4: 0a000028 beq 3000389c <== NOT EXECUTED c = '\n'; 300037f8: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 300037fc: 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'; 30003800: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 30003804: 0a000024 beq 3000389c <== NOT EXECUTED tty->column = 0; 30003808: e3a03000 mov r3, #0 3000380c: ea000021 b 30003898 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30003810: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30003814: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30003818: e2021007 and r1, r2, #7 3000381c: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30003820: e3530b06 cmp r3, #6144 ; 0x1800 30003824: e0813002 add r3, r1, r2 tty->column += i; 30003828: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 3000382c: 059f0080 ldreq r0, [pc, #128] ; 300038b4 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30003830: 1a000018 bne 30003898 30003834: ea00001a b 300038a4 } tty->column += i; break; case '\b': if (tty->column > 0) 30003838: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 3000383c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 30003840: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 30003844: ca000013 bgt 30003898 <== NOT EXECUTED 30003848: ea000013 b 3000389c <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 3000384c: e3130002 tst r3, #2 30003850: 0a000007 beq 30003874 c = toupper(c); 30003854: e59f305c ldr r3, [pc, #92] ; 300038b8 <== NOT EXECUTED 30003858: e5933000 ldr r3, [r3] <== NOT EXECUTED 3000385c: e0833002 add r3, r3, r2 <== NOT EXECUTED 30003860: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 30003864: e2033003 and r3, r3, #3 <== NOT EXECUTED 30003868: e3530002 cmp r3, #2 <== NOT EXECUTED 3000386c: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 30003870: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 30003874: e59f203c ldr r2, [pc, #60] ; 300038b8 30003878: e5dd3000 ldrb r3, [sp] 3000387c: e5922000 ldr r2, [r2] 30003880: e0823003 add r3, r2, r3 30003884: e5d33001 ldrb r3, [r3, #1] 30003888: e3130020 tst r3, #32 3000388c: 1a000002 bne 3000389c tty->column++; 30003890: e5943028 ldr r3, [r4, #40] ; 0x28 30003894: e2833001 add r3, r3, #1 30003898: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 3000389c: e1a0000d mov r0, sp 300038a0: e3a01001 mov r1, #1 300038a4: e1a02004 mov r2, r4 300038a8: ebffff6f bl 3000366c } 300038ac: e8bd8018 pop {r3, r4, pc} =============================================================================== 3000b974 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 3000b974: e59f3058 ldr r3, [pc, #88] ; 3000b9d4 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 3000b978: e92d4070 push {r4, r5, r6, lr} if (cmd == FIONREAD) { 3000b97c: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 3000b980: e1a04000 mov r4, r0 3000b984: e1a05002 mov r5, r2 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 3000b988: 13e00015 mvnne r0, #21 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 3000b98c: 18bd8070 popne {r4, r5, r6, pc} if (buffer == NULL) 3000b990: e3520000 cmp r2, #0 return -EFAULT; 3000b994: 03e0000d mvneq r0, #13 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 3000b998: 08bd8070 popeq {r4, r5, r6, pc} return -EFAULT; if (! PIPE_LOCK(pipe)) 3000b99c: e3a01000 mov r1, #0 3000b9a0: e5940028 ldr r0, [r4, #40] ; 0x28 3000b9a4: e1a02001 mov r2, r1 3000b9a8: ebffed6d bl 30006f64 3000b9ac: e2506000 subs r6, r0, #0 3000b9b0: 1a000005 bne 3000b9cc return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 3000b9b4: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); 3000b9b8: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 3000b9bc: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); 3000b9c0: ebffedad bl 3000707c return 0; 3000b9c4: e1a00006 mov r0, r6 3000b9c8: e8bd8070 pop {r4, r5, r6, pc} if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) return -EINTR; 3000b9cc: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 3000b9d0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 3000b65c : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000b65c: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000b660: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b664: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000b668: e1a04000 mov r4, r0 3000b66c: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b670: e5900028 ldr r0, [r0, #40] ; 0x28 3000b674: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000b678: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b67c: ebffee38 bl 30006f64 3000b680: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 3000b684: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b688: 0a000043 beq 3000b79c 3000b68c: ea00004e b 3000b7cc <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 3000b690: e5947014 ldr r7, [r4, #20] 3000b694: e3570000 cmp r7, #0 3000b698: 0a000044 beq 3000b7b0 goto out_locked; if (LIBIO_NODELAY(iop)) { 3000b69c: e59a8014 ldr r8, [sl, #20] 3000b6a0: e2188001 ands r8, r8, #1 3000b6a4: 1a000040 bne 3000b7ac ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 3000b6a8: e5943018 ldr r3, [r4, #24] PIPE_UNLOCK(pipe); 3000b6ac: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 3000b6b0: e2833001 add r3, r3, #1 3000b6b4: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); 3000b6b8: ebffee6f bl 3000707c if (! PIPE_READWAIT(pipe)) 3000b6bc: e1a01008 mov r1, r8 3000b6c0: e594002c ldr r0, [r4, #44] ; 0x2c 3000b6c4: eb000385 bl 3000c4e0 3000b6c8: e3500000 cmp r0, #0 3000b6cc: 01a07000 moveq r7, r0 3000b6d0: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000b6d4: e1a01008 mov r1, r8 3000b6d8: e5940028 ldr r0, [r4, #40] ; 0x28 3000b6dc: e1a02008 mov r2, r8 3000b6e0: ebffee1f bl 30006f64 3000b6e4: e3500000 cmp r0, #0 3000b6e8: 1a000033 bne 3000b7bc /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 3000b6ec: e5943018 ldr r3, [r4, #24] if (ret != 0) 3000b6f0: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 3000b6f4: e2433001 sub r3, r3, #1 3000b6f8: e5843018 str r3, [r4, #24] if (ret != 0) 3000b6fc: 1a00002b bne 3000b7b0 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 3000b700: e594300c ldr r3, [r4, #12] 3000b704: e3530000 cmp r3, #0 3000b708: 0affffe0 beq 3000b690 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 3000b70c: e0667005 rsb r7, r6, r5 3000b710: e1530007 cmp r3, r7 3000b714: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; 3000b718: e5948004 ldr r8, [r4, #4] 3000b71c: e5943008 ldr r3, [r4, #8] 3000b720: e5941000 ldr r1, [r4] 3000b724: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { 3000b728: e1570008 cmp r7, r8 3000b72c: 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); 3000b730: d0811003 addle r1, r1, r3 3000b734: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { 3000b738: da000006 ble 3000b758 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 3000b73c: e0811003 add r1, r1, r3 3000b740: e1a02008 mov r2, r8 3000b744: eb000c80 bl 3000e94c memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 3000b748: e0860008 add r0, r6, r8 3000b74c: e5941000 ldr r1, [r4] 3000b750: e0890000 add r0, r9, r0 3000b754: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 3000b758: eb000c7b bl 3000e94c pipe->Start += chunk; 3000b75c: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; 3000b760: e5941004 ldr r1, [r4, #4] 3000b764: e0870000 add r0, r7, r0 3000b768: eb0038c2 bl 30019a78 <__umodsi3> pipe->Length -= chunk; 3000b76c: e594300c ldr r3, [r4, #12] } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 3000b770: e5840008 str r0, [r4, #8] pipe->Length -= chunk; 3000b774: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 3000b778: e3530000 cmp r3, #0 pipe->Start = 0; 3000b77c: 05843008 streq r3, [r4, #8] else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; 3000b780: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) 3000b784: e594301c ldr r3, [r4, #28] 3000b788: e3530000 cmp r3, #0 PIPE_WAKEUPWRITERS(pipe); 3000b78c: 15940030 ldrne r0, [r4, #48] ; 0x30 3000b790: 11a0100d movne r1, sp 3000b794: 1b00033b blne 3000c488 read += chunk; 3000b798: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 3000b79c: e1560005 cmp r6, r5 3000b7a0: 3affffd6 bcc 3000b700 3000b7a4: e3a07000 mov r7, #0 3000b7a8: ea000000 b 3000b7b0 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 3000b7ac: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 3000b7b0: e5940028 ldr r0, [r4, #40] ; 0x28 3000b7b4: ebffee30 bl 3000707c 3000b7b8: ea000000 b 3000b7c0 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 3000b7bc: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 3000b7c0: e3560000 cmp r6, #0 3000b7c4: d1a06007 movle r6, r7 3000b7c8: ea000000 b 3000b7d0 ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 3000b7cc: e3e06003 mvn r6, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 3000b7d0: e1a00006 mov r0, r6 3000b7d4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000b7d8 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 3000b7d8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 3000b7dc: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 3000b7e0: e1a04000 mov r4, r0 3000b7e4: e1a0b001 mov fp, r1 3000b7e8: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; 3000b7ec: 01a05007 moveq r5, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 3000b7f0: 0a00005d beq 3000b96c return 0; if (! PIPE_LOCK(pipe)) 3000b7f4: e3a01000 mov r1, #0 3000b7f8: e5900028 ldr r0, [r0, #40] ; 0x28 3000b7fc: e1a02001 mov r2, r1 3000b800: ebffedd7 bl 30006f64 3000b804: e3500000 cmp r0, #0 return -EINTR; 3000b808: 13e05003 mvnne r5, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 3000b80c: 1a000056 bne 3000b96c return -EINTR; if (pipe->Readers == 0) { 3000b810: e5945010 ldr r5, [r4, #16] 3000b814: e3550000 cmp r5, #0 3000b818: 0a00004c beq 3000b950 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 3000b81c: e5949004 ldr r9, [r4, #4] /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; 3000b820: e1a05000 mov r5, r0 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 3000b824: e1570009 cmp r7, r9 3000b828: 91a09007 movls r9, r7 3000b82c: 83a09001 movhi r9, #1 3000b830: ea000040 b 3000b938 while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 3000b834: e598a014 ldr sl, [r8, #20] 3000b838: e21aa001 ands sl, sl, #1 3000b83c: 1a000041 bne 3000b948 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 3000b840: e594301c ldr r3, [r4, #28] PIPE_UNLOCK(pipe); 3000b844: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 3000b848: e2833001 add r3, r3, #1 3000b84c: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); 3000b850: ebffee09 bl 3000707c if (! PIPE_WRITEWAIT(pipe)) 3000b854: e1a0100a mov r1, sl 3000b858: e5940030 ldr r0, [r4, #48] ; 0x30 3000b85c: eb00031f bl 3000c4e0 3000b860: e3500000 cmp r0, #0 3000b864: 01a06000 moveq r6, r0 3000b868: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000b86c: e1a0100a mov r1, sl 3000b870: e5940028 ldr r0, [r4, #40] ; 0x28 3000b874: e1a0200a mov r2, sl 3000b878: ebffedb9 bl 30006f64 3000b87c: e3500000 cmp r0, #0 3000b880: 1a000036 bne 3000b960 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 3000b884: e594301c ldr r3, [r4, #28] if (ret != 0) 3000b888: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 3000b88c: e2433001 sub r3, r3, #1 3000b890: e584301c str r3, [r4, #28] if (ret != 0) 3000b894: 1a00002e bne 3000b954 goto out_locked; if (pipe->Readers == 0) { 3000b898: e5943010 ldr r3, [r4, #16] 3000b89c: e3530000 cmp r3, #0 3000b8a0: 0a00002a beq 3000b950 /* 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) { 3000b8a4: e594a004 ldr sl, [r4, #4] 3000b8a8: e594300c ldr r3, [r4, #12] 3000b8ac: e063200a rsb r2, r3, sl 3000b8b0: e1520009 cmp r2, r9 3000b8b4: 3affffde bcc 3000b834 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); 3000b8b8: e5940008 ldr r0, [r4, #8] 3000b8bc: e1a0100a mov r1, sl 3000b8c0: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 3000b8c4: e0656007 rsb r6, r5, r7 3000b8c8: e1520006 cmp r2, r6 3000b8cc: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); 3000b8d0: eb003868 bl 30019a78 <__umodsi3> 3000b8d4: e5943000 ldr r3, [r4] 3000b8d8: e060a00a rsb sl, r0, sl if (chunk > chunk1) { 3000b8dc: e156000a cmp r6, sl 3000b8e0: 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); 3000b8e4: d0830000 addle r0, r3, r0 3000b8e8: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { 3000b8ec: da000006 ble 3000b90c memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 3000b8f0: e1a0200a mov r2, sl 3000b8f4: e0830000 add r0, r3, r0 3000b8f8: eb000c13 bl 3000e94c memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 3000b8fc: e08a1005 add r1, sl, r5 3000b900: e5940000 ldr r0, [r4] 3000b904: e08b1001 add r1, fp, r1 3000b908: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 3000b90c: eb000c0e bl 3000e94c pipe->Length += chunk; 3000b910: e594300c ldr r3, [r4, #12] 3000b914: e0833006 add r3, r3, r6 3000b918: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) 3000b91c: e5943018 ldr r3, [r4, #24] 3000b920: e3530000 cmp r3, #0 PIPE_WAKEUPREADERS(pipe); 3000b924: 1594002c ldrne r0, [r4, #44] ; 0x2c 3000b928: 11a0100d movne r1, sp 3000b92c: 1b0002d5 blne 3000c488 written += chunk; 3000b930: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 3000b934: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 3000b938: e1550007 cmp r5, r7 3000b93c: 3affffd8 bcc 3000b8a4 3000b940: e3a06000 mov r6, #0 3000b944: ea000002 b 3000b954 while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 3000b948: e3e0600a mvn r6, #10 3000b94c: ea000000 b 3000b954 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 3000b950: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 3000b954: e5940028 ldr r0, [r4, #40] ; 0x28 3000b958: ebffedc7 bl 3000707c 3000b95c: ea000000 b 3000b964 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 3000b960: e3e06003 mvn r6, #3 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; 3000b964: e3550000 cmp r5, #0 3000b968: d1a05006 movle r5, r6 } 3000b96c: e1a00005 mov r0, r5 3000b970: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30011668 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 30011668: e59f310c ldr r3, [pc, #268] ; 3001177c void *realloc( void *ptr, size_t size ) { 3001166c: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 30011670: e5932010 ldr r2, [r3, #16] void *realloc( void *ptr, size_t size ) { 30011674: e1a04000 mov r4, r0 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 30011678: e2822001 add r2, r2, #1 3001167c: 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())) { 30011680: e59f30f8 ldr r3, [pc, #248] ; 30011780 void *realloc( void *ptr, size_t size ) { 30011684: 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())) { 30011688: e5933000 ldr r3, [r3] 3001168c: e3530003 cmp r3, #3 30011690: 1a000009 bne 300116bc if (_Thread_Dispatch_disable_level > 0) 30011694: e59f30e8 ldr r3, [pc, #232] ; 30011784 30011698: e5933000 ldr r3, [r3] 3001169c: e3530000 cmp r3, #0 return (void *) 0; 300116a0: 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) 300116a4: 1a000032 bne 30011774 return (void *) 0; if (_ISR_Nest_level > 0) 300116a8: e59f20d8 ldr r2, [pc, #216] ; 30011788 300116ac: e5922000 ldr r2, [r2] 300116b0: e3520000 cmp r2, #0 return (void *) 0; 300116b4: 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) 300116b8: 1a00002d bne 30011774 } /* * Continue with realloc(). */ if ( !ptr ) 300116bc: e3540000 cmp r4, #0 300116c0: 1a000003 bne 300116d4 return malloc( size ); 300116c4: e1a00005 mov r0, r5 300116c8: ebffc29c bl 30002140 300116cc: e1a04000 mov r4, r0 300116d0: ea000027 b 30011774 if ( !size ) { 300116d4: e3550000 cmp r5, #0 300116d8: 1a000003 bne 300116ec free( ptr ); 300116dc: e1a00004 mov r0, r4 <== NOT EXECUTED 300116e0: ebffc1c7 bl 30001e04 <== NOT EXECUTED return (void *) 0; 300116e4: e1a04005 mov r4, r5 <== NOT EXECUTED 300116e8: ea000021 b 30011774 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 300116ec: e59f6098 ldr r6, [pc, #152] ; 3001178c 300116f0: e1a01004 mov r1, r4 300116f4: e5960000 ldr r0, [r6] 300116f8: e1a0200d mov r2, sp 300116fc: eb00004e bl 3001183c <_Protected_heap_Get_block_size> 30011700: e2507000 subs r7, r0, #0 30011704: 1a000004 bne 3001171c errno = EINVAL; 30011708: ebffe963 bl 3000bc9c <__errno> 3001170c: e3a03016 mov r3, #22 30011710: e5803000 str r3, [r0] return (void *) 0; 30011714: e1a04007 mov r4, r7 30011718: ea000015 b 30011774 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 3001171c: e5960000 ldr r0, [r6] 30011720: e1a01004 mov r1, r4 30011724: e1a02005 mov r2, r5 30011728: eb000054 bl 30011880 <_Protected_heap_Resize_block> 3001172c: e3500000 cmp r0, #0 30011730: 1a00000f bne 30011774 * 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 ); 30011734: e1a00005 mov r0, r5 30011738: ebffc280 bl 30002140 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 3001173c: e59f3038 ldr r3, [pc, #56] ; 3001177c if ( !new_area ) { 30011740: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 30011744: e5932004 ldr r2, [r3, #4] 30011748: e2422001 sub r2, r2, #1 3001174c: e5832004 str r2, [r3, #4] if ( !new_area ) { 30011750: 0a000006 beq 30011770 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 30011754: e59d2000 ldr r2, [sp] 30011758: e1a01004 mov r1, r4 3001175c: e1550002 cmp r5, r2 30011760: 31a02005 movcc r2, r5 30011764: ebffeb7a bl 3000c554 free( ptr ); 30011768: e1a00004 mov r0, r4 3001176c: ebffc1a4 bl 30001e04 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 30011770: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 30011774: e1a00004 mov r0, r4 30011778: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 30002450 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 30002450: 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 ) 30002454: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 30002458: e24dd040 sub sp, sp, #64 ; 0x40 3000245c: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 30002460: 0a000055 beq 300025bc * 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 ); 30002464: e28d5030 add r5, sp, #48 ; 0x30 30002468: e1a00005 mov r0, r5 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 3000246c: 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 ); 30002470: eb001467 bl 30007614 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 30002474: e1a01005 mov r1, r5 30002478: e59f0144 ldr r0, [pc, #324] ; 300025c4 3000247c: e1a02004 mov r2, r4 30002480: eb001d18 bl 300098e8 <_Timespec_Subtract> } } } #endif (*print)( 30002484: e1a00008 mov r0, r8 30002488: e59f1138 ldr r1, [pc, #312] ; 300025c8 3000248c: e1a0e00f mov lr, pc 30002490: e12fff1a bx sl 30002494: e59f5130 ldr r5, [pc, #304] ; 300025cc the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 30002498: e28db008 add fp, sp, #8 #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 3000249c: e5b53004 ldr r3, [r5, #4]! 300024a0: e5936004 ldr r6, [r3, #4] if ( information ) { 300024a4: e3560000 cmp r6, #0 300024a8: 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( 300024ac: 128d9018 addne r9, sp, #24 if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 300024b0: 1a000032 bne 30002580 300024b4: ea000034 b 3000258c <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 300024b8: e596301c ldr r3, [r6, #28] 300024bc: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 300024c0: e3540000 cmp r4, #0 300024c4: 0a00002c beq 3000257c continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 300024c8: e3a0100d mov r1, #13 300024cc: e1a0200b mov r2, fp 300024d0: e5940008 ldr r0, [r4, #8] 300024d4: eb000fc5 bl 300063f0 (*print)( 300024d8: e5942008 ldr r2, [r4, #8] 300024dc: e1a0300b mov r3, fp 300024e0: e1a00008 mov r0, r8 300024e4: e59f10e4 ldr r1, [pc, #228] ; 300025d0 300024e8: e1a0e00f mov lr, pc 300024ec: 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; 300024f0: e2843084 add r3, r4, #132 ; 0x84 300024f4: e893000c ldm r3, {r2, r3} 300024f8: e58d2020 str r2, [sp, #32] 300024fc: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 30002500: e59f20cc ldr r2, [pc, #204] ; 300025d4 30002504: e5923004 ldr r3, [r2, #4] 30002508: e5932008 ldr r2, [r3, #8] 3000250c: e5943008 ldr r3, [r4, #8] 30002510: e1520003 cmp r2, r3 30002514: 1a000006 bne 30002534 Timestamp_Control used; _Timestamp_Subtract( 30002518: e59f00b8 ldr r0, [pc, #184] ; 300025d8 3000251c: e28d1030 add r1, sp, #48 ; 0x30 30002520: e1a02009 mov r2, r9 30002524: eb001cef bl 300098e8 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 30002528: e28d0020 add r0, sp, #32 3000252c: e1a01009 mov r1, r9 30002530: eb001cb1 bl 300097fc <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 30002534: e28d203c add r2, sp, #60 ; 0x3c 30002538: e28d3038 add r3, sp, #56 ; 0x38 3000253c: e28d0020 add r0, sp, #32 30002540: e28d1028 add r1, sp, #40 ; 0x28 30002544: eb001cc4 bl 3000985c <_Timespec_Divide> /* * Print the information */ (*print)( context, 30002548: e3a01ffa mov r1, #1000 ; 0x3e8 3000254c: e59d0024 ldr r0, [sp, #36] ; 0x24 30002550: eb005156 bl 30016ab0 <__aeabi_uidiv> 30002554: e59d203c ldr r2, [sp, #60] ; 0x3c 30002558: e1a03000 mov r3, r0 3000255c: e58d2000 str r2, [sp] 30002560: e59d2038 ldr r2, [sp, #56] ; 0x38 30002564: e1a00008 mov r0, r8 30002568: e58d2004 str r2, [sp, #4] 3000256c: e59f1068 ldr r1, [pc, #104] ; 300025dc 30002570: e59d2020 ldr r2, [sp, #32] 30002574: e1a0e00f mov lr, pc 30002578: e12fff1a bx sl continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 3000257c: e2877001 add r7, r7, #1 30002580: e1d631b0 ldrh r3, [r6, #16] 30002584: e1570003 cmp r7, r3 30002588: 9affffca bls 300024b8 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 3000258c: e59f304c ldr r3, [pc, #76] ; 300025e0 30002590: e1550003 cmp r5, r3 30002594: 1affffc0 bne 3000249c } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 30002598: e3a01ffa mov r1, #1000 ; 0x3e8 <== NOT EXECUTED 3000259c: e59d002c ldr r0, [sp, #44] ; 0x2c <== NOT EXECUTED 300025a0: eb005142 bl 30016ab0 <__aeabi_uidiv> <== NOT EXECUTED 300025a4: e59f1038 ldr r1, [pc, #56] ; 300025e4 <== NOT EXECUTED 300025a8: e1a03000 mov r3, r0 <== NOT EXECUTED 300025ac: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 300025b0: e1a00008 mov r0, r8 <== NOT EXECUTED 300025b4: e1a0e00f mov lr, pc <== NOT EXECUTED 300025b8: e12fff1a bx sl <== NOT EXECUTED "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 300025bc: e28dd040 add sp, sp, #64 ; 0x40 <== NOT EXECUTED 300025c0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} <== NOT EXECUTED =============================================================================== 30001b64 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 30001b64: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 30001b68: e59f60e0 ldr r6, [pc, #224] ; 30001c50 30001b6c: e3a02012 mov r2, #18 30001b70: e5963000 ldr r3, [r6] * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 30001b74: e24dd018 sub sp, sp, #24 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 30001b78: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 30001b7c: e59f30d0 ldr r3, [pc, #208] ; 30001c54 30001b80: e5933000 ldr r3, [r3] 30001b84: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 30001b88: 059f00c8 ldreq r0, [pc, #200] ; 30001c58 rtems_filesystem_umask = 022; /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 30001b8c: 0a00000a beq 30001bbc rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 30001b90: e59f30c4 ldr r3, [pc, #196] ; 30001c5c status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 30001b94: 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]; 30001b98: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 30001b9c: e58d5000 str r5, [sp] 30001ba0: e5930008 ldr r0, [r3, #8] 30001ba4: e593100c ldr r1, [r3, #12] 30001ba8: e893000c ldm r3, {r2, r3} 30001bac: eb0001f1 bl 30002378 if ( status == -1 ) 30001bb0: e3700001 cmn r0, #1 30001bb4: 1a000001 bne 30001bc0 rtems_fatal_error_occurred( 0xABCD0002 ); 30001bb8: e59f00a0 ldr r0, [pc, #160] ; 30001c60 <== NOT EXECUTED 30001bbc: eb000e9a bl 3000562c <== NOT EXECUTED rtems_filesystem_link_counts = 0; 30001bc0: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30001bc4: 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; 30001bc8: 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); 30001bcc: e3a01001 mov r1, #1 30001bd0: e1a03004 mov r3, r4 30001bd4: e1a02005 mov r2, r5 30001bd8: e59f0084 ldr r0, [pc, #132] ; 30001c64 30001bdc: e58d5000 str r5, [sp] 30001be0: eb000052 bl 30001d30 rtems_filesystem_root = loc; 30001be4: e596c000 ldr ip, [r6] 30001be8: e1a07004 mov r7, r4 30001bec: e28cc018 add ip, ip, #24 30001bf0: e8b7000f ldm r7!, {r0, r1, r2, r3} 30001bf4: e8ac000f stmia ip!, {r0, r1, r2, r3} 30001bf8: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30001bfc: 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; 30001c00: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30001c04: e1a02005 mov r2, r5 30001c08: e1a03004 mov r3, r4 30001c0c: e59f0050 ldr r0, [pc, #80] ; 30001c64 30001c10: e58d5000 str r5, [sp] 30001c14: eb000045 bl 30001d30 rtems_filesystem_current = loc; 30001c18: e8b4000f ldm r4!, {r0, r1, r2, r3} 30001c1c: e596c000 ldr ip, [r6] 30001c20: e28cc004 add ip, ip, #4 30001c24: e8ac000f stmia ip!, {r0, r1, r2, r3} 30001c28: 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); 30001c2c: e59f0034 ldr r0, [pc, #52] ; 30001c68 /* 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; 30001c30: 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); 30001c34: e59f1030 ldr r1, [pc, #48] ; 30001c6c 30001c38: eb00017c bl 30002230 if ( status != 0 ) 30001c3c: e3500000 cmp r0, #0 rtems_fatal_error_occurred( 0xABCD0003 ); 30001c40: 159f0028 ldrne r0, [pc, #40] ; 30001c70 * 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 ) 30001c44: 1affffdc bne 30001bbc * 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. */ } 30001c48: e28dd018 add sp, sp, #24 30001c4c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30007be4 : #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) { 30007be4: e92d41f0 push {r4, r5, r6, r7, r8, lr} uint32_t i; uint32_t api_index; Thread_Control *the_thread; Objects_Information *information; if ( !routine ) 30007be8: e2508000 subs r8, r0, #0 30007bec: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} 30007bf0: e59f4048 ldr r4, [pc, #72] ; 30007c40 #endif #include #include void rtems_iterate_over_all_threads(rtems_per_thread_routine routine) 30007bf4: e284700c add r7, r4, #12 #if defined(RTEMS_DEBUG) if ( !_Objects_Information_table[ api_index ] ) continue; #endif information = _Objects_Information_table[ api_index ][ 1 ]; 30007bf8: e5b43004 ldr r3, [r4, #4]! 30007bfc: e5936004 ldr r6, [r3, #4] if ( !information ) 30007c00: e3560000 cmp r6, #0 30007c04: 13a05001 movne r5, #1 30007c08: 1a000006 bne 30007c28 30007c0c: ea000008 b 30007c34 continue; for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 30007c10: e596301c ldr r3, [r6, #28] 30007c14: e7930105 ldr r0, [r3, r5, lsl #2] if ( !the_thread ) 30007c18: e3500000 cmp r0, #0 continue; (*routine)(the_thread); 30007c1c: 11a0e00f movne lr, pc 30007c20: 112fff18 bxne r8 information = _Objects_Information_table[ api_index ][ 1 ]; if ( !information ) continue; for ( i=1 ; i <= information->maximum ; i++ ) { 30007c24: e2855001 add r5, r5, #1 30007c28: e1d631b0 ldrh r3, [r6, #16] 30007c2c: e1550003 cmp r5, r3 30007c30: 9afffff6 bls 30007c10 Objects_Information *information; if ( !routine ) return; for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { 30007c34: e1540007 cmp r4, r7 30007c38: 1affffee bne 30007bf8 30007c3c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 300094b8 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 300094b8: e2003006 and r3, r0, #6 300094bc: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; 300094c0: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 300094c4: 0a000005 beq 300094e0 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 300094c8: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; 300094cc: 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) { 300094d0: 1a000002 bne 300094e0 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 300094d4: e3100004 tst r0, #4 <== NOT EXECUTED 300094d8: 03a03000 moveq r3, #0 <== NOT EXECUTED 300094dc: 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 ) { 300094e0: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; 300094e4: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 300094e8: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; 300094ec: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 300094f0: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; 300094f4: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } 300094f8: e1a00003 mov r0, r3 300094fc: e12fff1e bx lr =============================================================================== 3000b898 : rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 3000b898: 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 ) 3000b89c: e2514000 subs r4, r1, #0 rtems_status_code rtems_rate_monotonic_get_status( rtems_id id, rtems_rate_monotonic_period_status *status ) { 3000b8a0: e1a03000 mov r3, r0 3000b8a4: 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; 3000b8a8: 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 ) 3000b8ac: 0a000023 beq 3000b940 3000b8b0: e1a01003 mov r1, r3 3000b8b4: e28d2010 add r2, sp, #16 3000b8b8: e59f0088 ldr r0, [pc, #136] ; 3000b948 3000b8bc: ebfff222 bl 3000814c <_Objects_Get> return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 3000b8c0: e59d2010 ldr r2, [sp, #16] 3000b8c4: e1a03000 mov r3, r0 3000b8c8: e3520000 cmp r2, #0 #endif case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; 3000b8cc: 13a00004 movne r0, #4 if ( !status ) return RTEMS_INVALID_ADDRESS; the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { 3000b8d0: 1a00001a bne 3000b940 case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 3000b8d4: e5932040 ldr r2, [r3, #64] ; 0x40 status->state = the_period->state; 3000b8d8: 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; 3000b8dc: 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 ) { 3000b8e0: e3530000 cmp r3, #0 the_period = _Rate_monotonic_Get( id, &location ); switch ( location ) { case OBJECTS_LOCAL: status->owner = the_period->owner->Object.id; 3000b8e4: 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 ); 3000b8e8: 05843008 streq r3, [r4, #8] 3000b8ec: 0584300c streq r3, [r4, #12] _Timespec_Set_to_zero( &status->executed_since_last_period ); 3000b8f0: 05843010 streq r3, [r4, #16] 3000b8f4: 05843014 streq r3, [r4, #20] 3000b8f8: 0a00000e beq 3000b938 } else { /* * Grab the current status. */ valid_status = 3000b8fc: e1a0100d mov r1, sp 3000b900: e28d2008 add r2, sp, #8 3000b904: ebffe958 bl 30005e6c <_Rate_monotonic_Get_status> _Rate_monotonic_Get_status( the_period, &since_last_period, &executed ); if (!valid_status) { 3000b908: e3500000 cmp r0, #0 3000b90c: 1a000002 bne 3000b91c _Thread_Enable_dispatch(); 3000b910: ebfff42b bl 300089c4 <_Thread_Enable_dispatch> <== NOT EXECUTED return RTEMS_NOT_DEFINED; 3000b914: e3a0000b mov r0, #11 <== NOT EXECUTED 3000b918: ea000008 b 3000b940 <== NOT EXECUTED } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_To_timespec( 3000b91c: e89d000c ldm sp, {r2, r3} 3000b920: e5842008 str r2, [r4, #8] 3000b924: e584300c str r3, [r4, #12] &since_last_period, &status->since_last_period ); _Timestamp_To_timespec( 3000b928: e28d3008 add r3, sp, #8 3000b92c: e893000c ldm r3, {r2, r3} 3000b930: e5842010 str r2, [r4, #16] 3000b934: e5843014 str r3, [r4, #20] status->since_last_period = since_last_period; status->executed_since_last_period = executed; #endif } _Thread_Enable_dispatch(); 3000b938: ebfff421 bl 300089c4 <_Thread_Enable_dispatch> return RTEMS_SUCCESSFUL; 3000b93c: e3a00000 mov r0, #0 case OBJECTS_ERROR: break; } return RTEMS_INVALID_ID; } 3000b940: e28dd014 add sp, sp, #20 3000b944: e8bd8010 pop {r4, pc} =============================================================================== 30001804 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30001804: e92d4810 push {r4, fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30001808: e59f3078 ldr r3, [pc, #120] ; 30001888 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 3000180c: e28db008 add fp, sp, #8 Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30001810: e5933004 ldr r3, [r3, #4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 30001814: e59300c4 ldr r0, [r3, #196] ; 0xc4 30001818: e15b0000 cmp fp, r0 return false; 3000181c: 33a04000 movcc r4, #0 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 30001820: 3a000004 bcc 30001838 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 30001824: e59340c0 ldr r4, [r3, #192] ; 0xc0 30001828: e0804004 add r4, r0, r4 } /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) 3000182c: e15b0004 cmp fp, r4 30001830: 83a04000 movhi r4, #0 30001834: 93a04001 movls r4, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 30001838: e59f304c ldr r3, [pc, #76] ; 3000188c 3000183c: e5933008 ldr r3, [r3, #8] 30001840: 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; 30001844: 03a01001 moveq r1, #1 /* * The stack checker must be initialized before the pattern is there * to check. */ if ( Stack_check_Initialized ) { 30001848: 0a000005 beq 30001864 pattern_ok = (!memcmp( 3000184c: e59f103c ldr r1, [pc, #60] ; 30001890 30001850: e2800008 add r0, r0, #8 30001854: e3a02010 mov r2, #16 30001858: eb002c46 bl 3000c978 3000185c: e2701001 rsbs r1, r0, #1 30001860: 33a01000 movcc r1, #0 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { 30001864: e3540000 cmp r4, #0 30001868: 0a000001 beq 30001874 3000186c: e3510000 cmp r1, #0 30001870: 1a000002 bne 30001880 Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 30001874: e59f300c ldr r3, [pc, #12] ; 30001888 <== NOT EXECUTED 30001878: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 3000187c: ebffff9d bl 300016f8 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 30001880: e3a00000 mov r0, #0 30001884: e8bd8810 pop {r4, fp, pc} =============================================================================== 300018f4 : } void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 300018f4: e59f1004 ldr r1, [pc, #4] ; 30001900 <== NOT EXECUTED 300018f8: e3a00000 mov r0, #0 <== NOT EXECUTED 300018fc: eaffffe4 b 30001894 <== NOT EXECUTED =============================================================================== 30001894 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 30001894: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED if ( !print ) 30001898: e2515000 subs r5, r1, #0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 3000189c: e1a06000 mov r6, r0 <== NOT EXECUTED if ( !print ) 300018a0: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return; print_context = context; 300018a4: e59f4038 ldr r4, [pc, #56] ; 300018e4 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 300018a8: e59f1038 ldr r1, [pc, #56] ; 300018e8 <== NOT EXECUTED ) { if ( !print ) return; print_context = context; 300018ac: e5840004 str r0, [r4, #4] <== NOT EXECUTED print_handler = print; 300018b0: e5845000 str r5, [r4] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 300018b4: e1a0e00f mov lr, pc <== NOT EXECUTED 300018b8: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 300018bc: e59f1028 ldr r1, [pc, #40] ; 300018ec <== NOT EXECUTED 300018c0: e1a00006 mov r0, r6 <== NOT EXECUTED 300018c4: e1a0e00f mov lr, pc <== NOT EXECUTED 300018c8: e12fff15 bx r5 <== NOT EXECUTED " ID NAME LOW HIGH CURRENT AVAILABLE USED\n" ); /* iterate over all threads and dump the usage */ rtems_iterate_over_all_threads( Stack_check_Dump_threads_usage ); 300018cc: e59f001c ldr r0, [pc, #28] ; 300018f0 <== NOT EXECUTED 300018d0: eb00132e bl 30006590 <== NOT EXECUTED #if (CPU_ALLOCATE_INTERRUPT_STACK == TRUE) /* dump interrupt stack info if any */ Stack_check_Dump_threads_usage((Thread_Control *) -1); #endif print_context = NULL; 300018d4: e3a03000 mov r3, #0 <== NOT EXECUTED 300018d8: e5843004 str r3, [r4, #4] <== NOT EXECUTED print_handler = NULL; 300018dc: e5843000 str r3, [r4] <== NOT EXECUTED 300018e0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 300017a0 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 300017a0: 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; 300017a4: e59030c4 ldr r3, [r0, #196] ; 0xc4 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 300017a8: e28db00c add fp, sp, #12 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 300017ac: e15b0003 cmp fp, r3 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 300017b0: e1a04000 mov r4, r0 { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 300017b4: 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; 300017b8: e2830008 add r0, r3, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 300017bc: 3a000004 bcc 300017d4 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 300017c0: e59450c0 ldr r5, [r4, #192] ; 0xc0 300017c4: e0835005 add r5, r3, r5 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 300017c8: e15b0005 cmp fp, r5 300017cc: 83a05000 movhi r5, #0 300017d0: 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, 300017d4: e59f1024 ldr r1, [pc, #36] ; 30001800 300017d8: e3a02010 mov r2, #16 300017dc: eb002c65 bl 3000c978 300017e0: e2701001 rsbs r1, r0, #1 300017e4: 33a01000 movcc r1, #0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 300017e8: e3550000 cmp r5, #0 300017ec: 0a000001 beq 300017f8 300017f0: e3510000 cmp r1, #0 300017f4: 18bd8830 popne {r4, r5, fp, pc} Stack_check_report_blown_task( running, pattern_ok ); 300017f8: e1a00004 mov r0, r4 <== NOT EXECUTED 300017fc: ebffffbd bl 300016f8 <== NOT EXECUTED =============================================================================== 3000b4c4 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000b4c4: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000b4c8: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000b4cc: e1a05000 mov r5, r0 3000b4d0: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 3000b4d4: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000b4d8: 0a000018 beq 3000b540 return RTEMS_INVALID_ADDRESS; errno = 0; 3000b4dc: eb000797 bl 3000d340 <__errno> 3000b4e0: e3a03000 mov r3, #0 3000b4e4: 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 ); 3000b4e8: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 3000b4ec: 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 ); 3000b4f0: e1a00005 mov r0, r5 3000b4f4: e3a02010 mov r2, #16 3000b4f8: eb0014bf bl 300107fc #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 ) 3000b4fc: e3560000 cmp r6, #0 *endptr = end; 3000b500: 159d3000 ldrne r3, [sp] *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); 3000b504: e1a07000 mov r7, r0 result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; 3000b508: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 3000b50c: e59d3000 ldr r3, [sp] 3000b510: e1530005 cmp r3, r5 return RTEMS_NOT_DEFINED; 3000b514: 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 ) 3000b518: 0a000008 beq 3000b540 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 3000b51c: e3770001 cmn r7, #1 3000b520: 1a000004 bne 3000b538 3000b524: eb000785 bl 3000d340 <__errno> <== NOT EXECUTED 3000b528: e5903000 ldr r3, [r0] <== NOT EXECUTED 3000b52c: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 3000b530: 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)) 3000b534: 0a000001 beq 3000b540 <== 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; 3000b538: e5847000 str r7, [r4] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 3000b53c: e3a00000 mov r0, #0 } 3000b540: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 30001bc8 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 30001bc8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30001bcc: e24ddf6b sub sp, sp, #428 ; 0x1ac 30001bd0: e58d1010 str r1, [sp, #16] 30001bd4: e58d2018 str r2, [sp, #24] 30001bd8: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 30001bdc: eb003aa8 bl 30010684 30001be0: e3a02000 mov r2, #0 30001be4: e1a01000 mov r1, r0 30001be8: e28d3f65 add r3, sp, #404 ; 0x194 30001bec: e59d000c ldr r0, [sp, #12] 30001bf0: e58d2000 str r2, [sp] 30001bf4: eb00029b bl 30002668 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 30001bf8: e2504000 subs r4, r0, #0 30001bfc: 1a00006c bne 30001db4 return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 30001c00: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 30001c04: e59f21c0 ldr r2, [pc, #448] ; 30001dcc 30001c08: e1530002 cmp r3, r2 30001c0c: 0a000005 beq 30001c28 30001c10: e59f21b8 ldr r2, [pc, #440] ; 30001dd0 30001c14: e1530002 cmp r3, r2 30001c18: 1a000065 bne 30001db4 30001c1c: ea000001 b 30001c28 <== NOT EXECUTED 30001c20: e1a08004 mov r8, r4 30001c24: ea000006 b 30001c44 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 30001c28: e28d2f65 add r2, sp, #404 ; 0x194 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) 30001c2c: 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); 30001c30: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 30001c34: e28d9d06 add r9, sp, #384 ; 0x180 30001c38: e58d2004 str r2, [sp, #4] * - 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); 30001c3c: e28d501c add r5, sp, #28 30001c40: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 30001c44: e59d3018 ldr r3, [sp, #24] 30001c48: e2884c02 add r4, r8, #512 ; 0x200 30001c4c: e1540003 cmp r4, r3 30001c50: 8a000059 bhi 30001dbc break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 30001c54: e59de010 ldr lr, [sp, #16] offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 30001c58: e59f1174 ldr r1, [pc, #372] ; 30001dd4 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 30001c5c: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar", 5)) 30001c60: e2880c01 add r0, r8, #256 ; 0x100 30001c64: e2800001 add r0, r0, #1 30001c68: e3a02005 mov r2, #5 30001c6c: eb003a9c bl 300106e4 30001c70: e2506000 subs r6, r0, #0 30001c74: 1a000050 bne 30001dbc break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 30001c78: e3a02063 mov r2, #99 ; 0x63 30001c7c: e1a01008 mov r1, r8 30001c80: e1a00007 mov r0, r7 30001c84: eb003af2 bl 30010854 filename[MAX_NAME_FIELD_SIZE] = '\0'; 30001c88: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 30001c8c: e3a01008 mov r1, #8 30001c90: 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]; 30001c94: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 30001c98: eb001d8b bl 300092cc <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 30001c9c: 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); 30001ca0: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 30001ca4: e288007c add r0, r8, #124 ; 0x7c 30001ca8: eb001d87 bl 300092cc <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 30001cac: 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); 30001cb0: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 30001cb4: e2880094 add r0, r8, #148 ; 0x94 30001cb8: eb001d83 bl 300092cc <_rtems_octal2ulong> 30001cbc: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 30001cc0: e1a00008 mov r0, r8 30001cc4: e58d3008 str r3, [sp, #8] 30001cc8: eb001d8d bl 30009304 <_rtems_tar_header_checksum> 30001ccc: e59d3008 ldr r3, [sp, #8] 30001cd0: e1500003 cmp r0, r3 30001cd4: 1a000038 bne 30001dbc * 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) { 30001cd8: e3560035 cmp r6, #53 ; 0x35 30001cdc: 1a000012 bne 30001d2c strcpy(full_filename, mountpoint); 30001ce0: e59d100c ldr r1, [sp, #12] 30001ce4: e1a00005 mov r0, r5 30001ce8: eb0038a1 bl 3000ff74 if (full_filename[strlen(full_filename)-1] != '/') 30001cec: e1a00005 mov r0, r5 30001cf0: eb003a63 bl 30010684 30001cf4: e28d2f6b add r2, sp, #428 ; 0x1ac 30001cf8: e0820000 add r0, r2, r0 30001cfc: e5503191 ldrb r3, [r0, #-401] ; 0x191 30001d00: e353002f cmp r3, #47 ; 0x2f strcat(full_filename, "/"); 30001d04: 11a00005 movne r0, r5 30001d08: 159f10c8 ldrne r1, [pc, #200] ; 30001dd8 30001d0c: 1b0037e1 blne 3000fc98 strcat(full_filename, filename); 30001d10: e1a01007 mov r1, r7 30001d14: e1a00005 mov r0, r5 30001d18: eb0037de bl 3000fc98 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 30001d1c: e1a00005 mov r0, r5 30001d20: e59f10b4 ldr r1, [pc, #180] ; 30001ddc 30001d24: eb000464 bl 30002ebc 30001d28: eaffffbc b 30001c20 * 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) { 30001d2c: e3560030 cmp r6, #48 ; 0x30 30001d30: 1affffba bne 30001c20 const char *name; loc = root_loc; 30001d34: e59dc004 ldr ip, [sp, #4] 30001d38: e1a0e009 mov lr, r9 30001d3c: e8bc000f ldm ip!, {r0, r1, r2, r3} 30001d40: e8ae000f stmia lr!, {r0, r1, r2, r3} 30001d44: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 30001d48: e1a00007 mov r0, r7 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 30001d4c: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 30001d50: e1a01009 mov r1, r9 30001d54: e28d2f6a add r2, sp, #424 ; 0x1a8 30001d58: eb002034 bl 30009e30 30001d5c: e2506000 subs r6, r0, #0 30001d60: 1a00000d bne 30001d9c node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 30001d64: e59d2014 ldr r2, [sp, #20] else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( 30001d68: e1a00009 mov r0, r9 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 30001d6c: e1a03b82 lsl r3, r2, #23 30001d70: 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( 30001d74: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 30001d78: e3833902 orr r3, r3, #32768 ; 0x8000 30001d7c: e3a01006 mov r1, #6 30001d80: e58d6000 str r6, [sp] 30001d84: eb001ea7 bl 30009828 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]; 30001d88: e59d2010 ldr r2, [sp, #16] &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; 30001d8c: e580b050 str fp, [r0, #80] ; 0x50 node->info.linearfile.direct = &tar_image[offset]; 30001d90: 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; 30001d94: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; 30001d98: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; 30001d9c: e28bbf7f add fp, fp, #508 ; 0x1fc 30001da0: e28bb003 add fp, fp, #3 offset += 512 * nblocks; 30001da4: e3cbbf7f bic fp, fp, #508 ; 0x1fc 30001da8: e3cbb003 bic fp, fp, #3 30001dac: e08b4004 add r4, fp, r4 30001db0: eaffff9a b 30001c20 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 30001db4: e3e04000 mvn r4, #0 30001db8: ea000000 b 30001dc0 30001dbc: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 30001dc0: e1a00004 mov r0, r4 30001dc4: e28ddf6b add sp, sp, #428 ; 0x1ac 30001dc8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000b854 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000b854: 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 ) 3000b858: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000b85c: e1a04000 mov r4, r0 3000b860: 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; 3000b864: 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 ) 3000b868: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 3000b86c: e59f313c ldr r3, [pc, #316] ; 3000b9b0 3000b870: 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; 3000b874: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3000b878: 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 ) 3000b87c: 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; 3000b880: 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; 3000b884: 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; 3000b888: 03a08c01 moveq r8, #256 ; 0x100 3000b88c: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000b890: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 3000b894: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 3000b898: e3590000 cmp r9, #0 3000b89c: 03a09b01 moveq r9, #1024 ; 0x400 3000b8a0: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); 3000b8a4: ebfff334 bl 3000857c <_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; 3000b8a8: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); 3000b8ac: e1898008 orr r8, r9, r8 *previous_mode_set = old_mode; /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000b8b0: 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; 3000b8b4: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000b8b8: 0a000003 beq 3000b8cc executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 3000b8bc: e3140c01 tst r4, #256 ; 0x100 3000b8c0: 13a03000 movne r3, #0 3000b8c4: 03a03001 moveq r3, #1 3000b8c8: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { 3000b8cc: e3150c02 tst r5, #512 ; 0x200 3000b8d0: 0a000006 beq 3000b8f0 if ( _Modes_Is_timeslice(mode_set) ) { 3000b8d4: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 3000b8d8: 13a03001 movne r3, #1 3000b8dc: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000b8e0: 159f30cc ldrne r3, [pc, #204] ; 3000b9b4 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 3000b8e4: 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; 3000b8e8: 15933000 ldrne r3, [r3] 3000b8ec: 15873078 strne r3, [r7, #120] ; 0x78 } /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 3000b8f0: e3150080 tst r5, #128 ; 0x80 3000b8f4: 0a000001 beq 3000b900 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 3000b8f8: e2040080 and r0, r4, #128 ; 0x80 3000b8fc: ebfff319 bl 30008568 <_CPU_ISR_Set_level> * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 3000b900: e2150b01 ands r0, r5, #1024 ; 0x400 3000b904: 0a000013 beq 3000b958 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000b908: 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 ) { 3000b90c: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000b910: 13a03000 movne r3, #0 3000b914: 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 ) { 3000b918: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000b91c: 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 ) { 3000b920: 0a00000c beq 3000b958 asr->is_enabled = is_asr_enabled; 3000b924: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000b928: e10f3000 mrs r3, CPSR 3000b92c: e3832080 orr r2, r3, #128 ; 0x80 3000b930: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; 3000b934: e5962018 ldr r2, [r6, #24] information->signals_pending = information->signals_posted; 3000b938: e5961014 ldr r1, [r6, #20] information->signals_posted = _signals; 3000b93c: 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; 3000b940: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000b944: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 3000b948: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000b94c: e3500000 cmp r0, #0 3000b950: 13a00001 movne r0, #1 3000b954: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) { 3000b958: e59f3058 ldr r3, [pc, #88] ; 3000b9b8 3000b95c: e5933000 ldr r3, [r3] 3000b960: e3530003 cmp r3, #3 3000b964: 1a00000f bne 3000b9a8 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 3000b968: e59f2040 ldr r2, [pc, #64] ; 3000b9b0 if ( are_signals_pending || 3000b96c: e3500000 cmp r0, #0 bool are_signals_pending ) { Thread_Control *executing; executing = _Thread_Executing; 3000b970: e5923004 ldr r3, [r2, #4] if ( are_signals_pending || 3000b974: 1a000005 bne 3000b990 3000b978: e5922008 ldr r2, [r2, #8] 3000b97c: e1530002 cmp r3, r2 3000b980: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} (!_Thread_Is_heir( executing ) && executing->is_preemptible) ) { 3000b984: e5d33074 ldrb r3, [r3, #116] ; 0x74 3000b988: e3530000 cmp r3, #0 3000b98c: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch_necessary = true; 3000b990: e59f3018 ldr r3, [pc, #24] ; 3000b9b0 3000b994: e3a02001 mov r2, #1 3000b998: e5c32010 strb r2, [r3, #16] if (_Thread_Evaluate_is_dispatch_needed( needs_asr_dispatching ) ) _Thread_Dispatch(); 3000b99c: ebffed17 bl 30006e00 <_Thread_Dispatch> } return RTEMS_SUCCESSFUL; 3000b9a0: e3a00000 mov r0, #0 3000b9a4: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 3000b9a8: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000b9ac: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 30003118 : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003118: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { 3000311c: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003120: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( 30003124: e59f317c ldr r3, [pc, #380] ; 300032a8 30003128: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 3000312c: 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( 30003130: e1a02001 mov r2, r1 30003134: e5930000 ldr r0, [r3] 30003138: eb0007a5 bl 30004fd4 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3000313c: e3500000 cmp r0, #0 30003140: 1a000024 bne 300031d8 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 30003144: e5943008 ldr r3, [r4, #8] 30003148: e2433001 sub r3, r3, #1 3000314c: e3530000 cmp r3, #0 30003150: e5843008 str r3, [r4, #8] 30003154: 1a00004e bne 30003294 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 30003158: e59420cc ldr r2, [r4, #204] ; 0xcc 3000315c: e59f3148 ldr r3, [pc, #328] ; 300032ac 30003160: e0833282 add r3, r3, r2, lsl #5 30003164: e5931004 ldr r1, [r3, #4] 30003168: e3510000 cmp r1, #0 3000316c: 0a000003 beq 30003180 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 30003170: e1a00004 mov r0, r4 30003174: e1a0e00f mov lr, pc 30003178: e12fff11 bx r1 3000317c: ea000008 b 300031a4 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30003180: e5940018 ldr r0, [r4, #24] 30003184: e1a02001 mov r2, r1 30003188: eb000791 bl 30004fd4 if (sc != RTEMS_SUCCESSFUL) { 3000318c: e3500000 cmp r0, #0 30003190: 1a000010 bne 300031d8 rtems_fatal_error_occurred (sc); } drainOutput (tty); 30003194: e1a00004 mov r0, r4 30003198: ebfffeb2 bl 30002c68 rtems_semaphore_release (tty->osem); 3000319c: e5940018 ldr r0, [r4, #24] 300031a0: eb0007d1 bl 300050ec } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300031a4: e59430b4 ldr r3, [r4, #180] ; 0xb4 300031a8: e3530002 cmp r3, #2 300031ac: 1a00000a bne 300031dc /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 300031b0: e59400c4 ldr r0, [r4, #196] ; 0xc4 300031b4: e3a01001 mov r1, #1 300031b8: eb000673 bl 30004b8c if (sc != RTEMS_SUCCESSFUL) 300031bc: e3500000 cmp r0, #0 300031c0: 1a000004 bne 300031d8 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 300031c4: e59400c8 ldr r0, [r4, #200] ; 0xc8 300031c8: e3a01001 mov r1, #1 300031cc: eb00066e bl 30004b8c if (sc != RTEMS_SUCCESSFUL) 300031d0: e3500000 cmp r0, #0 300031d4: 0a000000 beq 300031dc rtems_fatal_error_occurred (sc); 300031d8: eb000913 bl 3000562c <== NOT EXECUTED } if (tty->device.lastClose) 300031dc: e594309c ldr r3, [r4, #156] ; 0x9c 300031e0: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 300031e4: 1594000c ldrne r0, [r4, #12] 300031e8: 15941010 ldrne r1, [r4, #16] 300031ec: 11a02005 movne r2, r5 300031f0: 11a0e00f movne lr, pc 300031f4: 112fff13 bxne r3 if (tty->forw == NULL) { 300031f8: e894000c ldm r4, {r2, r3} 300031fc: 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; 30003200: 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) { 30003204: 1a000003 bne 30003218 rtems_termios_ttyTail = tty->back; 30003208: e59f10a0 ldr r1, [pc, #160] ; 300032b0 if ( rtems_termios_ttyTail != NULL ) { 3000320c: 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; 30003210: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 30003214: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 30003218: e5942004 ldr r2, [r4, #4] 3000321c: e5943000 ldr r3, [r4] 30003220: 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; 30003224: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 30003228: 1a000003 bne 3000323c rtems_termios_ttyHead = tty->forw; 3000322c: e59f1080 ldr r1, [pc, #128] ; 300032b4 if ( rtems_termios_ttyHead != NULL ) { 30003230: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 30003234: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 30003238: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 3000323c: e5940014 ldr r0, [r4, #20] 30003240: eb00073c bl 30004f38 rtems_semaphore_delete (tty->osem); 30003244: e5940018 ldr r0, [r4, #24] 30003248: eb00073a bl 30004f38 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 3000324c: e594008c ldr r0, [r4, #140] ; 0x8c 30003250: eb000738 bl 30004f38 if ((tty->device.pollRead == NULL) || 30003254: e59430a0 ldr r3, [r4, #160] ; 0xa0 30003258: e3530000 cmp r3, #0 3000325c: 0a000002 beq 3000326c 30003260: e59430b4 ldr r3, [r4, #180] ; 0xb4 30003264: e3530002 cmp r3, #2 30003268: 1a000001 bne 30003274 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 3000326c: e5940068 ldr r0, [r4, #104] ; 0x68 30003270: eb000730 bl 30004f38 free (tty->rawInBuf.theBuf); 30003274: e5940058 ldr r0, [r4, #88] ; 0x58 30003278: ebfffae1 bl 30001e04 free (tty->rawOutBuf.theBuf); 3000327c: e594007c ldr r0, [r4, #124] ; 0x7c 30003280: ebfffadf bl 30001e04 free (tty->cbuf); 30003284: e594001c ldr r0, [r4, #28] 30003288: ebfffadd bl 30001e04 free (tty); 3000328c: e1a00004 mov r0, r4 30003290: ebfffadb bl 30001e04 } rtems_semaphore_release (rtems_termios_ttyMutex); 30003294: e59f300c ldr r3, [pc, #12] ; 300032a8 30003298: e5930000 ldr r0, [r3] 3000329c: eb000792 bl 300050ec return RTEMS_SUCCESSFUL; } 300032a0: e3a00000 mov r0, #0 300032a4: e8bd8030 pop {r4, r5, pc} =============================================================================== 30004634 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 30004634: e5902090 ldr r2, [r0, #144] ; 0x90 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 30004638: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 3000463c: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30004640: e59010b4 ldr r1, [r0, #180] ; 0xb4 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 30004644: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30004648: e3510002 cmp r1, #2 3000464c: 1a000004 bne 30004664 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 30004650: e59000c8 ldr r0, [r0, #200] ; 0xc8 30004654: eb00014c bl 30004b8c if (sc != RTEMS_SUCCESSFUL) 30004658: e2503000 subs r3, r0, #0 3000465c: 0a00000d beq 30004698 rtems_fatal_error_occurred (sc); 30004660: eb0003f1 bl 3000562c <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 30004664: e59030cc ldr r3, [r0, #204] ; 0xcc 30004668: e3530005 cmp r3, #5 3000466c: 1a000007 bne 30004690 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 30004670: e59f3028 ldr r3, [pc, #40] ; 300046a0 30004674: e59330b4 ldr r3, [r3, #180] ; 0xb4 30004678: e3530000 cmp r3, #0 3000467c: 0a000005 beq 30004698 rtems_termios_linesw[tty->t_line].l_start(tty); 30004680: e1a0e00f mov lr, pc 30004684: e12fff13 bx r3 } return 0; /* nothing to output in IRQ... */ 30004688: e3a03000 mov r3, #0 3000468c: ea000001 b 30004698 } return rtems_termios_refill_transmitter(tty); } 30004690: 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); 30004694: eaffff5a b 30004404 } 30004698: e1a00003 mov r0, r3 3000469c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30004100 : * 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) { 30004100: 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) { 30004104: e59030cc ldr r3, [r0, #204] ; 0xcc 30004108: e59f7288 ldr r7, [pc, #648] ; 30004398 * 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) { 3000410c: e1a04000 mov r4, r0 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) { 30004110: e0873283 add r3, r7, r3, lsl #5 30004114: e5939010 ldr r9, [r3, #16] * 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) { 30004118: 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) { 3000411c: e3590000 cmp r9, #0 30004120: 11a05002 movne r5, r2 30004124: 1a00000d bne 30004160 /* * 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); 30004128: e2803030 add r3, r0, #48 ; 0x30 3000412c: 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, 30004130: 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) { 30004134: e1a08002 mov r8, r2 30004138: 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, 3000413c: e58d3004 str r3, [sp, #4] 30004140: ea00008b b 30004374 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); 30004144: e59430cc ldr r3, [r4, #204] ; 0xcc 30004148: e4d60001 ldrb r0, [r6], #1 3000414c: e0873283 add r3, r7, r3, lsl #5 30004150: e1a01004 mov r1, r4 30004154: e1a0e00f mov lr, pc 30004158: e593f010 ldr pc, [r3, #16] 3000415c: 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--) { 30004160: e3550000 cmp r5, #0 30004164: 1afffff6 bne 30004144 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 30004168: e59430e4 ldr r3, [r4, #228] ; 0xe4 3000416c: e3530000 cmp r3, #0 30004170: 1a000086 bne 30004390 30004174: e59430dc ldr r3, [r4, #220] ; 0xdc 30004178: e3530000 cmp r3, #0 3000417c: 0a000083 beq 30004390 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 30004180: e2840030 add r0, r4, #48 ; 0x30 30004184: e59410e0 ldr r1, [r4, #224] ; 0xe0 30004188: e1a0e00f mov lr, pc 3000418c: e12fff13 bx r3 tty->tty_rcvwakeup = 1; 30004190: e3a03001 mov r3, #1 30004194: e58430e4 str r3, [r4, #228] ; 0xe4 30004198: ea00007c b 30004390 while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 3000419c: e59430b8 ldr r3, [r4, #184] ; 0xb8 } return 0; } while (len--) { c = *buf++; 300041a0: 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) { 300041a4: e3130c02 tst r3, #512 ; 0x200 300041a8: 0a00000f beq 300041ec /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 300041ac: e5d4204a ldrb r2, [r4, #74] ; 0x4a 300041b0: e5d43049 ldrb r3, [r4, #73] ; 0x49 300041b4: e152000a cmp r2, sl 300041b8: 1a000007 bne 300041dc if (c == tty->termios.c_cc[VSTART]) { 300041bc: e1530002 cmp r3, r2 /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 300041c0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 300041c4: 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; 300041c8: 02233010 eoreq r3, r3, #16 } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 300041cc: 13833010 orrne r3, r3, #16 300041d0: 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) { 300041d4: e3a09001 mov r9, #1 300041d8: ea000005 b 300041f4 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 300041dc: e153000a cmp r3, sl /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 300041e0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 300041e4: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 300041e8: 0afffff8 beq 300041d0 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 300041ec: e3590000 cmp r9, #0 300041f0: 0a000014 beq 30004248 /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 300041f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 300041f8: e2033030 and r3, r3, #48 ; 0x30 300041fc: e3530020 cmp r3, #32 30004200: 1a00005a bne 30004370 /* disable interrupts */ rtems_interrupt_disable(level); 30004204: ebfffa93 bl 30002c58 <== NOT EXECUTED 30004208: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 3000420c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004210: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 30004214: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30004218: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3000421c: e3530000 cmp r3, #0 <== NOT EXECUTED 30004220: 0a000006 beq 30004240 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 30004224: 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)( 30004228: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3000422c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30004230: e0811003 add r1, r1, r3 <== NOT EXECUTED 30004234: e3a02001 mov r2, #1 <== NOT EXECUTED 30004238: e1a0e00f mov lr, pc <== NOT EXECUTED 3000423c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 30004240: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 30004244: ea000049 b 30004370 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 30004248: e5940060 ldr r0, [r4, #96] ; 0x60 3000424c: e5941064 ldr r1, [r4, #100] ; 0x64 30004250: e2800001 add r0, r0, #1 30004254: eb002cc7 bl 3000f578 <__umodsi3> 30004258: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 3000425c: ebfffa7d bl 30002c58 30004260: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 30004264: e594305c ldr r3, [r4, #92] ; 0x5c 30004268: e5940064 ldr r0, [r4, #100] ; 0x64 % tty->rawInBuf.Size) > tty->highwater) && 3000426c: e5941064 ldr r1, [r4, #100] ; 0x64 } } 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) 30004270: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && 30004274: e0800007 add r0, r0, r7 30004278: eb002cbe bl 3000f578 <__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) 3000427c: e59430c0 ldr r3, [r4, #192] ; 0xc0 30004280: e1500003 cmp r0, r3 30004284: 9a000025 bls 30004320 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 30004288: 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) && 3000428c: e3130001 tst r3, #1 <== NOT EXECUTED 30004290: 1a000022 bne 30004320 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 30004294: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004298: e3833001 orr r3, r3, #1 <== NOT EXECUTED 3000429c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 300042a0: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 300042a4: e59f30f0 ldr r3, [pc, #240] ; 3000439c <== NOT EXECUTED 300042a8: e0023003 and r3, r2, r3 <== NOT EXECUTED 300042ac: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 300042b0: 1a00000e bne 300042f0 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 300042b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300042b8: e3130020 tst r3, #32 <== NOT EXECUTED 300042bc: 1a000002 bne 300042cc <== NOT EXECUTED 300042c0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 300042c4: e3530000 cmp r3, #0 <== NOT EXECUTED 300042c8: 1a000014 bne 30004320 <== 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; 300042cc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 300042d0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED == (FL_MDXOF ) ) { 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; 300042d4: e3833002 orr r3, r3, #2 <== NOT EXECUTED 300042d8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 300042dc: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 300042e0: e3a02001 mov r2, #1 <== NOT EXECUTED 300042e4: e1a0e00f mov lr, pc <== NOT EXECUTED 300042e8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 300042ec: ea00000b b 30004320 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 300042f0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300042f4: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 300042f8: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 300042fc: 1a000007 bne 30004320 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 30004300: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004304: e3833004 orr r3, r3, #4 <== NOT EXECUTED 30004308: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 3000430c: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 30004310: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 30004314: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30004318: 11a0e00f movne lr, pc <== NOT EXECUTED 3000431c: 112fff13 bxne r3 <== NOT EXECUTED 30004320: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 30004324: e594305c ldr r3, [r4, #92] ; 0x5c 30004328: e1570003 cmp r7, r3 dropped++; 3000432c: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 30004330: 0a00000e beq 30004370 dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 30004334: e5943058 ldr r3, [r4, #88] ; 0x58 30004338: 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 )) { 3000433c: e59430e4 ldr r3, [r4, #228] ; 0xe4 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 30004340: 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 )) { 30004344: e3530000 cmp r3, #0 30004348: 1a000008 bne 30004370 3000434c: e59430dc ldr r3, [r4, #220] ; 0xdc 30004350: e3530000 cmp r3, #0 30004354: 0a000005 beq 30004370 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 30004358: e59d0000 ldr r0, [sp] <== NOT EXECUTED 3000435c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 30004360: e1a0e00f mov lr, pc <== NOT EXECUTED 30004364: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 30004368: e3a03001 mov r3, #1 <== NOT EXECUTED 3000436c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 30004370: e2488001 sub r8, r8, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 30004374: e3580000 cmp r8, #0 30004378: 1affff87 bne 3000419c } } } } tty->rawInBufDropped += dropped; 3000437c: e5943078 ldr r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 30004380: e5940068 ldr r0, [r4, #104] ; 0x68 } } } } tty->rawInBufDropped += dropped; 30004384: e0833005 add r3, r3, r5 30004388: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 3000438c: eb000356 bl 300050ec return dropped; } 30004390: e1a00005 mov r0, r5 30004394: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 300032d0 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 300032d0: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 300032d4: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 300032d8: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 300032dc: 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; 300032e0: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; 300032e4: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { 300032e8: 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); 300032ec: e1a02001 mov r2, r1 300032f0: e5940018 ldr r0, [r4, #24] 300032f4: eb000736 bl 30004fd4 if (sc != RTEMS_SUCCESSFUL) { 300032f8: e2506000 subs r6, r0, #0 300032fc: 1a0000d4 bne 30003654 args->ioctl_return = sc; return sc; } switch (args->command) { 30003300: e5953004 ldr r3, [r5, #4] 30003304: e3530004 cmp r3, #4 30003308: 0a0000a8 beq 300035b0 3000330c: 8a000005 bhi 30003328 30003310: e3530002 cmp r3, #2 30003314: 0a000029 beq 300033c0 30003318: 8a00009d bhi 30003594 3000331c: e3530001 cmp r3, #1 30003320: 1a000010 bne 30003368 30003324: ea00001b b 30003398 30003328: e59f2330 ldr r2, [pc, #816] ; 30003660 3000332c: e1530002 cmp r3, r2 30003330: 0a0000ba beq 30003620 30003334: 8a000002 bhi 30003344 30003338: e3530005 cmp r3, #5 3000333c: 1a000009 bne 30003368 30003340: ea000096 b 300035a0 30003344: e59f2318 ldr r2, [pc, #792] ; 30003664 30003348: 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; 3000334c: 05953008 ldreq r3, [r5, #8] 30003350: 059420cc ldreq r2, [r4, #204] ; 0xcc 30003354: 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) { 30003358: 0a0000bb beq 3000364c 3000335c: e2822105 add r2, r2, #1073741825 ; 0x40000001 30003360: e1530002 cmp r3, r2 30003364: 0a000095 beq 300035c0 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 30003368: e59420cc ldr r2, [r4, #204] ; 0xcc 3000336c: e59f32f4 ldr r3, [pc, #756] ; 30003668 30003370: e0833282 add r3, r3, r2, lsl #5 30003374: e5933018 ldr r3, [r3, #24] 30003378: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 3000337c: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 30003380: 0a0000b1 beq 3000364c sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 30003384: e1a00004 mov r0, r4 30003388: e1a01005 mov r1, r5 3000338c: e1a0e00f mov lr, pc 30003390: e12fff13 bx r3 30003394: ea00009f b 30003618 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 30003398: e5957008 ldr r7, [r5, #8] 3000339c: e284c030 add ip, r4, #48 ; 0x30 300033a0: e1a0e007 mov lr, r7 300033a4: e8bc000f ldm ip!, {r0, r1, r2, r3} 300033a8: e8ae000f stmia lr!, {r0, r1, r2, r3} 300033ac: e8bc000f ldm ip!, {r0, r1, r2, r3} 300033b0: e8ae000f stmia lr!, {r0, r1, r2, r3} 300033b4: e59c3000 ldr r3, [ip] 300033b8: e58e3000 str r3, [lr] break; 300033bc: ea0000a2 b 3000364c case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 300033c0: e595e008 ldr lr, [r5, #8] 300033c4: e284c030 add ip, r4, #48 ; 0x30 300033c8: e8be000f ldm lr!, {r0, r1, r2, r3} 300033cc: e8ac000f stmia ip!, {r0, r1, r2, r3} 300033d0: e8be000f ldm lr!, {r0, r1, r2, r3} 300033d4: e8ac000f stmia ip!, {r0, r1, r2, r3} 300033d8: e59e3000 ldr r3, [lr] 300033dc: 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) && 300033e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 300033e4: e3130c02 tst r3, #512 ; 0x200 300033e8: 0a000018 beq 30003450 !(tty->termios.c_iflag & IXON)) { 300033ec: 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) && 300033f0: e3130b01 tst r3, #1024 ; 0x400 300033f4: 1a000015 bne 30003450 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 300033f8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300033fc: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 30003400: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 30003404: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003408: e3130020 tst r3, #32 <== NOT EXECUTED 3000340c: 0a00000f beq 30003450 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 30003410: ebfffe10 bl 30002c58 <== NOT EXECUTED 30003414: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 30003418: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000341c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 30003420: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30003424: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30003428: e3530000 cmp r3, #0 <== NOT EXECUTED 3000342c: 0a000006 beq 3000344c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 30003430: 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)( 30003434: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 30003438: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000343c: e0811003 add r1, r1, r3 <== NOT EXECUTED 30003440: e3a02001 mov r2, #1 <== NOT EXECUTED 30003444: e1a0e00f mov lr, pc <== NOT EXECUTED 30003448: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3000344c: 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)) { 30003450: e59430b8 ldr r3, [r4, #184] ; 0xb8 30003454: e3130b01 tst r3, #1024 ; 0x400 30003458: 0a000008 beq 30003480 3000345c: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 30003460: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 30003464: 1a000005 bne 30003480 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 30003468: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000346c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 30003470: 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); 30003474: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003478: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 3000347c: 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)) { 30003480: e59430b8 ldr r3, [r4, #184] ; 0xb8 30003484: e3130c01 tst r3, #256 ; 0x100 30003488: 0a000010 beq 300034d0 3000348c: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 30003490: e3530000 cmp r3, #0 <== NOT EXECUTED 30003494: ba00000d blt 300034d0 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 30003498: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000349c: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 300034a0: 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)) { 300034a4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300034a8: e3130004 tst r3, #4 <== NOT EXECUTED 300034ac: 0a000004 beq 300034c4 <== NOT EXECUTED 300034b0: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 300034b4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 300034b8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 300034bc: 11a0e00f movne lr, pc <== NOT EXECUTED 300034c0: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 300034c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300034c8: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 300034cc: 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) { 300034d0: e5943038 ldr r3, [r4, #56] ; 0x38 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) { 300034d4: e594703c ldr r7, [r4, #60] ; 0x3c /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { 300034d8: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 300034dc: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 300034e0: b3833c01 orrlt r3, r3, #256 ; 0x100 300034e4: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 300034e8: e5943030 ldr r3, [r4, #48] ; 0x30 300034ec: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 300034f0: 159420b8 ldrne r2, [r4, #184] ; 0xb8 300034f4: 13822b01 orrne r2, r2, #1024 ; 0x400 300034f8: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 300034fc: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 30003500: 159430b8 ldrne r3, [r4, #184] ; 0xb8 30003504: 13833c02 orrne r3, r3, #512 ; 0x200 30003508: 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) { 3000350c: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003510: 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) { 30003514: 1a000013 bne 30003568 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 30003518: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; 3000351c: eb000519 bl 30004988 30003520: e3a0100a mov r1, #10 30003524: e0000098 mul r0, r8, r0 30003528: eb002f7a bl 3000f318 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { 3000352c: e5d43046 ldrb r3, [r4, #70] ; 0x46 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] * 30003530: e5840054 str r0, [r4, #84] ; 0x54 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 30003534: e3530000 cmp r3, #0 30003538: e5d42047 ldrb r2, [r4, #71] ; 0x47 3000353c: 0a000005 beq 30003558 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003540: 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; 30003544: e5840070 str r0, [r4, #112] ; 0x70 if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003548: 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; 3000354c: e584706c str r7, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003550: e5840074 str r0, [r4, #116] ; 0x74 30003554: ea000006 b 30003574 else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 30003558: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 3000355c: 03a03001 moveq r3, #1 30003560: 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]) { 30003564: 0a000002 beq 30003574 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003568: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 3000356c: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 30003570: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 30003574: e59430a8 ldr r3, [r4, #168] ; 0xa8 30003578: e3530000 cmp r3, #0 3000357c: 0a000032 beq 3000364c (*tty->device.setAttributes)(tty->minor, &tty->termios); 30003580: e5940010 ldr r0, [r4, #16] 30003584: e2841030 add r1, r4, #48 ; 0x30 30003588: e1a0e00f mov lr, pc 3000358c: e12fff13 bx r3 30003590: ea00002d b 3000364c break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 30003594: e1a00004 mov r0, r4 30003598: ebfffdb2 bl 30002c68 break; 3000359c: ea00002a b 3000364c case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 300035a0: e897000c ldm r7, {r2, r3} 300035a4: e58420d4 str r2, [r4, #212] ; 0xd4 300035a8: e58430d8 str r3, [r4, #216] ; 0xd8 break; 300035ac: ea000026 b 3000364c case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 300035b0: e897000c ldm r7, {r2, r3} 300035b4: e58420dc str r2, [r4, #220] ; 0xdc 300035b8: e58430e0 str r3, [r4, #224] ; 0xe0 break; 300035bc: ea000022 b 3000364c #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300035c0: e59420cc ldr r2, [r4, #204] ; 0xcc 300035c4: e59f309c ldr r3, [pc, #156] ; 30003668 300035c8: e0833282 add r3, r3, r2, lsl #5 300035cc: e5933004 ldr r3, [r3, #4] 300035d0: e3530000 cmp r3, #0 300035d4: 0a000003 beq 300035e8 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 300035d8: e1a00004 mov r0, r4 300035dc: e1a0e00f mov lr, pc 300035e0: e12fff13 bx r3 300035e4: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); 300035e8: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ 300035ec: 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); 300035f0: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ 300035f4: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 300035f8: e59f2068 ldr r2, [pc, #104] ; 30003668 * 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); 300035fc: 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) { 30003600: e7923283 ldr r3, [r2, r3, lsl #5] 30003604: e3530000 cmp r3, #0 30003608: 0a00000f beq 3000364c sc = rtems_termios_linesw[tty->t_line].l_open(tty); 3000360c: e1a00004 mov r0, r4 30003610: e1a0e00f mov lr, pc 30003614: e12fff13 bx r3 30003618: e1a06000 mov r6, r0 3000361c: ea00000a b 3000364c case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 30003620: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 30003624: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003628: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) 3000362c: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 30003630: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 30003634: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 30003638: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3000363c: e0611000 rsb r1, r1, r0 <== NOT EXECUTED 30003640: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 30003644: e0813003 add r3, r1, r3 <== NOT EXECUTED 30003648: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 3000364c: e5940018 ldr r0, [r4, #24] 30003650: eb0006a5 bl 300050ec args->ioctl_return = sc; 30003654: e585600c str r6, [r5, #12] return sc; } 30003658: e1a00006 mov r0, r6 3000365c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 30003db4 : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003db4: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30003db8: 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; 30003dbc: 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); 30003dc0: 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; 30003dc4: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; 30003dc8: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30003dcc: 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); 30003dd0: e1a02001 mov r2, r1 30003dd4: e5940014 ldr r0, [r4, #20] 30003dd8: eb00047d bl 30004fd4 if (sc != RTEMS_SUCCESSFUL) 30003ddc: e2507000 subs r7, r0, #0 30003de0: 1a0000be bne 300040e0 return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 30003de4: e59420cc ldr r2, [r4, #204] ; 0xcc 30003de8: e59f32f8 ldr r3, [pc, #760] ; 300040e8 30003dec: e0833282 add r3, r3, r2, lsl #5 30003df0: e5933008 ldr r3, [r3, #8] 30003df4: e3530000 cmp r3, #0 30003df8: 0a000005 beq 30003e14 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 30003dfc: e1a00004 mov r0, r4 30003e00: e1a01005 mov r1, r5 30003e04: e1a0e00f mov lr, pc 30003e08: e12fff13 bx r3 30003e0c: e1a07000 mov r7, r0 30003e10: ea0000ae b 300040d0 tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 30003e14: e5942024 ldr r2, [r4, #36] ; 0x24 30003e18: e5943020 ldr r3, [r4, #32] 30003e1c: e1520003 cmp r2, r3 30003e20: 1a0000a1 bne 300040ac tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 30003e24: e5943028 ldr r3, [r4, #40] ; 0x28 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 30003e28: e5847020 str r7, [r4, #32] tty->read_start_column = tty->column; 30003e2c: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && 30003e30: e59430a0 ldr r3, [r4, #160] ; 0xa0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 30003e34: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 30003e38: e3530000 cmp r3, #0 30003e3c: 0a00003b beq 30003f30 30003e40: e59430b4 ldr r3, [r4, #180] ; 0xb4 30003e44: e3530000 cmp r3, #0 30003e48: 1a000038 bne 30003f30 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 30003e4c: e594303c ldr r3, [r4, #60] ; 0x3c 30003e50: e3130002 tst r3, #2 30003e54: 0a00000d beq 30003e90 for (;;) { n = (*tty->device.pollRead)(tty->minor); 30003e58: e5940010 ldr r0, [r4, #16] 30003e5c: e1a0e00f mov lr, pc 30003e60: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 30003e64: e3500000 cmp r0, #0 30003e68: aa000002 bge 30003e78 rtems_task_wake_after (1); 30003e6c: e3a00001 mov r0, #1 30003e70: eb000584 bl 30005488 30003e74: eafffff7 b 30003e58 } else { if (siproc (n, tty)) 30003e78: e20000ff and r0, r0, #255 ; 0xff 30003e7c: e1a01004 mov r1, r4 30003e80: ebffff86 bl 30003ca0 30003e84: e3500000 cmp r0, #0 30003e88: 0afffff2 beq 30003e58 30003e8c: ea000086 b 300040ac } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 30003e90: eb0002c4 bl 300049a8 30003e94: e1a06000 mov r6, r0 for (;;) { n = (*tty->device.pollRead)(tty->minor); 30003e98: e5940010 ldr r0, [r4, #16] 30003e9c: e1a0e00f mov lr, pc 30003ea0: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 30003ea4: e3500000 cmp r0, #0 30003ea8: aa000013 bge 30003efc if (tty->termios.c_cc[VMIN]) { 30003eac: e5d43047 ldrb r3, [r4, #71] ; 0x47 30003eb0: e3530000 cmp r3, #0 30003eb4: e5d43046 ldrb r3, [r4, #70] ; 0x46 30003eb8: 0a000005 beq 30003ed4 if (tty->termios.c_cc[VTIME] && tty->ccount) { 30003ebc: e3530000 cmp r3, #0 30003ec0: 0a00000a beq 30003ef0 30003ec4: e5943020 ldr r3, [r4, #32] 30003ec8: e3530000 cmp r3, #0 30003ecc: 0a000007 beq 30003ef0 30003ed0: ea000001 b 30003edc if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 30003ed4: e3530000 cmp r3, #0 <== NOT EXECUTED 30003ed8: 0a000073 beq 300040ac <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 30003edc: eb0002b1 bl 300049a8 if ((now - then) > tty->vtimeTicks) { 30003ee0: e5943054 ldr r3, [r4, #84] ; 0x54 30003ee4: e0660000 rsb r0, r6, r0 30003ee8: e1500003 cmp r0, r3 30003eec: 8a00006e bhi 300040ac break; } } rtems_task_wake_after (1); 30003ef0: e3a00001 mov r0, #1 30003ef4: eb000563 bl 30005488 30003ef8: eaffffe6 b 30003e98 } else { siproc (n, tty); 30003efc: e20000ff and r0, r0, #255 ; 0xff 30003f00: e1a01004 mov r1, r4 30003f04: ebffff65 bl 30003ca0 if (tty->ccount >= tty->termios.c_cc[VMIN]) 30003f08: e5d43047 ldrb r3, [r4, #71] ; 0x47 30003f0c: e5942020 ldr r2, [r4, #32] 30003f10: e1520003 cmp r2, r3 30003f14: aa000064 bge 300040ac break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 30003f18: e3530000 cmp r3, #0 30003f1c: 0affffdd beq 30003e98 30003f20: e5d43046 ldrb r3, [r4, #70] ; 0x46 30003f24: e3530000 cmp r3, #0 30003f28: 0affffda beq 30003e98 30003f2c: eaffffd7 b 30003e90 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)( 30003f30: 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; 30003f34: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; 30003f38: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 30003f3c: e59f91a8 ldr r9, [pc, #424] ; 300040ec 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)( 30003f40: e58d2000 str r2, [sp] 30003f44: ea000040 b 3000404c 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; 30003f48: e594005c ldr r0, [r4, #92] ; 0x5c 30003f4c: e5941064 ldr r1, [r4, #100] ; 0x64 30003f50: e2800001 add r0, r0, #1 30003f54: eb002d87 bl 3000f578 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 30003f58: e5943058 ldr r3, [r4, #88] ; 0x58 30003f5c: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; 30003f60: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 30003f64: e5943060 ldr r3, [r4, #96] ; 0x60 30003f68: e5942064 ldr r2, [r4, #100] ; 0x64 % tty->rawInBuf.Size) 30003f6c: e5941064 ldr r1, [r4, #100] ; 0x64 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) 30003f70: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) 30003f74: e0600003 rsb r0, r0, r3 30003f78: eb002d7e bl 3000f578 <__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) 30003f7c: e59430bc ldr r3, [r4, #188] ; 0xbc 30003f80: e1500003 cmp r0, r3 30003f84: 2a00001f bcs 30004008 % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 30003f88: e59430b8 ldr r3, [r4, #184] ; 0xb8 30003f8c: e3c33001 bic r3, r3, #1 30003f90: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30003f94: e59420b8 ldr r2, [r4, #184] ; 0xb8 30003f98: e59f3150 ldr r3, [pc, #336] ; 300040f0 30003f9c: e0023003 and r3, r2, r3 30003fa0: e59f2148 ldr r2, [pc, #328] ; 300040f0 30003fa4: e1530002 cmp r3, r2 30003fa8: 1a00000b bne 30003fdc == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 30003fac: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30003fb0: e3530000 cmp r3, #0 <== NOT EXECUTED 30003fb4: 0a000002 beq 30003fc4 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 30003fb8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003fbc: e3130020 tst r3, #32 <== NOT EXECUTED 30003fc0: 0a000005 beq 30003fdc <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 30003fc4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30003fc8: e59d1000 ldr r1, [sp] <== NOT EXECUTED 30003fcc: e3a02001 mov r2, #1 <== NOT EXECUTED 30003fd0: e1a0e00f mov lr, pc <== NOT EXECUTED 30003fd4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 30003fd8: ea00000a b 30004008 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 30003fdc: e59430b8 ldr r3, [r4, #184] ; 0xb8 30003fe0: e3130c01 tst r3, #256 ; 0x100 30003fe4: 0a000007 beq 30004008 tty->flow_ctrl &= ~FL_IRTSOFF; 30003fe8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003fec: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 30003ff0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 30003ff4: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 30003ff8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 30003ffc: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30004000: 11a0e00f movne lr, pc <== NOT EXECUTED 30004004: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 30004008: e594303c ldr r3, [r4, #60] ; 0x3c 3000400c: e3130002 tst r3, #2 30004010: 0a000005 beq 3000402c if (siproc (c, tty)) 30004014: e1a0000a mov r0, sl 30004018: e1a01004 mov r1, r4 3000401c: ebffff1f bl 30003ca0 wait = 0; 30004020: e3500000 cmp r0, #0 30004024: 13a06000 movne r6, #0 30004028: ea000006 b 30004048 } else { siproc (c, tty); 3000402c: e1a0000a mov r0, sl <== NOT EXECUTED 30004030: e1a01004 mov r1, r4 <== NOT EXECUTED 30004034: ebffff19 bl 30003ca0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30004038: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3000403c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; 30004040: e1520003 cmp r2, r3 <== NOT EXECUTED 30004044: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; 30004048: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3000404c: e594205c ldr r2, [r4, #92] ; 0x5c 30004050: e5943060 ldr r3, [r4, #96] ; 0x60 30004054: e1520003 cmp r2, r3 30004058: 0a000004 beq 30004070 (tty->ccount < (CBUFSIZE-1))) { 3000405c: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 30004060: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 30004064: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 30004068: e1520003 cmp r2, r3 3000406c: baffffb5 blt 30003f48 } /* * Wait for characters */ if ( wait ) { 30004070: e3560000 cmp r6, #0 30004074: 0a00000c beq 300040ac sc = rtems_semaphore_obtain( 30004078: e5940068 ldr r0, [r4, #104] ; 0x68 3000407c: e594106c ldr r1, [r4, #108] ; 0x6c 30004080: e1a0200a mov r2, sl 30004084: eb0003d2 bl 30004fd4 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 30004088: e3500000 cmp r0, #0 3000408c: 0affffee beq 3000404c 30004090: ea000005 b 300040ac <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 30004094: e594201c ldr r2, [r4, #28] count--; 30004098: e2488001 sub r8, r8, #1 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 3000409c: e7d22003 ldrb r2, [r2, r3] 300040a0: e2833001 add r3, r3, #1 300040a4: e4cb2001 strb r2, [fp], #1 300040a8: e5843024 str r3, [r4, #36] ; 0x24 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 300040ac: e3580000 cmp r8, #0 300040b0: 0a000003 beq 300040c4 300040b4: e5943024 ldr r3, [r4, #36] ; 0x24 300040b8: e5942020 ldr r2, [r4, #32] 300040bc: e1530002 cmp r3, r2 300040c0: bafffff3 blt 30004094 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 300040c4: e5953010 ldr r3, [r5, #16] 300040c8: e0688003 rsb r8, r8, r3 300040cc: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; 300040d0: e3a03000 mov r3, #0 300040d4: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 300040d8: e5940014 ldr r0, [r4, #20] 300040dc: eb000402 bl 300050ec return sc; } 300040e0: e1a00007 mov r0, r7 300040e4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30004404 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 30004404: e59020b8 ldr r2, [r0, #184] ; 0xb8 30004408: e59f31b8 ldr r3, [pc, #440] ; 300045c8 * 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) { 3000440c: e92d4070 push {r4, r5, r6, lr} int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 30004410: e0023003 and r3, r2, r3 30004414: e59f21b0 ldr r2, [pc, #432] ; 300045cc * 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) { 30004418: 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)) 3000441c: e1530002 cmp r3, r2 30004420: 1a00000c bne 30004458 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 30004424: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 30004428: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 3000442c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30004430: e1a0e00f mov lr, pc <== NOT EXECUTED 30004434: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 30004438: ebfffa06 bl 30002c58 <== NOT EXECUTED tty->t_dqlen--; 3000443c: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 30004440: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30004444: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 30004448: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000444c: e3833002 orr r3, r3, #2 <== NOT EXECUTED 30004450: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); 30004454: ea00000f b 30004498 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 30004458: e59030b8 ldr r3, [r0, #184] ; 0xb8 3000445c: e2033003 and r3, r3, #3 30004460: e3530002 cmp r3, #2 30004464: 1a00000e bne 300044a4 * 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); 30004468: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 3000446c: e3a02001 mov r2, #1 <== NOT EXECUTED 30004470: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 30004474: e1a0e00f mov lr, pc <== NOT EXECUTED 30004478: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 3000447c: ebfff9f5 bl 30002c58 <== NOT EXECUTED tty->t_dqlen--; 30004480: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 30004484: e2433001 sub r3, r3, #1 <== NOT EXECUTED 30004488: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 3000448c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004490: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 30004494: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004498: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 3000449c: e3a05001 mov r5, #1 <== NOT EXECUTED 300044a0: ea000046 b 300045c0 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 300044a4: e5902080 ldr r2, [r0, #128] ; 0x80 300044a8: e5903084 ldr r3, [r0, #132] ; 0x84 300044ac: e1520003 cmp r2, r3 300044b0: 1a000005 bne 300044cc /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 300044b4: e5903094 ldr r3, [r0, #148] ; 0x94 300044b8: e3530002 cmp r3, #2 300044bc: 1a00003e bne 300045bc /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 300044c0: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 300044c4: eb000308 bl 300050ec <== NOT EXECUTED 300044c8: ea00003b b 300045bc <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 300044cc: ebfff9e1 bl 30002c58 len = tty->t_dqlen; tty->t_dqlen = 0; 300044d0: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 300044d4: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; 300044d8: e5843090 str r3, [r4, #144] ; 0x90 300044dc: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 300044e0: e5943084 ldr r3, [r4, #132] ; 0x84 300044e4: e5941088 ldr r1, [r4, #136] ; 0x88 300044e8: e0820003 add r0, r2, r3 300044ec: eb002c21 bl 3000f578 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 300044f0: e5943094 ldr r3, [r4, #148] ; 0x94 rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 300044f4: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 300044f8: e3530002 cmp r3, #2 len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; tty->rawOutBuf.Tail = newTail; 300044fc: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 30004500: 0594008c ldreq r0, [r4, #140] ; 0x8c 30004504: 0b0002f8 bleq 300050ec } if (newTail == tty->rawOutBuf.Head) { 30004508: e5943080 ldr r3, [r4, #128] ; 0x80 3000450c: e1560003 cmp r6, r3 30004510: 1a00000a bne 30004540 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 30004514: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 30004518: e3a05000 mov r5, #0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 3000451c: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 30004520: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; 30004524: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 30004528: 0a000021 beq 300045b4 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 3000452c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 30004530: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 30004534: e1a0e00f mov lr, pc <== NOT EXECUTED 30004538: e12fff13 bx r3 <== NOT EXECUTED 3000453c: ea00001c b 300045b4 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 30004540: e59430b8 ldr r3, [r4, #184] ; 0xb8 30004544: e2033e21 and r3, r3, #528 ; 0x210 30004548: e3530e21 cmp r3, #528 ; 0x210 3000454c: 1a000008 bne 30004574 == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 30004550: ebfff9c0 bl 30002c58 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 30004554: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004558: e3833020 orr r3, r3, #32 <== NOT EXECUTED 3000455c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 30004560: e3a03001 mov r3, #1 <== NOT EXECUTED 30004564: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30004568: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; 3000456c: e3a05000 mov r5, #0 <== NOT EXECUTED 30004570: ea00000f b 300045b4 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 30004574: e5943080 ldr r3, [r4, #128] ; 0x80 /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( 30004578: e594107c ldr r1, [r4, #124] ; 0x7c nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 3000457c: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; 30004580: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; 30004584: 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)) { 30004588: 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; 3000458c: 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)) { 30004590: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; 30004594: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ 30004598: e3a03001 mov r3, #1 3000459c: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( 300045a0: e5940010 ldr r0, [r4, #16] 300045a4: e0811006 add r1, r1, r6 300045a8: e1a02005 mov r2, r5 300045ac: e1a0e00f mov lr, pc 300045b0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 300045b4: e5846084 str r6, [r4, #132] ; 0x84 300045b8: ea000000 b 300045c0 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 300045bc: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 300045c0: e1a00005 mov r0, r5 300045c4: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 30003cfc : rtems_status_code rtems_termios_write (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003cfc: e5903000 ldr r3, [r0] rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30003d00: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003d04: e5935034 ldr r5, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30003d08: e3a01000 mov r1, #0 rtems_termios_puts (&c, 1, tty); } rtems_status_code rtems_termios_write (void *arg) { 30003d0c: 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); 30003d10: e1a02001 mov r2, r1 30003d14: e5950018 ldr r0, [r5, #24] 30003d18: eb0004ad bl 30004fd4 if (sc != RTEMS_SUCCESSFUL) 30003d1c: e2506000 subs r6, r0, #0 30003d20: 1a000020 bne 30003da8 return sc; if (rtems_termios_linesw[tty->t_line].l_write != NULL) { 30003d24: e59520cc ldr r2, [r5, #204] ; 0xcc 30003d28: e59f3080 ldr r3, [pc, #128] ; 30003db0 30003d2c: e0833282 add r3, r3, r2, lsl #5 30003d30: e593300c ldr r3, [r3, #12] 30003d34: e3530000 cmp r3, #0 30003d38: 0a000005 beq 30003d54 sc = rtems_termios_linesw[tty->t_line].l_write(tty,args); 30003d3c: e1a00005 mov r0, r5 30003d40: e1a01004 mov r1, r4 30003d44: e1a0e00f mov lr, pc 30003d48: e12fff13 bx r3 30003d4c: e1a06000 mov r6, r0 30003d50: ea000012 b 30003da0 rtems_semaphore_release (tty->osem); return sc; } if (tty->termios.c_oflag & OPOST) { 30003d54: e5953034 ldr r3, [r5, #52] ; 0x34 30003d58: e3130001 tst r3, #1 uint32_t count = args->count; 30003d5c: 15947010 ldrne r7, [r4, #16] char *buffer = args->buffer; 30003d60: 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) { 30003d64: 1a000004 bne 30003d7c 30003d68: ea000006 b 30003d88 <== NOT EXECUTED uint32_t count = args->count; char *buffer = args->buffer; while (count--) oproc (*buffer++, tty); 30003d6c: e4d80001 ldrb r0, [r8], #1 30003d70: e1a01005 mov r1, r5 30003d74: ebfffe7c bl 3000376c 30003d78: e2477001 sub r7, r7, #1 return sc; } if (tty->termios.c_oflag & OPOST) { uint32_t count = args->count; char *buffer = args->buffer; while (count--) 30003d7c: e3570000 cmp r7, #0 30003d80: 1afffff9 bne 30003d6c 30003d84: ea000003 b 30003d98 oproc (*buffer++, tty); args->bytes_moved = args->count; } else { rtems_termios_puts (args->buffer, args->count, tty); 30003d88: e594000c ldr r0, [r4, #12] <== NOT EXECUTED 30003d8c: e5941010 ldr r1, [r4, #16] <== NOT EXECUTED 30003d90: e1a02005 mov r2, r5 <== NOT EXECUTED 30003d94: ebfffe34 bl 3000366c <== NOT EXECUTED args->bytes_moved = args->count; 30003d98: e5943010 ldr r3, [r4, #16] 30003d9c: e5843018 str r3, [r4, #24] } rtems_semaphore_release (tty->osem); 30003da0: e5950018 ldr r0, [r5, #24] 30003da4: eb0004d0 bl 300050ec return sc; } 30003da8: e1a00006 mov r0, r6 30003dac: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 300062fc : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 300062fc: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 30006300: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30006304: e1a05000 mov r5, r0 30006308: e1a08001 mov r8, r1 3000630c: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 30006310: 0a00000e beq 30006350 if (rtems_panic_in_progress++) 30006314: e59f212c ldr r2, [pc, #300] ; 30006448 30006318: e5923000 ldr r3, [r2] 3000631c: e2831001 add r1, r3, #1 30006320: e3530000 cmp r3, #0 30006324: e5821000 str r1, [r2] 30006328: 0a000003 beq 3000633c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000632c: e59f3118 ldr r3, [pc, #280] ; 3000644c <== NOT EXECUTED 30006330: e5932000 ldr r2, [r3] <== NOT EXECUTED 30006334: e2822001 add r2, r2, #1 <== NOT EXECUTED 30006338: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 3000633c: e59f3104 ldr r3, [pc, #260] ; 30006448 30006340: e5933000 ldr r3, [r3] 30006344: e3530002 cmp r3, #2 return 0; 30006348: 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) 3000634c: ca00003b bgt 30006440 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30006350: e59f30f8 ldr r3, [pc, #248] ; 30006450 status = error_flag & ~RTEMS_ERROR_MASK; 30006354: e3c56207 bic r6, r5, #1879048192 ; 0x70000000 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30006358: e5933000 ldr r3, [r3] 3000635c: e5930008 ldr r0, [r3, #8] 30006360: eb002b83 bl 30011174 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 30006364: e2155101 ands r5, r5, #1073741824 ; 0x40000000 30006368: 0a000001 beq 30006374 local_errno = errno; 3000636c: eb002a89 bl 30010d98 <__errno> 30006370: 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); 30006374: e59f70d4 ldr r7, [pc, #212] ; 30006450 30006378: e1a02004 mov r2, r4 3000637c: e5973000 ldr r3, [r7] 30006380: e1a01008 mov r1, r8 30006384: e593000c ldr r0, [r3, #12] 30006388: eb0043eb bl 3001733c if (status) 3000638c: 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); 30006390: e1a04000 mov r4, r0 if (status) 30006394: 0a000008 beq 300063bc chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 30006398: e5973000 ldr r3, [r7] 3000639c: e1a00006 mov r0, r6 300063a0: e593700c ldr r7, [r3, #12] 300063a4: ebffffd0 bl 300062ec 300063a8: e59f10a4 ldr r1, [pc, #164] ; 30006454 300063ac: e1a02000 mov r2, r0 300063b0: e1a00007 mov r0, r7 300063b4: eb002c54 bl 3001150c #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 300063b8: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 300063bc: e3550000 cmp r5, #0 300063c0: 0a000015 beq 3000641c if ((local_errno > 0) && *strerror(local_errno)) 300063c4: da00000d ble 30006400 300063c8: e1a00005 mov r0, r5 300063cc: eb002f51 bl 30012118 300063d0: e5d03000 ldrb r3, [r0] 300063d4: e3530000 cmp r3, #0 300063d8: 0a000008 beq 30006400 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 300063dc: e59f306c ldr r3, [pc, #108] ; 30006450 300063e0: e1a00005 mov r0, r5 300063e4: e5933000 ldr r3, [r3] 300063e8: e593600c ldr r6, [r3, #12] 300063ec: eb002f49 bl 30012118 300063f0: e59f1060 ldr r1, [pc, #96] ; 30006458 300063f4: e1a02000 mov r2, r0 300063f8: e1a00006 mov r0, r6 300063fc: ea000004 b 30006414 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 30006400: e59f3048 ldr r3, [pc, #72] ; 30006450 30006404: e59f1050 ldr r1, [pc, #80] ; 3000645c 30006408: e5933000 ldr r3, [r3] 3000640c: e1a02005 mov r2, r5 30006410: e593000c ldr r0, [r3, #12] 30006414: eb002c3c bl 3001150c 30006418: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); 3000641c: e59f502c ldr r5, [pc, #44] ; 30006450 30006420: e59f1038 ldr r1, [pc, #56] ; 30006460 30006424: e5953000 ldr r3, [r5] 30006428: e593000c ldr r0, [r3, #12] 3000642c: eb002c36 bl 3001150c (void) fflush(stderr); 30006430: 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"); 30006434: e0804004 add r4, r0, r4 (void) fflush(stderr); 30006438: e593000c ldr r0, [r3, #12] 3000643c: eb002b4c bl 30011174 return chars_written; } 30006440: e1a00004 mov r0, r4 30006444: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 30002500 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 30002500: 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; 30002504: e3a04000 mov r4, #0 int d; for (;;) { c = getc(fp); 30002508: e59fb0d8 ldr fp, [pc, #216] ; 300025e8 limit++; continue; } sign = 1; } if (!isdigit(c)) 3000250c: e59f90d8 ldr r9, [pc, #216] ; 300025ec /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 30002510: e1a05000 mov r5, r0 30002514: e58d1000 str r1, [sp] int c; unsigned int i = 0; unsigned int limit = INT_MAX; 30002518: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 3000251c: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 30002520: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 30002524: e5953004 ldr r3, [r5, #4] 30002528: e2433001 sub r3, r3, #1 3000252c: e3530000 cmp r3, #0 30002530: e5853004 str r3, [r5, #4] 30002534: a5953000 ldrge r3, [r5] 30002538: a4d36001 ldrbge r6, [r3], #1 3000253c: a5853000 strge r3, [r5] 30002540: aa000003 bge 30002554 30002544: e59b0000 ldr r0, [fp] <== NOT EXECUTED 30002548: e1a01005 mov r1, r5 <== NOT EXECUTED 3000254c: eb0030b9 bl 3000e838 <__srget_r> <== NOT EXECUTED 30002550: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 30002554: e356003a cmp r6, #58 ; 0x3a 30002558: 0a000019 beq 300025c4 break; if (sign == 0) { 3000255c: e3540000 cmp r4, #0 30002560: 1a000004 bne 30002578 if (c == '-') { 30002564: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 30002568: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 3000256c: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 30002570: 0affffeb beq 30002524 sign = -1; limit++; continue; } sign = 1; 30002574: e3a04001 mov r4, #1 } if (!isdigit(c)) 30002578: e5993000 ldr r3, [r9] 3000257c: e0833006 add r3, r3, r6 30002580: e5d30001 ldrb r0, [r3, #1] 30002584: e2100004 ands r0, r0, #4 30002588: 0a000015 beq 300025e4 return 0; d = c - '0'; if ((i > (limit / 10)) 3000258c: e1a00008 mov r0, r8 30002590: e3a0100a mov r1, #10 30002594: eb0039b1 bl 30010c60 <__aeabi_uidiv> 30002598: e1570000 cmp r7, r0 3000259c: 8a00000f bhi 300025e0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 300025a0: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 300025a4: 1a000004 bne 300025bc 300025a8: e1a00008 mov r0, r8 300025ac: e3a0100a mov r1, #10 300025b0: eb003a42 bl 30010ec0 <__umodsi3> 300025b4: e1560000 cmp r6, r0 300025b8: 8a000008 bhi 300025e0 return 0; i = i * 10 + d; 300025bc: e027679a mla r7, sl, r7, r6 300025c0: eaffffd7 b 30002524 } if (sign == 0) 300025c4: e3540000 cmp r4, #0 return 0; 300025c8: 01a00004 moveq r0, r4 *val = i * sign; 300025cc: 10040497 mulne r4, r7, r4 300025d0: 159d3000 ldrne r3, [sp] return 1; 300025d4: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 300025d8: 15834000 strne r4, [r3] return 1; 300025dc: ea000000 b 300025e4 if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; 300025e0: e3a00000 mov r0, #0 } if (sign == 0) return 0; *val = i * sign; return 1; } 300025e4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30003ca0 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30003ca0: e591203c ldr r2, [r1, #60] ; 0x3c 30003ca4: e59f304c ldr r3, [pc, #76] ; 30003cf8 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30003ca8: e92d4030 push {r4, r5, lr} int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30003cac: e0023003 and r3, r2, r3 30003cb0: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30003cb4: e1a04001 mov r4, r1 30003cb8: 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)) { 30003cbc: 0a00000b beq 30003cf0 rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30003cc0: e5910018 ldr r0, [r1, #24] 30003cc4: e3a01000 mov r1, #0 30003cc8: e1a02001 mov r2, r1 30003ccc: eb0004c0 bl 30004fd4 i = iproc (c, tty); 30003cd0: e1a01004 mov r1, r4 30003cd4: e1a00005 mov r0, r5 30003cd8: ebffff8b bl 30003b0c 30003cdc: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); 30003ce0: e5940018 ldr r0, [r4, #24] 30003ce4: eb000500 bl 300050ec } else { i = iproc (c, tty); } return i; } 30003ce8: e1a00005 mov r0, r5 30003cec: e8bd8030 pop {r4, r5, pc} 30003cf0: 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); 30003cf4: eaffff84 b 30003b0c <== NOT EXECUTED =============================================================================== 30005b68 : */ int unmount( const char *path ) { 30005b68: e92d4070 push {r4, r5, r6, lr} 30005b6c: e24dd018 sub sp, sp, #24 30005b70: 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 ) ) 30005b74: eb00226a bl 3000e524 30005b78: e28d4004 add r4, sp, #4 30005b7c: e3a03001 mov r3, #1 30005b80: e1a01000 mov r1, r0 30005b84: e58d3000 str r3, [sp] 30005b88: e1a00005 mov r0, r5 30005b8c: e3a02000 mov r2, #0 30005b90: e1a03004 mov r3, r4 30005b94: ebfff475 bl 30002d70 30005b98: e3500000 cmp r0, #0 30005b9c: 1a000040 bne 30005ca4 return -1; mt_entry = loc.mt_entry; 30005ba0: 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 ){ 30005ba4: e59d3004 ldr r3, [sp, #4] 30005ba8: e595201c ldr r2, [r5, #28] 30005bac: e1520003 cmp r2, r3 30005bb0: 0a000004 beq 30005bc8 rtems_filesystem_freenode( &loc ); 30005bb4: e1a00004 mov r0, r4 30005bb8: ebfff49c bl 30002e30 rtems_set_errno_and_return_minus_one( EACCES ); 30005bbc: eb001ce0 bl 3000cf44 <__errno> 30005bc0: e3a0300d mov r3, #13 30005bc4: ea000011 b 30005c10 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 30005bc8: e1a00004 mov r0, r4 30005bcc: ebfff497 bl 30002e30 * 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 ) 30005bd0: e59f30d8 ldr r3, [pc, #216] ; 30005cb0 30005bd4: e5933000 ldr r3, [r3] 30005bd8: e5933014 ldr r3, [r3, #20] 30005bdc: e1530005 cmp r3, r5 30005be0: 0a000008 beq 30005c08 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 30005be4: e59f00c8 ldr r0, [pc, #200] ; 30005cb4 30005be8: e595102c ldr r1, [r5, #44] ; 0x2c 30005bec: ebfff6b1 bl 300036b8 30005bf0: e3500000 cmp r0, #0 30005bf4: 1a000003 bne 30005c08 * 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 ) 30005bf8: e1a00005 mov r0, r5 30005bfc: ebfff566 bl 3000319c 30005c00: e3500001 cmp r0, #1 30005c04: 1a000003 bne 30005c18 rtems_set_errno_and_return_minus_one( EBUSY ); 30005c08: eb001ccd bl 3000cf44 <__errno> 30005c0c: e3a03010 mov r3, #16 30005c10: e5803000 str r3, [r0] 30005c14: ea000022 b 30005ca4 * 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 ) 30005c18: e5953014 ldr r3, [r5, #20] 30005c1c: e1a00005 mov r0, r5 30005c20: e1a0e00f mov lr, pc 30005c24: e593f028 ldr pc, [r3, #40] ; 0x28 30005c28: e2506000 subs r6, r0, #0 30005c2c: 1a00001c bne 30005ca4 * 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){ 30005c30: e5953028 ldr r3, [r5, #40] ; 0x28 30005c34: e1a00005 mov r0, r5 30005c38: e1a0e00f mov lr, pc 30005c3c: e593f02c ldr pc, [r3, #44] ; 0x2c 30005c40: e2504000 subs r4, r0, #0 30005c44: 0a000007 beq 30005c68 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 30005c48: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 30005c4c: e1a00005 mov r0, r5 <== NOT EXECUTED 30005c50: e1a0e00f mov lr, pc <== NOT EXECUTED 30005c54: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 30005c58: e3500000 cmp r0, #0 <== NOT EXECUTED 30005c5c: 0a000010 beq 30005ca4 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 30005c60: e1a00006 mov r0, r6 <== NOT EXECUTED 30005c64: eb0003de bl 30006be4 <== 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 ); 30005c68: e59f6048 ldr r6, [pc, #72] ; 30005cb8 30005c6c: e1a01004 mov r1, r4 30005c70: e1a02004 mov r2, r4 30005c74: e5960000 ldr r0, [r6] 30005c78: eb00025b bl 300065ec */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30005c7c: e1a00005 mov r0, r5 30005c80: eb00048d bl 30006ebc <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 30005c84: e5960000 ldr r0, [r6] 30005c88: eb00029d bl 30006704 /* * 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 ); 30005c8c: e2850008 add r0, r5, #8 30005c90: ebfff466 bl 30002e30 free( mt_entry ); 30005c94: e1a00005 mov r0, r5 30005c98: ebfff469 bl 30002e44 return 0; 30005c9c: e1a00004 mov r0, r4 30005ca0: ea000000 b 30005ca8 */ 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; 30005ca4: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 30005ca8: e28dd018 add sp, sp, #24 30005cac: e8bd8070 pop {r4, r5, r6, pc}