=============================================================================== 30008a18 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 30008a18: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 30008a1c: e5903010 ldr r3, [r0, #16] switch( node->type ) { 30008a20: 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; 30008a24: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 30008a28: e2422001 sub r2, r2, #1 30008a2c: e3520006 cmp r2, #6 30008a30: 979ff102 ldrls pc, [pc, r2, lsl #2] 30008a34: ea000010 b 30008a7c <== NOT EXECUTED 30008a38: 30008a54 .word 0x30008a54 <== NOT EXECUTED 30008a3c: 30008a5c .word 0x30008a5c <== NOT EXECUTED 30008a40: 30008a64 .word 0x30008a64 <== NOT EXECUTED 30008a44: 30008a64 .word 0x30008a64 <== NOT EXECUTED 30008a48: 30008a6c .word 0x30008a6c <== NOT EXECUTED 30008a4c: 30008a6c .word 0x30008a6c <== NOT EXECUTED 30008a50: 30008a74 .word 0x30008a74 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 30008a54: e593300c ldr r3, [r3, #12] 30008a58: ea000006 b 30008a78 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 30008a5c: e59f3020 ldr r3, [pc, #32] ; 30008a84 30008a60: ea000004 b 30008a78 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 30008a64: e59f301c ldr r3, [pc, #28] ; 30008a88 30008a68: ea000002 b 30008a78 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 30008a6c: e5933008 ldr r3, [r3, #8] 30008a70: ea000000 b 30008a78 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 30008a74: e5933010 ldr r3, [r3, #16] 30008a78: e5803008 str r3, [r0, #8] break; } return 0; } 30008a7c: e3a00000 mov r0, #0 30008a80: e12fff1e bx lr =============================================================================== 300087bc : int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 300087bc: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} 300087c0: e1a02802 lsl r2, r2, #16 300087c4: e1a01801 lsl r1, r1, #16 IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = (IMFS_jnode_t *) pathloc->node_access; 300087c8: e5904000 ldr r4, [r0] int IMFS_chown( rtems_filesystem_location_info_t *pathloc, /* IN */ uid_t owner, /* IN */ gid_t group /* IN */ ) { 300087cc: e1a06821 lsr r6, r1, #16 300087d0: e1a07822 lsr r7, r2, #16 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 300087d4: eb00039e bl 30009654 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 300087d8: e1d453bc ldrh r5, [r4, #60] ; 0x3c 300087dc: e3500000 cmp r0, #0 300087e0: 11550000 cmpne r5, r0 300087e4: 03a05000 moveq r5, #0 300087e8: 13a05001 movne r5, #1 300087ec: 0a000004 beq 30008804 rtems_set_errno_and_return_minus_one( EPERM ); 300087f0: eb0010e5 bl 3000cb8c <__errno> <== NOT EXECUTED 300087f4: e3a03001 mov r3, #1 <== NOT EXECUTED 300087f8: e5803000 str r3, [r0] <== NOT EXECUTED 300087fc: e3e00000 mvn r0, #0 <== NOT EXECUTED 30008800: ea000007 b 30008824 <== NOT EXECUTED #endif jnode->st_uid = owner; 30008804: e1c463bc strh r6, [r4, #60] ; 0x3c jnode->st_gid = group; 30008808: e1c473be strh r7, [r4, #62] ; 0x3e IMFS_update_ctime( jnode ); 3000880c: e1a0000d mov r0, sp 30008810: e1a01005 mov r1, r5 30008814: ebffe5c4 bl 30001f2c 30008818: e59d3000 ldr r3, [sp] return 0; 3000881c: e1a00005 mov r0, r5 #endif jnode->st_uid = owner; jnode->st_gid = group; IMFS_update_ctime( jnode ); 30008820: e5843048 str r3, [r4, #72] ; 0x48 return 0; } 30008824: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} =============================================================================== 300088a0 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 300088a0: e92d41f0 push {r4, r5, r6, r7, r8, lr} IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 300088a4: e2508000 subs r8, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 300088a8: e1a04001 mov r4, r1 300088ac: e59d5018 ldr r5, [sp, #24] 300088b0: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 300088b4: 0a000043 beq 300089c8 return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 300088b8: e5982010 ldr r2, [r8, #16] /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 300088bc: e3540007 cmp r4, #7 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 300088c0: e5987000 ldr r7, [r8] fs_info = parent_loc->mt_entry->fs_info; 300088c4: e5926034 ldr r6, [r2, #52] ; 0x34 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 300088c8: 1a000004 bne 300088e0 300088cc: e5960010 ldr r0, [r6, #16] 300088d0: e59f20f8 ldr r2, [pc, #248] ; 300089d0 300088d4: e1500002 cmp r0, r2 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 300088d8: 03a08000 moveq r8, #0 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 300088dc: 0a000039 beq 300089c8 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 300088e0: e59f20ec ldr r2, [pc, #236] ; 300089d4 300088e4: e1a00004 mov r0, r4 300088e8: e5922000 ldr r2, [r2] 300088ec: e592202c ldr r2, [r2, #44] ; 0x2c 300088f0: e1c32002 bic r2, r3, r2 300088f4: ebffffcb bl 30008828 if ( !node ) 300088f8: e2508000 subs r8, r0, #0 300088fc: 0a000031 beq 300089c8 return NULL; /* * Set the type specific information */ switch (type) { 30008900: e2444001 sub r4, r4, #1 30008904: e3540006 cmp r4, #6 30008908: 979ff104 ldrls pc, [pc, r4, lsl #2] 3000890c: ea000025 b 300089a8 <== NOT EXECUTED 30008910: 3000892c .word 0x3000892c <== NOT EXECUTED 30008914: 30008950 .word 0x30008950 <== NOT EXECUTED 30008918: 30008948 .word 0x30008948 <== NOT EXECUTED 3000891c: 30008948 .word 0x30008948 <== NOT EXECUTED 30008920: 3000897c .word 0x3000897c <== NOT EXECUTED 30008924: 30008964 .word 0x30008964 <== NOT EXECUTED 30008928: 300089a0 .word 0x300089a0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000892c: e2883054 add r3, r8, #84 ; 0x54 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30008930: e5883050 str r3, [r8, #80] ; 0x50 the_chain->permanent_null = NULL; 30008934: e3a03000 mov r3, #0 30008938: e5883054 str r3, [r8, #84] ; 0x54 case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); 3000893c: e2883050 add r3, r8, #80 ; 0x50 the_chain->last = _Chain_Head(the_chain); 30008940: e5883058 str r3, [r8, #88] ; 0x58 30008944: ea000017 b 300089a8 case IMFS_HARD_LINK: node->info.hard_link.link_node = info->hard_link.link_node; break; case IMFS_SYM_LINK: node->info.sym_link.name = info->sym_link.name; 30008948: e5953000 ldr r3, [r5] 3000894c: ea000014 b 300089a4 break; case IMFS_DEVICE: node->info.device.major = info->device.major; 30008950: e5953000 ldr r3, [r5] 30008954: e5883050 str r3, [r8, #80] ; 0x50 node->info.device.minor = info->device.minor; 30008958: e5953004 ldr r3, [r5, #4] 3000895c: e5883054 str r3, [r8, #84] ; 0x54 break; 30008960: ea000010 b 300089a8 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 30008964: e3a03000 mov r3, #0 30008968: e3a04000 mov r4, #0 3000896c: e5883050 str r3, [r8, #80] ; 0x50 30008970: e5884054 str r4, [r8, #84] ; 0x54 node->info.linearfile.direct = 0; 30008974: e3a03000 mov r3, #0 30008978: e5883058 str r3, [r8, #88] ; 0x58 case IMFS_MEMORY_FILE: node->info.file.size = 0; 3000897c: e3a03000 mov r3, #0 30008980: e3a04000 mov r4, #0 30008984: e5883050 str r3, [r8, #80] ; 0x50 30008988: e5884054 str r4, [r8, #84] ; 0x54 node->info.file.indirect = 0; 3000898c: e3a03000 mov r3, #0 30008990: e5883058 str r3, [r8, #88] ; 0x58 node->info.file.doubly_indirect = 0; 30008994: e588305c str r3, [r8, #92] ; 0x5c node->info.file.triply_indirect = 0; 30008998: e5883060 str r3, [r8, #96] ; 0x60 break; 3000899c: ea000001 b 300089a8 case IMFS_FIFO: node->info.fifo.pipe = NULL; 300089a0: e3a03000 mov r3, #0 300089a4: e5883050 str r3, [r8, #80] ; 0x50 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; node->st_ino = ++fs_info->ino_count; 300089a8: e5963004 ldr r3, [r6, #4] /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 300089ac: e5887008 str r7, [r8, #8] node->st_ino = ++fs_info->ino_count; 300089b0: e2833001 add r3, r3, #1 300089b4: e5863004 str r3, [r6, #4] 300089b8: e2870050 add r0, r7, #80 ; 0x50 300089bc: e5883038 str r3, [r8, #56] ; 0x38 300089c0: e1a01008 mov r1, r8 300089c4: ebfff3f3 bl 30005998 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 300089c8: e1a00008 mov r0, r8 300089cc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 30008b38 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 30008b38: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30008b3c: e24dd040 sub sp, sp, #64 ; 0x40 30008b40: e1a08000 mov r8, r0 30008b44: e1a06001 mov r6, r1 30008b48: e58d2000 str r2, [sp] 30008b4c: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30008b50: e5935000 ldr r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 30008b54: e3a09001 mov r9, #1 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 30008b58: e3a07000 mov r7, #0 * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 30008b5c: e28da004 add sl, sp, #4 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 30008b60: ea000055 b 30008cbc type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 30008b64: e28d303c add r3, sp, #60 ; 0x3c 30008b68: e0880007 add r0, r8, r7 30008b6c: e1a01006 mov r1, r6 30008b70: e1a0200a mov r2, sl 30008b74: eb0001bd bl 30009270 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 30008b78: 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 ); 30008b7c: e1a09000 mov r9, r0 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 30008b80: 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; 30008b84: e59db03c ldr fp, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 30008b88: 0a000043 beq 30008c9c rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30008b8c: e3500000 cmp r0, #0 30008b90: 0a000006 beq 30008bb0 if ( node->type == IMFS_DIRECTORY ) 30008b94: e595104c ldr r1, [r5, #76] ; 0x4c 30008b98: e3510001 cmp r1, #1 30008b9c: 1a000003 bne 30008bb0 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30008ba0: e1a00004 mov r0, r4 30008ba4: ebffffb8 bl 30008a8c 30008ba8: e3500000 cmp r0, #0 30008bac: 0a000069 beq 30008d58 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 30008bb0: 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; 30008bb4: e06b6006 rsb r6, fp, r6 i += len; 30008bb8: 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; 30008bbc: e5945000 ldr r5, [r4] switch( type ) { 30008bc0: 0a000014 beq 30008c18 30008bc4: e3590004 cmp r9, #4 30008bc8: 0a000038 beq 30008cb0 30008bcc: e3590002 cmp r9, #2 30008bd0: 1a000039 bne 30008cbc case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 30008bd4: e59f2198 ldr r2, [pc, #408] ; 30008d74 30008bd8: e5923000 ldr r3, [r2] 30008bdc: e5933018 ldr r3, [r3, #24] 30008be0: e1550003 cmp r5, r3 30008be4: 0a000034 beq 30008cbc /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 30008be8: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 30008bec: e59e301c ldr r3, [lr, #28] 30008bf0: 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; 30008bf4: 028dc028 addeq ip, sp, #40 ; 0x28 30008bf8: 028ee008 addeq lr, lr, #8 30008bfc: 0a000039 beq 30008ce8 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 30008c00: e5955008 ldr r5, [r5, #8] 30008c04: e3550000 cmp r5, #0 30008c08: 1a000026 bne 30008ca8 rtems_set_errno_and_return_minus_one( ENOENT ); 30008c0c: eb000fde bl 3000cb8c <__errno> 30008c10: e5809000 str r9, [r0] 30008c14: ea000052 b 30008d64 case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 30008c18: e595304c ldr r3, [r5, #76] ; 0x4c 30008c1c: e3530003 cmp r3, #3 30008c20: 1a000006 bne 30008c40 IMFS_evaluate_hard_link( pathloc, 0 ); 30008c24: e1a00004 mov r0, r4 30008c28: e3a01000 mov r1, #0 30008c2c: ebffffa9 bl 30008ad8 node = pathloc->node_access; 30008c30: e5945000 ldr r5, [r4] if ( !node ) 30008c34: e3550000 cmp r5, #0 30008c38: 1a000009 bne 30008c64 30008c3c: ea00000b b 30008c70 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 30008c40: e3530004 cmp r3, #4 30008c44: 1a000006 bne 30008c64 result = IMFS_evaluate_sym_link( pathloc, 0 ); 30008c48: e1a00004 mov r0, r4 30008c4c: e3a01000 mov r1, #0 30008c50: eb000048 bl 30008d78 node = pathloc->node_access; if ( result == -1 ) 30008c54: e3700001 cmn r0, #1 if ( !node ) rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_sym_link( pathloc, 0 ); 30008c58: e1a0b000 mov fp, r0 node = pathloc->node_access; 30008c5c: e5945000 ldr r5, [r4] if ( result == -1 ) 30008c60: 0a000040 beq 30008d68 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30008c64: e595304c ldr r3, [r5, #76] ; 0x4c 30008c68: e3530001 cmp r3, #1 30008c6c: 0a000002 beq 30008c7c rtems_set_errno_and_return_minus_one( ENOTDIR ); 30008c70: eb000fc5 bl 3000cb8c <__errno> 30008c74: e3a03014 mov r3, #20 30008c78: ea000038 b 30008d60 /* * 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 ) { 30008c7c: e595e05c ldr lr, [r5, #92] ; 0x5c 30008c80: e35e0000 cmp lr, #0 30008c84: 1a000015 bne 30008ce0 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 30008c88: e1a00005 mov r0, r5 30008c8c: e1a0100a mov r1, sl 30008c90: eb000152 bl 300091e0 if ( !node ) 30008c94: e2505000 subs r5, r0, #0 30008c98: 1a000002 bne 30008ca8 rtems_set_errno_and_return_minus_one( ENOENT ); 30008c9c: eb000fba bl 3000cb8c <__errno> 30008ca0: e3a03002 mov r3, #2 30008ca4: ea00002d b 30008d60 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 30008ca8: e5845000 str r5, [r4] 30008cac: ea000002 b 30008cbc case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30008cb0: eb000fb5 bl 3000cb8c <__errno> 30008cb4: e3a0305b mov r3, #91 ; 0x5b 30008cb8: ea000028 b 30008d60 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 30008cbc: e3590004 cmp r9, #4 30008cc0: 13590000 cmpne r9, #0 30008cc4: 1affffa6 bne 30008b64 * 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 ) { 30008cc8: e595304c ldr r3, [r5, #76] ; 0x4c 30008ccc: e3530001 cmp r3, #1 30008cd0: 1a000018 bne 30008d38 if ( node->info.directory.mt_fs != NULL ) { 30008cd4: e595e05c ldr lr, [r5, #92] ; 0x5c 30008cd8: e35e0000 cmp lr, #0 30008cdc: 0a000015 beq 30008d38 newloc = node->info.directory.mt_fs->mt_fs_root; 30008ce0: e28dc028 add ip, sp, #40 ; 0x28 30008ce4: e28ee01c add lr, lr, #28 30008ce8: e8be000f ldm lr!, {r0, r1, r2, r3} 30008cec: e8ac000f stmia ip!, {r0, r1, r2, r3} 30008cf0: e59ee000 ldr lr, [lr] 30008cf4: e58ce000 str lr, [ip] *pathloc = newloc; 30008cf8: e28dc028 add ip, sp, #40 ; 0x28 30008cfc: e8bc000f ldm ip!, {r0, r1, r2, r3} 30008d00: e1a0c004 mov ip, r4 30008d04: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 30008d08: e59d103c ldr r1, [sp, #60] ; 0x3c */ if ( node->type == IMFS_DIRECTORY ) { if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; 30008d0c: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 30008d10: e0610007 rsb r0, r1, r7 30008d14: e594c00c ldr ip, [r4, #12] 30008d18: e0880000 add r0, r8, r0 30008d1c: e0861001 add r1, r6, r1 30008d20: e59d2000 ldr r2, [sp] 30008d24: e1a03004 mov r3, r4 30008d28: e1a0e00f mov lr, pc 30008d2c: e59cf000 ldr pc, [ip] 30008d30: e1a0b000 mov fp, r0 30008d34: ea00000b b 30008d68 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30008d38: e1a00004 mov r0, r4 30008d3c: ebffff35 bl 30008a18 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30008d40: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 30008d44: e1a0b000 mov fp, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 30008d48: e1a00004 mov r0, r4 30008d4c: ebffff4e bl 30008a8c 30008d50: e3500000 cmp r0, #0 30008d54: 1a000003 bne 30008d68 rtems_set_errno_and_return_minus_one( EACCES ); 30008d58: eb000f8b bl 3000cb8c <__errno> 30008d5c: e3a0300d mov r3, #13 30008d60: e5803000 str r3, [r0] 30008d64: e3e0b000 mvn fp, #0 return result; } 30008d68: e1a0000b mov r0, fp 30008d6c: e28dd040 add sp, sp, #64 ; 0x40 30008d70: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30008edc : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 30008edc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30008ee0: e24dd03c sub sp, sp, #60 ; 0x3c 30008ee4: e1a07000 mov r7, r0 30008ee8: e1a04001 mov r4, r1 30008eec: e1a0a002 mov sl, r2 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 30008ef0: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 30008ef4: eb001314 bl 3000db4c const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 30008ef8: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 30008efc: 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 ); 30008f00: e1a01008 mov r1, r8 30008f04: e28d3038 add r3, sp, #56 ; 0x38 30008f08: e0870005 add r0, r7, r5 30008f0c: e1a0200d mov r2, sp 30008f10: eb0000d6 bl 30009270 pathlen -= len; i += len; if ( !pathloc->node_access ) 30008f14: e5943000 ldr r3, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 30008f18: e59db038 ldr fp, [sp, #56] ; 0x38 i += len; if ( !pathloc->node_access ) 30008f1c: 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 ); 30008f20: e1a09000 mov r9, r0 pathlen -= len; 30008f24: e06b8008 rsb r8, fp, r8 i += len; if ( !pathloc->node_access ) 30008f28: 0a000060 beq 300090b0 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 30008f2c: e3500000 cmp r0, #0 30008f30: 0a000006 beq 30008f50 if ( node->type == IMFS_DIRECTORY ) 30008f34: e596104c ldr r1, [r6, #76] ; 0x4c 30008f38: e3510001 cmp r1, #1 30008f3c: 1a000003 bne 30008f50 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 30008f40: e1a00004 mov r0, r4 30008f44: ebfffed0 bl 30008a8c 30008f48: e3500000 cmp r0, #0 30008f4c: 0a00006c beq 30009104 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; 30008f50: e5943000 ldr r3, [r4] while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 30008f54: 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; 30008f58: e1a06003 mov r6, r3 switch( type ) { 30008f5c: e3590004 cmp r9, #4 30008f60: 979ff109 ldrls pc, [pc, r9, lsl #2] 30008f64: eaffffe5 b 30008f00 <== NOT EXECUTED 30008f68: 30009074 .word 0x30009074 <== NOT EXECUTED 30008f6c: 30008f00 .word 0x30008f00 <== NOT EXECUTED 30008f70: 30008f7c .word 0x30008f7c <== NOT EXECUTED 30008f74: 30008fb8 .word 0x30008fb8 <== NOT EXECUTED 30008f78: 30009080 .word 0x30009080 <== 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 ) 30008f7c: e59f119c ldr r1, [pc, #412] ; 30009120 30008f80: e5912000 ldr r2, [r1] 30008f84: e5922018 ldr r2, [r2, #24] 30008f88: e1530002 cmp r3, r2 30008f8c: 0affffdb beq 30008f00 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 30008f90: e594e010 ldr lr, [r4, #16] 30008f94: e59e201c ldr r2, [lr, #28] 30008f98: e1530002 cmp r3, r2 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 30008f9c: 028dc024 addeq ip, sp, #36 ; 0x24 30008fa0: 028ee008 addeq lr, lr, #8 30008fa4: 0a000019 beq 30009010 *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); } } else { if ( !node->Parent ) 30008fa8: e5936008 ldr r6, [r3, #8] 30008fac: e3560000 cmp r6, #0 30008fb0: 1a00002d bne 3000906c 30008fb4: ea00003d b 300090b0 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 30008fb8: e593304c ldr r3, [r3, #76] ; 0x4c 30008fbc: e3530003 cmp r3, #3 30008fc0: 0a000001 beq 30008fcc result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 30008fc4: e3530004 cmp r3, #4 30008fc8: 1a000005 bne 30008fe4 result = IMFS_evaluate_link( pathloc, 0 ); 30008fcc: e1a00004 mov r0, r4 30008fd0: e3a01000 mov r1, #0 30008fd4: ebffff93 bl 30008e28 if ( result == -1 ) 30008fd8: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 30008fdc: e1a06000 mov r6, r0 if ( result == -1 ) 30008fe0: 0a00004b beq 30009114 return -1; } node = pathloc->node_access; 30008fe4: e5940000 ldr r0, [r4] if ( !node ) 30008fe8: e3500000 cmp r0, #0 30008fec: 0a00003c beq 300090e4 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 30008ff0: e590304c ldr r3, [r0, #76] ; 0x4c 30008ff4: e3530001 cmp r3, #1 30008ff8: 1a000039 bne 300090e4 /* * 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 ) { 30008ffc: e590e05c ldr lr, [r0, #92] ; 0x5c 30009000: e35e0000 cmp lr, #0 30009004: 0a000014 beq 3000905c newloc = node->info.directory.mt_fs->mt_fs_root; 30009008: e28dc024 add ip, sp, #36 ; 0x24 3000900c: e28ee01c add lr, lr, #28 30009010: e8be000f ldm lr!, {r0, r1, r2, r3} 30009014: e8ac000f stmia ip!, {r0, r1, r2, r3} 30009018: e59ee000 ldr lr, [lr] 3000901c: e58ce000 str lr, [ip] *pathloc = newloc; 30009020: e28dc024 add ip, sp, #36 ; 0x24 30009024: e8bc000f ldm ip!, {r0, r1, r2, r3} 30009028: e1a0c004 mov ip, r4 3000902c: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30009030: 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; 30009034: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 30009038: e0625005 rsb r5, r2, r5 3000903c: e594300c ldr r3, [r4, #12] 30009040: e0870005 add r0, r7, r5 30009044: e1a01004 mov r1, r4 30009048: e1a0200a mov r2, sl 3000904c: e1a0e00f mov lr, pc 30009050: e593f004 ldr pc, [r3, #4] 30009054: e1a06000 mov r6, r0 30009058: ea00002d b 30009114 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 3000905c: e1a0100d mov r1, sp 30009060: eb00005e bl 300091e0 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 30009064: e2506000 subs r6, r0, #0 30009068: 0a000007 beq 3000908c done = true; else pathloc->node_access = node; 3000906c: e5846000 str r6, [r4] 30009070: eaffffa2 b 30008f00 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 30009074: eb000ec4 bl 3000cb8c <__errno> 30009078: e3a03011 mov r3, #17 3000907c: ea000022 b 3000910c break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 30009080: eb000ec1 bl 3000cb8c <__errno> 30009084: e3a0305b mov r3, #91 ; 0x5b 30009088: ea00001f b 3000910c case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 3000908c: e59d3038 ldr r3, [sp, #56] ; 0x38 30009090: e0633005 rsb r3, r3, r5 30009094: e0873003 add r3, r7, r3 30009098: 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( 3000909c: 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++) { 300090a0: ea000005 b 300090bc if ( !IMFS_is_separator( path[ i ] ) ) 300090a4: ebffe6f2 bl 30002c74 300090a8: e3500000 cmp r0, #0 300090ac: 1a000002 bne 300090bc rtems_set_errno_and_return_minus_one( ENOENT ); 300090b0: eb000eb5 bl 3000cb8c <__errno> 300090b4: e3a03002 mov r3, #2 300090b8: ea000013 b 3000910c /* * 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++) { 300090bc: e4d50001 ldrb r0, [r5], #1 300090c0: e3500000 cmp r0, #0 300090c4: 1afffff6 bne 300090a4 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 300090c8: e1a00004 mov r0, r4 300090cc: ebfffe51 bl 30008a18 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 300090d0: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 300090d4: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 300090d8: e593304c ldr r3, [r3, #76] ; 0x4c 300090dc: e3530001 cmp r3, #1 300090e0: 0a000002 beq 300090f0 rtems_set_errno_and_return_minus_one( ENOTDIR ); 300090e4: eb000ea8 bl 3000cb8c <__errno> 300090e8: e3a03014 mov r3, #20 300090ec: ea000006 b 3000910c /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 300090f0: e1a00004 mov r0, r4 300090f4: e3a01003 mov r1, #3 300090f8: ebfffe63 bl 30008a8c 300090fc: e3500000 cmp r0, #0 30009100: 1a000003 bne 30009114 rtems_set_errno_and_return_minus_one( EACCES ); 30009104: eb000ea0 bl 3000cb8c <__errno> 30009108: e3a0300d mov r3, #13 3000910c: e5803000 str r3, [r0] 30009110: e3e06000 mvn r6, #0 return result; } 30009114: e1a00006 mov r0, r6 30009118: e28dd03c add sp, sp, #60 ; 0x3c 3000911c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30008ad8 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 30008ad8: e5903000 ldr r3, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008adc: e92d4030 push {r4, r5, lr} /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 30008ae0: e593204c ldr r2, [r3, #76] ; 0x4c int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008ae4: e1a04000 mov r4, r0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 30008ae8: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008aec: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 30008af0: 159f003c ldrne r0, [pc, #60] ; 30008b34 30008af4: 1bfff2ea blne 300056a4 /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 30008af8: e5933050 ldr r3, [r3, #80] ; 0x50 30008afc: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 30008b00: ebffffc4 bl 30008a18 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 30008b04: e1a00004 mov r0, r4 30008b08: e1a01005 mov r1, r5 30008b0c: ebffffde bl 30008a8c 30008b10: e3500000 cmp r0, #0 30008b14: 1a000004 bne 30008b2c rtems_set_errno_and_return_minus_one( EACCES ); 30008b18: eb00101b bl 3000cb8c <__errno> <== NOT EXECUTED 30008b1c: e3a0300d mov r3, #13 <== NOT EXECUTED 30008b20: e5803000 str r3, [r0] <== NOT EXECUTED 30008b24: e3e00000 mvn r0, #0 <== NOT EXECUTED 30008b28: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return result; 30008b2c: e3a00000 mov r0, #0 } 30008b30: e8bd8030 pop {r4, r5, pc} =============================================================================== 30008d78 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008d78: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 30008d7c: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008d80: e1a04000 mov r4, r0 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30008d84: e596304c ldr r3, [r6, #76] ; 0x4c int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 30008d88: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30008d8c: e3530004 cmp r3, #4 rtems_fatal_error_occurred (0xABCD0000); 30008d90: 159f0088 ldrne r0, [pc, #136] ; 30008e20 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 30008d94: 1a000003 bne 30008da8 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 30008d98: e5963008 ldr r3, [r6, #8] 30008d9c: e3530000 cmp r3, #0 30008da0: 1a000001 bne 30008dac rtems_fatal_error_occurred( 0xBAD00000 ); 30008da4: e59f0078 ldr r0, [pc, #120] ; 30008e24 <== NOT EXECUTED 30008da8: ebfff23d bl 300056a4 <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 30008dac: e5960050 ldr r0, [r6, #80] ; 0x50 30008db0: e1a0100d mov r1, sp 30008db4: e1a02004 mov r2, r4 /* * Move the node_access to either the symbolic links parent or * root depending on the symbolic links path. */ node->node_access = jnode->Parent; 30008db8: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 30008dbc: eb00034f bl 30009b00 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 30008dc0: e59d3000 ldr r3, [sp] 30008dc4: e5966050 ldr r6, [r6, #80] ; 0x50 30008dc8: e0866003 add r6, r6, r3 30008dcc: e1a00006 mov r0, r6 30008dd0: eb00135d bl 3000db4c 30008dd4: e1a02005 mov r2, r5 30008dd8: e1a01000 mov r1, r0 30008ddc: e1a03004 mov r3, r4 30008de0: e1a00006 mov r0, r6 30008de4: ebffff53 bl 30008b38 30008de8: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 30008dec: e1a00004 mov r0, r4 30008df0: ebffff08 bl 30008a18 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 30008df4: e1a00004 mov r0, r4 30008df8: e1a01005 mov r1, r5 30008dfc: ebffff22 bl 30008a8c 30008e00: e3500000 cmp r0, #0 30008e04: 1a000003 bne 30008e18 rtems_set_errno_and_return_minus_one( EACCES ); 30008e08: eb000f5f bl 3000cb8c <__errno> <== NOT EXECUTED 30008e0c: e3a0300d mov r3, #13 <== NOT EXECUTED 30008e10: e5803000 str r3, [r0] <== NOT EXECUTED 30008e14: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 30008e18: e1a00006 mov r0, r6 30008e1c: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== 3000c234 : int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000c234: e92d4073 push {r0, r1, r4, r5, r6, lr} IMFS_jnode_t *jnode; #if defined(RTEMS_POSIX_API) uid_t st_uid; #endif jnode = loc->node_access; 3000c238: e5904000 ldr r4, [r0] int IMFS_fchmod( rtems_filesystem_location_info_t *loc, mode_t mode ) { 3000c23c: e1a06001 mov r6, r1 /* * Verify I am the owner of the node or the super user. */ #if defined(RTEMS_POSIX_API) st_uid = geteuid(); 3000c240: ebfff503 bl 30009654 if ( ( st_uid != jnode->st_uid ) && ( st_uid != 0 ) ) 3000c244: e1d453bc ldrh r5, [r4, #60] ; 0x3c 3000c248: e3500000 cmp r0, #0 3000c24c: 11550000 cmpne r5, r0 3000c250: 03a05000 moveq r5, #0 3000c254: 13a05001 movne r5, #1 3000c258: 0a000004 beq 3000c270 rtems_set_errno_and_return_minus_one( EPERM ); 3000c25c: eb00024a bl 3000cb8c <__errno> <== NOT EXECUTED 3000c260: e3a03001 mov r3, #1 <== NOT EXECUTED 3000c264: e5803000 str r3, [r0] <== NOT EXECUTED 3000c268: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000c26c: ea00000b b 3000c2a0 <== NOT EXECUTED /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000c270: e5943030 ldr r3, [r4, #48] ; 0x30 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000c274: e1a06a06 lsl r6, r6, #20 /* * Change only the RWX permissions on the jnode to mode. */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000c278: e3c33eff bic r3, r3, #4080 ; 0xff0 3000c27c: e3c3300f bic r3, r3, #15 jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); 3000c280: e1833a26 orr r3, r3, r6, lsr #20 3000c284: e5843030 str r3, [r4, #48] ; 0x30 IMFS_update_ctime( jnode ); 3000c288: e1a0000d mov r0, sp 3000c28c: e1a01005 mov r1, r5 3000c290: ebffd725 bl 30001f2c 3000c294: e59d3000 ldr r3, [sp] return 0; 3000c298: e1a00005 mov r0, r5 */ jnode->st_mode &= ~(S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); jnode->st_mode |= mode & (S_IRWXU | S_IRWXG | S_IRWXO | S_ISUID | S_ISGID | S_ISVTX); IMFS_update_ctime( jnode ); 3000c29c: e5843048 str r3, [r4, #72] ; 0x48 return 0; } 3000c2a0: e8bd807c pop {r2, r3, r4, r5, r6, pc} =============================================================================== 30002260 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 30002260: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; 30002264: e5905018 ldr r5, [r0, #24] } int IMFS_fifo_close( rtems_libio_t *iop ) { 30002268: e1a04000 mov r4, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); 3000226c: e1a01004 mov r1, r4 30002270: e2850050 add r0, r5, #80 ; 0x50 30002274: eb00226a bl 3000ac24 if (err == 0) { 30002278: e2506000 subs r6, r0, #0 3000227c: 1a000005 bne 30002298 iop->flags &= ~LIBIO_FLAGS_OPEN; 30002280: e5943014 ldr r3, [r4, #20] IMFS_check_node_remove(jnode); 30002284: e1a00005 mov r0, r5 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (err == 0) { iop->flags &= ~LIBIO_FLAGS_OPEN; 30002288: e3c33c01 bic r3, r3, #256 ; 0x100 3000228c: e5843014 str r3, [r4, #20] IMFS_check_node_remove(jnode); 30002290: eb000182 bl 300028a0 30002294: ea000004 b 300022ac } IMFS_FIFO_RETURN(err); 30002298: aa000003 bge 300022ac <== NOT EXECUTED 3000229c: eb0030db bl 3000e610 <__errno> <== NOT EXECUTED 300022a0: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 300022a4: e5806000 str r6, [r0] <== NOT EXECUTED 300022a8: e3e06000 mvn r6, #0 <== NOT EXECUTED } 300022ac: e1a00006 mov r0, r6 300022b0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 30009124 : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 30009124: 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; 30009128: 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 ) { 3000912c: 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; 30009130: e5bc401c ldr r4, [ip, #28]! loc = temp_mt_entry->mt_fs_root; 30009134: 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 ) { 30009138: 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; 3000913c: e8bc000f ldm ip!, {r0, r1, r2, r3} 30009140: e8ae000f stmia lr!, {r0, r1, r2, r3} 30009144: e59c3000 ldr r3, [ip] 30009148: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 3000914c: e3a03000 mov r3, #0 30009150: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 30009154: e1a0500d mov r5, sp 30009158: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 3000915c: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 30009160: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 30009164: ebfffe2b bl 30008a18 if ( jnode->type != IMFS_DIRECTORY ) { 30009168: e594304c ldr r3, [r4, #76] ; 0x4c 3000916c: e3530001 cmp r3, #1 30009170: 1a000003 bne 30009184 result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 30009174: e5942050 ldr r2, [r4, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30009178: e2843054 add r3, r4, #84 ; 0x54 3000917c: e1520003 cmp r2, r3 30009180: 1a000005 bne 3000919c result = IMFS_unlink( NULL, &loc ); 30009184: e3a00000 mov r0, #0 30009188: e1a0100d mov r1, sp 3000918c: ebffe1f9 bl 30001978 if (result != 0) 30009190: e3500000 cmp r0, #0 30009194: 1a00000c bne 300091cc return -1; jnode = next; 30009198: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 3000919c: e3540000 cmp r4, #0 300091a0: 0a00000b beq 300091d4 if ( jnode->type == IMFS_DIRECTORY ) { 300091a4: e594304c ldr r3, [r4, #76] ; 0x4c 300091a8: e3530001 cmp r3, #1 300091ac: 1affffe9 bne 30009158 if ( jnode_has_children( jnode ) ) 300091b0: e5943050 ldr r3, [r4, #80] ; 0x50 300091b4: e2842054 add r2, r4, #84 ; 0x54 300091b8: e1530002 cmp r3, r2 300091bc: 0affffe5 beq 30009158 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 300091c0: e2534000 subs r4, r3, #0 300091c4: 1affffe3 bne 30009158 300091c8: ea000001 b 300091d4 <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 300091cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 300091d0: ea000000 b 300091d8 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 300091d4: e1a00004 mov r0, r4 } 300091d8: e28dd014 add sp, sp, #20 300091dc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 30001594 : const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 30001594: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 30001598: e1a07003 mov r7, r3 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 3000159c: e59f30cc ldr r3, [pc, #204] ; 30001670 const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 300015a0: e1a0a001 mov sl, r1 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 300015a4: e5933000 ldr r3, [r3] const rtems_filesystem_operations_table *op_table, const rtems_filesystem_file_handlers_r *memfile_handlers, const rtems_filesystem_file_handlers_r *directory_handlers, const rtems_filesystem_file_handlers_r *fifo_handlers ) { 300015a8: e1a08002 mov r8, r2 300015ac: e1a04000 mov r4, r0 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, 300015b0: e3a01006 mov r1, #6 int bit_mask; /* * check, whether requested bytes per block is valid */ for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { 300015b4: e3a02010 mov r2, #16 300015b8: e1520003 cmp r2, r3 300015bc: 0a000003 beq 300015d0 300015c0: e2511001 subs r1, r1, #1 300015c4: e1a02082 lsl r2, r2, #1 300015c8: 1afffffa bne 300015b8 is_valid = true; } } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 300015cc: e3a03080 mov r3, #128 ; 0x80 <== NOT EXECUTED for (bit_mask = 16; !is_valid && (bit_mask <= 512); bit_mask <<= 1) { if (bit_mask == requested_bytes_per_block) { is_valid = true; } } *dest_bytes_per_block = ((is_valid) 300015d0: e59f609c ldr r6, [pc, #156] ; 30001674 300015d4: e5863000 str r3, [r6] /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 300015d8: eb001cfe bl 300089d8 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 300015dc: e59fe094 ldr lr, [pc, #148] ; 30001678 300015e0: e284c038 add ip, r4, #56 ; 0x38 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); 300015e4: e584001c str r0, [r4, #28] 300015e8: e1a05000 mov r5, r0 temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 300015ec: e8be000f ldm lr!, {r0, r1, r2, r3} 300015f0: e8ac000f stmia ip!, {r0, r1, r2, r3} 300015f4: e8be000f ldm lr!, {r0, r1, r2, r3} 300015f8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300015fc: e89e000f ldm lr, {r0, r1, r2, r3} * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; 30001600: e5847024 str r7, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = op_table; temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; 30001604: e88c000f stm ip, {r0, r1, r2, r3} * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); temp_mt_entry->mt_fs_root.handlers = directory_handlers; temp_mt_entry->mt_fs_root.ops = op_table; 30001608: e584a028 str sl, [r4, #40] ; 0x28 temp_mt_entry->pathconf_limits_and_options = IMFS_LIMITS_AND_OPTIONS; /* * Create custom file system data. */ fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); 3000160c: e3a00001 mov r0, #1 30001610: e3a01014 mov r1, #20 30001614: eb0001a0 bl 30001c9c if ( !fs_info ) { 30001618: e3500000 cmp r0, #0 3000161c: 1a000006 bne 3000163c free(temp_mt_entry->mt_fs_root.node_access); 30001620: e1a00005 mov r0, r5 <== NOT EXECUTED 30001624: eb000217 bl 30001e88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 30001628: eb002d57 bl 3000cb8c <__errno> <== NOT EXECUTED 3000162c: e3a0300c mov r3, #12 <== NOT EXECUTED 30001630: e5803000 str r3, [r0] <== NOT EXECUTED 30001634: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001638: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 3000163c: e5963004 ldr r3, [r6, #4] fs_info = calloc( 1, sizeof( IMFS_fs_info_t ) ); if ( !fs_info ) { free(temp_mt_entry->mt_fs_root.node_access); rtems_set_errno_and_return_minus_one(ENOMEM); } temp_mt_entry->fs_info = fs_info; 30001640: e5840034 str r0, [r4, #52] ; 0x34 fs_info->instance = imfs_instance++; fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; 30001644: e59d201c ldr r2, [sp, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 30001648: e5803000 str r3, [r0] 3000164c: e2833001 add r3, r3, #1 30001650: e5863004 str r3, [r6, #4] fs_info->ino_count = 1; 30001654: e3a03001 mov r3, #1 30001658: e9800108 stmib r0, {r3, r8} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 3000165c: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; 30001660: e5802010 str r2, [r0, #16] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 30001664: e5853038 str r3, [r5, #56] ; 0x38 return 0; 30001668: e3a00000 mov r0, #0 } 3000166c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 3000167c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 3000167c: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30001680: e5903000 ldr r3, [r0] int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30001684: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 30001688: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 3000168c: e1d333b4 ldrh r3, [r3, #52] ; 0x34 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30001690: e1a05001 mov r5, r1 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 30001694: e3530007 cmp r3, #7 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 30001698: e1a06002 mov r6, r2 /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 3000169c: 9a000002 bls 300016ac rtems_set_errno_and_return_minus_one( EMLINK ); 300016a0: eb002d39 bl 3000cb8c <__errno> 300016a4: e3a0301f mov r3, #31 300016a8: ea000012 b 300016f8 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 300016ac: e1a00002 mov r0, r2 300016b0: eb003125 bl 3000db4c 300016b4: e28d4004 add r4, sp, #4 300016b8: e1a01000 mov r1, r0 300016bc: e1a02004 mov r2, r4 300016c0: e28d3044 add r3, sp, #68 ; 0x44 300016c4: e1a00006 mov r0, r6 300016c8: eb001ee8 bl 30009270 new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 300016cc: e28d3028 add r3, sp, #40 ; 0x28 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 300016d0: e58d3000 str r3, [sp] 300016d4: e1a00005 mov r0, r5 300016d8: e3a01003 mov r1, #3 300016dc: e1a02004 mov r2, r4 300016e0: e59f3050 ldr r3, [pc, #80] ; 30001738 300016e4: eb001c6d bl 300088a0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 300016e8: e3500000 cmp r0, #0 300016ec: 1a000004 bne 30001704 rtems_set_errno_and_return_minus_one( ENOMEM ); 300016f0: eb002d25 bl 3000cb8c <__errno> <== NOT EXECUTED 300016f4: e3a0300c mov r3, #12 <== NOT EXECUTED 300016f8: e5803000 str r3, [r0] 300016fc: e3e00000 mvn r0, #0 30001700: ea00000a b 30001730 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30001704: e59d3028 ldr r3, [sp, #40] ; 0x28 IMFS_update_ctime( info.hard_link.link_node ); 30001708: e28d003c add r0, sp, #60 ; 0x3c rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 3000170c: e1d323b4 ldrh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 30001710: e3a01000 mov r1, #0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 30001714: e2822001 add r2, r2, #1 30001718: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 3000171c: eb000202 bl 30001f2c 30001720: e59d203c ldr r2, [sp, #60] ; 0x3c 30001724: e59d3028 ldr r3, [sp, #40] ; 0x28 return 0; 30001728: e3a00000 mov r0, #0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); 3000172c: e5832048 str r2, [r3, #72] ; 0x48 return 0; } 30001730: e28dd048 add sp, sp, #72 ; 0x48 30001734: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 3000b8b4 : #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000b8b4: e59f3110 ldr r3, [pc, #272] ; 3000b9cc MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000b8b8: e92d4df1 push {r0, r4, r5, r6, r7, r8, sl, fp, lr} #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000b8bc: e593b000 ldr fp, [r3] MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000b8c0: e1a05002 mov r5, r2 #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000b8c4: e1a0312b lsr r3, fp, #2 3000b8c8: e2832001 add r2, r3, #1 3000b8cc: e0020293 mul r2, r3, r2 3000b8d0: e2822001 add r2, r2, #1 3000b8d4: e0030392 mul r3, r2, r3 3000b8d8: e3a02000 mov r2, #0 3000b8dc: e2433001 sub r3, r3, #1 3000b8e0: e1520005 cmp r2, r5 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { 3000b8e4: e1a04000 mov r4, r0 3000b8e8: e1a06001 mov r6, r1 #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) 3000b8ec: e003039b mul r3, fp, r3 3000b8f0: ca000005 bgt 3000b90c 3000b8f4: 1a000001 bne 3000b900 3000b8f8: e1530001 cmp r3, r1 3000b8fc: 8a000002 bhi 3000b90c rtems_set_errno_and_return_minus_one( EINVAL ); 3000b900: eb0004a1 bl 3000cb8c <__errno> 3000b904: e3a03016 mov r3, #22 3000b908: ea000025 b 3000b9a4 if ( new_length <= the_jnode->info.file.size ) 3000b90c: e5948054 ldr r8, [r4, #84] ; 0x54 3000b910: e5947050 ldr r7, [r4, #80] ; 0x50 3000b914: e1550008 cmp r5, r8 3000b918: ca000002 bgt 3000b928 3000b91c: 1a000028 bne 3000b9c4 3000b920: e1560007 cmp r6, r7 3000b924: 9a000026 bls 3000b9c4 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b928: e1a0cfcb asr ip, fp, #31 3000b92c: e1a0300c mov r3, ip 3000b930: e1a0200b mov r2, fp 3000b934: e1a00006 mov r0, r6 3000b938: e1a01005 mov r1, r5 3000b93c: e58dc000 str ip, [sp] 3000b940: eb001538 bl 30010e28 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b944: e59dc000 ldr ip, [sp] 3000b948: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b94c: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b950: e1a0200b mov r2, fp 3000b954: e1a00007 mov r0, r7 3000b958: e1a0300c mov r3, ip 3000b95c: eb001531 bl 30010e28 <__divdi3> 3000b960: e1a08000 mov r8, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 3000b964: e1a07000 mov r7, r0 3000b968: ea000011 b 3000b9b4 if ( IMFS_memfile_addblock( the_jnode, block ) ) { 3000b96c: e1a00004 mov r0, r4 3000b970: e1a01007 mov r1, r7 3000b974: ebffff56 bl 3000b6d4 3000b978: e3500000 cmp r0, #0 3000b97c: 0a00000b beq 3000b9b0 3000b980: ea000003 b 3000b994 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); 3000b984: e1a01007 mov r1, r7 <== NOT EXECUTED 3000b988: e1a00004 mov r0, r4 <== NOT EXECUTED 3000b98c: ebffffbe bl 3000b88c <== NOT EXECUTED * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { if ( IMFS_memfile_addblock( the_jnode, block ) ) { for ( ; block>=old_blocks ; block-- ) { 3000b990: e2477001 sub r7, r7, #1 <== NOT EXECUTED 3000b994: e1570008 cmp r7, r8 <== NOT EXECUTED 3000b998: 2afffff9 bcs 3000b984 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); 3000b99c: eb00047a bl 3000cb8c <__errno> <== NOT EXECUTED 3000b9a0: e3a0301c mov r3, #28 <== NOT EXECUTED 3000b9a4: e5803000 str r3, [r0] 3000b9a8: e3e00000 mvn r0, #0 3000b9ac: ea000005 b 3000b9c8 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { 3000b9b0: e2877001 add r7, r7, #1 3000b9b4: e157000a cmp r7, sl 3000b9b8: 9affffeb bls 3000b96c /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; 3000b9bc: e5846050 str r6, [r4, #80] ; 0x50 3000b9c0: e5845054 str r5, [r4, #84] ; 0x54 if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) rtems_set_errno_and_return_minus_one( EINVAL ); if ( new_length <= the_jnode->info.file.size ) return 0; 3000b9c4: e3a00000 mov r0, #0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } 3000b9c8: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== 3000b2cc : /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000b2cc: e59f31dc ldr r3, [pc, #476] ; 3000b4b0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000b2d0: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000b2d4: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000b2d8: e1a04000 mov r4, r0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000b2dc: e1a05125 lsr r5, r5, #2 3000b2e0: e2453001 sub r3, r5, #1 3000b2e4: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { 3000b2e8: e1a06001 mov r6, r1 3000b2ec: e1a08002 mov r8, r2 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { 3000b2f0: 8a00000e bhi 3000b330 p = info->indirect; if ( malloc_it ) { 3000b2f4: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; 3000b2f8: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { 3000b2fc: 0a000007 beq 3000b320 if ( !p ) { 3000b300: e3500000 cmp r0, #0 3000b304: 1a000003 bne 3000b318 p = memfile_alloc_block(); 3000b308: ebffffe2 bl 3000b298 if ( !p ) 3000b30c: e3500000 cmp r0, #0 3000b310: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; 3000b314: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; 3000b318: e5940058 ldr r0, [r4, #88] ; 0x58 3000b31c: ea000001 b 3000b328 } if ( !p ) 3000b320: e3500000 cmp r0, #0 3000b324: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; 3000b328: e0800106 add r0, r0, r6, lsl #2 3000b32c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { 3000b330: e2853001 add r3, r5, #1 3000b334: e0030395 mul r3, r5, r3 3000b338: e2432001 sub r2, r3, #1 3000b33c: e1510002 cmp r1, r2 3000b340: 8a000021 bhi 3000b3cc #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; 3000b344: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000b348: e1a00006 mov r0, r6 3000b34c: e1a01005 mov r1, r5 3000b350: eb001454 bl 300104a8 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000b354: e1a01005 mov r1, r5 fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000b358: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000b35c: e1a00006 mov r0, r6 3000b360: eb0013b8 bl 30010248 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { 3000b364: e3580000 cmp r8, #0 #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000b368: e1a05000 mov r5, r0 p = info->doubly_indirect; 3000b36c: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { 3000b370: 0a00000e beq 3000b3b0 if ( !p ) { 3000b374: e3500000 cmp r0, #0 3000b378: 1a000003 bne 3000b38c p = memfile_alloc_block(); 3000b37c: ebffffc5 bl 3000b298 if ( !p ) 3000b380: e3500000 cmp r0, #0 3000b384: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; 3000b388: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; 3000b38c: e0804105 add r4, r0, r5, lsl #2 3000b390: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { 3000b394: e3500000 cmp r0, #0 3000b398: 1a000009 bne 3000b3c4 p1 = memfile_alloc_block(); 3000b39c: ebffffbd bl 3000b298 if ( !p1 ) 3000b3a0: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; 3000b3a4: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) 3000b3a8: 1a000005 bne 3000b3c4 3000b3ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) 3000b3b0: e3500000 cmp r0, #0 3000b3b4: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; 3000b3b8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) 3000b3bc: e3500000 cmp r0, #0 3000b3c0: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} #if 0 fprintf(stdout, "(d %d %d %d %d %p %p) ", block, my_block, doubly, singly, p, &p[singly] ); fflush(stdout); #endif return (block_p *)&p[ singly ]; 3000b3c4: e0800107 add r0, r0, r7, lsl #2 3000b3c8: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} #endif /* * Is the block number in the triply indirect portion? */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { 3000b3cc: e2832001 add r2, r3, #1 3000b3d0: e0020295 mul r2, r5, r2 3000b3d4: e2422001 sub r2, r2, #1 3000b3d8: e1510002 cmp r1, r2 3000b3dc: 8a000031 bhi 3000b4a8 my_block -= FIRST_TRIPLY_INDIRECT; 3000b3e0: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000b3e4: e1a00006 mov r0, r6 3000b3e8: e1a01005 mov r1, r5 3000b3ec: eb00142d bl 300104a8 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000b3f0: e1a01005 mov r1, r5 */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; 3000b3f4: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; 3000b3f8: e1a00006 mov r0, r6 3000b3fc: eb001391 bl 30010248 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000b400: 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; 3000b404: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; 3000b408: eb00138e bl 30010248 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000b40c: 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; 3000b410: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; 3000b414: e1a00006 mov r0, r6 3000b418: eb001422 bl 300104a8 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { 3000b41c: 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; 3000b420: e1a05000 mov r5, r0 p = info->triply_indirect; 3000b424: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { 3000b428: 0a000016 beq 3000b488 if ( !p ) { 3000b42c: e3500000 cmp r0, #0 3000b430: 1a000003 bne 3000b444 p = memfile_alloc_block(); 3000b434: ebffff97 bl 3000b298 if ( !p ) 3000b438: e3500000 cmp r0, #0 3000b43c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->triply_indirect = p; 3000b440: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; 3000b444: e0804107 add r4, r0, r7, lsl #2 3000b448: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { 3000b44c: e3500000 cmp r0, #0 3000b450: 1a000003 bne 3000b464 p1 = memfile_alloc_block(); 3000b454: ebffff8f bl 3000b298 if ( !p1 ) 3000b458: e3500000 cmp r0, #0 3000b45c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p[ triply ] = (block_p) p1; 3000b460: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; 3000b464: e0804105 add r4, r0, r5, lsl #2 3000b468: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { 3000b46c: e3500000 cmp r0, #0 3000b470: 1a00000a bne 3000b4a0 p2 = memfile_alloc_block(); 3000b474: ebffff87 bl 3000b298 if ( !p2 ) 3000b478: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; 3000b47c: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) 3000b480: 1a000006 bne 3000b4a0 3000b484: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) 3000b488: e3500000 cmp r0, #0 3000b48c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; 3000b490: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) 3000b494: e3500000 cmp r0, #0 3000b498: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; 3000b49c: e7900105 ldr r0, [r0, r5, lsl #2] 3000b4a0: e080010a add r0, r0, sl, lsl #2 3000b4a4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * This means the requested block number is out of range. */ return 0; 3000b4a8: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000b4ac: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 3000b4b4 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 3000b4b4: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Error checks on arguments */ if ( !dest ) 3000b4b8: e2537000 subs r7, r3, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { 3000b4bc: e1a04000 mov r4, r0 3000b4c0: e1a08001 mov r8, r1 3000b4c4: e1a09002 mov r9, r2 3000b4c8: e59d6034 ldr r6, [sp, #52] ; 0x34 /* * Error checks on arguments */ if ( !dest ) 3000b4cc: 0a000001 beq 3000b4d8 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) 3000b4d0: e3560000 cmp r6, #0 3000b4d4: 1a000004 bne 3000b4ec rtems_set_errno_and_return_minus_one( EINVAL ); 3000b4d8: eb0005ab bl 3000cb8c <__errno> <== NOT EXECUTED 3000b4dc: e3a03016 mov r3, #22 <== NOT EXECUTED 3000b4e0: e5803000 str r3, [r0] <== NOT EXECUTED 3000b4e4: e3e06000 mvn r6, #0 <== NOT EXECUTED 3000b4e8: ea00006b b 3000b69c <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { 3000b4ec: e590304c ldr r3, [r0, #76] ; 0x4c 3000b4f0: e3530006 cmp r3, #6 3000b4f4: 1a000012 bne 3000b544 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) 3000b4f8: e280b050 add fp, r0, #80 ; 0x50 3000b4fc: e89b0c00 ldm fp, {sl, fp} 3000b500: e1a0200a mov r2, sl 3000b504: e1a0300b mov r3, fp * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; 3000b508: e5901058 ldr r1, [r0, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) 3000b50c: e0522008 subs r2, r2, r8 3000b510: e0c33009 sbc r3, r3, r9 3000b514: e3a00000 mov r0, #0 3000b518: e1500003 cmp r0, r3 3000b51c: ca000002 bgt 3000b52c 3000b520: 1a000002 bne 3000b530 3000b524: e1560002 cmp r6, r2 3000b528: 9a000000 bls 3000b530 my_length = the_jnode->info.linearfile.size - start; 3000b52c: e068600a rsb r6, r8, sl memcpy(dest, &file_ptr[start], my_length); 3000b530: e1a00007 mov r0, r7 3000b534: e0811008 add r1, r1, r8 3000b538: e1a02006 mov r2, r6 3000b53c: eb0007c0 bl 3000d444 3000b540: ea000050 b 3000b688 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 3000b544: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) 3000b548: e5901054 ldr r1, [r0, #84] ; 0x54 3000b54c: e5905050 ldr r5, [r0, #80] ; 0x50 3000b550: e3a00000 mov r0, #0 3000b554: e1500001 cmp r0, r1 /* * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; 3000b558: e0862008 add r2, r6, r8 if ( last_byte > the_jnode->info.file.size ) 3000b55c: ca000002 bgt 3000b56c 3000b560: 1a000003 bne 3000b574 3000b564: e1520005 cmp r2, r5 3000b568: 9a000001 bls 3000b574 my_length = the_jnode->info.file.size - start; 3000b56c: e0635005 rsb r5, r3, r5 3000b570: ea000000 b 3000b578 * If the last byte we are supposed to read is past the end of this * in memory file, then shorten the length to read. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) 3000b574: e1a05006 mov r5, r6 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b578: e59f3128 ldr r3, [pc, #296] ; 3000b6a8 3000b57c: e1a00008 mov r0, r8 3000b580: e593b000 ldr fp, [r3] 3000b584: e1a01009 mov r1, r9 3000b588: e1a0200b mov r2, fp 3000b58c: e1a03fc2 asr r3, r2, #31 3000b590: e88d000c stm sp, {r2, r3} 3000b594: eb00175d bl 30011310 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b598: e89d000c ldm sp, {r2, r3} /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b59c: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b5a0: e1a01009 mov r1, r9 3000b5a4: e1a00008 mov r0, r8 3000b5a8: eb00161e bl 30010e28 <__divdi3> if ( start_offset ) { 3000b5ac: e3560000 cmp r6, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b5b0: e1a08000 mov r8, r0 if ( start_offset ) { 3000b5b4: 0a000012 beq 3000b604 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000b5b8: e1a00004 mov r0, r4 3000b5bc: e1a01008 mov r1, r8 3000b5c0: e3a02000 mov r2, #0 3000b5c4: ebffff40 bl 3000b2cc if ( !block_ptr ) 3000b5c8: e3500000 cmp r0, #0 return copied; 3000b5cc: 01a06000 moveq r6, r0 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 3000b5d0: 0a000031 beq 3000b69c return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 3000b5d4: e5901000 ldr r1, [r0] */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 3000b5d8: e066a00b rsb sl, r6, fp 3000b5dc: e155000a cmp r5, sl 3000b5e0: 31a0a005 movcc sl, r5 if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); 3000b5e4: e1a00007 mov r0, r7 3000b5e8: e0811006 add r1, r1, r6 3000b5ec: e1a0200a mov r2, sl 3000b5f0: eb000793 bl 3000d444 dest += to_copy; 3000b5f4: e087700a add r7, r7, sl block++; 3000b5f8: e2888001 add r8, r8, #1 my_length -= to_copy; 3000b5fc: e06a5005 rsb r5, sl, r5 copied += to_copy; 3000b600: e1a0600a mov r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 3000b604: e59f909c ldr r9, [pc, #156] ; 3000b6a8 3000b608: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 3000b60c: ea00000d b 3000b648 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000b610: e1a00004 mov r0, r4 3000b614: e1a01008 mov r1, r8 3000b618: e3a02000 mov r2, #0 3000b61c: ebffff2a bl 3000b2cc if ( !block_ptr ) 3000b620: e2503000 subs r3, r0, #0 3000b624: 0a00001c beq 3000b69c return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); 3000b628: e1a00007 mov r0, r7 3000b62c: e5931000 ldr r1, [r3] 3000b630: e1a0200a mov r2, sl 3000b634: eb000782 bl 3000d444 dest += to_copy; 3000b638: e087700a add r7, r7, sl block++; 3000b63c: e2888001 add r8, r8, #1 my_length -= to_copy; 3000b640: e06a5005 rsb r5, sl, r5 copied += to_copy; 3000b644: e086600a add r6, r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 3000b648: e5993000 ldr r3, [r9] 3000b64c: e1550003 cmp r5, r3 3000b650: 2affffee bcs 3000b610 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif if ( my_length ) { 3000b654: e3550000 cmp r5, #0 3000b658: 0a00000a beq 3000b688 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000b65c: e1a00004 mov r0, r4 3000b660: e1a01008 mov r1, r8 3000b664: e3a02000 mov r2, #0 3000b668: ebffff17 bl 3000b2cc if ( !block_ptr ) 3000b66c: e2503000 subs r3, r0, #0 3000b670: 0a000009 beq 3000b69c return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); 3000b674: e1a00007 mov r0, r7 3000b678: e5931000 ldr r1, [r3] 3000b67c: e1a02005 mov r2, r5 3000b680: eb00076f bl 3000d444 copied += my_length; 3000b684: e0856006 add r6, r5, r6 } IMFS_update_atime( the_jnode ); 3000b688: e28d0008 add r0, sp, #8 3000b68c: e3a01000 mov r1, #0 3000b690: ebffda25 bl 30001f2c 3000b694: e59d3008 ldr r3, [sp, #8] 3000b698: e5843040 str r3, [r4, #64] ; 0x40 return copied; } 3000b69c: e1a00006 mov r0, r6 3000b6a0: e28dd010 add sp, sp, #16 3000b6a4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000b780 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000b780: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 3000b784: e59f30fc ldr r3, [pc, #252] ; 3000b888 */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { 3000b788: e1a04000 mov r4, r0 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 3000b78c: e5935000 ldr r5, [r3] * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000b790: e5903058 ldr r3, [r0, #88] ; 0x58 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; 3000b794: e1a05125 lsr r5, r5, #2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { 3000b798: e3530000 cmp r3, #0 memfile_free_blocks_in_table( &info->indirect, to_free ); 3000b79c: 12800058 addne r0, r0, #88 ; 0x58 3000b7a0: 11a01005 movne r1, r5 3000b7a4: 1bffffe0 blne 3000b72c } if ( info->doubly_indirect ) { 3000b7a8: e594305c ldr r3, [r4, #92] ; 0x5c 3000b7ac: e3530000 cmp r3, #0 3000b7b0: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { 3000b7b8: 1a000008 bne 3000b7e0 3000b7bc: ea00000d b 3000b7f8 for ( i=0 ; idoubly_indirect[i] ) { 3000b7c0: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED 3000b7c4: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED 3000b7c8: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED 3000b7cc: e3520000 cmp r2, #0 <== NOT EXECUTED memfile_free_blocks_in_table( 3000b7d0: 10830000 addne r0, r3, r0 <== NOT EXECUTED 3000b7d4: 11a01005 movne r1, r5 <== NOT EXECUTED 3000b7d8: 1bffffd3 blne 3000b72c <== NOT EXECUTED memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { for ( i=0 ; i <== NOT EXECUTED if ( info->doubly_indirect[i] ) { memfile_free_blocks_in_table( (block_p **)&info->doubly_indirect[i], to_free ); } } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); 3000b7ec: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED 3000b7f0: e1a01005 mov r1, r5 <== NOT EXECUTED 3000b7f4: ebffffcc bl 3000b72c <== NOT EXECUTED } if ( info->triply_indirect ) { 3000b7f8: e5943060 ldr r3, [r4, #96] ; 0x60 3000b7fc: e3530000 cmp r3, #0 3000b800: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 3000b808: 1a000016 bne 3000b868 3000b80c: ea00001b b 3000b880 for ( i=0 ; itriply_indirect[i]; 3000b810: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { 3000b814: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; 3000b818: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ 3000b81c: e3580000 cmp r8, #0 <== NOT EXECUTED 3000b820: 0a000013 beq 3000b874 <== NOT EXECUTED * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( 3000b824: e2488004 sub r8, r8, #4 <== NOT EXECUTED 3000b828: e3a07000 mov r7, #0 <== NOT EXECUTED 3000b82c: ea000005 b 3000b848 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( info->triply_indirect ) { for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED if ( p[j] ) { memfile_free_blocks_in_table( (block_p **)&p[j], to_free); } } memfile_free_blocks_in_table( 3000b854: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED 3000b858: e1a01005 mov r1, r5 <== NOT EXECUTED 3000b85c: e0800009 add r0, r0, r9 <== NOT EXECUTED 3000b860: ebffffb1 bl 3000b72c <== NOT EXECUTED memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { for ( i=0 ; i <== NOT EXECUTED } } memfile_free_blocks_in_table( (block_p **)&info->triply_indirect[i], to_free ); } memfile_free_blocks_in_table( 3000b874: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED 3000b878: e1a01005 mov r1, r5 <== NOT EXECUTED 3000b87c: ebffffaa bl 3000b72c <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } 3000b880: e3a00000 mov r0, #0 3000b884: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 3000b88c : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { 3000b88c: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED block_p *block_ptr; block_p ptr; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000b890: e3a02000 mov r2, #0 <== NOT EXECUTED 3000b894: ebfffe8c bl 3000b2cc <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { 3000b898: e2503000 subs r3, r0, #0 <== NOT EXECUTED ptr = *block_ptr; *block_ptr = 0; 3000b89c: 13a02000 movne r2, #0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { ptr = *block_ptr; 3000b8a0: 15930000 ldrne r0, [r3] <== NOT EXECUTED *block_ptr = 0; 3000b8a4: 15832000 strne r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); 3000b8a8: 1bffff97 blne 3000b70c <== NOT EXECUTED } return 1; } 3000b8ac: e3a00001 mov r0, #1 <== NOT EXECUTED 3000b8b0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 3000b9d0 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000b9d0: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Error check arguments */ if ( !source ) 3000b9d4: e2538000 subs r8, r3, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { 3000b9d8: e1a04000 mov r4, r0 3000b9dc: e1a07001 mov r7, r1 3000b9e0: e1a0a002 mov sl, r2 3000b9e4: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Error check arguments */ if ( !source ) 3000b9e8: 0a000001 beq 3000b9f4 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) 3000b9ec: e3550000 cmp r5, #0 3000b9f0: 1a000002 bne 3000ba00 rtems_set_errno_and_return_minus_one( EINVAL ); 3000b9f4: eb000464 bl 3000cb8c <__errno> <== NOT EXECUTED 3000b9f8: e3a03016 mov r3, #22 <== NOT EXECUTED 3000b9fc: ea00000e b 3000ba3c <== NOT EXECUTED * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; if ( last_byte > the_jnode->info.file.size ) { 3000ba00: e5903054 ldr r3, [r0, #84] ; 0x54 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; 3000ba04: e0851001 add r1, r5, r1 if ( last_byte > the_jnode->info.file.size ) { 3000ba08: e3530000 cmp r3, #0 3000ba0c: ba000003 blt 3000ba20 3000ba10: 1a00000c bne 3000ba48 3000ba14: e5903050 ldr r3, [r0, #80] ; 0x50 3000ba18: e1530001 cmp r3, r1 3000ba1c: 2a000009 bcs 3000ba48 status = IMFS_memfile_extend( the_jnode, last_byte ); 3000ba20: e1a00004 mov r0, r4 3000ba24: e3a02000 mov r2, #0 3000ba28: ebffffa1 bl 3000b8b4 if ( status ) 3000ba2c: e3500000 cmp r0, #0 3000ba30: 0a000004 beq 3000ba48 rtems_set_errno_and_return_minus_one( ENOSPC ); 3000ba34: eb000454 bl 3000cb8c <__errno> 3000ba38: e3a0301c mov r3, #28 3000ba3c: e5803000 str r3, [r0] 3000ba40: e3e06000 mvn r6, #0 3000ba44: ea00004d b 3000bb80 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ba48: e59f3138 ldr r3, [pc, #312] ; 3000bb88 3000ba4c: e1a00007 mov r0, r7 3000ba50: e5939000 ldr r9, [r3] 3000ba54: e1a0100a mov r1, sl 3000ba58: e1a0b009 mov fp, r9 3000ba5c: e1a0cfcb asr ip, fp, #31 3000ba60: e1a0300c mov r3, ip 3000ba64: e1a0200b mov r2, fp 3000ba68: e58dc000 str ip, [sp] 3000ba6c: eb001627 bl 30011310 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ba70: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ba74: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ba78: e1a0100a mov r1, sl 3000ba7c: e1a00007 mov r0, r7 3000ba80: e1a0200b mov r2, fp 3000ba84: e1a0300c mov r3, ip 3000ba88: eb0014e6 bl 30010e28 <__divdi3> if ( start_offset ) { 3000ba8c: e3560000 cmp r6, #0 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; 3000ba90: e1a07000 mov r7, r0 if ( start_offset ) { 3000ba94: 0a000012 beq 3000bae4 to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000ba98: e1a00004 mov r0, r4 3000ba9c: e1a01007 mov r1, r7 3000baa0: e3a02000 mov r2, #0 3000baa4: ebfffe08 bl 3000b2cc if ( !block_ptr ) 3000baa8: e3500000 cmp r0, #0 return copied; 3000baac: 01a06000 moveq r6, r0 if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; if ( to_copy > my_length ) to_copy = my_length; block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); if ( !block_ptr ) 3000bab0: 0a000032 beq 3000bb80 */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 3000bab4: e066a009 rsb sl, r6, r9 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 3000bab8: e5900000 ldr r0, [r0] */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; if ( start_offset ) { to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK - start_offset; 3000babc: e15a0005 cmp sl, r5 3000bac0: 21a0a005 movcs sl, r5 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); 3000bac4: e0800006 add r0, r0, r6 3000bac8: e1a01008 mov r1, r8 3000bacc: e1a0200a mov r2, sl 3000bad0: eb00065b bl 3000d444 src += to_copy; 3000bad4: e088800a add r8, r8, sl block++; 3000bad8: e2877001 add r7, r7, #1 my_length -= to_copy; 3000badc: e06a5005 rsb r5, sl, r5 copied += to_copy; 3000bae0: e1a0600a mov r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; 3000bae4: e59f909c ldr r9, [pc, #156] ; 3000bb88 3000bae8: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 3000baec: ea00000d b 3000bb28 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000baf0: e1a00004 mov r0, r4 3000baf4: e1a01007 mov r1, r7 3000baf8: e3a02000 mov r2, #0 3000bafc: ebfffdf2 bl 3000b2cc if ( !block_ptr ) 3000bb00: e3500000 cmp r0, #0 3000bb04: 0a00001d beq 3000bb80 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, to_copy ); 3000bb08: e1a01008 mov r1, r8 3000bb0c: e5900000 ldr r0, [r0] 3000bb10: e1a0200a mov r2, sl 3000bb14: eb00064a bl 3000d444 src += to_copy; 3000bb18: e088800a add r8, r8, sl block++; 3000bb1c: e2877001 add r7, r7, #1 my_length -= to_copy; 3000bb20: e06a5005 rsb r5, sl, r5 * * This routine writes the specified data buffer into the in memory * file pointed to by the_jnode. The file is extended as needed. */ MEMFILE_STATIC ssize_t IMFS_memfile_write( 3000bb24: e086600a add r6, r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { 3000bb28: e5993000 ldr r3, [r9] 3000bb2c: e1550003 cmp r5, r3 3000bb30: 2affffee bcs 3000baf0 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif to_copy = my_length; if ( my_length ) { 3000bb34: e3550000 cmp r5, #0 3000bb38: 0a00000a beq 3000bb68 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); 3000bb3c: e1a00004 mov r0, r4 3000bb40: e1a01007 mov r1, r7 3000bb44: e3a02000 mov r2, #0 3000bb48: ebfffddf bl 3000b2cc if ( !block_ptr ) 3000bb4c: e3500000 cmp r0, #0 3000bb50: 0a00000a beq 3000bb80 return copied; #if 0 fprintf(stdout, "write %d in %d: %*s\n", to_copy, block, to_copy, src ); #endif memcpy( &(*block_ptr)[ 0 ], src, my_length ); 3000bb54: e5900000 ldr r0, [r0] 3000bb58: e1a01008 mov r1, r8 3000bb5c: e1a02005 mov r2, r5 3000bb60: eb000637 bl 3000d444 my_length = 0; copied += to_copy; 3000bb64: e0866005 add r6, r6, r5 } IMFS_mtime_ctime_update( the_jnode ); 3000bb68: e28d0004 add r0, sp, #4 3000bb6c: e3a01000 mov r1, #0 3000bb70: ebffd8ed bl 30001f2c 3000bb74: e59d3004 ldr r3, [sp, #4] 3000bb78: e5843044 str r3, [r4, #68] ; 0x44 3000bb7c: e5843048 str r3, [r4, #72] ; 0x48 return copied; } 3000bb80: e1a00006 mov r0, r6 3000bb84: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000173c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 3000173c: e92d40f0 push {r4, r5, r6, r7, lr} 30001740: e24dd040 sub sp, sp, #64 ; 0x40 30001744: e1a04001 mov r4, r1 30001748: e1a07000 mov r7, r0 3000174c: e1a06002 mov r6, r2 30001750: e1a05003 mov r5, r3 IMFS_jnode_t *new_node; int result; char new_name[ IMFS_NAME_MAX + 1 ]; IMFS_types_union info; IMFS_get_token( token, strlen( token ), new_name, &result ); 30001754: eb0030fc bl 3000db4c 30001758: e28d303c add r3, sp, #60 ; 0x3c 3000175c: e1a01000 mov r1, r0 30001760: e28d2004 add r2, sp, #4 30001764: e1a00007 mov r0, r7 30001768: eb001ec0 bl 30009270 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 3000176c: e2043a0f and r3, r4, #61440 ; 0xf000 30001770: e3530901 cmp r3, #16384 ; 0x4000 30001774: 0a00000d beq 300017b0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 30001778: e3530902 cmp r3, #32768 ; 0x8000 3000177c: 0a00000d beq 300017b8 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 30001780: e3530a06 cmp r3, #24576 ; 0x6000 30001784: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 30001788: 058d6028 streq r6, [sp, #40] ; 0x28 3000178c: 058d502c streq r5, [sp, #44] ; 0x2c if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; 30001790: 03a01002 moveq r1, #2 */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 30001794: 0a000008 beq 300017bc type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 30001798: e3530a01 cmp r3, #4096 ; 0x1000 type = IMFS_FIFO; 3000179c: 03a01007 moveq r1, #7 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 300017a0: 0a000005 beq 300017bc type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 300017a4: eb002cf8 bl 3000cb8c <__errno> <== NOT EXECUTED 300017a8: e3a03016 mov r3, #22 <== NOT EXECUTED 300017ac: ea00000d b 300017e8 <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 300017b0: e3a01001 mov r1, #1 300017b4: ea000000 b 300017bc else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 300017b8: e3a01005 mov r1, #5 new_node = IMFS_create_node( pathloc, type, new_name, mode, &info 300017bc: e28d3028 add r3, sp, #40 ; 0x28 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 300017c0: e58d3000 str r3, [sp] 300017c4: e59d0054 ldr r0, [sp, #84] ; 0x54 300017c8: e28d2004 add r2, sp, #4 300017cc: e1a03004 mov r3, r4 300017d0: eb001c32 bl 300088a0 new_name, mode, &info ); if ( !new_node ) 300017d4: e3500000 cmp r0, #0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 300017d8: 13a00000 movne r0, #0 new_name, mode, &info ); if ( !new_node ) 300017dc: 1a000003 bne 300017f0 rtems_set_errno_and_return_minus_one( ENOMEM ); 300017e0: eb002ce9 bl 3000cb8c <__errno> 300017e4: e3a0300c mov r3, #12 300017e8: e5803000 str r3, [r0] 300017ec: e3e00000 mvn r0, #0 return 0; } 300017f0: e28dd040 add sp, sp, #64 ; 0x40 300017f4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 300017f8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 300017f8: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 300017fc: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30001800: e593204c ldr r2, [r3, #76] ; 0x4c 30001804: e3520001 cmp r2, #1 30001808: 0a000004 beq 30001820 rtems_set_errno_and_return_minus_one( ENOTDIR ); 3000180c: eb002cde bl 3000cb8c <__errno> <== NOT EXECUTED 30001810: e3a03014 mov r3, #20 <== NOT EXECUTED 30001814: e5803000 str r3, [r0] <== NOT EXECUTED 30001818: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000181c: 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; 30001820: e583005c str r0, [r3, #92] ; 0x5c return 0; 30001824: e3a00000 mov r0, #0 } 30001828: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 300038f0 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 300038f0: e92d4030 push {r4, r5, lr} #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 300038f4: e59f50e0 ldr r5, [pc, #224] ; 300039dc */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 300038f8: e1a04000 mov r4, r0 #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 300038fc: e5953000 ldr r3, [r5] 30003900: e280000c add r0, r0, #12 30003904: e5931008 ldr r1, [r3, #8] 30003908: eb0033e3 bl 3001089c switch( the_jnode->type ) { 3000390c: e594204c ldr r2, [r4, #76] ; 0x4c 30003910: e2423001 sub r3, r2, #1 30003914: e3530006 cmp r3, #6 30003918: 979ff103 ldrls pc, [pc, r3, lsl #2] 3000391c: ea000026 b 300039bc <== NOT EXECUTED 30003920: 3000393c .word 0x3000393c <== NOT EXECUTED 30003924: 30003950 .word 0x30003950 <== NOT EXECUTED 30003928: 3000399c .word 0x3000399c <== NOT EXECUTED 3000392c: 3000399c .word 0x3000399c <== NOT EXECUTED 30003930: 30003984 .word 0x30003984 <== NOT EXECUTED 30003934: 30003968 .word 0x30003968 <== NOT EXECUTED 30003938: 300039a8 .word 0x300039a8 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 3000393c: e5953000 ldr r3, [r5] 30003940: e3a0002f mov r0, #47 ; 0x2f 30003944: e5931008 ldr r1, [r3, #8] 30003948: eb00339e bl 300107c8 break; 3000394c: ea00001f b 300039d0 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 30003950: e5953000 ldr r3, [r5] 30003954: e59f1084 ldr r1, [pc, #132] ; 300039e0 30003958: e5930008 ldr r0, [r3, #8] 3000395c: e5942050 ldr r2, [r4, #80] ; 0x50 30003960: e5943054 ldr r3, [r4, #84] ; 0x54 30003964: ea000004 b 3000397c the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 30003968: e5953000 ldr r3, [r5] <== NOT EXECUTED 3000396c: e59f1070 ldr r1, [pc, #112] ; 300039e4 <== NOT EXECUTED 30003970: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30003974: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 30003978: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3000397c: eb003371 bl 30010748 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 30003980: ea000012 b 300039d0 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 30003984: e5953000 ldr r3, [r5] <== NOT EXECUTED 30003988: e59f1058 ldr r1, [pc, #88] ; 300039e8 <== NOT EXECUTED 3000398c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 30003990: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 30003994: eb00336b bl 30010748 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; 30003998: ea00000c b 300039d0 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3000399c: e5953000 ldr r3, [r5] <== NOT EXECUTED 300039a0: e59f0044 ldr r0, [pc, #68] ; 300039ec <== NOT EXECUTED 300039a4: ea000001 b 300039b0 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 300039a8: e5953000 ldr r3, [r5] <== NOT EXECUTED 300039ac: e59f003c ldr r0, [pc, #60] ; 300039f0 <== NOT EXECUTED 300039b0: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 300039b4: 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" ); 300039b8: ea0033b7 b 3001089c <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 300039bc: e5953000 ldr r3, [r5] <== NOT EXECUTED 300039c0: e59f102c ldr r1, [pc, #44] ; 300039f4 <== NOT EXECUTED 300039c4: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 300039c8: 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 ); 300039cc: ea00335d b 30010748 <== NOT EXECUTED return; } puts(""); 300039d0: e59f0020 ldr r0, [pc, #32] ; 300039f8 } 300039d4: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 300039d8: ea003aa3 b 3001246c =============================================================================== 30001838 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 30001838: e5903000 ldr r3, [r0] int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 3000183c: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 30001840: e593004c ldr r0, [r3, #76] ; 0x4c 30001844: e3500004 cmp r0, #4 30001848: 03a00000 moveq r0, #0 3000184c: 0a000006 beq 3000186c rtems_set_errno_and_return_minus_one( EINVAL ); 30001850: eb002ccd bl 3000cb8c <__errno> <== NOT EXECUTED 30001854: e3a03016 mov r3, #22 <== NOT EXECUTED 30001858: e5803000 str r3, [r0] <== NOT EXECUTED 3000185c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001860: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) buf[i] = node->info.sym_link.name[i]; 30001864: e7c1c000 strb ip, [r1, r0] node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) rtems_set_errno_and_return_minus_one( EINVAL ); for( i=0; ((iinfo.sym_link.name[i] != '\0')); i++ ) 30001868: e2800001 add r0, r0, #1 3000186c: e1500002 cmp r0, r2 30001870: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 30001874: e593c050 ldr ip, [r3, #80] ; 0x50 30001878: e7dcc000 ldrb ip, [ip, r0] 3000187c: e35c0000 cmp ip, #0 30001880: 1afffff7 bne 30001864 buf[i] = node->info.sym_link.name[i]; return i; } 30001884: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30001888 : rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 30001888: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; 3000188c: e5914000 ldr r4, [r1] <== NOT EXECUTED rtems_filesystem_location_info_t *old_parent_loc, /* IN */ rtems_filesystem_location_info_t *old_loc, /* IN */ rtems_filesystem_location_info_t *new_parent_loc, /* IN */ const char *new_name /* IN */ ) { 30001890: e1a05002 mov r5, r2 <== NOT EXECUTED IMFS_jnode_t *the_jnode; IMFS_jnode_t *new_parent; the_jnode = old_loc->node_access; strncpy( the_jnode->name, new_name, IMFS_NAME_MAX ); 30001894: e1a01003 mov r1, r3 <== NOT EXECUTED 30001898: e284000c add r0, r4, #12 <== NOT EXECUTED 3000189c: e3a02020 mov r2, #32 <== NOT EXECUTED 300018a0: eb0030c1 bl 3000dbac <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 300018a4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 300018a8: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 300018ac: 11a00004 movne r0, r4 <== NOT EXECUTED 300018b0: 1b001043 blne 300059c4 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 300018b4: e5950000 ldr r0, [r5] <== NOT EXECUTED RTEMS_INLINE_ROUTINE void rtems_chain_append( rtems_chain_control *the_chain, rtems_chain_node *the_node ) { _Chain_Append( the_chain, the_node ); 300018b8: e1a01004 mov r1, r4 <== NOT EXECUTED the_jnode->Parent = new_parent; 300018bc: e5840008 str r0, [r4, #8] <== NOT EXECUTED 300018c0: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED 300018c4: eb001033 bl 30005998 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 300018c8: e1a0000d mov r0, sp <== NOT EXECUTED 300018cc: e3a01000 mov r1, #0 <== NOT EXECUTED 300018d0: eb000195 bl 30001f2c <== NOT EXECUTED 300018d4: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 300018d8: e3a00000 mov r0, #0 <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 300018dc: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 300018e0: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 30009418 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 30009418: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000941c: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 30009420: e593204c ldr r2, [r3, #76] ; 0x4c 30009424: e2422002 sub r2, r2, #2 30009428: e3520005 cmp r2, #5 3000942c: 979ff102 ldrls pc, [pc, r2, lsl #2] 30009430: ea000012 b 30009480 <== NOT EXECUTED 30009434: 3000944c .word 0x3000944c <== NOT EXECUTED 30009438: 30009480 .word 0x30009480 <== NOT EXECUTED 3000943c: 3000946c .word 0x3000946c <== NOT EXECUTED 30009440: 30009460 .word 0x30009460 <== NOT EXECUTED 30009444: 30009460 .word 0x30009460 <== NOT EXECUTED 30009448: 3000946c .word 0x3000946c <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 3000944c: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 30009450: e593c050 ldr ip, [r3, #80] ; 0x50 30009454: e581201c str r2, [r1, #28] 30009458: e581c018 str ip, [r1, #24] break; 3000945c: ea00000c b 30009494 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 30009460: e283c050 add ip, r3, #80 ; 0x50 30009464: e89c1800 ldm ip, {fp, ip} 30009468: ea000001 b 30009474 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 3000946c: e3a0b000 mov fp, #0 30009470: e3a0c000 mov ip, #0 30009474: e581b020 str fp, [r1, #32] 30009478: e581c024 str ip, [r1, #36] ; 0x24 break; 3000947c: ea000004 b 30009494 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 30009480: eb000dc1 bl 3000cb8c <__errno> <== NOT EXECUTED 30009484: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30009488: e5803000 str r3, [r0] <== NOT EXECUTED 3000948c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30009490: e8bd8800 pop {fp, pc} <== NOT EXECUTED /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; 30009494: e5902010 ldr r2, [r0, #16] 30009498: e59f0050 ldr r0, [pc, #80] ; 300094f0 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 3000949c: e5922034 ldr r2, [r2, #52] ; 0x34 300094a0: 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 = 300094a4: e8810005 stm r1, {r0, r2} rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 300094a8: 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; 300094ac: 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; 300094b0: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 300094b4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 300094b8: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 300094bc: e5932038 ldr r2, [r3, #56] ; 0x38 300094c0: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 300094c4: e1d323bc ldrh r2, [r3, #60] ; 0x3c 300094c8: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 300094cc: e1d323be ldrh r2, [r3, #62] ; 0x3e 300094d0: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 300094d4: e5932040 ldr r2, [r3, #64] ; 0x40 300094d8: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 300094dc: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; 300094e0: 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; 300094e4: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 300094e8: e5813038 str r3, [r1, #56] ; 0x38 return 0; } 300094ec: e8bd8800 pop {fp, pc} =============================================================================== 300018e4 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 300018e4: e92d40f0 push {r4, r5, r6, r7, lr} 300018e8: e1a05000 mov r5, r0 300018ec: e24dd040 sub sp, sp, #64 ; 0x40 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 300018f0: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 300018f4: e1a06001 mov r6, r1 300018f8: e1a07002 mov r7, r2 int i; /* * Remove any separators at the end of the string. */ IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); 300018fc: eb003092 bl 3000db4c 30001900: e28d4004 add r4, sp, #4 30001904: e1a01000 mov r1, r0 30001908: e1a02004 mov r2, r4 3000190c: e28d303c add r3, sp, #60 ; 0x3c 30001910: e1a00007 mov r0, r7 30001914: eb001e55 bl 30009270 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30001918: e1a00006 mov r0, r6 3000191c: eb003076 bl 3000dafc if (info.sym_link.name == NULL) { 30001920: e3500000 cmp r0, #0 IMFS_get_token( node_name, strlen( node_name ), new_name, &i ); /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 30001924: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 30001928: 0a00000b beq 3000195c new_node = IMFS_create_node( parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 3000192c: e28d3028 add r3, sp, #40 ; 0x28 * was ONLY passed a NULL when we created the root node. We * added a new IMFS_create_root_node() so this path no longer * existed. The result was simpler code which should not have * this path. */ new_node = IMFS_create_node( 30001930: e58d3000 str r3, [sp] 30001934: e1a00005 mov r0, r5 30001938: e3a01004 mov r1, #4 3000193c: e1a02004 mov r2, r4 30001940: e59f302c ldr r3, [pc, #44] ; 30001974 30001944: eb001bd5 bl 300088a0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30001948: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 3000194c: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 30001950: 1a000005 bne 3000196c free(info.sym_link.name); 30001954: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 30001958: eb00014a bl 30001e88 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 3000195c: eb002c8a bl 3000cb8c <__errno> <== NOT EXECUTED 30001960: e3a0300c mov r3, #12 <== NOT EXECUTED 30001964: e5803000 str r3, [r0] <== NOT EXECUTED 30001968: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 3000196c: e28dd040 add sp, sp, #64 ; 0x40 30001970: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30001978 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30001978: 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; 3000197c: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30001980: e24dd01c sub sp, sp, #28 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30001984: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30001988: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 3000198c: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 30001990: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 30001994: 1a000024 bne 30001a2c if ( !node->info.hard_link.link_node ) 30001998: e595e050 ldr lr, [r5, #80] ; 0x50 3000199c: e35e0000 cmp lr, #0 300019a0: 1a000003 bne 300019b4 rtems_set_errno_and_return_minus_one( EINVAL ); 300019a4: eb002c78 bl 3000cb8c <__errno> <== NOT EXECUTED 300019a8: e3a03016 mov r3, #22 <== NOT EXECUTED 300019ac: e5803000 str r3, [r0] <== NOT EXECUTED 300019b0: ea000023 b 30001a44 <== NOT EXECUTED the_link = *loc; 300019b4: e1a0c00d mov ip, sp 300019b8: e1a07001 mov r7, r1 300019bc: e8b7000f ldm r7!, {r0, r1, r2, r3} 300019c0: e8ac000f stmia ip!, {r0, r1, r2, r3} 300019c4: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; 300019c8: e28d701c add r7, sp, #28 300019cc: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); 300019d0: 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; 300019d4: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 300019d8: eb001c0e bl 30008a18 /* * 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) 300019dc: e5953050 ldr r3, [r5, #80] ; 0x50 300019e0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 300019e4: e3520001 cmp r2, #1 300019e8: 1a000007 bne 30001a0c { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 300019ec: e1a00006 mov r0, r6 300019f0: e1a0100d mov r1, sp 300019f4: e59d3008 ldr r3, [sp, #8] 300019f8: e1a0e00f mov lr, pc 300019fc: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 30001a00: e3500000 cmp r0, #0 30001a04: 0a000008 beq 30001a2c 30001a08: ea00000d b 30001a44 return -1; } else { node->info.hard_link.link_node->st_nlink --; 30001a0c: e2422001 sub r2, r2, #1 30001a10: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 30001a14: e28d0014 add r0, sp, #20 30001a18: e3a01000 mov r1, #0 30001a1c: eb000142 bl 30001f2c 30001a20: e5953050 ldr r3, [r5, #80] ; 0x50 30001a24: e59d2014 ldr r2, [sp, #20] 30001a28: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 30001a2c: e5943008 ldr r3, [r4, #8] 30001a30: e1a00006 mov r0, r6 30001a34: e1a01004 mov r1, r4 30001a38: e1a0e00f mov lr, pc 30001a3c: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 30001a40: ea000000 b 30001a48 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 30001a44: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 30001a48: e28dd01c add sp, sp, #28 30001a4c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30001a50 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 30001a50: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 30001a54: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 30001a58: e593204c ldr r2, [r3, #76] ; 0x4c 30001a5c: e3520001 cmp r2, #1 30001a60: 0a000002 beq 30001a70 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30001a64: eb002c48 bl 3000cb8c <__errno> <== NOT EXECUTED 30001a68: e3a03014 mov r3, #20 <== NOT EXECUTED 30001a6c: ea000004 b 30001a84 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 30001a70: e593205c ldr r2, [r3, #92] ; 0x5c 30001a74: e3520000 cmp r2, #0 30001a78: 1a000004 bne 30001a90 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 30001a7c: eb002c42 bl 3000cb8c <__errno> <== NOT EXECUTED 30001a80: e3a03016 mov r3, #22 <== NOT EXECUTED 30001a84: e5803000 str r3, [r0] <== NOT EXECUTED 30001a88: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001a8c: 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; 30001a90: e3a00000 mov r0, #0 30001a94: e583005c str r0, [r3, #92] ; 0x5c return 0; } 30001a98: 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: e92d47ff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, lr}<== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { (*print_handler)( 3000154c: e5908008 ldr r8, [r0, #8] <== NOT EXECUTED 30001550: e59f4070 ldr r4, [pc, #112] ; 300015c8 <== NOT EXECUTED static rtems_printk_plugin_t print_handler; void Stack_check_Dump_threads_usage( Thread_Control *the_thread ) { 30001554: e1a05000 mov r5, r0 <== NOT EXECUTED current = 0; } else #else { stack = &the_thread->Start.Initial_stack; current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); 30001558: e59060f4 ldr r6, [r0, #244] ; 0xf4 <== NOT EXECUTED } #endif low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 3000155c: e59090c4 ldr r9, [r0, #196] ; 0xc4 <== NOT EXECUTED used = Stack_check_Calculate_used( low, size, high_water_mark ); else used = 0; if ( the_thread ) { (*print_handler)( 30001560: e28d2008 add r2, sp, #8 <== NOT EXECUTED 30001564: e1a00008 mov r0, r8 <== NOT EXECUTED 30001568: e3a01005 mov r1, #5 <== NOT EXECUTED 3000156c: e8940480 ldm r4, {r7, sl} <== NOT EXECUTED 30001570: eb000ecc bl 300050a8 <== NOT EXECUTED 30001574: e1a02008 mov r2, r8 <== NOT EXECUTED 30001578: e1a03000 mov r3, r0 <== NOT EXECUTED 3000157c: e59f1048 ldr r1, [pc, #72] ; 300015cc <== NOT EXECUTED 30001580: e1a0000a mov r0, sl <== NOT EXECUTED 30001584: e1a0e00f mov lr, pc <== NOT EXECUTED 30001588: e12fff17 bx r7 <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 3000158c: e59530c4 ldr r3, [r5, #196] ; 0xc4 <== NOT EXECUTED 30001590: e59520c8 ldr r2, [r5, #200] ; 0xc8 <== NOT EXECUTED current = (void *)_CPU_Context_Get_SP( &the_thread->Registers ); } #endif low = Stack_check_usable_stack_start(stack); size = Stack_check_usable_stack_size(stack); 30001594: e2499010 sub r9, r9, #16 <== NOT EXECUTED (*print_handler)( print_context, " %010p - %010p %010p %8" PRId32 " ", stack->area, stack->area + stack->size - 1, 30001598: e2433001 sub r3, r3, #1 <== NOT EXECUTED ); } else { (*print_handler)( print_context, "0x%08" PRIx32 " INTR", ~0 ); } (*print_handler)( 3000159c: e88d0240 stm sp, {r6, r9} <== NOT EXECUTED 300015a0: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 300015a4: e59f1024 ldr r1, [pc, #36] ; 300015d0 <== NOT EXECUTED 300015a8: e0823003 add r3, r2, r3 <== NOT EXECUTED 300015ac: e1a0e00f mov lr, pc <== NOT EXECUTED 300015b0: e594f000 ldr pc, [r4] <== NOT EXECUTED current, size ); if (Stack_check_Initialized == 0) { (*print_handler)( print_context, "Unavailable\n" ); 300015b4: e5940004 ldr r0, [r4, #4] <== NOT EXECUTED 300015b8: e59f1014 ldr r1, [pc, #20] ; 300015d4 <== NOT EXECUTED 300015bc: e1a0e00f mov lr, pc <== NOT EXECUTED 300015c0: e594f000 ldr pc, [r4] <== NOT EXECUTED } else { (*print_handler)( print_context, "%8" PRId32 "\n", used ); } } 300015c4: e8bd87ff pop {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, pc}<== NOT EXECUTED =============================================================================== 300015d8 : Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; } 300015d8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30001620 : Thread_Control *running, bool pattern_ok ) RTEMS_COMPILER_NO_RETURN_ATTRIBUTE; void Stack_check_report_blown_task(Thread_Control *running, bool pattern_ok) { 30001620: e92d40ff push {r0, r1, r2, r3, r4, r5, r6, r7, lr} <== NOT EXECUTED 30001624: e1a06000 mov r6, r0 <== NOT EXECUTED Stack_Control *stack = &running->Start.Initial_stack; void *pattern_area = Stack_check_Get_pattern_area(stack); 30001628: e59040c8 ldr r4, [r0, #200] ; 0xc8 <== NOT EXECUTED char name [32]; printk("BLOWN STACK!!!\n"); 3000162c: e59f0078 ldr r0, [pc, #120] ; 300016ac <== 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) { 30001630: 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"); 30001634: eb00060b bl 30002e68 <== NOT EXECUTED printk("task control block: 0x%08" PRIxPTR "\n", running); 30001638: e59f0070 ldr r0, [pc, #112] ; 300016b0 <== NOT EXECUTED 3000163c: e1a01006 mov r1, r6 <== NOT EXECUTED 30001640: eb000608 bl 30002e68 <== NOT EXECUTED printk("task ID: 0x%08lx\n", (unsigned long) running->Object.id); 30001644: e59f0068 ldr r0, [pc, #104] ; 300016b4 <== NOT EXECUTED 30001648: e5961008 ldr r1, [r6, #8] <== NOT EXECUTED 3000164c: eb000605 bl 30002e68 <== NOT EXECUTED printk( 30001650: e59f0060 ldr r0, [pc, #96] ; 300016b8 <== NOT EXECUTED 30001654: e596100c ldr r1, [r6, #12] <== NOT EXECUTED 30001658: eb000602 bl 30002e68 <== NOT EXECUTED "task name: 0x%08" PRIx32 "\n", running->Object.name.name_u32 ); printk( 3000165c: e1a0200d mov r2, sp <== NOT EXECUTED 30001660: e3a01020 mov r1, #32 <== NOT EXECUTED 30001664: e5960008 ldr r0, [r6, #8] <== NOT EXECUTED 30001668: eb000e8e bl 300050a8 <== NOT EXECUTED 3000166c: e1a01000 mov r1, r0 <== NOT EXECUTED 30001670: e59f0044 ldr r0, [pc, #68] ; 300016bc <== NOT EXECUTED 30001674: eb0005fb bl 30002e68 <== 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) 30001678: e59620c8 ldr r2, [r6, #200] ; 0xc8 <== NOT EXECUTED 3000167c: e59610c4 ldr r1, [r6, #196] ; 0xc4 <== NOT EXECUTED ); printk( "task name string: %s\n", rtems_object_get_name(running->Object.id, sizeof(name), name) ); printk( 30001680: e59f0038 ldr r0, [pc, #56] ; 300016c0 <== NOT EXECUTED 30001684: e0823001 add r3, r2, r1 <== NOT EXECUTED 30001688: eb0005f6 bl 30002e68 <== 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) { 3000168c: e3550000 cmp r5, #0 <== NOT EXECUTED printk( 30001690: 059f002c ldreq r0, [pc, #44] ; 300016c4 <== NOT EXECUTED 30001694: 03a01010 moveq r1, #16 <== NOT EXECUTED 30001698: 02842008 addeq r2, r4, #8 <== NOT EXECUTED 3000169c: 02843018 addeq r3, r4, #24 <== NOT EXECUTED 300016a0: 0b0005f0 bleq 30002e68 <== NOT EXECUTED rtems_configuration_get_user_multiprocessing_table()->node ); } #endif rtems_fatal_error_occurred(0x81); 300016a4: e3a00081 mov r0, #129 ; 0x81 <== NOT EXECUTED 300016a8: eb001090 bl 300058f0 <== NOT EXECUTED =============================================================================== 30014dac <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 30014dac: 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 ) { 30014db0: 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 ) { 30014db4: 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 ) { 30014db8: e1a06000 mov r6, r0 30014dbc: e1a0a001 mov sl, r1 30014dc0: e1a07002 mov r7, r2 30014dc4: 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 ) { 30014dc8: 8a000013 bhi 30014e1c <_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 ) { 30014dcc: e5905048 ldr r5, [r0, #72] ; 0x48 30014dd0: e3550000 cmp r5, #0 *count = 0; 30014dd4: 13a00000 movne r0, #0 30014dd8: 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 ) { 30014ddc: 0a000007 beq 30014e00 <_CORE_message_queue_Broadcast+0x54> 30014de0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 30014de4: e594002c ldr r0, [r4, #44] ; 0x2c 30014de8: e1a0100a mov r1, sl 30014dec: e1a02007 mov r2, r7 30014df0: eb002227 bl 3001d694 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30014df4: 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; 30014df8: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 30014dfc: 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 = 30014e00: e1a00006 mov r0, r6 30014e04: eb0009db bl 30017578 <_Thread_queue_Dequeue> 30014e08: e2504000 subs r4, r0, #0 30014e0c: 1afffff4 bne 30014de4 <_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; 30014e10: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 30014e14: e1a00004 mov r0, r4 30014e18: 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; 30014e1c: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 30014e20: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 30006e58 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e58: 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; 30006e5c: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e60: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 30006e64: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 30006e68: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 30006e6c: e59f4500 ldr r4, [pc, #1280] ; 30007374 <_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; 30006e70: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 30006e74: e59f34fc ldr r3, [pc, #1276] ; 30007378 <_Heap_Walk+0x520> 30006e78: e31200ff tst r2, #255 ; 0xff 30006e7c: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 30006e80: e59f34f4 ldr r3, [pc, #1268] ; 3000737c <_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; 30006e84: 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() ) ) { 30006e88: e5933000 ldr r3, [r3] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e8c: 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() ) ) { 30006e90: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 30006e94: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 30006e98: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 30006e9c: 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() ) ) { 30006ea0: 1a000127 bne 30007344 <_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)( 30006ea4: e59dc024 ldr ip, [sp, #36] ; 0x24 30006ea8: e59d2020 ldr r2, [sp, #32] 30006eac: e58dc000 str ip, [sp] 30006eb0: e5903018 ldr r3, [r0, #24] 30006eb4: e58d3004 str r3, [sp, #4] 30006eb8: e590301c ldr r3, [r0, #28] 30006ebc: e58d200c str r2, [sp, #12] 30006ec0: e58d3008 str r3, [sp, #8] 30006ec4: e59d3028 ldr r3, [sp, #40] ; 0x28 30006ec8: e59f24b0 ldr r2, [pc, #1200] ; 30007380 <_Heap_Walk+0x528> 30006ecc: e58d3010 str r3, [sp, #16] 30006ed0: e5903008 ldr r3, [r0, #8] 30006ed4: e58d3014 str r3, [sp, #20] 30006ed8: e590300c ldr r3, [r0, #12] 30006edc: e1a00001 mov r0, r1 30006ee0: e58d3018 str r3, [sp, #24] 30006ee4: e3a01000 mov r1, #0 30006ee8: e1a03009 mov r3, r9 30006eec: e1a0e00f mov lr, pc 30006ef0: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 30006ef4: e3590000 cmp r9, #0 30006ef8: 1a000006 bne 30006f18 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 30006efc: e1a00005 mov r0, r5 30006f00: e3a01001 mov r1, #1 30006f04: e59f2478 ldr r2, [pc, #1144] ; 30007384 <_Heap_Walk+0x52c> 30006f08: e1a0e00f mov lr, pc 30006f0c: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 30006f10: e1a08009 mov r8, r9 30006f14: ea00010b b 30007348 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 30006f18: e2198003 ands r8, r9, #3 (*printer)( 30006f1c: 11a00005 movne r0, r5 30006f20: 13a01001 movne r1, #1 30006f24: 159f245c ldrne r2, [pc, #1116] ; 30007388 <_Heap_Walk+0x530> 30006f28: 11a03009 movne r3, r9 30006f2c: 1a00010c bne 30007364 <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30006f30: e59d0024 ldr r0, [sp, #36] ; 0x24 30006f34: e1a01009 mov r1, r9 30006f38: ebffe717 bl 30000b9c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 30006f3c: e250b000 subs fp, r0, #0 30006f40: 0a000006 beq 30006f60 <_Heap_Walk+0x108> (*printer)( 30006f44: e1a00005 mov r0, r5 30006f48: e3a01001 mov r1, #1 30006f4c: e59f2438 ldr r2, [pc, #1080] ; 3000738c <_Heap_Walk+0x534> 30006f50: e59d3024 ldr r3, [sp, #36] ; 0x24 30006f54: e1a0e00f mov lr, pc 30006f58: e12fff14 bx r4 30006f5c: ea0000f9 b 30007348 <_Heap_Walk+0x4f0> 30006f60: e59dc020 ldr ip, [sp, #32] 30006f64: e1a01009 mov r1, r9 30006f68: e28c0008 add r0, ip, #8 30006f6c: ebffe70a bl 30000b9c <__umodsi3> ); return false; } if ( 30006f70: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 30006f74: 11a00005 movne r0, r5 30006f78: 13a01001 movne r1, #1 30006f7c: 159f240c ldrne r2, [pc, #1036] ; 30007390 <_Heap_Walk+0x538> 30006f80: 159d3020 ldrne r3, [sp, #32] 30006f84: 1a0000cc bne 300072bc <_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; 30006f88: e59d2020 ldr r2, [sp, #32] 30006f8c: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 30006f90: e2188001 ands r8, r8, #1 (*printer)( 30006f94: 01a00005 moveq r0, r5 30006f98: 03a01001 moveq r1, #1 30006f9c: 059f23f0 ldreq r2, [pc, #1008] ; 30007394 <_Heap_Walk+0x53c> 30006fa0: 0a000009 beq 30006fcc <_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; 30006fa4: e59d3028 ldr r3, [sp, #40] ; 0x28 30006fa8: e5937004 ldr r7, [r3, #4] 30006fac: 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); 30006fb0: 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; 30006fb4: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 30006fb8: e2188001 ands r8, r8, #1 30006fbc: 1a000005 bne 30006fd8 <_Heap_Walk+0x180> (*printer)( 30006fc0: e59f23d0 ldr r2, [pc, #976] ; 30007398 <_Heap_Walk+0x540> 30006fc4: e1a00005 mov r0, r5 30006fc8: e3a01001 mov r1, #1 30006fcc: e1a0e00f mov lr, pc 30006fd0: e12fff14 bx r4 30006fd4: ea0000db b 30007348 <_Heap_Walk+0x4f0> ); return false; } if ( 30006fd8: e59dc020 ldr ip, [sp, #32] 30006fdc: e157000c cmp r7, ip 30006fe0: 0a000006 beq 30007000 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 30006fe4: e1a00005 mov r0, r5 <== NOT EXECUTED 30006fe8: e3a01001 mov r1, #1 <== NOT EXECUTED 30006fec: e59f23a8 ldr r2, [pc, #936] ; 3000739c <_Heap_Walk+0x544> <== NOT EXECUTED 30006ff0: e1a0e00f mov lr, pc <== NOT EXECUTED 30006ff4: 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; 30006ff8: e1a0800a mov r8, sl <== NOT EXECUTED 30006ffc: ea0000d1 b 30007348 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 30007000: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 30007004: 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 ); 30007008: e1a0a006 mov sl, r6 3000700c: ea000034 b 300070e4 <_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; 30007010: e5963020 ldr r3, [r6, #32] 30007014: e1530008 cmp r3, r8 30007018: 83a0c000 movhi ip, #0 3000701c: 8a000003 bhi 30007030 <_Heap_Walk+0x1d8> 30007020: e596c024 ldr ip, [r6, #36] ; 0x24 30007024: e15c0008 cmp ip, r8 30007028: 33a0c000 movcc ip, #0 3000702c: 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 ) ) { 30007030: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 30007034: 01a00005 moveq r0, r5 30007038: 03a01001 moveq r1, #1 3000703c: 059f235c ldreq r2, [pc, #860] ; 300073a0 <_Heap_Walk+0x548> 30007040: 0a000012 beq 30007090 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 30007044: e2880008 add r0, r8, #8 30007048: e1a0100b mov r1, fp 3000704c: ebffe6d2 bl 30000b9c <__umodsi3> ); return false; } if ( 30007050: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 30007054: 11a00005 movne r0, r5 30007058: 13a01001 movne r1, #1 3000705c: 159f2340 ldrne r2, [pc, #832] ; 300073a4 <_Heap_Walk+0x54c> 30007060: 11a03008 movne r3, r8 30007064: 1a0000be bne 30007364 <_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; 30007068: e5983004 ldr r3, [r8, #4] 3000706c: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 30007070: 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; 30007074: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 30007078: e2133001 ands r3, r3, #1 3000707c: e58d302c str r3, [sp, #44] ; 0x2c 30007080: 0a000009 beq 300070ac <_Heap_Walk+0x254> (*printer)( 30007084: e59f231c ldr r2, [pc, #796] ; 300073a8 <_Heap_Walk+0x550> 30007088: e1a00005 mov r0, r5 3000708c: e3a01001 mov r1, #1 30007090: e1a03008 mov r3, r8 30007094: e58dc01c str ip, [sp, #28] 30007098: e1a0e00f mov lr, pc 3000709c: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300070a0: e59dc01c ldr ip, [sp, #28] 300070a4: e1a0800c mov r8, ip 300070a8: ea0000a6 b 30007348 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 300070ac: e598300c ldr r3, [r8, #12] 300070b0: e153000a cmp r3, sl 300070b4: 0a000008 beq 300070dc <_Heap_Walk+0x284> (*printer)( 300070b8: e58d3000 str r3, [sp] 300070bc: e1a00005 mov r0, r5 300070c0: e1a03008 mov r3, r8 300070c4: e3a01001 mov r1, #1 300070c8: e59f22dc ldr r2, [pc, #732] ; 300073ac <_Heap_Walk+0x554> 300070cc: e1a0e00f mov lr, pc 300070d0: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 300070d4: e59d802c ldr r8, [sp, #44] ; 0x2c 300070d8: ea00009a b 30007348 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 300070dc: e1a0a008 mov sl, r8 300070e0: 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 ) { 300070e4: e1580006 cmp r8, r6 300070e8: 1affffc8 bne 30007010 <_Heap_Walk+0x1b8> 300070ec: ea000000 b 300070f4 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 300070f0: e1a07008 mov r7, r8 return true; } 300070f4: 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; 300070f8: 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; 300070fc: 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); 30007100: 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; 30007104: e1520008 cmp r2, r8 30007108: 83a0b000 movhi fp, #0 3000710c: 8a000003 bhi 30007120 <_Heap_Walk+0x2c8> 30007110: e596b024 ldr fp, [r6, #36] ; 0x24 30007114: e15b0008 cmp fp, r8 30007118: 33a0b000 movcc fp, #0 3000711c: 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 ) ) { 30007120: e21bb0ff ands fp, fp, #255 ; 0xff 30007124: 1a000007 bne 30007148 <_Heap_Walk+0x2f0> (*printer)( 30007128: e58d8000 str r8, [sp] 3000712c: e1a00005 mov r0, r5 30007130: e3a01001 mov r1, #1 30007134: e59f2274 ldr r2, [pc, #628] ; 300073b0 <_Heap_Walk+0x558> 30007138: e1a03007 mov r3, r7 3000713c: e1a0e00f mov lr, pc 30007140: e12fff14 bx r4 30007144: ea00005e b 300072c4 <_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; 30007148: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 3000714c: e1a0000a mov r0, sl 30007150: e1a01009 mov r1, r9 30007154: e057b002 subs fp, r7, r2 30007158: 13a0b001 movne fp, #1 3000715c: e58d301c str r3, [sp, #28] 30007160: ebffe68d bl 30000b9c <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 30007164: e3500000 cmp r0, #0 30007168: e59d301c ldr r3, [sp, #28] 3000716c: 0a000005 beq 30007188 <_Heap_Walk+0x330> 30007170: e35b0000 cmp fp, #0 (*printer)( 30007174: 158da000 strne sl, [sp] 30007178: 11a00005 movne r0, r5 3000717c: 13a01001 movne r1, #1 30007180: 159f222c ldrne r2, [pc, #556] ; 300073b4 <_Heap_Walk+0x55c> 30007184: 1a000014 bne 300071dc <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 30007188: e59dc024 ldr ip, [sp, #36] ; 0x24 3000718c: e15a000c cmp sl, ip 30007190: 2a000009 bcs 300071bc <_Heap_Walk+0x364> 30007194: e35b0000 cmp fp, #0 30007198: 0a000007 beq 300071bc <_Heap_Walk+0x364> (*printer)( 3000719c: e88d1400 stm sp, {sl, ip} 300071a0: e1a00005 mov r0, r5 300071a4: e3a01001 mov r1, #1 300071a8: e59f2208 ldr r2, [pc, #520] ; 300073b8 <_Heap_Walk+0x560> 300071ac: e1a03007 mov r3, r7 300071b0: e1a0e00f mov lr, pc 300071b4: e12fff14 bx r4 300071b8: ea00006b b 3000736c <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 300071bc: e1580007 cmp r8, r7 300071c0: 8a000009 bhi 300071ec <_Heap_Walk+0x394> 300071c4: e35b0000 cmp fp, #0 300071c8: 0a000007 beq 300071ec <_Heap_Walk+0x394> (*printer)( 300071cc: e59f21e8 ldr r2, [pc, #488] ; 300073bc <_Heap_Walk+0x564> 300071d0: e58d8000 str r8, [sp] 300071d4: e1a00005 mov r0, r5 300071d8: e3a01001 mov r1, #1 300071dc: e1a03007 mov r3, r7 300071e0: e1a0e00f mov lr, pc 300071e4: e12fff14 bx r4 300071e8: ea00005f b 3000736c <_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; 300071ec: e203b001 and fp, r3, #1 300071f0: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 300071f4: e3130001 tst r3, #1 300071f8: 1a00003b bne 300072ec <_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 ? 300071fc: 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)( 30007200: e5963008 ldr r3, [r6, #8] block = next_block; } while ( block != first_block ); return true; } 30007204: 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)( 30007208: e1520003 cmp r2, r3 3000720c: 059f01ac ldreq r0, [pc, #428] ; 300073c0 <_Heap_Walk+0x568> 30007210: 0a000003 beq 30007224 <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 30007214: e59f31a8 ldr r3, [pc, #424] ; 300073c4 <_Heap_Walk+0x56c> 30007218: e1520006 cmp r2, r6 3000721c: e59f01a4 ldr r0, [pc, #420] ; 300073c8 <_Heap_Walk+0x570> 30007220: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 30007224: 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)( 30007228: e1530001 cmp r3, r1 3000722c: 059f1198 ldreq r1, [pc, #408] ; 300073cc <_Heap_Walk+0x574> 30007230: 0a000003 beq 30007244 <_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)" : "") 30007234: e59fc194 ldr ip, [pc, #404] ; 300073d0 <_Heap_Walk+0x578> 30007238: e1530006 cmp r3, r6 3000723c: e59f1184 ldr r1, [pc, #388] ; 300073c8 <_Heap_Walk+0x570> 30007240: 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)( 30007244: e58d2004 str r2, [sp, #4] 30007248: e58d0008 str r0, [sp, #8] 3000724c: e58d300c str r3, [sp, #12] 30007250: e58d1010 str r1, [sp, #16] 30007254: e1a03007 mov r3, r7 30007258: e58da000 str sl, [sp] 3000725c: e1a00005 mov r0, r5 30007260: e3a01000 mov r1, #0 30007264: e59f2168 ldr r2, [pc, #360] ; 300073d4 <_Heap_Walk+0x57c> 30007268: e1a0e00f mov lr, pc 3000726c: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 30007270: e5983000 ldr r3, [r8] 30007274: e15a0003 cmp sl, r3 30007278: 0a000009 beq 300072a4 <_Heap_Walk+0x44c> (*printer)( 3000727c: e58d3004 str r3, [sp, #4] 30007280: e58da000 str sl, [sp] 30007284: e58d8008 str r8, [sp, #8] 30007288: e1a00005 mov r0, r5 3000728c: e3a01001 mov r1, #1 30007290: e59f2140 ldr r2, [pc, #320] ; 300073d8 <_Heap_Walk+0x580> 30007294: e1a03007 mov r3, r7 30007298: e1a0e00f mov lr, pc 3000729c: e12fff14 bx r4 300072a0: ea000031 b 3000736c <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 300072a4: e35b0000 cmp fp, #0 300072a8: 1a000007 bne 300072cc <_Heap_Walk+0x474> (*printer)( 300072ac: e59f2128 ldr r2, [pc, #296] ; 300073dc <_Heap_Walk+0x584> 300072b0: e1a00005 mov r0, r5 300072b4: e3a01001 mov r1, #1 300072b8: e1a03007 mov r3, r7 300072bc: e1a0e00f mov lr, pc 300072c0: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 300072c4: e1a0800b mov r8, fp 300072c8: ea00001e b 30007348 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 300072cc: e5963008 ldr r3, [r6, #8] 300072d0: ea000002 b 300072e0 <_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 ) { 300072d4: e1530007 cmp r3, r7 300072d8: 0a000016 beq 30007338 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 300072dc: 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 ) { 300072e0: e1530006 cmp r3, r6 300072e4: 1afffffa bne 300072d4 <_Heap_Walk+0x47c> 300072e8: ea000019 b 30007354 <_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) { 300072ec: e35b0000 cmp fp, #0 300072f0: 0a000007 beq 30007314 <_Heap_Walk+0x4bc> (*printer)( 300072f4: e58da000 str sl, [sp] 300072f8: e1a00005 mov r0, r5 300072fc: e3a01000 mov r1, #0 30007300: e59f20d8 ldr r2, [pc, #216] ; 300073e0 <_Heap_Walk+0x588> 30007304: e1a03007 mov r3, r7 30007308: e1a0e00f mov lr, pc 3000730c: e12fff14 bx r4 30007310: ea000008 b 30007338 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 30007314: e58da000 str sl, [sp] 30007318: e5973000 ldr r3, [r7] 3000731c: e1a00005 mov r0, r5 30007320: e58d3004 str r3, [sp, #4] 30007324: e1a0100b mov r1, fp 30007328: e59f20b4 ldr r2, [pc, #180] ; 300073e4 <_Heap_Walk+0x58c> 3000732c: e1a03007 mov r3, r7 30007330: e1a0e00f mov lr, pc 30007334: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 30007338: e59d2020 ldr r2, [sp, #32] 3000733c: e1580002 cmp r8, r2 30007340: 1affff6a bne 300070f0 <_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; 30007344: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 30007348: e1a00008 mov r0, r8 3000734c: e28dd030 add sp, sp, #48 ; 0x30 30007350: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 30007354: e59f208c ldr r2, [pc, #140] ; 300073e8 <_Heap_Walk+0x590> 30007358: e1a00005 mov r0, r5 3000735c: e3a01001 mov r1, #1 30007360: e1a03007 mov r3, r7 30007364: e1a0e00f mov lr, pc 30007368: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 3000736c: e3a08000 mov r8, #0 30007370: eafffff4 b 30007348 <_Heap_Walk+0x4f0> =============================================================================== 30006294 <_Internal_error_Occurred>: bool is_internal, Internal_errors_t the_error ) { _Internal_errors_What_happened.the_source = the_source; 30006294: e59f3038 ldr r3, [pc, #56] ; 300062d4 <_Internal_error_Occurred+0x40> void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30006298: e20110ff and r1, r1, #255 ; 0xff 3000629c: e52de004 push {lr} ; (str lr, [sp, #-4]!) _Internal_errors_What_happened.the_source = the_source; 300062a0: e5830000 str r0, [r3] _Internal_errors_What_happened.is_internal = is_internal; 300062a4: e5c31004 strb r1, [r3, #4] _Internal_errors_What_happened.the_error = the_error; 300062a8: e5832008 str r2, [r3, #8] void _Internal_error_Occurred( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 300062ac: 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 ); 300062b0: eb0006fa bl 30007ea0 <_User_extensions_Fatal> RTEMS_INLINE_ROUTINE void _System_state_Set ( System_state_Codes state ) { _System_state_Current = state; 300062b4: e59f301c ldr r3, [pc, #28] ; 300062d8 <_Internal_error_Occurred+0x44><== NOT EXECUTED 300062b8: e3a02005 mov r2, #5 <== NOT EXECUTED 300062bc: e5832000 str r2, [r3] <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 300062c0: e10f2000 mrs r2, CPSR <== NOT EXECUTED 300062c4: e3823080 orr r3, r2, #128 ; 0x80 <== NOT EXECUTED 300062c8: e129f003 msr CPSR_fc, r3 <== NOT EXECUTED _System_state_Set( SYSTEM_STATE_FAILED ); _CPU_Fatal_halt( the_error ); 300062cc: e1a00004 mov r0, r4 <== NOT EXECUTED 300062d0: eafffffe b 300062d0 <_Internal_error_Occurred+0x3c> <== NOT EXECUTED =============================================================================== 30007cb4 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 30007cb4: e92d4031 push {r0, r4, r5, lr} 30007cb8: e1a05001 mov r5, r1 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 30007cbc: e2501000 subs r1, r0, #0 30007cc0: 059f3078 ldreq r3, [pc, #120] ; 30007d40 <_Objects_Id_to_name+0x8c> 30007cc4: 05933004 ldreq r3, [r3, #4] 30007cc8: 05931008 ldreq r1, [r3, #8] 30007ccc: e1a03c21 lsr r3, r1, #24 30007cd0: e2033007 and r3, r3, #7 */ RTEMS_INLINE_ROUTINE bool _Objects_Is_api_valid( uint32_t the_api ) { if ( !the_api || the_api > OBJECTS_APIS_LAST ) 30007cd4: e2432001 sub r2, r3, #1 30007cd8: e3520002 cmp r2, #2 30007cdc: 8a000010 bhi 30007d24 <_Objects_Id_to_name+0x70> 30007ce0: ea000011 b 30007d2c <_Objects_Id_to_name+0x78> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 30007ce4: e1a02da1 lsr r2, r1, #27 if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; the_class = _Objects_Get_class( tmpId ); information = _Objects_Information_table[ the_api ][ the_class ]; 30007ce8: e7930102 ldr r0, [r3, r2, lsl #2] if ( !information ) 30007cec: e3500000 cmp r0, #0 30007cf0: 0a00000b beq 30007d24 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) 30007cf4: e5d04038 ldrb r4, [r0, #56] ; 0x38 30007cf8: e3540000 cmp r4, #0 30007cfc: 1a000008 bne 30007d24 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 30007d00: e1a0200d mov r2, sp 30007d04: ebffffd0 bl 30007c4c <_Objects_Get> if ( !the_object ) 30007d08: e3500000 cmp r0, #0 30007d0c: 0a000004 beq 30007d24 <_Objects_Id_to_name+0x70> return OBJECTS_INVALID_ID; *name = the_object->name; 30007d10: e590300c ldr r3, [r0, #12] 30007d14: e5853000 str r3, [r5] _Thread_Enable_dispatch(); 30007d18: eb000216 bl 30008578 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 30007d1c: e1a00004 mov r0, r4 30007d20: ea000000 b 30007d28 <_Objects_Id_to_name+0x74> the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) return OBJECTS_INVALID_ID; 30007d24: e3a00003 mov r0, #3 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 30007d28: e8bd8038 pop {r3, r4, r5, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 30007d2c: e59f2010 ldr r2, [pc, #16] ; 30007d44 <_Objects_Id_to_name+0x90> 30007d30: e7923103 ldr r3, [r2, r3, lsl #2] 30007d34: e3530000 cmp r3, #0 30007d38: 1affffe9 bne 30007ce4 <_Objects_Id_to_name+0x30> 30007d3c: eafffff8 b 30007d24 <_Objects_Id_to_name+0x70> <== NOT EXECUTED =============================================================================== 30006fa0 <_Objects_Set_name>: bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 30006fa0: e92d40f0 push {r4, r5, r6, r7, lr} 30006fa4: e1a05000 mov r5, r0 30006fa8: e1a06001 mov r6, r1 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 30006fac: e1a00002 mov r0, r2 30006fb0: e1d513ba ldrh r1, [r5, #58] ; 0x3a bool _Objects_Set_name( Objects_Information *information, Objects_Control *the_object, const char *name ) { 30006fb4: e1a07002 mov r7, r2 size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 30006fb8: eb002003 bl 3000efcc #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 30006fbc: e5d53038 ldrb r3, [r5, #56] ; 0x38 { size_t length; const char *s; s = name; length = strnlen( name, information->name_length ); 30006fc0: e1a04000 mov r4, r0 #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) { 30006fc4: e3530000 cmp r3, #0 30006fc8: 0a000011 beq 30007014 <_Objects_Set_name+0x74> char *d; d = _Workspace_Allocate( length + 1 ); 30006fcc: e2800001 add r0, r0, #1 30006fd0: eb00068b bl 30008a04 <_Workspace_Allocate> if ( !d ) 30006fd4: e2505000 subs r5, r0, #0 30006fd8: 0a000020 beq 30007060 <_Objects_Set_name+0xc0> return false; if ( the_object->name.name_p ) { 30006fdc: e596000c ldr r0, [r6, #12] 30006fe0: e3500000 cmp r0, #0 30006fe4: 0a000002 beq 30006ff4 <_Objects_Set_name+0x54> _Workspace_Free( (void *)the_object->name.name_p ); 30006fe8: eb00068b bl 30008a1c <_Workspace_Free> the_object->name.name_p = NULL; 30006fec: e3a03000 mov r3, #0 30006ff0: e586300c str r3, [r6, #12] } strncpy( d, name, length ); 30006ff4: e1a00005 mov r0, r5 30006ff8: e1a01007 mov r1, r7 30006ffc: e1a02004 mov r2, r4 30007000: eb001fb6 bl 3000eee0 d[length] = '\0'; 30007004: e3a03000 mov r3, #0 30007008: e7c53004 strb r3, [r5, r4] the_object->name.name_p = d; 3000700c: e586500c str r5, [r6, #12] 30007010: ea000010 b 30007058 <_Objects_Set_name+0xb8> } else #endif { the_object->name.name_u32 = _Objects_Build_name( 30007014: e3500001 cmp r0, #1 30007018: 85d73001 ldrbhi r3, [r7, #1] 3000701c: e5d72000 ldrb r2, [r7] 30007020: 81a03803 lslhi r3, r3, #16 30007024: 93a03602 movls r3, #2097152 ; 0x200000 30007028: e1a02c02 lsl r2, r2, #24 3000702c: e3500002 cmp r0, #2 30007030: e1832002 orr r2, r3, r2 30007034: 85d73002 ldrbhi r3, [r7, #2] 30007038: 93a03a02 movls r3, #8192 ; 0x2000 3000703c: 81a03403 lslhi r3, r3, #8 30007040: e3500003 cmp r0, #3 30007044: e1822003 orr r2, r2, r3 30007048: 85d73003 ldrbhi r3, [r7, #3] 3000704c: 93a03020 movls r3, #32 30007050: e1823003 orr r3, r2, r3 30007054: e586300c str r3, [r6, #12] ((3 < length) ? s[ 3 ] : ' ') ); } return true; 30007058: e3a00001 mov r0, #1 3000705c: e8bd80f0 pop {r4, r5, r6, r7, pc} if ( information->is_string ) { char *d; d = _Workspace_Allocate( length + 1 ); if ( !d ) return false; 30007060: e1a00005 mov r0, r5 <== NOT EXECUTED ); } return true; } 30007064: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 30006080 <_POSIX_Condition_variables_Wait_support>: pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30006080: e92d45f1 push {r0, r4, r5, r6, r7, r8, sl, lr} 30006084: e1a05000 mov r5, r0 30006088: e1a04001 mov r4, r1 register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 3000608c: e1a00001 mov r0, r1 30006090: e1a0100d mov r1, sp pthread_cond_t *cond, pthread_mutex_t *mutex, Watchdog_Interval timeout, bool already_timedout ) { 30006094: e1a07002 mov r7, r2 30006098: e20380ff and r8, r3, #255 ; 0xff register POSIX_Condition_variables_Control *the_cond; Objects_Locations location; int status; int mutex_status; if ( !_POSIX_Mutex_Get( mutex, &location ) ) { 3000609c: eb000057 bl 30006200 <_POSIX_Mutex_Get> 300060a0: e3500000 cmp r0, #0 300060a4: e1a0600d mov r6, sp 300060a8: 0a000032 beq 30006178 <_POSIX_Condition_variables_Wait_support+0xf8> */ RTEMS_INLINE_ROUTINE void _Thread_Unnest_dispatch( void ) { RTEMS_COMPILER_MEMORY_BARRIER(); _Thread_Dispatch_disable_level -= 1; 300060ac: e59f30d0 ldr r3, [pc, #208] ; 30006184 <_POSIX_Condition_variables_Wait_support+0x104> return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 300060b0: e1a00005 mov r0, r5 300060b4: e5932000 ldr r2, [r3] 300060b8: e1a0100d mov r1, sp 300060bc: e2422001 sub r2, r2, #1 300060c0: e5832000 str r2, [r3] 300060c4: ebffff7c bl 30005ebc <_POSIX_Condition_variables_Get> switch ( location ) { 300060c8: e59d3000 ldr r3, [sp] return EINVAL; } _Thread_Unnest_dispatch(); the_cond = _POSIX_Condition_variables_Get( cond, &location ); 300060cc: e1a0a000 mov sl, r0 switch ( location ) { 300060d0: e3530000 cmp r3, #0 300060d4: 1a000027 bne 30006178 <_POSIX_Condition_variables_Wait_support+0xf8> case OBJECTS_LOCAL: if ( the_cond->Mutex && ( the_cond->Mutex != *mutex ) ) { 300060d8: e5903014 ldr r3, [r0, #20] 300060dc: e3530000 cmp r3, #0 300060e0: 0a000004 beq 300060f8 <_POSIX_Condition_variables_Wait_support+0x78> 300060e4: e5942000 ldr r2, [r4] 300060e8: e1530002 cmp r3, r2 300060ec: 0a000001 beq 300060f8 <_POSIX_Condition_variables_Wait_support+0x78> _Thread_Enable_dispatch(); 300060f0: eb000bd6 bl 30009050 <_Thread_Enable_dispatch> 300060f4: ea00001f b 30006178 <_POSIX_Condition_variables_Wait_support+0xf8> return EINVAL; } (void) pthread_mutex_unlock( mutex ); 300060f8: e1a00004 mov r0, r4 300060fc: eb0000e0 bl 30006484 _Thread_Enable_dispatch(); return EINVAL; } */ if ( !already_timedout ) { 30006100: e3580000 cmp r8, #0 30006104: 1a000014 bne 3000615c <_POSIX_Condition_variables_Wait_support+0xdc> the_cond->Mutex = *mutex; 30006108: e5943000 ldr r3, [r4] _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 3000610c: e59f6074 ldr r6, [pc, #116] ; 30006188 <_POSIX_Condition_variables_Wait_support+0x108> return EINVAL; } */ if ( !already_timedout ) { the_cond->Mutex = *mutex; 30006110: e58a3014 str r3, [sl, #20] RTEMS_INLINE_ROUTINE void _Thread_queue_Enter_critical_section ( Thread_queue_Control *the_thread_queue ) { the_thread_queue->sync_state = THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED; 30006114: e3a03001 mov r3, #1 30006118: e58a3048 str r3, [sl, #72] ; 0x48 _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 3000611c: e5963004 ldr r3, [r6, #4] _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 30006120: e28a0018 add r0, sl, #24 if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; 30006124: e5838034 str r8, [r3, #52] ; 0x34 _Thread_Executing->Wait.queue = &the_cond->Wait_queue; _Thread_Executing->Wait.id = *cond; 30006128: e5952000 ldr r2, [r5] if ( !already_timedout ) { the_cond->Mutex = *mutex; _Thread_queue_Enter_critical_section( &the_cond->Wait_queue ); _Thread_Executing->Wait.return_code = 0; _Thread_Executing->Wait.queue = &the_cond->Wait_queue; 3000612c: e5830044 str r0, [r3, #68] ; 0x44 _Thread_Executing->Wait.id = *cond; 30006130: e5832020 str r2, [r3, #32] _Thread_queue_Enqueue( &the_cond->Wait_queue, timeout ); 30006134: e1a01007 mov r1, r7 30006138: e59f204c ldr r2, [pc, #76] ; 3000618c <_POSIX_Condition_variables_Wait_support+0x10c> 3000613c: eb000cf4 bl 30009514 <_Thread_queue_Enqueue_with_handler> _Thread_Enable_dispatch(); 30006140: eb000bc2 bl 30009050 <_Thread_Enable_dispatch> /* * Switch ourself out because we blocked as a result of the * _Thread_queue_Enqueue. */ status = _Thread_Executing->Wait.return_code; 30006144: e5963004 ldr r3, [r6, #4] 30006148: e5935034 ldr r5, [r3, #52] ; 0x34 if ( status && status != ETIMEDOUT ) 3000614c: e3550074 cmp r5, #116 ; 0x74 30006150: 13550000 cmpne r5, #0 30006154: 0a000002 beq 30006164 <_POSIX_Condition_variables_Wait_support+0xe4> 30006158: ea000007 b 3000617c <_POSIX_Condition_variables_Wait_support+0xfc><== NOT EXECUTED return status; } else { _Thread_Enable_dispatch(); 3000615c: eb000bbb bl 30009050 <_Thread_Enable_dispatch> status = ETIMEDOUT; 30006160: e3a05074 mov r5, #116 ; 0x74 /* * When we get here the dispatch disable level is 0. */ mutex_status = pthread_mutex_lock( mutex ); 30006164: e1a00004 mov r0, r4 30006168: eb0000a6 bl 30006408 if ( mutex_status ) return EINVAL; 3000616c: e3500000 cmp r0, #0 30006170: 13a05016 movne r5, #22 30006174: ea000000 b 3000617c <_POSIX_Condition_variables_Wait_support+0xfc> #endif case OBJECTS_ERROR: break; } return EINVAL; 30006178: e3a05016 mov r5, #22 } 3000617c: e1a00005 mov r0, r5 30006180: e8bd85f8 pop {r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 3000afc0 <_Thread_queue_Extract_priority_helper>: void _Thread_queue_Extract_priority_helper( Thread_queue_Control *the_thread_queue __attribute__((unused)), Thread_Control *the_thread, bool requeuing ) { 3000afc0: e92d4070 push {r4, r5, r6, lr} 3000afc4: e20220ff and r2, r2, #255 ; 0xff 3000afc8: e1a04001 mov r4, r1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000afcc: e10f1000 mrs r1, CPSR 3000afd0: e3813080 orr r3, r1, #128 ; 0x80 3000afd4: e129f003 msr CPSR_fc, r3 */ RTEMS_INLINE_ROUTINE bool _States_Is_waiting_on_thread_queue ( States_Control the_states ) { return (the_states & STATES_WAITING_ON_THREAD_QUEUE); 3000afd8: e59f30a8 ldr r3, [pc, #168] ; 3000b088 <_Thread_queue_Extract_priority_helper+0xc8> 3000afdc: e5940010 ldr r0, [r4, #16] 3000afe0: e0003003 and r3, r0, r3 Chain_Node *new_second_node; Chain_Node *last_node; the_node = (Chain_Node *) the_thread; _ISR_Disable( level ); if ( !_States_Is_waiting_on_thread_queue( the_thread->current_state ) ) { 3000afe4: e3530000 cmp r3, #0 3000afe8: 1a000000 bne 3000aff0 <_Thread_queue_Extract_priority_helper+0x30> _ISR_Enable( level ); 3000afec: ea000015 b 3000b048 <_Thread_queue_Extract_priority_helper+0x88> */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 3000aff0: e5943038 ldr r3, [r4, #56] ; 0x38 /* * The thread was actually waiting on a thread queue so let's remove it. */ next_node = the_node->next; 3000aff4: e8941001 ldm r4, {r0, ip} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3000aff8: e284503c add r5, r4, #60 ; 0x3c previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000affc: e1530005 cmp r3, r5 new_first_thread->Wait.Block2n.last = last_node; last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); } } else { previous_node->next = next_node; 3000b000: 058c0000 streq r0, [ip] next_node->previous = previous_node; 3000b004: 0580c004 streq ip, [r0, #4] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 3000b008: 0a00000c beq 3000b040 <_Thread_queue_Extract_priority_helper+0x80> new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; 3000b00c: e5945040 ldr r5, [r4, #64] ; 0x40 new_second_node = new_first_node->next; 3000b010: e5936000 ldr r6, [r3] previous_node->next = new_first_node; next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 3000b014: e1530005 cmp r3, r5 new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; 3000b018: e58c3000 str r3, [ip] next_node->previous = new_first_node; 3000b01c: e5803004 str r3, [r0, #4] new_first_node->next = next_node; 3000b020: e8831001 stm r3, {r0, ip} new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { 3000b024: 0a000005 beq 3000b040 <_Thread_queue_Extract_priority_helper+0x80> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); 3000b028: e2830038 add r0, r3, #56 ; 0x38 new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { /* > two threads on 2-n */ new_second_node->previous = 3000b02c: e5860004 str r0, [r6, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; 3000b030: e5836038 str r6, [r3, #56] ; 0x38 new_first_thread->Wait.Block2n.last = last_node; 3000b034: e5835040 str r5, [r3, #64] ; 0x40 3000b038: e283303c add r3, r3, #60 ; 0x3c last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); 3000b03c: e5853000 str r3, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { 3000b040: e3520000 cmp r2, #0 3000b044: 0a000001 beq 3000b050 <_Thread_queue_Extract_priority_helper+0x90> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000b048: e129f001 msr CPSR_fc, r1 3000b04c: e8bd8070 pop {r4, r5, r6, pc} _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { 3000b050: e5943050 ldr r3, [r4, #80] ; 0x50 3000b054: e3530002 cmp r3, #2 3000b058: 0a000001 beq 3000b064 <_Thread_queue_Extract_priority_helper+0xa4> 3000b05c: e129f001 msr CPSR_fc, r1 3000b060: ea000004 b 3000b078 <_Thread_queue_Extract_priority_helper+0xb8> 3000b064: e3a03003 mov r3, #3 <== NOT EXECUTED 3000b068: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED 3000b06c: e129f001 msr CPSR_fc, r1 <== NOT EXECUTED _ISR_Enable( level ); } else { _Watchdog_Deactivate( &the_thread->Timer ); _ISR_Enable( level ); (void) _Watchdog_Remove( &the_thread->Timer ); 3000b070: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED 3000b074: ebfff43b bl 30008168 <_Watchdog_Remove> <== NOT EXECUTED 3000b078: e59f100c ldr r1, [pc, #12] ; 3000b08c <_Thread_queue_Extract_priority_helper+0xcc> 3000b07c: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } 3000b080: e8bd4070 pop {r4, r5, r6, lr} 3000b084: eaffeef8 b 30006c6c <_Thread_Clear_state> =============================================================================== 3001423c <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 3001423c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 30014240: e24dd018 sub sp, sp, #24 30014244: 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; 30014248: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 3001424c: e28ba004 add sl, fp, #4 30014250: e28d7004 add r7, sp, #4 30014254: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30014258: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; 3001425c: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); 30014260: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 30014264: e1a0500d mov r5, sp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 30014268: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; 3001426c: 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 ); 30014270: 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; 30014274: 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 ); 30014278: 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; 3001427c: e59f2150 ldr r2, [pc, #336] ; 300143d4 <_Timer_server_Body+0x198> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30014280: 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; 30014284: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 30014288: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 3001428c: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 30014290: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 30014294: e0611003 rsb r1, r1, r3 30014298: eb0010d6 bl 300185f8 <_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(); 3001429c: e59f3134 ldr r3, [pc, #308] ; 300143d8 <_Timer_server_Body+0x19c> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 300142a0: 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(); 300142a4: 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 ) { 300142a8: e1560002 cmp r6, r2 300142ac: 9a000004 bls 300142c4 <_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 ); 300142b0: e0621006 rsb r1, r2, r6 300142b4: e1a00008 mov r0, r8 300142b8: e1a02005 mov r2, r5 300142bc: eb0010cd bl 300185f8 <_Watchdog_Adjust_to_chain> 300142c0: ea000003 b 300142d4 <_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 ); 300142c4: 31a00008 movcc r0, r8 300142c8: 33a01001 movcc r1, #1 300142cc: 30662002 rsbcc r2, r6, r2 300142d0: 3b0010a0 blcc 30018558 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 300142d4: 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 ); 300142d8: e5940078 ldr r0, [r4, #120] ; 0x78 300142dc: eb000295 bl 30014d38 <_Chain_Get> if ( timer == NULL ) { 300142e0: e2506000 subs r6, r0, #0 300142e4: 0a000009 beq 30014310 <_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 ) { 300142e8: e5963038 ldr r3, [r6, #56] ; 0x38 300142ec: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 300142f0: 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 ) { 300142f4: 0a000002 beq 30014304 <_Timer_server_Body+0xc8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 300142f8: e3530003 cmp r3, #3 300142fc: 1afffff5 bne 300142d8 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 30014300: e1a00008 mov r0, r8 30014304: e2861010 add r1, r6, #16 30014308: eb0010e5 bl 300186a4 <_Watchdog_Insert> 3001430c: eafffff1 b 300142d8 <_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 ); 30014310: ebffff97 bl 30014174 if ( _Chain_Is_empty( insert_chain ) ) { 30014314: e59d300c ldr r3, [sp, #12] 30014318: e153000a cmp r3, sl 3001431c: 1a000006 bne 3001433c <_Timer_server_Body+0x100> ts->insert_chain = NULL; 30014320: e5846078 str r6, [r4, #120] ; 0x78 30014324: 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 ) ) { 30014328: e59d3000 ldr r3, [sp] 3001432c: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; 30014330: 13a06000 movne r6, #0 30014334: 1a000002 bne 30014344 <_Timer_server_Body+0x108> 30014338: ea000013 b 3001438c <_Timer_server_Body+0x150> 3001433c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 30014340: eaffffcd b 3001427c <_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 ); 30014344: ebffff8a bl 30014174 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 30014348: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 3001434c: e1530007 cmp r3, r7 30014350: 0a00000b beq 30014384 <_Timer_server_Body+0x148> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 30014354: e5932000 ldr r2, [r3] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 30014358: e3530000 cmp r3, #0 the_chain->first = new_first; 3001435c: e58d2000 str r2, [sp] new_first->previous = _Chain_Head(the_chain); 30014360: e5825004 str r5, [r2, #4] 30014364: 0a000006 beq 30014384 <_Timer_server_Body+0x148> watchdog->state = WATCHDOG_INACTIVE; 30014368: e5836008 str r6, [r3, #8] 3001436c: 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 ); 30014370: e5930020 ldr r0, [r3, #32] 30014374: e5931024 ldr r1, [r3, #36] ; 0x24 30014378: e1a0e00f mov lr, pc 3001437c: e593f01c ldr pc, [r3, #28] } 30014380: eaffffef b 30014344 <_Timer_server_Body+0x108> 30014384: e129f000 msr CPSR_fc, r0 30014388: eaffffb9 b 30014274 <_Timer_server_Body+0x38> } else { ts->active = false; 3001438c: e3a03000 mov r3, #0 30014390: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 30014394: ebffff7a bl 30014184 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 30014398: e3a01008 mov r1, #8 3001439c: e5940000 ldr r0, [r4] 300143a0: eb000e1b bl 30017c14 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 300143a4: e1a00004 mov r0, r4 300143a8: ebffff7b bl 3001419c <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 300143ac: e1a00004 mov r0, r4 300143b0: ebffff8d bl 300141ec <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 300143b4: eb000b97 bl 30017218 <_Thread_Enable_dispatch> ts->active = true; 300143b8: e3a03001 mov r3, #1 300143bc: 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 ); 300143c0: e2840008 add r0, r4, #8 300143c4: eb00110c bl 300187fc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 300143c8: e2840040 add r0, r4, #64 ; 0x40 300143cc: eb00110a bl 300187fc <_Watchdog_Remove> 300143d0: eaffffa7 b 30014274 <_Timer_server_Body+0x38> =============================================================================== 30007ea0 <_User_extensions_Fatal>: void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30007ea0: e92d41f0 push {r4, r5, r6, r7, r8, lr} Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 30007ea4: e59f503c ldr r5, [pc, #60] ; 30007ee8 <_User_extensions_Fatal+0x48> void _User_extensions_Fatal ( Internal_errors_Source the_source, bool is_internal, Internal_errors_t the_error ) { 30007ea8: e1a08000 mov r8, r0 30007eac: e1a07002 mov r7, r2 30007eb0: e20160ff and r6, r1, #255 ; 0xff Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 30007eb4: e5954008 ldr r4, [r5, #8] 30007eb8: ea000007 b 30007edc <_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 ) 30007ebc: e5943030 ldr r3, [r4, #48] ; 0x30 30007ec0: e3530000 cmp r3, #0 (*the_extension->Callouts.fatal)( the_source, is_internal, the_error ); 30007ec4: 11a00008 movne r0, r8 30007ec8: 11a01006 movne r1, r6 30007ecc: 11a02007 movne r2, r7 30007ed0: 11a0e00f movne lr, pc 30007ed4: 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 ) { 30007ed8: e5944004 ldr r4, [r4, #4] ) { Chain_Node *the_node; User_extensions_Control *the_extension; for ( the_node = _User_extensions_List.last ; 30007edc: e1540005 cmp r4, r5 30007ee0: 1afffff5 bne 30007ebc <_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 ); } } 30007ee4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 300124d0 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 300124d0: e1a04000 mov r4, r0 300124d4: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * If the toolset uses init/fini sections, then we need to * run the global destructors now. */ #if defined(__USE_INIT_FINI__) FINI_SYMBOL(); 300124d8: eb000221 bl 30012d64 <_fini> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 300124dc: ebffffdf bl 30012460 rtems_shutdown_executive(status); 300124e0: e1a00004 mov r0, r4 300124e4: eb000036 bl 300125c4 300124e8: eafffffe b 300124e8 <_exit+0x18> <== NOT EXECUTED =============================================================================== 300057f8 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 300057f8: e92d41f0 push {r4, r5, r6, r7, r8, lr} <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 300057fc: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 30005800: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED 30005804: e1a04001 mov r4, r1 <== NOT EXECUTED 30005808: e1a06002 mov r6, r2 <== NOT EXECUTED /* * Get the parent node of the old path to be renamed. Find the parent path. */ old_parent_pathlen = rtems_filesystem_dirname ( old ); 3000580c: ebfffb2f bl 300044d0 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 30005810: e2507000 subs r7, r0, #0 <== NOT EXECUTED 30005814: e28d3018 add r3, sp, #24 <== NOT EXECUTED 30005818: 1a000005 bne 30005834 <_rename_r+0x3c> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 3000581c: e1a00004 mov r0, r4 <== NOT EXECUTED 30005820: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED 30005824: e1a02003 mov r2, r3 <== NOT EXECUTED 30005828: eb0000dd bl 30005ba4 <== NOT EXECUTED rtems_filesystem_location_info_t old_parent_loc; rtems_filesystem_location_info_t new_parent_loc; int i; int result; const char *name; bool free_old_parentloc = false; 3000582c: e1a05007 mov r5, r7 <== NOT EXECUTED 30005830: ea000008 b 30005858 <_rename_r+0x60> <== NOT EXECUTED old_parent_pathlen = rtems_filesystem_dirname ( old ); if ( old_parent_pathlen == 0 ) rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); else { result = rtems_filesystem_evaluate_path( old, old_parent_pathlen, 30005834: e3a02000 mov r2, #0 <== NOT EXECUTED 30005838: e58d2000 str r2, [sp] <== NOT EXECUTED 3000583c: e1a00004 mov r0, r4 <== NOT EXECUTED 30005840: e1a01007 mov r1, r7 <== NOT EXECUTED 30005844: e2822002 add r2, r2, #2 <== NOT EXECUTED 30005848: ebfffb02 bl 30004458 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 3000584c: e3500000 cmp r0, #0 <== NOT EXECUTED 30005850: 1a000054 bne 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED return -1; free_old_parentloc = true; 30005854: e3a05001 mov r5, #1 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 30005858: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 3000585c: e28de018 add lr, sp, #24 <== NOT EXECUTED 30005860: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 30005864: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 30005868: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 3000586c: e0844007 add r4, r4, r7 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 30005870: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 30005874: e1a00004 mov r0, r4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; 30005878: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 3000587c: eb00360b bl 300130b0 <== NOT EXECUTED 30005880: e1a01000 mov r1, r0 <== NOT EXECUTED 30005884: e1a00004 mov r0, r4 <== NOT EXECUTED 30005888: ebfffb1e bl 30004508 <== NOT EXECUTED 3000588c: e0844000 add r4, r4, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 30005890: e1a00004 mov r0, r4 <== NOT EXECUTED * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 30005894: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 30005898: eb003604 bl 300130b0 <== NOT EXECUTED 3000589c: e28d802c add r8, sp, #44 ; 0x2c <== NOT EXECUTED 300058a0: e1a01000 mov r1, r0 <== NOT EXECUTED 300058a4: e3a02000 mov r2, #0 <== NOT EXECUTED 300058a8: e1a00004 mov r0, r4 <== NOT EXECUTED 300058ac: e1a03008 mov r3, r8 <== NOT EXECUTED 300058b0: e58d2000 str r2, [sp] <== NOT EXECUTED 300058b4: ebfffabf bl 300043b8 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 300058b8: e3500000 cmp r0, #0 <== NOT EXECUTED 300058bc: 0a000003 beq 300058d0 <_rename_r+0xd8> <== NOT EXECUTED if ( free_old_parentloc ) 300058c0: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 300058c4: 128d0018 addne r0, sp, #24 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) 300058c8: 0a000036 beq 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED 300058cc: ea000013 b 30005920 <_rename_r+0x128> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); 300058d0: e28d4004 add r4, sp, #4 <== NOT EXECUTED 300058d4: e1a00006 mov r0, r6 <== NOT EXECUTED 300058d8: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED 300058dc: e1a02004 mov r2, r4 <== NOT EXECUTED 300058e0: eb0000af bl 30005ba4 <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 300058e4: e59d0044 ldr r0, [sp, #68] ; 0x44 <== NOT EXECUTED 300058e8: e1a01004 mov r1, r4 <== NOT EXECUTED 300058ec: e0860000 add r0, r6, r0 <== NOT EXECUTED 300058f0: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 300058f4: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 300058f8: e1a0e00f mov lr, pc <== NOT EXECUTED 300058fc: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( result != 0 ) { 30005900: e3500000 cmp r0, #0 <== NOT EXECUTED 30005904: 0a000007 beq 30005928 <_rename_r+0x130> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30005908: e1a00004 mov r0, r4 <== NOT EXECUTED 3000590c: ebfffb0c bl 30004544 <== NOT EXECUTED if ( free_old_parentloc ) 30005910: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30005914: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30005918: 1bfffb09 blne 30004544 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 3000591c: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED 30005920: ebfffb07 bl 30004544 <== NOT EXECUTED 30005924: ea00001f b 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED /* * Check to see if the caller is trying to rename across file system * boundaries. */ if ( old_parent_loc.mt_entry != new_parent_loc.mt_entry ) { 30005928: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 3000592c: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 30005930: e1520003 cmp r2, r3 <== NOT EXECUTED 30005934: 0a00000a beq 30005964 <_rename_r+0x16c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30005938: e1a00004 mov r0, r4 <== NOT EXECUTED 3000593c: ebfffb00 bl 30004544 <== NOT EXECUTED if ( free_old_parentloc ) 30005940: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30005944: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 30005948: 1bfffafd blne 30004544 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 3000594c: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED 30005950: ebfffafb bl 30004544 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 30005954: eb0028f0 bl 3000fd1c <__errno> <== NOT EXECUTED 30005958: e3a03012 mov r3, #18 <== NOT EXECUTED 3000595c: e5803000 str r3, [r0] <== NOT EXECUTED 30005960: ea000010 b 300059a8 <_rename_r+0x1b0> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 30005964: e28d6018 add r6, sp, #24 <== NOT EXECUTED 30005968: e1a01008 mov r1, r8 <== NOT EXECUTED 3000596c: e1a02004 mov r2, r4 <== NOT EXECUTED 30005970: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 30005974: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED 30005978: e1a00006 mov r0, r6 <== NOT EXECUTED 3000597c: e1a0e00f mov lr, pc <== NOT EXECUTED 30005980: e59cf040 ldr pc, [ip, #64] ; 0x40 <== NOT EXECUTED 30005984: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 30005988: e1a00004 mov r0, r4 <== NOT EXECUTED 3000598c: ebfffaec bl 30004544 <== NOT EXECUTED if ( free_old_parentloc ) 30005990: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 30005994: 11a00006 movne r0, r6 <== NOT EXECUTED 30005998: 1bfffae9 blne 30004544 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 3000599c: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED 300059a0: ebfffae7 bl 30004544 <== NOT EXECUTED return result; 300059a4: ea000000 b 300059ac <_rename_r+0x1b4> <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &old_loc, false ); if ( result != 0 ) { if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); return -1; 300059a8: e3e07000 mvn r7, #0 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 300059ac: e1a00007 mov r0, r7 <== NOT EXECUTED 300059b0: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED 300059b4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 30005a90 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 30005a90: e1a00001 mov r0, r1 <== NOT EXECUTED 30005a94: eaffffa9 b 30005940 <== NOT EXECUTED =============================================================================== 30001f60 : #include int chroot( const char *pathname ) { 30001f60: e92d4070 push {r4, r5, r6, lr} int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 30001f64: e59f50b4 ldr r5, [pc, #180] ; 30002020 30001f68: e59f30b4 ldr r3, [pc, #180] ; 30002024 30001f6c: e5954000 ldr r4, [r5] #include int chroot( const char *pathname ) { 30001f70: e24dd018 sub sp, sp, #24 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 30001f74: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 30001f78: e1a06000 mov r6, r0 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { 30001f7c: 1a000007 bne 30001fa0 rtems_libio_set_private_env(); /* try to set a new private env*/ 30001f80: eb0004b6 bl 30003260 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 30001f84: e5953000 ldr r3, [r5] 30001f88: e1530004 cmp r3, r4 30001f8c: 1a000003 bne 30001fa0 rtems_set_errno_and_return_minus_one( ENOTSUP ); 30001f90: eb002d05 bl 3000d3ac <__errno> <== NOT EXECUTED 30001f94: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 30001f98: e5803000 str r3, [r0] <== NOT EXECUTED 30001f9c: ea000008 b 30001fc4 <== NOT EXECUTED } result = chdir(pathname); 30001fa0: e1a00006 mov r0, r6 30001fa4: eb002024 bl 3000a03c if (result) { 30001fa8: e2502000 subs r2, r0, #0 30001fac: 0a000006 beq 30001fcc rtems_set_errno_and_return_minus_one( errno ); 30001fb0: eb002cfd bl 3000d3ac <__errno> <== NOT EXECUTED 30001fb4: e1a04000 mov r4, r0 <== NOT EXECUTED 30001fb8: eb002cfb bl 3000d3ac <__errno> <== NOT EXECUTED 30001fbc: e5903000 ldr r3, [r0] <== NOT EXECUTED 30001fc0: e5843000 str r3, [r4] <== NOT EXECUTED 30001fc4: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001fc8: ea000012 b 30002018 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 30001fcc: e28d4004 add r4, sp, #4 30001fd0: e59f0050 ldr r0, [pc, #80] ; 30002028 30001fd4: e3a01001 mov r1, #1 30001fd8: e1a03004 mov r3, r4 30001fdc: e58d2000 str r2, [sp] 30001fe0: eb000059 bl 3000214c 30001fe4: e2505000 subs r5, r0, #0 30001fe8: 1afffff0 bne 30001fb0 /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); 30001fec: e59f602c ldr r6, [pc, #44] ; 30002020 30001ff0: e5960000 ldr r0, [r6] 30001ff4: e2800018 add r0, r0, #24 30001ff8: eb00008e bl 30002238 rtems_filesystem_root = loc; 30001ffc: e8b4000f ldm r4!, {r0, r1, r2, r3} 30002000: e596c000 ldr ip, [r6] 30002004: e28cc018 add ip, ip, #24 30002008: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000200c: e5943000 ldr r3, [r4] return 0; 30002010: e1a00005 mov r0, r5 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; 30002014: e58c3000 str r3, [ip] return 0; } 30002018: e28dd018 add sp, sp, #24 3000201c: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 300086fc : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 300086fc: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} assert( 0 ); rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 30008700: e5936000 ldr r6, [r3] const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 30008704: e1a09000 mov r9, r0 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 30008708: e3560000 cmp r6, #0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 3000870c: e1a04001 mov r4, r1 30008710: e1a05003 mov r5, r3 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 30008714: 13a07000 movne r7, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 30008718: 159fa094 ldrne sl, [pc, #148] ; 300087b4 rtems_set_errno_and_return_minus_one( EIO ); } /* get the device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) 3000871c: 1a00001c bne 30008794 rtems_set_errno_and_return_minus_one( EFAULT ); 30008720: eb000965 bl 3000acbc <__errno> <== NOT EXECUTED 30008724: e3a0300e mov r3, #14 <== NOT EXECUTED 30008728: e5803000 str r3, [r0] <== NOT EXECUTED 3000872c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30008730: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED for (i = 0; i < rtems_device_table_size; i++) { if (!device_name_table[i].device_name) 30008734: e5968000 ldr r8, [r6] 30008738: e3580000 cmp r8, #0 3000873c: 0a000012 beq 3000878c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 30008740: e1a00009 mov r0, r9 30008744: e1a01008 mov r1, r8 30008748: e1a02004 mov r2, r4 3000874c: eb000d23 bl 3000bbe0 30008750: e3500000 cmp r0, #0 30008754: 1a00000c bne 3000878c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 30008758: e7d80004 ldrb r0, [r8, r4] 3000875c: e3500000 cmp r0, #0 30008760: 1a000009 bne 3000878c continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 30008764: e59f304c ldr r3, [pc, #76] ; 300087b8 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 30008768: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; 3000876c: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 30008770: e59f3044 ldr r3, [pc, #68] ; 300087bc 30008774: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 30008778: e59f3040 ldr r3, [pc, #64] ; 300087c0 3000877c: e5933000 ldr r3, [r3] 30008780: e5933028 ldr r3, [r3, #40] ; 0x28 30008784: e5853010 str r3, [r5, #16] return 0; 30008788: 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++) { 3000878c: e2877001 add r7, r7, #1 30008790: e2866014 add r6, r6, #20 30008794: e59a3000 ldr r3, [sl] 30008798: e1570003 cmp r7, r3 3000879c: 3affffe4 bcc 30008734 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 300087a0: eb000945 bl 3000acbc <__errno> 300087a4: e3a03002 mov r3, #2 300087a8: e5803000 str r3, [r0] 300087ac: e3e00000 mvn r0, #0 } 300087b0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 3000163c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 3000163c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 30001640: e59f7058 ldr r7, [pc, #88] ; 300016a0 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 30001644: e1a04000 mov r4, r0 rtems_device_name_t *device_name_table; /* allocate device only filesystem name table */ device_name_table = (rtems_device_name_t *)_Workspace_Allocate( 30001648: e5970000 ldr r0, [r7] 3000164c: e3a06014 mov r6, #20 30001650: e0000096 mul r0, r6, r0 30001654: eb001aa6 bl 300080f4 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 30001658: e2505000 subs r5, r0, #0 3000165c: 1a000004 bne 30001674 rtems_set_errno_and_return_minus_one( ENOMEM ); 30001660: eb002595 bl 3000acbc <__errno> <== NOT EXECUTED 30001664: e3a0300c mov r3, #12 <== NOT EXECUTED 30001668: e5803000 str r3, [r0] <== NOT EXECUTED 3000166c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001670: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( 30001674: e5972000 ldr r2, [r7] 30001678: e3a01000 mov r1, #0 3000167c: e0020296 mul r2, r6, r2 30001680: eb0027fa bl 3000b670 device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 30001684: e59f3018 ldr r3, [pc, #24] ; 300016a4 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; 30001688: e584501c str r5, [r4, #28] device_name_table, 0, sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* set file handlers */ temp_mt_entry->mt_fs_root.handlers = &devFS_file_handlers; 3000168c: e5843024 str r3, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 30001690: e2833038 add r3, r3, #56 ; 0x38 30001694: e5843028 str r3, [r4, #40] ; 0x28 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; 30001698: e3a00000 mov r0, #0 } 3000169c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 300016a8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 300016a8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 300016ac: e58d2000 str r2, [sp] 300016b0: e1a09003 mov r9, r3 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 300016b4: e5d03000 ldrb r3, [r0] const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 300016b8: e1a04000 mov r4, r0 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 300016bc: e3530064 cmp r3, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 300016c0: e1a05001 mov r5, r1 * condition and do not create the '/dev' and the 'path' * actually passed in is 'dev', not '/dev'. Just return 0 to * indicate we are OK. */ if ((path[0] == 'd') && (path[1] == 'e') && 300016c4: 1a000008 bne 300016ec 300016c8: e5d03001 ldrb r3, [r0, #1] 300016cc: e3530065 cmp r3, #101 ; 0x65 300016d0: 1a000005 bne 300016ec 300016d4: e5d03002 ldrb r3, [r0, #2] 300016d8: e3530076 cmp r3, #118 ; 0x76 300016dc: 1a000002 bne 300016ec (path[2] == 'v') && (path[3] == '\0')) 300016e0: e5d00003 ldrb r0, [r0, #3] 300016e4: e3500000 cmp r0, #0 300016e8: 0a000039 beq 300017d4 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 300016ec: e205aa0f and sl, r5, #61440 ; 0xf000 300016f0: e35a0a02 cmp sl, #8192 ; 0x2000 300016f4: 135a0a06 cmpne sl, #24576 ; 0x6000 300016f8: 03a0a000 moveq sl, #0 300016fc: 13a0a001 movne sl, #1 30001700: 0a000002 beq 30001710 rtems_set_errno_and_return_minus_one( EINVAL ); 30001704: eb00256c bl 3000acbc <__errno> <== NOT EXECUTED 30001708: e3a03016 mov r3, #22 <== NOT EXECUTED 3000170c: ea000008 b 30001734 <== NOT EXECUTED else rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; 30001710: e59d3028 ldr r3, [sp, #40] ; 0x28 30001714: e5936000 ldr r6, [r3] if (!device_name_table) 30001718: e3560000 cmp r6, #0 3000171c: 13e07000 mvnne r7, #0 30001720: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 30001724: 159fb0ac ldrne fp, [pc, #172] ; 300017d8 30001728: 1a000011 bne 30001774 rtems_filesystem_split_dev_t(dev, major, minor); /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); 3000172c: eb002562 bl 3000acbc <__errno> <== NOT EXECUTED 30001730: e3a0300e mov r3, #14 <== NOT EXECUTED 30001734: e5803000 str r3, [r0] <== NOT EXECUTED 30001738: e3e00000 mvn r0, #0 <== NOT EXECUTED 3000173c: ea000024 b 300017d4 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 30001740: e796100a ldr r1, [r6, sl] 30001744: e3510000 cmp r1, #0 30001748: 0a000006 beq 30001768 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 3000174c: e1a00004 mov r0, r4 <== NOT EXECUTED 30001750: eb002842 bl 3000b860 <== NOT EXECUTED 30001754: e3500000 cmp r0, #0 <== NOT EXECUTED 30001758: 1a000003 bne 3000176c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 3000175c: eb002556 bl 3000acbc <__errno> <== NOT EXECUTED 30001760: e3a03011 mov r3, #17 <== NOT EXECUTED 30001764: eafffff2 b 30001734 <== NOT EXECUTED if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) slot = i; 30001768: e1a07008 mov r7, r8 /* Find an empty slot in device name table */ device_name_table = (rtems_device_name_t *)pathloc->node_access; if (!device_name_table) rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 3000176c: e2888001 add r8, r8, #1 30001770: e28aa014 add sl, sl, #20 30001774: e59b3000 ldr r3, [fp] 30001778: e1580003 cmp r8, r3 3000177c: 3affffef bcc 30001740 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 30001780: e3770001 cmn r7, #1 30001784: 1a000004 bne 3000179c rtems_set_errno_and_return_minus_one( ENOMEM ); 30001788: eb00254b bl 3000acbc <__errno> <== NOT EXECUTED 3000178c: e3a0300c mov r3, #12 <== NOT EXECUTED 30001790: e5803000 str r3, [r0] <== NOT EXECUTED 30001794: e1a00007 mov r0, r7 <== NOT EXECUTED 30001798: ea00000d b 300017d4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000179c: e10fa000 mrs sl, CPSR 300017a0: e38a3080 orr r3, sl, #128 ; 0x80 300017a4: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 300017a8: e3a03014 mov r3, #20 300017ac: e0070793 mul r7, r3, r7 device_name_table[slot].device_name_length = strlen(path); 300017b0: e1a00004 mov r0, r4 if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 300017b4: e7864007 str r4, [r6, r7] device_name_table[slot].device_name_length = strlen(path); 300017b8: eb0028f0 bl 3000bb80 device_name_table[slot].major = major; 300017bc: e59d3000 ldr r3, [sp] if (slot == -1) rtems_set_errno_and_return_minus_one( ENOMEM ); _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 300017c0: e0868007 add r8, r6, r7 device_name_table[slot].device_name_length = strlen(path); 300017c4: e9880209 stmib r8, {r0, r3, r9} device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 300017c8: e5885010 str r5, [r8, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 300017cc: e129f00a msr CPSR_fc, sl _ISR_Enable(level); return 0; 300017d0: e3a00000 mov r0, #0 } 300017d4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 300018b4 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 300018b4: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 300018b8: e280c00c add ip, r0, #12 <== NOT EXECUTED 300018bc: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; 300018c0: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; 300018c4: e5902014 ldr r2, [r0, #20] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; 300018c8: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; 300018cc: e58d2014 str r2, [sp, #20] <== NOT EXECUTED args.bytes_moved = 0; 300018d0: e3a02000 mov r2, #0 <== NOT EXECUTED rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; 300018d4: e58d0000 str r0, [sp] <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; 300018d8: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 300018dc: e58d2018 str r2, [sp, #24] <== NOT EXECUTED status = rtems_io_read( 300018e0: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 300018e4: e593100c ldr r1, [r3, #12] <== NOT EXECUTED 300018e8: e1a0200d mov r2, sp <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 300018ec: e98d1800 stmib sp, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( 300018f0: eb000f3f bl 300055f4 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 300018f4: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 300018f8: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 300018fc: 1b001bb3 blne 300087d0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 30001900: e28dd01c add sp, sp, #28 <== NOT EXECUTED 30001904: e8bd8800 pop {fp, pc} <== NOT EXECUTED =============================================================================== 30001908 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 30001908: e5903000 ldr r3, [r0] int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 3000190c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; if (!the_dev) 30001910: e3530000 cmp r3, #0 30001914: 1a000004 bne 3000192c rtems_set_errno_and_return_minus_one( EFAULT ); 30001918: eb0024e7 bl 3000acbc <__errno> <== NOT EXECUTED 3000191c: e3a0300e mov r3, #14 <== NOT EXECUTED 30001920: e5803000 str r3, [r0] <== NOT EXECUTED 30001924: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001928: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 3000192c: e2830008 add r0, r3, #8 30001930: e890000d ldm r0, {r0, r2, r3} buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 30001934: e5810018 str r0, [r1, #24] 30001938: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; 3000193c: e581300c str r3, [r1, #12] return 0; 30001940: e3a00000 mov r0, #0 } 30001944: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 3000bf64 : rtems_libio_t *iop, rtems_off64_t length ) { return 0; } 3000bf64: e3a00000 mov r0, #0 <== NOT EXECUTED 3000bf68: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30002ce4 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002ce4: e59030b4 ldr r3, [r0, #180] ; 0xb4 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002ce8: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002cec: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 30002cf0: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 30002cf4: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 30002cf8: ebfffff5 bl 30002cd4 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 30002cfc: 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) { 30002d00: ea000008 b 30002d28 tty->rawOutBufState = rob_wait; 30002d04: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 30002d08: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 30002d0c: e3a01000 mov r1, #0 <== NOT EXECUTED 30002d10: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 30002d14: e1a02001 mov r2, r1 <== NOT EXECUTED 30002d18: eb0008ca bl 30005048 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30002d1c: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 30002d20: 1b000a5f blne 300056a4 <== NOT EXECUTED rtems_interrupt_disable (level); 30002d24: ebffffea bl 30002cd4 <== 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) { 30002d28: e5942084 ldr r2, [r4, #132] ; 0x84 30002d2c: e5943080 ldr r3, [r4, #128] ; 0x80 30002d30: e1520003 cmp r2, r3 30002d34: 1afffff2 bne 30002d04 30002d38: e129f000 msr CPSR_fc, r0 30002d3c: e8bd8030 pop {r4, r5, pc} =============================================================================== 300039bc : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 300039bc: 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) { 300039c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} if (tty->ccount == 0) 300039c4: 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) { 300039c8: e1a04000 mov r4, r0 300039cc: e1a07001 mov r7, r1 if (tty->ccount == 0) 300039d0: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; if (lineFlag) { 300039d4: e3510000 cmp r1, #0 300039d8: 0a000060 beq 30003b60 if (!(tty->termios.c_lflag & ECHO)) { 300039dc: e590303c ldr r3, [r0, #60] ; 0x3c 300039e0: e2132008 ands r2, r3, #8 tty->ccount = 0; 300039e4: 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)) { 300039e8: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 300039ec: e2133010 ands r3, r3, #16 300039f0: 1a00005a bne 30003b60 tty->ccount = 0; 300039f4: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 300039f8: e1a01004 mov r1, r4 <== NOT EXECUTED 300039fc: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 30003a00: ebffffca bl 30003930 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 30003a04: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30003a08: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 30003a0c: 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) 30003a10: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 30003a14: ea00000b b 30003a48 <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { 30003a18: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 30003a1c: e2411001 sub r1, r1, #1 30003a20: e594001c ldr r0, [r4, #28] 30003a24: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { 30003a28: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 30003a2c: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { 30003a30: 0a000047 beq 30003b54 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 30003a34: e3570000 cmp r7, #0 30003a38: 1a000005 bne 30003a54 30003a3c: e3130010 tst r3, #16 30003a40: 1a000003 bne 30003a54 echo (tty->termios.c_cc[VERASE], tty); 30003a44: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 30003a48: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 30003a4c: 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); 30003a50: eaffffb6 b 30003930 <== NOT EXECUTED } else if (c == '\t') { 30003a54: e3550009 cmp r5, #9 30003a58: 1a00001f bne 30003adc int col = tty->read_start_column; 30003a5c: 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)) { 30003a60: 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; 30003a64: 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) 30003a68: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30003a6c: ea00000c b 30003aa4 c = tty->cbuf[i++]; 30003a70: e7d0c002 ldrb ip, [r0, r2] 30003a74: e2822001 add r2, r2, #1 if (c == '\t') { 30003a78: e35c0009 cmp ip, #9 col = (col | 7) + 1; 30003a7c: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 30003a80: 0a000006 beq 30003aa0 col = (col | 7) + 1; } else if (iscntrl (c)) { 30003a84: e088c00c add ip, r8, ip 30003a88: e5dcc001 ldrb ip, [ip, #1] 30003a8c: e31c0020 tst ip, #32 30003a90: 0a000002 beq 30003aa0 if (tty->termios.c_lflag & ECHOCTL) 30003a94: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 30003a98: 12855002 addne r5, r5, #2 <== NOT EXECUTED 30003a9c: ea000000 b 30003aa4 <== NOT EXECUTED } else { col++; 30003aa0: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 30003aa4: e1520001 cmp r2, r1 30003aa8: 1afffff0 bne 30003a70 30003aac: ea000006 b 30003acc /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 30003ab0: e59f00bc ldr r0, [pc, #188] ; 30003b74 30003ab4: e3a01001 mov r1, #1 30003ab8: e1a02004 mov r2, r4 30003abc: ebffff07 bl 300036e0 tty->column--; 30003ac0: e5943028 ldr r3, [r4, #40] ; 0x28 30003ac4: e2433001 sub r3, r3, #1 30003ac8: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { 30003acc: e5943028 ldr r3, [r4, #40] ; 0x28 30003ad0: e1530005 cmp r3, r5 30003ad4: cafffff5 bgt 30003ab0 30003ad8: ea00001d b 30003b54 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 30003adc: e5962000 ldr r2, [r6] 30003ae0: e2855001 add r5, r5, #1 30003ae4: e7d22005 ldrb r2, [r2, r5] 30003ae8: e3120020 tst r2, #32 30003aec: 0a000009 beq 30003b18 30003af0: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 30003af4: 0a000007 beq 30003b18 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 30003af8: e59f0078 ldr r0, [pc, #120] ; 30003b78 <== NOT EXECUTED 30003afc: e3a01003 mov r1, #3 <== NOT EXECUTED 30003b00: e1a02004 mov r2, r4 <== NOT EXECUTED 30003b04: ebfffef5 bl 300036e0 <== NOT EXECUTED if (tty->column) 30003b08: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 30003b0c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 30003b10: 12433001 subne r3, r3, #1 <== NOT EXECUTED 30003b14: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 30003b18: e5963000 ldr r3, [r6] 30003b1c: e7d33005 ldrb r3, [r3, r5] 30003b20: e3130020 tst r3, #32 30003b24: 0a000002 beq 30003b34 30003b28: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 30003b2c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 30003b30: 0a000007 beq 30003b54 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 30003b34: e59f003c ldr r0, [pc, #60] ; 30003b78 30003b38: e3a01003 mov r1, #3 30003b3c: e1a02004 mov r2, r4 30003b40: ebfffee6 bl 300036e0 if (tty->column) 30003b44: e5943028 ldr r3, [r4, #40] ; 0x28 30003b48: e3530000 cmp r3, #0 tty->column--; 30003b4c: 12433001 subne r3, r3, #1 30003b50: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) 30003b54: e3570000 cmp r7, #0 30003b58: 1a000001 bne 30003b64 30003b5c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 30003b60: e59f6014 ldr r6, [pc, #20] ; 30003b7c echo ('\n', tty); return; } } while (tty->ccount) { 30003b64: e5941020 ldr r1, [r4, #32] 30003b68: e3510000 cmp r1, #0 30003b6c: 1affffa9 bne 30003a18 30003b70: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 30002728 : int fcntl( int fd, int cmd, ... ) { 30002728: e92d000e push {r1, r2, r3} 3000272c: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30002730: e59f21a4 ldr r2, [pc, #420] ; 300028dc ... ) { int ret; va_list ap; va_start( ap, cmd ); 30002734: e28d301c add r3, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30002738: e5921000 ldr r1, [r2] int fcntl( int fd, int cmd, ... ) { 3000273c: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30002740: e1500001 cmp r0, r1 ... ) { int ret; va_list ap; va_start( ap, cmd ); 30002744: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 30002748: 2a000006 bcs 30002768 iop = rtems_libio_iop( fd ); 3000274c: e59f218c ldr r2, [pc, #396] ; 300028e0 30002750: e3a04038 mov r4, #56 ; 0x38 30002754: e5922000 ldr r2, [r2] 30002758: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); 3000275c: e5940014 ldr r0, [r4, #20] 30002760: e3100c01 tst r0, #256 ; 0x100 30002764: 1a000002 bne 30002774 30002768: eb002cd2 bl 3000dab8 <__errno> 3000276c: e3a03009 mov r3, #9 30002770: ea000047 b 30002894 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 30002774: e3570009 cmp r7, #9 30002778: 979ff107 ldrls pc, [pc, r7, lsl #2] 3000277c: ea000042 b 3000288c 30002780: 300027a8 .word 0x300027a8 <== NOT EXECUTED 30002784: 30002818 .word 0x30002818 <== NOT EXECUTED 30002788: 30002828 .word 0x30002828 <== NOT EXECUTED 3000278c: 30002848 .word 0x30002848 <== NOT EXECUTED 30002790: 30002854 .word 0x30002854 <== NOT EXECUTED 30002794: 30002880 .word 0x30002880 <== NOT EXECUTED 30002798: 30002880 .word 0x30002880 <== NOT EXECUTED 3000279c: 30002880 .word 0x30002880 <== NOT EXECUTED 300027a0: 30002880 .word 0x30002880 <== NOT EXECUTED 300027a4: 30002880 .word 0x30002880 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 300027a8: e5933000 ldr r3, [r3] if ( fd2 ) 300027ac: e3530000 cmp r3, #0 300027b0: 0a000004 beq 300027c8 diop = rtems_libio_iop( fd2 ); 300027b4: e1530001 cmp r3, r1 <== NOT EXECUTED 300027b8: 33a06038 movcc r6, #56 ; 0x38 <== NOT EXECUTED 300027bc: 30262693 mlacc r6, r3, r6, r2 <== NOT EXECUTED 300027c0: 3a000005 bcc 300027dc <== NOT EXECUTED 300027c4: ea000003 b 300027d8 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 300027c8: eb000190 bl 30002e10 if ( diop == 0 ) { 300027cc: e2506000 subs r6, r0, #0 300027d0: 1a000001 bne 300027dc 300027d4: ea00003b b 300028c8 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 300027d8: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 300027dc: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; 300027e0: e286c018 add ip, r6, #24 300027e4: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; 300027e8: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; 300027ec: e8b5000f ldm r5!, {r0, r1, r2, r3} 300027f0: e8ac000f stmia ip!, {r0, r1, r2, r3} 300027f4: e5953000 ldr r3, [r5] 300027f8: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); 300027fc: e59f30dc ldr r3, [pc, #220] ; 300028e0 30002800: e5933000 ldr r3, [r3] 30002804: e0636006 rsb r6, r3, r6 30002808: e59f30d4 ldr r3, [pc, #212] ; 300028e4 3000280c: e1a061c6 asr r6, r6, #3 30002810: e0060693 mul r6, r3, r6 30002814: ea000020 b 3000289c break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 30002818: e3100b02 tst r0, #2048 ; 0x800 3000281c: 03a06000 moveq r6, #0 30002820: 13a06001 movne r6, #1 30002824: ea00001e b 300028a4 * 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 ) ) 30002828: e5936000 ldr r6, [r3] 3000282c: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 30002830: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 30002834: 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; 30002838: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 3000283c: 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 ) ) 30002840: 0a000017 beq 300028a4 30002844: ea00000b b 30002878 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 30002848: eb00015e bl 30002dc8 3000284c: e1a06000 mov r6, r0 30002850: ea000011 b 3000289c break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 30002854: e5930000 ldr r0, [r3] 30002858: eb00014d bl 30002d94 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 3000285c: e5942014 ldr r2, [r4, #20] 30002860: e59f3080 ldr r3, [pc, #128] ; 300028e8 30002864: e3c22c02 bic r2, r2, #512 ; 0x200 30002868: e0003003 and r3, r0, r3 3000286c: e3c22001 bic r2, r2, #1 30002870: e1833002 orr r3, r3, r2 30002874: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 30002878: e3a06000 mov r6, #0 3000287c: ea000008 b 300028a4 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 30002880: eb002c8c bl 3000dab8 <__errno> 30002884: e3a03086 mov r3, #134 ; 0x86 30002888: ea000001 b 30002894 ret = -1; break; default: errno = EINVAL; 3000288c: eb002c89 bl 3000dab8 <__errno> 30002890: e3a03016 mov r3, #22 30002894: e5803000 str r3, [r0] 30002898: ea00000a b 300028c8 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 3000289c: e3560000 cmp r6, #0 300028a0: ba000009 blt 300028cc int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 300028a4: e5943020 ldr r3, [r4, #32] 300028a8: e1a01004 mov r1, r4 300028ac: e1a00007 mov r0, r7 300028b0: e1a0e00f mov lr, pc 300028b4: e593f030 ldr pc, [r3, #48] ; 0x30 if (err) { 300028b8: e2504000 subs r4, r0, #0 300028bc: 0a000002 beq 300028cc errno = err; 300028c0: eb002c7c bl 3000dab8 <__errno> <== NOT EXECUTED 300028c4: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; 300028c8: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 300028cc: e1a00006 mov r0, r6 300028d0: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 300028d4: e28dd00c add sp, sp, #12 300028d8: e12fff1e bx lr =============================================================================== 3000ad08 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000ad08: e92d45f7 push {r0, r1, r2, r4, r5, r6, r7, r8, sl, lr} 3000ad0c: e1a06000 mov r6, r0 3000ad10: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); 3000ad14: ebffff87 bl 3000ab38 if (err) 3000ad18: e250a000 subs sl, r0, #0 3000ad1c: 1a0000c9 bne 3000b048 return err; pipe = *pipep; 3000ad20: e5964000 ldr r4, [r6] if (pipe == NULL) { 3000ad24: e3540000 cmp r4, #0 3000ad28: 1a00004b bne 3000ae5c { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 3000ad2c: e2800034 add r0, r0, #52 ; 0x34 3000ad30: ebffe22d bl 300035ec if (pipe == NULL) 3000ad34: e2508000 subs r8, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); 3000ad38: e1a04000 mov r4, r0 if (pipe == NULL) 3000ad3c: 0a000044 beq 3000ae54 return err; memset(pipe, 0, sizeof(pipe_control_t)); 3000ad40: e1a0100a mov r1, sl 3000ad44: e3a02034 mov r2, #52 ; 0x34 3000ad48: eb00109d bl 3000efc4 pipe->Size = PIPE_BUF; 3000ad4c: e3a00c02 mov r0, #512 ; 0x200 3000ad50: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); 3000ad54: ebffe224 bl 300035ec if (! pipe->Buffer) 3000ad58: 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); 3000ad5c: e5840000 str r0, [r4] if (! pipe->Buffer) 3000ad60: 0a000039 beq 3000ae4c goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), 3000ad64: e59f52e4 ldr r5, [pc, #740] ; 3000b050 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 3000ad68: e59f02e4 ldr r0, [pc, #740] ; 3000b054 rtems_build_name ('P', 'I', 'r', c), 3000ad6c: e5d53000 ldrb r3, [r5] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( 3000ad70: e1a0100a mov r1, sl 3000ad74: e1830000 orr r0, r3, r0 3000ad78: e1a0200a mov r2, sl 3000ad7c: e284302c add r3, r4, #44 ; 0x2c 3000ad80: eb00068c bl 3000c7b8 3000ad84: e2501000 subs r1, r0, #0 3000ad88: 1a00002d bne 3000ae44 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), 3000ad8c: e5d53000 ldrb r3, [r5] 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( 3000ad90: e59f02c0 ldr r0, [pc, #704] ; 3000b058 3000ad94: e1a02001 mov r2, r1 3000ad98: e1830000 orr r0, r3, r0 3000ad9c: e2843030 add r3, r4, #48 ; 0x30 3000ada0: eb000684 bl 3000c7b8 3000ada4: e2503000 subs r3, r0, #0 3000ada8: 1a000023 bne 3000ae3c 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, 3000adac: e5d52000 ldrb r2, [r5] 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( 3000adb0: e59f02a4 ldr r0, [pc, #676] ; 3000b05c 3000adb4: e2841028 add r1, r4, #40 ; 0x28 3000adb8: e58d1000 str r1, [sp] 3000adbc: e1820000 orr r0, r2, r0 3000adc0: e3a01001 mov r1, #1 3000adc4: e3a02010 mov r2, #16 3000adc8: ebffed89 bl 300063f4 3000adcc: e3500000 cmp r0, #0 3000add0: 1a000017 bne 3000ae34 /* Set barriers to be interruptible by signals. */ static void pipe_interruptible(pipe_control_t *pipe) { Objects_Locations location; _Barrier_Get(pipe->readBarrier, &location)->Barrier.Wait_queue.state 3000add4: e28d8004 add r8, sp, #4 Objects_Id id, Objects_Locations *location ) { return (Barrier_Control *) _Objects_Get( &_Barrier_Information, id, location ); 3000add8: e594102c ldr r1, [r4, #44] ; 0x2c 3000addc: e1a02008 mov r2, r8 3000ade0: e59f0278 ldr r0, [pc, #632] ; 3000b060 3000ade4: ebfff3de bl 30007d64 <_Objects_Get> |= STATES_INTERRUPTIBLE_BY_SIGNAL; 3000ade8: e590304c ldr r3, [r0, #76] ; 0x4c 3000adec: e3833201 orr r3, r3, #268435456 ; 0x10000000 3000adf0: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); 3000adf4: ebfff5de bl 30008574 <_Thread_Enable_dispatch> 3000adf8: e1a02008 mov r2, r8 3000adfc: e5941030 ldr r1, [r4, #48] ; 0x30 3000ae00: e59f0258 ldr r0, [pc, #600] ; 3000b060 3000ae04: ebfff3d6 bl 30007d64 <_Objects_Get> _Barrier_Get(pipe->writeBarrier, &location)->Barrier.Wait_queue.state |= STATES_INTERRUPTIBLE_BY_SIGNAL; 3000ae08: e590304c ldr r3, [r0, #76] ; 0x4c 3000ae0c: e3833201 orr r3, r3, #268435456 ; 0x10000000 3000ae10: e580304c str r3, [r0, #76] ; 0x4c _Thread_Enable_dispatch(); 3000ae14: ebfff5d6 bl 30008574 <_Thread_Enable_dispatch> #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 3000ae18: e5d53000 ldrb r3, [r5] 3000ae1c: e353007a cmp r3, #122 ; 0x7a 3000ae20: e2832001 add r2, r3, #1 c = 'a'; 3000ae24: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') 3000ae28: e5c52000 strb r2, [r5] c = 'a'; 3000ae2c: 05c53000 strbeq r3, [r5] 3000ae30: ea000009 b 3000ae5c return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); 3000ae34: e5980030 ldr r0, [r8, #48] ; 0x30 3000ae38: eb00068e bl 3000c878 err_wbar: rtems_barrier_delete(pipe->readBarrier); 3000ae3c: e598002c ldr r0, [r8, #44] ; 0x2c 3000ae40: eb00068c bl 3000c878 err_rbar: free(pipe->Buffer); 3000ae44: e5980000 ldr r0, [r8] 3000ae48: ebffe077 bl 3000302c err_buf: free(pipe); 3000ae4c: e1a00008 mov r0, r8 3000ae50: ebffe075 bl 3000302c if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 3000ae54: e3e0a00b mvn sl, #11 3000ae58: ea00000d b 3000ae94 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) 3000ae5c: e3a01000 mov r1, #0 3000ae60: e5940028 ldr r0, [r4, #40] ; 0x28 3000ae64: e1a02001 mov r2, r1 3000ae68: ebffedf3 bl 3000663c err = -EINTR; if (*pipep == NULL) { 3000ae6c: e5963000 ldr r3, [r6] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; 3000ae70: e3500000 cmp r0, #0 3000ae74: 03a0a000 moveq sl, #0 3000ae78: 13e0a003 mvnne sl, #3 if (*pipep == NULL) { 3000ae7c: e3530000 cmp r3, #0 3000ae80: 1a000003 bne 3000ae94 if (err) 3000ae84: e35a0000 cmp sl, #0 pipe_free(pipe); else *pipep = pipe; 3000ae88: 05864000 streq r4, [r6] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); 3000ae8c: 11a00004 movne r0, r4 3000ae90: 1bffff4c blne 3000abc8 else *pipep = pipe; } out: pipe_unlock(); 3000ae94: ebffff58 bl 3000abfc pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) 3000ae98: e35a0000 cmp sl, #0 3000ae9c: 1a000069 bne 3000b048 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { 3000aea0: e5973014 ldr r3, [r7, #20] int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; 3000aea4: e5964000 ldr r4, [r6] switch (LIBIO_ACCMODE(iop)) { 3000aea8: e2033006 and r3, r3, #6 3000aeac: e3530004 cmp r3, #4 3000aeb0: 0a000024 beq 3000af48 3000aeb4: e3530006 cmp r3, #6 3000aeb8: 0a000047 beq 3000afdc 3000aebc: e3530002 cmp r3, #2 3000aec0: 1a000059 bne 3000b02c case LIBIO_FLAGS_READ: pipe->readerCounter ++; 3000aec4: e5943020 ldr r3, [r4, #32] 3000aec8: e2833001 add r3, r3, #1 3000aecc: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) 3000aed0: e5943010 ldr r3, [r4, #16] 3000aed4: e2832001 add r2, r3, #1 3000aed8: e3530000 cmp r3, #0 3000aedc: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); 3000aee0: 05940030 ldreq r0, [r4, #48] ; 0x30 3000aee4: 028d1008 addeq r1, sp, #8 3000aee8: 0b00068a bleq 3000c918 if (pipe->Writers == 0) { 3000aeec: e5943014 ldr r3, [r4, #20] 3000aef0: e3530000 cmp r3, #0 3000aef4: 1a00004c bne 3000b02c /* Not an error */ if (LIBIO_NODELAY(iop)) 3000aef8: e5973014 ldr r3, [r7, #20] 3000aefc: e3130001 tst r3, #1 3000af00: 1a000049 bne 3000b02c break; prevCounter = pipe->writerCounter; 3000af04: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); 3000af08: e5940028 ldr r0, [r4, #40] ; 0x28 3000af0c: ebffee10 bl 30006754 if (! PIPE_READWAIT(pipe)) 3000af10: e3a01000 mov r1, #0 3000af14: e594002c ldr r0, [r4, #44] ; 0x2c 3000af18: eb000694 bl 3000c970 3000af1c: e2501000 subs r1, r0, #0 3000af20: 1a000044 bne 3000b038 goto out_error; if (! PIPE_LOCK(pipe)) 3000af24: e5940028 ldr r0, [r4, #40] ; 0x28 3000af28: e1a02001 mov r2, r1 3000af2c: ebffedc2 bl 3000663c 3000af30: e3500000 cmp r0, #0 3000af34: 1a00003f bne 3000b038 goto out_error; } while (prevCounter == pipe->writerCounter); 3000af38: e5943024 ldr r3, [r4, #36] ; 0x24 3000af3c: e1550003 cmp r5, r3 3000af40: 0afffff0 beq 3000af08 3000af44: ea000038 b 3000b02c } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; 3000af48: e5943024 ldr r3, [r4, #36] ; 0x24 3000af4c: e2833001 add r3, r3, #1 3000af50: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) 3000af54: e5943014 ldr r3, [r4, #20] 3000af58: e2832001 add r2, r3, #1 3000af5c: e3530000 cmp r3, #0 3000af60: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); 3000af64: 0594002c ldreq r0, [r4, #44] ; 0x2c 3000af68: 028d1008 addeq r1, sp, #8 3000af6c: 0b000669 bleq 3000c918 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 3000af70: e5943010 ldr r3, [r4, #16] 3000af74: e3530000 cmp r3, #0 3000af78: 1a00002b bne 3000b02c 3000af7c: e5973014 ldr r3, [r7, #20] 3000af80: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; 3000af84: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { 3000af88: 0a000003 beq 3000af9c PIPE_UNLOCK(pipe); 3000af8c: e5940028 ldr r0, [r4, #40] ; 0x28 3000af90: ebffedef bl 30006754 err = -ENXIO; 3000af94: e3e0a005 mvn sl, #5 goto out_error; 3000af98: ea000027 b 3000b03c if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); 3000af9c: e5940028 ldr r0, [r4, #40] ; 0x28 3000afa0: ebffedeb bl 30006754 if (! PIPE_WRITEWAIT(pipe)) 3000afa4: e3a01000 mov r1, #0 3000afa8: e5940030 ldr r0, [r4, #48] ; 0x30 3000afac: eb00066f bl 3000c970 3000afb0: e2501000 subs r1, r0, #0 3000afb4: 1a00001f bne 3000b038 goto out_error; if (! PIPE_LOCK(pipe)) 3000afb8: e5940028 ldr r0, [r4, #40] ; 0x28 3000afbc: e1a02001 mov r2, r1 3000afc0: ebffed9d bl 3000663c 3000afc4: e3500000 cmp r0, #0 3000afc8: 1a00001a bne 3000b038 goto out_error; } while (prevCounter == pipe->readerCounter); 3000afcc: e5943020 ldr r3, [r4, #32] 3000afd0: e1550003 cmp r5, r3 3000afd4: 0afffff0 beq 3000af9c 3000afd8: ea000013 b 3000b02c } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; 3000afdc: e5943020 ldr r3, [r4, #32] 3000afe0: e2833001 add r3, r3, #1 3000afe4: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) 3000afe8: e5943010 ldr r3, [r4, #16] 3000afec: e2832001 add r2, r3, #1 3000aff0: e3530000 cmp r3, #0 3000aff4: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); 3000aff8: 05940030 ldreq r0, [r4, #48] ; 0x30 3000affc: 028d1008 addeq r1, sp, #8 3000b000: 0b000644 bleq 3000c918 pipe->writerCounter ++; 3000b004: e5943024 ldr r3, [r4, #36] ; 0x24 3000b008: e2833001 add r3, r3, #1 3000b00c: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) 3000b010: e5943014 ldr r3, [r4, #20] 3000b014: e2832001 add r2, r3, #1 3000b018: e3530000 cmp r3, #0 3000b01c: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); 3000b020: 0594002c ldreq r0, [r4, #44] ; 0x2c 3000b024: 028d1008 addeq r1, sp, #8 3000b028: 0b00063a bleq 3000c918 break; } PIPE_UNLOCK(pipe); 3000b02c: e5940028 ldr r0, [r4, #40] ; 0x28 3000b030: ebffedc7 bl 30006754 return 0; 3000b034: ea000003 b 3000b048 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; 3000b038: e3e0a003 mvn sl, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); 3000b03c: e1a00006 mov r0, r6 3000b040: e1a01007 mov r1, r7 3000b044: ebfffef6 bl 3000ac24 return err; } 3000b048: e1a0000a mov r0, sl 3000b04c: e8bd85fe pop {r1, r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 3000296c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 3000296c: e59f3104 ldr r3, [pc, #260] ; 30002a78 long fpathconf( int fd, int name ) { 30002970: 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); 30002974: e5933000 ldr r3, [r3] 30002978: e1500003 cmp r0, r3 3000297c: 2a000006 bcs 3000299c iop = rtems_libio_iop(fd); 30002980: e59f30f4 ldr r3, [pc, #244] ; 30002a7c 30002984: e3a02038 mov r2, #56 ; 0x38 30002988: e5933000 ldr r3, [r3] 3000298c: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); 30002990: e5903014 ldr r3, [r0, #20] 30002994: e3130c01 tst r3, #256 ; 0x100 30002998: 1a000002 bne 300029a8 3000299c: eb002c45 bl 3000dab8 <__errno> 300029a0: e3a03009 mov r3, #9 300029a4: ea000003 b 300029b8 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 300029a8: e3130002 tst r3, #2 300029ac: 1a000004 bne 300029c4 300029b0: eb002c40 bl 3000dab8 <__errno> <== NOT EXECUTED 300029b4: e3a03016 mov r3, #22 <== NOT EXECUTED 300029b8: e5803000 str r3, [r0] 300029bc: e3e00000 mvn r0, #0 300029c0: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 300029c4: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 300029c8: e351000b cmp r1, #11 300029cc: 979ff101 ldrls pc, [pc, r1, lsl #2] 300029d0: ea000023 b 30002a64 300029d4: 30002a04 .word 0x30002a04 <== NOT EXECUTED 300029d8: 30002a0c .word 0x30002a0c <== NOT EXECUTED 300029dc: 30002a14 .word 0x30002a14 <== NOT EXECUTED 300029e0: 30002a1c .word 0x30002a1c <== NOT EXECUTED 300029e4: 30002a24 .word 0x30002a24 <== NOT EXECUTED 300029e8: 30002a2c .word 0x30002a2c <== NOT EXECUTED 300029ec: 30002a34 .word 0x30002a34 <== NOT EXECUTED 300029f0: 30002a3c .word 0x30002a3c <== NOT EXECUTED 300029f4: 30002a44 .word 0x30002a44 <== NOT EXECUTED 300029f8: 30002a4c .word 0x30002a4c <== NOT EXECUTED 300029fc: 30002a54 .word 0x30002a54 <== NOT EXECUTED 30002a00: 30002a5c .word 0x30002a5c <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 30002a04: e5930038 ldr r0, [r3, #56] ; 0x38 break; 30002a08: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 30002a0c: e593003c ldr r0, [r3, #60] ; 0x3c break; 30002a10: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 30002a14: e5930040 ldr r0, [r3, #64] ; 0x40 break; 30002a18: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 30002a1c: e5930044 ldr r0, [r3, #68] ; 0x44 break; 30002a20: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 30002a24: e5930048 ldr r0, [r3, #72] ; 0x48 break; 30002a28: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 30002a2c: e593004c ldr r0, [r3, #76] ; 0x4c break; 30002a30: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 30002a34: e5930054 ldr r0, [r3, #84] ; 0x54 break; 30002a38: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 30002a3c: e5930058 ldr r0, [r3, #88] ; 0x58 break; 30002a40: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 30002a44: e5930064 ldr r0, [r3, #100] ; 0x64 break; 30002a48: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 30002a4c: e5930050 ldr r0, [r3, #80] ; 0x50 break; 30002a50: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 30002a54: e593005c ldr r0, [r3, #92] ; 0x5c break; 30002a58: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 30002a5c: e5930060 ldr r0, [r3, #96] ; 0x60 break; 30002a60: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 30002a64: eb002c13 bl 3000dab8 <__errno> 30002a68: e3a03016 mov r3, #22 30002a6c: e5803000 str r3, [r0] 30002a70: e3e00000 mvn r0, #0 break; } return return_value; } 30002a74: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 3000322c : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3000322c: e59f3028 ldr r3, [pc, #40] ; 3000325c <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 30003230: e92d4010 push {r4, lr} <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 30003234: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 30003238: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 3000323c: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 30003240: e2800004 add r0, r0, #4 <== NOT EXECUTED 30003244: ebfffbfb bl 30002238 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 30003248: e2840018 add r0, r4, #24 <== NOT EXECUTED 3000324c: ebfffbf9 bl 30002238 <== NOT EXECUTED free(env); 30003250: e1a00004 mov r0, r4 <== NOT EXECUTED } } 30003254: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 30003258: eafffbfb b 3000224c <== NOT EXECUTED =============================================================================== 30009574 : int ftruncate( int fd, off_t length ) { 30009574: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30009578: e59f30b8 ldr r3, [pc, #184] ; 30009638 int ftruncate( int fd, off_t length ) { 3000957c: e24dd014 sub sp, sp, #20 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30009580: e5933000 ldr r3, [r3] int ftruncate( int fd, off_t length ) { 30009584: e1a05001 mov r5, r1 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30009588: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 3000958c: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 30009590: 2a000006 bcs 300095b0 iop = rtems_libio_iop( fd ); 30009594: e59f30a0 ldr r3, [pc, #160] ; 3000963c 30009598: e3a04038 mov r4, #56 ; 0x38 3000959c: e5933000 ldr r3, [r3] 300095a0: e0243490 mla r4, r0, r4, r3 rtems_libio_check_is_open(iop); 300095a4: e5943014 ldr r3, [r4, #20] 300095a8: e3130c01 tst r3, #256 ; 0x100 300095ac: 1a000002 bne 300095bc 300095b0: eb000d75 bl 3000cb8c <__errno> 300095b4: e3a03009 mov r3, #9 300095b8: ea000013 b 3000960c /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 300095bc: e1a0c00d mov ip, sp 300095c0: e284e018 add lr, r4, #24 300095c4: e8be000f ldm lr!, {r0, r1, r2, r3} 300095c8: e8ac000f stmia ip!, {r0, r1, r2, r3} 300095cc: e59e3000 ldr r3, [lr] if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 300095d0: e1a0000d mov r0, sp /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 300095d4: e58c3000 str r3, [ip] if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 300095d8: e59d300c ldr r3, [sp, #12] 300095dc: e1a0e00f mov lr, pc 300095e0: e593f010 ldr pc, [r3, #16] 300095e4: e3500001 cmp r0, #1 300095e8: 1a000002 bne 300095f8 rtems_set_errno_and_return_minus_one( EISDIR ); 300095ec: eb000d66 bl 3000cb8c <__errno> <== NOT EXECUTED 300095f0: e3a03015 mov r3, #21 <== NOT EXECUTED 300095f4: ea000004 b 3000960c <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 300095f8: e5943014 ldr r3, [r4, #20] 300095fc: e3130004 tst r3, #4 30009600: 1a000004 bne 30009618 30009604: eb000d60 bl 3000cb8c <__errno> 30009608: e3a03016 mov r3, #22 3000960c: e5803000 str r3, [r0] 30009610: e3e00000 mvn r0, #0 30009614: ea000005 b 30009630 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 30009618: e5943020 ldr r3, [r4, #32] 3000961c: e1a00004 mov r0, r4 30009620: e1a01005 mov r1, r5 30009624: e1a02006 mov r2, r6 30009628: e1a0e00f mov lr, pc 3000962c: e593f020 ldr pc, [r3, #32] } 30009630: e28dd014 add sp, sp, #20 30009634: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 3000bf6c : 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 ) 3000bf6c: e5903018 ldr r3, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3000bf70: 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 ) 3000bf74: e593304c ldr r3, [r3, #76] ; 0x4c 3000bf78: e3530001 cmp r3, #1 3000bf7c: 1a000005 bne 3000bf98 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; 3000bf80: e3a03000 mov r3, #0 3000bf84: e3a04000 mov r4, #0 3000bf88: e580300c str r3, [r0, #12] 3000bf8c: e5804010 str r4, [r0, #16] return 0; 3000bf90: e3a00000 mov r0, #0 3000bf94: 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 */ 3000bf98: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } 3000bf9c: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 30003b80 : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 30003b80: e5913030 ldr r3, [r1, #48] ; 0x30 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30003b84: e92d4030 push {r4, r5, lr} if (tty->termios.c_iflag & ISTRIP) 30003b88: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30003b8c: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 30003b90: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) 30003b94: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 30003b98: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 30003b9c: 0a000007 beq 30003bc0 c = tolower (c); 30003ba0: e59f2164 ldr r2, [pc, #356] ; 30003d0c 30003ba4: e5922000 ldr r2, [r2] 30003ba8: e0822005 add r2, r2, r5 30003bac: e5d22001 ldrb r2, [r2, #1] 30003bb0: e2022003 and r2, r2, #3 30003bb4: e3520001 cmp r2, #1 30003bb8: 02855020 addeq r5, r5, #32 30003bbc: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { 30003bc0: e355000d cmp r5, #13 30003bc4: 1a000005 bne 30003be0 if (tty->termios.c_iflag & IGNCR) 30003bc8: e3130080 tst r3, #128 ; 0x80 30003bcc: 1a000048 bne 30003cf4 return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; 30003bd0: e3130c01 tst r3, #256 ; 0x100 30003bd4: 03a0500d moveq r5, #13 30003bd8: 13a0500a movne r5, #10 30003bdc: ea000007 b 30003c00 } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 30003be0: e355000a cmp r5, #10 30003be4: 1a000003 bne 30003bf8 c = '\r'; 30003be8: e3130040 tst r3, #64 ; 0x40 30003bec: 03a0500a moveq r5, #10 30003bf0: 13a0500d movne r5, #13 30003bf4: ea000001 b 30003c00 } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 30003bf8: e3550000 cmp r5, #0 30003bfc: 0a00002c beq 30003cb4 30003c00: e594303c ldr r3, [r4, #60] ; 0x3c 30003c04: e3130002 tst r3, #2 30003c08: 0a000029 beq 30003cb4 if (c == tty->termios.c_cc[VERASE]) { 30003c0c: e5d42043 ldrb r2, [r4, #67] ; 0x43 30003c10: e1520005 cmp r2, r5 erase (tty, 0); 30003c14: 01a00004 moveq r0, r4 30003c18: 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]) { 30003c1c: 0a000004 beq 30003c34 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 30003c20: e5d42044 ldrb r2, [r4, #68] ; 0x44 30003c24: e1520005 cmp r2, r5 30003c28: 1a000003 bne 30003c3c erase (tty, 1); 30003c2c: e1a00004 mov r0, r4 30003c30: e3a01001 mov r1, #1 30003c34: ebffff60 bl 300039bc 30003c38: ea00002d b 30003cf4 return 0; } else if (c == tty->termios.c_cc[VEOF]) { 30003c3c: e5d42045 ldrb r2, [r4, #69] ; 0x45 30003c40: e1520005 cmp r2, r5 30003c44: 0a00002c beq 30003cfc return 1; } else if (c == '\n') { 30003c48: e355000a cmp r5, #10 30003c4c: 1a000008 bne 30003c74 if (tty->termios.c_lflag & (ECHO | ECHONL)) 30003c50: e3130048 tst r3, #72 ; 0x48 echo (c, tty); 30003c54: 11a00005 movne r0, r5 30003c58: 11a01004 movne r1, r4 30003c5c: 1bffff33 blne 30003930 tty->cbuf[tty->ccount++] = c; 30003c60: e5943020 ldr r3, [r4, #32] 30003c64: e594201c ldr r2, [r4, #28] 30003c68: e3a0100a mov r1, #10 30003c6c: e7c21003 strb r1, [r2, r3] 30003c70: ea00000c b 30003ca8 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 30003c74: e5d4204c ldrb r2, [r4, #76] ; 0x4c 30003c78: e1520005 cmp r2, r5 30003c7c: 0a000002 beq 30003c8c 30003c80: e5d42051 ldrb r2, [r4, #81] ; 0x51 30003c84: e1520005 cmp r2, r5 30003c88: 1a000009 bne 30003cb4 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 30003c8c: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 30003c90: 11a00005 movne r0, r5 <== NOT EXECUTED 30003c94: 11a01004 movne r1, r4 <== NOT EXECUTED 30003c98: 1bffff24 blne 30003930 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 30003c9c: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003ca0: e594201c ldr r2, [r4, #28] <== NOT EXECUTED 30003ca4: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED 30003ca8: e2833001 add r3, r3, #1 30003cac: e5843020 str r3, [r4, #32] 30003cb0: ea000011 b 30003cfc } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 30003cb4: e59f3054 ldr r3, [pc, #84] ; 30003d10 30003cb8: e5942020 ldr r2, [r4, #32] 30003cbc: e5933008 ldr r3, [r3, #8] 30003cc0: e2433001 sub r3, r3, #1 30003cc4: e1520003 cmp r2, r3 30003cc8: aa00000d bge 30003d04 if (tty->termios.c_lflag & ECHO) 30003ccc: e594303c ldr r3, [r4, #60] ; 0x3c 30003cd0: e3130008 tst r3, #8 echo (c, tty); 30003cd4: 11a00005 movne r0, r5 30003cd8: 11a01004 movne r1, r4 30003cdc: 1bffff13 blne 30003930 tty->cbuf[tty->ccount++] = c; 30003ce0: e5943020 ldr r3, [r4, #32] 30003ce4: e594201c ldr r2, [r4, #28] 30003ce8: e7c25003 strb r5, [r2, r3] 30003cec: e2833001 add r3, r3, #1 30003cf0: 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; 30003cf4: e3a00000 mov r0, #0 30003cf8: 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; 30003cfc: e3a00001 mov r0, #1 30003d00: 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; 30003d04: e3a00000 mov r0, #0 <== NOT EXECUTED } 30003d08: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 3000b72c : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { 3000b72c: e92d41f0 push {r4, r5, r6, r7, r8, lr} */ #if defined(RTEMS_DEBUG) assert( block_table ); #endif if ( !block_table ) 3000b730: e2505000 subs r5, r0, #0 * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i 3000b748: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); 3000b758: ebffffeb bl 3000b70c b[i] = 0; 3000b75c: e5067004 str r7, [r6, #-4] * Now go through all the slots in the table and free the memory. */ b = *block_table; for ( i=0 ; i /* * Now that all the blocks in the block table are free, we can * free the block table itself. */ memfile_free_block( *block_table ); 3000b76c: e5950000 ldr r0, [r5] 3000b770: ebffffe5 bl 3000b70c *block_table = 0; 3000b774: e3a03000 mov r3, #0 3000b778: e5853000 str r3, [r5] 3000b77c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 3000bc64 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { 3000bc64: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 3000bc68: e5904018 ldr r4, [r0, #24] * POSIX 1003.1b does not specify what happens if you truncate a file * and the new length is greater than the current size. We treat this * as an extend operation. */ if ( length > the_jnode->info.file.size ) 3000bc6c: e5943054 ldr r3, [r4, #84] ; 0x54 3000bc70: e1530002 cmp r3, r2 3000bc74: ba000003 blt 3000bc88 3000bc78: 1a000005 bne 3000bc94 3000bc7c: e5943050 ldr r3, [r4, #80] ; 0x50 3000bc80: e1530001 cmp r3, r1 3000bc84: 2a000002 bcs 3000bc94 return IMFS_memfile_extend( the_jnode, length ); 3000bc88: e1a00004 mov r0, r4 <== NOT EXECUTED 3000bc8c: ebffff08 bl 3000b8b4 <== NOT EXECUTED 3000bc90: ea000008 b 3000bcb8 <== NOT EXECUTED * The in-memory files do not currently reclaim memory until the file is * deleted. So we leave the previously allocated blocks in place for * future use and just set the length. */ the_jnode->info.file.size = length; 3000bc94: e5841050 str r1, [r4, #80] ; 0x50 3000bc98: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; 3000bc9c: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); 3000bca0: e3a01000 mov r1, #0 3000bca4: e1a0000d mov r0, sp 3000bca8: ebffd89f bl 30001f2c 3000bcac: e59d3000 ldr r3, [sp] return 0; 3000bcb0: e3a00000 mov r0, #0 */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); 3000bcb4: e5843040 str r3, [r4, #64] ; 0x40 return 0; } 3000bcb8: e8bd801c pop {r2, r3, r4, pc} =============================================================================== 3000bcbc : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 3000bcbc: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 3000bcc0: e5905018 ldr r5, [r0, #24] rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { 3000bcc4: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { 3000bcc8: e595304c ldr r3, [r5, #76] ; 0x4c 3000bccc: e3530006 cmp r3, #6 3000bcd0: 1a00000b bne 3000bd04 if (iop->offset > the_jnode->info.linearfile.size) 3000bcd4: e5953054 ldr r3, [r5, #84] ; 0x54 3000bcd8: e5901010 ldr r1, [r0, #16] 3000bcdc: e5952050 ldr r2, [r5, #80] ; 0x50 3000bce0: e1510003 cmp r1, r3 3000bce4: ca000003 bgt 3000bcf8 3000bce8: 1a000014 bne 3000bd40 3000bcec: e590100c ldr r1, [r0, #12] 3000bcf0: e1510002 cmp r1, r2 3000bcf4: 9a000011 bls 3000bd40 iop->offset = the_jnode->info.linearfile.size; 3000bcf8: e584200c str r2, [r4, #12] <== NOT EXECUTED 3000bcfc: e5843010 str r3, [r4, #16] <== NOT EXECUTED 3000bd00: ea00000e b 3000bd40 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) 3000bd04: e1a00005 mov r0, r5 3000bd08: e284200c add r2, r4, #12 3000bd0c: e8920006 ldm r2, {r1, r2} 3000bd10: ebfffee7 bl 3000b8b4 3000bd14: e3500000 cmp r0, #0 3000bd18: 0a000005 beq 3000bd34 rtems_set_errno_and_return_minus_one( ENOSPC ); 3000bd1c: eb00039a bl 3000cb8c <__errno> <== NOT EXECUTED 3000bd20: e3a0301c mov r3, #28 <== NOT EXECUTED 3000bd24: e5803000 str r3, [r0] <== NOT EXECUTED 3000bd28: e3e04000 mvn r4, #0 <== NOT EXECUTED 3000bd2c: e3e03000 mvn r3, #0 <== NOT EXECUTED 3000bd30: ea000004 b 3000bd48 <== NOT EXECUTED iop->size = the_jnode->info.file.size; 3000bd34: e2853050 add r3, r5, #80 ; 0x50 3000bd38: e893000c ldm r3, {r2, r3} 3000bd3c: e984000c stmib r4, {r2, r3} } return iop->offset; 3000bd40: e284400c add r4, r4, #12 3000bd44: e8940018 ldm r4, {r3, r4} } 3000bd48: e1a00003 mov r0, r3 3000bd4c: e1a01004 mov r1, r4 3000bd50: e8bd8030 pop {r4, r5, pc} =============================================================================== 3000bbc8 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 3000bbc8: e5903014 ldr r3, [r0, #20] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3000bbcc: 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)) 3000bbd0: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { 3000bbd4: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; 3000bbd8: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) 3000bbdc: 0a000015 beq 3000bc38 && (the_jnode->type == IMFS_LINEAR_FILE)) { 3000bbe0: e594304c ldr r3, [r4, #76] ; 0x4c 3000bbe4: e3530006 cmp r3, #6 3000bbe8: 1a000012 bne 3000bc38 uint32_t count = the_jnode->info.linearfile.size; 3000bbec: 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; 3000bbf0: 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; 3000bbf4: e3a02005 mov r2, #5 <== NOT EXECUTED 3000bbf8: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; 3000bbfc: e3a01000 mov r1, #0 <== NOT EXECUTED 3000bc00: 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) 3000bc04: 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; 3000bc08: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; 3000bc0c: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED 3000bc10: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; 3000bc14: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; 3000bc18: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; 3000bc1c: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) 3000bc20: 0a000004 beq 3000bc38 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) 3000bc24: e1a00004 mov r0, r4 <== NOT EXECUTED 3000bc28: e58dc000 str ip, [sp] <== NOT EXECUTED 3000bc2c: ebffff67 bl 3000b9d0 <== NOT EXECUTED 3000bc30: e3700001 cmn r0, #1 <== NOT EXECUTED 3000bc34: 0a000009 beq 3000bc60 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) 3000bc38: e5953014 ldr r3, [r5, #20] 3000bc3c: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; 3000bc40: 12843050 addne r3, r4, #80 ; 0x50 3000bc44: 1893000c ldmne r3, {r2, r3} 3000bc48: 1585200c strne r2, [r5, #12] 3000bc4c: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; 3000bc50: e2844050 add r4, r4, #80 ; 0x50 3000bc54: e8940018 ldm r4, {r3, r4} 3000bc58: e9850018 stmib r5, {r3, r4} return 0; 3000bc5c: e3a00000 mov r0, #0 } 3000bc60: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 300022c4 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 300022c4: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 300022c8: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 300022cc: e24dd020 sub sp, sp, #32 300022d0: e1a06000 mov r6, r0 300022d4: e1a05001 mov r5, r1 300022d8: e1a07002 mov r7, r2 300022dc: e1a08003 mov r8, r3 rtems_filesystem_location_info_t temp_loc; int i; const char *name_start; int result; if ( !(mode & (S_IFREG|S_IFCHR|S_IFBLK|S_IFIFO) ) ) 300022e0: 1a000003 bne 300022f4 rtems_set_errno_and_return_minus_one( EINVAL ); 300022e4: eb002a28 bl 3000cb8c <__errno> <== NOT EXECUTED 300022e8: e3a03016 mov r3, #22 <== NOT EXECUTED 300022ec: e5803000 str r3, [r0] <== NOT EXECUTED 300022f0: ea000018 b 30002358 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 300022f4: e28d4004 add r4, sp, #4 300022f8: e28d101c add r1, sp, #28 300022fc: e1a02004 mov r2, r4 30002300: eb000241 bl 30002c0c result = (*temp_loc.ops->evalformake_h)( 30002304: e59d001c ldr r0, [sp, #28] 30002308: e1a01004 mov r1, r4 3000230c: e0860000 add r0, r6, r0 30002310: e28d2018 add r2, sp, #24 30002314: e59d3010 ldr r3, [sp, #16] 30002318: e1a0e00f mov lr, pc 3000231c: e593f004 ldr pc, [r3, #4] &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 30002320: e3500000 cmp r0, #0 30002324: 1a00000b bne 30002358 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 30002328: e1a01005 mov r1, r5 3000232c: e58d4000 str r4, [sp] 30002330: e59d0018 ldr r0, [sp, #24] 30002334: e1a02007 mov r2, r7 30002338: e1a03008 mov r3, r8 3000233c: e59dc010 ldr ip, [sp, #16] 30002340: e1a0e00f mov lr, pc 30002344: e59cf014 ldr pc, [ip, #20] 30002348: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 3000234c: e1a00004 mov r0, r4 30002350: ebfffec7 bl 30001e74 return result; 30002354: ea000000 b 3000235c &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 30002358: e3e05000 mvn r5, #0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 3000235c: e1a00005 mov r0, r5 30002360: e28dd020 add sp, sp, #32 30002364: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 300023fc : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 300023fc: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 30002400: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 30002404: e24dd028 sub sp, sp, #40 ; 0x28 30002408: e1a06000 mov r6, r0 3000240c: e1a07001 mov r7, r1 30002410: e1a08002 mov r8, r2 30002414: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 30002418: 8a000004 bhi 30002430 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 3000241c: e1a00002 mov r0, r2 30002420: eb001d63 bl 300099b4 if ( !mount_h ) 30002424: e3500000 cmp r0, #0 30002428: e58d0010 str r0, [sp, #16] 3000242c: 1a000002 bne 3000243c rtems_set_errno_and_return_minus_one( EINVAL ); 30002430: eb0029d5 bl 3000cb8c <__errno> 30002434: e3a03016 mov r3, #22 30002438: ea000039 b 30002524 { 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; 3000243c: e2575000 subs r5, r7, #0 30002440: 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 : "/"; 30002444: e59f3250 ldr r3, [pc, #592] ; 3000269c 30002448: e3550000 cmp r5, #0 3000244c: 11a03007 movne r3, r7 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 30002450: e1a00008 mov r0, r8 const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; 30002454: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; 30002458: eb002dbb bl 3000db4c size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 3000245c: 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; 30002460: e280b001 add fp, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 30002464: 01a0a006 moveq sl, r6 30002468: 0a000002 beq 30002478 3000246c: e1a00006 mov r0, r6 30002470: eb002db5 bl 3000db4c 30002474: e280a001 add sl, r0, #1 size_t target_length = strlen( target ); 30002478: e59d0004 ldr r0, [sp, #4] 3000247c: eb002db2 bl 3000db4c size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; 30002480: e28b1075 add r1, fp, #117 ; 0x75 30002484: e0811000 add r1, r1, r0 { 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_length = strlen( target ); 30002488: e58d0008 str r0, [sp, #8] size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; rtems_filesystem_mount_table_entry_t *mt_entry = calloc( 1, size ); 3000248c: e081100a add r1, r1, sl 30002490: e3a00001 mov r0, #1 30002494: ebfffe00 bl 30001c9c if ( mt_entry != NULL ) { 30002498: e2504000 subs r4, r0, #0 3000249c: 0a00001e beq 3000251c char *str = (char *) mt_entry + sizeof( *mt_entry ); 300024a0: e2849074 add r9, r4, #116 ; 0x74 strcpy( str, filesystemtype ); 300024a4: e1a00009 mov r0, r9 300024a8: e1a01008 mov r1, r8 300024ac: eb002d56 bl 3000da0c mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 300024b0: e3560000 cmp r6, #0 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; 300024b4: e584906c str r9, [r4, #108] ; 0x6c str += filesystemtype_size; 300024b8: e089900b add r9, r9, fp if ( source_or_null != NULL ) { 300024bc: 0a000004 beq 300024d4 strcpy( str, source_or_null ); 300024c0: e1a00009 mov r0, r9 300024c4: e1a01006 mov r1, r6 300024c8: eb002d4f bl 3000da0c mt_entry->dev = str; 300024cc: e5849070 str r9, [r4, #112] ; 0x70 str += source_size; 300024d0: e089900a add r9, r9, sl } strcpy( str, target ); 300024d4: e59d1004 ldr r1, [sp, #4] 300024d8: e1a00009 mov r0, r9 300024dc: eb002d4a bl 3000da0c ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 300024e0: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 300024e4: e59fe1b4 ldr lr, [pc, #436] ; 300026a0 300024e8: 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; 300024ec: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 300024f0: e8be000f ldm lr!, {r0, r1, r2, r3} 300024f4: e8ac000f stmia ip!, {r0, r1, r2, r3} 300024f8: e8be000f ldm lr!, {r0, r1, r2, r3} 300024fc: e8ac000f stmia ip!, {r0, r1, r2, r3} 30002500: 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 ) { 30002504: e3550000 cmp r5, #0 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 30002508: e5849068 str r9, [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; 3000250c: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 30002510: 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 ) { 30002514: 0a00002e beq 300025d4 30002518: ea000003 b 3000252c target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 3000251c: eb00299a bl 3000cb8c <__errno> <== NOT EXECUTED 30002520: e3a0300c mov r3, #12 <== NOT EXECUTED 30002524: e5803000 str r3, [r0] 30002528: ea000058 b 30002690 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 3000252c: e3a03001 mov r3, #1 30002530: e28d6014 add r6, sp, #20 30002534: e58d3000 str r3, [sp] 30002538: e1a00007 mov r0, r7 3000253c: e59d1008 ldr r1, [sp, #8] 30002540: e3a02007 mov r2, #7 30002544: e1a03006 mov r3, r6 30002548: ebfffe0e bl 30001d88 3000254c: e3700001 cmn r0, #1 30002550: 0a000048 beq 30002678 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 30002554: e1a00006 mov r0, r6 30002558: e59d3020 ldr r3, [sp, #32] 3000255c: e1a0e00f mov lr, pc 30002560: e593f010 ldr pc, [r3, #16] 30002564: e3500001 cmp r0, #1 30002568: 0a000002 beq 30002578 errno = ENOTDIR; 3000256c: eb002986 bl 3000cb8c <__errno> 30002570: e3a03014 mov r3, #20 30002574: ea000006 b 30002594 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 30002578: e59f0124 ldr r0, [pc, #292] ; 300026a4 3000257c: e59d1014 ldr r1, [sp, #20] 30002580: ebffff87 bl 300023a4 30002584: e3500000 cmp r0, #0 30002588: 0a000003 beq 3000259c errno = EBUSY; 3000258c: eb00297e bl 3000cb8c <__errno> 30002590: e3a03010 mov r3, #16 30002594: e5803000 str r3, [r0] goto cleanup_and_bail; 30002598: ea000037 b 3000267c * 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; 3000259c: e59d3014 ldr r3, [sp, #20] 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; 300025a0: e59d2024 ldr r2, [sp, #36] ; 0x24 * 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; 300025a4: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 300025a8: e59d301c ldr r3, [sp, #28] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 300025ac: 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; 300025b0: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; 300025b4: e59d3020 ldr r3, [sp, #32] /* * 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 ) ) { 300025b8: 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; 300025bc: 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 ) ) { 300025c0: e1a0e00f mov lr, pc 300025c4: e593f020 ldr pc, [r3, #32] 300025c8: e3500000 cmp r0, #0 300025cc: 0a00000b beq 30002600 300025d0: ea000029 b 3000267c <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 300025d4: e59f30cc ldr r3, [pc, #204] ; 300026a8 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 300025d8: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 300025dc: e5933000 ldr r3, [r3] 300025e0: 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; 300025e4: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 300025e8: 0a000004 beq 30002600 errno = EINVAL; 300025ec: eb002966 bl 3000cb8c <__errno> <== NOT EXECUTED 300025f0: e3a03016 mov r3, #22 <== NOT EXECUTED 300025f4: 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; 300025f8: 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; 300025fc: ea00001e b 3000267c <== 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 ) ) { 30002600: e1a00004 mov r0, r4 30002604: e59d104c ldr r1, [sp, #76] ; 0x4c 30002608: e59d3010 ldr r3, [sp, #16] 3000260c: e1a0e00f mov lr, pc 30002610: e12fff13 bx r3 30002614: e2507000 subs r7, r0, #0 30002618: 0a000004 beq 30002630 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 3000261c: e1a00004 mov r0, r4 <== NOT EXECUTED 30002620: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 30002624: e1a0e00f mov lr, pc <== NOT EXECUTED 30002628: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED goto cleanup_and_bail; 3000262c: ea000012 b 3000267c <== NOT EXECUTED } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 30002630: ebffff51 bl 3000237c 30002634: e59f006c ldr r0, [pc, #108] ; 300026a8 30002638: e1a01004 mov r1, r4 3000263c: eb000cd5 bl 30005998 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 30002640: ebffff53 bl 30002394 if ( !has_target ) 30002644: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 30002648: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 3000264c: 1a000010 bne 30002694 rtems_filesystem_root = mt_entry->mt_fs_root; 30002650: e59f3054 ldr r3, [pc, #84] ; 300026ac 30002654: e284401c add r4, r4, #28 30002658: e593c000 ldr ip, [r3] 3000265c: e8b4000f ldm r4!, {r0, r1, r2, r3} 30002660: e28cc018 add ip, ip, #24 30002664: e8ac000f stmia ip!, {r0, r1, r2, r3} 30002668: e5943000 ldr r3, [r4] return 0; 3000266c: 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; 30002670: e58c3000 str r3, [ip] 30002674: ea000006 b 30002694 ) { 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; 30002678: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 3000267c: e1a00004 mov r0, r4 30002680: ebfffe00 bl 30001e88 if ( loc_to_free ) 30002684: e3560000 cmp r6, #0 rtems_filesystem_freenode( loc_to_free ); 30002688: 11a00006 movne r0, r6 3000268c: 1bfffdf8 blne 30001e74 return -1; 30002690: e3e00000 mvn r0, #0 } 30002694: e28dd028 add sp, sp, #40 ; 0x28 30002698: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 300026b4 : */ int newlib_free_buffers( FILE *fp ) { 300026b4: e92d4010 push {r4, lr} 300026b8: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 300026bc: eb002a35 bl 3000cf98 300026c0: e3500002 cmp r0, #2 300026c4: 8a00000b bhi 300026f8 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 300026c8: e1d430bc ldrh r3, [r4, #12] 300026cc: e3130080 tst r3, #128 ; 0x80 300026d0: 0a00000a beq 30002700 free( fp->_bf._base ); 300026d4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300026d8: ebfffdea bl 30001e88 <== NOT EXECUTED fp->_flags &= ~__SMBF; 300026dc: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED 300026e0: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED 300026e4: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 300026e8: e3a03000 mov r3, #0 <== NOT EXECUTED 300026ec: e5843000 str r3, [r4] <== NOT EXECUTED 300026f0: e5843010 str r3, [r4, #16] <== NOT EXECUTED 300026f4: ea000001 b 30002700 <== NOT EXECUTED } break; default: fclose(fp); 300026f8: e1a00004 mov r0, r4 <== NOT EXECUTED 300026fc: eb002970 bl 3000ccc4 <== NOT EXECUTED } return 0; } 30002700: e3a00000 mov r0, #0 30002704: e8bd8010 pop {r4, pc} =============================================================================== 300037e0 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 300037e0: e92d4011 push {r0, r4, lr} 300037e4: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 300037e8: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 300037ec: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { 300037f0: e3130001 tst r3, #1 300037f4: 0a000045 beq 30003910 switch (c) { 300037f8: e5dd2000 ldrb r2, [sp] 300037fc: e2421008 sub r1, r2, #8 30003800: e3510005 cmp r1, #5 30003804: 979ff101 ldrls pc, [pc, r1, lsl #2] 30003808: ea00002c b 300038c0 3000380c: 300038ac .word 0x300038ac <== NOT EXECUTED 30003810: 30003884 .word 0x30003884 <== NOT EXECUTED 30003814: 30003824 .word 0x30003824 <== NOT EXECUTED 30003818: 300038c0 .word 0x300038c0 <== NOT EXECUTED 3000381c: 300038c0 .word 0x300038c0 <== NOT EXECUTED 30003820: 3000384c .word 0x3000384c <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 30003824: e3130020 tst r3, #32 tty->column = 0; 30003828: 13a02000 movne r2, #0 3000382c: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 30003830: e3130004 tst r3, #4 30003834: 0a000035 beq 30003910 rtems_termios_puts ("\r", 1, tty); 30003838: e59f00e4 ldr r0, [pc, #228] ; 30003924 3000383c: e3a01001 mov r1, #1 30003840: e1a02004 mov r2, r4 30003844: ebffffa5 bl 300036e0 30003848: ea00000b b 3000387c tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 3000384c: e3130010 tst r3, #16 <== NOT EXECUTED 30003850: 0a000002 beq 30003860 <== NOT EXECUTED 30003854: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 30003858: e3520000 cmp r2, #0 <== NOT EXECUTED 3000385c: 0a00002f beq 30003920 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 30003860: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 30003864: 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) { 30003868: 0a000028 beq 30003910 <== NOT EXECUTED c = '\n'; 3000386c: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 30003870: 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'; 30003874: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 30003878: 0a000024 beq 30003910 <== NOT EXECUTED tty->column = 0; 3000387c: e3a03000 mov r3, #0 30003880: ea000021 b 3000390c } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 30003884: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30003888: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3000388c: e2021007 and r1, r2, #7 30003890: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 30003894: e3530b06 cmp r3, #6144 ; 0x1800 30003898: e0813002 add r3, r1, r2 tty->column += i; 3000389c: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 300038a0: 059f0080 ldreq r0, [pc, #128] ; 30003928 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 300038a4: 1a000018 bne 3000390c 300038a8: ea00001a b 30003918 } tty->column += i; break; case '\b': if (tty->column > 0) 300038ac: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 300038b0: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 300038b4: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 300038b8: ca000013 bgt 3000390c <== NOT EXECUTED 300038bc: ea000013 b 30003910 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 300038c0: e3130002 tst r3, #2 300038c4: 0a000007 beq 300038e8 c = toupper(c); 300038c8: e59f305c ldr r3, [pc, #92] ; 3000392c <== NOT EXECUTED 300038cc: e5933000 ldr r3, [r3] <== NOT EXECUTED 300038d0: e0833002 add r3, r3, r2 <== NOT EXECUTED 300038d4: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 300038d8: e2033003 and r3, r3, #3 <== NOT EXECUTED 300038dc: e3530002 cmp r3, #2 <== NOT EXECUTED 300038e0: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 300038e4: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 300038e8: e59f203c ldr r2, [pc, #60] ; 3000392c 300038ec: e5dd3000 ldrb r3, [sp] 300038f0: e5922000 ldr r2, [r2] 300038f4: e0823003 add r3, r2, r3 300038f8: e5d33001 ldrb r3, [r3, #1] 300038fc: e3130020 tst r3, #32 30003900: 1a000002 bne 30003910 tty->column++; 30003904: e5943028 ldr r3, [r4, #40] ; 0x28 30003908: e2833001 add r3, r3, #1 3000390c: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 30003910: e1a0000d mov r0, sp 30003914: e3a01001 mov r1, #1 30003918: e1a02004 mov r2, r4 3000391c: ebffff6f bl 300036e0 } 30003920: e8bd8018 pop {r3, r4, pc} =============================================================================== 3000b390 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 3000b390: e59f3058 ldr r3, [pc, #88] ; 3000b3f0 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 3000b394: e92d4070 push {r4, r5, r6, lr} if (cmd == FIONREAD) { 3000b398: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { 3000b39c: e1a04000 mov r4, r0 3000b3a0: e1a05002 mov r5, r2 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; 3000b3a4: 13e00015 mvnne r0, #21 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { 3000b3a8: 18bd8070 popne {r4, r5, r6, pc} if (buffer == NULL) 3000b3ac: e3520000 cmp r2, #0 return -EFAULT; 3000b3b0: 03e0000d mvneq r0, #13 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) 3000b3b4: 08bd8070 popeq {r4, r5, r6, pc} return -EFAULT; if (! PIPE_LOCK(pipe)) 3000b3b8: e3a01000 mov r1, #0 3000b3bc: e5940028 ldr r0, [r4, #40] ; 0x28 3000b3c0: e1a02001 mov r2, r1 3000b3c4: ebffec9c bl 3000663c 3000b3c8: e2506000 subs r6, r0, #0 3000b3cc: 1a000005 bne 3000b3e8 return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 3000b3d0: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); 3000b3d4: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; 3000b3d8: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); 3000b3dc: ebffecdc bl 30006754 return 0; 3000b3e0: e1a00006 mov r0, r6 3000b3e4: e8bd8070 pop {r4, r5, r6, pc} if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) return -EINTR; 3000b3e8: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } 3000b3ec: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 3000b064 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000b064: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000b068: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b06c: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000b070: e1a04000 mov r4, r0 3000b074: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b078: e5900028 ldr r0, [r0, #40] ; 0x28 3000b07c: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { 3000b080: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b084: ebffed6c bl 3000663c 3000b088: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); 3000b08c: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) 3000b090: 0a000043 beq 3000b1a4 3000b094: ea00004e b 3000b1d4 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) 3000b098: e5947014 ldr r7, [r4, #20] 3000b09c: e3570000 cmp r7, #0 3000b0a0: 0a000044 beq 3000b1b8 goto out_locked; if (LIBIO_NODELAY(iop)) { 3000b0a4: e59a8014 ldr r8, [sl, #20] 3000b0a8: e2188001 ands r8, r8, #1 3000b0ac: 1a000040 bne 3000b1b4 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 3000b0b0: e5943018 ldr r3, [r4, #24] PIPE_UNLOCK(pipe); 3000b0b4: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; 3000b0b8: e2833001 add r3, r3, #1 3000b0bc: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); 3000b0c0: ebffeda3 bl 30006754 if (! PIPE_READWAIT(pipe)) 3000b0c4: e1a01008 mov r1, r8 3000b0c8: e594002c ldr r0, [r4, #44] ; 0x2c 3000b0cc: eb000627 bl 3000c970 3000b0d0: e3500000 cmp r0, #0 3000b0d4: 01a07000 moveq r7, r0 3000b0d8: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000b0dc: e1a01008 mov r1, r8 3000b0e0: e5940028 ldr r0, [r4, #40] ; 0x28 3000b0e4: e1a02008 mov r2, r8 3000b0e8: ebffed53 bl 3000663c 3000b0ec: e3500000 cmp r0, #0 3000b0f0: 1a000033 bne 3000b1c4 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 3000b0f4: e5943018 ldr r3, [r4, #24] if (ret != 0) 3000b0f8: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; 3000b0fc: e2433001 sub r3, r3, #1 3000b100: e5843018 str r3, [r4, #24] if (ret != 0) 3000b104: 1a00002b bne 3000b1b8 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { 3000b108: e594300c ldr r3, [r4, #12] 3000b10c: e3530000 cmp r3, #0 3000b110: 0affffe0 beq 3000b098 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); 3000b114: e0667005 rsb r7, r6, r5 3000b118: e1530007 cmp r3, r7 3000b11c: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; 3000b120: e5948004 ldr r8, [r4, #4] 3000b124: e5943008 ldr r3, [r4, #8] 3000b128: e5941000 ldr r1, [r4] 3000b12c: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { 3000b130: e1570008 cmp r7, r8 3000b134: 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); 3000b138: d0811003 addle r1, r1, r3 3000b13c: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { 3000b140: da000006 ble 3000b160 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); 3000b144: e0811003 add r1, r1, r3 3000b148: e1a02008 mov r2, r8 3000b14c: eb000f5d bl 3000eec8 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); 3000b150: e0860008 add r0, r6, r8 3000b154: e5941000 ldr r1, [r4] 3000b158: e0890000 add r0, r9, r0 3000b15c: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); 3000b160: eb000f58 bl 3000eec8 pipe->Start += chunk; 3000b164: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; 3000b168: e5941004 ldr r1, [r4, #4] 3000b16c: e0870000 add r0, r7, r0 3000b170: eb003306 bl 30017d90 <__umodsi3> pipe->Length -= chunk; 3000b174: e594300c ldr r3, [r4, #12] } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; 3000b178: e5840008 str r0, [r4, #8] pipe->Length -= chunk; 3000b17c: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) 3000b180: e3530000 cmp r3, #0 pipe->Start = 0; 3000b184: 05843008 streq r3, [r4, #8] else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; 3000b188: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) 3000b18c: e594301c ldr r3, [r4, #28] 3000b190: e3530000 cmp r3, #0 PIPE_WAKEUPWRITERS(pipe); 3000b194: 15940030 ldrne r0, [r4, #48] ; 0x30 3000b198: 11a0100d movne r1, sp 3000b19c: 1b0005dd blne 3000c918 read += chunk; 3000b1a0: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { 3000b1a4: e1560005 cmp r6, r5 3000b1a8: 3affffd6 bcc 3000b108 3000b1ac: e3a07000 mov r7, #0 3000b1b0: ea000000 b 3000b1b8 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 3000b1b4: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); 3000b1b8: e5940028 ldr r0, [r4, #40] ; 0x28 3000b1bc: ebffed64 bl 30006754 3000b1c0: ea000000 b 3000b1c8 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; 3000b1c4: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; 3000b1c8: e3560000 cmp r6, #0 3000b1cc: d1a06007 movle r6, r7 3000b1d0: ea000000 b 3000b1d8 ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; 3000b1d4: e3e06003 mvn r6, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } 3000b1d8: e1a00006 mov r0, r6 3000b1dc: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000ac24 : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { 3000ac24: e92d40f1 push {r0, r4, r5, r6, r7, lr} 3000ac28: e1a06001 mov r6, r1 3000ac2c: e1a05000 mov r5, r0 pipe_control_t *pipe = *pipep; 3000ac30: e5904000 ldr r4, [r0] uint32_t mode; if (pipe_lock()) 3000ac34: ebffffbf bl 3000ab38 3000ac38: e2501000 subs r1, r0, #0 3000ac3c: 1a000004 bne 3000ac54 /* WARN pipe not freed and pipep not set to NULL! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) 3000ac40: e5940028 ldr r0, [r4, #40] ; 0x28 3000ac44: e1a02001 mov r2, r1 3000ac48: ebffee7b bl 3000663c 3000ac4c: e3500000 cmp r0, #0 3000ac50: 0a000001 beq 3000ac5c /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 3000ac54: e59f00a8 ldr r0, [pc, #168] ; 3000ad04 <== NOT EXECUTED 3000ac58: ebffeff6 bl 30006c38 <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); 3000ac5c: e5963014 ldr r3, [r6, #20] if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); 3000ac60: e5940028 ldr r0, [r4, #40] ; 0x28 /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) 3000ac64: e3130002 tst r3, #2 if (!PIPE_LOCK(pipe)) /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); 3000ac68: e2036006 and r6, r3, #6 if (mode & LIBIO_FLAGS_READ) pipe->Readers --; 3000ac6c: 15943010 ldrne r3, [r4, #16] 3000ac70: 12433001 subne r3, r3, #1 3000ac74: 15843010 strne r3, [r4, #16] if (mode & LIBIO_FLAGS_WRITE) 3000ac78: e3160004 tst r6, #4 pipe->Writers --; 3000ac7c: 15943014 ldrne r3, [r4, #20] 3000ac80: 12433001 subne r3, r3, #1 3000ac84: 15843014 strne r3, [r4, #20] PIPE_UNLOCK(pipe); 3000ac88: ebffeeb1 bl 30006754 if (pipe->Readers == 0 && pipe->Writers == 0) { 3000ac8c: e5943010 ldr r3, [r4, #16] 3000ac90: e3530000 cmp r3, #0 3000ac94: 1a000006 bne 3000acb4 3000ac98: e5947014 ldr r7, [r4, #20] 3000ac9c: e3570000 cmp r7, #0 3000aca0: 1a000003 bne 3000acb4 #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); 3000aca4: e1a00004 mov r0, r4 3000aca8: ebffffc6 bl 3000abc8 *pipep = NULL; 3000acac: e5857000 str r7, [r5] 3000acb0: ea000010 b 3000acf8 } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 3000acb4: e2562004 subs r2, r6, #4 3000acb8: 13a02001 movne r2, #1 3000acbc: e3530000 cmp r3, #0 3000acc0: 13a02000 movne r2, #0 3000acc4: e3520000 cmp r2, #0 /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); 3000acc8: 15940030 ldrne r0, [r4, #48] ; 0x30 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) 3000accc: 1a000007 bne 3000acf0 /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) 3000acd0: e5943014 ldr r3, [r4, #20] 3000acd4: e2566002 subs r6, r6, #2 3000acd8: 13a06001 movne r6, #1 3000acdc: e3530000 cmp r3, #0 3000ace0: 13a06000 movne r6, #0 3000ace4: e3560000 cmp r6, #0 3000ace8: 0a000002 beq 3000acf8 PIPE_WAKEUPREADERS(pipe); 3000acec: e594002c ldr r0, [r4, #44] ; 0x2c 3000acf0: e1a0100d mov r1, sp 3000acf4: eb000707 bl 3000c918 pipe_unlock(); 3000acf8: ebffffbf bl 3000abfc if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } 3000acfc: e3a00000 mov r0, #0 3000ad00: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 3000abfc : static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 3000abfc: e59f3018 ldr r3, [pc, #24] ; 3000ac1c return -ENOMEM; } } static void pipe_unlock(void) { 3000ac00: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); 3000ac04: e5930000 ldr r0, [r3] 3000ac08: ebffeed1 bl 30006754 if (sc != RTEMS_SUCCESSFUL) { 3000ac0c: e3500000 cmp r0, #0 3000ac10: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); 3000ac14: e59f0004 ldr r0, [pc, #4] ; 3000ac20 <== NOT EXECUTED 3000ac18: ebfff006 bl 30006c38 <== NOT EXECUTED =============================================================================== 3000b1e0 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 3000b1e0: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 3000b1e4: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { 3000b1e8: e1a04000 mov r4, r0 3000b1ec: e1a0b001 mov fp, r1 3000b1f0: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; 3000b1f4: 01a05007 moveq r5, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) 3000b1f8: 0a000062 beq 3000b388 return 0; if (! PIPE_LOCK(pipe)) 3000b1fc: e3a01000 mov r1, #0 3000b200: e5900028 ldr r0, [r0, #40] ; 0x28 3000b204: e1a02001 mov r2, r1 3000b208: ebffed0b bl 3000663c 3000b20c: e3500000 cmp r0, #0 return -EINTR; 3000b210: 13e05003 mvnne r5, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) 3000b214: 1a00005b bne 3000b388 return -EINTR; if (pipe->Readers == 0) { 3000b218: e5945010 ldr r5, [r4, #16] 3000b21c: e3550000 cmp r5, #0 3000b220: 0a00004c beq 3000b358 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; 3000b224: 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; 3000b228: 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; 3000b22c: e1570009 cmp r7, r9 3000b230: 91a09007 movls r9, r7 3000b234: 83a09001 movhi r9, #1 3000b238: ea000040 b 3000b340 while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { 3000b23c: e598a014 ldr sl, [r8, #20] 3000b240: e21aa001 ands sl, sl, #1 3000b244: 1a000041 bne 3000b350 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 3000b248: e594301c ldr r3, [r4, #28] PIPE_UNLOCK(pipe); 3000b24c: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; 3000b250: e2833001 add r3, r3, #1 3000b254: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); 3000b258: ebffed3d bl 30006754 if (! PIPE_WRITEWAIT(pipe)) 3000b25c: e1a0100a mov r1, sl 3000b260: e5940030 ldr r0, [r4, #48] ; 0x30 3000b264: eb0005c1 bl 3000c970 3000b268: e3500000 cmp r0, #0 3000b26c: 01a06000 moveq r6, r0 3000b270: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { 3000b274: e1a0100a mov r1, sl 3000b278: e5940028 ldr r0, [r4, #40] ; 0x28 3000b27c: e1a0200a mov r2, sl 3000b280: ebffeced bl 3000663c 3000b284: e3500000 cmp r0, #0 3000b288: 1a00003b bne 3000b37c /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 3000b28c: e594301c ldr r3, [r4, #28] if (ret != 0) 3000b290: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; 3000b294: e2433001 sub r3, r3, #1 3000b298: e584301c str r3, [r4, #28] if (ret != 0) 3000b29c: 1a00002e bne 3000b35c goto out_locked; if (pipe->Readers == 0) { 3000b2a0: e5943010 ldr r3, [r4, #16] 3000b2a4: e3530000 cmp r3, #0 3000b2a8: 0a00002a beq 3000b358 /* 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) { 3000b2ac: e594a004 ldr sl, [r4, #4] 3000b2b0: e594300c ldr r3, [r4, #12] 3000b2b4: e063200a rsb r2, r3, sl 3000b2b8: e1520009 cmp r2, r9 3000b2bc: 3affffde bcc 3000b23c goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); 3000b2c0: e5940008 ldr r0, [r4, #8] 3000b2c4: e1a0100a mov r1, sl 3000b2c8: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); 3000b2cc: e0656007 rsb r6, r5, r7 3000b2d0: e1520006 cmp r2, r6 3000b2d4: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); 3000b2d8: eb0032ac bl 30017d90 <__umodsi3> 3000b2dc: e5943000 ldr r3, [r4] 3000b2e0: e060a00a rsb sl, r0, sl if (chunk > chunk1) { 3000b2e4: e156000a cmp r6, sl 3000b2e8: 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); 3000b2ec: d0830000 addle r0, r3, r0 3000b2f0: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { 3000b2f4: da000006 ble 3000b314 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); 3000b2f8: e1a0200a mov r2, sl 3000b2fc: e0830000 add r0, r3, r0 3000b300: eb000ef0 bl 3000eec8 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); 3000b304: e08a1005 add r1, sl, r5 3000b308: e5940000 ldr r0, [r4] 3000b30c: e08b1001 add r1, fp, r1 3000b310: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); 3000b314: eb000eeb bl 3000eec8 pipe->Length += chunk; 3000b318: e594300c ldr r3, [r4, #12] 3000b31c: e0833006 add r3, r3, r6 3000b320: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) 3000b324: e5943018 ldr r3, [r4, #24] 3000b328: e3530000 cmp r3, #0 PIPE_WAKEUPREADERS(pipe); 3000b32c: 1594002c ldrne r0, [r4, #44] ; 0x2c 3000b330: 11a0100d movne r1, sp 3000b334: 1b000577 blne 3000c918 written += chunk; 3000b338: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; 3000b33c: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { 3000b340: e1550007 cmp r5, r7 3000b344: 3affffd8 bcc 3000b2ac 3000b348: e3a06000 mov r6, #0 3000b34c: ea000002 b 3000b35c while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; 3000b350: e3e0600a mvn r6, #10 3000b354: ea000000 b 3000b35c pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; 3000b358: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); 3000b35c: e5940028 ldr r0, [r4, #40] ; 0x28 3000b360: ebffecfb bl 30006754 out_nolock: #ifdef RTEMS_POSIX_API /* Signal SIGPIPE */ if (ret == -EPIPE) 3000b364: e3760020 cmn r6, #32 3000b368: 1a000004 bne 3000b380 kill(getpid(), SIGPIPE); 3000b36c: eb0001d1 bl 3000bab8 3000b370: e3a0100d mov r1, #13 3000b374: eb000319 bl 3000bfe0 3000b378: ea000000 b 3000b380 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; 3000b37c: e3e06003 mvn r6, #3 <== NOT EXECUTED /* Signal SIGPIPE */ if (ret == -EPIPE) kill(getpid(), SIGPIPE); #endif if (written > 0) 3000b380: e3550000 cmp r5, #0 3000b384: d1a05006 movle r5, r6 return written; return ret; } 3000b388: e1a00005 mov r0, r5 3000b38c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30009888 : int pthread_attr_setschedpolicy( pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) 30009888: e3500000 cmp r0, #0 3000988c: 0a00000b beq 300098c0 30009890: e5903000 ldr r3, [r0] 30009894: e3530000 cmp r3, #0 30009898: 0a000008 beq 300098c0 return EINVAL; switch ( policy ) { 3000989c: e3510004 cmp r1, #4 300098a0: 8a000008 bhi 300098c8 300098a4: e3a03001 mov r3, #1 300098a8: e1a03113 lsl r3, r3, r1 300098ac: e3130017 tst r3, #23 case SCHED_OTHER: case SCHED_FIFO: case SCHED_RR: case SCHED_SPORADIC: attr->schedpolicy = policy; 300098b0: 15801014 strne r1, [r0, #20] return 0; 300098b4: 13a00000 movne r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( policy ) { 300098b8: 112fff1e bxne lr 300098bc: ea000001 b 300098c8 <== NOT EXECUTED pthread_attr_t *attr, int policy ) { if ( !attr || !attr->is_initialized ) return EINVAL; 300098c0: e3a00016 mov r0, #22 300098c4: e12fff1e bx lr case SCHED_SPORADIC: attr->schedpolicy = policy; return 0; default: return ENOTSUP; 300098c8: e3a00086 mov r0, #134 ; 0x86 } } 300098cc: e12fff1e bx lr =============================================================================== 300050d4 : 300050d4: e59f30f4 ldr r3, [pc, #244] ; 300051d0 int pthread_key_create( pthread_key_t *key, void (*destructor)( void * ) ) { 300050d8: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 300050dc: e5932000 ldr r2, [r3] 300050e0: e1a08000 mov r8, r0 300050e4: e2822001 add r2, r2, #1 300050e8: e5832000 str r2, [r3] 300050ec: e1a05001 mov r5, r1 * the inactive chain of free keys control blocks. */ RTEMS_INLINE_ROUTINE POSIX_Keys_Control *_POSIX_Keys_Allocate( void ) { return (POSIX_Keys_Control *) _Objects_Allocate( &_POSIX_Keys_Information ); 300050f0: e59f00dc ldr r0, [pc, #220] ; 300051d4 300050f4: eb000835 bl 300071d0 <_Objects_Allocate> _Thread_Disable_dispatch(); the_key = _POSIX_Keys_Allocate(); if ( !the_key ) { 300050f8: e2504000 subs r4, r0, #0 300050fc: 1a000002 bne 3000510c _Thread_Enable_dispatch(); 30005100: eb000b52 bl 30007e50 <_Thread_Enable_dispatch> return EAGAIN; 30005104: e3a0000b mov r0, #11 30005108: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } the_key->destructor = destructor; 3000510c: e59f70c4 ldr r7, [pc, #196] ; 300051d8 30005110: e5845010 str r5, [r4, #16] 30005114: e1a06004 mov r6, r4 * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 30005118: e3a05001 mov r5, #1 the_api <= OBJECTS_APIS_LAST; the_api++ ) { if ( _Objects_Information_table[ the_api ] ) { 3000511c: e5b73004 ldr r3, [r7, #4]! 30005120: e3530000 cmp r3, #0 30005124: 0a000019 beq 30005190 true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); 30005128: e5933004 ldr r3, [r3, #4] 3000512c: e1d3a1b0 ldrh sl, [r3, #16] 30005130: e28aa001 add sl, sl, #1 INTERNAL_ERROR_CORE, true, INTERNAL_ERROR_IMPLEMENTATION_KEY_CREATE_INCONSISTENCY ); #endif bytes_to_allocate = sizeof( void * ) * 30005134: e1a0a10a lsl sl, sl, #2 (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); 30005138: e1a0000a mov r0, sl 3000513c: eb00104a bl 3000926c <_Workspace_Allocate> if ( !table ) { 30005140: e2503000 subs r3, r0, #0 30005144: 1a00000c bne 3000517c int _EXFUN(pthread_once, (pthread_once_t *__once_control, void (*__init_routine)(void))); /* Thread-Specific Data Key Create, P1003.1c/Draft 10, p. 163 */ int _EXFUN(pthread_key_create, 30005148: e2856005 add r6, r5, #5 3000514c: e0846106 add r6, r4, r6, lsl #2 for ( --the_api; 30005150: ea000001 b 3000515c the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); 30005154: e5360004 ldr r0, [r6, #-4]! 30005158: eb001049 bl 30009284 <_Workspace_Free> #endif bytes_to_allocate = sizeof( void * ) * (_Objects_Information_table[ the_api ][ 1 ]->maximum + 1); table = _Workspace_Allocate( bytes_to_allocate ); if ( !table ) { for ( --the_api; 3000515c: e2555001 subs r5, r5, #1 30005160: 1afffffb bne 30005154 */ RTEMS_INLINE_ROUTINE void _POSIX_Keys_Free ( POSIX_Keys_Control *the_key ) { _Objects_Free( &_POSIX_Keys_Information, &the_key->Object ); 30005164: e59f0068 ldr r0, [pc, #104] ; 300051d4 30005168: e1a01004 mov r1, r4 3000516c: eb0008df bl 300074f0 <_Objects_Free> the_api >= 1; the_api-- ) _Workspace_Free( the_key->Values[ the_api ] ); _POSIX_Keys_Free( the_key ); _Thread_Enable_dispatch(); 30005170: eb000b36 bl 30007e50 <_Thread_Enable_dispatch> return ENOMEM; 30005174: e3a0000c mov r0, #12 30005178: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} } the_key->Values[ the_api ] = table; 3000517c: e5863018 str r3, [r6, #24] memset( table, '\0', bytes_to_allocate ); 30005180: e3a01000 mov r1, #0 30005184: e1a0200a mov r2, sl 30005188: eb002450 bl 3000e2d0 3000518c: ea000000 b 30005194 } else { the_key->Values[ the_api ] = NULL; 30005190: e5863018 str r3, [r6, #24] <== NOT EXECUTED * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; the_api <= OBJECTS_APIS_LAST; the_api++ ) { 30005194: e2855001 add r5, r5, #1 * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 30005198: e3550004 cmp r5, #4 the_api <= OBJECTS_APIS_LAST; the_api++ ) { 3000519c: e2866004 add r6, r6, #4 * APIs are optional. * * NOTE: Currently RTEMS Classic API tasks are always enabled. */ for ( the_api = 1; 300051a0: 1affffdd bne 3000511c #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300051a4: e59f2028 ldr r2, [pc, #40] ; 300051d4 Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 300051a8: e5943008 ldr r3, [r4, #8] #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300051ac: e592201c ldr r2, [r2, #28] Objects_Information *information, Objects_Control *the_object, uint32_t name ) { _Objects_Set_local_object( 300051b0: e1d410b8 ldrh r1, [r4, #8] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 300051b4: e3a05000 mov r5, #0 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; 300051b8: e7824101 str r4, [r2, r1, lsl #2] _Objects_Get_index( the_object->id ), the_object ); /* ASSERT: information->is_string == false */ the_object->name.name_u32 = name; 300051bc: e584500c str r5, [r4, #12] } _Objects_Open_u32( &_POSIX_Keys_Information, &the_key->Object, 0 ); *key = the_key->Object.id; 300051c0: e5883000 str r3, [r8] _Thread_Enable_dispatch(); 300051c4: eb000b21 bl 30007e50 <_Thread_Enable_dispatch> return 0; 300051c8: e1a00005 mov r0, r5 } 300051cc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 30007210 : int pthread_mutexattr_setpshared( pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) 30007210: e3500000 cmp r0, #0 30007214: 0a000007 beq 30007238 30007218: e5903000 ldr r3, [r0] 3000721c: e3530000 cmp r3, #0 30007220: 0a000004 beq 30007238 return EINVAL; switch ( pshared ) { 30007224: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 30007228: 95801004 strls r1, [r0, #4] return 0; 3000722c: 93a00000 movls r0, #0 ) { if ( !attr || !attr->is_initialized ) return EINVAL; switch ( pshared ) { 30007230: 912fff1e bxls lr 30007234: ea000001 b 30007240 <== NOT EXECUTED pthread_mutexattr_t *attr, int pshared ) { if ( !attr || !attr->is_initialized ) return EINVAL; 30007238: e3a00016 mov r0, #22 3000723c: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 30007240: e3a00016 mov r0, #22 <== NOT EXECUTED } } 30007244: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30006c78 : int pthread_rwlockattr_setpshared( pthread_rwlockattr_t *attr, int pshared ) { if ( !attr ) 30006c78: e3500000 cmp r0, #0 30006c7c: 0a000007 beq 30006ca0 return EINVAL; if ( !attr->is_initialized ) 30006c80: e5903000 ldr r3, [r0] 30006c84: e3530000 cmp r3, #0 30006c88: 0a000004 beq 30006ca0 return EINVAL; switch ( pshared ) { 30006c8c: e3510001 cmp r1, #1 case PTHREAD_PROCESS_SHARED: case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; 30006c90: 95801004 strls r1, [r0, #4] return 0; 30006c94: 93a00000 movls r0, #0 return EINVAL; if ( !attr->is_initialized ) return EINVAL; switch ( pshared ) { 30006c98: 912fff1e bxls lr 30006c9c: ea000001 b 30006ca8 <== NOT EXECUTED { if ( !attr ) return EINVAL; if ( !attr->is_initialized ) return EINVAL; 30006ca0: e3a00016 mov r0, #22 30006ca4: e12fff1e bx lr case PTHREAD_PROCESS_PRIVATE: attr->process_shared = pshared; return 0; default: return EINVAL; 30006ca8: e3a00016 mov r0, #22 <== NOT EXECUTED } } 30006cac: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 300124ec : ssize_t read( int fd, void *buffer, size_t count ) { 300124ec: e92d4030 push {r4, r5, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 300124f0: e59f4098 ldr r4, [pc, #152] ; 30012590 300124f4: e5944000 ldr r4, [r4] 300124f8: e1500004 cmp r0, r4 300124fc: 2a000006 bcs 3001251c iop = rtems_libio_iop( fd ); 30012500: e59f408c ldr r4, [pc, #140] ; 30012594 30012504: e3a05038 mov r5, #56 ; 0x38 30012508: e5944000 ldr r4, [r4] 3001250c: e0244095 mla r4, r5, r0, r4 rtems_libio_check_is_open( iop ); 30012510: e5940014 ldr r0, [r4, #20] 30012514: e3100c01 tst r0, #256 ; 0x100 30012518: 1a000002 bne 30012528 3001251c: ebffe99a bl 3000cb8c <__errno> 30012520: e3a03009 mov r3, #9 30012524: ea000007 b 30012548 rtems_libio_check_buffer( buffer ); 30012528: e3510000 cmp r1, #0 3001252c: 0a000003 beq 30012540 rtems_libio_check_count( count ); 30012530: e3520000 cmp r2, #0 30012534: 0a000013 beq 30012588 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 30012538: e3100002 tst r0, #2 3001253c: 1a000004 bne 30012554 30012540: ebffe991 bl 3000cb8c <__errno> <== NOT EXECUTED 30012544: e3a03016 mov r3, #22 <== NOT EXECUTED 30012548: e5803000 str r3, [r0] 3001254c: e3e00000 mvn r0, #0 30012550: e8bd8030 pop {r4, r5, pc} return 0; /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 30012554: e5943020 ldr r3, [r4, #32] 30012558: e1a00004 mov r0, r4 3001255c: e1a0e00f mov lr, pc 30012560: e593f008 ldr pc, [r3, #8] if ( rc > 0 ) 30012564: e3500000 cmp r0, #0 30012568: d8bd8030 pople {r4, r5, pc} iop->offset += rc; 3001256c: e284300c add r3, r4, #12 30012570: e893000c ldm r3, {r2, r3} 30012574: e0922000 adds r2, r2, r0 30012578: e0a33fc0 adc r3, r3, r0, asr #31 3001257c: e584200c str r2, [r4, #12] 30012580: e5843010 str r3, [r4, #16] 30012584: e8bd8030 pop {r4, r5, pc} rtems_libio_check_fd( fd ); iop = rtems_libio_iop( fd ); rtems_libio_check_is_open( iop ); rtems_libio_check_buffer( buffer ); rtems_libio_check_count( count ); 30012588: e1a00002 mov r0, r2 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 3001258c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 300051f8 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 300051f8: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 300051fc: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 30005200: e24dd018 sub sp, sp, #24 30005204: e1a07000 mov r7, r0 30005208: e1a05002 mov r5, r2 rtems_filesystem_location_info_t loc; int result; if (!buf) 3000520c: 1a000002 bne 3000521c rtems_set_errno_and_return_minus_one( EFAULT ); 30005210: eb002a18 bl 3000fa78 <__errno> <== NOT EXECUTED 30005214: e3a0300e mov r3, #14 <== NOT EXECUTED 30005218: ea000013 b 3000526c <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 3000521c: eb00319a bl 3001188c 30005220: e28d4004 add r4, sp, #4 30005224: e1a01000 mov r1, r0 30005228: e3a02000 mov r2, #0 3000522c: e1a00007 mov r0, r7 30005230: e1a03004 mov r3, r4 30005234: e58d2000 str r2, [sp] 30005238: ebfffbb3 bl 3000410c 0, &loc, false ); if ( result != 0 ) 3000523c: e3500000 cmp r0, #0 30005240: 1a000015 bne 3000529c return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 30005244: e1a00004 mov r0, r4 30005248: e59d3010 ldr r3, [sp, #16] 3000524c: e1a0e00f mov lr, pc 30005250: e593f010 ldr pc, [r3, #16] 30005254: e3500004 cmp r0, #4 30005258: 0a000005 beq 30005274 rtems_filesystem_freenode( &loc ); 3000525c: e1a00004 mov r0, r4 30005260: ebfffbe4 bl 300041f8 rtems_set_errno_and_return_minus_one( EINVAL ); 30005264: eb002a03 bl 3000fa78 <__errno> 30005268: e3a03016 mov r3, #22 3000526c: e5803000 str r3, [r0] 30005270: ea000009 b 3000529c } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 30005274: e1a02005 mov r2, r5 30005278: e1a00004 mov r0, r4 3000527c: e1a01006 mov r1, r6 30005280: e59d3010 ldr r3, [sp, #16] 30005284: e1a0e00f mov lr, pc 30005288: e593f03c ldr pc, [r3, #60] ; 0x3c 3000528c: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 30005290: e1a00004 mov r0, r4 30005294: ebfffbd7 bl 300041f8 return result; 30005298: ea000000 b 300052a0 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) return -1; 3000529c: e3e05000 mvn r5, #0 result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 300052a0: e1a00005 mov r0, r5 300052a4: e28dd018 add sp, sp, #24 300052a8: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 300125f0 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 300125f0: e59f310c ldr r3, [pc, #268] ; 30012704 void *realloc( void *ptr, size_t size ) { 300125f4: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 300125f8: e5932010 ldr r2, [r3, #16] void *realloc( void *ptr, size_t size ) { 300125fc: e1a04000 mov r4, r0 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 30012600: e2822001 add r2, r2, #1 30012604: 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())) { 30012608: e59f30f8 ldr r3, [pc, #248] ; 30012708 void *realloc( void *ptr, size_t size ) { 3001260c: 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())) { 30012610: e5933000 ldr r3, [r3] 30012614: e3530003 cmp r3, #3 30012618: 1a000009 bne 30012644 if (_Thread_Dispatch_disable_level > 0) 3001261c: e59f30e8 ldr r3, [pc, #232] ; 3001270c 30012620: e5933000 ldr r3, [r3] 30012624: e3530000 cmp r3, #0 return (void *) 0; 30012628: 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) 3001262c: 1a000032 bne 300126fc return (void *) 0; if (_ISR_Nest_level > 0) 30012630: e59f20d8 ldr r2, [pc, #216] ; 30012710 30012634: e5922000 ldr r2, [r2] 30012638: e3520000 cmp r2, #0 return (void *) 0; 3001263c: 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) 30012640: 1a00002d bne 300126fc } /* * Continue with realloc(). */ if ( !ptr ) 30012644: e3540000 cmp r4, #0 30012648: 1a000003 bne 3001265c return malloc( size ); 3001264c: e1a00005 mov r0, r5 30012650: ebffbedb bl 300021c4 30012654: e1a04000 mov r4, r0 30012658: ea000027 b 300126fc if ( !size ) { 3001265c: e3550000 cmp r5, #0 30012660: 1a000003 bne 30012674 free( ptr ); 30012664: e1a00004 mov r0, r4 <== NOT EXECUTED 30012668: ebffbe06 bl 30001e88 <== NOT EXECUTED return (void *) 0; 3001266c: e1a04005 mov r4, r5 <== NOT EXECUTED 30012670: ea000021 b 300126fc <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 30012674: e59f6098 ldr r6, [pc, #152] ; 30012714 30012678: e1a01004 mov r1, r4 3001267c: e5960000 ldr r0, [r6] 30012680: e1a0200d mov r2, sp 30012684: eb00004e bl 300127c4 <_Protected_heap_Get_block_size> 30012688: e2507000 subs r7, r0, #0 3001268c: 1a000004 bne 300126a4 errno = EINVAL; 30012690: ebffe93d bl 3000cb8c <__errno> 30012694: e3a03016 mov r3, #22 30012698: e5803000 str r3, [r0] return (void *) 0; 3001269c: e1a04007 mov r4, r7 300126a0: ea000015 b 300126fc } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 300126a4: e5960000 ldr r0, [r6] 300126a8: e1a01004 mov r1, r4 300126ac: e1a02005 mov r2, r5 300126b0: eb000054 bl 30012808 <_Protected_heap_Resize_block> 300126b4: e3500000 cmp r0, #0 300126b8: 1a00000f bne 300126fc * 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 ); 300126bc: e1a00005 mov r0, r5 300126c0: ebffbebf bl 300021c4 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 300126c4: e59f3038 ldr r3, [pc, #56] ; 30012704 if ( !new_area ) { 300126c8: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 300126cc: e5932004 ldr r2, [r3, #4] 300126d0: e2422001 sub r2, r2, #1 300126d4: e5832004 str r2, [r3, #4] if ( !new_area ) { 300126d8: 0a000006 beq 300126f8 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 300126dc: e59d2000 ldr r2, [sp] 300126e0: e1a01004 mov r1, r4 300126e4: e1550002 cmp r5, r2 300126e8: 31a02005 movcc r2, r5 300126ec: ebffeb54 bl 3000d444 free( ptr ); 300126f0: e1a00004 mov r0, r4 300126f4: ebffbde3 bl 30001e88 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 300126f8: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 300126fc: e1a00004 mov r0, r4 30012700: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 30003e34 : #include int rmdir( const char *pathname ) { 30003e34: e92d40f0 push {r4, r5, r6, r7, lr} 30003e38: e24dd030 sub sp, sp, #48 ; 0x30 30003e3c: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 30003e40: ebfffb54 bl 30002b98 if ( parentpathlen == 0 ) 30003e44: e2504000 subs r4, r0, #0 30003e48: e28d3018 add r3, sp, #24 30003e4c: 1a000005 bne 30003e68 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 30003e50: e1a00006 mov r0, r6 30003e54: e28d102c add r1, sp, #44 ; 0x2c 30003e58: e1a02003 mov r2, r3 30003e5c: eb000048 bl 30003f84 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 30003e60: e1a05004 mov r5, r4 30003e64: ea000008 b 30003e8c parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 30003e68: e3a02000 mov r2, #0 30003e6c: e58d2000 str r2, [sp] 30003e70: e1a00006 mov r0, r6 30003e74: e1a01004 mov r1, r4 30003e78: e2822002 add r2, r2, #2 30003e7c: ebfffb27 bl 30002b20 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 30003e80: e3500000 cmp r0, #0 30003e84: 1a00003a bne 30003f74 return -1; free_parentloc = true; 30003e88: e3a05001 mov r5, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 30003e8c: e28dc004 add ip, sp, #4 30003e90: e28de018 add lr, sp, #24 30003e94: e8be000f ldm lr!, {r0, r1, r2, r3} 30003e98: e8ac000f stmia ip!, {r0, r1, r2, r3} name = pathname + parentpathlen; 30003e9c: e0864004 add r4, r6, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 30003ea0: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 30003ea4: e1a00004 mov r0, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 30003ea8: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 30003eac: eb002b3e bl 3000ebac 30003eb0: e1a01000 mov r1, r0 30003eb4: e1a00004 mov r0, r4 30003eb8: ebfffb44 bl 30002bd0 30003ebc: e0846000 add r6, r4, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 30003ec0: e1a00006 mov r0, r6 30003ec4: eb002b38 bl 3000ebac 30003ec8: e28d4004 add r4, sp, #4 30003ecc: e1a01000 mov r1, r0 30003ed0: e3a02000 mov r2, #0 30003ed4: e1a00006 mov r0, r6 30003ed8: e1a03004 mov r3, r4 30003edc: e58d2000 str r2, [sp] 30003ee0: ebfffae6 bl 30002a80 0, &loc, false ); if ( result != 0 ) { 30003ee4: e3500000 cmp r0, #0 30003ee8: 0a000004 beq 30003f00 if ( free_parentloc ) 30003eec: e3550000 cmp r5, #0 30003ef0: 0a00001f beq 30003f74 rtems_filesystem_freenode( &parentloc ); 30003ef4: e28d0018 add r0, sp, #24 <== NOT EXECUTED 30003ef8: ebfffbd0 bl 30002e40 <== NOT EXECUTED 30003efc: ea00001c b 30003f74 <== NOT EXECUTED } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 30003f00: e1a00004 mov r0, r4 30003f04: e59d3010 ldr r3, [sp, #16] 30003f08: e1a0e00f mov lr, pc 30003f0c: e593f010 ldr pc, [r3, #16] 30003f10: e3500001 cmp r0, #1 30003f14: 0a000008 beq 30003f3c rtems_filesystem_freenode( &loc ); 30003f18: e1a00004 mov r0, r4 30003f1c: ebfffbc7 bl 30002e40 if ( free_parentloc ) 30003f20: e3550000 cmp r5, #0 rtems_filesystem_freenode( &parentloc ); 30003f24: 128d0018 addne r0, sp, #24 30003f28: 1bfffbc4 blne 30002e40 rtems_set_errno_and_return_minus_one( ENOTDIR ); 30003f2c: eb002759 bl 3000dc98 <__errno> 30003f30: e3a03014 mov r3, #20 30003f34: e5803000 str r3, [r0] 30003f38: ea00000d b 30003f74 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 30003f3c: e28d6018 add r6, sp, #24 30003f40: e1a01004 mov r1, r4 30003f44: e59d300c ldr r3, [sp, #12] 30003f48: e1a00006 mov r0, r6 30003f4c: e1a0e00f mov lr, pc 30003f50: e593f034 ldr pc, [r3, #52] ; 0x34 30003f54: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); 30003f58: e1a00004 mov r0, r4 30003f5c: ebfffbb7 bl 30002e40 if ( free_parentloc ) 30003f60: e3550000 cmp r5, #0 30003f64: 0a000003 beq 30003f78 rtems_filesystem_freenode( &parentloc ); 30003f68: e1a00006 mov r0, r6 30003f6c: ebfffbb3 bl 30002e40 30003f70: ea000000 b 30003f78 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 30003f74: e3e07000 mvn r7, #0 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 30003f78: e1a00007 mov r0, r7 30003f7c: e28dd030 add sp, sp, #48 ; 0x30 30003f80: e8bd80f0 pop {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: 0a000057 beq 300025c4 * 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: eb00149b bl 300076e4 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 30002474: e1a01005 mov r1, r5 30002478: e59f014c ldr r0, [pc, #332] ; 300025cc 3000247c: e1a02004 mov r2, r4 30002480: eb001d7f bl 30009a84 <_Timespec_Subtract> } } } #endif (*print)( 30002484: e1a00008 mov r0, r8 30002488: e59f1140 ldr r1, [pc, #320] ; 300025d0 3000248c: e1a0e00f mov lr, pc 30002490: e12fff1a bx sl 30002494: e59f5138 ldr r5, [pc, #312] ; 300025d4 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 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 3000249c: e5b53004 ldr r3, [r5, #4]! 300024a0: e3530000 cmp r3, #0 300024a4: 0a00003a beq 30002594 continue; information = _Objects_Information_table[ api_index ][ 1 ]; 300024a8: e5936004 ldr r6, [r3, #4] if ( information ) { 300024ac: e3560000 cmp r6, #0 300024b0: 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( 300024b4: 128d9018 addne r9, sp, #24 api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { 300024b8: 1a000032 bne 30002588 300024bc: ea000034 b 30002594 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 300024c0: e596301c ldr r3, [r6, #28] 300024c4: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 300024c8: e3540000 cmp r4, #0 300024cc: 0a00002c beq 30002584 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 300024d0: e3a0100d mov r1, #13 300024d4: e1a0200b mov r2, fp 300024d8: e5940008 ldr r0, [r4, #8] 300024dc: eb000fe3 bl 30006470 (*print)( 300024e0: e5942008 ldr r2, [r4, #8] 300024e4: e1a0300b mov r3, fp 300024e8: e1a00008 mov r0, r8 300024ec: e59f10e4 ldr r1, [pc, #228] ; 300025d8 300024f0: e1a0e00f mov lr, pc 300024f4: 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; 300024f8: e2843084 add r3, r4, #132 ; 0x84 300024fc: e893000c ldm r3, {r2, r3} 30002500: e58d2020 str r2, [sp, #32] 30002504: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 30002508: e59f20cc ldr r2, [pc, #204] ; 300025dc 3000250c: e5923004 ldr r3, [r2, #4] 30002510: e5932008 ldr r2, [r3, #8] 30002514: e5943008 ldr r3, [r4, #8] 30002518: e1520003 cmp r2, r3 3000251c: 1a000006 bne 3000253c Timestamp_Control used; _Timestamp_Subtract( 30002520: e59f00b8 ldr r0, [pc, #184] ; 300025e0 30002524: e28d1030 add r1, sp, #48 ; 0x30 30002528: e1a02009 mov r2, r9 3000252c: eb001d54 bl 30009a84 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 30002530: e28d0020 add r0, sp, #32 30002534: e1a01009 mov r1, r9 30002538: eb001d16 bl 30009998 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 3000253c: e28d203c add r2, sp, #60 ; 0x3c 30002540: e28d3038 add r3, sp, #56 ; 0x38 30002544: e28d0020 add r0, sp, #32 30002548: e28d1028 add r1, sp, #40 ; 0x28 3000254c: eb001d29 bl 300099f8 <_Timespec_Divide> /* * Print the information */ (*print)( context, 30002550: e3a01ffa mov r1, #1000 ; 0x3e8 30002554: e59d0024 ldr r0, [sp, #36] ; 0x24 30002558: eb00552e bl 30017a18 <__aeabi_uidiv> 3000255c: e59d203c ldr r2, [sp, #60] ; 0x3c 30002560: e1a03000 mov r3, r0 30002564: e58d2000 str r2, [sp] 30002568: e59d2038 ldr r2, [sp, #56] ; 0x38 3000256c: e1a00008 mov r0, r8 30002570: e58d2004 str r2, [sp, #4] 30002574: e59f1068 ldr r1, [pc, #104] ; 300025e4 30002578: e59d2020 ldr r2, [sp, #32] 3000257c: e1a0e00f mov lr, pc 30002580: e12fff1a bx sl api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { for ( i=1 ; i <= information->maximum ; i++ ) { 30002584: e2877001 add r7, r7, #1 30002588: e1d631b0 ldrh r3, [r6, #16] 3000258c: e1570003 cmp r7, r3 30002590: 9affffca bls 300024c0 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 30002594: e59f304c ldr r3, [pc, #76] ; 300025e8 30002598: e1550003 cmp r5, r3 3000259c: 1affffbe bne 3000249c } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 300025a0: e3a01ffa mov r1, #1000 ; 0x3e8 300025a4: e59d002c ldr r0, [sp, #44] ; 0x2c 300025a8: eb00551a bl 30017a18 <__aeabi_uidiv> 300025ac: e59f1038 ldr r1, [pc, #56] ; 300025ec 300025b0: e1a03000 mov r3, r0 300025b4: e59d2028 ldr r2, [sp, #40] ; 0x28 300025b8: e1a00008 mov r0, r8 300025bc: e1a0e00f mov lr, pc 300025c0: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 300025c4: e28dd040 add sp, sp, #64 ; 0x40 300025c8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000cae0 : [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { 3000cae0: e3500000 cmp r0, #0 [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { 3000cae4: e92d4010 push {r4, lr} if (sc == RTEMS_SUCCESSFUL) { 3000cae8: 08bd8010 popeq {r4, pc} return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { 3000caec: e350001c cmp r0, #28 <== NOT EXECUTED eno = status_code_to_errno [sc]; 3000caf0: 959f3014 ldrls r3, [pc, #20] ; 3000cb0c <== NOT EXECUTED int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; 3000caf4: 83a04016 movhi r4, #22 <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; 3000caf8: 97934100 ldrls r4, [r3, r0, lsl #2] <== NOT EXECUTED } errno = eno; 3000cafc: eb000022 bl 3000cb8c <__errno> <== NOT EXECUTED 3000cb00: e5804000 str r4, [r0] <== NOT EXECUTED return -1; 3000cb04: e3e00000 mvn r0, #0 <== NOT EXECUTED } } 3000cb08: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 30001d88 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 30001d88: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} 30001d8c: e1a06003 mov r6, r3 /* * Verify Input parameters. */ if ( !pathname ) 30001d90: e2507000 subs r7, r0, #0 int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { int i = 0; 30001d94: e3a03000 mov r3, #0 size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 30001d98: e1a05001 mov r5, r1 30001d9c: e1a04002 mov r4, r2 int i = 0; 30001da0: e58d3004 str r3, [sp, #4] /* * Verify Input parameters. */ if ( !pathname ) 30001da4: 1a000002 bne 30001db4 rtems_set_errno_and_return_minus_one( EFAULT ); 30001da8: eb002b77 bl 3000cb8c <__errno> <== NOT EXECUTED 30001dac: e3a0300e mov r3, #14 <== NOT EXECUTED 30001db0: ea000003 b 30001dc4 <== NOT EXECUTED if ( !pathloc ) 30001db4: e3560000 cmp r6, #0 30001db8: 1a000004 bne 30001dd0 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 30001dbc: eb002b72 bl 3000cb8c <__errno> <== NOT EXECUTED 30001dc0: e3a03005 mov r3, #5 <== NOT EXECUTED 30001dc4: e5803000 str r3, [r0] <== NOT EXECUTED 30001dc8: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001dcc: ea00000a b 30001dfc <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 30001dd0: e28d1004 add r1, sp, #4 30001dd4: e1a02006 mov r2, r6 30001dd8: eb00038b bl 30002c0c /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 30001ddc: e59d1004 ldr r1, [sp, #4] 30001de0: e59d301c ldr r3, [sp, #28] 30001de4: e0870001 add r0, r7, r1 30001de8: e58d3000 str r3, [sp] 30001dec: e0611005 rsb r1, r1, r5 30001df0: e1a02004 mov r2, r4 30001df4: e1a03006 mov r3, r6 30001df8: ebffffba bl 30001ce8 pathnamelen - i, flags, pathloc, follow_link ); } 30001dfc: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} =============================================================================== 30001ce8 : /* * Verify Input parameters. */ if ( !pathname ) 30001ce8: e3500000 cmp r0, #0 size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 30001cec: e92d4030 push {r4, r5, lr} 30001cf0: e1a05002 mov r5, r2 30001cf4: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 30001cf8: 1a000002 bne 30001d08 rtems_set_errno_and_return_minus_one( EFAULT ); 30001cfc: eb002ba2 bl 3000cb8c <__errno> <== NOT EXECUTED 30001d00: e3a0300e mov r3, #14 <== NOT EXECUTED 30001d04: ea000003 b 30001d18 <== NOT EXECUTED if ( !pathloc ) 30001d08: e3530000 cmp r3, #0 30001d0c: 1a000004 bne 30001d24 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 30001d10: eb002b9d bl 3000cb8c <__errno> <== NOT EXECUTED 30001d14: e3a03005 mov r3, #5 <== NOT EXECUTED 30001d18: e5803000 str r3, [r0] <== NOT EXECUTED 30001d1c: e3e00000 mvn r0, #0 <== NOT EXECUTED 30001d20: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 30001d24: e593c00c ldr ip, [r3, #12] 30001d28: e1a0e00f mov lr, pc 30001d2c: e59cf000 ldr pc, [ip] /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 30001d30: e59d200c ldr r2, [sp, #12] 30001d34: e2703001 rsbs r3, r0, #1 30001d38: 33a03000 movcc r3, #0 30001d3c: e3520000 cmp r2, #0 30001d40: 03a03000 moveq r3, #0 30001d44: e3530000 cmp r3, #0 30001d48: 08bd8030 popeq {r4, r5, pc} type = (*pathloc->ops->node_type_h)( pathloc ); 30001d4c: e594300c ldr r3, [r4, #12] 30001d50: e1a00004 mov r0, r4 30001d54: e1a0e00f mov lr, pc 30001d58: e593f010 ldr pc, [r3, #16] if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 30001d5c: e2400003 sub r0, r0, #3 30001d60: e3500001 cmp r0, #1 30001d64: 8a000005 bhi 30001d80 * pathloc will be passed up (and eventually released). * Hence, the (valid) originial node that we submit to * eval_link_h() should be released by the handler. */ result = (*pathloc->ops->eval_link_h)( pathloc, flags ); 30001d68: e594300c ldr r3, [r4, #12] 30001d6c: e1a00004 mov r0, r4 30001d70: e1a01005 mov r1, r5 30001d74: e1a0e00f mov lr, pc 30001d78: e593f034 ldr pc, [r3, #52] ; 0x34 30001d7c: e8bd8030 pop {r4, r5, pc} if ( (result == 0) && follow_link ) { type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 30001d80: e3a00000 mov r0, #0 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 30001d84: e8bd8030 pop {r4, r5, pc} =============================================================================== 30001b8c : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 30001b8c: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 30001b90: e59f60e0 ldr r6, [pc, #224] ; 30001c78 30001b94: e3a02012 mov r2, #18 30001b98: 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 ) { 30001b9c: e24dd018 sub sp, sp, #24 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 30001ba0: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 30001ba4: e59f30d0 ldr r3, [pc, #208] ; 30001c7c 30001ba8: e5933000 ldr r3, [r3] 30001bac: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); 30001bb0: 059f00c8 ldreq r0, [pc, #200] ; 30001c80 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 30001bb4: 0a00000a beq 30001be4 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 30001bb8: e59f30c4 ldr r3, [pc, #196] ; 30001c84 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 30001bbc: e3a05000 mov r5, #0 */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 30001bc0: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 30001bc4: e58d5000 str r5, [sp] 30001bc8: e5930008 ldr r0, [r3, #8] 30001bcc: e593100c ldr r1, [r3, #12] 30001bd0: e893000c ldm r3, {r2, r3} 30001bd4: eb000208 bl 300023fc if ( status == -1 ) 30001bd8: e3700001 cmn r0, #1 30001bdc: 1a000001 bne 30001be8 rtems_fatal_error_occurred( 0xABCD0002 ); 30001be0: e59f00a0 ldr r0, [pc, #160] ; 30001c88 <== NOT EXECUTED 30001be4: eb000eae bl 300056a4 <== NOT EXECUTED rtems_filesystem_link_counts = 0; 30001be8: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30001bec: 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; 30001bf0: 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); 30001bf4: e3a01001 mov r1, #1 30001bf8: e1a03004 mov r3, r4 30001bfc: e1a02005 mov r2, r5 30001c00: e59f0084 ldr r0, [pc, #132] ; 30001c8c 30001c04: e58d5000 str r5, [sp] 30001c08: eb00005e bl 30001d88 rtems_filesystem_root = loc; 30001c0c: e596c000 ldr ip, [r6] 30001c10: e1a07004 mov r7, r4 30001c14: e28cc018 add ip, ip, #24 30001c18: e8b7000f ldm r7!, {r0, r1, r2, r3} 30001c1c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30001c20: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30001c24: 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; 30001c28: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30001c2c: e1a02005 mov r2, r5 30001c30: e1a03004 mov r3, r4 30001c34: e59f0050 ldr r0, [pc, #80] ; 30001c8c 30001c38: e58d5000 str r5, [sp] 30001c3c: eb000051 bl 30001d88 rtems_filesystem_current = loc; 30001c40: e8b4000f ldm r4!, {r0, r1, r2, r3} 30001c44: e596c000 ldr ip, [r6] 30001c48: e28cc004 add ip, ip, #4 30001c4c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30001c50: 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); 30001c54: e59f0034 ldr r0, [pc, #52] ; 30001c90 /* 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; 30001c58: 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); 30001c5c: e59f1030 ldr r1, [pc, #48] ; 30001c94 30001c60: eb000193 bl 300022b4 if ( status != 0 ) 30001c64: e3500000 cmp r0, #0 rtems_fatal_error_occurred( 0xABCD0003 ); 30001c68: 159f0028 ldrne r0, [pc, #40] ; 30001c98 * 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 ) 30001c6c: 1affffdc bne 30001be4 * 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. */ } 30001c70: e28dd018 add sp, sp, #24 30001c74: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 3000991c : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 3000991c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30009920: e1a06000 mov r6, r0 30009924: e1a07001 mov r7, r1 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; 30009928: e3a00000 mov r0, #0 bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; 3000992c: e59f4078 ldr r4, [pc, #120] ; 300099ac rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 30009930: ea000004 b 30009948 stop = (*routine)( table_entry, routine_arg ); 30009934: e1a00004 mov r0, r4 30009938: e1a01007 mov r1, r7 3000993c: e1a0e00f mov lr, pc 30009940: e12fff16 bx r6 ++table_entry; 30009944: e2844008 add r4, r4, #8 { const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 30009948: e5943000 ldr r3, [r4] 3000994c: e3530000 cmp r3, #0 30009950: 0a000002 beq 30009960 30009954: e3500000 cmp r0, #0 30009958: 0afffff5 beq 30009934 3000995c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 30009960: e2508000 subs r8, r0, #0 30009964: 18bd81f0 popne {r4, r5, r6, r7, r8, pc} } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 30009968: e59f5040 ldr r5, [pc, #64] ; 300099b0 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { rtems_libio_lock(); 3000996c: ebffffe0 bl 300098f4 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 30009970: e4954004 ldr r4, [r5], #4 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 30009974: ea000005 b 30009990 !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 30009978: e2840008 add r0, r4, #8 3000997c: e1a01007 mov r1, r7 30009980: e1a0e00f mov lr, pc 30009984: e12fff16 bx r6 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 30009988: e5944000 ldr r4, [r4] !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; node = rtems_chain_next( node ) ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); 3000998c: e1a08000 mov r8, r0 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 30009990: e1540005 cmp r4, r5 30009994: 0a000001 beq 300099a0 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 30009998: e3580000 cmp r8, #0 3000999c: 0afffff5 beq 30009978 ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); } rtems_libio_unlock(); 300099a0: ebffffd9 bl 3000990c 300099a4: e1a00008 mov r0, r8 } return stop; } 300099a8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 30002778 : void *rtems_gxx_getspecific(__gthread_key_t key) { 30002778: e92d4031 push {r0, r4, r5, lr} 3000277c: e1a04000 mov r4, r0 rtems_status_code status; void *p= 0; 30002780: e3a05000 mov r5, #0 30002784: e28d2004 add r2, sp, #4 30002788: e5225004 str r5, [r2, #-4]! /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ); 3000278c: e1a00005 mov r0, r5 30002790: e1a01004 mov r1, r4 30002794: e1a0200d mov r2, sp 30002798: eb000e2e bl 30006058 if ( status == RTEMS_SUCCESSFUL ) { 3000279c: e1500005 cmp r0, r5 /* We do not have to do this, but what the heck ! */ p= key->val; 300027a0: 05943000 ldreq r3, [r4] 300027a4: 058d3000 streq r3, [sp] rtems_status_code status; void *p= 0; /* register with RTEMS the buffer that will hold the key values */ status = rtems_task_variable_get( RTEMS_SELF, (void **)key, &p ); if ( status == RTEMS_SUCCESSFUL ) { 300027a8: 0a000007 beq 300027cc p= key->val; } else { /* fisrt time, always set to zero, it is unknown the value that the others * threads are using at the moment of this call */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); 300027ac: e1a00005 mov r0, r5 <== NOT EXECUTED 300027b0: e1a01004 mov r1, r4 <== NOT EXECUTED 300027b4: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 300027b8: eb000dde bl 30005f38 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) { 300027bc: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); } key->val = (void *)0; 300027c0: 05840000 streq r0, [r4] <== NOT EXECUTED /* fisrt time, always set to zero, it is unknown the value that the others * threads are using at the moment of this call */ status = rtems_task_variable_add( RTEMS_SELF, (void **)key, key->dtor ); if ( status != RTEMS_SUCCESSFUL ) { rtems_panic ("rtems_gxx_getspecific"); 300027c4: 159f0008 ldrne r0, [pc, #8] ; 300027d4 <== NOT EXECUTED 300027c8: 1b001ec5 blne 3000a2e4 <== NOT EXECUTED p, rtems_task_self() ); #endif return p; } 300027cc: e59d0000 ldr r0, [sp] 300027d0: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 30002738 : { #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; 30002738: e3a03000 mov r3, #0 <== NOT EXECUTED 3000273c: e5803000 str r3, [r0] <== NOT EXECUTED return 0; } 30002740: e1a00003 mov r0, r3 <== NOT EXECUTED 30002744: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30002858 : int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex) { 30002858: e52de004 push {lr} ; (str lr, [sp, #-4]!) <== NOT EXECUTED #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: destroy mutex=%X\n", *mutex ); #endif status = rtems_semaphore_delete(*(rtems_id *)mutex); 3000285c: e5900000 ldr r0, [r0] <== NOT EXECUTED 30002860: eb000c1a bl 300058d0 <== NOT EXECUTED if ( status == RTEMS_SUCCESSFUL ) 30002864: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; return -1; } 30002868: 13e00000 mvnne r0, #0 <== NOT EXECUTED 3000286c: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 30003260 : } } rtems_status_code rtems_libio_set_private_env(void) { 30003260: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 30003264: e3a00000 mov r0, #0 free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 30003268: e24dd01c sub sp, sp, #28 rtems_status_code sc; rtems_id task_id; rtems_filesystem_location_info_t loc; sc=rtems_task_ident(RTEMS_SELF,0,&task_id); 3000326c: e1a01000 mov r1, r0 30003270: e28d2018 add r2, sp, #24 30003274: eb000a7d bl 30005c70 if (sc != RTEMS_SUCCESSFUL) return sc; 30003278: e2508000 subs r8, r0, #0 3000327c: 1a000037 bne 30003360 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 30003280: e59f40e4 ldr r4, [pc, #228] ; 3000336c 30003284: e59f30e4 ldr r3, [pc, #228] ; 30003370 30003288: e5942000 ldr r2, [r4] 3000328c: e1520003 cmp r2, r3 30003290: 1a00000f bne 300032d4 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 30003294: e2800048 add r0, r0, #72 ; 0x48 30003298: ebfffd51 bl 300027e4 if (!tmp) 3000329c: e2505000 subs r5, r0, #0 return RTEMS_NO_MEMORY; 300032a0: 03a0801a moveq r8, #26 if (sc != RTEMS_SUCCESSFUL) return sc; /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); if (!tmp) 300032a4: 0a00002d beq 30003360 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( 300032a8: e1a00008 mov r0, r8 300032ac: e1a01004 mov r1, r4 300032b0: e59f20bc ldr r2, [pc, #188] ; 30003374 300032b4: eb000abd bl 30005db0 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 300032b8: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 300032bc: 05845000 streq r5, [r4] sc = rtems_task_variable_add( RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 300032c0: 0a000003 beq 300032d4 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 300032c4: e1a00005 mov r0, r5 <== NOT EXECUTED 300032c8: ebfffbdf bl 3000224c <== NOT EXECUTED return sc; 300032cc: e1a08006 mov r8, r6 <== NOT EXECUTED 300032d0: ea000022 b 30003360 <== NOT EXECUTED } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 300032d4: e59f6090 ldr r6, [pc, #144] ; 3000336c 300032d8: e59f1090 ldr r1, [pc, #144] ; 30003370 300032dc: e5964000 ldr r4, [r6] 300032e0: e3a02048 mov r2, #72 ; 0x48 300032e4: e1a00004 mov r0, r4 300032e8: eb002a5d bl 3000dc64 rtems_current_user_env->task_id=task_id; /* mark the local values*/ 300032ec: e59d3018 ldr r3, [sp, #24] * what we are trying to do here is forking off * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 300032f0: e3a05000 mov r5, #0 } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ rtems_current_user_env->task_id=task_id; /* mark the local values*/ 300032f4: e5843000 str r3, [r4] * what we are trying to do here is forking off * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 300032f8: e28d4004 add r4, sp, #4 300032fc: e1a03004 mov r3, r4 30003300: e3a01001 mov r1, #1 30003304: e1a02005 mov r2, r5 30003308: e59f0068 ldr r0, [pc, #104] ; 30003378 3000330c: e58d5000 str r5, [sp] 30003310: ebfffb8d bl 3000214c rtems_filesystem_root = loc; 30003314: e596c000 ldr ip, [r6] 30003318: e1a07004 mov r7, r4 3000331c: e28cc018 add ip, ip, #24 30003320: e8b7000f ldm r7!, {r0, r1, r2, r3} 30003324: e8ac000f stmia ip!, {r0, r1, r2, r3} 30003328: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 3000332c: e3a01001 mov r1, #1 * clones. The reason is a pathloc can be allocated by the * file system and needs to be freed when deleting the environment. */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; 30003330: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 30003334: e1a02005 mov r2, r5 30003338: e1a03004 mov r3, r4 3000333c: e59f0034 ldr r0, [pc, #52] ; 30003378 30003340: e58d5000 str r5, [sp] 30003344: ebfffb80 bl 3000214c rtems_filesystem_current = loc; 30003348: e8b4000f ldm r4!, {r0, r1, r2, r3} 3000334c: e596c000 ldr ip, [r6] 30003350: e28cc004 add ip, ip, #4 30003354: e8ac000f stmia ip!, {r0, r1, r2, r3} 30003358: e5973000 ldr r3, [r7] 3000335c: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 30003360: e1a00008 mov r0, r8 30003364: e28dd01c add sp, sp, #28 30003368: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 3000337c : * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 3000337c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 30003380: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_status_code sc; rtems_user_env_t * shared_user_env; rtems_id current_task_id; sc=rtems_task_ident(RTEMS_SELF,0,¤t_task_id); 30003384: e3a00000 mov r0, #0 <== NOT EXECUTED 30003388: e1a01000 mov r1, r0 <== NOT EXECUTED 3000338c: e1a0200d mov r2, sp <== NOT EXECUTED 30003390: eb000a36 bl 30005c70 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 30003394: e2503000 subs r3, r0, #0 <== NOT EXECUTED 30003398: 1a00001c bne 30003410 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 3000339c: e59f1074 ldr r1, [pc, #116] ; 30003418 <== NOT EXECUTED 300033a0: e59d3000 ldr r3, [sp] <== NOT EXECUTED 300033a4: e5915000 ldr r5, [r1] <== NOT EXECUTED 300033a8: e5952000 ldr r2, [r5] <== NOT EXECUTED 300033ac: e1520003 cmp r2, r3 <== NOT EXECUTED 300033b0: 1a000005 bne 300033cc <== NOT EXECUTED /* kill the current user env & task_var*/ rtems_user_env_t *tmp = rtems_current_user_env; sc = rtems_task_variable_delete(RTEMS_SELF,(void*)&rtems_current_user_env); 300033b4: eb000aa7 bl 30005e58 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 300033b8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 300033bc: 1a000013 bne 30003410 <== NOT EXECUTED free_user_env(tmp); 300033c0: e1a00005 mov r0, r5 <== NOT EXECUTED 300033c4: ebffff98 bl 3000322c <== NOT EXECUTED 300033c8: ea000004 b 300033e0 <== NOT EXECUTED } else { sc = rtems_task_variable_get( 300033cc: e1a00004 mov r0, r4 <== NOT EXECUTED 300033d0: e28d2004 add r2, sp, #4 <== NOT EXECUTED 300033d4: eb000abd bl 30005ed0 <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 300033d8: e2503000 subs r3, r0, #0 <== NOT EXECUTED 300033dc: 1a000008 bne 30003404 <== NOT EXECUTED goto bailout; } /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( 300033e0: e59f4030 ldr r4, [pc, #48] ; 30003418 <== NOT EXECUTED 300033e4: e59f2030 ldr r2, [pc, #48] ; 3000341c <== NOT EXECUTED 300033e8: e3a00000 mov r0, #0 <== NOT EXECUTED 300033ec: e1a01004 mov r1, r4 <== NOT EXECUTED 300033f0: eb000a6e bl 30005db0 <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 300033f4: e2503000 subs r3, r0, #0 <== NOT EXECUTED goto bailout; /* the current_user_env is the same pointer that remote env */ rtems_current_user_env = shared_user_env; 300033f8: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 300033fc: 05842000 streq r2, [r4] <== NOT EXECUTED /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 30003400: 0a000002 beq 30003410 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 30003404: e59f1014 ldr r1, [pc, #20] ; 30003420 <== NOT EXECUTED 30003408: e59f2008 ldr r2, [pc, #8] ; 30003418 <== NOT EXECUTED 3000340c: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 30003410: e1a00003 mov r0, r3 <== NOT EXECUTED 30003414: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 300096c4 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 300096c4: e2003006 and r3, r0, #6 300096c8: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; 300096cc: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 300096d0: 0a000005 beq 300096ec fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 300096d4: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; 300096d8: 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) { 300096dc: 1a000002 bne 300096ec ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 300096e0: e3100004 tst r0, #4 <== NOT EXECUTED 300096e4: 03a03000 moveq r3, #0 <== NOT EXECUTED 300096e8: 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 ) { 300096ec: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; 300096f0: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 300096f4: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; 300096f8: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 300096fc: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; 30009700: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } 30009704: e1a00003 mov r0, r3 30009708: e12fff1e bx lr =============================================================================== 3000bd14 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { 3000bd14: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 3000bd18: e24dd048 sub sp, sp, #72 ; 0x48 3000bd1c: e1a0b001 mov fp, r1 int success = 0; char *dup_path = strdup(path); 3000bd20: eb000e22 bl 3000f5b0 if (dup_path != NULL) { 3000bd24: e2505000 subs r5, r0, #0 success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; 3000bd28: 03e00000 mvneq r0, #0 rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { 3000bd2c: 0a000056 beq 3000be8c char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 3000bd30: e5d53000 ldrb r3, [r5] 3000bd34: e3a06000 mov r6, #0 3000bd38: e353002f cmp r3, #47 ; 0x2f ++p; 3000bd3c: 02857001 addeq r7, r5, #1 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ 3000bd40: 11a07005 movne r7, r5 3000bd44: e3a03001 mov r3, #1 ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') 3000bd48: e1a09006 mov r9, r6 retval = 0; break; } } if (!last) *p = '/'; 3000bd4c: e3a0a02f mov sl, #47 ; 0x2f } if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { 3000bd50: e1a0800d mov r8, sp oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 3000bd54: e4d72001 ldrb r2, [r7], #1 3000bd58: e3520000 cmp r2, #0 last = 1; 3000bd5c: 03a02001 moveq r2, #1 oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') 3000bd60: 0a000002 beq 3000bd70 last = 1; else if (p[0] != '/') 3000bd64: e352002f cmp r2, #47 ; 0x2f 3000bd68: 03a02000 moveq r2, #0 3000bd6c: 1afffff8 bne 3000bd54 continue; *p = '\0'; if (!last && p[1] == '\0') 3000bd70: e3520000 cmp r2, #0 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; 3000bd74: e5479001 strb r9, [r7, #-1] if (!last && p[1] == '\0') 3000bd78: 13a04001 movne r4, #1 3000bd7c: 1a000002 bne 3000bd8c 3000bd80: e5d74000 ldrb r4, [r7] 3000bd84: e2744001 rsbs r4, r4, #1 3000bd88: 33a04000 movcc r4, #0 last = 1; if (first) { 3000bd8c: e3530000 cmp r3, #0 3000bd90: 0a000004 beq 3000bda8 * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); 3000bd94: e3a00000 mov r0, #0 3000bd98: eb000069 bl 3000bf44 3000bd9c: e1a06000 mov r6, r0 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); 3000bda0: e3c000c0 bic r0, r0, #192 ; 0xc0 3000bda4: eb000066 bl 3000bf44 first = 0; } if (last) 3000bda8: e3540000 cmp r4, #0 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 3000bdac: 059f10f0 ldreq r1, [pc, #240] ; 3000bea4 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) 3000bdb0: 0a000002 beq 3000bdc0 (void)umask(oumask); 3000bdb4: e1a00006 mov r0, r6 3000bdb8: eb000061 bl 3000bf44 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { 3000bdbc: e1a0100b mov r1, fp 3000bdc0: e1a00005 mov r0, r5 3000bdc4: ebffde44 bl 300036dc 3000bdc8: e3500000 cmp r0, #0 3000bdcc: aa00001f bge 3000be50 if (errno == EEXIST || errno == EISDIR) { 3000bdd0: eb000a0e bl 3000e610 <__errno> 3000bdd4: e5903000 ldr r3, [r0] 3000bdd8: e3530011 cmp r3, #17 3000bddc: 0a000003 beq 3000bdf0 3000bde0: eb000a0a bl 3000e610 <__errno> <== NOT EXECUTED 3000bde4: e5903000 ldr r3, [r0] <== NOT EXECUTED 3000bde8: e3530015 cmp r3, #21 <== NOT EXECUTED 3000bdec: 1a00001c bne 3000be64 <== NOT EXECUTED if (stat(path, &sb) < 0) { 3000bdf0: e1a00005 mov r0, r5 3000bdf4: e1a0100d mov r1, sp 3000bdf8: eb00002a bl 3000bea8 3000bdfc: e3500000 cmp r0, #0 3000be00: ba000017 blt 3000be64 retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { 3000be04: e59d300c ldr r3, [sp, #12] 3000be08: e2033a0f and r3, r3, #61440 ; 0xf000 3000be0c: e3530901 cmp r3, #16384 ; 0x4000 3000be10: 0a00000b beq 3000be44 if (last) 3000be14: e3540000 cmp r4, #0 3000be18: 0a000004 beq 3000be30 errno = EEXIST; 3000be1c: eb0009fb bl 3000e610 <__errno> 3000be20: e3a03011 mov r3, #17 3000be24: e5803000 str r3, [r0] else errno = ENOTDIR; retval = 0; 3000be28: e3a07000 mov r7, #0 3000be2c: ea000011 b 3000be78 break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; 3000be30: eb0009f6 bl 3000e610 <__errno> <== NOT EXECUTED 3000be34: e3a03014 mov r3, #20 <== NOT EXECUTED 3000be38: e5803000 str r3, [r0] <== NOT EXECUTED retval = 0; 3000be3c: e1a07004 mov r7, r4 <== NOT EXECUTED 3000be40: ea00000a b 3000be70 <== NOT EXECUTED break; } if (last) 3000be44: e3540000 cmp r4, #0 3000be48: 1a000011 bne 3000be94 3000be4c: ea000001 b 3000be58 } else { retval = 0; break; } } if (!last) 3000be50: e3540000 cmp r4, #0 3000be54: 1a000010 bne 3000be9c *p = '/'; 3000be58: e547a001 strb sl, [r7, #-1] 3000be5c: e3a03000 mov r3, #0 3000be60: eaffffbb b 3000bd54 } if (!first && !last) 3000be64: e3540000 cmp r4, #0 <== NOT EXECUTED if (last) (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { if (errno == EEXIST || errno == EISDIR) { if (stat(path, &sb) < 0) { retval = 0; 3000be68: e3a07000 mov r7, #0 <== NOT EXECUTED } } if (!last) *p = '/'; } if (!first && !last) 3000be6c: 1a000001 bne 3000be78 <== NOT EXECUTED (void)umask(oumask); 3000be70: e1a00006 mov r0, r6 <== NOT EXECUTED 3000be74: eb000032 bl 3000bf44 <== NOT EXECUTED int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); 3000be78: e1a00005 mov r0, r5 3000be7c: ebffdc6a bl 3000302c } return success != 0 ? 0 : -1; 3000be80: e3570000 cmp r7, #0 3000be84: 13a00000 movne r0, #0 3000be88: 03e00000 mvneq r0, #0 } 3000be8c: e28dd048 add sp, sp, #72 ; 0x48 3000be90: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} errno = ENOTDIR; retval = 0; break; } if (last) retval = 2; 3000be94: e3a07002 mov r7, #2 3000be98: eafffff6 b 3000be78 } else { retval = 0; break; } } if (!last) 3000be9c: e3a07001 mov r7, #1 3000bea0: eafffff4 b 3000be78 =============================================================================== 3000172c : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 3000172c: e59f303c ldr r3, [pc, #60] ; 30001770 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30001730: e92d4800 push {fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 30001734: e5932004 ldr r2, [r3, #4] /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 30001738: e28db004 add fp, sp, #4 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 3000173c: e59230c8 ldr r3, [r2, #200] ; 0xc8 30001740: e15b0003 cmp fp, r3 30001744: 3a000003 bcc 30001758 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 30001748: e59220c4 ldr r2, [r2, #196] ; 0xc4 3000174c: e0833002 add r3, r3, r2 30001750: e15b0003 cmp fp, r3 30001754: 9a000003 bls 30001768 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 30001758: e59f3010 ldr r3, [pc, #16] ; 30001770 <== NOT EXECUTED 3000175c: e3a01001 mov r1, #1 <== NOT EXECUTED 30001760: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 30001764: ebffffad bl 30001620 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 30001768: e3a00000 mov r0, #0 3000176c: e8bd8800 pop {fp, pc} =============================================================================== 300017d4 : } void rtems_stack_checker_report_usage( void ) { rtems_stack_checker_report_usage_with_plugin( NULL, printk_plugin ); 300017d4: e59f1004 ldr r1, [pc, #4] ; 300017e0 <== NOT EXECUTED 300017d8: e3a00000 mov r0, #0 <== NOT EXECUTED 300017dc: eaffffe4 b 30001774 <== NOT EXECUTED =============================================================================== 30001774 : void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 30001774: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED if ( !print ) 30001778: e2515000 subs r5, r1, #0 <== NOT EXECUTED void rtems_stack_checker_report_usage_with_plugin( void *context, rtems_printk_plugin_t print ) { 3000177c: e1a06000 mov r6, r0 <== NOT EXECUTED if ( !print ) 30001780: 08bd8070 popeq {r4, r5, r6, pc} <== NOT EXECUTED return; print_context = context; 30001784: e59f4038 ldr r4, [pc, #56] ; 300017c4 <== NOT EXECUTED print_handler = print; (*print)( context, "Stack usage by thread\n"); 30001788: e59f1038 ldr r1, [pc, #56] ; 300017c8 <== NOT EXECUTED ) { if ( !print ) return; print_context = context; 3000178c: e5840004 str r0, [r4, #4] <== NOT EXECUTED print_handler = print; 30001790: e5845000 str r5, [r4] <== NOT EXECUTED (*print)( context, "Stack usage by thread\n"); 30001794: e1a0e00f mov lr, pc <== NOT EXECUTED 30001798: e12fff15 bx r5 <== NOT EXECUTED (*print)( context, 3000179c: e59f1028 ldr r1, [pc, #40] ; 300017cc <== NOT EXECUTED 300017a0: e1a00006 mov r0, r6 <== NOT EXECUTED 300017a4: e1a0e00f mov lr, pc <== NOT EXECUTED 300017a8: 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 ); 300017ac: e59f001c ldr r0, [pc, #28] ; 300017d0 <== NOT EXECUTED 300017b0: eb001361 bl 3000653c <== 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; 300017b4: e3a03000 mov r3, #0 <== NOT EXECUTED 300017b8: e5843004 str r3, [r4, #4] <== NOT EXECUTED print_handler = NULL; 300017bc: e5843000 str r3, [r4] <== NOT EXECUTED 300017c0: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 300016c8 : */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 300016c8: 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; 300016cc: e59030c8 ldr r3, [r0, #200] ; 0xc8 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 300016d0: e28db00c add fp, sp, #12 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 300016d4: e15b0003 cmp fp, r3 */ void rtems_stack_checker_switch_extension( Thread_Control *running __attribute__((unused)), Thread_Control *heir __attribute__((unused)) ) { 300016d8: e1a04000 mov r4, r0 { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { return false; 300016dc: 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; 300016e0: e2830008 add r0, r3, #8 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 300016e4: 3a000004 bcc 300016fc return false; } if ( sp > (the_stack->area + the_stack->size) ) { 300016e8: e59450c4 ldr r5, [r4, #196] ; 0xc4 300016ec: e0835005 add r5, r3, r5 } /* * rtems_stack_checker_switch_extension */ void rtems_stack_checker_switch_extension( 300016f0: e15b0005 cmp fp, r5 300016f4: 83a05000 movhi r5, #0 300016f8: 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, 300016fc: e59f1024 ldr r1, [pc, #36] ; 30001728 30001700: e3a02010 mov r2, #16 30001704: eb00301b bl 3000d778 30001708: e2701001 rsbs r1, r0, #1 3000170c: 33a01000 movcc r1, #0 (void *) Stack_check_Pattern.pattern, PATTERN_SIZE_BYTES)); if ( !sp_ok || !pattern_ok ) { 30001710: e3550000 cmp r5, #0 30001714: 0a000001 beq 30001720 30001718: e3510000 cmp r1, #0 3000171c: 18bd8830 popne {r4, r5, fp, pc} Stack_check_report_blown_task( running, pattern_ok ); 30001720: e1a00004 mov r0, r4 <== NOT EXECUTED 30001724: ebffffbd bl 30001620 <== NOT EXECUTED =============================================================================== 3000b394 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000b394: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000b398: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { 3000b39c: e1a05000 mov r5, r0 3000b3a0: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; 3000b3a4: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) 3000b3a8: 0a000018 beq 3000b410 return RTEMS_INVALID_ADDRESS; errno = 0; 3000b3ac: eb000aac bl 3000de64 <__errno> 3000b3b0: e3a03000 mov r3, #0 3000b3b4: 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 ); 3000b3b8: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; 3000b3bc: 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 ); 3000b3c0: e1a00005 mov r0, r5 3000b3c4: e3a02010 mov r2, #16 3000b3c8: eb001832 bl 30011498 #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 ) 3000b3cc: e3560000 cmp r6, #0 *endptr = end; 3000b3d0: 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 ); 3000b3d4: 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; 3000b3d8: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) 3000b3dc: e59d3000 ldr r3, [sp] 3000b3e0: e1530005 cmp r3, r5 return RTEMS_NOT_DEFINED; 3000b3e4: 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 ) 3000b3e8: 0a000008 beq 3000b410 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) 3000b3ec: e3770001 cmn r7, #1 3000b3f0: 1a000004 bne 3000b408 3000b3f4: eb000a9a bl 3000de64 <__errno> <== NOT EXECUTED 3000b3f8: e5903000 ldr r3, [r0] <== NOT EXECUTED 3000b3fc: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; 3000b400: 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)) 3000b404: 0a000001 beq 3000b410 <== 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; 3000b408: e5847000 str r7, [r4] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; 3000b40c: e3a00000 mov r0, #0 } 3000b410: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 300019b0 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 300019b0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 300019b4: e24ddf6b sub sp, sp, #428 ; 0x1ac 300019b8: e58d1010 str r1, [sp, #16] 300019bc: e58d2018 str r2, [sp, #24] 300019c0: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 300019c4: eb003d44 bl 30010edc 300019c8: e3a02000 mov r2, #0 300019cc: e1a01000 mov r1, r0 300019d0: e28d3f65 add r3, sp, #404 ; 0x194 300019d4: e59d000c ldr r0, [sp, #12] 300019d8: e58d2000 str r2, [sp] 300019dc: eb0002b2 bl 300024ac strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 300019e0: e2504000 subs r4, r0, #0 300019e4: 1a00006c bne 30001b9c return -1; if (root_loc.ops != &IMFS_ops 300019e8: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 300019ec: e59f21c0 ldr r2, [pc, #448] ; 30001bb4 300019f0: e1530002 cmp r3, r2 300019f4: 0a000005 beq 30001a10 && root_loc.ops != &fifoIMFS_ops) 300019f8: e59f21b8 ldr r2, [pc, #440] ; 30001bb8 <== NOT EXECUTED 300019fc: e1530002 cmp r3, r2 <== NOT EXECUTED 30001a00: 1a000065 bne 30001b9c <== NOT EXECUTED 30001a04: ea000001 b 30001a10 <== NOT EXECUTED 30001a08: e1a08004 mov r8, r4 30001a0c: ea000006 b 30001a2c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 30001a10: e28d2f65 add r2, sp, #404 ; 0x194 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops 30001a14: e1a08004 mov r8, r4 hdr_ptr = (char *) &tar_image[offset]; offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 30001a18: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 30001a1c: e28d9d06 add r9, sp, #384 ; 0x180 30001a20: 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); 30001a24: e28d501c add r5, sp, #28 30001a28: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 30001a2c: e59d3018 ldr r3, [sp, #24] 30001a30: e2884c02 add r4, r8, #512 ; 0x200 30001a34: e1540003 cmp r4, r3 30001a38: 8a000059 bhi 30001ba4 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 30001a3c: e59de010 ldr lr, [sp, #16] offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 30001a40: e59f1174 ldr r1, [pc, #372] ; 30001bbc break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 30001a44: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 30001a48: e2880c01 add r0, r8, #256 ; 0x100 30001a4c: e2800001 add r0, r0, #1 30001a50: e3a02007 mov r2, #7 30001a54: eb003d38 bl 30010f3c 30001a58: e2506000 subs r6, r0, #0 30001a5c: 1a000050 bne 30001ba4 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 30001a60: e3a02063 mov r2, #99 ; 0x63 30001a64: e1a01008 mov r1, r8 30001a68: e1a00007 mov r0, r7 30001a6c: eb003d8e bl 300110ac filename[MAX_NAME_FIELD_SIZE] = '\0'; 30001a70: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 30001a74: e3a01008 mov r1, #8 30001a78: 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]; 30001a7c: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 30001a80: eb001de1 bl 3000920c <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 30001a84: 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); 30001a88: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 30001a8c: e288007c add r0, r8, #124 ; 0x7c 30001a90: eb001ddd bl 3000920c <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 30001a94: 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); 30001a98: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 30001a9c: e2880094 add r0, r8, #148 ; 0x94 30001aa0: eb001dd9 bl 3000920c <_rtems_octal2ulong> 30001aa4: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 30001aa8: e1a00008 mov r0, r8 30001aac: e58d3008 str r3, [sp, #8] 30001ab0: eb001de3 bl 30009244 <_rtems_tar_header_checksum> 30001ab4: e59d3008 ldr r3, [sp, #8] 30001ab8: e1500003 cmp r0, r3 30001abc: 1a000038 bne 30001ba4 * 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) { 30001ac0: e3560035 cmp r6, #53 ; 0x35 30001ac4: 1a000012 bne 30001b14 strcpy(full_filename, mountpoint); 30001ac8: e59d100c ldr r1, [sp, #12] 30001acc: e1a00005 mov r0, r5 30001ad0: eb003b3d bl 300107cc if (full_filename[strlen(full_filename)-1] != '/') 30001ad4: e1a00005 mov r0, r5 30001ad8: eb003cff bl 30010edc 30001adc: e28d2f6b add r2, sp, #428 ; 0x1ac 30001ae0: e0820000 add r0, r2, r0 30001ae4: e5503191 ldrb r3, [r0, #-401] ; 0x191 30001ae8: e353002f cmp r3, #47 ; 0x2f strcat(full_filename, "/"); 30001aec: 11a00005 movne r0, r5 30001af0: 159f10c8 ldrne r1, [pc, #200] ; 30001bc0 30001af4: 1b003a7d blne 300104f0 strcat(full_filename, filename); 30001af8: e1a01007 mov r1, r7 30001afc: e1a00005 mov r0, r5 30001b00: eb003a7a bl 300104f0 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 30001b04: e1a00005 mov r0, r5 30001b08: e59f10b4 ldr r1, [pc, #180] ; 30001bc4 30001b0c: eb000486 bl 30002d2c 30001b10: eaffffbc b 30001a08 * 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) { 30001b14: e3560030 cmp r6, #48 ; 0x30 30001b18: 1affffba bne 30001a08 const char *name; loc = root_loc; 30001b1c: e59dc004 ldr ip, [sp, #4] 30001b20: e1a0e009 mov lr, r9 30001b24: e8bc000f ldm ip!, {r0, r1, r2, r3} 30001b28: e8ae000f stmia lr!, {r0, r1, r2, r3} 30001b2c: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 30001b30: e1a00007 mov r0, r7 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 30001b34: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 30001b38: e1a01009 mov r1, r9 30001b3c: e28d2f6a add r2, sp, #424 ; 0x1a8 30001b40: eb0020a9 bl 30009dec 30001b44: e2506000 subs r6, r0, #0 30001b48: 1a00000d bne 30001b84 node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 30001b4c: 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( 30001b50: e1a00009 mov r0, r9 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 30001b54: e1a03b82 lsl r3, r2, #23 30001b58: 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( 30001b5c: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 30001b60: e3833902 orr r3, r3, #32768 ; 0x8000 30001b64: e3a01006 mov r1, #6 30001b68: e58d6000 str r6, [sp] 30001b6c: eb001f0f bl 300097b0 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]; 30001b70: 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; 30001b74: e580b050 str fp, [r0, #80] ; 0x50 node->info.linearfile.direct = &tar_image[offset]; 30001b78: 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; 30001b7c: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; 30001b80: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; 30001b84: e28bbf7f add fp, fp, #508 ; 0x1fc 30001b88: e28bb003 add fp, fp, #3 offset += 512 * nblocks; 30001b8c: e3cbbf7f bic fp, fp, #508 ; 0x1fc 30001b90: e3cbb003 bic fp, fp, #3 30001b94: e08b4004 add r4, fp, r4 30001b98: eaffff9a b 30001a08 if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 30001b9c: e3e04000 mvn r4, #0 <== NOT EXECUTED 30001ba0: ea000000 b 30001ba8 <== NOT EXECUTED 30001ba4: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 30001ba8: e1a00004 mov r0, r4 30001bac: e28ddf6b add sp, sp, #428 ; 0x1ac 30001bb0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 3000c6a0 : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000c6a0: 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 ) 3000c6a4: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { 3000c6a8: e1a04000 mov r4, r0 3000c6ac: 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; 3000c6b0: 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 ) 3000c6b4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; 3000c6b8: e59f314c ldr r3, [pc, #332] ; 3000c80c 3000c6bc: 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; 3000c6c0: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; 3000c6c4: e5976104 ldr r6, [r7, #260] ; 0x104 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000c6c8: 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; 3000c6cc: 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; 3000c6d0: 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; 3000c6d4: 03a08c01 moveq r8, #256 ; 0x100 3000c6d8: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) 3000c6dc: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; 3000c6e0: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; 3000c6e4: e3590000 cmp r9, #0 3000c6e8: 03a09b01 moveq r9, #1024 ; 0x400 3000c6ec: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); 3000c6f0: ebffeff8 bl 300086d8 <_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; 3000c6f4: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); 3000c6f8: e1898008 orr r8, r9, r8 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000c6fc: 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; 3000c700: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) 3000c704: 0a000003 beq 3000c718 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; 3000c708: e3140c01 tst r4, #256 ; 0x100 3000c70c: 13a03000 movne r3, #0 3000c710: 03a03001 moveq r3, #1 3000c714: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { 3000c718: e3150c02 tst r5, #512 ; 0x200 3000c71c: 0a000006 beq 3000c73c if ( _Modes_Is_timeslice(mode_set) ) { 3000c720: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; 3000c724: 13a03001 movne r3, #1 3000c728: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; 3000c72c: 159f30dc ldrne r3, [pc, #220] ; 3000c810 } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; 3000c730: 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; 3000c734: 15933000 ldrne r3, [r3] 3000c738: 15873078 strne r3, [r7, #120] ; 0x78 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) 3000c73c: e3150080 tst r5, #128 ; 0x80 3000c740: 0a000001 beq 3000c74c */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); 3000c744: e2040080 and r0, r4, #128 ; 0x80 3000c748: ebffefdd bl 300086c4 <_CPU_ISR_Set_level> */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { 3000c74c: e2150b01 ands r0, r5, #1024 ; 0x400 3000c750: 0a000013 beq 3000c7a4 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000c754: 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 ) { 3000c758: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( 3000c75c: 13a03000 movne r3, #0 3000c760: 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 ) { 3000c764: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000c768: 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 ) { 3000c76c: 0a00000c beq 3000c7a4 asr->is_enabled = is_asr_enabled; 3000c770: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 3000c774: e10f3000 mrs r3, CPSR 3000c778: e3832080 orr r2, r3, #128 ; 0x80 3000c77c: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; 3000c780: e5962018 ldr r2, [r6, #24] information->signals_pending = information->signals_posted; 3000c784: e5961014 ldr r1, [r6, #20] information->signals_posted = _signals; 3000c788: 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; 3000c78c: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 3000c790: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { 3000c794: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; 3000c798: e3500000 cmp r0, #0 3000c79c: 13a00001 movne r0, #1 3000c7a0: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) 3000c7a4: e59f3068 ldr r3, [pc, #104] ; 3000c814 3000c7a8: e5933000 ldr r3, [r3] 3000c7ac: e3530003 cmp r3, #3 3000c7b0: 1a000013 bne 3000c804 */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; 3000c7b4: e59f2050 ldr r2, [pc, #80] ; 3000c80c 3000c7b8: e5923004 ldr r3, [r2, #4] if ( !_States_Is_ready( executing->current_state ) || 3000c7bc: e5931010 ldr r1, [r3, #16] 3000c7c0: e3510000 cmp r1, #0 3000c7c4: 1a000005 bne 3000c7e0 3000c7c8: e5922008 ldr r2, [r2, #8] 3000c7cc: e1530002 cmp r3, r2 3000c7d0: 0a000006 beq 3000c7f0 ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { 3000c7d4: e5d33074 ldrb r3, [r3, #116] ; 0x74 3000c7d8: e3530000 cmp r3, #0 3000c7dc: 0a000003 beq 3000c7f0 _Context_Switch_necessary = true; 3000c7e0: e59f3024 ldr r3, [pc, #36] ; 3000c80c 3000c7e4: e3a02001 mov r2, #1 3000c7e8: e5c32010 strb r2, [r3, #16] 3000c7ec: ea000001 b 3000c7f8 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) 3000c7f0: e3500000 cmp r0, #0 3000c7f4: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch(); 3000c7f8: ebffe9ba bl 30006ee8 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; 3000c7fc: e3a00000 mov r0, #0 3000c800: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} 3000c804: e3a00000 mov r0, #0 <== NOT EXECUTED } 3000c808: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 3000332c : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 3000332c: e59f300c ldr r3, [pc, #12] ; 30003340 <== NOT EXECUTED 30003330: e5830008 str r0, [r3, #8] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 30003334: e8830006 stm r3, {r1, r2} <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 30003338: e3a00000 mov r0, #0 <== NOT EXECUTED 3000333c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 30003194 : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003194: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { 30003198: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3000319c: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( 300031a0: e59f3174 ldr r3, [pc, #372] ; 3000331c 300031a4: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 300031a8: 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( 300031ac: e1a02001 mov r2, r1 300031b0: e5930000 ldr r0, [r3] 300031b4: eb0007a3 bl 30005048 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 300031b8: e3500000 cmp r0, #0 300031bc: 1a000022 bne 3000324c rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 300031c0: e5943008 ldr r3, [r4, #8] 300031c4: e2433001 sub r3, r3, #1 300031c8: e3530000 cmp r3, #0 300031cc: e5843008 str r3, [r4, #8] 300031d0: 1a00004c bne 30003308 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 300031d4: e59420cc ldr r2, [r4, #204] ; 0xcc 300031d8: e59f3140 ldr r3, [pc, #320] ; 30003320 300031dc: e0833282 add r3, r3, r2, lsl #5 300031e0: e5931004 ldr r1, [r3, #4] 300031e4: e3510000 cmp r1, #0 300031e8: 0a000003 beq 300031fc /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 300031ec: e1a00004 mov r0, r4 300031f0: e1a0e00f mov lr, pc 300031f4: e12fff11 bx r1 300031f8: ea000006 b 30003218 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 300031fc: e5940018 ldr r0, [r4, #24] 30003200: e1a02001 mov r2, r1 30003204: eb00078f bl 30005048 if (sc != RTEMS_SUCCESSFUL) { 30003208: e3500000 cmp r0, #0 3000320c: 1a00000e bne 3000324c rtems_fatal_error_occurred (sc); } drainOutput (tty); 30003210: e1a00004 mov r0, r4 30003214: ebfffeb2 bl 30002ce4 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30003218: e59430b4 ldr r3, [r4, #180] ; 0xb4 3000321c: e3530002 cmp r3, #2 30003220: 1a00000a bne 30003250 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 30003224: e59400c4 ldr r0, [r4, #196] ; 0xc4 30003228: e3a01001 mov r1, #1 3000322c: eb000673 bl 30004c00 if (sc != RTEMS_SUCCESSFUL) 30003230: e3500000 cmp r0, #0 30003234: 1a000004 bne 3000324c rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 30003238: e59400c8 ldr r0, [r4, #200] ; 0xc8 3000323c: e3a01001 mov r1, #1 30003240: eb00066e bl 30004c00 if (sc != RTEMS_SUCCESSFUL) 30003244: e3500000 cmp r0, #0 30003248: 0a000000 beq 30003250 rtems_fatal_error_occurred (sc); 3000324c: eb000914 bl 300056a4 <== NOT EXECUTED } if (tty->device.lastClose) 30003250: e594309c ldr r3, [r4, #156] ; 0x9c 30003254: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 30003258: 1594000c ldrne r0, [r4, #12] 3000325c: 15941010 ldrne r1, [r4, #16] 30003260: 11a02005 movne r2, r5 30003264: 11a0e00f movne lr, pc 30003268: 112fff13 bxne r3 if (tty->forw == NULL) { 3000326c: e894000c ldm r4, {r2, r3} 30003270: 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; 30003274: 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) { 30003278: 1a000003 bne 3000328c rtems_termios_ttyTail = tty->back; 3000327c: e59f10a0 ldr r1, [pc, #160] ; 30003324 if ( rtems_termios_ttyTail != NULL ) { 30003280: 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; 30003284: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 30003288: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3000328c: e5942004 ldr r2, [r4, #4] 30003290: e5943000 ldr r3, [r4] 30003294: 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; 30003298: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3000329c: 1a000003 bne 300032b0 rtems_termios_ttyHead = tty->forw; 300032a0: e59f1080 ldr r1, [pc, #128] ; 30003328 if ( rtems_termios_ttyHead != NULL ) { 300032a4: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 300032a8: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 300032ac: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 300032b0: e5940014 ldr r0, [r4, #20] 300032b4: eb00073c bl 30004fac rtems_semaphore_delete (tty->osem); 300032b8: e5940018 ldr r0, [r4, #24] 300032bc: eb00073a bl 30004fac rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 300032c0: e594008c ldr r0, [r4, #140] ; 0x8c 300032c4: eb000738 bl 30004fac if ((tty->device.pollRead == NULL) || 300032c8: e59430a0 ldr r3, [r4, #160] ; 0xa0 300032cc: e3530000 cmp r3, #0 300032d0: 0a000002 beq 300032e0 300032d4: e59430b4 ldr r3, [r4, #180] ; 0xb4 300032d8: e3530002 cmp r3, #2 300032dc: 1a000001 bne 300032e8 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 300032e0: e5940068 ldr r0, [r4, #104] ; 0x68 300032e4: eb000730 bl 30004fac free (tty->rawInBuf.theBuf); 300032e8: e5940058 ldr r0, [r4, #88] ; 0x58 300032ec: ebfffae5 bl 30001e88 free (tty->rawOutBuf.theBuf); 300032f0: e594007c ldr r0, [r4, #124] ; 0x7c 300032f4: ebfffae3 bl 30001e88 free (tty->cbuf); 300032f8: e594001c ldr r0, [r4, #28] 300032fc: ebfffae1 bl 30001e88 free (tty); 30003300: e1a00004 mov r0, r4 30003304: ebfffadf bl 30001e88 } rtems_semaphore_release (rtems_termios_ttyMutex); 30003308: e59f300c ldr r3, [pc, #12] ; 3000331c 3000330c: e5930000 ldr r0, [r3] 30003310: eb000792 bl 30005160 return RTEMS_SUCCESSFUL; } 30003314: e3a00000 mov r0, #0 30003318: e8bd8030 pop {r4, r5, pc} =============================================================================== 300046a8 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 300046a8: 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) { 300046ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 300046b0: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300046b4: e59010b4 ldr r1, [r0, #180] ; 0xb4 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 300046b8: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300046bc: e3510002 cmp r1, #2 300046c0: 1a000004 bne 300046d8 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 300046c4: e59000c8 ldr r0, [r0, #200] ; 0xc8 300046c8: eb00014c bl 30004c00 if (sc != RTEMS_SUCCESSFUL) 300046cc: e2503000 subs r3, r0, #0 300046d0: 0a00000d beq 3000470c rtems_fatal_error_occurred (sc); 300046d4: eb0003f2 bl 300056a4 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 300046d8: e59030cc ldr r3, [r0, #204] ; 0xcc 300046dc: e3530005 cmp r3, #5 300046e0: 1a000007 bne 30004704 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 300046e4: e59f3028 ldr r3, [pc, #40] ; 30004714 300046e8: e59330b4 ldr r3, [r3, #180] ; 0xb4 300046ec: e3530000 cmp r3, #0 300046f0: 0a000005 beq 3000470c rtems_termios_linesw[tty->t_line].l_start(tty); 300046f4: e1a0e00f mov lr, pc 300046f8: e12fff13 bx r3 } return 0; /* nothing to output in IRQ... */ 300046fc: e3a03000 mov r3, #0 30004700: ea000001 b 3000470c } return rtems_termios_refill_transmitter(tty); } 30004704: 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); 30004708: eaffff5a b 30004478 } 3000470c: e1a00003 mov r0, r3 30004710: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 30004174 : * 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) { 30004174: 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) { 30004178: e59030cc ldr r3, [r0, #204] ; 0xcc 3000417c: e59f7288 ldr r7, [pc, #648] ; 3000440c * 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) { 30004180: 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) { 30004184: e0873283 add r3, r7, r3, lsl #5 30004188: 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) { 3000418c: 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) { 30004190: e3590000 cmp r9, #0 30004194: 11a05002 movne r5, r2 30004198: 1a00000d bne 300041d4 /* * 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); 3000419c: e2803030 add r3, r0, #48 ; 0x30 300041a0: 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, 300041a4: 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) { 300041a8: e1a08002 mov r8, r2 300041ac: 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, 300041b0: e58d3004 str r3, [sp, #4] 300041b4: ea00008b b 300043e8 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); 300041b8: e59430cc ldr r3, [r4, #204] ; 0xcc 300041bc: e4d60001 ldrb r0, [r6], #1 300041c0: e0873283 add r3, r7, r3, lsl #5 300041c4: e1a01004 mov r1, r4 300041c8: e1a0e00f mov lr, pc 300041cc: e593f010 ldr pc, [r3, #16] 300041d0: 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--) { 300041d4: e3550000 cmp r5, #0 300041d8: 1afffff6 bne 300041b8 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 300041dc: e59430e4 ldr r3, [r4, #228] ; 0xe4 300041e0: e3530000 cmp r3, #0 300041e4: 1a000086 bne 30004404 300041e8: e59430dc ldr r3, [r4, #220] ; 0xdc 300041ec: e3530000 cmp r3, #0 300041f0: 0a000083 beq 30004404 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 300041f4: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 300041f8: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 300041fc: e1a0e00f mov lr, pc <== NOT EXECUTED 30004200: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 30004204: e3a03001 mov r3, #1 <== NOT EXECUTED 30004208: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 3000420c: ea00007c b 30004404 <== NOT EXECUTED while (len--) { c = *buf++; /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { 30004210: e59430b8 ldr r3, [r4, #184] ; 0xb8 } return 0; } while (len--) { c = *buf++; 30004214: 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) { 30004218: e3130c02 tst r3, #512 ; 0x200 3000421c: 0a00000f beq 30004260 /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 30004220: e5d4204a ldrb r2, [r4, #74] ; 0x4a 30004224: e5d43049 ldrb r3, [r4, #73] ; 0x49 30004228: e152000a cmp r2, sl 3000422c: 1a000007 bne 30004250 if (c == tty->termios.c_cc[VSTART]) { 30004230: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 30004234: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 30004238: 159430b8 ldrne r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { if (c == tty->termios.c_cc[VSTART]) { /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 3000423c: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 30004240: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 30004244: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 30004248: e3a09001 mov r9, #1 <== NOT EXECUTED 3000424c: ea000005 b 30004268 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 30004250: e153000a cmp r3, sl /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 30004254: 059430b8 ldreq r3, [r4, #184] ; 0xb8 30004258: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 3000425c: 0afffff8 beq 30004244 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 30004260: e3590000 cmp r9, #0 30004264: 0a000014 beq 300042bc /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 30004268: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000426c: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 30004270: e3530020 cmp r3, #32 <== NOT EXECUTED 30004274: 1a00005a bne 300043e4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 30004278: ebfffa95 bl 30002cd4 <== NOT EXECUTED 3000427c: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 30004280: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004284: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 30004288: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3000428c: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30004290: e3530000 cmp r3, #0 <== NOT EXECUTED 30004294: 0a000006 beq 300042b4 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 30004298: 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)( 3000429c: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 300042a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300042a4: e0811003 add r1, r1, r3 <== NOT EXECUTED 300042a8: e3a02001 mov r2, #1 <== NOT EXECUTED 300042ac: e1a0e00f mov lr, pc <== NOT EXECUTED 300042b0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 300042b4: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 300042b8: ea000049 b 300043e4 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 300042bc: e5940060 ldr r0, [r4, #96] ; 0x60 300042c0: e5941064 ldr r1, [r4, #100] ; 0x64 300042c4: e2800001 add r0, r0, #1 300042c8: eb003076 bl 300104a8 <__umodsi3> 300042cc: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 300042d0: ebfffa7f bl 30002cd4 300042d4: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 300042d8: e594305c ldr r3, [r4, #92] ; 0x5c 300042dc: e5940064 ldr r0, [r4, #100] ; 0x64 % tty->rawInBuf.Size) > tty->highwater) && 300042e0: 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) 300042e4: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && 300042e8: e0800007 add r0, r0, r7 300042ec: eb00306d bl 300104a8 <__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) 300042f0: e59430c0 ldr r3, [r4, #192] ; 0xc0 300042f4: e1500003 cmp r0, r3 300042f8: 9a000025 bls 30004394 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 300042fc: 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) && 30004300: e3130001 tst r3, #1 <== NOT EXECUTED 30004304: 1a000022 bne 30004394 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 30004308: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000430c: e3833001 orr r3, r3, #1 <== NOT EXECUTED 30004310: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 30004314: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004318: e59f30f0 ldr r3, [pc, #240] ; 30004410 <== NOT EXECUTED 3000431c: e0023003 and r3, r2, r3 <== NOT EXECUTED 30004320: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 30004324: 1a00000e bne 30004364 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 30004328: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000432c: e3130020 tst r3, #32 <== NOT EXECUTED 30004330: 1a000002 bne 30004340 <== NOT EXECUTED 30004334: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30004338: e3530000 cmp r3, #0 <== NOT EXECUTED 3000433c: 1a000014 bne 30004394 <== 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; 30004340: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 30004344: 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; 30004348: e3833002 orr r3, r3, #2 <== NOT EXECUTED 3000434c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 30004350: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 30004354: e3a02001 mov r2, #1 <== NOT EXECUTED 30004358: e1a0e00f mov lr, pc <== NOT EXECUTED 3000435c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 30004360: ea00000b b 30004394 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 30004364: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004368: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 3000436c: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 30004370: 1a000007 bne 30004394 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 30004374: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004378: e3833004 orr r3, r3, #4 <== NOT EXECUTED 3000437c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 30004380: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 30004384: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 30004388: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3000438c: 11a0e00f movne lr, pc <== NOT EXECUTED 30004390: 112fff13 bxne r3 <== NOT EXECUTED 30004394: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 30004398: e594305c ldr r3, [r4, #92] ; 0x5c 3000439c: e1570003 cmp r7, r3 dropped++; 300043a0: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 300043a4: 0a00000e beq 300043e4 dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 300043a8: e5943058 ldr r3, [r4, #88] ; 0x58 300043ac: 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 )) { 300043b0: e59430e4 ldr r3, [r4, #228] ; 0xe4 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 300043b4: 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 )) { 300043b8: e3530000 cmp r3, #0 300043bc: 1a000008 bne 300043e4 300043c0: e59430dc ldr r3, [r4, #220] ; 0xdc 300043c4: e3530000 cmp r3, #0 300043c8: 0a000005 beq 300043e4 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 300043cc: e59d0000 ldr r0, [sp] <== NOT EXECUTED 300043d0: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 300043d4: e1a0e00f mov lr, pc <== NOT EXECUTED 300043d8: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 300043dc: e3a03001 mov r3, #1 <== NOT EXECUTED 300043e0: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 300043e4: e2488001 sub r8, r8, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 300043e8: e3580000 cmp r8, #0 300043ec: 1affff87 bne 30004210 } } } } tty->rawInBufDropped += dropped; 300043f0: e5943078 ldr r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 300043f4: e5940068 ldr r0, [r4, #104] ; 0x68 } } } } tty->rawInBufDropped += dropped; 300043f8: e0833005 add r3, r3, r5 300043fc: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 30004400: eb000356 bl 30005160 return dropped; } 30004404: e1a00005 mov r0, r5 30004408: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30003344 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003344: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 30003348: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3000334c: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 30003350: 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; 30003354: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; 30003358: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { 3000335c: 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); 30003360: e1a02001 mov r2, r1 30003364: e5940018 ldr r0, [r4, #24] 30003368: eb000736 bl 30005048 if (sc != RTEMS_SUCCESSFUL) { 3000336c: e2506000 subs r6, r0, #0 30003370: 1a0000d4 bne 300036c8 args->ioctl_return = sc; return sc; } switch (args->command) { 30003374: e5953004 ldr r3, [r5, #4] 30003378: e3530004 cmp r3, #4 3000337c: 0a0000a8 beq 30003624 30003380: 8a000005 bhi 3000339c 30003384: e3530002 cmp r3, #2 30003388: 0a000029 beq 30003434 3000338c: 8a00009d bhi 30003608 30003390: e3530001 cmp r3, #1 30003394: 1a000010 bne 300033dc 30003398: ea00001b b 3000340c 3000339c: e59f2330 ldr r2, [pc, #816] ; 300036d4 300033a0: e1530002 cmp r3, r2 300033a4: 0a0000ba beq 30003694 300033a8: 8a000002 bhi 300033b8 300033ac: e3530005 cmp r3, #5 300033b0: 1a000009 bne 300033dc 300033b4: ea000096 b 30003614 <== NOT EXECUTED 300033b8: e59f2318 ldr r2, [pc, #792] ; 300036d8 300033bc: 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; 300033c0: 05953008 ldreq r3, [r5, #8] 300033c4: 059420cc ldreq r2, [r4, #204] ; 0xcc 300033c8: 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) { 300033cc: 0a0000bb beq 300036c0 300033d0: e2822105 add r2, r2, #1073741825 ; 0x40000001 300033d4: e1530002 cmp r3, r2 300033d8: 0a000095 beq 30003634 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 300033dc: e59420cc ldr r2, [r4, #204] ; 0xcc 300033e0: e59f32f4 ldr r3, [pc, #756] ; 300036dc 300033e4: e0833282 add r3, r3, r2, lsl #5 300033e8: e5933018 ldr r3, [r3, #24] 300033ec: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 300033f0: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 300033f4: 0a0000b1 beq 300036c0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 300033f8: e1a00004 mov r0, r4 300033fc: e1a01005 mov r1, r5 30003400: e1a0e00f mov lr, pc 30003404: e12fff13 bx r3 30003408: ea00009f b 3000368c sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 3000340c: e5957008 ldr r7, [r5, #8] 30003410: e284c030 add ip, r4, #48 ; 0x30 30003414: e1a0e007 mov lr, r7 30003418: e8bc000f ldm ip!, {r0, r1, r2, r3} 3000341c: e8ae000f stmia lr!, {r0, r1, r2, r3} 30003420: e8bc000f ldm ip!, {r0, r1, r2, r3} 30003424: e8ae000f stmia lr!, {r0, r1, r2, r3} 30003428: e59c3000 ldr r3, [ip] 3000342c: e58e3000 str r3, [lr] break; 30003430: ea0000a2 b 300036c0 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 30003434: e595e008 ldr lr, [r5, #8] 30003438: e284c030 add ip, r4, #48 ; 0x30 3000343c: e8be000f ldm lr!, {r0, r1, r2, r3} 30003440: e8ac000f stmia ip!, {r0, r1, r2, r3} 30003444: e8be000f ldm lr!, {r0, r1, r2, r3} 30003448: e8ac000f stmia ip!, {r0, r1, r2, r3} 3000344c: e59e3000 ldr r3, [lr] 30003450: 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) && 30003454: e59430b8 ldr r3, [r4, #184] ; 0xb8 30003458: e3130c02 tst r3, #512 ; 0x200 3000345c: 0a000018 beq 300034c4 !(tty->termios.c_iflag & IXON)) { 30003460: 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) && 30003464: e3130b01 tst r3, #1024 ; 0x400 30003468: 1a000015 bne 300034c4 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3000346c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003470: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 30003474: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 30003478: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000347c: e3130020 tst r3, #32 <== NOT EXECUTED 30003480: 0a00000f beq 300034c4 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 30003484: ebfffe12 bl 30002cd4 <== NOT EXECUTED 30003488: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 3000348c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003490: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 30003494: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 30003498: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3000349c: e3530000 cmp r3, #0 <== NOT EXECUTED 300034a0: 0a000006 beq 300034c0 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 300034a4: 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)( 300034a8: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 300034ac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 300034b0: e0811003 add r1, r1, r3 <== NOT EXECUTED 300034b4: e3a02001 mov r2, #1 <== NOT EXECUTED 300034b8: e1a0e00f mov lr, pc <== NOT EXECUTED 300034bc: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 300034c0: 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)) { 300034c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 300034c8: e3130b01 tst r3, #1024 ; 0x400 300034cc: 0a000008 beq 300034f4 300034d0: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 300034d4: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 300034d8: 1a000005 bne 300034f4 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 300034dc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300034e0: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 300034e4: 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); 300034e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300034ec: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 300034f0: 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)) { 300034f4: e59430b8 ldr r3, [r4, #184] ; 0xb8 300034f8: e3130c01 tst r3, #256 ; 0x100 300034fc: 0a000010 beq 30003544 30003500: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 30003504: e3530000 cmp r3, #0 <== NOT EXECUTED 30003508: ba00000d blt 30003544 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 3000350c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30003510: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 30003514: 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)) { 30003518: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000351c: e3130004 tst r3, #4 <== NOT EXECUTED 30003520: 0a000004 beq 30003538 <== NOT EXECUTED 30003524: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 30003528: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3000352c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30003530: 11a0e00f movne lr, pc <== NOT EXECUTED 30003534: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 30003538: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000353c: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 30003540: 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) { 30003544: 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) { 30003548: 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) { 3000354c: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 30003550: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 30003554: b3833c01 orrlt r3, r3, #256 ; 0x100 30003558: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3000355c: e5943030 ldr r3, [r4, #48] ; 0x30 30003560: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 30003564: 159420b8 ldrne r2, [r4, #184] ; 0xb8 30003568: 13822b01 orrne r2, r2, #1024 ; 0x400 3000356c: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 30003570: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 30003574: 159430b8 ldrne r3, [r4, #184] ; 0xb8 30003578: 13833c02 orrne r3, r3, #512 ; 0x200 3000357c: 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) { 30003580: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 30003584: 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) { 30003588: 1a000013 bne 300035dc tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3000358c: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; 30003590: eb000519 bl 300049fc 30003594: e3a0100a mov r1, #10 30003598: e0000098 mul r0, r8, r0 3000359c: eb003329 bl 30010248 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { 300035a0: 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] * 300035a4: e5840054 str r0, [r4, #84] ; 0x54 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 300035a8: e3530000 cmp r3, #0 300035ac: e5d42047 ldrb r2, [r4, #71] ; 0x47 300035b0: 0a000005 beq 300035cc tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 300035b4: e3520000 cmp r2, #0 <== NOT EXECUTED } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; 300035b8: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 300035bc: 13a00000 movne r0, #0 <== NOT EXECUTED 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; 300035c0: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 300035c4: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED 300035c8: ea000006 b 300035e8 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 300035cc: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 300035d0: 03a03001 moveq r3, #1 300035d4: 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]) { 300035d8: 0a000002 beq 300035e8 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 300035dc: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 300035e0: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 300035e4: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 300035e8: e59430a8 ldr r3, [r4, #168] ; 0xa8 300035ec: e3530000 cmp r3, #0 300035f0: 0a000032 beq 300036c0 (*tty->device.setAttributes)(tty->minor, &tty->termios); 300035f4: e5940010 ldr r0, [r4, #16] 300035f8: e2841030 add r1, r4, #48 ; 0x30 300035fc: e1a0e00f mov lr, pc 30003600: e12fff13 bx r3 30003604: ea00002d b 300036c0 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 30003608: e1a00004 mov r0, r4 3000360c: ebfffdb4 bl 30002ce4 break; 30003610: ea00002a b 300036c0 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 30003614: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 30003618: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 3000361c: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 30003620: ea000026 b 300036c0 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 30003624: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 30003628: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 3000362c: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 30003630: ea000022 b 300036c0 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 30003634: e59420cc ldr r2, [r4, #204] ; 0xcc 30003638: e59f309c ldr r3, [pc, #156] ; 300036dc 3000363c: e0833282 add r3, r3, r2, lsl #5 30003640: e5933004 ldr r3, [r3, #4] 30003644: e3530000 cmp r3, #0 30003648: 0a000003 beq 3000365c sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3000364c: e1a00004 mov r0, r4 30003650: e1a0e00f mov lr, pc 30003654: e12fff13 bx r3 30003658: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); 3000365c: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ 30003660: 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); 30003664: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ 30003668: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3000366c: e59f2068 ldr r2, [pc, #104] ; 300036dc * 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); 30003670: 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) { 30003674: e7923283 ldr r3, [r2, r3, lsl #5] 30003678: e3530000 cmp r3, #0 3000367c: 0a00000f beq 300036c0 sc = rtems_termios_linesw[tty->t_line].l_open(tty); 30003680: e1a00004 mov r0, r4 30003684: e1a0e00f mov lr, pc 30003688: e12fff13 bx r3 3000368c: e1a06000 mov r6, r0 30003690: ea00000a b 300036c0 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 30003694: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 30003698: 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; 3000369c: 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 ) 300036a0: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 300036a4: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 300036a8: 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; 300036ac: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 300036b0: e0611000 rsb r1, r1, r0 <== NOT EXECUTED 300036b4: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 300036b8: e0813003 add r3, r1, r3 <== NOT EXECUTED 300036bc: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 300036c0: e5940018 ldr r0, [r4, #24] 300036c4: eb0006a5 bl 30005160 args->ioctl_return = sc; 300036c8: e585600c str r6, [r5, #12] return sc; } 300036cc: e1a00006 mov r0, r6 300036d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 30002d40 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30002d40: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 30002d44: e58d300c str r3, [sp, #12] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 30002d48: e59f3404 ldr r3, [pc, #1028] ; 30003154 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30002d4c: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 30002d50: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 30002d54: e1a09000 mov r9, r0 30002d58: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 30002d5c: e5930000 ldr r0, [r3] 30002d60: e1a02001 mov r2, r1 30002d64: eb0008b7 bl 30005048 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 30002d68: e2506000 subs r6, r0, #0 30002d6c: 1a0000ee bne 3000312c return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 30002d70: e59f33e0 ldr r3, [pc, #992] ; 30003158 30002d74: e5937000 ldr r7, [r3] 30002d78: e1a05007 mov r5, r7 30002d7c: ea000006 b 30002d9c if ((tty->major == major) && (tty->minor == minor)) 30002d80: e595300c ldr r3, [r5, #12] 30002d84: e1530009 cmp r3, r9 30002d88: 1a000002 bne 30002d98 30002d8c: e5953010 ldr r3, [r5, #16] 30002d90: e153000a cmp r3, sl 30002d94: 0a0000c3 beq 300030a8 sc = rtems_semaphore_obtain( rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 30002d98: e5955000 ldr r5, [r5] 30002d9c: e3550000 cmp r5, #0 30002da0: 1afffff6 bne 30002d80 30002da4: ea0000e3 b 30003138 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 30002da8: e59f23ac ldr r2, [pc, #940] ; 3000315c 30002dac: e5923000 ldr r3, [r2] 30002db0: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 30002db4: e5950064 ldr r0, [r5, #100] ; 0x64 30002db8: e58d2008 str r2, [sp, #8] 30002dbc: ebfffd00 bl 300021c4 if (tty->rawInBuf.theBuf == NULL) { 30002dc0: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 30002dc4: e1a0b000 mov fp, r0 30002dc8: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 30002dcc: e59d2008 ldr r2, [sp, #8] 30002dd0: 1a000006 bne 30002df0 free(tty); 30002dd4: e1a00005 mov r0, r5 <== NOT EXECUTED 30002dd8: ebfffc2a bl 30001e88 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 30002ddc: e59f3370 ldr r3, [pc, #880] ; 30003154 <== NOT EXECUTED return RTEMS_NO_MEMORY; 30002de0: e3a0601a mov r6, #26 <== NOT EXECUTED */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); 30002de4: e5930000 ldr r0, [r3] <== NOT EXECUTED 30002de8: eb0008dc bl 30005160 <== NOT EXECUTED return RTEMS_NO_MEMORY; 30002dec: ea0000ce b 3000312c <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 30002df0: e5923004 ldr r3, [r2, #4] 30002df4: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 30002df8: e5950088 ldr r0, [r5, #136] ; 0x88 30002dfc: e58d2008 str r2, [sp, #8] 30002e00: ebfffcef bl 300021c4 if (tty->rawOutBuf.theBuf == NULL) { 30002e04: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 30002e08: e1a03000 mov r3, r0 30002e0c: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 30002e10: e59d2008 ldr r2, [sp, #8] 30002e14: 0a000008 beq 30002e3c return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 30002e18: e5920008 ldr r0, [r2, #8] 30002e1c: e58d3008 str r3, [sp, #8] 30002e20: ebfffce7 bl 300021c4 if (tty->cbuf == NULL) { 30002e24: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 30002e28: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 30002e2c: e59d3008 ldr r3, [sp, #8] 30002e30: 1a000004 bne 30002e48 free((void *)(tty->rawOutBuf.theBuf)); 30002e34: e1a00003 mov r0, r3 <== NOT EXECUTED 30002e38: ebfffc12 bl 30001e88 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 30002e3c: e1a0000b mov r0, fp <== NOT EXECUTED 30002e40: ebfffc10 bl 30001e88 <== NOT EXECUTED 30002e44: eaffffe2 b 30002dd4 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 30002e48: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 30002e4c: e5853004 str r3, [r5, #4] if (rtems_termios_ttyHead != NULL) 30002e50: e1570003 cmp r7, r3 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 30002e54: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 30002e58: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 30002e5c: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 30002e60: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 30002e64: e58530e4 str r3, [r5, #228] ; 0xe4 */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; 30002e68: e59f32e8 ldr r3, [pc, #744] ; 30003158 * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 30002e6c: 15875004 strne r5, [r7, #4] rtems_termios_ttyHead = tty; 30002e70: e5834000 str r4, [r3] if (rtems_termios_ttyTail == NULL) 30002e74: e59f32e4 ldr r3, [pc, #740] ; 30003160 tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 30002e78: e5857000 str r7, [r5] tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 30002e7c: e5932000 ldr r2, [r3] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 30002e80: e59f72d4 ldr r7, [pc, #724] ; 3000315c tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) 30002e84: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 30002e88: 05834000 streq r4, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30002e8c: e59f02d0 ldr r0, [pc, #720] ; 30003164 rtems_build_name ('T', 'R', 'i', c), 30002e90: e5d7300c ldrb r3, [r7, #12] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30002e94: e2842014 add r2, r4, #20 rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; if (rtems_termios_ttyTail == NULL) rtems_termios_ttyTail = tty; tty->minor = minor; 30002e98: e584a010 str sl, [r4, #16] tty->major = major; 30002e9c: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 30002ea0: e1830000 orr r0, r3, r0 30002ea4: e58d2000 str r2, [sp] 30002ea8: e3a03000 mov r3, #0 30002eac: e3a01001 mov r1, #1 30002eb0: e3a02054 mov r2, #84 ; 0x54 30002eb4: eb0007d1 bl 30004e00 rtems_build_name ('T', 'R', 'i', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) 30002eb8: e2503000 subs r3, r0, #0 30002ebc: 1a000096 bne 3000311c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), 30002ec0: e5d7200c ldrb r2, [r7, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->isem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30002ec4: e59f029c ldr r0, [pc, #668] ; 30003168 30002ec8: e2841018 add r1, r4, #24 30002ecc: e58d1000 str r1, [sp] 30002ed0: e1820000 orr r0, r2, r0 30002ed4: e3a01001 mov r1, #1 30002ed8: e3a02054 mov r2, #84 ; 0x54 30002edc: eb0007c7 bl 30004e00 rtems_build_name ('T', 'R', 'o', c), 1, RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) 30002ee0: e2501000 subs r1, r0, #0 30002ee4: 1a00008c bne 3000311c rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), 30002ee8: e5d7300c ldrb r3, [r7, #12] RTEMS_BINARY_SEMAPHORE | RTEMS_INHERIT_PRIORITY | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->osem); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( 30002eec: e59f0278 ldr r0, [pc, #632] ; 3000316c 30002ef0: e284208c add r2, r4, #140 ; 0x8c 30002ef4: e58d2000 str r2, [sp] 30002ef8: e1830000 orr r0, r3, r0 30002efc: e3a02020 mov r2, #32 30002f00: e1a03001 mov r3, r1 30002f04: eb0007bd bl 30004e00 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 30002f08: e250b000 subs fp, r0, #0 30002f0c: 1a000082 bne 3000311c tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 30002f10: e59de00c ldr lr, [sp, #12] 30002f14: e284c098 add ip, r4, #152 ; 0x98 30002f18: e8be000f ldm lr!, {r0, r1, r2, r3} 30002f1c: e8ac000f stmia ip!, {r0, r1, r2, r3} 30002f20: e89e000f ldm lr, {r0, r1, r2, r3} 30002f24: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002f28: e59430b4 ldr r3, [r4, #180] ; 0xb4 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 30002f2c: e584b094 str fp, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30002f30: e3530002 cmp r3, #2 30002f34: 1a000017 bne 30002f98 sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), 30002f38: e5d7300c ldrb r3, [r7, #12] /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 30002f3c: e59f022c ldr r0, [pc, #556] ; 30003170 30002f40: e28420c8 add r2, r4, #200 ; 0xc8 30002f44: e58d2004 str r2, [sp, #4] 30002f48: e1830000 orr r0, r3, r0 30002f4c: e3a02b01 mov r2, #1024 ; 0x400 30002f50: e3a0100a mov r1, #10 30002f54: e3a03c05 mov r3, #1280 ; 0x500 30002f58: e58db000 str fp, [sp] 30002f5c: eb0008a6 bl 300051fc TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 30002f60: e2502000 subs r2, r0, #0 30002f64: 1a00006c bne 3000311c rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), 30002f68: e5d7300c ldrb r3, [r7, #12] RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); sc = rtems_task_create ( 30002f6c: e59f0200 ldr r0, [pc, #512] ; 30003174 30002f70: e58d2000 str r2, [sp] 30002f74: e28420c4 add r2, r4, #196 ; 0xc4 30002f78: e58d2004 str r2, [sp, #4] 30002f7c: e1830000 orr r0, r3, r0 30002f80: e3a01009 mov r1, #9 30002f84: e3a02b01 mov r2, #1024 ; 0x400 30002f88: e3a03c05 mov r3, #1280 ; 0x500 30002f8c: eb00089a bl 300051fc TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 30002f90: e3500000 cmp r0, #0 30002f94: 1a000060 bne 3000311c rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 30002f98: e59430a0 ldr r3, [r4, #160] ; 0xa0 30002f9c: e3530000 cmp r3, #0 30002fa0: 0a000002 beq 30002fb0 30002fa4: e59430b4 ldr r3, [r4, #180] ; 0xb4 30002fa8: e3530002 cmp r3, #2 30002fac: 1a00000b bne 30002fe0 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), 30002fb0: e59f31a4 ldr r3, [pc, #420] ; 3000315c rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 30002fb4: e59f01bc ldr r0, [pc, #444] ; 30003178 rtems_build_name ('T', 'R', 'r', c), 30002fb8: e5d3300c ldrb r3, [r3, #12] rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 30002fbc: e2842068 add r2, r4, #104 ; 0x68 30002fc0: e3a01000 mov r1, #0 30002fc4: e58d2000 str r2, [sp] 30002fc8: e1830000 orr r0, r3, r0 30002fcc: e3a02024 mov r2, #36 ; 0x24 30002fd0: e1a03001 mov r3, r1 30002fd4: eb000789 bl 30004e00 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 30002fd8: e3500000 cmp r0, #0 30002fdc: 1a00004e bne 3000311c } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 30002fe0: e59f3194 ldr r3, [pc, #404] ; 3000317c tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 30002fe4: e3a02011 mov r2, #17 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 30002fe8: e5843030 str r3, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 30002fec: e59f318c ldr r3, [pc, #396] ; 30003180 tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 30002ff0: e5c42049 strb r2, [r4, #73] ; 0x49 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; 30002ff4: e5843034 str r3, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 30002ff8: e59f3184 ldr r3, [pc, #388] ; 30003184 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 30002ffc: e2822002 add r2, r2, #2 /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 30003000: e5843038 str r3, [r4, #56] ; 0x38 tty->termios.c_lflag = 30003004: e59f317c ldr r3, [pc, #380] ; 30003188 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; 30003008: e5c4204a strb r2, [r4, #74] ; 0x4a * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = 3000300c: e584303c str r3, [r4, #60] ; 0x3c ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 30003010: e3a03003 mov r3, #3 30003014: e5c43041 strb r3, [r4, #65] ; 0x41 tty->termios.c_cc[VQUIT] = '\034'; 30003018: e2833019 add r3, r3, #25 3000301c: e5c43042 strb r3, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 30003020: e2833063 add r3, r3, #99 ; 0x63 30003024: e5c43043 strb r3, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 30003028: e3a03015 mov r3, #21 3000302c: e5c43044 strb r3, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 30003030: e3a03004 mov r3, #4 30003034: e5c43045 strb r3, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; 30003038: e3a03000 mov r3, #0 tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; 3000303c: e58430b8 str r3, [r4, #184] ; 0xb8 tty->termios.c_cc[VINTR] = '\003'; tty->termios.c_cc[VQUIT] = '\034'; tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; 30003040: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 30003044: e5c43051 strb r3, [r4, #81] ; 0x51 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 30003048: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 3000304c: e2822007 add r2, r2, #7 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 30003050: e1a030a3 lsr r3, r3, #1 30003054: e58430bc str r3, [r4, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; 30003058: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 3000305c: e5c4204b strb r2, [r4, #75] ; 0x4b tty->termios.c_cc[VREPRINT] = '\022'; 30003060: e3a02012 mov r2, #18 30003064: e5c4204d strb r2, [r4, #77] ; 0x4d tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 30003068: e0833083 add r3, r3, r3, lsl #1 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; 3000306c: e3a0200f mov r2, #15 30003070: e5c4204e strb r2, [r4, #78] ; 0x4e tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 30003074: e1a03123 lsr r3, r3, #2 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 30003078: e2822008 add r2, r2, #8 3000307c: e5c4204f strb r2, [r4, #79] ; 0x4f tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 30003080: e58430c0 str r3, [r4, #192] ; 0xc0 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 30003084: e3a02016 mov r2, #22 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003088: e59f30cc ldr r3, [pc, #204] ; 3000315c tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 3000308c: e5c42050 strb r2, [r4, #80] ; 0x50 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 30003090: e5d3200c ldrb r2, [r3, #12] 30003094: e352007a cmp r2, #122 ; 0x7a 30003098: e2821001 add r1, r2, #1 c = 'a'; 3000309c: 03a02061 moveq r2, #97 ; 0x61 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') 300030a0: e5c3100c strb r1, [r3, #12] c = 'a'; 300030a4: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; 300030a8: e5983000 ldr r3, [r8] 300030ac: e5835034 str r5, [r3, #52] ; 0x34 if (!tty->refcount++) { 300030b0: e5953008 ldr r3, [r5, #8] 300030b4: e2832001 add r2, r3, #1 300030b8: e3530000 cmp r3, #0 300030bc: e5852008 str r2, [r5, #8] 300030c0: 1a000016 bne 30003120 if (tty->device.firstOpen) 300030c4: e5953098 ldr r3, [r5, #152] ; 0x98 300030c8: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 300030cc: 11a00009 movne r0, r9 300030d0: 11a0100a movne r1, sl 300030d4: 11a02008 movne r2, r8 300030d8: 11a0e00f movne lr, pc 300030dc: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 300030e0: e59530b4 ldr r3, [r5, #180] ; 0xb4 300030e4: e3530002 cmp r3, #2 300030e8: 1a00000c bne 30003120 sc = rtems_task_start( 300030ec: e59500c4 ldr r0, [r5, #196] ; 0xc4 300030f0: e59f1094 ldr r1, [pc, #148] ; 3000318c 300030f4: e1a02005 mov r2, r5 300030f8: eb0008e7 bl 3000549c tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 300030fc: e3500000 cmp r0, #0 30003100: 1a000005 bne 3000311c rtems_fatal_error_occurred (sc); sc = rtems_task_start( 30003104: e59500c8 ldr r0, [r5, #200] ; 0xc8 30003108: e59f1080 ldr r1, [pc, #128] ; 30003190 3000310c: e1a02005 mov r2, r5 30003110: eb0008e1 bl 3000549c tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 30003114: e3500000 cmp r0, #0 30003118: 0a000000 beq 30003120 rtems_fatal_error_occurred (sc); 3000311c: eb000960 bl 300056a4 } } rtems_semaphore_release (rtems_termios_ttyMutex); 30003120: e59f302c ldr r3, [pc, #44] ; 30003154 30003124: e5930000 ldr r0, [r3] 30003128: eb00080c bl 30005160 return RTEMS_SUCCESSFUL; } 3000312c: e1a00006 mov r0, r6 30003130: e28dd010 add sp, sp, #16 30003134: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 30003138: e3a00001 mov r0, #1 3000313c: e3a010e8 mov r1, #232 ; 0xe8 30003140: ebfffad5 bl 30001c9c if (tty == NULL) { 30003144: e2504000 subs r4, r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 30003148: e1a05000 mov r5, r0 if (tty == NULL) { 3000314c: 1affff15 bne 30002da8 30003150: eaffff21 b 30002ddc <== NOT EXECUTED =============================================================================== 30003e28 : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 30003e28: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30003e2c: 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; 30003e30: 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); 30003e34: 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; 30003e38: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; 30003e3c: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 30003e40: 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); 30003e44: e1a02001 mov r2, r1 30003e48: e5940014 ldr r0, [r4, #20] 30003e4c: eb00047d bl 30005048 if (sc != RTEMS_SUCCESSFUL) 30003e50: e2507000 subs r7, r0, #0 30003e54: 1a0000be bne 30004154 return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 30003e58: e59420cc ldr r2, [r4, #204] ; 0xcc 30003e5c: e59f32f8 ldr r3, [pc, #760] ; 3000415c 30003e60: e0833282 add r3, r3, r2, lsl #5 30003e64: e5933008 ldr r3, [r3, #8] 30003e68: e3530000 cmp r3, #0 30003e6c: 0a000005 beq 30003e88 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 30003e70: e1a00004 mov r0, r4 30003e74: e1a01005 mov r1, r5 30003e78: e1a0e00f mov lr, pc 30003e7c: e12fff13 bx r3 30003e80: e1a07000 mov r7, r0 30003e84: ea0000ae b 30004144 tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 30003e88: e5942024 ldr r2, [r4, #36] ; 0x24 30003e8c: e5943020 ldr r3, [r4, #32] 30003e90: e1520003 cmp r2, r3 30003e94: 1a0000a1 bne 30004120 tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 30003e98: e5943028 ldr r3, [r4, #40] ; 0x28 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 30003e9c: e5847020 str r7, [r4, #32] tty->read_start_column = tty->column; 30003ea0: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && 30003ea4: e59430a0 ldr r3, [r4, #160] ; 0xa0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 30003ea8: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 30003eac: e3530000 cmp r3, #0 30003eb0: 0a00003b beq 30003fa4 30003eb4: e59430b4 ldr r3, [r4, #180] ; 0xb4 30003eb8: e3530000 cmp r3, #0 30003ebc: 1a000038 bne 30003fa4 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 30003ec0: e594303c ldr r3, [r4, #60] ; 0x3c 30003ec4: e3130002 tst r3, #2 30003ec8: 0a00000d beq 30003f04 for (;;) { n = (*tty->device.pollRead)(tty->minor); 30003ecc: e5940010 ldr r0, [r4, #16] 30003ed0: e1a0e00f mov lr, pc 30003ed4: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 30003ed8: e3500000 cmp r0, #0 30003edc: aa000002 bge 30003eec rtems_task_wake_after (1); 30003ee0: e3a00001 mov r0, #1 30003ee4: eb000584 bl 300054fc 30003ee8: eafffff7 b 30003ecc } else { if (siproc (n, tty)) 30003eec: e20000ff and r0, r0, #255 ; 0xff 30003ef0: e1a01004 mov r1, r4 30003ef4: ebffff86 bl 30003d14 30003ef8: e3500000 cmp r0, #0 30003efc: 0afffff2 beq 30003ecc 30003f00: ea000086 b 30004120 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 30003f04: eb0002c4 bl 30004a1c <== NOT EXECUTED 30003f08: e1a06000 mov r6, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 30003f0c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 30003f10: e1a0e00f mov lr, pc <== NOT EXECUTED 30003f14: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 30003f18: e3500000 cmp r0, #0 <== NOT EXECUTED 30003f1c: aa000013 bge 30003f70 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 30003f20: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 30003f24: e3530000 cmp r3, #0 <== NOT EXECUTED 30003f28: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 30003f2c: 0a000005 beq 30003f48 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 30003f30: e3530000 cmp r3, #0 <== NOT EXECUTED 30003f34: 0a00000a beq 30003f64 <== NOT EXECUTED 30003f38: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 30003f3c: e3530000 cmp r3, #0 <== NOT EXECUTED 30003f40: 0a000007 beq 30003f64 <== NOT EXECUTED 30003f44: ea000001 b 30003f50 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 30003f48: e3530000 cmp r3, #0 <== NOT EXECUTED 30003f4c: 0a000073 beq 30004120 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 30003f50: eb0002b1 bl 30004a1c <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 30003f54: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 30003f58: e0660000 rsb r0, r6, r0 <== NOT EXECUTED 30003f5c: e1500003 cmp r0, r3 <== NOT EXECUTED 30003f60: 8a00006e bhi 30004120 <== NOT EXECUTED break; } } rtems_task_wake_after (1); 30003f64: e3a00001 mov r0, #1 <== NOT EXECUTED 30003f68: eb000563 bl 300054fc <== NOT EXECUTED 30003f6c: eaffffe6 b 30003f0c <== NOT EXECUTED } else { siproc (n, tty); 30003f70: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 30003f74: e1a01004 mov r1, r4 <== NOT EXECUTED 30003f78: ebffff65 bl 30003d14 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 30003f7c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 30003f80: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 30003f84: e1520003 cmp r2, r3 <== NOT EXECUTED 30003f88: aa000064 bge 30004120 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 30003f8c: e3530000 cmp r3, #0 <== NOT EXECUTED 30003f90: 0affffdd beq 30003f0c <== NOT EXECUTED 30003f94: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 30003f98: e3530000 cmp r3, #0 <== NOT EXECUTED 30003f9c: 0affffda beq 30003f0c <== NOT EXECUTED 30003fa0: eaffffd7 b 30003f04 <== NOT EXECUTED if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) || (tty->flow_ctrl & FL_OSTOP))) { /* XON should be sent now... */ (*tty->device.write)( 30003fa4: 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; 30003fa8: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; 30003fac: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 30003fb0: e59f91a8 ldr r9, [pc, #424] ; 30004160 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)( 30003fb4: e58d2000 str r2, [sp] 30003fb8: ea000040 b 300040c0 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; 30003fbc: e594005c ldr r0, [r4, #92] ; 0x5c 30003fc0: e5941064 ldr r1, [r4, #100] ; 0x64 30003fc4: e2800001 add r0, r0, #1 30003fc8: eb003136 bl 300104a8 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 30003fcc: e5943058 ldr r3, [r4, #88] ; 0x58 30003fd0: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; 30003fd4: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 30003fd8: e5943060 ldr r3, [r4, #96] ; 0x60 30003fdc: e5942064 ldr r2, [r4, #100] ; 0x64 % tty->rawInBuf.Size) 30003fe0: 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) 30003fe4: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) 30003fe8: e0600003 rsb r0, r0, r3 30003fec: eb00312d bl 300104a8 <__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) 30003ff0: e59430bc ldr r3, [r4, #188] ; 0xbc 30003ff4: e1500003 cmp r0, r3 30003ff8: 2a00001f bcs 3000407c % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 30003ffc: e59430b8 ldr r3, [r4, #184] ; 0xb8 30004000: e3c33001 bic r3, r3, #1 30004004: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 30004008: e59420b8 ldr r2, [r4, #184] ; 0xb8 3000400c: e59f3150 ldr r3, [pc, #336] ; 30004164 30004010: e0023003 and r3, r2, r3 30004014: e59f2148 ldr r2, [pc, #328] ; 30004164 30004018: e1530002 cmp r3, r2 3000401c: 1a00000b bne 30004050 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 30004020: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 30004024: e3530000 cmp r3, #0 <== NOT EXECUTED 30004028: 0a000002 beq 30004038 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 3000402c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004030: e3130020 tst r3, #32 <== NOT EXECUTED 30004034: 0a000005 beq 30004050 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 30004038: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3000403c: e59d1000 ldr r1, [sp] <== NOT EXECUTED 30004040: e3a02001 mov r2, #1 <== NOT EXECUTED 30004044: e1a0e00f mov lr, pc <== NOT EXECUTED 30004048: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3000404c: ea00000a b 3000407c <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 30004050: e59430b8 ldr r3, [r4, #184] ; 0xb8 30004054: e3130c01 tst r3, #256 ; 0x100 30004058: 0a000007 beq 3000407c tty->flow_ctrl &= ~FL_IRTSOFF; 3000405c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004060: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 30004064: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 30004068: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 3000406c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 30004070: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 30004074: 11a0e00f movne lr, pc <== NOT EXECUTED 30004078: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 3000407c: e594303c ldr r3, [r4, #60] ; 0x3c 30004080: e3130002 tst r3, #2 30004084: 0a000005 beq 300040a0 if (siproc (c, tty)) 30004088: e1a0000a mov r0, sl 3000408c: e1a01004 mov r1, r4 30004090: ebffff1f bl 30003d14 wait = 0; 30004094: e3500000 cmp r0, #0 30004098: 13a06000 movne r6, #0 3000409c: ea000006 b 300040bc } else { siproc (c, tty); 300040a0: e1a0000a mov r0, sl <== NOT EXECUTED 300040a4: e1a01004 mov r1, r4 <== NOT EXECUTED 300040a8: ebffff19 bl 30003d14 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 300040ac: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 300040b0: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; 300040b4: e1520003 cmp r2, r3 <== NOT EXECUTED 300040b8: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; 300040bc: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 300040c0: e594205c ldr r2, [r4, #92] ; 0x5c 300040c4: e5943060 ldr r3, [r4, #96] ; 0x60 300040c8: e1520003 cmp r2, r3 300040cc: 0a000004 beq 300040e4 (tty->ccount < (CBUFSIZE-1))) { 300040d0: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 300040d4: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 300040d8: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 300040dc: e1520003 cmp r2, r3 300040e0: baffffb5 blt 30003fbc } /* * Wait for characters */ if ( wait ) { 300040e4: e3560000 cmp r6, #0 300040e8: 0a00000c beq 30004120 sc = rtems_semaphore_obtain( 300040ec: e5940068 ldr r0, [r4, #104] ; 0x68 300040f0: e594106c ldr r1, [r4, #108] ; 0x6c 300040f4: e1a0200a mov r2, sl 300040f8: eb0003d2 bl 30005048 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 300040fc: e3500000 cmp r0, #0 30004100: 0affffee beq 300040c0 30004104: ea000005 b 30004120 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 30004108: e594201c ldr r2, [r4, #28] count--; 3000410c: 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++]; 30004110: e7d22003 ldrb r2, [r2, r3] 30004114: e2833001 add r3, r3, #1 30004118: e4cb2001 strb r2, [fp], #1 3000411c: e5843024 str r3, [r4, #36] ; 0x24 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 30004120: e3580000 cmp r8, #0 30004124: 0a000003 beq 30004138 30004128: e5943024 ldr r3, [r4, #36] ; 0x24 3000412c: e5942020 ldr r2, [r4, #32] 30004130: e1530002 cmp r3, r2 30004134: bafffff3 blt 30004108 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 30004138: e5953010 ldr r3, [r5, #16] 3000413c: e0688003 rsb r8, r8, r3 30004140: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; 30004144: e3a03000 mov r3, #0 30004148: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 3000414c: e5940014 ldr r0, [r4, #20] 30004150: eb000402 bl 30005160 return sc; } 30004154: e1a00007 mov r0, r7 30004158: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 30004478 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 30004478: e59020b8 ldr r2, [r0, #184] ; 0xb8 3000447c: e59f31b8 ldr r3, [pc, #440] ; 3000463c * 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) { 30004480: 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)) 30004484: e0023003 and r3, r2, r3 30004488: e59f21b0 ldr r2, [pc, #432] ; 30004640 * 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) { 3000448c: 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)) 30004490: e1530002 cmp r3, r2 30004494: 1a00000c bne 300044cc == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 30004498: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 3000449c: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 300044a0: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 300044a4: e1a0e00f mov lr, pc <== NOT EXECUTED 300044a8: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 300044ac: ebfffa08 bl 30002cd4 <== NOT EXECUTED tty->t_dqlen--; 300044b0: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 300044b4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 300044b8: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 300044bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300044c0: e3833002 orr r3, r3, #2 <== NOT EXECUTED 300044c4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); 300044c8: ea00000f b 3000450c <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 300044cc: e59030b8 ldr r3, [r0, #184] ; 0xb8 300044d0: e2033003 and r3, r3, #3 300044d4: e3530002 cmp r3, #2 300044d8: 1a00000e bne 30004518 * 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); 300044dc: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 300044e0: e3a02001 mov r2, #1 <== NOT EXECUTED 300044e4: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 300044e8: e1a0e00f mov lr, pc <== NOT EXECUTED 300044ec: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 300044f0: ebfff9f7 bl 30002cd4 <== NOT EXECUTED tty->t_dqlen--; 300044f4: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 300044f8: e2433001 sub r3, r3, #1 <== NOT EXECUTED 300044fc: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 30004500: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 30004504: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 30004508: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3000450c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 30004510: e3a05001 mov r5, #1 <== NOT EXECUTED 30004514: ea000046 b 30004634 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 30004518: e5902080 ldr r2, [r0, #128] ; 0x80 3000451c: e5903084 ldr r3, [r0, #132] ; 0x84 30004520: e1520003 cmp r2, r3 30004524: 1a000005 bne 30004540 /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 30004528: e5903094 ldr r3, [r0, #148] ; 0x94 3000452c: e3530002 cmp r3, #2 30004530: 1a00003e bne 30004630 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 30004534: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 30004538: eb000308 bl 30005160 <== NOT EXECUTED 3000453c: ea00003b b 30004630 <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 30004540: ebfff9e3 bl 30002cd4 len = tty->t_dqlen; tty->t_dqlen = 0; 30004544: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 30004548: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; 3000454c: e5843090 str r3, [r4, #144] ; 0x90 30004550: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 30004554: e5943084 ldr r3, [r4, #132] ; 0x84 30004558: e5941088 ldr r1, [r4, #136] ; 0x88 3000455c: e0820003 add r0, r2, r3 30004560: eb002fd0 bl 300104a8 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 30004564: 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; 30004568: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 3000456c: 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; 30004570: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 30004574: 0594008c ldreq r0, [r4, #140] ; 0x8c 30004578: 0b0002f8 bleq 30005160 } if (newTail == tty->rawOutBuf.Head) { 3000457c: e5943080 ldr r3, [r4, #128] ; 0x80 30004580: e1560003 cmp r6, r3 30004584: 1a00000a bne 300045b4 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 30004588: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 3000458c: e3a05000 mov r5, #0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 30004590: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 30004594: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; 30004598: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 3000459c: 0a000021 beq 30004628 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 300045a0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 300045a4: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 300045a8: e1a0e00f mov lr, pc <== NOT EXECUTED 300045ac: e12fff13 bx r3 <== NOT EXECUTED 300045b0: ea00001c b 30004628 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 300045b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 300045b8: e2033e21 and r3, r3, #528 ; 0x210 300045bc: e3530e21 cmp r3, #528 ; 0x210 300045c0: 1a000008 bne 300045e8 == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 300045c4: ebfff9c2 bl 30002cd4 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 300045c8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 300045cc: e3833020 orr r3, r3, #32 <== NOT EXECUTED 300045d0: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 300045d4: e3a03001 mov r3, #1 <== NOT EXECUTED 300045d8: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED 300045dc: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; 300045e0: e3a05000 mov r5, #0 <== NOT EXECUTED 300045e4: ea00000f b 30004628 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 300045e8: 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)( 300045ec: e594107c ldr r1, [r4, #124] ; 0x7c nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 300045f0: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; 300045f4: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; 300045f8: 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)) { 300045fc: 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; 30004600: 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)) { 30004604: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; 30004608: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ 3000460c: e3a03001 mov r3, #1 30004610: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( 30004614: e5940010 ldr r0, [r4, #16] 30004618: e0811006 add r1, r1, r6 3000461c: e1a02005 mov r2, r5 30004620: e1a0e00f mov lr, pc 30004624: e594f0a4 ldr pc, [r4, #164] ; 0xa4 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 30004628: e5846084 str r6, [r4, #132] ; 0x84 3000462c: ea000000 b 30004634 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 30004630: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 30004634: e1a00005 mov r0, r5 30004638: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 3000632c : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 3000632c: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 30006330: e92d41f0 push {r4, r5, r6, r7, r8, lr} 30006334: e1a05000 mov r5, r0 30006338: e1a08001 mov r8, r1 3000633c: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 30006340: 0a00000e beq 30006380 if (rtems_panic_in_progress++) 30006344: e59f212c ldr r2, [pc, #300] ; 30006478 30006348: e5923000 ldr r3, [r2] 3000634c: e2831001 add r1, r3, #1 30006350: e3530000 cmp r3, #0 30006354: e5821000 str r1, [r2] 30006358: 0a000003 beq 3000636c rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 3000635c: e59f3118 ldr r3, [pc, #280] ; 3000647c <== NOT EXECUTED 30006360: e5932000 ldr r2, [r3] <== NOT EXECUTED 30006364: e2822001 add r2, r2, #1 <== NOT EXECUTED 30006368: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 3000636c: e59f3104 ldr r3, [pc, #260] ; 30006478 30006370: e5933000 ldr r3, [r3] 30006374: e3530002 cmp r3, #2 return 0; 30006378: 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) 3000637c: ca00003b bgt 30006470 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 30006380: e59f30f8 ldr r3, [pc, #248] ; 30006480 status = error_flag & ~RTEMS_ERROR_MASK; 30006384: 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 */ 30006388: e5933000 ldr r3, [r3] 3000638c: e5930008 ldr r0, [r3, #8] 30006390: eb002f33 bl 30012064 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 30006394: e2155101 ands r5, r5, #1073741824 ; 0x40000000 30006398: 0a000001 beq 300063a4 local_errno = errno; 3000639c: eb002e39 bl 30011c88 <__errno> 300063a0: 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); 300063a4: e59f70d4 ldr r7, [pc, #212] ; 30006480 300063a8: e1a02004 mov r2, r4 300063ac: e5973000 ldr r3, [r7] 300063b0: e1a01008 mov r1, r8 300063b4: e593000c ldr r0, [r3, #12] 300063b8: eb0047a0 bl 30018240 if (status) 300063bc: 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); 300063c0: e1a04000 mov r4, r0 if (status) 300063c4: 0a000008 beq 300063ec chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 300063c8: e5973000 ldr r3, [r7] 300063cc: e1a00006 mov r0, r6 300063d0: e593700c ldr r7, [r3, #12] 300063d4: ebffffd0 bl 3000631c 300063d8: e59f10a4 ldr r1, [pc, #164] ; 30006484 300063dc: e1a02000 mov r2, r0 300063e0: e1a00007 mov r0, r7 300063e4: eb003004 bl 300123fc #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 300063e8: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 300063ec: e3550000 cmp r5, #0 300063f0: 0a000015 beq 3000644c if ((local_errno > 0) && *strerror(local_errno)) 300063f4: da00000d ble 30006430 300063f8: e1a00005 mov r0, r5 300063fc: eb003307 bl 30013020 30006400: e5d03000 ldrb r3, [r0] 30006404: e3530000 cmp r3, #0 30006408: 0a000008 beq 30006430 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 3000640c: e59f306c ldr r3, [pc, #108] ; 30006480 30006410: e1a00005 mov r0, r5 30006414: e5933000 ldr r3, [r3] 30006418: e593600c ldr r6, [r3, #12] 3000641c: eb0032ff bl 30013020 30006420: e59f1060 ldr r1, [pc, #96] ; 30006488 30006424: e1a02000 mov r2, r0 30006428: e1a00006 mov r0, r6 3000642c: ea000004 b 30006444 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 30006430: e59f3048 ldr r3, [pc, #72] ; 30006480 30006434: e59f1050 ldr r1, [pc, #80] ; 3000648c 30006438: e5933000 ldr r3, [r3] 3000643c: e1a02005 mov r2, r5 30006440: e593000c ldr r0, [r3, #12] 30006444: eb002fec bl 300123fc 30006448: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); 3000644c: e59f502c ldr r5, [pc, #44] ; 30006480 30006450: e59f1038 ldr r1, [pc, #56] ; 30006490 30006454: e5953000 ldr r3, [r5] 30006458: e593000c ldr r0, [r3, #12] 3000645c: eb002fe6 bl 300123fc (void) fflush(stderr); 30006460: 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"); 30006464: e0804004 add r4, r0, r4 (void) fflush(stderr); 30006468: e593000c ldr r0, [r3, #12] 3000646c: eb002efc bl 30012064 return chars_written; } 30006470: e1a00004 mov r0, r4 30006474: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 300025b0 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 300025b0: 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; 300025b4: e3a04000 mov r4, #0 int d; for (;;) { c = getc(fp); 300025b8: e59fb0d8 ldr fp, [pc, #216] ; 30002698 limit++; continue; } sign = 1; } if (!isdigit(c)) 300025bc: e59f90d8 ldr r9, [pc, #216] ; 3000269c /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 300025c0: e1a05000 mov r5, r0 300025c4: e58d1000 str r1, [sp] int c; unsigned int i = 0; unsigned int limit = INT_MAX; 300025c8: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 300025cc: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 300025d0: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 300025d4: e5953004 ldr r3, [r5, #4] 300025d8: e2433001 sub r3, r3, #1 300025dc: e3530000 cmp r3, #0 300025e0: e5853004 str r3, [r5, #4] 300025e4: a5953000 ldrge r3, [r5] 300025e8: a4d36001 ldrbge r6, [r3], #1 300025ec: a5853000 strge r3, [r5] 300025f0: aa000003 bge 30002604 300025f4: e59b0000 ldr r0, [fp] <== NOT EXECUTED 300025f8: e1a01005 mov r1, r5 <== NOT EXECUTED 300025fc: eb003454 bl 3000f754 <__srget_r> <== NOT EXECUTED 30002600: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 30002604: e356003a cmp r6, #58 ; 0x3a 30002608: 0a000019 beq 30002674 break; if (sign == 0) { 3000260c: e3540000 cmp r4, #0 30002610: 1a000004 bne 30002628 if (c == '-') { 30002614: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 30002618: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 3000261c: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 30002620: 0affffeb beq 300025d4 sign = -1; limit++; continue; } sign = 1; 30002624: e3a04001 mov r4, #1 } if (!isdigit(c)) 30002628: e5993000 ldr r3, [r9] 3000262c: e0833006 add r3, r3, r6 30002630: e5d30001 ldrb r0, [r3, #1] 30002634: e2100004 ands r0, r0, #4 30002638: 0a000015 beq 30002694 return 0; d = c - '0'; if ((i > (limit / 10)) 3000263c: e1a00008 mov r0, r8 30002640: e3a0100a mov r1, #10 30002644: eb003d4c bl 30011b7c <__aeabi_uidiv> 30002648: e1570000 cmp r7, r0 3000264c: 8a00000f bhi 30002690 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 30002650: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 30002654: 1a000004 bne 3000266c 30002658: e1a00008 mov r0, r8 <== NOT EXECUTED 3000265c: e3a0100a mov r1, #10 <== NOT EXECUTED 30002660: eb003ddd bl 30011ddc <__umodsi3> <== NOT EXECUTED 30002664: e1560000 cmp r6, r0 <== NOT EXECUTED 30002668: 8a000008 bhi 30002690 <== NOT EXECUTED return 0; i = i * 10 + d; 3000266c: e027679a mla r7, sl, r7, r6 30002670: eaffffd7 b 300025d4 } if (sign == 0) 30002674: e3540000 cmp r4, #0 return 0; 30002678: 01a00004 moveq r0, r4 *val = i * sign; 3000267c: 10040497 mulne r4, r7, r4 30002680: 159d3000 ldrne r3, [sp] return 1; 30002684: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 30002688: 15834000 strne r4, [r3] return 1; 3000268c: ea000000 b 30002694 if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; 30002690: e3a00000 mov r0, #0 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 30002694: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 300026a0 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 300026a0: e92d41f0 push {r4, r5, r6, r7, r8, lr} 300026a4: e1a06003 mov r6, r3 int c; *name = *bufp; 300026a8: e5923000 ldr r3, [r2] for (;;) { c = getc(fp); 300026ac: e59f80d8 ldr r8, [pc, #216] ; 3000278c /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 300026b0: e59d7018 ldr r7, [sp, #24] 300026b4: e1a04000 mov r4, r0 300026b8: e1a05002 mov r5, r2 int c; *name = *bufp; 300026bc: e5813000 str r3, [r1] for (;;) { c = getc(fp); 300026c0: e5943004 ldr r3, [r4, #4] 300026c4: e2433001 sub r3, r3, #1 300026c8: e3530000 cmp r3, #0 300026cc: e5843004 str r3, [r4, #4] 300026d0: a5943000 ldrge r3, [r4] 300026d4: a4d30001 ldrbge r0, [r3], #1 300026d8: a5843000 strge r3, [r4] 300026dc: b5980000 ldrlt r0, [r8] 300026e0: b1a01004 movlt r1, r4 300026e4: bb00341a bllt 3000f754 <__srget_r> if (c == ':') { 300026e8: e350003a cmp r0, #58 ; 0x3a 300026ec: 1a000002 bne 300026fc if (nlFlag) 300026f0: e3570000 cmp r7, #0 300026f4: 0a000013 beq 30002748 300026f8: ea00001f b 3000277c return 0; break; } if (c == '\n') { 300026fc: e350000a cmp r0, #10 30002700: 1a000002 bne 30002710 if (!nlFlag) 30002704: e3570000 cmp r7, #0 30002708: 1a00000e bne 30002748 3000270c: ea000018 b 30002774 return 0; break; } if (c == EOF) 30002710: e3700001 cmn r0, #1 30002714: 0a000018 beq 3000277c return 0; if (*nleft < 2) 30002718: e5963000 ldr r3, [r6] 3000271c: e3530001 cmp r3, #1 30002720: 9a000017 bls 30002784 return 0; **bufp = c; 30002724: e5953000 ldr r3, [r5] 30002728: e5c30000 strb r0, [r3] ++(*bufp); 3000272c: e5953000 ldr r3, [r5] 30002730: e2833001 add r3, r3, #1 30002734: e5853000 str r3, [r5] --(*nleft); 30002738: e5963000 ldr r3, [r6] 3000273c: e2433001 sub r3, r3, #1 30002740: e5863000 str r3, [r6] } 30002744: eaffffdd b 300026c0 **bufp = '\0'; 30002748: e5953000 ldr r3, [r5] 3000274c: e3a02000 mov r2, #0 30002750: e5c32000 strb r2, [r3] ++(*bufp); 30002754: e5953000 ldr r3, [r5] --(*nleft); return 1; 30002758: e3a00001 mov r0, #1 **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; ++(*bufp); 3000275c: e2833001 add r3, r3, #1 30002760: e5853000 str r3, [r5] --(*nleft); 30002764: e5963000 ldr r3, [r6] 30002768: e2433001 sub r3, r3, #1 3000276c: e5863000 str r3, [r6] return 1; 30002770: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} return 0; break; } if (c == '\n') { if (!nlFlag) return 0; 30002774: e1a00007 mov r0, r7 30002778: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} break; } if (c == EOF) return 0; 3000277c: e3a00000 mov r0, #0 30002780: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} if (*nleft < 2) return 0; 30002784: e3a00000 mov r0, #0 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 30002788: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 30005904 : struct sigaction *oact ) { ISR_Level level; if ( oact ) 30005904: e2523000 subs r3, r2, #0 *oact = _POSIX_signals_Vectors[ sig ]; 30005908: 159f20b8 ldrne r2, [pc, #184] ; 300059c8 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 3000590c: e92d40f0 push {r4, r5, r6, r7, lr} 30005910: e1a05001 mov r5, r1 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 30005914: 13a0100c movne r1, #12 30005918: 10222091 mlane r2, r1, r0, r2 int sigaction( int sig, const struct sigaction *act, struct sigaction *oact ) { 3000591c: e1a04000 mov r4, r0 ISR_Level level; if ( oact ) *oact = _POSIX_signals_Vectors[ sig ]; 30005920: 18920007 ldmne r2, {r0, r1, r2} 30005924: 18830007 stmne r3, {r0, r1, r2} if ( !sig ) 30005928: e3540000 cmp r4, #0 3000592c: 0a000004 beq 30005944 static inline bool is_valid_signo( int signo ) { return ((signo) >= 1 && (signo) <= 32 ); 30005930: e2443001 sub r3, r4, #1 rtems_set_errno_and_return_minus_one( EINVAL ); if ( !is_valid_signo(sig) ) 30005934: e353001f cmp r3, #31 30005938: 8a000001 bhi 30005944 * * NOTE: Solaris documentation claims to "silently enforce" this which * contradicts the POSIX specification. */ if ( sig == SIGKILL ) 3000593c: e3540009 cmp r4, #9 30005940: 1a000004 bne 30005958 rtems_set_errno_and_return_minus_one( EINVAL ); 30005944: eb002106 bl 3000dd64 <__errno> 30005948: e3a03016 mov r3, #22 3000594c: e5803000 str r3, [r0] 30005950: e3e00000 mvn r0, #0 30005954: e8bd80f0 pop {r4, r5, r6, r7, pc} /* * Evaluate the new action structure and set the global signal vector * appropriately. */ if ( act ) { 30005958: e3550000 cmp r5, #0 3000595c: 0a000017 beq 300059c0 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 30005960: e10f6000 mrs r6, CPSR 30005964: e3863080 orr r3, r6, #128 ; 0x80 30005968: e129f003 msr CPSR_fc, r3 * Unless the user is installing the default signal actions, then * we can just copy the provided sigaction structure into the vectors. */ _ISR_Disable( level ); if ( act->sa_handler == SIG_DFL ) { 3000596c: e5953008 ldr r3, [r5, #8] 30005970: e59f7050 ldr r7, [pc, #80] ; 300059c8 30005974: e3530000 cmp r3, #0 30005978: 1a000007 bne 3000599c _POSIX_signals_Vectors[ sig ] = _POSIX_signals_Default_vectors[ sig ]; 3000597c: e283300c add r3, r3, #12 30005980: e0040493 mul r4, r3, r4 30005984: e59f2040 ldr r2, [pc, #64] ; 300059cc 30005988: e0873004 add r3, r7, r4 3000598c: e0824004 add r4, r2, r4 30005990: e8940007 ldm r4, {r0, r1, r2} 30005994: e8830007 stm r3, {r0, r1, r2} 30005998: ea000005 b 300059b4 } else { _POSIX_signals_Clear_process_signals( sig ); 3000599c: e1a00004 mov r0, r4 300059a0: eb001580 bl 3000afa8 <_POSIX_signals_Clear_process_signals> _POSIX_signals_Vectors[ sig ] = *act; 300059a4: e8950007 ldm r5, {r0, r1, r2} 300059a8: e3a0300c mov r3, #12 300059ac: e0247493 mla r4, r3, r4, r7 300059b0: e8840007 stm r4, {r0, r1, r2} static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 300059b4: e129f006 msr CPSR_fc, r6 * now (signals not posted when SIG_IGN). * + If we are now ignoring a signal that was previously pending, * we clear the pending signal indicator. */ return 0; 300059b8: e3a00000 mov r0, #0 300059bc: e8bd80f0 pop {r4, r5, r6, r7, pc} 300059c0: e1a00005 mov r0, r5 <== NOT EXECUTED } 300059c4: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== 30007f34 : int sigwait( const sigset_t *set, int *sig ) { 30007f34: e92d4010 push {r4, lr} 30007f38: e1a04001 mov r4, r1 int status; status = sigtimedwait( set, NULL, NULL ); 30007f3c: e3a01000 mov r1, #0 30007f40: e1a02001 mov r2, r1 30007f44: ebffff8e bl 30007d84 if ( status != -1 ) { 30007f48: e3700001 cmn r0, #1 30007f4c: 0a000004 beq 30007f64 if ( sig ) 30007f50: e3540000 cmp r4, #0 *sig = status; 30007f54: 15840000 strne r0, [r4] return 0; 30007f58: 13a00000 movne r0, #0 int status; status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) 30007f5c: 18bd8010 popne {r4, pc} 30007f60: ea000002 b 30007f70 <== NOT EXECUTED *sig = status; return 0; } return errno; 30007f64: eb002034 bl 3001003c <__errno> 30007f68: e5900000 ldr r0, [r0] 30007f6c: e8bd8010 pop {r4, pc} status = sigtimedwait( set, NULL, NULL ); if ( status != -1 ) { if ( sig ) *sig = status; return 0; 30007f70: e1a00004 mov r0, r4 <== NOT EXECUTED } return errno; } 30007f74: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 30003d14 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 30003d14: e591203c ldr r2, [r1, #60] ; 0x3c 30003d18: e59f304c ldr r3, [pc, #76] ; 30003d6c /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30003d1c: 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)) { 30003d20: e0023003 and r3, r2, r3 30003d24: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 30003d28: e1a04001 mov r4, r1 30003d2c: 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)) { 30003d30: 0a00000b beq 30003d64 rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30003d34: e5910018 ldr r0, [r1, #24] 30003d38: e3a01000 mov r1, #0 30003d3c: e1a02001 mov r2, r1 30003d40: eb0004c0 bl 30005048 i = iproc (c, tty); 30003d44: e1a01004 mov r1, r4 30003d48: e1a00005 mov r0, r5 30003d4c: ebffff8b bl 30003b80 30003d50: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); 30003d54: e5940018 ldr r0, [r4, #24] 30003d58: eb000500 bl 30005160 } else { i = iproc (c, tty); } return i; } 30003d5c: e1a00005 mov r0, r5 30003d60: e8bd8030 pop {r4, r5, pc} 30003d64: 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); 30003d68: eaffff84 b 30003b80 <== NOT EXECUTED =============================================================================== 300076bc : int truncate( const char *path, off_t length ) { 300076bc: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 300076c0: e1a05001 mov r5, r1 <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); 300076c4: e3a01001 mov r1, #1 <== NOT EXECUTED int truncate( const char *path, off_t length ) { 300076c8: e1a06002 mov r6, r2 <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); 300076cc: ebfff77d bl 300054c8 <== NOT EXECUTED if ( fd == -1 ) 300076d0: e3700001 cmn r0, #1 <== NOT EXECUTED ) { int status; int fd; fd = open( path, O_WRONLY ); 300076d4: e1a04000 mov r4, r0 <== NOT EXECUTED if ( fd == -1 ) return -1; 300076d8: 01a05000 moveq r5, r0 <== NOT EXECUTED { int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) 300076dc: 0a000005 beq 300076f8 <== NOT EXECUTED return -1; status = ftruncate( fd, length ); 300076e0: e1a01005 mov r1, r5 <== NOT EXECUTED 300076e4: e1a02006 mov r2, r6 <== NOT EXECUTED 300076e8: eb0014a8 bl 3000c990 <== NOT EXECUTED 300076ec: e1a05000 mov r5, r0 <== NOT EXECUTED (void) close( fd ); 300076f0: e1a00004 mov r0, r4 <== NOT EXECUTED 300076f4: ebfff30f bl 30004338 <== NOT EXECUTED return status; } 300076f8: e1a00005 mov r0, r5 <== NOT EXECUTED 300076fc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 30005940 : #include int unlink( const char *path ) { 30005940: e92d40f0 push {r4, r5, r6, r7, lr} 30005944: e24dd030 sub sp, sp, #48 ; 0x30 30005948: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 3000594c: ebfff56b bl 30002f00 if ( parentpathlen == 0 ) 30005950: e2504000 subs r4, r0, #0 30005954: e28d3018 add r3, sp, #24 30005958: 1a000005 bne 30005974 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 3000595c: e1a00006 mov r0, r6 30005960: e28d102c add r1, sp, #44 ; 0x2c 30005964: e1a02003 mov r2, r3 30005968: ebfff931 bl 30003e34 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 3000596c: e1a05004 mov r5, r4 30005970: ea000008 b 30005998 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 30005974: e3a02000 mov r2, #0 30005978: e58d2000 str r2, [sp] 3000597c: e1a00006 mov r0, r6 30005980: e1a01004 mov r1, r4 30005984: e2822002 add r2, r2, #2 30005988: ebfff53e bl 30002e88 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 3000598c: e3500000 cmp r0, #0 30005990: 1a00003a bne 30005a80 return -1; free_parentloc = true; 30005994: e3a05001 mov r5, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 30005998: e28dc004 add ip, sp, #4 3000599c: e28de018 add lr, sp, #24 300059a0: e8be000f ldm lr!, {r0, r1, r2, r3} 300059a4: e8ac000f stmia ip!, {r0, r1, r2, r3} name = path + parentpathlen; 300059a8: e0864004 add r4, r6, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 300059ac: e59e3000 ldr r3, [lr] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 300059b0: e1a00004 mov r0, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 300059b4: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 300059b8: eb003054 bl 30011b10 300059bc: e1a01000 mov r1, r0 300059c0: e1a00004 mov r0, r4 300059c4: ebfff55b bl 30002f38 300059c8: e0846000 add r6, r4, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 300059cc: e1a00006 mov r0, r6 300059d0: eb00304e bl 30011b10 300059d4: e28d4004 add r4, sp, #4 300059d8: e1a01000 mov r1, r0 300059dc: e3a02000 mov r2, #0 300059e0: e1a00006 mov r0, r6 300059e4: e1a03004 mov r3, r4 300059e8: e58d2000 str r2, [sp] 300059ec: ebfff4fd bl 30002de8 0, &loc, false ); if ( result != 0 ) { 300059f0: e3500000 cmp r0, #0 300059f4: 0a000004 beq 30005a0c if ( free_parentloc ) 300059f8: e3550000 cmp r5, #0 <== NOT EXECUTED 300059fc: 0a00001f beq 30005a80 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 30005a00: e28d0018 add r0, sp, #24 <== NOT EXECUTED 30005a04: ebfff55a bl 30002f74 <== NOT EXECUTED 30005a08: ea00001c b 30005a80 <== NOT EXECUTED return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 30005a0c: e1a00004 mov r0, r4 30005a10: e59d3010 ldr r3, [sp, #16] 30005a14: e1a0e00f mov lr, pc 30005a18: e593f010 ldr pc, [r3, #16] 30005a1c: e3500001 cmp r0, #1 30005a20: 1a000008 bne 30005a48 rtems_filesystem_freenode( &loc ); 30005a24: e1a00004 mov r0, r4 30005a28: ebfff551 bl 30002f74 if ( free_parentloc ) 30005a2c: e3550000 cmp r5, #0 rtems_filesystem_freenode( &parentloc ); 30005a30: 128d0018 addne r0, sp, #24 30005a34: 1bfff54e blne 30002f74 rtems_set_errno_and_return_minus_one( EISDIR ); 30005a38: eb002c6f bl 30010bfc <__errno> 30005a3c: e3a03015 mov r3, #21 30005a40: e5803000 str r3, [r0] 30005a44: ea00000d b 30005a80 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 30005a48: e28d6018 add r6, sp, #24 30005a4c: e1a01004 mov r1, r4 30005a50: e59d3010 ldr r3, [sp, #16] 30005a54: e1a00006 mov r0, r6 30005a58: e1a0e00f mov lr, pc 30005a5c: e593f00c ldr pc, [r3, #12] 30005a60: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); 30005a64: e1a00004 mov r0, r4 30005a68: ebfff541 bl 30002f74 if ( free_parentloc ) 30005a6c: e3550000 cmp r5, #0 30005a70: 0a000003 beq 30005a84 rtems_filesystem_freenode( &parentloc ); 30005a74: e1a00006 mov r0, r6 30005a78: ebfff53d bl 30002f74 30005a7c: ea000000 b 30005a84 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 30005a80: e3e07000 mvn r7, #0 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 30005a84: e1a00007 mov r0, r7 30005a88: e28dd030 add sp, sp, #48 ; 0x30 30005a8c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 30005bdc : */ int unmount( const char *path ) { 30005bdc: e92d4070 push {r4, r5, r6, lr} 30005be0: e24dd018 sub sp, sp, #24 30005be4: 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 ) ) 30005be8: eb00260d bl 3000f424 30005bec: e28d4004 add r4, sp, #4 30005bf0: e3a03001 mov r3, #1 30005bf4: e1a01000 mov r1, r0 30005bf8: e58d3000 str r3, [sp] 30005bfc: e1a00005 mov r0, r5 30005c00: e3a02000 mov r2, #0 30005c04: e1a03004 mov r3, r4 30005c08: ebfff46e bl 30002dc8 30005c0c: e3500000 cmp r0, #0 30005c10: 1a000040 bne 30005d18 return -1; mt_entry = loc.mt_entry; 30005c14: 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 ){ 30005c18: e59d3004 ldr r3, [sp, #4] 30005c1c: e595201c ldr r2, [r5, #28] 30005c20: e1520003 cmp r2, r3 30005c24: 0a000004 beq 30005c3c rtems_filesystem_freenode( &loc ); 30005c28: e1a00004 mov r0, r4 30005c2c: ebfff4a0 bl 30002eb4 rtems_set_errno_and_return_minus_one( EACCES ); 30005c30: eb00207f bl 3000de34 <__errno> 30005c34: e3a0300d mov r3, #13 30005c38: ea000011 b 30005c84 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 30005c3c: e1a00004 mov r0, r4 30005c40: ebfff49b bl 30002eb4 * 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 ) 30005c44: e59f30d8 ldr r3, [pc, #216] ; 30005d24 30005c48: e5933000 ldr r3, [r3] 30005c4c: e5933014 ldr r3, [r3, #20] 30005c50: e1530005 cmp r3, r5 30005c54: 0a000008 beq 30005c7c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 30005c58: e59f00c8 ldr r0, [pc, #200] ; 30005d28 30005c5c: e595102c ldr r1, [r5, #44] ; 0x2c 30005c60: ebfff6b5 bl 3000373c 30005c64: e3500000 cmp r0, #0 30005c68: 1a000003 bne 30005c7c * 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 ) 30005c6c: e1a00005 mov r0, r5 30005c70: ebfff56a bl 30003220 30005c74: e3500001 cmp r0, #1 30005c78: 1a000003 bne 30005c8c rtems_set_errno_and_return_minus_one( EBUSY ); 30005c7c: eb00206c bl 3000de34 <__errno> 30005c80: e3a03010 mov r3, #16 30005c84: e5803000 str r3, [r0] 30005c88: ea000022 b 30005d18 * 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 ) 30005c8c: e5953014 ldr r3, [r5, #20] 30005c90: e1a00005 mov r0, r5 30005c94: e1a0e00f mov lr, pc 30005c98: e593f028 ldr pc, [r3, #40] ; 0x28 30005c9c: e2506000 subs r6, r0, #0 30005ca0: 1a00001c bne 30005d18 * 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){ 30005ca4: e5953028 ldr r3, [r5, #40] ; 0x28 30005ca8: e1a00005 mov r0, r5 30005cac: e1a0e00f mov lr, pc 30005cb0: e593f02c ldr pc, [r3, #44] ; 0x2c 30005cb4: e2504000 subs r4, r0, #0 30005cb8: 0a000007 beq 30005cdc if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 30005cbc: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 30005cc0: e1a00005 mov r0, r5 <== NOT EXECUTED 30005cc4: e1a0e00f mov lr, pc <== NOT EXECUTED 30005cc8: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 30005ccc: e3500000 cmp r0, #0 <== NOT EXECUTED 30005cd0: 0a000010 beq 30005d18 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 30005cd4: e1a00006 mov r0, r6 <== NOT EXECUTED 30005cd8: eb0003df bl 30006c5c <== 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 ); 30005cdc: e59f6048 ldr r6, [pc, #72] ; 30005d2c 30005ce0: e1a01004 mov r1, r4 30005ce4: e1a02004 mov r2, r4 30005ce8: e5960000 ldr r0, [r6] 30005cec: eb00025b bl 30006660 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 30005cf0: e1a00005 mov r0, r5 30005cf4: eb0004a0 bl 30006f7c <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 30005cf8: e5960000 ldr r0, [r6] 30005cfc: eb00029d bl 30006778 /* * 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 ); 30005d00: e2850008 add r0, r5, #8 30005d04: ebfff46a bl 30002eb4 free( mt_entry ); 30005d08: e1a00005 mov r0, r5 30005d0c: ebfff46d bl 30002ec8 return 0; 30005d10: e1a00004 mov r0, r4 30005d14: ea000000 b 30005d1c */ 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; 30005d18: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 30005d1c: e28dd018 add sp, sp, #24 30005d20: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 300058f8 : int utime( const char *path, const struct utimbuf *times ) { 300058f8: e92d4030 push {r4, r5, lr} 300058fc: e24dd020 sub sp, sp, #32 30005900: e1a04001 mov r4, r1 30005904: e1a05000 mov r5, r0 rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 30005908: eb002783 bl 3000f71c 3000590c: e3a03001 mov r3, #1 30005910: e1a01000 mov r1, r0 30005914: e58d3000 str r3, [sp] 30005918: e1a00005 mov r0, r5 3000591c: e3a02000 mov r2, #0 30005920: e28d3004 add r3, sp, #4 30005924: ebfff344 bl 3000263c 30005928: e3500000 cmp r0, #0 return -1; 3000592c: 13e04000 mvnne r4, #0 { rtems_filesystem_location_info_t temp_loc; int result; struct utimbuf now; if ( rtems_filesystem_evaluate_path( path, strlen( path ), 0x00, &temp_loc, true ) ) 30005930: 1a00000e bne 30005970 return -1; if ( times == NULL ) { 30005934: e3540000 cmp r4, #0 30005938: 1a000003 bne 3000594c now.actime = now.modtime = time( NULL ); 3000593c: eb0027c9 bl 3000f868