=============================================================================== 00008798 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { 8798: e5902000 ldr r2, [r0] 879c: 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; 87a0: e5903010 ldr r3, [r0, #16] switch( node->type ) { 87a4: e2422001 sub r2, r2, #1 ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; 87a8: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { 87ac: e3520006 cmp r2, #6 87b0: 979ff102 ldrls pc, [pc, r2, lsl #2] 87b4: ea000010 b 87fc <== NOT EXECUTED 87b8: 000087d4 .word 0x000087d4 <== NOT EXECUTED 87bc: 000087dc .word 0x000087dc <== NOT EXECUTED 87c0: 000087e4 .word 0x000087e4 <== NOT EXECUTED 87c4: 000087e4 .word 0x000087e4 <== NOT EXECUTED 87c8: 000087ec .word 0x000087ec <== NOT EXECUTED 87cc: 000087ec .word 0x000087ec <== NOT EXECUTED 87d0: 000087f4 .word 0x000087f4 <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; 87d4: e593300c ldr r3, [r3, #12] 87d8: ea000006 b 87f8 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; 87dc: e59f3020 ldr r3, [pc, #32] ; 8804 87e0: ea000004 b 87f8 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; 87e4: e59f301c ldr r3, [pc, #28] ; 8808 87e8: ea000002 b 87f8 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; 87ec: e5933008 ldr r3, [r3, #8] 87f0: ea000000 b 87f8 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; 87f4: e5933010 ldr r3, [r3, #16] 87f8: e5803008 str r3, [r0, #8] break; } return 0; } 87fc: e3a00000 mov r0, #0 8800: e12fff1e bx lr =============================================================================== 00008620 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 8620: 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 ) 8624: e2508000 subs r8, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { 8628: e1a04001 mov r4, r1 862c: e59d5018 ldr r5, [sp, #24] 8630: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) 8634: 0a000043 beq 8748 return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; 8638: e5982010 ldr r2, [r8, #16] /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 863c: e3540007 cmp r4, #7 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; 8640: e5987000 ldr r7, [r8] fs_info = parent_loc->mt_entry->fs_info; 8644: e5926034 ldr r6, [r2, #52] ; 0x34 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 8648: 1a000004 bne 8660 864c: e5960010 ldr r0, [r6, #16] 8650: e59f20f8 ldr r2, [pc, #248] ; 8750 8654: e1500002 cmp r0, r2 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; 8658: 03a08000 moveq r8, #0 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && 865c: 0a000039 beq 8748 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); 8660: e59f20ec ldr r2, [pc, #236] ; 8754 8664: e5922000 ldr r2, [r2] 8668: e592202c ldr r2, [r2, #44] ; 0x2c 866c: e1a00004 mov r0, r4 8670: e1c32002 bic r2, r3, r2 8674: ebffffcc bl 85ac if ( !node ) 8678: e2508000 subs r8, r0, #0 867c: 0a000031 beq 8748 return NULL; /* * Set the type specific information */ switch (type) { 8680: e2444001 sub r4, r4, #1 8684: e3540006 cmp r4, #6 8688: 979ff104 ldrls pc, [pc, r4, lsl #2] 868c: ea000025 b 8728 <== NOT EXECUTED 8690: 000086ac .word 0x000086ac <== NOT EXECUTED 8694: 000086d0 .word 0x000086d0 <== NOT EXECUTED 8698: 000086c8 .word 0x000086c8 <== NOT EXECUTED 869c: 000086c8 .word 0x000086c8 <== NOT EXECUTED 86a0: 000086fc .word 0x000086fc <== NOT EXECUTED 86a4: 000086e4 .word 0x000086e4 <== NOT EXECUTED 86a8: 00008720 .word 0x00008720 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 86ac: e2883054 add r3, r8, #84 ; 0x54 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 86b0: e5883050 str r3, [r8, #80] ; 0x50 the_chain->permanent_null = NULL; 86b4: e3a03000 mov r3, #0 86b8: e5883054 str r3, [r8, #84] ; 0x54 case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); 86bc: e2883050 add r3, r8, #80 ; 0x50 the_chain->last = _Chain_Head(the_chain); 86c0: e5883058 str r3, [r8, #88] ; 0x58 86c4: ea000017 b 8728 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; 86c8: e5953000 ldr r3, [r5] 86cc: ea000014 b 8724 break; case IMFS_DEVICE: node->info.device.major = info->device.major; 86d0: e5953000 ldr r3, [r5] 86d4: e5883050 str r3, [r8, #80] ; 0x50 node->info.device.minor = info->device.minor; 86d8: e5953004 ldr r3, [r5, #4] 86dc: e5883054 str r3, [r8, #84] ; 0x54 break; 86e0: ea000010 b 8728 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; 86e4: e3a03000 mov r3, #0 86e8: e3a04000 mov r4, #0 86ec: e5883050 str r3, [r8, #80] ; 0x50 86f0: e5884054 str r4, [r8, #84] ; 0x54 node->info.linearfile.direct = 0; 86f4: e3a03000 mov r3, #0 86f8: e5883058 str r3, [r8, #88] ; 0x58 case IMFS_MEMORY_FILE: node->info.file.size = 0; 86fc: e3a03000 mov r3, #0 8700: e3a04000 mov r4, #0 8704: e5883050 str r3, [r8, #80] ; 0x50 8708: e5884054 str r4, [r8, #84] ; 0x54 node->info.file.indirect = 0; 870c: e3a03000 mov r3, #0 8710: e5883058 str r3, [r8, #88] ; 0x58 node->info.file.doubly_indirect = 0; 8714: e588305c str r3, [r8, #92] ; 0x5c node->info.file.triply_indirect = 0; 8718: e5883060 str r3, [r8, #96] ; 0x60 break; 871c: ea000001 b 8728 case IMFS_FIFO: node->info.fifo.pipe = NULL; 8720: e3a03000 mov r3, #0 8724: 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; 8728: e5963004 ldr r3, [r6, #4] 872c: e2833001 add r3, r3, #1 /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; 8730: e5887008 str r7, [r8, #8] 8734: e2870050 add r0, r7, #80 ; 0x50 node->st_ino = ++fs_info->ino_count; 8738: e5863004 str r3, [r6, #4] 873c: e1a01008 mov r1, r8 8740: e5883038 str r3, [r8, #56] ; 0x38 8744: ebfff42b bl 57f8 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } 8748: e1a00008 mov r0, r8 874c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 0000888c : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 888c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8890: e24dd040 sub sp, sp, #64 ; 0x40 8894: e1a0a000 mov sl, r0 8898: e1a06001 mov r6, r1 889c: e58d2000 str r2, [sp] 88a0: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 88a4: e5935000 ldr r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; 88a8: e3a09001 mov r9, #1 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; 88ac: 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) ) { 88b0: ea000063 b 8a44 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); 88b4: e08a0007 add r0, sl, r7 88b8: e1a01006 mov r1, r6 88bc: e28d2004 add r2, sp, #4 88c0: e28d303c add r3, sp, #60 ; 0x3c 88c4: eb0001d7 bl 9028 pathnamelen -= len; i += len; if ( !pathloc->node_access ) 88c8: e594b000 ldr fp, [r4] 88cc: e35b0000 cmp fp, #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 ); 88d0: e1a09000 mov r9, r0 pathnamelen -= len; 88d4: e59d803c ldr r8, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 88d8: 0a000051 beq 8a24 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 88dc: e3500000 cmp r0, #0 88e0: 0a000006 beq 8900 if ( node->type == IMFS_DIRECTORY ) 88e4: e595104c ldr r1, [r5, #76] ; 0x4c 88e8: e3510001 cmp r1, #1 88ec: 1a000003 bne 8900 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 88f0: e1a00004 mov r0, r4 88f4: ebffffc4 bl 880c 88f8: e3500000 cmp r0, #0 88fc: 0a000077 beq 8ae0 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { 8900: 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; 8904: e0686006 rsb r6, r8, r6 i += len; 8908: e0877008 add r7, r7, r8 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; 890c: e1a0500b mov r5, fp switch( type ) { 8910: 0a000022 beq 89a0 8914: e3590004 cmp r9, #4 8918: 0a000046 beq 8a38 891c: e3590002 cmp r9, #2 8920: 1a000047 bne 8a44 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) 8924: e59f21d0 ldr r2, [pc, #464] ; 8afc 8928: e5923000 ldr r3, [r2] 892c: e5933018 ldr r3, [r3, #24] 8930: e15b0003 cmp fp, r3 8934: 0a000042 beq 8a44 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { 8938: e594c010 ldr ip, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == 893c: e59c301c ldr r3, [ip, #28] 8940: e15b0003 cmp fp, r3 8944: 1a00000f bne 8988 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8948: e28cc008 add ip, ip, #8 894c: e8bc000f ldm ip!, {r0, r1, r2, r3} 8950: e28de028 add lr, sp, #40 ; 0x28 8954: e8ae000f stmia lr!, {r0, r1, r2, r3} 8958: e59c5000 ldr r5, [ip] *pathloc = newloc; 895c: e28dc028 add ip, sp, #40 ; 0x28 8960: e8bc000f ldm ip!, {r0, r1, r2, r3} 8964: e1a0c004 mov ip, r4 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; 8968: e58e5000 str r5, [lr] *pathloc = newloc; 896c: e8ac000f stmia ip!, {r0, r1, r2, r3} 8970: e58c5000 str r5, [ip] return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), 8974: e0680007 rsb r0, r8, r7 8978: e594c00c ldr ip, [r4, #12] 897c: e08a0000 add r0, sl, r0 8980: e0881006 add r1, r8, r6 8984: ea000047 b 8aa8 pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) 8988: e59b5008 ldr r5, [fp, #8] 898c: e3550000 cmp r5, #0 8990: 1a000026 bne 8a30 rtems_set_errno_and_return_minus_one( ENOENT ); 8994: eb000cba bl bc84 <__errno> 8998: e5809000 str r9, [r0] 899c: ea000052 b 8aec case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { 89a0: e59b304c ldr r3, [fp, #76] ; 0x4c 89a4: e3530003 cmp r3, #3 89a8: 1a000006 bne 89c8 IMFS_evaluate_hard_link( pathloc, 0 ); 89ac: e1a00004 mov r0, r4 89b0: e3a01000 mov r1, #0 89b4: ebffff9c bl 882c node = pathloc->node_access; 89b8: e5945000 ldr r5, [r4] if ( !node ) 89bc: e3550000 cmp r5, #0 89c0: 1a000009 bne 89ec 89c4: ea00000b b 89f8 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { 89c8: e3530004 cmp r3, #4 89cc: 1a000006 bne 89ec result = IMFS_evaluate_sym_link( pathloc, 0 ); 89d0: e1a00004 mov r0, r4 89d4: e3a01000 mov r1, #0 89d8: eb000048 bl 8b00 node = pathloc->node_access; if ( result == -1 ) 89dc: 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 ); 89e0: e1a08000 mov r8, r0 node = pathloc->node_access; 89e4: e5945000 ldr r5, [r4] if ( result == -1 ) 89e8: 0a000040 beq 8af0 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 89ec: e595304c ldr r3, [r5, #76] ; 0x4c 89f0: e3530001 cmp r3, #1 89f4: 0a000002 beq 8a04 rtems_set_errno_and_return_minus_one( ENOTDIR ); 89f8: eb000ca1 bl bc84 <__errno> 89fc: e3a03014 mov r3, #20 8a00: ea000038 b 8ae8 /* * 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 ) { 8a04: e595e05c ldr lr, [r5, #92] ; 0x5c 8a08: e35e0000 cmp lr, #0 8a0c: 1a000015 bne 8a68 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8a10: e1a00005 mov r0, r5 8a14: e28d1004 add r1, sp, #4 8a18: eb00015e bl 8f98 if ( !node ) 8a1c: e2505000 subs r5, r0, #0 8a20: 1a000002 bne 8a30 rtems_set_errno_and_return_minus_one( ENOENT ); 8a24: eb000c96 bl bc84 <__errno> 8a28: e3a03002 mov r3, #2 8a2c: ea00002d b 8ae8 /* * Set the node access to the point we have found. */ pathloc->node_access = node; 8a30: e5845000 str r5, [r4] 8a34: ea000002 b 8a44 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8a38: eb000c91 bl bc84 <__errno> 8a3c: e3a0305b mov r3, #91 ; 0x5b 8a40: ea000028 b 8ae8 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { 8a44: e3590004 cmp r9, #4 8a48: 13590000 cmpne r9, #0 8a4c: 1affff98 bne 88b4 * 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 ) { 8a50: e595304c ldr r3, [r5, #76] ; 0x4c 8a54: e3530001 cmp r3, #1 8a58: 1a000018 bne 8ac0 if ( node->info.directory.mt_fs != NULL ) { 8a5c: e595e05c ldr lr, [r5, #92] ; 0x5c 8a60: e35e0000 cmp lr, #0 8a64: 0a000015 beq 8ac0 newloc = node->info.directory.mt_fs->mt_fs_root; 8a68: e28ee01c add lr, lr, #28 8a6c: e8be000f ldm lr!, {r0, r1, r2, r3} 8a70: e28dc028 add ip, sp, #40 ; 0x28 8a74: e8ac000f stmia ip!, {r0, r1, r2, r3} 8a78: e59ee000 ldr lr, [lr] 8a7c: e58ce000 str lr, [ip] *pathloc = newloc; 8a80: e28dc028 add ip, sp, #40 ; 0x28 8a84: e8bc000f ldm ip!, {r0, r1, r2, r3} 8a88: e1a0c004 mov ip, r4 8a8c: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8a90: 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; 8a94: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], 8a98: e0610007 rsb r0, r1, r7 8a9c: e594c00c ldr ip, [r4, #12] 8aa0: e08a0000 add r0, sl, r0 8aa4: e0861001 add r1, r6, r1 8aa8: e59d2000 ldr r2, [sp] 8aac: e1a03004 mov r3, r4 8ab0: e1a0e00f mov lr, pc 8ab4: e59cf000 ldr pc, [ip] 8ab8: e1a08000 mov r8, r0 8abc: ea00000b b 8af0 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8ac0: e1a00004 mov r0, r4 8ac4: ebffff33 bl 8798 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8ac8: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); 8acc: e1a08000 mov r8, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) 8ad0: e1a00004 mov r0, r4 8ad4: ebffff4c bl 880c 8ad8: e3500000 cmp r0, #0 8adc: 1a000003 bne 8af0 rtems_set_errno_and_return_minus_one( EACCES ); 8ae0: eb000c67 bl bc84 <__errno> 8ae4: e3a0300d mov r3, #13 8ae8: e5803000 str r3, [r0] 8aec: e3e08000 mvn r8, #0 return result; } 8af0: e1a00008 mov r0, r8 8af4: e28dd040 add sp, sp, #64 ; 0x40 8af8: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00008c64 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { 8c64: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 8c68: e24dd040 sub sp, sp, #64 ; 0x40 8c6c: e1a07000 mov r7, r0 8c70: e1a04001 mov r4, r1 8c74: e58d2000 str r2, [sp] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; 8c78: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); 8c7c: eb000ff0 bl cc44 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; 8c80: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); 8c84: 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 ); 8c88: e1a01008 mov r1, r8 8c8c: e0870005 add r0, r7, r5 8c90: e28d2004 add r2, sp, #4 8c94: e28d303c add r3, sp, #60 ; 0x3c 8c98: eb0000e2 bl 9028 pathlen -= len; i += len; if ( !pathloc->node_access ) 8c9c: e5949000 ldr r9, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; 8ca0: e59da03c ldr sl, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) 8ca4: e3590000 cmp r9, #0 * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); 8ca8: e1a0b000 mov fp, r0 pathlen -= len; 8cac: e06a8008 rsb r8, sl, r8 i += len; if ( !pathloc->node_access ) 8cb0: 0a00006c beq 8e68 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) 8cb4: e3500000 cmp r0, #0 8cb8: 0a000006 beq 8cd8 if ( node->type == IMFS_DIRECTORY ) 8cbc: e596104c ldr r1, [r6, #76] ; 0x4c 8cc0: e3510001 cmp r1, #1 8cc4: 1a000003 bne 8cd8 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) 8cc8: e1a00004 mov r0, r4 8ccc: ebfffece bl 880c 8cd0: e3500000 cmp r0, #0 8cd4: 0a000078 beq 8ebc while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; 8cd8: e085500a add r5, r5, sl 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; 8cdc: e1a06009 mov r6, r9 switch( type ) { 8ce0: e35b0004 cmp fp, #4 8ce4: 979ff10b ldrls pc, [pc, fp, lsl #2] 8ce8: eaffffe6 b 8c88 <== NOT EXECUTED 8cec: 00008e28 .word 0x00008e28 <== NOT EXECUTED 8cf0: 00008c88 .word 0x00008c88 <== NOT EXECUTED 8cf4: 00008d00 .word 0x00008d00 <== NOT EXECUTED 8cf8: 00008d6c .word 0x00008d6c <== NOT EXECUTED 8cfc: 00008e34 .word 0x00008e34 <== 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 ) 8d00: e59f21d0 ldr r2, [pc, #464] ; 8ed8 8d04: e5923000 ldr r3, [r2] 8d08: e5933018 ldr r3, [r3, #24] 8d0c: e1590003 cmp r9, r3 8d10: 0affffdc beq 8c88 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ 8d14: e594e010 ldr lr, [r4, #16] 8d18: e59e301c ldr r3, [lr, #28] 8d1c: e1590003 cmp r9, r3 8d20: 1a00000d bne 8d5c if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; 8d24: e28ee008 add lr, lr, #8 8d28: e8be000f ldm lr!, {r0, r1, r2, r3} 8d2c: e28dc028 add ip, sp, #40 ; 0x28 8d30: e8ac000f stmia ip!, {r0, r1, r2, r3} 8d34: e59ee000 ldr lr, [lr] 8d38: e58ce000 str lr, [ip] *pathloc = newloc; 8d3c: e28dc028 add ip, sp, #40 ; 0x28 8d40: e8bc000f ldm ip!, {r0, r1, r2, r3} 8d44: e1a0c004 mov ip, r4 8d48: e8ac000f stmia ip!, {r0, r1, r2, r3} 8d4c: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8d50: e06a5005 rsb r5, sl, r5 8d54: e594300c ldr r3, [r4, #12] 8d58: ea000025 b 8df4 } } else { if ( !node->Parent ) 8d5c: e5996008 ldr r6, [r9, #8] 8d60: e3560000 cmp r6, #0 8d64: 1a00002d bne 8e20 8d68: ea00003e b 8e68 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { 8d6c: e599304c ldr r3, [r9, #76] ; 0x4c 8d70: e3530003 cmp r3, #3 8d74: 0a000001 beq 8d80 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { 8d78: e3530004 cmp r3, #4 8d7c: 1a000005 bne 8d98 result = IMFS_evaluate_link( pathloc, 0 ); 8d80: e1a00004 mov r0, r4 8d84: e3a01000 mov r1, #0 8d88: ebffff88 bl 8bb0 if ( result == -1 ) 8d8c: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); 8d90: e1a06000 mov r6, r0 if ( result == -1 ) 8d94: 0a00004c beq 8ecc return -1; } node = pathloc->node_access; 8d98: e5940000 ldr r0, [r4] if ( !node ) 8d9c: e3500000 cmp r0, #0 8da0: 0a00003d beq 8e9c /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) 8da4: e590304c ldr r3, [r0, #76] ; 0x4c 8da8: e3530001 cmp r3, #1 8dac: 1a00003a bne 8e9c /* * 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 ) { 8db0: e590e05c ldr lr, [r0, #92] ; 0x5c 8db4: e35e0000 cmp lr, #0 8db8: 0a000014 beq 8e10 newloc = node->info.directory.mt_fs->mt_fs_root; 8dbc: e28ee01c add lr, lr, #28 8dc0: e8be000f ldm lr!, {r0, r1, r2, r3} 8dc4: e28dc028 add ip, sp, #40 ; 0x28 8dc8: e8ac000f stmia ip!, {r0, r1, r2, r3} 8dcc: e59ee000 ldr lr, [lr] 8dd0: e58ce000 str lr, [ip] *pathloc = newloc; 8dd4: e28dc028 add ip, sp, #40 ; 0x28 8dd8: e8bc000f ldm ip!, {r0, r1, r2, r3} 8ddc: e1a0c004 mov ip, r4 8de0: e8ac000f stmia ip!, {r0, r1, r2, r3} 8de4: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); 8de8: e59d203c ldr r2, [sp, #60] ; 0x3c 8dec: e594300c ldr r3, [r4, #12] 8df0: e0625005 rsb r5, r2, r5 8df4: e0870005 add r0, r7, r5 8df8: e1a01004 mov r1, r4 8dfc: e59d2000 ldr r2, [sp] 8e00: e1a0e00f mov lr, pc 8e04: e593f004 ldr pc, [r3, #4] 8e08: e1a06000 mov r6, r0 8e0c: ea00002e b 8ecc /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); 8e10: e28d1004 add r1, sp, #4 8e14: eb00005f bl 8f98 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) 8e18: e2506000 subs r6, r0, #0 8e1c: 0a000007 beq 8e40 done = true; else pathloc->node_access = node; 8e20: e5846000 str r6, [r4] 8e24: eaffff97 b 8c88 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); 8e28: eb000b95 bl bc84 <__errno> 8e2c: e3a03011 mov r3, #17 8e30: ea000023 b 8ec4 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); 8e34: eb000b92 bl bc84 <__errno> 8e38: e3a0305b mov r3, #91 ; 0x5b 8e3c: ea000020 b 8ec4 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; 8e40: e59d303c ldr r3, [sp, #60] ; 0x3c 8e44: e59d2000 ldr r2, [sp] 8e48: e0633005 rsb r3, r3, r5 8e4c: e0873003 add r3, r7, r3 8e50: e5823000 str r3, [r2] * 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( 8e54: 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++) { 8e58: ea000005 b 8e74 if ( !IMFS_is_separator( path[ i ] ) ) 8e5c: ebffe72f bl 2b20 8e60: e3500000 cmp r0, #0 8e64: 1a000002 bne 8e74 rtems_set_errno_and_return_minus_one( ENOENT ); 8e68: eb000b85 bl bc84 <__errno> 8e6c: e3a03002 mov r3, #2 8e70: ea000013 b 8ec4 /* * 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++) { 8e74: e4d50001 ldrb r0, [r5], #1 8e78: e3500000 cmp r0, #0 8e7c: 1afffff6 bne 8e5c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8e80: e1a00004 mov r0, r4 8e84: ebfffe43 bl 8798 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 8e88: e5943000 ldr r3, [r4] 8e8c: e593304c ldr r3, [r3, #76] ; 0x4c 8e90: e3530001 cmp r3, #1 /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); 8e94: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) 8e98: 0a000002 beq 8ea8 rtems_set_errno_and_return_minus_one( ENOTDIR ); 8e9c: eb000b78 bl bc84 <__errno> 8ea0: e3a03014 mov r3, #20 8ea4: ea000006 b 8ec4 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) 8ea8: e1a00004 mov r0, r4 8eac: e3a01003 mov r1, #3 8eb0: ebfffe55 bl 880c 8eb4: e3500000 cmp r0, #0 8eb8: 1a000003 bne 8ecc rtems_set_errno_and_return_minus_one( EACCES ); 8ebc: eb000b70 bl bc84 <__errno> 8ec0: e3a0300d mov r3, #13 8ec4: e5803000 str r3, [r0] 8ec8: e3e06000 mvn r6, #0 return result; } 8ecc: e1a00006 mov r0, r6 8ed0: e28dd040 add sp, sp, #64 ; 0x40 8ed4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000882c : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; 882c: e5903000 ldr r3, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) 8830: e593204c ldr r2, [r3, #76] ; 0x4c 8834: e3520003 cmp r2, #3 int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8838: e92d4030 push {r4, r5, lr} 883c: e1a04000 mov r4, r0 8840: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8844: 159f003c ldrne r0, [pc, #60] ; 8888 8848: 1bfff33f blne 554c /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; 884c: e5933050 ldr r3, [r3, #80] ; 0x50 8850: e5803000 str r3, [r0] IMFS_Set_handlers( node ); 8854: ebffffcf bl 8798 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8858: e1a00004 mov r0, r4 885c: e1a01005 mov r1, r5 8860: ebffffe9 bl 880c 8864: e3500000 cmp r0, #0 8868: 1a000004 bne 8880 rtems_set_errno_and_return_minus_one( EACCES ); 886c: eb000d04 bl bc84 <__errno> <== NOT EXECUTED 8870: e3a0300d mov r3, #13 <== NOT EXECUTED 8874: e5803000 str r3, [r0] <== NOT EXECUTED 8878: e3e00000 mvn r0, #0 <== NOT EXECUTED 887c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return result; 8880: e3a00000 mov r0, #0 } 8884: e8bd8030 pop {r4, r5, pc} =============================================================================== 00008b00 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8b00: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; 8b04: e5906000 ldr r6, [r0] /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8b08: e596304c ldr r3, [r6, #76] ; 0x4c 8b0c: e3530004 cmp r3, #4 int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { 8b10: e1a04000 mov r4, r0 8b14: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) rtems_fatal_error_occurred (0xABCD0000); 8b18: 159f0088 ldrne r0, [pc, #136] ; 8ba8 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) 8b1c: 1a000003 bne 8b30 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) 8b20: e5963008 ldr r3, [r6, #8] 8b24: e3530000 cmp r3, #0 8b28: 1a000001 bne 8b34 rtems_fatal_error_occurred( 0xBAD00000 ); 8b2c: e59f0078 ldr r0, [pc, #120] ; 8bac <== NOT EXECUTED 8b30: ebfff285 bl 554c <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( 8b34: e5960050 ldr r0, [r6, #80] ; 0x50 8b38: e1a0100d mov r1, sp 8b3c: 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; 8b40: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( 8b44: eb000352 bl 9894 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( 8b48: e59d3000 ldr r3, [sp] 8b4c: e5966050 ldr r6, [r6, #80] ; 0x50 8b50: e0866003 add r6, r6, r3 8b54: e1a00006 mov r0, r6 8b58: eb001039 bl cc44 8b5c: e1a02005 mov r2, r5 8b60: e1a01000 mov r1, r0 8b64: e1a03004 mov r3, r4 8b68: e1a00006 mov r0, r6 8b6c: ebffff46 bl 888c 8b70: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); 8b74: e1a00004 mov r0, r4 8b78: ebffff06 bl 8798 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) 8b7c: e1a00004 mov r0, r4 8b80: e1a01005 mov r1, r5 8b84: ebffff20 bl 880c 8b88: e3500000 cmp r0, #0 8b8c: 1a000003 bne 8ba0 rtems_set_errno_and_return_minus_one( EACCES ); 8b90: eb000c3b bl bc84 <__errno> <== NOT EXECUTED 8b94: e3a0300d mov r3, #13 <== NOT EXECUTED 8b98: e5803000 str r3, [r0] <== NOT EXECUTED 8b9c: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } 8ba0: e1a00006 mov r0, r6 8ba4: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== 00002100 : } int IMFS_fifo_close( rtems_libio_t *iop ) { 2100: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; 2104: e5905018 ldr r5, [r0, #24] } int IMFS_fifo_close( rtems_libio_t *iop ) { 2108: e1a04000 mov r4, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); 210c: e1a01004 mov r1, r4 2110: e2850050 add r0, r5, #80 ; 0x50 2114: eb002228 bl a9bc if (err == 0) { 2118: e2506000 subs r6, r0, #0 211c: 1a000005 bne 2138 iop->flags &= ~LIBIO_FLAGS_OPEN; 2120: e5943014 ldr r3, [r4, #20] 2124: e3c33c01 bic r3, r3, #256 ; 0x100 2128: e5843014 str r3, [r4, #20] IMFS_check_node_remove(jnode); 212c: e1a00005 mov r0, r5 2130: eb000182 bl 2740 2134: ea000004 b 214c } IMFS_FIFO_RETURN(err); 2138: aa000003 bge 214c <== NOT EXECUTED 213c: eb002c34 bl d214 <__errno> <== NOT EXECUTED 2140: e2666000 rsb r6, r6, #0 <== NOT EXECUTED 2144: e5806000 str r6, [r0] <== NOT EXECUTED 2148: e3e06000 mvn r6, #0 <== NOT EXECUTED } 214c: e1a00006 mov r0, r6 2150: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00008edc : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 8edc: 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; 8ee0: e1a0c000 mov ip, r0 8ee4: e5bc401c ldr r4, [ip, #28]! ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { 8ee8: e1a05000 mov r5, r0 8eec: e24dd014 sub sp, sp, #20 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; 8ef0: e8bc000f ldm ip!, {r0, r1, r2, r3} 8ef4: e1a0e00d mov lr, sp 8ef8: e8ae000f stmia lr!, {r0, r1, r2, r3} 8efc: e59c3000 ldr r3, [ip] 8f00: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; 8f04: e3a03000 mov r3, #0 8f08: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); 8f0c: e1a0500d mov r5, sp 8f10: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; 8f14: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; 8f18: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); 8f1c: ebfffe1d bl 8798 if ( jnode->type != IMFS_DIRECTORY ) { 8f20: e594304c ldr r3, [r4, #76] ; 0x4c 8f24: e3530001 cmp r3, #1 8f28: 1a000003 bne 8f3c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { 8f2c: e5942050 ldr r2, [r4, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 8f30: e2843054 add r3, r4, #84 ; 0x54 8f34: e1520003 cmp r2, r3 8f38: 1a000005 bne 8f54 result = IMFS_unlink( NULL, &loc ); 8f3c: e3a00000 mov r0, #0 8f40: e1a0100d mov r1, sp 8f44: ebffe235 bl 1820 if (result != 0) 8f48: e3500000 cmp r0, #0 8f4c: 1a00000c bne 8f84 return -1; jnode = next; 8f50: e1a04006 mov r4, r6 } if ( jnode != NULL ) { 8f54: e3540000 cmp r4, #0 8f58: 0a00000b beq 8f8c if ( jnode->type == IMFS_DIRECTORY ) { 8f5c: e594304c ldr r3, [r4, #76] ; 0x4c 8f60: e3530001 cmp r3, #1 8f64: 1affffe9 bne 8f10 if ( jnode_has_children( jnode ) ) 8f68: e5943050 ldr r3, [r4, #80] ; 0x50 8f6c: e2842054 add r2, r4, #84 ; 0x54 8f70: e1530002 cmp r3, r2 8f74: 0affffe5 beq 8f10 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); 8f78: e2534000 subs r4, r3, #0 8f7c: 1affffe3 bne 8f10 8f80: ea000001 b 8f8c <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; 8f84: e3e00000 mvn r0, #0 <== NOT EXECUTED 8f88: ea000000 b 8f90 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; 8f8c: e1a00004 mov r0, r4 } 8f90: e28dd014 add sp, sp, #20 8f94: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000143c : 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 ) { 143c: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} 1440: 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, 1444: e59f30cc ldr r3, [pc, #204] ; 1518 1448: 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 ) { 144c: e1a0a001 mov sl, r1 1450: e1a08002 mov r8, r2 1454: 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, 1458: 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) { 145c: e3a02010 mov r2, #16 1460: e1520003 cmp r2, r3 1464: 0a000003 beq 1478 1468: e2511001 subs r1, r1, #1 146c: e1a02082 lsl r2, r2, #1 1470: 1afffffa bne 1460 is_valid = true; } } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); 1474: 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) 1478: e59f609c ldr r6, [pc, #156] ; 151c 147c: 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(); 1480: eb001cb4 bl 8758 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; 1484: e59fe094 ldr lr, [pc, #148] ; 1520 /* * 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(); 1488: e584001c str r0, [r4, #28] 148c: 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; 1490: e8be000f ldm lr!, {r0, r1, r2, r3} 1494: e284c038 add ip, r4, #56 ; 0x38 1498: e8ac000f stmia ip!, {r0, r1, r2, r3} 149c: e8be000f ldm lr!, {r0, r1, r2, r3} 14a0: e8ac000f stmia ip!, {r0, r1, r2, r3} 14a4: 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; 14a8: 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; 14ac: 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; 14b0: 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 ) ); 14b4: e3a00001 mov r0, #1 14b8: e3a01014 mov r1, #20 14bc: eb0001a1 bl 1b48 if ( !fs_info ) { 14c0: e3500000 cmp r0, #0 14c4: 1a000006 bne 14e4 free(temp_mt_entry->mt_fs_root.node_access); 14c8: e1a00005 mov r0, r5 <== NOT EXECUTED 14cc: eb000218 bl 1d34 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 14d0: eb0029eb bl bc84 <__errno> <== NOT EXECUTED 14d4: e3a0300c mov r3, #12 <== NOT EXECUTED 14d8: e5803000 str r3, [r0] <== NOT EXECUTED 14dc: e3e00000 mvn r0, #0 <== NOT EXECUTED 14e0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 14e4: 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; 14e8: 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; 14ec: e59d201c ldr r2, [sp, #28] /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; 14f0: e5803000 str r3, [r0] 14f4: e2833001 add r3, r3, #1 14f8: e5863004 str r3, [r6, #4] fs_info->ino_count = 1; 14fc: e3a03001 mov r3, #1 1500: e9800108 stmib r0, {r3, r8} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; 1504: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; 1508: e5802010 str r2, [r0, #16] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; 150c: e5853038 str r3, [r5, #56] ; 0x38 return 0; 1510: e3a00000 mov r0, #0 } 1514: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00001524 : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { 1524: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1528: 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 */ ) { 152c: e24dd048 sub sp, sp, #72 ; 0x48 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; 1530: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) 1534: e1d333b4 ldrh r3, [r3, #52] ; 0x34 1538: 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 */ ) { 153c: e1a05001 mov r5, r1 1540: 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 ) 1544: 9a000002 bls 1554 rtems_set_errno_and_return_minus_one( EMLINK ); 1548: eb0029cd bl bc84 <__errno> 154c: e3a0301f mov r3, #31 1550: ea000012 b 15a0 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); 1554: e1a00002 mov r0, r2 1558: eb002db9 bl cc44 155c: e28d4004 add r4, sp, #4 1560: e1a01000 mov r1, r0 1564: e1a02004 mov r2, r4 1568: e28d3044 add r3, sp, #68 ; 0x44 156c: e1a00006 mov r0, r6 1570: eb001eac bl 9028 new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 1574: 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( 1578: e58d3000 str r3, [sp] 157c: e1a00005 mov r0, r5 1580: e3a01003 mov r1, #3 1584: e1a02004 mov r2, r4 1588: e59f3050 ldr r3, [pc, #80] ; 15e0 158c: eb001c23 bl 8620 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) 1590: e3500000 cmp r0, #0 1594: 1a000004 bne 15ac rtems_set_errno_and_return_minus_one( ENOMEM ); 1598: eb0029b9 bl bc84 <__errno> <== NOT EXECUTED 159c: e3a0300c mov r3, #12 <== NOT EXECUTED 15a0: e5803000 str r3, [r0] 15a4: e3e00000 mvn r0, #0 15a8: ea00000a b 15d8 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; 15ac: e59d3028 ldr r3, [sp, #40] ; 0x28 15b0: e1d323b4 ldrh r2, [r3, #52] ; 0x34 15b4: e2822001 add r2, r2, #1 15b8: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); 15bc: e28d003c add r0, sp, #60 ; 0x3c 15c0: e3a01000 mov r1, #0 15c4: eb000203 bl 1dd8 15c8: e59d203c ldr r2, [sp, #60] ; 0x3c 15cc: e59d3028 ldr r3, [sp, #40] ; 0x28 15d0: e5832048 str r2, [r3, #72] ; 0x48 return 0; 15d4: e3a00000 mov r0, #0 } 15d8: e28dd048 add sp, sp, #72 ; 0x48 15dc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 0000ada8 : #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) ada8: e59f3110 ldr r3, [pc, #272] ; aec0 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { adac: 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 ) adb0: e593b000 ldr fp, [r3] adb4: e1a0312b lsr r3, fp, #2 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { adb8: 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 ) adbc: e2832001 add r2, r3, #1 adc0: e0020293 mul r2, r3, r2 adc4: e2822001 add r2, r2, #1 adc8: e0030392 mul r3, r2, r3 adcc: e3a02000 mov r2, #0 add0: e2433001 sub r3, r3, #1 add4: e1520005 cmp r2, r5 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { add8: e1a04000 mov r4, r0 addc: 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 ) ade0: e003039b mul r3, fp, r3 ade4: ca000005 bgt ae00 ade8: 1a000001 bne adf4 adec: e1530001 cmp r3, r1 adf0: 8a000002 bhi ae00 rtems_set_errno_and_return_minus_one( EINVAL ); adf4: eb0003a2 bl bc84 <__errno> adf8: e3a03016 mov r3, #22 adfc: ea000025 b ae98 if ( new_length <= the_jnode->info.file.size ) ae00: e5948054 ldr r8, [r4, #84] ; 0x54 ae04: e1550008 cmp r5, r8 ae08: e5947050 ldr r7, [r4, #80] ; 0x50 ae0c: ca000002 bgt ae1c ae10: 1a000028 bne aeb8 ae14: e1560007 cmp r6, r7 ae18: 9a000026 bls aeb8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ae1c: e1a0cfcb asr ip, fp, #31 ae20: e1a0300c mov r3, ip ae24: e1a0200b mov r2, fp ae28: e1a00006 mov r0, r6 ae2c: e1a01005 mov r1, r5 ae30: e58dc000 str ip, [sp] ae34: eb00120d bl f670 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ae38: e59dc000 ldr ip, [sp] ae3c: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; ae40: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; ae44: e1a0200b mov r2, fp ae48: e1a00007 mov r0, r7 ae4c: e1a0300c mov r3, ip ae50: eb001206 bl f670 <__divdi3> ae54: e1a08000 mov r8, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { ae58: e1a07000 mov r7, r0 ae5c: ea000011 b aea8 if ( IMFS_memfile_addblock( the_jnode, block ) ) { ae60: e1a00004 mov r0, r4 ae64: e1a01007 mov r1, r7 ae68: ebffff56 bl abc8 ae6c: e3500000 cmp r0, #0 ae70: 0a00000b beq aea4 ae74: ea000003 b ae88 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); ae78: e1a01007 mov r1, r7 <== NOT EXECUTED ae7c: e1a00004 mov r0, r4 <== NOT EXECUTED ae80: ebffffbe bl ad80 <== 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-- ) { ae84: e2477001 sub r7, r7, #1 <== NOT EXECUTED ae88: e1570008 cmp r7, r8 <== NOT EXECUTED ae8c: 2afffff9 bcs ae78 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); ae90: eb00037b bl bc84 <__errno> <== NOT EXECUTED ae94: e3a0301c mov r3, #28 <== NOT EXECUTED ae98: e5803000 str r3, [r0] ae9c: e3e00000 mvn r0, #0 aea0: ea000005 b aebc /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { aea4: e2877001 add r7, r7, #1 aea8: e157000a cmp r7, sl aeac: 9affffeb bls ae60 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; aeb0: e5846050 str r6, [r4, #80] ; 0x50 aeb4: 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; aeb8: e3a00000 mov r0, #0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } aebc: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== 0000a7c0 : /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a7c0: e59f31dc ldr r3, [pc, #476] ; a9a4 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a7c4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a7c8: e5935000 ldr r5, [r3] a7cc: e1a05125 lsr r5, r5, #2 a7d0: e2453001 sub r3, r5, #1 a7d4: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a7d8: e1a04000 mov r4, r0 a7dc: e1a06001 mov r6, r1 a7e0: e1a08002 mov r8, r2 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a7e4: 8a00000e bhi a824 p = info->indirect; if ( malloc_it ) { a7e8: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a7ec: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a7f0: 0a000007 beq a814 if ( !p ) { a7f4: e3500000 cmp r0, #0 a7f8: 1a000003 bne a80c p = memfile_alloc_block(); a7fc: ebffffe2 bl a78c if ( !p ) a800: e3500000 cmp r0, #0 a804: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->indirect = p; a808: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; a80c: e5940058 ldr r0, [r4, #88] ; 0x58 a810: ea000001 b a81c } if ( !p ) a814: e3500000 cmp r0, #0 a818: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; return &info->indirect[ my_block ]; a81c: e0800106 add r0, r0, r6, lsl #2 a820: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a824: e2853001 add r3, r5, #1 a828: e0030395 mul r3, r5, r3 a82c: e2432001 sub r2, r3, #1 a830: e1510002 cmp r1, r2 a834: 8a000021 bhi a8c0 #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; a838: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a83c: e1a00006 mov r0, r6 a840: e1a01005 mov r1, r5 a844: eb001355 bl f5a0 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a848: e1a01005 mov r1, r5 fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a84c: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a850: e1a00006 mov r0, r6 a854: eb0012b9 bl f340 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a858: e3580000 cmp r8, #0 #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a85c: e1a05000 mov r5, r0 p = info->doubly_indirect; a860: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { a864: 0a00000e beq a8a4 if ( !p ) { a868: e3500000 cmp r0, #0 a86c: 1a000003 bne a880 p = memfile_alloc_block(); a870: ebffffc5 bl a78c if ( !p ) a874: e3500000 cmp r0, #0 a878: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->doubly_indirect = p; a87c: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; a880: e0804105 add r4, r0, r5, lsl #2 a884: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { a888: e3500000 cmp r0, #0 a88c: 1a000009 bne a8b8 p1 = memfile_alloc_block(); a890: ebffffbd bl a78c if ( !p1 ) a894: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a898: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) a89c: 1a000005 bne a8b8 a8a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a8a4: e3500000 cmp r0, #0 a8a8: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p = (block_p *)p[ doubly ]; a8ac: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) a8b0: e3500000 cmp r0, #0 a8b4: 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 ]; a8b8: e0800107 add r0, r0, r7, lsl #2 a8bc: 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 ) { a8c0: e2832001 add r2, r3, #1 a8c4: e0020295 mul r2, r5, r2 a8c8: e2422001 sub r2, r2, #1 a8cc: e1510002 cmp r1, r2 a8d0: 8a000031 bhi a99c my_block -= FIRST_TRIPLY_INDIRECT; a8d4: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a8d8: e1a00006 mov r0, r6 a8dc: e1a01005 mov r1, r5 a8e0: eb00132e bl f5a0 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a8e4: e1a01005 mov r1, r5 */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a8e8: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a8ec: e1a00006 mov r0, r6 a8f0: eb001292 bl f340 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a8f4: 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; a8f8: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a8fc: eb00128f bl f340 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a900: 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; a904: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a908: e1a00006 mov r0, r6 a90c: eb001323 bl f5a0 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a910: 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; a914: e1a05000 mov r5, r0 p = info->triply_indirect; a918: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a91c: 0a000016 beq a97c if ( !p ) { a920: e3500000 cmp r0, #0 a924: 1a000003 bne a938 p = memfile_alloc_block(); a928: ebffff97 bl a78c if ( !p ) a92c: e3500000 cmp r0, #0 a930: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; info->triply_indirect = p; a934: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; a938: e0804107 add r4, r0, r7, lsl #2 a93c: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { a940: e3500000 cmp r0, #0 a944: 1a000003 bne a958 p1 = memfile_alloc_block(); a948: ebffff8f bl a78c if ( !p1 ) a94c: e3500000 cmp r0, #0 a950: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} return 0; p[ triply ] = (block_p) p1; a954: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; a958: e0804105 add r4, r0, r5, lsl #2 a95c: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { a960: e3500000 cmp r0, #0 a964: 1a00000a bne a994 p2 = memfile_alloc_block(); a968: ebffff87 bl a78c if ( !p2 ) a96c: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a970: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) a974: 1a000006 bne a994 a978: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a97c: e3500000 cmp r0, #0 a980: 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 ]; a984: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a988: e3500000 cmp r0, #0 a98c: 08bd85f0 popeq {r4, r5, r6, r7, r8, sl, pc} p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; a990: e7900105 ldr r0, [r0, r5, lsl #2] a994: e080010a add r0, r0, sl, lsl #2 a998: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * This means the requested block number is out of range. */ return 0; a99c: e3a00000 mov r0, #0 <== NOT EXECUTED } a9a0: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 0000a9a8 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a9a8: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Error checks on arguments */ if ( !dest ) a9ac: e2537000 subs r7, r3, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a9b0: e1a04000 mov r4, r0 a9b4: e1a08001 mov r8, r1 a9b8: e1a09002 mov r9, r2 a9bc: e59d6034 ldr r6, [sp, #52] ; 0x34 /* * Error checks on arguments */ if ( !dest ) a9c0: 0a000001 beq a9cc /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) a9c4: e3560000 cmp r6, #0 a9c8: 1a000004 bne a9e0 rtems_set_errno_and_return_minus_one( EINVAL ); a9cc: eb0004ac bl bc84 <__errno> <== NOT EXECUTED a9d0: e3a03016 mov r3, #22 <== NOT EXECUTED a9d4: e5803000 str r3, [r0] <== NOT EXECUTED a9d8: e3e06000 mvn r6, #0 <== NOT EXECUTED a9dc: ea00006b b ab90 <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { a9e0: e590304c ldr r3, [r0, #76] ; 0x4c a9e4: e3530006 cmp r3, #6 a9e8: 1a000012 bne aa38 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) a9ec: e280b050 add fp, r0, #80 ; 0x50 a9f0: e89b0c00 ldm fp, {sl, fp} a9f4: e1a0200a mov r2, sl a9f8: 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; a9fc: e5901058 ldr r1, [r0, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) aa00: e0522008 subs r2, r2, r8 aa04: e0c33009 sbc r3, r3, r9 aa08: e3a00000 mov r0, #0 aa0c: e1500003 cmp r0, r3 aa10: ca000002 bgt aa20 aa14: 1a000002 bne aa24 aa18: e1560002 cmp r6, r2 aa1c: 9a000000 bls aa24 my_length = the_jnode->info.linearfile.size - start; aa20: e068600a rsb r6, r8, sl memcpy(dest, &file_ptr[start], my_length); aa24: e1a00007 mov r0, r7 aa28: e0811008 add r1, r1, r8 aa2c: e1a02006 mov r2, r6 aa30: eb0006c1 bl c53c aa34: ea000050 b ab7c /* * 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; aa38: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) aa3c: e5901054 ldr r1, [r0, #84] ; 0x54 aa40: e5905050 ldr r5, [r0, #80] ; 0x50 aa44: e3a00000 mov r0, #0 aa48: 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; aa4c: e0862008 add r2, r6, r8 if ( last_byte > the_jnode->info.file.size ) aa50: ca000002 bgt aa60 aa54: 1a000003 bne aa68 aa58: e1520005 cmp r2, r5 aa5c: 9a000001 bls aa68 my_length = the_jnode->info.file.size - start; aa60: e0635005 rsb r5, r3, r5 aa64: ea000000 b aa6c * 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 ) aa68: e1a05006 mov r5, r6 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; aa6c: e59f3128 ldr r3, [pc, #296] ; ab9c aa70: e593b000 ldr fp, [r3] aa74: e1a00008 mov r0, r8 aa78: e1a0200b mov r2, fp aa7c: e1a03fc2 asr r3, r2, #31 aa80: e1a01009 mov r1, r9 aa84: e88d000c stm sp, {r2, r3} aa88: eb001432 bl fb58 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; aa8c: e1a01009 mov r1, r9 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; aa90: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; aa94: e89d000c ldm sp, {r2, r3} aa98: e1a00008 mov r0, r8 aa9c: eb0012f3 bl f670 <__divdi3> if ( start_offset ) { aaa0: 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; aaa4: e1a08000 mov r8, r0 if ( start_offset ) { aaa8: 0a000012 beq aaf8 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 ); aaac: e1a00004 mov r0, r4 aab0: e1a01008 mov r1, r8 aab4: e3a02000 mov r2, #0 aab8: ebffff40 bl a7c0 if ( !block_ptr ) aabc: e3500000 cmp r0, #0 return copied; aac0: 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 ) aac4: 0a000031 beq ab90 return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); aac8: 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; aacc: e066a00b rsb sl, r6, fp aad0: e155000a cmp r5, sl aad4: 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 ); aad8: e1a00007 mov r0, r7 aadc: e0811006 add r1, r1, r6 aae0: e1a0200a mov r2, sl aae4: eb000694 bl c53c dest += to_copy; aae8: e087700a add r7, r7, sl block++; aaec: e2888001 add r8, r8, #1 my_length -= to_copy; aaf0: e06a5005 rsb r5, sl, r5 copied += to_copy; aaf4: e1a0600a mov r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; aaf8: e59f909c ldr r9, [pc, #156] ; ab9c aafc: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { ab00: ea00000d b ab3c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ab04: e1a00004 mov r0, r4 ab08: e1a01008 mov r1, r8 ab0c: e3a02000 mov r2, #0 ab10: ebffff2a bl a7c0 if ( !block_ptr ) ab14: e2503000 subs r3, r0, #0 ab18: 0a00001c beq ab90 return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); ab1c: e1a00007 mov r0, r7 ab20: e5931000 ldr r1, [r3] ab24: e1a0200a mov r2, sl ab28: eb000683 bl c53c dest += to_copy; ab2c: e087700a add r7, r7, sl block++; ab30: e2888001 add r8, r8, #1 my_length -= to_copy; ab34: e06a5005 rsb r5, sl, r5 copied += to_copy; ab38: 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 ) { ab3c: e5993000 ldr r3, [r9] ab40: e1550003 cmp r5, r3 ab44: 2affffee bcs ab04 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif if ( my_length ) { ab48: e3550000 cmp r5, #0 ab4c: 0a00000a beq ab7c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); ab50: e1a00004 mov r0, r4 ab54: e1a01008 mov r1, r8 ab58: e3a02000 mov r2, #0 ab5c: ebffff17 bl a7c0 if ( !block_ptr ) ab60: e2503000 subs r3, r0, #0 ab64: 0a000009 beq ab90 return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); ab68: e1a00007 mov r0, r7 ab6c: e5931000 ldr r1, [r3] ab70: e1a02005 mov r2, r5 ab74: eb000670 bl c53c copied += my_length; ab78: e0856006 add r6, r5, r6 } IMFS_update_atime( the_jnode ); ab7c: e28d0008 add r0, sp, #8 ab80: e3a01000 mov r1, #0 ab84: ebffdc93 bl 1dd8 ab88: e59d3008 ldr r3, [sp, #8] ab8c: e5843040 str r3, [r4, #64] ; 0x40 return copied; } ab90: e1a00006 mov r0, r6 ab94: e28dd010 add sp, sp, #16 ab98: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000ac74 : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ac74: 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; ac78: e59f30fc ldr r3, [pc, #252] ; ad7c ac7c: e5935000 ldr r5, [r3] * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { ac80: e5903058 ldr r3, [r0, #88] ; 0x58 ac84: e3530000 cmp r3, #0 */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { ac88: 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; ac8c: e1a05125 lsr r5, r5, #2 */ info = &the_jnode->info.file; if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); ac90: 12800058 addne r0, r0, #88 ; 0x58 ac94: 11a01005 movne r1, r5 ac98: 1bffffe0 blne ac20 } if ( info->doubly_indirect ) { ac9c: e594305c ldr r3, [r4, #92] ; 0x5c aca0: e3530000 cmp r3, #0 aca4: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { acac: 1a000008 bne acd4 acb0: ea00000d b acec for ( i=0 ; idoubly_indirect[i] ) { acb4: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED acb8: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED acbc: e3520000 cmp r2, #0 <== NOT EXECUTED acc0: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED memfile_free_blocks_in_table( acc4: 10830000 addne r0, r3, r0 <== NOT EXECUTED acc8: 11a01005 movne r1, r5 <== NOT EXECUTED accc: 1bffffd3 blne ac20 <== 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 ); ace0: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED ace4: e1a01005 mov r1, r5 <== NOT EXECUTED ace8: ebffffcc bl ac20 <== NOT EXECUTED } if ( info->triply_indirect ) { acec: e5943060 ldr r3, [r4, #96] ; 0x60 acf0: e3530000 cmp r3, #0 acf4: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { acfc: 1a000016 bne ad5c ad00: ea00001b b ad74 for ( i=0 ; itriply_indirect[i]; ad04: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED ad08: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ ad0c: e3580000 cmp r8, #0 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { ad10: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ ad14: 0a000013 beq ad68 <== NOT EXECUTED * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( ad18: e2488004 sub r8, r8, #4 <== NOT EXECUTED ad1c: e3a07000 mov r7, #0 <== NOT EXECUTED ad20: ea000005 b ad3c <== 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( ad48: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED ad4c: e1a01005 mov r1, r5 <== NOT EXECUTED ad50: e0800009 add r0, r0, r9 <== NOT EXECUTED ad54: ebffffb1 bl ac20 <== 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( ad68: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED ad6c: e1a01005 mov r1, r5 <== NOT EXECUTED ad70: ebffffaa bl ac20 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } ad74: e3a00000 mov r0, #0 ad78: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 0000ad80 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { ad80: 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 ); ad84: e3a02000 mov r2, #0 <== NOT EXECUTED ad88: ebfffe8c bl a7c0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { ad8c: e2503000 subs r3, r0, #0 <== NOT EXECUTED ptr = *block_ptr; *block_ptr = 0; ad90: 13a02000 movne r2, #0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { ptr = *block_ptr; ad94: 15930000 ldrne r0, [r3] <== NOT EXECUTED *block_ptr = 0; ad98: 15832000 strne r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); ad9c: 1bffff97 blne ac00 <== NOT EXECUTED } return 1; } ada0: e3a00001 mov r0, #1 <== NOT EXECUTED ada4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 0000aec4 : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { aec4: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Error check arguments */ if ( !source ) aec8: e2538000 subs r8, r3, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { aecc: e1a04000 mov r4, r0 aed0: e1a07001 mov r7, r1 aed4: e1a0a002 mov sl, r2 aed8: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Error check arguments */ if ( !source ) aedc: 0a000001 beq aee8 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) aee0: e3550000 cmp r5, #0 aee4: 1a000002 bne aef4 rtems_set_errno_and_return_minus_one( EINVAL ); aee8: eb000365 bl bc84 <__errno> <== NOT EXECUTED aeec: e3a03016 mov r3, #22 <== NOT EXECUTED aef0: ea00000e b af30 <== 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 ) { aef4: e5903054 ldr r3, [r0, #84] ; 0x54 aef8: e3530000 cmp r3, #0 /* * 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; aefc: e0851001 add r1, r5, r1 if ( last_byte > the_jnode->info.file.size ) { af00: ba000003 blt af14 af04: 1a00000c bne af3c af08: e5903050 ldr r3, [r0, #80] ; 0x50 af0c: e1530001 cmp r3, r1 af10: 2a000009 bcs af3c status = IMFS_memfile_extend( the_jnode, last_byte ); af14: e1a00004 mov r0, r4 af18: e3a02000 mov r2, #0 af1c: ebffffa1 bl ada8 if ( status ) af20: e3500000 cmp r0, #0 af24: 0a000004 beq af3c rtems_set_errno_and_return_minus_one( ENOSPC ); af28: eb000355 bl bc84 <__errno> af2c: e3a0301c mov r3, #28 af30: e5803000 str r3, [r0] af34: e3e06000 mvn r6, #0 af38: ea00004d b b074 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; af3c: e59f3138 ldr r3, [pc, #312] ; b07c af40: e5939000 ldr r9, [r3] af44: e1a0b009 mov fp, r9 af48: e1a0cfcb asr ip, fp, #31 af4c: e1a0300c mov r3, ip af50: e1a00007 mov r0, r7 af54: e1a0200b mov r2, fp af58: e1a0100a mov r1, sl af5c: e58dc000 str ip, [sp] af60: eb0012fc bl fb58 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; af64: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; af68: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; af6c: e1a0100a mov r1, sl af70: e1a00007 mov r0, r7 af74: e1a0200b mov r2, fp af78: e1a0300c mov r3, ip af7c: eb0011bb bl f670 <__divdi3> if ( start_offset ) { af80: 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; af84: e1a07000 mov r7, r0 if ( start_offset ) { af88: 0a000012 beq afd8 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 ); af8c: e1a00004 mov r0, r4 af90: e1a01007 mov r1, r7 af94: e3a02000 mov r2, #0 af98: ebfffe08 bl a7c0 if ( !block_ptr ) af9c: e3500000 cmp r0, #0 return copied; afa0: 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 ) afa4: 0a000032 beq b074 */ 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; afa8: e066a009 rsb sl, r6, r9 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); afac: 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; afb0: e15a0005 cmp sl, r5 afb4: 21a0a005 movcs sl, r5 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); afb8: e0800006 add r0, r0, r6 afbc: e1a01008 mov r1, r8 afc0: e1a0200a mov r2, sl afc4: eb00055c bl c53c src += to_copy; afc8: e088800a add r8, r8, sl block++; afcc: e2877001 add r7, r7, #1 my_length -= to_copy; afd0: e06a5005 rsb r5, sl, r5 copied += to_copy; afd4: e1a0600a mov r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; afd8: e59f909c ldr r9, [pc, #156] ; b07c afdc: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { afe0: ea00000d b b01c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); afe4: e1a00004 mov r0, r4 afe8: e1a01007 mov r1, r7 afec: e3a02000 mov r2, #0 aff0: ebfffdf2 bl a7c0 if ( !block_ptr ) aff4: e3500000 cmp r0, #0 aff8: 0a00001d beq b074 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 ); affc: e1a01008 mov r1, r8 b000: e5900000 ldr r0, [r0] b004: e1a0200a mov r2, sl b008: eb00054b bl c53c src += to_copy; b00c: e088800a add r8, r8, sl block++; b010: e2877001 add r7, r7, #1 my_length -= to_copy; b014: 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( b018: 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 ) { b01c: e5993000 ldr r3, [r9] b020: e1550003 cmp r5, r3 b024: 2affffee bcs afe4 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif to_copy = my_length; if ( my_length ) { b028: e3550000 cmp r5, #0 b02c: 0a00000a beq b05c block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); b030: e1a00004 mov r0, r4 b034: e1a01007 mov r1, r7 b038: e3a02000 mov r2, #0 b03c: ebfffddf bl a7c0 if ( !block_ptr ) b040: e3500000 cmp r0, #0 b044: 0a00000a beq b074 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 ); b048: e5900000 ldr r0, [r0] b04c: e1a01008 mov r1, r8 b050: e1a02005 mov r2, r5 b054: eb000538 bl c53c my_length = 0; copied += to_copy; b058: e0866005 add r6, r6, r5 } IMFS_mtime_ctime_update( the_jnode ); b05c: e28d0004 add r0, sp, #4 b060: e3a01000 mov r1, #0 b064: ebffdb5b bl 1dd8 b068: e59d3004 ldr r3, [sp, #4] b06c: e5843044 str r3, [r4, #68] ; 0x44 b070: e5843048 str r3, [r4, #72] ; 0x48 return copied; } b074: e1a00006 mov r0, r6 b078: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000015e4 : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { 15e4: e92d40f0 push {r4, r5, r6, r7, lr} 15e8: e24dd040 sub sp, sp, #64 ; 0x40 15ec: e1a04001 mov r4, r1 15f0: e1a07000 mov r7, r0 15f4: e1a06002 mov r6, r2 15f8: 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 ); 15fc: eb002d90 bl cc44 1600: e28d303c add r3, sp, #60 ; 0x3c 1604: e1a01000 mov r1, r0 1608: e28d2004 add r2, sp, #4 160c: e1a00007 mov r0, r7 1610: eb001e84 bl 9028 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) 1614: e2043a0f and r3, r4, #61440 ; 0xf000 1618: e3530901 cmp r3, #16384 ; 0x4000 161c: 0a00000d beq 1658 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) 1620: e3530902 cmp r3, #32768 ; 0x8000 1624: 0a00000d beq 1660 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { 1628: e3530a06 cmp r3, #24576 ; 0x6000 162c: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); 1630: 058d6028 streq r6, [sp, #40] ; 0x28 1634: 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; 1638: 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) ) { 163c: 0a000008 beq 1664 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) 1640: e3530a01 cmp r3, #4096 ; 0x1000 type = IMFS_FIFO; 1644: 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)) 1648: 0a000005 beq 1664 type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); 164c: eb00298c bl bc84 <__errno> <== NOT EXECUTED 1650: e3a03016 mov r3, #22 <== NOT EXECUTED 1654: ea00000d b 1690 <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; 1658: e3a01001 mov r1, #1 165c: ea000000 b 1664 else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; 1660: e3a01005 mov r1, #5 new_node = IMFS_create_node( pathloc, type, new_name, mode, &info 1664: 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( 1668: e58d3000 str r3, [sp] 166c: e59d0054 ldr r0, [sp, #84] ; 0x54 1670: e28d2004 add r2, sp, #4 1674: e1a03004 mov r3, r4 1678: eb001be8 bl 8620 new_name, mode, &info ); if ( !new_node ) 167c: e3500000 cmp r0, #0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; 1680: 13a00000 movne r0, #0 new_name, mode, &info ); if ( !new_node ) 1684: 1a000003 bne 1698 rtems_set_errno_and_return_minus_one( ENOMEM ); 1688: eb00297d bl bc84 <__errno> 168c: e3a0300c mov r3, #12 1690: e5803000 str r3, [r0] 1694: e3e00000 mvn r0, #0 return 0; } 1698: e28dd040 add sp, sp, #64 ; 0x40 169c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 000016a0 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 16a0: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 16a4: e593204c ldr r2, [r3, #76] ; 0x4c 16a8: e3520001 cmp r2, #1 #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 16ac: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 16b0: 0a000004 beq 16c8 rtems_set_errno_and_return_minus_one( ENOTDIR ); 16b4: eb002972 bl bc84 <__errno> <== NOT EXECUTED 16b8: e3a03014 mov r3, #20 <== NOT EXECUTED 16bc: e5803000 str r3, [r0] <== NOT EXECUTED 16c0: e3e00000 mvn r0, #0 <== NOT EXECUTED 16c4: 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; 16c8: e583005c str r0, [r3, #92] ; 0x5c return 0; 16cc: e3a00000 mov r0, #0 } 16d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00003798 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 3798: e92d4030 push {r4, r5, lr} #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 379c: e59f50e0 ldr r5, [pc, #224] ; 3884 37a0: e5953000 ldr r3, [r5] */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { 37a4: e1a04000 mov r4, r0 #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); 37a8: e5931008 ldr r1, [r3, #8] 37ac: e280000c add r0, r0, #12 37b0: eb003077 bl f994 switch( the_jnode->type ) { 37b4: e594204c ldr r2, [r4, #76] ; 0x4c 37b8: e2423001 sub r3, r2, #1 37bc: e3530006 cmp r3, #6 37c0: 979ff103 ldrls pc, [pc, r3, lsl #2] 37c4: ea000026 b 3864 <== NOT EXECUTED 37c8: 000037e4 .word 0x000037e4 <== NOT EXECUTED 37cc: 000037f8 .word 0x000037f8 <== NOT EXECUTED 37d0: 00003844 .word 0x00003844 <== NOT EXECUTED 37d4: 00003844 .word 0x00003844 <== NOT EXECUTED 37d8: 0000382c .word 0x0000382c <== NOT EXECUTED 37dc: 00003810 .word 0x00003810 <== NOT EXECUTED 37e0: 00003850 .word 0x00003850 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); 37e4: e5953000 ldr r3, [r5] 37e8: e3a0002f mov r0, #47 ; 0x2f 37ec: e5931008 ldr r1, [r3, #8] 37f0: eb003032 bl f8c0 break; 37f4: ea00001f b 3878 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", 37f8: e5953000 ldr r3, [r5] 37fc: e59f1084 ldr r1, [pc, #132] ; 3888 3800: e5930008 ldr r0, [r3, #8] 3804: e2842050 add r2, r4, #80 ; 0x50 3808: e892000c ldm r2, {r2, r3} 380c: ea000004 b 3824 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", 3810: e5953000 ldr r3, [r5] <== NOT EXECUTED 3814: e59f1070 ldr r1, [pc, #112] ; 388c <== NOT EXECUTED 3818: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 381c: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 3820: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED 3824: eb003005 bl f840 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; 3828: ea000012 b 3878 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", 382c: e5953000 ldr r3, [r5] <== NOT EXECUTED 3830: e59f1058 ldr r1, [pc, #88] ; 3890 <== NOT EXECUTED 3834: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED 3838: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED 383c: eb002fff bl f840 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; 3840: ea00000c b 3878 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); 3844: e5953000 ldr r3, [r5] <== NOT EXECUTED 3848: e59f0044 ldr r0, [pc, #68] ; 3894 <== NOT EXECUTED 384c: ea000001 b 3858 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); 3850: e5953000 ldr r3, [r5] <== NOT EXECUTED 3854: e59f003c ldr r0, [pc, #60] ; 3898 <== NOT EXECUTED 3858: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } 385c: 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" ); 3860: ea00304b b f994 <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); 3864: e5953000 ldr r3, [r5] <== NOT EXECUTED 3868: e59f102c ldr r1, [pc, #44] ; 389c <== NOT EXECUTED 386c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } 3870: 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 ); 3874: ea002ff1 b f840 <== NOT EXECUTED return; } puts(""); 3878: e59f0020 ldr r0, [pc, #32] ; 38a0 } 387c: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); 3880: ea003737 b 11564 =============================================================================== 000016e0 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; 16e0: e5903000 ldr r3, [r0] if ( node->type != IMFS_SYM_LINK ) 16e4: e593004c ldr r0, [r3, #76] ; 0x4c 16e8: e3500004 cmp r0, #4 int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { 16ec: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) 16f0: 03a00000 moveq r0, #0 16f4: 0a000006 beq 1714 rtems_set_errno_and_return_minus_one( EINVAL ); 16f8: eb002961 bl bc84 <__errno> <== NOT EXECUTED 16fc: e3a03016 mov r3, #22 <== NOT EXECUTED 1700: e5803000 str r3, [r0] <== NOT EXECUTED 1704: e3e00000 mvn r0, #0 <== NOT EXECUTED 1708: 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]; 170c: 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++ ) 1710: e2800001 add r0, r0, #1 1714: e1500002 cmp r0, r2 1718: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) 171c: e593c050 ldr ip, [r3, #80] ; 0x50 1720: e7dcc000 ldrb ip, [ip, r0] 1724: e35c0000 cmp ip, #0 1728: 1afffff7 bne 170c buf[i] = node->info.sym_link.name[i]; return i; } 172c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00001730 : 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 */ ) { 1730: 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; 1734: 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 */ ) { 1738: 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 ); 173c: e1a01003 mov r1, r3 <== NOT EXECUTED 1740: e284000c add r0, r4, #12 <== NOT EXECUTED 1744: e3a02020 mov r2, #32 <== NOT EXECUTED 1748: eb002d55 bl cca4 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) 174c: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED 1750: e3530000 cmp r3, #0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 1754: 11a00004 movne r0, r4 <== NOT EXECUTED 1758: 1b001031 blne 5824 <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; 175c: 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 ); 1760: e1a01004 mov r1, r4 <== NOT EXECUTED the_jnode->Parent = new_parent; 1764: e5840008 str r0, [r4, #8] <== NOT EXECUTED 1768: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED 176c: eb001021 bl 57f8 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); 1770: e1a0000d mov r0, sp <== NOT EXECUTED 1774: e3a01000 mov r1, #0 <== NOT EXECUTED 1778: eb000196 bl 1dd8 <== NOT EXECUTED 177c: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } 1780: 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 ); 1784: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } 1788: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 000091d0 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; 91d0: e5903000 ldr r3, [r0] switch ( the_jnode->type ) { 91d4: e593204c ldr r2, [r3, #76] ; 0x4c 91d8: e2422002 sub r2, r2, #2 int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 91dc: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { 91e0: e3520005 cmp r2, #5 91e4: 979ff102 ldrls pc, [pc, r2, lsl #2] 91e8: ea000012 b 9238 <== NOT EXECUTED 91ec: 00009204 .word 0x00009204 <== NOT EXECUTED 91f0: 00009238 .word 0x00009238 <== NOT EXECUTED 91f4: 00009224 .word 0x00009224 <== NOT EXECUTED 91f8: 00009218 .word 0x00009218 <== NOT EXECUTED 91fc: 00009218 .word 0x00009218 <== NOT EXECUTED 9200: 00009224 .word 0x00009224 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); 9204: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 9208: e593c050 ldr ip, [r3, #80] ; 0x50 920c: e581201c str r2, [r1, #28] 9210: e581c018 str ip, [r1, #24] break; 9214: ea00000c b 924c case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; 9218: e283c050 add ip, r3, #80 ; 0x50 921c: e89c1800 ldm ip, {fp, ip} 9220: ea000001 b 922c case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; 9224: e3a0b000 mov fp, #0 9228: e3a0c000 mov ip, #0 922c: e581b020 str fp, [r1, #32] 9230: e581c024 str ip, [r1, #36] ; 0x24 break; 9234: ea000004 b 924c default: rtems_set_errno_and_return_minus_one( ENOTSUP ); 9238: eb000a91 bl bc84 <__errno> <== NOT EXECUTED 923c: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 9240: e5803000 str r3, [r0] <== NOT EXECUTED 9244: e3e00000 mvn r0, #0 <== NOT EXECUTED 9248: 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; 924c: e5902010 ldr r2, [r0, #16] buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); 9250: e5922034 ldr r2, [r2, #52] ; 0x34 9254: 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 = 9258: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; 925c: e5932030 ldr r2, [r3, #48] ; 0x30 9260: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; 9264: e1d323b4 ldrh r2, [r3, #52] ; 0x34 9268: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; 926c: e5932038 ldr r2, [r3, #56] ; 0x38 9270: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; 9274: e1d323bc ldrh r2, [r3, #60] ; 0x3c 9278: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; 927c: e1d323be ldrh r2, [r3, #62] ; 0x3e 9280: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; 9284: e5932040 ldr r2, [r3, #64] ; 0x40 9288: e59f001c ldr r0, [pc, #28] ; 92ac 928c: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; 9290: e2832044 add r2, r3, #68 ; 0x44 9294: e892000c ldm r2, {r2, r3} /* * The device number of the IMFS is the major number and the minor is the * instance. */ fs_info = loc->mt_entry->fs_info; buf->st_dev = 9298: e5810000 str r0, [r1] buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; 929c: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; 92a0: e5813038 str r3, [r1, #56] ; 0x38 return 0; 92a4: e3a00000 mov r0, #0 } 92a8: e8bd8800 pop {fp, pc} =============================================================================== 0000178c : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 178c: e92d40f0 push {r4, r5, r6, r7, lr} 1790: e1a05000 mov r5, r0 1794: 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 ); 1798: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { 179c: e1a06001 mov r6, r1 17a0: 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 ); 17a4: eb002d26 bl cc44 17a8: e28d4004 add r4, sp, #4 17ac: e1a01000 mov r1, r0 17b0: e1a02004 mov r2, r4 17b4: e28d303c add r3, sp, #60 ; 0x3c 17b8: e1a00007 mov r0, r7 17bc: eb001e19 bl 9028 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); 17c0: e1a00006 mov r0, r6 17c4: eb002d0a bl cbf4 if (info.sym_link.name == NULL) { 17c8: 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); 17cc: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { 17d0: 0a00000b beq 1804 new_node = IMFS_create_node( parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info 17d4: 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( 17d8: e58d3000 str r3, [sp] 17dc: e1a00005 mov r0, r5 17e0: e3a01004 mov r1, #4 17e4: e1a02004 mov r2, r4 17e8: e59f302c ldr r3, [pc, #44] ; 181c 17ec: eb001b8b bl 8620 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 17f0: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; 17f4: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { 17f8: 1a000005 bne 1814 free(info.sym_link.name); 17fc: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED 1800: eb00014b bl 1d34 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); 1804: eb00291e bl bc84 <__errno> <== NOT EXECUTED 1808: e3a0300c mov r3, #12 <== NOT EXECUTED 180c: e5803000 str r3, [r0] <== NOT EXECUTED 1810: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } 1814: e28dd040 add sp, sp, #64 ; 0x40 1818: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00001820 : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1820: 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; 1824: e5915000 ldr r5, [r1] /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 1828: e595304c ldr r3, [r5, #76] ; 0x4c 182c: e3530003 cmp r3, #3 int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { 1830: e24dd01c sub sp, sp, #28 1834: e1a06000 mov r6, r0 1838: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { 183c: 1a000024 bne 18d4 if ( !node->info.hard_link.link_node ) 1840: e595e050 ldr lr, [r5, #80] ; 0x50 1844: e35e0000 cmp lr, #0 1848: 1a000003 bne 185c rtems_set_errno_and_return_minus_one( EINVAL ); 184c: eb00290c bl bc84 <__errno> <== NOT EXECUTED 1850: e3a03016 mov r3, #22 <== NOT EXECUTED 1854: e5803000 str r3, [r0] <== NOT EXECUTED 1858: ea000023 b 18ec <== NOT EXECUTED the_link = *loc; 185c: e1a07001 mov r7, r1 1860: e8b7000f ldm r7!, {r0, r1, r2, r3} 1864: e1a0c00d mov ip, sp 1868: e8ac000f stmia ip!, {r0, r1, r2, r3} 186c: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; 1870: e28d701c add r7, sp, #28 1874: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); 1878: 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; 187c: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); 1880: eb001bc4 bl 8798 /* * 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) 1884: e5953050 ldr r3, [r5, #80] ; 0x50 1888: e1d323b4 ldrh r2, [r3, #52] ; 0x34 188c: e3520001 cmp r2, #1 1890: 1a000007 bne 18b4 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); 1894: e1a00006 mov r0, r6 1898: e1a0100d mov r1, sp 189c: e59d3008 ldr r3, [sp, #8] 18a0: e1a0e00f mov lr, pc 18a4: e593f034 ldr pc, [r3, #52] ; 0x34 if ( result != 0 ) 18a8: e3500000 cmp r0, #0 18ac: 0a000008 beq 18d4 18b0: ea00000d b 18ec return -1; } else { node->info.hard_link.link_node->st_nlink --; 18b4: e2422001 sub r2, r2, #1 18b8: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); 18bc: e28d0014 add r0, sp, #20 18c0: e3a01000 mov r1, #0 18c4: eb000143 bl 1dd8 18c8: e5953050 ldr r3, [r5, #80] ; 0x50 18cc: e59d2014 ldr r2, [sp, #20] 18d0: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); 18d4: e5943008 ldr r3, [r4, #8] 18d8: e1a00006 mov r0, r6 18dc: e1a01004 mov r1, r4 18e0: e1a0e00f mov lr, pc 18e4: e593f034 ldr pc, [r3, #52] ; 0x34 return result; 18e8: ea000000 b 18f0 if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; 18ec: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } 18f0: e28dd01c add sp, sp, #28 18f4: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 000018f8 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; 18f8: e5903008 ldr r3, [r0, #8] /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 18fc: e593204c ldr r2, [r3, #76] ; 0x4c 1900: e3520001 cmp r2, #1 #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { 1904: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) 1908: 0a000002 beq 1918 rtems_set_errno_and_return_minus_one( ENOTDIR ); 190c: eb0028dc bl bc84 <__errno> <== NOT EXECUTED 1910: e3a03014 mov r3, #20 <== NOT EXECUTED 1914: ea000004 b 192c <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) 1918: e593205c ldr r2, [r3, #92] ; 0x5c 191c: e3520000 cmp r2, #0 1920: 1a000004 bne 1938 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ 1924: eb0028d6 bl bc84 <__errno> <== NOT EXECUTED 1928: e3a03016 mov r3, #22 <== NOT EXECUTED 192c: e5803000 str r3, [r0] <== NOT EXECUTED 1930: e3e00000 mvn r0, #0 <== NOT EXECUTED 1934: 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; 1938: e3a00000 mov r0, #0 193c: e583005c str r0, [r3, #92] ; 0x5c return 0; } 1940: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00001294 : Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; } 1294: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00014c0c <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { 14c0c: 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 ) { 14c10: 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 ) { 14c14: 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 ) { 14c18: e1a06000 mov r6, r0 14c1c: e1a0a001 mov sl, r1 14c20: e1a07002 mov r7, r2 14c24: 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 ) { 14c28: 8a000013 bhi 14c7c <_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 ) { 14c2c: e5905048 ldr r5, [r0, #72] ; 0x48 14c30: e3550000 cmp r5, #0 *count = 0; 14c34: 13a00000 movne r0, #0 14c38: 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 ) { 14c3c: 0a000007 beq 14c60 <_CORE_message_queue_Broadcast+0x54> 14c40: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); 14c44: e594002c ldr r0, [r4, #44] ; 0x2c 14c48: e1a0100a mov r1, sl 14c4c: e1a02007 mov r2, r7 14c50: eb001e77 bl 1c634 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; 14c54: e5943028 ldr r3, [r4, #40] ; 0x28 14c58: e5837000 str r7, [r3] */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; 14c5c: e2855001 add r5, r5, #1 /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = 14c60: e1a00006 mov r0, r6 14c64: eb000994 bl 172bc <_Thread_queue_Dequeue> 14c68: e2504000 subs r4, r0, #0 14c6c: 1afffff4 bne 14c44 <_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; 14c70: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; 14c74: e1a00004 mov r0, r4 14c78: 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; 14c7c: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } 14c80: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== 00009e64 <_CORE_mutex_Seize_interrupt_trylock>: #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { 9e64: e1a03000 mov r3, r0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9e68: e59f2124 ldr r2, [pc, #292] ; 9f94 <_CORE_mutex_Seize_interrupt_trylock+0x130> executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9e6c: e593c050 ldr ip, [r3, #80] ; 0x50 Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9e70: e3a00000 mov r0, #0 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; 9e74: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9e78: e15c0000 cmp ip, r0 9e7c: e92d4010 push {r4, lr} Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; 9e80: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { 9e84: 0a00002c beq 9f3c <_CORE_mutex_Seize_interrupt_trylock+0xd8> the_mutex->lock = CORE_MUTEX_LOCKED; 9e88: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; 9e8c: e5920008 ldr r0, [r2, #8] 9e90: e5830060 str r0, [r3, #96] ; 0x60 the_mutex->nest_count = 1; 9e94: e3a00001 mov r0, #1 9e98: e5830054 str r0, [r3, #84] ; 0x54 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } 9e9c: e5930048 ldr r0, [r3, #72] ; 0x48 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9ea0: e3500002 cmp r0, #2 executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; 9ea4: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; the_mutex->nest_count = 1; if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || 9ea8: 0a000001 beq 9eb4 <_CORE_mutex_Seize_interrupt_trylock+0x50> 9eac: e3500003 cmp r0, #3 9eb0: 1a000004 bne 9ec8 <_CORE_mutex_Seize_interrupt_trylock+0x64> _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9eb4: e592c01c ldr ip, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9eb8: e3500003 cmp r0, #3 _Chain_Prepend_unprotected( &executing->lock_mutex, &the_mutex->queue.lock_queue ); the_mutex->queue.priority_before = executing->current_priority; #endif executing->resource_count++; 9ebc: e28c4001 add r4, ip, #1 9ec0: e582401c str r4, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { 9ec4: 0a000000 beq 9ecc <_CORE_mutex_Seize_interrupt_trylock+0x68> _ISR_Enable( *level_p ); 9ec8: ea00002b b 9f7c <_CORE_mutex_Seize_interrupt_trylock+0x118> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; 9ecc: e593004c ldr r0, [r3, #76] ; 0x4c current = executing->current_priority; 9ed0: e5924014 ldr r4, [r2, #20] if ( current == ceiling ) { 9ed4: e1540000 cmp r4, r0 9ed8: 1a000000 bne 9ee0 <_CORE_mutex_Seize_interrupt_trylock+0x7c> _ISR_Enable( *level_p ); 9edc: ea000026 b 9f7c <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; } if ( current > ceiling ) { 9ee0: 9a00000b bls 9f14 <_CORE_mutex_Seize_interrupt_trylock+0xb0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 9ee4: e59f20ac ldr r2, [pc, #172] ; 9f98 <_CORE_mutex_Seize_interrupt_trylock+0x134> 9ee8: e5920000 ldr r0, [r2] 9eec: e2800001 add r0, r0, #1 9ef0: e5820000 str r0, [r2] 9ef4: e5912000 ldr r2, [r1] 9ef8: e129f002 msr CPSR_fc, r2 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( 9efc: e3a02000 mov r2, #0 9f00: e593005c ldr r0, [r3, #92] ; 0x5c 9f04: e593104c ldr r1, [r3, #76] ; 0x4c 9f08: ebfff281 bl 6914 <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); 9f0c: ebfff3c7 bl 6e30 <_Thread_Enable_dispatch> 9f10: ea00001b b 9f84 <_CORE_mutex_Seize_interrupt_trylock+0x120> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; 9f14: e3a00006 mov r0, #6 9f18: e5820034 str r0, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; 9f1c: e3a00001 mov r0, #1 9f20: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ 9f24: e3a00000 mov r0, #0 9f28: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ 9f2c: e582c01c str ip, [r2, #28] 9f30: e5913000 ldr r3, [r1] 9f34: e129f003 msr CPSR_fc, r3 9f38: e8bd8010 pop {r4, pc} /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 9f3c: e593005c ldr r0, [r3, #92] ; 0x5c 9f40: e1500002 cmp r0, r2 /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 9f44: 13a00001 movne r0, #1 /* * At this point, we know the mutex was not available. If this thread * is the thread that has locked the mutex, let's see if we are allowed * to nest access. */ if ( _Thread_Is_executing( the_mutex->holder ) ) { 9f48: 18bd8010 popne {r4, pc} switch ( the_mutex->Attributes.lock_nesting_behavior ) { 9f4c: e5932040 ldr r2, [r3, #64] ; 0x40 9f50: e3520000 cmp r2, #0 9f54: 0a000002 beq 9f64 <_CORE_mutex_Seize_interrupt_trylock+0x100> 9f58: e3520001 cmp r2, #1 9f5c: 1a00000a bne 9f8c <_CORE_mutex_Seize_interrupt_trylock+0x128> 9f60: ea000003 b 9f74 <_CORE_mutex_Seize_interrupt_trylock+0x110><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; 9f64: e5932054 ldr r2, [r3, #84] ; 0x54 9f68: e2822001 add r2, r2, #1 9f6c: e5832054 str r2, [r3, #84] ; 0x54 _ISR_Enable( *level_p ); 9f70: ea000001 b 9f7c <_CORE_mutex_Seize_interrupt_trylock+0x118> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; 9f74: e3a03002 mov r3, #2 <== NOT EXECUTED 9f78: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED 9f7c: e5913000 ldr r3, [r1] 9f80: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; 9f84: e3a00000 mov r0, #0 9f88: e8bd8010 pop {r4, pc} /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; 9f8c: e3a00001 mov r0, #1 9f90: e8bd8010 pop {r4, pc} =============================================================================== 00006cb8 <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cb8: 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; 6cbc: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cc0: e24dd030 sub sp, sp, #48 ; 0x30 uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; 6cc4: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; 6cc8: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6ccc: e59f4500 ldr r4, [pc, #1280] ; 71d4 <_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; 6cd0: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; 6cd4: e59f34fc ldr r3, [pc, #1276] ; 71d8 <_Heap_Walk+0x520> 6cd8: e31200ff tst r2, #255 ; 0xff 6cdc: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { 6ce0: e59f34f4 ldr r3, [pc, #1268] ; 71dc <_Heap_Walk+0x524> 6ce4: e5933000 ldr r3, [r3] bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6ce8: 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() ) ) { 6cec: e3530003 cmp r3, #3 bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { 6cf0: e1a06000 mov r6, r0 6cf4: e1a05001 mov r5, r1 uintptr_t const page_size = heap->page_size; 6cf8: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; 6cfc: 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() ) ) { 6d00: 1a000127 bne 71a4 <_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)( 6d04: e59dc024 ldr ip, [sp, #36] ; 0x24 6d08: e58dc000 str ip, [sp] 6d0c: e5903018 ldr r3, [r0, #24] 6d10: e58d3004 str r3, [sp, #4] 6d14: e590301c ldr r3, [r0, #28] 6d18: e59d2020 ldr r2, [sp, #32] 6d1c: e58d3008 str r3, [sp, #8] 6d20: e59d3028 ldr r3, [sp, #40] ; 0x28 6d24: e58d200c str r2, [sp, #12] 6d28: e58d3010 str r3, [sp, #16] 6d2c: e5903008 ldr r3, [r0, #8] 6d30: e58d3014 str r3, [sp, #20] 6d34: e590300c ldr r3, [r0, #12] 6d38: e59f24a0 ldr r2, [pc, #1184] ; 71e0 <_Heap_Walk+0x528> 6d3c: e58d3018 str r3, [sp, #24] 6d40: e1a00001 mov r0, r1 6d44: e1a03009 mov r3, r9 6d48: e3a01000 mov r1, #0 6d4c: e1a0e00f mov lr, pc 6d50: e12fff14 bx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { 6d54: e3590000 cmp r9, #0 6d58: 1a000006 bne 6d78 <_Heap_Walk+0xc0> (*printer)( source, true, "page size is zero\n" ); 6d5c: e1a00005 mov r0, r5 6d60: e3a01001 mov r1, #1 6d64: e59f2478 ldr r2, [pc, #1144] ; 71e4 <_Heap_Walk+0x52c> 6d68: e1a0e00f mov lr, pc 6d6c: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6d70: e1a08009 mov r8, r9 6d74: ea00010b b 71a8 <_Heap_Walk+0x4f0> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { 6d78: e2198003 ands r8, r9, #3 (*printer)( 6d7c: 11a00005 movne r0, r5 6d80: 13a01001 movne r1, #1 6d84: 159f245c ldrne r2, [pc, #1116] ; 71e8 <_Heap_Walk+0x530> 6d88: 11a03009 movne r3, r9 6d8c: 1a00010c bne 71c4 <_Heap_Walk+0x50c> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6d90: e59d0024 ldr r0, [sp, #36] ; 0x24 6d94: e1a01009 mov r1, r9 6d98: ebffe781 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { 6d9c: e250b000 subs fp, r0, #0 6da0: 0a000006 beq 6dc0 <_Heap_Walk+0x108> (*printer)( 6da4: e1a00005 mov r0, r5 6da8: e3a01001 mov r1, #1 6dac: e59f2438 ldr r2, [pc, #1080] ; 71ec <_Heap_Walk+0x534> 6db0: e59d3024 ldr r3, [sp, #36] ; 0x24 6db4: e1a0e00f mov lr, pc 6db8: e12fff14 bx r4 6dbc: ea0000f9 b 71a8 <_Heap_Walk+0x4f0> 6dc0: e59dc020 ldr ip, [sp, #32] 6dc4: e1a01009 mov r1, r9 6dc8: e28c0008 add r0, ip, #8 6dcc: ebffe774 bl ba4 <__umodsi3> ); return false; } if ( 6dd0: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( 6dd4: 11a00005 movne r0, r5 6dd8: 13a01001 movne r1, #1 6ddc: 159f240c ldrne r2, [pc, #1036] ; 71f0 <_Heap_Walk+0x538> 6de0: 159d3020 ldrne r3, [sp, #32] 6de4: 1a0000cc bne 711c <_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; 6de8: e59d2020 ldr r2, [sp, #32] 6dec: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { 6df0: e2188001 ands r8, r8, #1 (*printer)( 6df4: 01a00005 moveq r0, r5 6df8: 03a01001 moveq r1, #1 6dfc: 059f23f0 ldreq r2, [pc, #1008] ; 71f4 <_Heap_Walk+0x53c> 6e00: 0a000009 beq 6e2c <_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; 6e04: e59d3028 ldr r3, [sp, #40] ; 0x28 6e08: e5937004 ldr r7, [r3, #4] 6e0c: 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); 6e10: 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; 6e14: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { 6e18: e2188001 ands r8, r8, #1 6e1c: 1a000005 bne 6e38 <_Heap_Walk+0x180> (*printer)( 6e20: e59f23d0 ldr r2, [pc, #976] ; 71f8 <_Heap_Walk+0x540> 6e24: e1a00005 mov r0, r5 6e28: e3a01001 mov r1, #1 6e2c: e1a0e00f mov lr, pc 6e30: e12fff14 bx r4 6e34: ea0000db b 71a8 <_Heap_Walk+0x4f0> ); return false; } if ( 6e38: e59dc020 ldr ip, [sp, #32] 6e3c: e157000c cmp r7, ip 6e40: 0a000006 beq 6e60 <_Heap_Walk+0x1a8> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( 6e44: e1a00005 mov r0, r5 <== NOT EXECUTED 6e48: e3a01001 mov r1, #1 <== NOT EXECUTED 6e4c: e59f23a8 ldr r2, [pc, #936] ; 71fc <_Heap_Walk+0x544> <== NOT EXECUTED 6e50: e1a0e00f mov lr, pc <== NOT EXECUTED 6e54: 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; 6e58: e1a0800a mov r8, sl <== NOT EXECUTED 6e5c: ea0000d1 b 71a8 <_Heap_Walk+0x4f0> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; 6e60: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } 6e64: 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 ); 6e68: e1a0a006 mov sl, r6 6e6c: ea000034 b 6f44 <_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; 6e70: e5963020 ldr r3, [r6, #32] 6e74: e1530008 cmp r3, r8 6e78: 83a0c000 movhi ip, #0 6e7c: 8a000003 bhi 6e90 <_Heap_Walk+0x1d8> 6e80: e596c024 ldr ip, [r6, #36] ; 0x24 6e84: e15c0008 cmp ip, r8 6e88: 33a0c000 movcc ip, #0 6e8c: 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 ) ) { 6e90: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( 6e94: 01a00005 moveq r0, r5 6e98: 03a01001 moveq r1, #1 6e9c: 059f235c ldreq r2, [pc, #860] ; 7200 <_Heap_Walk+0x548> 6ea0: 0a000012 beq 6ef0 <_Heap_Walk+0x238> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6ea4: e2880008 add r0, r8, #8 6ea8: e1a0100b mov r1, fp 6eac: ebffe73c bl ba4 <__umodsi3> ); return false; } if ( 6eb0: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( 6eb4: 11a00005 movne r0, r5 6eb8: 13a01001 movne r1, #1 6ebc: 159f2340 ldrne r2, [pc, #832] ; 7204 <_Heap_Walk+0x54c> 6ec0: 11a03008 movne r3, r8 6ec4: 1a0000be bne 71c4 <_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; 6ec8: e5983004 ldr r3, [r8, #4] 6ecc: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } 6ed0: 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; 6ed4: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { 6ed8: e2133001 ands r3, r3, #1 6edc: e58d302c str r3, [sp, #44] ; 0x2c 6ee0: 0a000009 beq 6f0c <_Heap_Walk+0x254> (*printer)( 6ee4: e59f231c ldr r2, [pc, #796] ; 7208 <_Heap_Walk+0x550> 6ee8: e1a00005 mov r0, r5 6eec: e3a01001 mov r1, #1 6ef0: e1a03008 mov r3, r8 6ef4: e58dc01c str ip, [sp, #28] 6ef8: e1a0e00f mov lr, pc 6efc: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f00: e59dc01c ldr ip, [sp, #28] 6f04: e1a0800c mov r8, ip 6f08: ea0000a6 b 71a8 <_Heap_Walk+0x4f0> ); return false; } if ( free_block->prev != prev_block ) { 6f0c: e598300c ldr r3, [r8, #12] 6f10: e153000a cmp r3, sl 6f14: 0a000008 beq 6f3c <_Heap_Walk+0x284> (*printer)( 6f18: e58d3000 str r3, [sp] 6f1c: e1a00005 mov r0, r5 6f20: e1a03008 mov r3, r8 6f24: e3a01001 mov r1, #1 6f28: e59f22dc ldr r2, [pc, #732] ; 720c <_Heap_Walk+0x554> 6f2c: e1a0e00f mov lr, pc 6f30: e12fff14 bx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; 6f34: e59d802c ldr r8, [sp, #44] ; 0x2c 6f38: ea00009a b 71a8 <_Heap_Walk+0x4f0> return false; } prev_block = free_block; free_block = free_block->next; 6f3c: e1a0a008 mov sl, r8 6f40: 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 ) { 6f44: e1580006 cmp r8, r6 6f48: 1affffc8 bne 6e70 <_Heap_Walk+0x1b8> 6f4c: ea000000 b 6f54 <_Heap_Walk+0x29c> block->prev_size ); } block = next_block; } while ( block != first_block ); 6f50: e1a07008 mov r7, r8 return true; } 6f54: 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; 6f58: 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; 6f5c: 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); 6f60: 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; 6f64: e1520008 cmp r2, r8 6f68: 83a0b000 movhi fp, #0 6f6c: 8a000003 bhi 6f80 <_Heap_Walk+0x2c8> 6f70: e596b024 ldr fp, [r6, #36] ; 0x24 6f74: e15b0008 cmp fp, r8 6f78: 33a0b000 movcc fp, #0 6f7c: 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 ) ) { 6f80: e21bb0ff ands fp, fp, #255 ; 0xff 6f84: 1a000007 bne 6fa8 <_Heap_Walk+0x2f0> (*printer)( 6f88: e58d8000 str r8, [sp] 6f8c: e1a00005 mov r0, r5 6f90: e3a01001 mov r1, #1 6f94: e59f2274 ldr r2, [pc, #628] ; 7210 <_Heap_Walk+0x558> 6f98: e1a03007 mov r3, r7 6f9c: e1a0e00f mov lr, pc 6fa0: e12fff14 bx r4 6fa4: ea00005e b 7124 <_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; 6fa8: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; 6fac: e1a0000a mov r0, sl 6fb0: e1a01009 mov r1, r9 6fb4: e057b002 subs fp, r7, r2 6fb8: 13a0b001 movne fp, #1 6fbc: e58d301c str r3, [sp, #28] 6fc0: ebffe6f7 bl ba4 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { 6fc4: e3500000 cmp r0, #0 6fc8: e59d301c ldr r3, [sp, #28] 6fcc: 0a000005 beq 6fe8 <_Heap_Walk+0x330> 6fd0: e35b0000 cmp fp, #0 (*printer)( 6fd4: 158da000 strne sl, [sp] 6fd8: 11a00005 movne r0, r5 6fdc: 13a01001 movne r1, #1 6fe0: 159f222c ldrne r2, [pc, #556] ; 7214 <_Heap_Walk+0x55c> 6fe4: 1a000014 bne 703c <_Heap_Walk+0x384> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { 6fe8: e59dc024 ldr ip, [sp, #36] ; 0x24 6fec: e15a000c cmp sl, ip 6ff0: 2a000009 bcs 701c <_Heap_Walk+0x364> 6ff4: e35b0000 cmp fp, #0 6ff8: 0a000007 beq 701c <_Heap_Walk+0x364> (*printer)( 6ffc: e88d1400 stm sp, {sl, ip} 7000: e1a00005 mov r0, r5 7004: e3a01001 mov r1, #1 7008: e59f2208 ldr r2, [pc, #520] ; 7218 <_Heap_Walk+0x560> 700c: e1a03007 mov r3, r7 7010: e1a0e00f mov lr, pc 7014: e12fff14 bx r4 7018: ea00006b b 71cc <_Heap_Walk+0x514> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { 701c: e1580007 cmp r8, r7 7020: 8a000009 bhi 704c <_Heap_Walk+0x394> 7024: e35b0000 cmp fp, #0 7028: 0a000007 beq 704c <_Heap_Walk+0x394> (*printer)( 702c: e58d8000 str r8, [sp] 7030: e59f21e4 ldr r2, [pc, #484] ; 721c <_Heap_Walk+0x564> 7034: e1a00005 mov r0, r5 7038: e3a01001 mov r1, #1 703c: e1a03007 mov r3, r7 7040: e1a0e00f mov lr, pc 7044: e12fff14 bx r4 7048: ea00005f b 71cc <_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; 704c: e203b001 and fp, r3, #1 7050: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { 7054: e3130001 tst r3, #1 7058: 1a00003b bne 714c <_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 ? 705c: 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)( 7060: e5963008 ldr r3, [r6, #8] 7064: e1520003 cmp r2, r3 block = next_block; } while ( block != first_block ); return true; } 7068: 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)( 706c: 059f01ac ldreq r0, [pc, #428] ; 7220 <_Heap_Walk+0x568> 7070: 0a000003 beq 7084 <_Heap_Walk+0x3cc> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), 7074: e59f31a8 ldr r3, [pc, #424] ; 7224 <_Heap_Walk+0x56c> 7078: e1520006 cmp r2, r6 707c: e59f01a4 ldr r0, [pc, #420] ; 7228 <_Heap_Walk+0x570> 7080: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? 7084: 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)( 7088: e1530001 cmp r3, r1 708c: 059f1198 ldreq r1, [pc, #408] ; 722c <_Heap_Walk+0x574> 7090: 0a000003 beq 70a4 <_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)" : "") 7094: e59fc194 ldr ip, [pc, #404] ; 7230 <_Heap_Walk+0x578> 7098: e1530006 cmp r3, r6 709c: e59f1184 ldr r1, [pc, #388] ; 7228 <_Heap_Walk+0x570> 70a0: 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)( 70a4: e58d2004 str r2, [sp, #4] 70a8: e58d0008 str r0, [sp, #8] 70ac: e58d300c str r3, [sp, #12] 70b0: e58d1010 str r1, [sp, #16] 70b4: e1a03007 mov r3, r7 70b8: e58da000 str sl, [sp] 70bc: e1a00005 mov r0, r5 70c0: e3a01000 mov r1, #0 70c4: e59f2168 ldr r2, [pc, #360] ; 7234 <_Heap_Walk+0x57c> 70c8: e1a0e00f mov lr, pc 70cc: e12fff14 bx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { 70d0: e5983000 ldr r3, [r8] 70d4: e15a0003 cmp sl, r3 70d8: 0a000009 beq 7104 <_Heap_Walk+0x44c> (*printer)( 70dc: e58d3004 str r3, [sp, #4] 70e0: e58da000 str sl, [sp] 70e4: e58d8008 str r8, [sp, #8] 70e8: e1a00005 mov r0, r5 70ec: e3a01001 mov r1, #1 70f0: e59f2140 ldr r2, [pc, #320] ; 7238 <_Heap_Walk+0x580> 70f4: e1a03007 mov r3, r7 70f8: e1a0e00f mov lr, pc 70fc: e12fff14 bx r4 7100: ea000031 b 71cc <_Heap_Walk+0x514> ); return false; } if ( !prev_used ) { 7104: e35b0000 cmp fp, #0 7108: 1a000007 bne 712c <_Heap_Walk+0x474> (*printer)( 710c: e59f2128 ldr r2, [pc, #296] ; 723c <_Heap_Walk+0x584> 7110: e1a00005 mov r0, r5 7114: e3a01001 mov r1, #1 7118: e1a03007 mov r3, r7 711c: e1a0e00f mov lr, pc 7120: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 7124: e1a0800b mov r8, fp 7128: ea00001e b 71a8 <_Heap_Walk+0x4f0> block = next_block; } while ( block != first_block ); return true; } 712c: e5963008 ldr r3, [r6, #8] 7130: ea000002 b 7140 <_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 ) { 7134: e1530007 cmp r3, r7 7138: 0a000016 beq 7198 <_Heap_Walk+0x4e0> return true; } free_block = free_block->next; 713c: 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 ) { 7140: e1530006 cmp r3, r6 7144: 1afffffa bne 7134 <_Heap_Walk+0x47c> 7148: ea000019 b 71b4 <_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) { 714c: e35b0000 cmp fp, #0 7150: 0a000007 beq 7174 <_Heap_Walk+0x4bc> (*printer)( 7154: e58da000 str sl, [sp] 7158: e1a00005 mov r0, r5 715c: e3a01000 mov r1, #0 7160: e59f20d8 ldr r2, [pc, #216] ; 7240 <_Heap_Walk+0x588> 7164: e1a03007 mov r3, r7 7168: e1a0e00f mov lr, pc 716c: e12fff14 bx r4 7170: ea000008 b 7198 <_Heap_Walk+0x4e0> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( 7174: e58da000 str sl, [sp] 7178: e5973000 ldr r3, [r7] 717c: e1a00005 mov r0, r5 7180: e58d3004 str r3, [sp, #4] 7184: e1a0100b mov r1, fp 7188: e59f20b4 ldr r2, [pc, #180] ; 7244 <_Heap_Walk+0x58c> 718c: e1a03007 mov r3, r7 7190: e1a0e00f mov lr, pc 7194: e12fff14 bx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); 7198: e59d2020 ldr r2, [sp, #32] 719c: e1580002 cmp r8, r2 71a0: 1affff6a bne 6f50 <_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; 71a4: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } 71a8: e1a00008 mov r0, r8 71ac: e28dd030 add sp, sp, #48 ; 0x30 71b0: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( 71b4: e59f208c ldr r2, [pc, #140] ; 7248 <_Heap_Walk+0x590> 71b8: e1a00005 mov r0, r5 71bc: e3a01001 mov r1, #1 71c0: e1a03007 mov r3, r7 71c4: e1a0e00f mov lr, pc 71c8: e12fff14 bx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; 71cc: e3a08000 mov r8, #0 71d0: eafffff4 b 71a8 <_Heap_Walk+0x4f0> =============================================================================== 00007b14 <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { 7b14: e92d4011 push {r0, r4, lr} 7b18: e1a04001 mov r4, r1 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; 7b1c: e2501000 subs r1, r0, #0 7b20: 059f306c ldreq r3, [pc, #108] ; 7b94 <_Objects_Id_to_name+0x80> 7b24: 05933004 ldreq r3, [r3, #4] 7b28: 05931008 ldreq r1, [r3, #8] 7b2c: e1a03c21 lsr r3, r1, #24 7b30: 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 ) 7b34: e2432001 sub r2, r3, #1 7b38: e3520002 cmp r2, #2 7b3c: 8a00000d bhi 7b78 <_Objects_Id_to_name+0x64> 7b40: ea00000e b 7b80 <_Objects_Id_to_name+0x6c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) 7b44: 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 ]; 7b48: e7930102 ldr r0, [r3, r2, lsl #2] if ( !information ) 7b4c: e3500000 cmp r0, #0 7b50: 0a000008 beq 7b78 <_Objects_Id_to_name+0x64> #if defined(RTEMS_SCORE_OBJECT_ENABLE_STRING_NAMES) if ( information->is_string ) return OBJECTS_INVALID_ID; #endif the_object = _Objects_Get( information, tmpId, &ignored_location ); 7b54: e1a0200d mov r2, sp 7b58: ebffffd3 bl 7aac <_Objects_Get> if ( !the_object ) 7b5c: e3500000 cmp r0, #0 7b60: 0a000004 beq 7b78 <_Objects_Id_to_name+0x64> return OBJECTS_INVALID_ID; *name = the_object->name; 7b64: e590300c ldr r3, [r0, #12] 7b68: e5843000 str r3, [r4] _Thread_Enable_dispatch(); 7b6c: eb00020c bl 83a4 <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; 7b70: e3a00000 mov r0, #0 7b74: ea000000 b 7b7c <_Objects_Id_to_name+0x68> 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; 7b78: e3a00003 mov r0, #3 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } 7b7c: e8bd8018 pop {r3, r4, pc} the_api = _Objects_Get_API( tmpId ); if ( !_Objects_Is_api_valid( the_api ) ) return OBJECTS_INVALID_ID; if ( !_Objects_Information_table[ the_api ] ) 7b80: e59f2010 ldr r2, [pc, #16] ; 7b98 <_Objects_Id_to_name+0x84> 7b84: e7923103 ldr r3, [r2, r3, lsl #2] 7b88: e3530000 cmp r3, #0 7b8c: 1affffec bne 7b44 <_Objects_Id_to_name+0x30> 7b90: eafffff8 b 7b78 <_Objects_Id_to_name+0x64> <== NOT EXECUTED =============================================================================== 0000a504 <_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 ) { a504: e92d4070 push {r4, r5, r6, lr} a508: e20220ff and r2, r2, #255 ; 0xff a50c: e1a04001 mov r4, r1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a510: e10f1000 mrs r1, CPSR a514: e3813080 orr r3, r1, #128 ; 0x80 a518: 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); a51c: e59f30a8 ldr r3, [pc, #168] ; a5cc <_Thread_queue_Extract_priority_helper+0xc8> a520: e5940010 ldr r0, [r4, #16] a524: 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 ) ) { a528: e3530000 cmp r3, #0 a52c: 1a000000 bne a534 <_Thread_queue_Extract_priority_helper+0x30> _ISR_Enable( level ); a530: ea000015 b a58c <_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)); a534: 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; a538: e8941001 ldm r4, {r0, ip} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a53c: e284503c add r5, r4, #60 ; 0x3c previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a540: 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; a544: 058c0000 streq r0, [ip] next_node->previous = previous_node; a548: 0580c004 streq ip, [r0, #4] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a54c: 0a00000c beq a584 <_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; a550: e5945040 ldr r5, [r4, #64] ; 0x40 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 ) ) { a554: e1530005 cmp r3, r5 if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { 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; a558: e5936000 ldr r6, [r3] previous_node->next = new_first_node; next_node->previous = new_first_node; a55c: e5803004 str r3, [r0, #4] 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; a560: e58c3000 str r3, [ip] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a564: e8831001 stm r3, {r0, ip} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a568: 0a000005 beq a584 <_Thread_queue_Extract_priority_helper+0x80> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); a56c: 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 = a570: e5860004 str r0, [r6, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; a574: e5836038 str r6, [r3, #56] ; 0x38 new_first_thread->Wait.Block2n.last = last_node; a578: e5835040 str r5, [r3, #64] ; 0x40 a57c: e283303c add r3, r3, #60 ; 0x3c last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a580: e5853000 str r3, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a584: e3520000 cmp r2, #0 a588: 0a000001 beq a594 <_Thread_queue_Extract_priority_helper+0x90> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a58c: e129f001 msr CPSR_fc, r1 a590: e8bd8070 pop {r4, r5, r6, pc} _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a594: e5943050 ldr r3, [r4, #80] ; 0x50 a598: e3530002 cmp r3, #2 a59c: 0a000001 beq a5a8 <_Thread_queue_Extract_priority_helper+0xa4> a5a0: e129f001 msr CPSR_fc, r1 a5a4: ea000004 b a5bc <_Thread_queue_Extract_priority_helper+0xb8> a5a8: e3a03003 mov r3, #3 <== NOT EXECUTED a5ac: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED a5b0: 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 ); a5b4: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a5b8: ebfff65b bl 7f2c <_Watchdog_Remove> <== NOT EXECUTED a5bc: e59f100c ldr r1, [pc, #12] ; a5d0 <_Thread_queue_Extract_priority_helper+0xcc> a5c0: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a5c4: e8bd4070 pop {r4, r5, r6, lr} a5c8: eafff135 b 6aa4 <_Thread_Clear_state> =============================================================================== 000140e8 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { 140e8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 140ec: e24dd018 sub sp, sp, #24 140f0: 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; 140f4: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 140f8: e28ba004 add sl, fp, #4 140fc: e28d7004 add r7, sp, #4 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 14100: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; 14104: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); 14108: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); 1410c: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; 14110: e98d2008 stmib sp, {r3, sp} 14114: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 14118: e1a0500d mov r5, sp */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1411c: 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; 14120: 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 ); 14124: 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; 14128: e59f2150 ldr r2, [pc, #336] ; 14280 <_Timer_server_Body+0x198> 1412c: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; 14130: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 14134: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; 14138: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); 1413c: e0611003 rsb r1, r1, r3 14140: e1a00009 mov r0, r9 14144: eb00106b bl 182f8 <_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(); 14148: e59f3134 ldr r3, [pc, #308] ; 14284 <_Timer_server_Body+0x19c> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; 1414c: 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(); 14150: 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 ) { 14154: e1560002 cmp r6, r2 14158: 9a000004 bls 14170 <_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 ); 1415c: e0621006 rsb r1, r2, r6 14160: e1a00008 mov r0, r8 14164: e1a02005 mov r2, r5 14168: eb001062 bl 182f8 <_Watchdog_Adjust_to_chain> 1416c: ea000003 b 14180 <_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 ); 14170: 31a00008 movcc r0, r8 14174: 33a01001 movcc r1, #1 14178: 30662002 rsbcc r2, r6, r2 1417c: 3b001035 blcc 18258 <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; 14180: 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 ); 14184: e5940078 ldr r0, [r4, #120] ; 0x78 14188: eb000282 bl 14b98 <_Chain_Get> if ( timer == NULL ) { 1418c: e2506000 subs r6, r0, #0 14190: 0a000009 beq 141bc <_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 ) { 14194: e5963038 ldr r3, [r6, #56] ; 0x38 14198: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); 1419c: 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 ) { 141a0: 0a000002 beq 141b0 <_Timer_server_Body+0xc8> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { 141a4: e3530003 cmp r3, #3 141a8: 1afffff5 bne 14184 <_Timer_server_Body+0x9c> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); 141ac: e1a00008 mov r0, r8 141b0: e2861010 add r1, r6, #16 141b4: eb00107a bl 183a4 <_Watchdog_Insert> 141b8: eafffff1 b 14184 <_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 ); 141bc: ebffff97 bl 14020 if ( _Chain_Is_empty( insert_chain ) ) { 141c0: e59d300c ldr r3, [sp, #12] 141c4: e153000a cmp r3, sl 141c8: 1a000006 bne 141e8 <_Timer_server_Body+0x100> ts->insert_chain = NULL; 141cc: e5846078 str r6, [r4, #120] ; 0x78 141d0: 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 ) ) { 141d4: e59d3000 ldr r3, [sp] 141d8: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; 141dc: 13a06000 movne r6, #0 141e0: 1a000002 bne 141f0 <_Timer_server_Body+0x108> 141e4: ea000013 b 14238 <_Timer_server_Body+0x150> 141e8: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED 141ec: eaffffcd b 14128 <_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 ); 141f0: ebffff8a bl 14020 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 141f4: e59d3000 ldr r3, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) 141f8: e1530007 cmp r3, r7 141fc: 0a00000b beq 14230 <_Timer_server_Body+0x148> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; 14200: e5932000 ldr r2, [r3] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { 14204: e3530000 cmp r3, #0 the_chain->first = new_first; 14208: e58d2000 str r2, [sp] new_first->previous = _Chain_Head(the_chain); 1420c: e5825004 str r5, [r2, #4] 14210: 0a000006 beq 14230 <_Timer_server_Body+0x148> watchdog->state = WATCHDOG_INACTIVE; 14214: e5836008 str r6, [r3, #8] 14218: 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 ); 1421c: e2830020 add r0, r3, #32 14220: e8900003 ldm r0, {r0, r1} 14224: e1a0e00f mov lr, pc 14228: e593f01c ldr pc, [r3, #28] } 1422c: eaffffef b 141f0 <_Timer_server_Body+0x108> 14230: e129f000 msr CPSR_fc, r0 14234: eaffffb9 b 14120 <_Timer_server_Body+0x38> } else { ts->active = false; 14238: e3a03000 mov r3, #0 1423c: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); 14240: ebffff7a bl 14030 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); 14244: e3a01008 mov r1, #8 14248: e5940000 ldr r0, [r4] 1424c: eb000dc1 bl 17958 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); 14250: e1a00004 mov r0, r4 14254: ebffff7b bl 14048 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); 14258: e1a00004 mov r0, r4 1425c: ebffff8d bl 14098 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); 14260: eb000b49 bl 16f8c <_Thread_Enable_dispatch> ts->active = true; 14264: e3a03001 mov r3, #1 14268: 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 ); 1426c: e2840008 add r0, r4, #8 14270: eb0010a1 bl 184fc <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); 14274: e2840040 add r0, r4, #64 ; 0x40 14278: eb00109f bl 184fc <_Watchdog_Remove> 1427c: eaffffa7 b 14120 <_Timer_server_Body+0x38> =============================================================================== 00009774 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 9774: e5902000 ldr r2, [r0] 9778: e5913000 ldr r3, [r1] 977c: e1520003 cmp r2, r3 return true; 9780: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) 9784: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) 9788: ba000005 blt 97a4 <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( 978c: e5900004 ldr r0, [r0, #4] 9790: e5913004 ldr r3, [r1, #4] 9794: e1500003 cmp r0, r3 9798: d3a00000 movle r0, #0 979c: c3a00001 movgt r0, #1 97a0: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; 97a4: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } 97a8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0001f668 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } 1f668: e3a00000 mov r0, #0 <== NOT EXECUTED 1f66c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00010ec8 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { 10ec8: e1a04000 mov r4, r0 10ecc: 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(); 10ed0: eb00021e bl 11750 <___DTOR_END__> * We need to do the exit processing on the global reentrancy structure. * This has already been done on the per task reentrancy structure * associated with this task. */ libc_wrapup(); 10ed4: ebffffdf bl 10e58 rtems_shutdown_executive(status); 10ed8: e1a00004 mov r0, r4 10edc: eb000036 bl 10fbc 10ee0: eafffffe b 10ee0 <_exit+0x18> <== NOT EXECUTED =============================================================================== 00001e3c <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); 1e3c: eaffffe5 b 1dd8 <== NOT EXECUTED =============================================================================== 000056a4 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 56a4: 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 ); 56a8: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { 56ac: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED 56b0: e1a04001 mov r4, r1 <== NOT EXECUTED 56b4: 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 ); 56b8: ebfffb2f bl 437c <== NOT EXECUTED if ( old_parent_pathlen == 0 ) 56bc: e2507000 subs r7, r0, #0 <== NOT EXECUTED 56c0: e28d3018 add r3, sp, #24 <== NOT EXECUTED 56c4: 1a000005 bne 56e0 <_rename_r+0x3c> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); 56c8: e1a00004 mov r0, r4 <== NOT EXECUTED 56cc: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED 56d0: e1a02003 mov r2, r3 <== NOT EXECUTED 56d4: eb0000dd bl 5a50 <== 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; 56d8: e1a05007 mov r5, r7 <== NOT EXECUTED 56dc: ea000008 b 5704 <_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, 56e0: e3a02000 mov r2, #0 <== NOT EXECUTED 56e4: e58d2000 str r2, [sp] <== NOT EXECUTED 56e8: e1a00004 mov r0, r4 <== NOT EXECUTED 56ec: e1a01007 mov r1, r7 <== NOT EXECUTED 56f0: e2822002 add r2, r2, #2 <== NOT EXECUTED 56f4: ebfffb02 bl 4304 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) 56f8: e3500000 cmp r0, #0 <== NOT EXECUTED 56fc: 1a000054 bne 5854 <_rename_r+0x1b0> <== NOT EXECUTED return -1; free_old_parentloc = true; 5700: e3a05001 mov r5, #1 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; 5704: e28de018 add lr, sp, #24 <== NOT EXECUTED 5708: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED 570c: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED 5710: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED 5714: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; 5718: 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; 571c: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5720: 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; 5724: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5728: eb00329e bl 121a8 <== NOT EXECUTED 572c: e1a01000 mov r1, r0 <== NOT EXECUTED 5730: e1a00004 mov r0, r4 <== NOT EXECUTED 5734: ebfffb1e bl 43b4 <== NOT EXECUTED 5738: e0844000 add r4, r4, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 573c: 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 ) ); 5740: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 5744: eb003297 bl 121a8 <== NOT EXECUTED 5748: e28d802c add r8, sp, #44 ; 0x2c <== NOT EXECUTED 574c: e1a01000 mov r1, r0 <== NOT EXECUTED 5750: e3a02000 mov r2, #0 <== NOT EXECUTED 5754: e1a00004 mov r0, r4 <== NOT EXECUTED 5758: e1a03008 mov r3, r8 <== NOT EXECUTED 575c: e58d2000 str r2, [sp] <== NOT EXECUTED 5760: ebfffabf bl 4264 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { 5764: e3500000 cmp r0, #0 <== NOT EXECUTED 5768: 0a000003 beq 577c <_rename_r+0xd8> <== NOT EXECUTED if ( free_old_parentloc ) 576c: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5770: 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 ) 5774: 0a000036 beq 5854 <_rename_r+0x1b0> <== NOT EXECUTED 5778: ea000013 b 57cc <_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 ); 577c: e28d4004 add r4, sp, #4 <== NOT EXECUTED 5780: e1a00006 mov r0, r6 <== NOT EXECUTED 5784: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED 5788: e1a02004 mov r2, r4 <== NOT EXECUTED 578c: eb0000af bl 5a50 <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); 5790: e59d0044 ldr r0, [sp, #68] ; 0x44 <== NOT EXECUTED 5794: e1a01004 mov r1, r4 <== NOT EXECUTED 5798: e0860000 add r0, r6, r0 <== NOT EXECUTED 579c: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED 57a0: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED 57a4: e1a0e00f mov lr, pc <== NOT EXECUTED 57a8: e593f004 ldr pc, [r3, #4] <== NOT EXECUTED if ( result != 0 ) { 57ac: e3500000 cmp r0, #0 <== NOT EXECUTED 57b0: 0a000007 beq 57d4 <_rename_r+0x130> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 57b4: e1a00004 mov r0, r4 <== NOT EXECUTED 57b8: ebfffb0c bl 43f0 <== NOT EXECUTED if ( free_old_parentloc ) 57bc: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 57c0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 57c4: 1bfffb09 blne 43f0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 57c8: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED 57cc: ebfffb07 bl 43f0 <== NOT EXECUTED 57d0: ea00001f b 5854 <_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 ) { 57d4: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED 57d8: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED 57dc: e1520003 cmp r2, r3 <== NOT EXECUTED 57e0: 0a00000a beq 5810 <_rename_r+0x16c> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 57e4: e1a00004 mov r0, r4 <== NOT EXECUTED 57e8: ebfffb00 bl 43f0 <== NOT EXECUTED if ( free_old_parentloc ) 57ec: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 57f0: 128d0018 addne r0, sp, #24 <== NOT EXECUTED 57f4: 1bfffafd blne 43f0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 57f8: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED 57fc: ebfffafb bl 43f0 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); 5800: eb002583 bl ee14 <__errno> <== NOT EXECUTED 5804: e3a03012 mov r3, #18 <== NOT EXECUTED 5808: e5803000 str r3, [r0] <== NOT EXECUTED 580c: ea000010 b 5854 <_rename_r+0x1b0> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); 5810: e28d6018 add r6, sp, #24 <== NOT EXECUTED 5814: e1a01008 mov r1, r8 <== NOT EXECUTED 5818: e1a02004 mov r2, r4 <== NOT EXECUTED 581c: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED 5820: e59dc010 ldr ip, [sp, #16] <== NOT EXECUTED 5824: e1a00006 mov r0, r6 <== NOT EXECUTED 5828: e1a0e00f mov lr, pc <== NOT EXECUTED 582c: e59cf040 ldr pc, [ip, #64] ; 0x40 <== NOT EXECUTED 5830: e1a07000 mov r7, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); 5834: e1a00004 mov r0, r4 <== NOT EXECUTED 5838: ebfffaec bl 43f0 <== NOT EXECUTED if ( free_old_parentloc ) 583c: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); 5840: 11a00006 movne r0, r6 <== NOT EXECUTED 5844: 1bfffae9 blne 43f0 <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); 5848: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED 584c: ebfffae7 bl 43f0 <== NOT EXECUTED return result; 5850: ea000000 b 5858 <_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; 5854: e3e07000 mvn r7, #0 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } 5858: e1a00007 mov r0, r7 <== NOT EXECUTED 585c: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED 5860: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00005750 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); 5750: e1a00001 mov r0, r1 <== NOT EXECUTED 5754: eaffffa9 b 5600 <== NOT EXECUTED =============================================================================== 00001c20 : #include int chroot( const char *pathname ) { 1c20: 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) { 1c24: e59f50b4 ldr r5, [pc, #180] ; 1ce0 1c28: e59f30b4 ldr r3, [pc, #180] ; 1ce4 1c2c: e5954000 ldr r4, [r5] 1c30: e1540003 cmp r4, r3 #include int chroot( const char *pathname ) { 1c34: e24dd018 sub sp, sp, #24 1c38: 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) { 1c3c: 1a000007 bne 1c60 rtems_libio_set_private_env(); /* try to set a new private env*/ 1c40: eb0004b6 bl 2f20 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ 1c44: e5953000 ldr r3, [r5] 1c48: e1530004 cmp r3, r4 1c4c: 1a000003 bne 1c60 rtems_set_errno_and_return_minus_one( ENOTSUP ); 1c50: eb002922 bl c0e0 <__errno> <== NOT EXECUTED 1c54: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED 1c58: e5803000 str r3, [r0] <== NOT EXECUTED 1c5c: ea000008 b 1c84 <== NOT EXECUTED } result = chdir(pathname); 1c60: e1a00006 mov r0, r6 1c64: eb001f77 bl 9a48 if (result) { 1c68: e2502000 subs r2, r0, #0 1c6c: 0a000006 beq 1c8c rtems_set_errno_and_return_minus_one( errno ); 1c70: eb00291a bl c0e0 <__errno> <== NOT EXECUTED 1c74: e1a04000 mov r4, r0 <== NOT EXECUTED 1c78: eb002918 bl c0e0 <__errno> <== NOT EXECUTED 1c7c: e5903000 ldr r3, [r0] <== NOT EXECUTED 1c80: e5843000 str r3, [r4] <== NOT EXECUTED 1c84: e3e00000 mvn r0, #0 <== NOT EXECUTED 1c88: ea000012 b 1cd8 <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { 1c8c: e28d4004 add r4, sp, #4 1c90: e59f0050 ldr r0, [pc, #80] ; 1ce8 1c94: e3a01001 mov r1, #1 1c98: e1a03004 mov r3, r4 1c9c: e58d2000 str r2, [sp] 1ca0: eb000059 bl 1e0c 1ca4: e2505000 subs r5, r0, #0 1ca8: 1afffff0 bne 1c70 /* 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); 1cac: e59f602c ldr r6, [pc, #44] ; 1ce0 1cb0: e5960000 ldr r0, [r6] 1cb4: e2800018 add r0, r0, #24 1cb8: eb00008e bl 1ef8 rtems_filesystem_root = loc; 1cbc: e596c000 ldr ip, [r6] 1cc0: e8b4000f ldm r4!, {r0, r1, r2, r3} 1cc4: e28cc018 add ip, ip, #24 1cc8: e8ac000f stmia ip!, {r0, r1, r2, r3} 1ccc: e5943000 ldr r3, [r4] 1cd0: e58c3000 str r3, [ip] return 0; 1cd4: e1a00005 mov r0, r5 } 1cd8: e28dd018 add sp, sp, #24 1cdc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000084c0 : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 84c0: 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; 84c4: e5936000 ldr r6, [r3] if (!device_name_table) 84c8: e3560000 cmp r6, #0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { 84cc: e1a09000 mov r9, r0 84d0: e1a04001 mov r4, r1 84d4: 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) 84d8: 13a07000 movne r7, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { 84dc: 159fa094 ldrne sl, [pc, #148] ; 8578 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) 84e0: 1a00001c bne 8558 rtems_set_errno_and_return_minus_one( EFAULT ); 84e4: eb00064b bl 9e18 <__errno> <== NOT EXECUTED 84e8: e3a0300e mov r3, #14 <== NOT EXECUTED 84ec: e5803000 str r3, [r0] <== NOT EXECUTED 84f0: e3e00000 mvn r0, #0 <== NOT EXECUTED 84f4: 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) 84f8: e5968000 ldr r8, [r6] 84fc: e3580000 cmp r8, #0 8500: 0a000012 beq 8550 continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) 8504: e1a00009 mov r0, r9 8508: e1a01008 mov r1, r8 850c: e1a02004 mov r2, r4 8510: eb000a09 bl ad3c 8514: e3500000 cmp r0, #0 8518: 1a00000c bne 8550 continue; if (device_name_table[i].device_name[pathnamelen] != '\0') 851c: e7d80004 ldrb r0, [r8, r4] 8520: e3500000 cmp r0, #0 8524: 1a000009 bne 8550 continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; 8528: e59f304c ldr r3, [pc, #76] ; 857c 852c: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; 8530: e59f3048 ldr r3, [pc, #72] ; 8580 8534: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8538: e59f3044 ldr r3, [pc, #68] ; 8584 853c: e5933000 ldr r3, [r3] 8540: e5933028 ldr r3, [r3, #40] ; 0x28 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; 8544: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; pathloc->ops = &devFS_ops; pathloc->mt_entry = rtems_filesystem_root.mt_entry; 8548: e5853010 str r3, [r5, #16] return 0; 854c: 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++) { 8550: e2877001 add r7, r7, #1 8554: e2866014 add r6, r6, #20 8558: e59a3000 ldr r3, [sl] 855c: e1570003 cmp r7, r3 8560: 3affffe4 bcc 84f8 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); 8564: eb00062b bl 9e18 <__errno> 8568: e3a03002 mov r3, #2 856c: e5803000 str r3, [r0] 8570: e3e00000 mvn r0, #0 } 8574: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== 000014e4 : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 14e4: 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( 14e8: e59f7058 ldr r7, [pc, #88] ; 1548 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { 14ec: 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( 14f0: e5970000 ldr r0, [r7] 14f4: e3a06014 mov r6, #20 14f8: e0000096 mul r0, r6, r0 14fc: eb001a6d bl 7eb8 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) 1500: e2505000 subs r5, r0, #0 1504: 1a000004 bne 151c rtems_set_errno_and_return_minus_one( ENOMEM ); 1508: eb002242 bl 9e18 <__errno> <== NOT EXECUTED 150c: e3a0300c mov r3, #12 <== NOT EXECUTED 1510: e5803000 str r3, [r0] <== NOT EXECUTED 1514: e3e00000 mvn r0, #0 <== NOT EXECUTED 1518: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( 151c: e5972000 ldr r2, [r7] 1520: e3a01000 mov r1, #0 1524: e0020296 mul r2, r6, r2 1528: eb0024a7 bl a7cc 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; 152c: e59f3018 ldr r3, [pc, #24] ; 154c 1530: e5843024 str r3, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = &devFS_ops; 1534: e2833038 add r3, r3, #56 ; 0x38 1538: 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; 153c: e584501c str r5, [r4, #28] return 0; 1540: e3a00000 mov r0, #0 } 1544: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00001550 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 1550: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} 1554: e58d2000 str r2, [sp] 1558: 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') && 155c: e5d03000 ldrb r3, [r0] 1560: e3530064 cmp r3, #100 ; 0x64 const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { 1564: e1a04000 mov r4, r0 1568: 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') && 156c: 1a000008 bne 1594 1570: e5d03001 ldrb r3, [r0, #1] 1574: e3530065 cmp r3, #101 ; 0x65 1578: 1a000005 bne 1594 157c: e5d03002 ldrb r3, [r0, #2] 1580: e3530076 cmp r3, #118 ; 0x76 1584: 1a000002 bne 1594 (path[2] == 'v') && (path[3] == '\0')) 1588: e5d00003 ldrb r0, [r0, #3] 158c: e3500000 cmp r0, #0 1590: 0a000039 beq 167c return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) 1594: e205aa0f and sl, r5, #61440 ; 0xf000 1598: e35a0a02 cmp sl, #8192 ; 0x2000 159c: 135a0a06 cmpne sl, #24576 ; 0x6000 15a0: 03a0a000 moveq sl, #0 15a4: 13a0a001 movne sl, #1 15a8: 0a000002 beq 15b8 rtems_set_errno_and_return_minus_one( EINVAL ); 15ac: eb002219 bl 9e18 <__errno> <== NOT EXECUTED 15b0: e3a03016 mov r3, #22 <== NOT EXECUTED 15b4: ea000008 b 15dc <== 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; 15b8: e59d3028 ldr r3, [sp, #40] ; 0x28 15bc: e5936000 ldr r6, [r3] if (!device_name_table) 15c0: e3560000 cmp r6, #0 15c4: 13e07000 mvnne r7, #0 15c8: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ 15cc: 159fb0ac ldrne fp, [pc, #172] ; 1680 15d0: 1a000011 bne 161c 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 ); 15d4: eb00220f bl 9e18 <__errno> <== NOT EXECUTED 15d8: e3a0300e mov r3, #14 <== NOT EXECUTED 15dc: e5803000 str r3, [r0] <== NOT EXECUTED 15e0: e3e00000 mvn r0, #0 <== NOT EXECUTED 15e4: ea000024 b 167c <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) 15e8: e796100a ldr r1, [r6, sl] 15ec: e3510000 cmp r1, #0 15f0: 0a000006 beq 1610 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) 15f4: e1a00004 mov r0, r4 <== NOT EXECUTED 15f8: eb0024ef bl a9bc <== NOT EXECUTED 15fc: e3500000 cmp r0, #0 <== NOT EXECUTED 1600: 1a000003 bne 1614 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); 1604: eb002203 bl 9e18 <__errno> <== NOT EXECUTED 1608: e3a03011 mov r3, #17 <== NOT EXECUTED 160c: eafffff2 b 15dc <== 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; 1610: 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++){ 1614: e2888001 add r8, r8, #1 1618: e28aa014 add sl, sl, #20 161c: e59b3000 ldr r3, [fp] 1620: e1580003 cmp r8, r3 1624: 3affffef bcc 15e8 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) 1628: e3770001 cmn r7, #1 162c: 1a000004 bne 1644 rtems_set_errno_and_return_minus_one( ENOMEM ); 1630: eb0021f8 bl 9e18 <__errno> <== NOT EXECUTED 1634: e3a0300c mov r3, #12 <== NOT EXECUTED 1638: e5803000 str r3, [r0] <== NOT EXECUTED 163c: e1a00007 mov r0, r7 <== NOT EXECUTED 1640: ea00000d b 167c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1644: e10fa000 mrs sl, CPSR 1648: e38a3080 orr r3, sl, #128 ; 0x80 164c: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; 1650: e3a03014 mov r3, #20 1654: e0070793 mul r7, r3, r7 device_name_table[slot].device_name_length = strlen(path); 1658: 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; 165c: e7864007 str r4, [r6, r7] device_name_table[slot].device_name_length = strlen(path); 1660: eb00259d bl acdc device_name_table[slot].major = major; 1664: 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; 1668: e0868007 add r8, r6, r7 device_name_table[slot].device_name_length = strlen(path); 166c: e9880209 stmib r8, {r0, r3, r9} device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; 1670: e5885010 str r5, [r8, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1674: e129f00a msr CPSR_fc, sl _ISR_Enable(level); return 0; 1678: e3a00000 mov r0, #0 } 167c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000175c : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { 175c: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; args.count = count; 1760: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; 1764: e2802014 add r2, r0, #20 <== NOT EXECUTED 1768: e892000c ldm r2, {r2, r3} <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; 176c: e280c00c add ip, r0, #12 <== NOT EXECUTED 1770: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; args.flags = iop->flags; 1774: e58d2014 str r2, [sp, #20] <== NOT EXECUTED args.bytes_moved = 0; 1778: 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; 177c: e58d0000 str r0, [sp] <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; 1780: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; 1784: e58d2018 str r2, [sp, #24] <== NOT EXECUTED status = rtems_io_read( 1788: e2830008 add r0, r3, #8 <== NOT EXECUTED 178c: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 1790: 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; 1794: 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( 1798: eb000f3f bl 549c <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) 179c: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; 17a0: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->minor, (void *) &args ); if ( status ) return rtems_deviceio_errno(status); 17a4: 1b001b7a blne 8594 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } 17a8: e28dd01c add sp, sp, #28 <== NOT EXECUTED 17ac: e8bd8800 pop {fp, pc} <== NOT EXECUTED =============================================================================== 000017b0 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; 17b0: e5903000 ldr r3, [r0] if (!the_dev) 17b4: e3530000 cmp r3, #0 int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { 17b8: 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) 17bc: 1a000004 bne 17d4 rtems_set_errno_and_return_minus_one( EFAULT ); 17c0: eb002194 bl 9e18 <__errno> <== NOT EXECUTED 17c4: e3a0300e mov r3, #14 <== NOT EXECUTED 17c8: e5803000 str r3, [r0] <== NOT EXECUTED 17cc: e3e00000 mvn r0, #0 <== NOT EXECUTED 17d0: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; 17d4: e2830008 add r0, r3, #8 17d8: e890000d ldm r0, {r0, r2, r3} buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); 17dc: e5810018 str r0, [r1, #24] 17e0: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; 17e4: e581300c str r3, [r1, #12] return 0; 17e8: e3a00000 mov r0, #0 } 17ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 0000b458 : rtems_libio_t *iop, rtems_off64_t length ) { return 0; } b458: e3a00000 mov r0, #0 <== NOT EXECUTED b45c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00002b90 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2b90: e59030b4 ldr r3, [r0, #180] ; 0xb4 2b94: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { 2b98: e92d4030 push {r4, r5, lr} 2b9c: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { 2ba0: 08bd8030 popeq {r4, r5, pc} rtems_interrupt_disable (level); 2ba4: ebfffff5 bl 2b80 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; 2ba8: 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) { 2bac: ea000008 b 2bd4 tty->rawOutBufState = rob_wait; 2bb0: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 2bb4: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( 2bb8: e3a01000 mov r1, #0 <== NOT EXECUTED 2bbc: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED 2bc0: e1a02001 mov r2, r1 <== NOT EXECUTED 2bc4: eb0008ca bl 4ef4 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2bc8: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_fatal_error_occurred (sc); 2bcc: 1b000a5e blne 554c <== NOT EXECUTED rtems_interrupt_disable (level); 2bd0: ebffffea bl 2b80 <== 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) { 2bd4: e5942084 ldr r2, [r4, #132] ; 0x84 2bd8: e5943080 ldr r3, [r4, #128] ; 0x80 2bdc: e1520003 cmp r2, r3 2be0: 1afffff2 bne 2bb0 2be4: e129f000 msr CPSR_fc, r0 2be8: e8bd8030 pop {r4, r5, pc} =============================================================================== 00003868 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) 3868: e5903020 ldr r3, [r0, #32] 386c: 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) { 3870: e92d41f0 push {r4, r5, r6, r7, r8, lr} 3874: e1a04000 mov r4, r0 3878: e1a07001 mov r7, r1 if (tty->ccount == 0) 387c: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} return; if (lineFlag) { 3880: e3510000 cmp r1, #0 3884: 0a000060 beq 3a0c if (!(tty->termios.c_lflag & ECHO)) { 3888: e590303c ldr r3, [r0, #60] ; 0x3c 388c: e2132008 ands r2, r3, #8 tty->ccount = 0; 3890: 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)) { 3894: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} tty->ccount = 0; return; } if (!(tty->termios.c_lflag & ECHOE)) { 3898: e2133010 ands r3, r3, #16 389c: 1a00005a bne 3a0c tty->ccount = 0; 38a0: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); 38a4: e1a01004 mov r1, r4 <== NOT EXECUTED 38a8: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED 38ac: ebffffca bl 37dc <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) 38b0: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 38b4: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); 38b8: 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) 38bc: 08bd81f0 popeq {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED 38c0: ea00000b b 38f4 <== NOT EXECUTED return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 38c4: e2411001 sub r1, r1, #1 if (tty->termios.c_lflag & ECHO) { 38c8: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 38cc: e594001c ldr r0, [r4, #28] 38d0: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { 38d4: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; 38d8: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { 38dc: 0a000047 beq 3a00 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { 38e0: e3570000 cmp r7, #0 38e4: 1a000005 bne 3900 38e8: e3130010 tst r3, #16 38ec: 1a000003 bne 3900 echo (tty->termios.c_cc[VERASE], tty); 38f0: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED 38f4: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } 38f8: 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); 38fc: eaffffb6 b 37dc <== NOT EXECUTED } else if (c == '\t') { 3900: e3550009 cmp r5, #9 3904: 1a00001f bne 3988 int col = tty->read_start_column; 3908: 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)) { 390c: 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; 3910: 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) 3914: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3918: ea00000c b 3950 c = tty->cbuf[i++]; 391c: e7d0c002 ldrb ip, [r0, r2] if (c == '\t') { 3920: e35c0009 cmp ip, #9 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; 3924: e2822001 add r2, r2, #1 if (c == '\t') { col = (col | 7) + 1; 3928: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { 392c: 0a000006 beq 394c col = (col | 7) + 1; } else if (iscntrl (c)) { 3930: e088c00c add ip, r8, ip 3934: e5dcc001 ldrb ip, [ip, #1] 3938: e31c0020 tst ip, #32 393c: 0a000002 beq 394c if (tty->termios.c_lflag & ECHOCTL) 3940: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; 3944: 12855002 addne r5, r5, #2 <== NOT EXECUTED 3948: ea000000 b 3950 <== NOT EXECUTED } else { col++; 394c: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { 3950: e1520001 cmp r2, r1 3954: 1afffff0 bne 391c 3958: ea000006 b 3978 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); 395c: e59f00bc ldr r0, [pc, #188] ; 3a20 3960: e3a01001 mov r1, #1 3964: e1a02004 mov r2, r4 3968: ebffff07 bl 358c tty->column--; 396c: e5943028 ldr r3, [r4, #40] ; 0x28 3970: e2433001 sub r3, r3, #1 3974: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { 3978: e5943028 ldr r3, [r4, #40] ; 0x28 397c: e1530005 cmp r3, r5 3980: cafffff5 bgt 395c 3984: ea00001d b 3a00 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { 3988: e5962000 ldr r2, [r6] 398c: e2855001 add r5, r5, #1 3990: e7d22005 ldrb r2, [r2, r5] 3994: e3120020 tst r2, #32 3998: 0a000009 beq 39c4 399c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 39a0: 0a000007 beq 39c4 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 39a4: e59f0078 ldr r0, [pc, #120] ; 3a24 <== NOT EXECUTED 39a8: e3a01003 mov r1, #3 <== NOT EXECUTED 39ac: e1a02004 mov r2, r4 <== NOT EXECUTED 39b0: ebfffef5 bl 358c <== NOT EXECUTED if (tty->column) 39b4: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 39b8: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 39bc: 12433001 subne r3, r3, #1 <== NOT EXECUTED 39c0: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { 39c4: e5963000 ldr r3, [r6] 39c8: e7d33005 ldrb r3, [r3, r5] 39cc: e3130020 tst r3, #32 39d0: 0a000002 beq 39e0 39d4: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED 39d8: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED 39dc: 0a000007 beq 3a00 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); 39e0: e59f003c ldr r0, [pc, #60] ; 3a24 39e4: e3a01003 mov r1, #3 39e8: e1a02004 mov r2, r4 39ec: ebfffee6 bl 358c if (tty->column) 39f0: e5943028 ldr r3, [r4, #40] ; 0x28 39f4: e3530000 cmp r3, #0 tty->column--; 39f8: 12433001 subne r3, r3, #1 39fc: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) 3a00: e3570000 cmp r7, #0 3a04: 1a000001 bne 3a10 3a08: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} 3a0c: e59f6014 ldr r6, [pc, #20] ; 3a28 echo ('\n', tty); return; } } while (tty->ccount) { 3a10: e5941020 ldr r1, [r4, #32] 3a14: e3510000 cmp r1, #0 3a18: 1affffa9 bne 38c4 3a1c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000025d4 : int fcntl( int fd, int cmd, ... ) { 25d4: e92d000e push {r1, r2, r3} 25d8: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25dc: e59f21a4 ldr r2, [pc, #420] ; 2788 25e0: e5921000 ldr r1, [r2] ... ) { int ret; va_list ap; va_start( ap, cmd ); 25e4: e28d301c add r3, sp, #28 int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25e8: e1500001 cmp r0, r1 int fcntl( int fd, int cmd, ... ) { 25ec: e59d7018 ldr r7, [sp, #24] int ret; va_list ap; va_start( ap, cmd ); 25f0: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); 25f4: 2a000006 bcs 2614 iop = rtems_libio_iop( fd ); 25f8: e59f218c ldr r2, [pc, #396] ; 278c 25fc: e5922000 ldr r2, [r2] 2600: e3a04038 mov r4, #56 ; 0x38 2604: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); 2608: e5940014 ldr r0, [r4, #20] 260c: e3100c01 tst r0, #256 ; 0x100 2610: 1a000002 bne 2620 2614: eb002965 bl cbb0 <__errno> 2618: e3a03009 mov r3, #9 261c: ea000047 b 2740 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { 2620: e3570009 cmp r7, #9 2624: 979ff107 ldrls pc, [pc, r7, lsl #2] 2628: ea000042 b 2738 262c: 00002654 .word 0x00002654 <== NOT EXECUTED 2630: 000026c4 .word 0x000026c4 <== NOT EXECUTED 2634: 000026d4 .word 0x000026d4 <== NOT EXECUTED 2638: 000026f4 .word 0x000026f4 <== NOT EXECUTED 263c: 00002700 .word 0x00002700 <== NOT EXECUTED 2640: 0000272c .word 0x0000272c <== NOT EXECUTED 2644: 0000272c .word 0x0000272c <== NOT EXECUTED 2648: 0000272c .word 0x0000272c <== NOT EXECUTED 264c: 0000272c .word 0x0000272c <== NOT EXECUTED 2650: 0000272c .word 0x0000272c <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); 2654: e5933000 ldr r3, [r3] if ( fd2 ) 2658: e3530000 cmp r3, #0 265c: 0a000004 beq 2674 diop = rtems_libio_iop( fd2 ); 2660: e1530001 cmp r3, r1 <== NOT EXECUTED 2664: 33a06038 movcc r6, #56 ; 0x38 <== NOT EXECUTED 2668: 30262693 mlacc r6, r3, r6, r2 <== NOT EXECUTED 266c: 3a000005 bcc 2688 <== NOT EXECUTED 2670: ea000003 b 2684 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); 2674: eb000190 bl 2cbc if ( diop == 0 ) { 2678: e2506000 subs r6, r0, #0 267c: 1a000001 bne 2688 2680: ea00003b b 2774 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); 2684: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; 2688: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; 268c: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; 2690: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; 2694: e8b5000f ldm r5!, {r0, r1, r2, r3} 2698: e286c018 add ip, r6, #24 269c: e8ac000f stmia ip!, {r0, r1, r2, r3} 26a0: e5953000 ldr r3, [r5] 26a4: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); 26a8: e59f30dc ldr r3, [pc, #220] ; 278c 26ac: e5933000 ldr r3, [r3] 26b0: e0636006 rsb r6, r3, r6 26b4: e59f30d4 ldr r3, [pc, #212] ; 2790 26b8: e1a061c6 asr r6, r6, #3 26bc: e0060693 mul r6, r3, r6 26c0: ea000020 b 2748 break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); 26c4: e3100b02 tst r0, #2048 ; 0x800 26c8: 03a06000 moveq r6, #0 26cc: 13a06001 movne r6, #1 26d0: ea00001e b 2750 * 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 ) ) 26d4: e5936000 ldr r6, [r3] 26d8: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; 26dc: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 26e0: 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; 26e4: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; 26e8: 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 ) ) 26ec: 0a000017 beq 2750 26f0: ea00000b b 2724 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); 26f4: eb00015e bl 2c74 26f8: e1a06000 mov r6, r0 26fc: ea000011 b 2748 break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); 2700: e5930000 ldr r0, [r3] 2704: eb00014d bl 2c40 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); 2708: e5942014 ldr r2, [r4, #20] 270c: e59f3080 ldr r3, [pc, #128] ; 2794 2710: e3c22c02 bic r2, r2, #512 ; 0x200 2714: e0003003 and r3, r0, r3 2718: e3c22001 bic r2, r2, #1 271c: e1833002 orr r3, r3, r2 2720: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; 2724: e3a06000 mov r6, #0 2728: ea000008 b 2750 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; 272c: eb00291f bl cbb0 <__errno> 2730: e3a03086 mov r3, #134 ; 0x86 2734: ea000001 b 2740 ret = -1; break; default: errno = EINVAL; 2738: eb00291c bl cbb0 <__errno> 273c: e3a03016 mov r3, #22 2740: e5803000 str r3, [r0] 2744: ea00000a b 2774 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { 2748: e3560000 cmp r6, #0 274c: ba000009 blt 2778 int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); 2750: e5943020 ldr r3, [r4, #32] 2754: e1a01004 mov r1, r4 2758: e1a00007 mov r0, r7 275c: e1a0e00f mov lr, pc 2760: e593f030 ldr pc, [r3, #48] ; 0x30 if (err) { 2764: e2504000 subs r4, r0, #0 2768: 0a000002 beq 2778 errno = err; 276c: eb00290f bl cbb0 <__errno> <== NOT EXECUTED 2770: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; 2774: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } 2778: e1a00006 mov r0, r6 277c: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} 2780: e28dd00c add sp, sp, #12 2784: e12fff1e bx lr =============================================================================== 0000aaa0 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { aaa0: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} aaa4: e1a06000 mov r6, r0 aaa8: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); aaac: ebffff87 bl a8d0 if (err) aab0: e250a000 subs sl, r0, #0 aab4: 1a0000b8 bne ad9c return err; pipe = *pipep; aab8: e5964000 ldr r4, [r6] if (pipe == NULL) { aabc: e3540000 cmp r4, #0 aac0: 1a00003a bne abb0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); aac4: e2800034 add r0, r0, #52 ; 0x34 aac8: ebffe267 bl 346c if (pipe == NULL) aacc: e2508000 subs r8, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); aad0: e1a04000 mov r4, r0 if (pipe == NULL) aad4: 0a000033 beq aba8 return err; memset(pipe, 0, sizeof(pipe_control_t)); aad8: e1a0100a mov r1, sl aadc: e3a02034 mov r2, #52 ; 0x34 aae0: eb000c38 bl dbc8 pipe->Size = PIPE_BUF; aae4: e3a00c02 mov r0, #512 ; 0x200 aae8: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); aaec: ebffe25e bl 346c if (! pipe->Buffer) aaf0: 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); aaf4: e5840000 str r0, [r4] if (! pipe->Buffer) aaf8: 0a000028 beq aba0 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), aafc: e59f52a0 ldr r5, [pc, #672] ; ada4 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ab00: e59f02a0 ldr r0, [pc, #672] ; ada8 rtems_build_name ('P', 'I', 'r', c), ab04: e5d53000 ldrb r3, [r5] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( ab08: e1a0100a mov r1, sl ab0c: e1830000 orr r0, r3, r0 ab10: e1a0200a mov r2, sl ab14: e284302c add r3, r4, #44 ; 0x2c ab18: eb00044d bl bc54 ab1c: e2501000 subs r1, r0, #0 ab20: 1a00001c bne ab98 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), ab24: 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( ab28: e59f027c ldr r0, [pc, #636] ; adac ab2c: e1a02001 mov r2, r1 ab30: e1830000 orr r0, r3, r0 ab34: e2843030 add r3, r4, #48 ; 0x30 ab38: eb000445 bl bc54 ab3c: e2503000 subs r3, r0, #0 ab40: 1a000012 bne ab90 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, ab44: 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( ab48: e59f0260 ldr r0, [pc, #608] ; adb0 ab4c: e2841028 add r1, r4, #40 ; 0x28 ab50: e58d1000 str r1, [sp] ab54: e1820000 orr r0, r2, r0 ab58: e3a01001 mov r1, #1 ab5c: e3a02010 mov r2, #16 ab60: ebffedc3 bl 6274 ab64: e3500000 cmp r0, #0 ab68: 1a000006 bne ab88 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ab6c: e5d53000 ldrb r3, [r5] ab70: e353007a cmp r3, #122 ; 0x7a ab74: e2832001 add r2, r3, #1 c = 'a'; ab78: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') ab7c: e5c52000 strb r2, [r5] c = 'a'; ab80: 05c53000 strbeq r3, [r5] ab84: ea000009 b abb0 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); ab88: e5980030 ldr r0, [r8, #48] ; 0x30 ab8c: eb000460 bl bd14 err_wbar: rtems_barrier_delete(pipe->readBarrier); ab90: e598002c ldr r0, [r8, #44] ; 0x2c ab94: eb00045e bl bd14 err_rbar: free(pipe->Buffer); ab98: e5980000 ldr r0, [r8] ab9c: ebffe0cc bl 2ed4 err_buf: free(pipe); aba0: e1a00008 mov r0, r8 aba4: ebffe0ca bl 2ed4 if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; aba8: e3e0a00b mvn sl, #11 abac: ea00000d b abe8 err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) abb0: e3a01000 mov r1, #0 abb4: e5940028 ldr r0, [r4, #40] ; 0x28 abb8: e1a02001 mov r2, r1 abbc: ebffee3e bl 64bc err = -EINTR; if (*pipep == NULL) { abc0: e5963000 ldr r3, [r6] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; abc4: e3500000 cmp r0, #0 abc8: 03a0a000 moveq sl, #0 abcc: 13e0a003 mvnne sl, #3 if (*pipep == NULL) { abd0: e3530000 cmp r3, #0 abd4: 1a000003 bne abe8 if (err) abd8: e35a0000 cmp sl, #0 pipe_free(pipe); else *pipep = pipe; abdc: 05864000 streq r4, [r6] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) pipe_free(pipe); abe0: 11a00004 movne r0, r4 abe4: 1bffff5d blne a960 else *pipep = pipe; } out: pipe_unlock(); abe8: ebffff69 bl a994 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) abec: e35a0000 cmp sl, #0 abf0: 1a000069 bne ad9c return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { abf4: e5973014 ldr r3, [r7, #20] abf8: e2033006 and r3, r3, #6 abfc: e3530004 cmp r3, #4 int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; ac00: e5964000 ldr r4, [r6] switch (LIBIO_ACCMODE(iop)) { ac04: 0a000024 beq ac9c ac08: e3530006 cmp r3, #6 ac0c: 0a000047 beq ad30 ac10: e3530002 cmp r3, #2 ac14: 1a000059 bne ad80 case LIBIO_FLAGS_READ: pipe->readerCounter ++; ac18: e5943020 ldr r3, [r4, #32] ac1c: e2833001 add r3, r3, #1 ac20: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) ac24: e5943010 ldr r3, [r4, #16] ac28: e2832001 add r2, r3, #1 ac2c: e3530000 cmp r3, #0 ac30: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); ac34: 05940030 ldreq r0, [r4, #48] ; 0x30 ac38: 028d1004 addeq r1, sp, #4 ac3c: 0b00045c bleq bdb4 if (pipe->Writers == 0) { ac40: e5943014 ldr r3, [r4, #20] ac44: e3530000 cmp r3, #0 ac48: 1a00004c bne ad80 /* Not an error */ if (LIBIO_NODELAY(iop)) ac4c: e5973014 ldr r3, [r7, #20] ac50: e3130001 tst r3, #1 ac54: 1a000049 bne ad80 break; prevCounter = pipe->writerCounter; ac58: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); ac5c: e5940028 ldr r0, [r4, #40] ; 0x28 ac60: ebffee5b bl 65d4 if (! PIPE_READWAIT(pipe)) ac64: e3a01000 mov r1, #0 ac68: e594002c ldr r0, [r4, #44] ; 0x2c ac6c: eb000466 bl be0c ac70: e2501000 subs r1, r0, #0 ac74: 1a000044 bne ad8c goto out_error; if (! PIPE_LOCK(pipe)) ac78: e5940028 ldr r0, [r4, #40] ; 0x28 ac7c: e1a02001 mov r2, r1 ac80: ebffee0d bl 64bc ac84: e3500000 cmp r0, #0 ac88: 1a00003f bne ad8c goto out_error; } while (prevCounter == pipe->writerCounter); ac8c: e5943024 ldr r3, [r4, #36] ; 0x24 ac90: e1550003 cmp r5, r3 ac94: 0afffff0 beq ac5c ac98: ea000038 b ad80 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; ac9c: e5943024 ldr r3, [r4, #36] ; 0x24 aca0: e2833001 add r3, r3, #1 aca4: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) aca8: e5943014 ldr r3, [r4, #20] acac: e2832001 add r2, r3, #1 acb0: e3530000 cmp r3, #0 acb4: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); acb8: 0594002c ldreq r0, [r4, #44] ; 0x2c acbc: 028d1004 addeq r1, sp, #4 acc0: 0b00043b bleq bdb4 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { acc4: e5943010 ldr r3, [r4, #16] acc8: e3530000 cmp r3, #0 accc: 1a00002b bne ad80 acd0: e5973014 ldr r3, [r7, #20] acd4: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; acd8: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { acdc: 0a000003 beq acf0 PIPE_UNLOCK(pipe); ace0: e5940028 ldr r0, [r4, #40] ; 0x28 ace4: ebffee3a bl 65d4 err = -ENXIO; ace8: e3e0a005 mvn sl, #5 goto out_error; acec: ea000027 b ad90 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); acf0: e5940028 ldr r0, [r4, #40] ; 0x28 acf4: ebffee36 bl 65d4 if (! PIPE_WRITEWAIT(pipe)) acf8: e3a01000 mov r1, #0 acfc: e5940030 ldr r0, [r4, #48] ; 0x30 ad00: eb000441 bl be0c ad04: e2501000 subs r1, r0, #0 ad08: 1a00001f bne ad8c goto out_error; if (! PIPE_LOCK(pipe)) ad0c: e5940028 ldr r0, [r4, #40] ; 0x28 ad10: e1a02001 mov r2, r1 ad14: ebffede8 bl 64bc ad18: e3500000 cmp r0, #0 ad1c: 1a00001a bne ad8c goto out_error; } while (prevCounter == pipe->readerCounter); ad20: e5943020 ldr r3, [r4, #32] ad24: e1550003 cmp r5, r3 ad28: 0afffff0 beq acf0 ad2c: ea000013 b ad80 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; ad30: e5943020 ldr r3, [r4, #32] ad34: e2833001 add r3, r3, #1 ad38: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) ad3c: e5943010 ldr r3, [r4, #16] ad40: e2832001 add r2, r3, #1 ad44: e3530000 cmp r3, #0 ad48: e5842010 str r2, [r4, #16] PIPE_WAKEUPWRITERS(pipe); ad4c: 05940030 ldreq r0, [r4, #48] ; 0x30 ad50: 028d1004 addeq r1, sp, #4 ad54: 0b000416 bleq bdb4 pipe->writerCounter ++; ad58: e5943024 ldr r3, [r4, #36] ; 0x24 ad5c: e2833001 add r3, r3, #1 ad60: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) ad64: e5943014 ldr r3, [r4, #20] ad68: e2832001 add r2, r3, #1 ad6c: e3530000 cmp r3, #0 ad70: e5842014 str r2, [r4, #20] PIPE_WAKEUPREADERS(pipe); ad74: 0594002c ldreq r0, [r4, #44] ; 0x2c ad78: 028d1004 addeq r1, sp, #4 ad7c: 0b00040c bleq bdb4 break; } PIPE_UNLOCK(pipe); ad80: e5940028 ldr r0, [r4, #40] ; 0x28 ad84: ebffee12 bl 65d4 return 0; ad88: ea000003 b ad9c goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; ad8c: e3e0a003 mvn sl, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); ad90: e1a00006 mov r0, r6 ad94: e1a01007 mov r1, r7 ad98: ebffff07 bl a9bc return err; } ad9c: e1a0000a mov r0, sl ada0: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== 00002818 : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); 2818: e59f3104 ldr r3, [pc, #260] ; 2924 281c: e5933000 ldr r3, [r3] 2820: e1500003 cmp r0, r3 long fpathconf( int fd, int name ) { 2824: 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); 2828: 2a000006 bcs 2848 iop = rtems_libio_iop(fd); 282c: e59f30f4 ldr r3, [pc, #244] ; 2928 2830: e5933000 ldr r3, [r3] 2834: e3a02038 mov r2, #56 ; 0x38 2838: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); 283c: e5903014 ldr r3, [r0, #20] 2840: e3130c01 tst r3, #256 ; 0x100 2844: 1a000002 bne 2854 2848: eb0028d8 bl cbb0 <__errno> 284c: e3a03009 mov r3, #9 2850: ea000003 b 2864 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); 2854: e3130002 tst r3, #2 2858: 1a000004 bne 2870 285c: eb0028d3 bl cbb0 <__errno> <== NOT EXECUTED 2860: e3a03016 mov r3, #22 <== NOT EXECUTED 2864: e5803000 str r3, [r0] 2868: e3e00000 mvn r0, #0 286c: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; 2870: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { 2874: e351000b cmp r1, #11 2878: 979ff101 ldrls pc, [pc, r1, lsl #2] 287c: ea000023 b 2910 2880: 000028b0 .word 0x000028b0 <== NOT EXECUTED 2884: 000028b8 .word 0x000028b8 <== NOT EXECUTED 2888: 000028c0 .word 0x000028c0 <== NOT EXECUTED 288c: 000028c8 .word 0x000028c8 <== NOT EXECUTED 2890: 000028d0 .word 0x000028d0 <== NOT EXECUTED 2894: 000028d8 .word 0x000028d8 <== NOT EXECUTED 2898: 000028e0 .word 0x000028e0 <== NOT EXECUTED 289c: 000028e8 .word 0x000028e8 <== NOT EXECUTED 28a0: 000028f0 .word 0x000028f0 <== NOT EXECUTED 28a4: 000028f8 .word 0x000028f8 <== NOT EXECUTED 28a8: 00002900 .word 0x00002900 <== NOT EXECUTED 28ac: 00002908 .word 0x00002908 <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; 28b0: e5930038 ldr r0, [r3, #56] ; 0x38 break; 28b4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; 28b8: e593003c ldr r0, [r3, #60] ; 0x3c break; 28bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; 28c0: e5930040 ldr r0, [r3, #64] ; 0x40 break; 28c4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; 28c8: e5930044 ldr r0, [r3, #68] ; 0x44 break; 28cc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; 28d0: e5930048 ldr r0, [r3, #72] ; 0x48 break; 28d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; 28d8: e593004c ldr r0, [r3, #76] ; 0x4c break; 28dc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; 28e0: e5930054 ldr r0, [r3, #84] ; 0x54 break; 28e4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; 28e8: e5930058 ldr r0, [r3, #88] ; 0x58 break; 28ec: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; 28f0: e5930064 ldr r0, [r3, #100] ; 0x64 break; 28f4: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; 28f8: e5930050 ldr r0, [r3, #80] ; 0x50 break; 28fc: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; 2900: e593005c ldr r0, [r3, #92] ; 0x5c break; 2904: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; 2908: e5930060 ldr r0, [r3, #96] ; 0x60 break; 290c: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); 2910: eb0028a6 bl cbb0 <__errno> 2914: e3a03016 mov r3, #22 2918: e5803000 str r3, [r0] 291c: e3e00000 mvn r0, #0 break; } return return_value; } 2920: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00002eec : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2eec: e59f3028 ldr r3, [pc, #40] ; 2f1c <== NOT EXECUTED 2ef0: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { 2ef4: e92d4010 push {r4, lr} <== NOT EXECUTED 2ef8: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env 2efc: 08bd8010 popeq {r4, pc} <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); 2f00: e2800004 add r0, r0, #4 <== NOT EXECUTED 2f04: ebfffbfb bl 1ef8 <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); 2f08: e2840018 add r0, r4, #24 <== NOT EXECUTED 2f0c: ebfffbf9 bl 1ef8 <== NOT EXECUTED free(env); 2f10: e1a00004 mov r0, r4 <== NOT EXECUTED } } 2f14: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); 2f18: eafffbfb b 1f0c <== NOT EXECUTED =============================================================================== 00009330 : int ftruncate( int fd, off_t length ) { 9330: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 9334: e59f30b8 ldr r3, [pc, #184] ; 93f4 9338: e5933000 ldr r3, [r3] 933c: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { 9340: e24dd014 sub sp, sp, #20 9344: e1a05001 mov r5, r1 9348: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); 934c: 2a000006 bcs 936c iop = rtems_libio_iop( fd ); 9350: e59f30a0 ldr r3, [pc, #160] ; 93f8 9354: e5933000 ldr r3, [r3] 9358: e3a04038 mov r4, #56 ; 0x38 935c: e0243490 mla r4, r0, r4, r3 rtems_libio_check_is_open(iop); 9360: e5943014 ldr r3, [r4, #20] 9364: e3130c01 tst r3, #256 ; 0x100 9368: 1a000002 bne 9378 936c: eb000a44 bl bc84 <__errno> 9370: e3a03009 mov r3, #9 9374: ea000013 b 93c8 /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 9378: e284e018 add lr, r4, #24 937c: e8be000f ldm lr!, {r0, r1, r2, r3} 9380: e1a0c00d mov ip, sp 9384: e8ac000f stmia ip!, {r0, r1, r2, r3} 9388: e59e3000 ldr r3, [lr] if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 938c: e1a0000d mov r0, sp /* * Make sure we are not working on a directory */ loc = iop->pathinfo; 9390: e58c3000 str r3, [ip] if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) 9394: e59d300c ldr r3, [sp, #12] 9398: e1a0e00f mov lr, pc 939c: e593f010 ldr pc, [r3, #16] 93a0: e3500001 cmp r0, #1 93a4: 1a000002 bne 93b4 rtems_set_errno_and_return_minus_one( EISDIR ); 93a8: eb000a35 bl bc84 <__errno> <== NOT EXECUTED 93ac: e3a03015 mov r3, #21 <== NOT EXECUTED 93b0: ea000004 b 93c8 <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); 93b4: e5943014 ldr r3, [r4, #20] 93b8: e3130004 tst r3, #4 93bc: 1a000004 bne 93d4 93c0: eb000a2f bl bc84 <__errno> 93c4: e3a03016 mov r3, #22 93c8: e5803000 str r3, [r0] 93cc: e3e00000 mvn r0, #0 93d0: ea000005 b 93ec return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); 93d4: e5943020 ldr r3, [r4, #32] 93d8: e1a00004 mov r0, r4 93dc: e1a01005 mov r1, r5 93e0: e1a02006 mov r2, r6 93e4: e1a0e00f mov lr, pc 93e8: e593f020 ldr pc, [r3, #32] } 93ec: e28dd014 add sp, sp, #20 93f0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 00001dd8 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { 1dd8: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) 1ddc: e2504000 subs r4, r0, #0 1de0: 1a000004 bne 1df8 rtems_set_errno_and_return_minus_one( EFAULT ); 1de4: eb0027a6 bl bc84 <__errno> <== NOT EXECUTED 1de8: e3a0300e mov r3, #14 <== NOT EXECUTED 1dec: e5803000 str r3, [r0] <== NOT EXECUTED 1df0: e3e00000 mvn r0, #0 <== NOT EXECUTED 1df4: ea00000c b 1e2c <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( 1df8: e10f5000 mrs r5, CPSR 1dfc: e3853080 orr r3, r5, #128 ; 0x80 1e00: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); 1e04: e1a0000d mov r0, sp 1e08: eb000f78 bl 5bf0 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( 1e0c: e129f005 msr CPSR_fc, r5 _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; time->tv_sec = now.tv_sec; 1e10: e59d3000 ldr r3, [sp] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 1e14: e59d0004 ldr r0, [sp, #4] time->tv_sec = now.tv_sec; 1e18: e5843000 str r3, [r4] _ISR_Disable(level); _TOD_Get( &now ); _ISR_Enable(level); useconds = (suseconds_t)now.tv_nsec; useconds /= (suseconds_t)TOD_NANOSECONDS_PER_MICROSECOND; 1e1c: e3a01ffa mov r1, #1000 ; 0x3e8 1e20: eb00358c bl f458 <__aeabi_idiv> time->tv_sec = now.tv_sec; time->tv_usec = useconds; 1e24: e5840004 str r0, [r4, #4] * Timezone information ignored by the OS proper. Per email * with Eric Norum, this is how GNU/Linux, Solaris, and MacOS X * do it. This puts us in good company. */ return 0; 1e28: e3a00000 mov r0, #0 } 1e2c: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== 0000b460 : 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 ) b460: e5903018 ldr r3, [r0, #24] b464: e593304c ldr r3, [r3, #76] ; 0x4c b468: e3530001 cmp r3, #1 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { b46c: 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 ) b470: 1a000005 bne b48c return -1; /* It wasn't a directory --> return error */ iop->offset = 0; b474: e3a03000 mov r3, #0 b478: e3a04000 mov r4, #0 b47c: e580300c str r3, [r0, #12] b480: e5804010 str r4, [r0, #16] return 0; b484: e3a00000 mov r0, #0 b488: 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 */ b48c: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } b490: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00003a2c : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) 3a2c: e5913030 ldr r3, [r1, #48] ; 0x30 3a30: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3a34: e92d4030 push {r4, r5, lr} 3a38: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; 3a3c: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) 3a40: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { 3a44: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) 3a48: 0a000007 beq 3a6c c = tolower (c); 3a4c: e59f2164 ldr r2, [pc, #356] ; 3bb8 3a50: e5922000 ldr r2, [r2] 3a54: e0822005 add r2, r2, r5 3a58: e5d22001 ldrb r2, [r2, #1] 3a5c: e2022003 and r2, r2, #3 3a60: e3520001 cmp r2, #1 3a64: 02855020 addeq r5, r5, #32 3a68: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { 3a6c: e355000d cmp r5, #13 3a70: 1a000005 bne 3a8c if (tty->termios.c_iflag & IGNCR) 3a74: e3130080 tst r3, #128 ; 0x80 3a78: 1a000048 bne 3ba0 return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; 3a7c: e3130c01 tst r3, #256 ; 0x100 3a80: 03a0500d moveq r5, #13 3a84: 13a0500a movne r5, #10 3a88: ea000007 b 3aac } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { 3a8c: e355000a cmp r5, #10 3a90: 1a000003 bne 3aa4 c = '\r'; 3a94: e3130040 tst r3, #64 ; 0x40 3a98: 03a0500a moveq r5, #10 3a9c: 13a0500d movne r5, #13 3aa0: ea000001 b 3aac } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { 3aa4: e3550000 cmp r5, #0 3aa8: 0a00002c beq 3b60 3aac: e594303c ldr r3, [r4, #60] ; 0x3c 3ab0: e3130002 tst r3, #2 3ab4: 0a000029 beq 3b60 if (c == tty->termios.c_cc[VERASE]) { 3ab8: e5d42043 ldrb r2, [r4, #67] ; 0x43 3abc: e1520005 cmp r2, r5 erase (tty, 0); 3ac0: 01a00004 moveq r0, r4 3ac4: 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]) { 3ac8: 0a000004 beq 3ae0 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { 3acc: e5d42044 ldrb r2, [r4, #68] ; 0x44 3ad0: e1520005 cmp r2, r5 3ad4: 1a000003 bne 3ae8 erase (tty, 1); 3ad8: e1a00004 mov r0, r4 3adc: e3a01001 mov r1, #1 3ae0: ebffff60 bl 3868 3ae4: ea00002d b 3ba0 return 0; } else if (c == tty->termios.c_cc[VEOF]) { 3ae8: e5d42045 ldrb r2, [r4, #69] ; 0x45 3aec: e1520005 cmp r2, r5 3af0: 0a00002c beq 3ba8 return 1; } else if (c == '\n') { 3af4: e355000a cmp r5, #10 3af8: 1a000008 bne 3b20 if (tty->termios.c_lflag & (ECHO | ECHONL)) 3afc: e3130048 tst r3, #72 ; 0x48 echo (c, tty); 3b00: 11a00005 movne r0, r5 3b04: 11a01004 movne r1, r4 3b08: 1bffff33 blne 37dc tty->cbuf[tty->ccount++] = c; 3b0c: e284201c add r2, r4, #28 3b10: e892000c ldm r2, {r2, r3} 3b14: e3a0100a mov r1, #10 3b18: e7c21003 strb r1, [r2, r3] 3b1c: ea00000c b 3b54 return 1; } else if ((c == tty->termios.c_cc[VEOL]) || 3b20: e5d4204c ldrb r2, [r4, #76] ; 0x4c 3b24: e1520005 cmp r2, r5 3b28: 0a000002 beq 3b38 3b2c: e5d42051 ldrb r2, [r4, #81] ; 0x51 3b30: e1520005 cmp r2, r5 3b34: 1a000009 bne 3b60 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) 3b38: e3130008 tst r3, #8 <== NOT EXECUTED echo (c, tty); 3b3c: 11a00005 movne r0, r5 <== NOT EXECUTED 3b40: 11a01004 movne r1, r4 <== NOT EXECUTED 3b44: 1bffff24 blne 37dc <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; 3b48: e284201c add r2, r4, #28 <== NOT EXECUTED 3b4c: e892000c ldm r2, {r2, r3} <== NOT EXECUTED 3b50: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED 3b54: e2833001 add r3, r3, #1 3b58: e5843020 str r3, [r4, #32] 3b5c: ea000011 b 3ba8 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { 3b60: e59f3054 ldr r3, [pc, #84] ; 3bbc 3b64: e5933008 ldr r3, [r3, #8] 3b68: e5942020 ldr r2, [r4, #32] 3b6c: e2433001 sub r3, r3, #1 3b70: e1520003 cmp r2, r3 3b74: aa00000d bge 3bb0 if (tty->termios.c_lflag & ECHO) 3b78: e594303c ldr r3, [r4, #60] ; 0x3c 3b7c: e3130008 tst r3, #8 echo (c, tty); 3b80: 11a00005 movne r0, r5 3b84: 11a01004 movne r1, r4 3b88: 1bffff13 blne 37dc tty->cbuf[tty->ccount++] = c; 3b8c: e284201c add r2, r4, #28 3b90: e892000c ldm r2, {r2, r3} 3b94: e7c25003 strb r5, [r2, r3] 3b98: e2833001 add r3, r3, #1 3b9c: 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; 3ba0: e3a00000 mov r0, #0 3ba4: 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; 3ba8: e3a00001 mov r0, #1 3bac: 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; 3bb0: e3a00000 mov r0, #0 <== NOT EXECUTED } 3bb4: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 0001f658 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } 1f658: e3a00000 mov r0, #0 <== NOT EXECUTED 1f65c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 0000ac20 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { ac20: e92d41f0 push {r4, r5, r6, r7, r8, lr} */ #if defined(RTEMS_DEBUG) assert( block_table ); #endif if ( !block_table ) ac24: 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 ac3c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); ac4c: ebffffeb bl ac00 b[i] = 0; ac50: 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 ); ac60: e5950000 ldr r0, [r5] ac64: ebffffe5 bl ac00 *block_table = 0; ac68: e3a03000 mov r3, #0 ac6c: e5853000 str r3, [r5] ac70: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 0000b158 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { b158: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; b15c: 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 ) b160: e5943054 ldr r3, [r4, #84] ; 0x54 b164: e1530002 cmp r3, r2 b168: ba000003 blt b17c b16c: 1a000005 bne b188 b170: e5943050 ldr r3, [r4, #80] ; 0x50 b174: e1530001 cmp r3, r1 b178: 2a000002 bcs b188 return IMFS_memfile_extend( the_jnode, length ); b17c: e1a00004 mov r0, r4 <== NOT EXECUTED b180: ebffff08 bl ada8 <== NOT EXECUTED b184: ea000008 b b1ac <== 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; b188: e5841050 str r1, [r4, #80] ; 0x50 b18c: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; b190: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); b194: e3a01000 mov r1, #0 b198: e1a0000d mov r0, sp b19c: ebffdb0d bl 1dd8 b1a0: e59d3000 ldr r3, [sp] b1a4: e5843040 str r3, [r4, #64] ; 0x40 return 0; b1a8: e3a00000 mov r0, #0 } b1ac: e8bd801c pop {r2, r3, r4, pc} =============================================================================== 0000b1b0 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { b1b0: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; b1b4: e5905018 ldr r5, [r0, #24] if (the_jnode->type == IMFS_LINEAR_FILE) { b1b8: e595304c ldr r3, [r5, #76] ; 0x4c b1bc: e3530006 cmp r3, #6 rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { b1c0: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { b1c4: 1a00000b bne b1f8 if (iop->offset > the_jnode->info.linearfile.size) b1c8: e5953054 ldr r3, [r5, #84] ; 0x54 b1cc: e5901010 ldr r1, [r0, #16] b1d0: e1510003 cmp r1, r3 b1d4: e5952050 ldr r2, [r5, #80] ; 0x50 b1d8: ca000003 bgt b1ec b1dc: 1a000014 bne b234 b1e0: e590100c ldr r1, [r0, #12] b1e4: e1510002 cmp r1, r2 b1e8: 9a000011 bls b234 iop->offset = the_jnode->info.linearfile.size; b1ec: e584200c str r2, [r4, #12] <== NOT EXECUTED b1f0: e5843010 str r3, [r4, #16] <== NOT EXECUTED b1f4: ea00000e b b234 <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) b1f8: e1a00005 mov r0, r5 b1fc: e284200c add r2, r4, #12 b200: e8920006 ldm r2, {r1, r2} b204: ebfffee7 bl ada8 b208: e3500000 cmp r0, #0 b20c: 0a000005 beq b228 rtems_set_errno_and_return_minus_one( ENOSPC ); b210: eb00029b bl bc84 <__errno> <== NOT EXECUTED b214: e3a0301c mov r3, #28 <== NOT EXECUTED b218: e5803000 str r3, [r0] <== NOT EXECUTED b21c: e3e04000 mvn r4, #0 <== NOT EXECUTED b220: e3e03000 mvn r3, #0 <== NOT EXECUTED b224: ea000004 b b23c <== NOT EXECUTED iop->size = the_jnode->info.file.size; b228: e2853050 add r3, r5, #80 ; 0x50 b22c: e893000c ldm r3, {r2, r3} b230: e984000c stmib r4, {r2, r3} } return iop->offset; b234: e284400c add r4, r4, #12 b238: e8940018 ldm r4, {r3, r4} } b23c: e1a00003 mov r0, r3 b240: e1a01004 mov r1, r4 b244: e8bd8030 pop {r4, r5, pc} =============================================================================== 0000b0bc : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) b0bc: e5903014 ldr r3, [r0, #20] b0c0: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { b0c4: e92d4031 push {r0, r4, r5, lr} b0c8: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; b0cc: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) b0d0: 0a000015 beq b12c && (the_jnode->type == IMFS_LINEAR_FILE)) { b0d4: e594304c ldr r3, [r4, #76] ; 0x4c b0d8: e3530006 cmp r3, #6 b0dc: 1a000012 bne b12c uint32_t count = the_jnode->info.linearfile.size; b0e0: 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; b0e4: 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; b0e8: e3a02005 mov r2, #5 <== NOT EXECUTED b0ec: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; b0f0: e3a01000 mov r1, #0 <== NOT EXECUTED b0f4: 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) b0f8: 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; b0fc: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; b100: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED b104: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; b108: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; b10c: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; b110: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) b114: 0a000004 beq b12c <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) b118: e1a00004 mov r0, r4 <== NOT EXECUTED b11c: e58dc000 str ip, [sp] <== NOT EXECUTED b120: ebffff67 bl aec4 <== NOT EXECUTED b124: e3700001 cmn r0, #1 <== NOT EXECUTED b128: 0a000009 beq b154 <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) b12c: e5953014 ldr r3, [r5, #20] b130: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; b134: 12843050 addne r3, r4, #80 ; 0x50 b138: 1893000c ldmne r3, {r2, r3} b13c: 1585200c strne r2, [r5, #12] b140: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; b144: e2844050 add r4, r4, #80 ; 0x50 b148: e8940018 ldm r4, {r3, r4} b14c: e9850018 stmib r5, {r3, r4} return 0; b150: e3a00000 mov r0, #0 } b154: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 00002170 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2170: 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) ) ) 2174: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { 2178: e24dd020 sub sp, sp, #32 217c: e1a06000 mov r6, r0 2180: e1a05001 mov r5, r1 2184: e1a07002 mov r7, r2 2188: 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) ) ) 218c: 1a000003 bne 21a0 rtems_set_errno_and_return_minus_one( EINVAL ); 2190: eb0026bb bl bc84 <__errno> <== NOT EXECUTED 2194: e3a03016 mov r3, #22 <== NOT EXECUTED 2198: e5803000 str r3, [r0] <== NOT EXECUTED 219c: ea000018 b 2204 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); 21a0: e28d4004 add r4, sp, #4 21a4: e28d101c add r1, sp, #28 21a8: e1a02004 mov r2, r4 21ac: eb000241 bl 2ab8 result = (*temp_loc.ops->evalformake_h)( 21b0: e59d001c ldr r0, [sp, #28] 21b4: e1a01004 mov r1, r4 21b8: e0860000 add r0, r6, r0 21bc: e28d2018 add r2, sp, #24 21c0: e59d3010 ldr r3, [sp, #16] 21c4: e1a0e00f mov lr, pc 21c8: e593f004 ldr pc, [r3, #4] &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) 21cc: e3500000 cmp r0, #0 21d0: 1a00000b bne 2204 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); 21d4: e1a01005 mov r1, r5 21d8: e58d4000 str r4, [sp] 21dc: e59d0018 ldr r0, [sp, #24] 21e0: e1a02007 mov r2, r7 21e4: e1a03008 mov r3, r8 21e8: e59dc010 ldr ip, [sp, #16] 21ec: e1a0e00f mov lr, pc 21f0: e59cf014 ldr pc, [ip, #20] 21f4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); 21f8: e1a00004 mov r0, r4 21fc: ebfffec7 bl 1d20 return result; 2200: ea000000 b 2208 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; 2204: e3e05000 mvn r5, #0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } 2208: e1a00005 mov r0, r5 220c: e28dd020 add sp, sp, #32 2210: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 000022a8 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 22a8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 22ac: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { 22b0: e24dd028 sub sp, sp, #40 ; 0x28 22b4: e1a06000 mov r6, r0 22b8: e1a07001 mov r7, r1 22bc: e1a08002 mov r8, r2 22c0: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && 22c4: 8a000004 bhi 22dc rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); 22c8: e1a00002 mov r0, r2 22cc: eb001d1d bl 9748 if ( !mount_h ) 22d0: e3500000 cmp r0, #0 22d4: e58d0010 str r0, [sp, #16] 22d8: 1a000002 bne 22e8 rtems_set_errno_and_return_minus_one( EINVAL ); 22dc: eb002668 bl bc84 <__errno> 22e0: e3a03016 mov r3, #22 22e4: ea000039 b 23d0 { 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; 22e8: e2575000 subs r5, r7, #0 22ec: 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 : "/"; 22f0: e59f3250 ldr r3, [pc, #592] ; 2548 22f4: e3550000 cmp r5, #0 22f8: 11a03007 movne r3, r7 size_t filesystemtype_size = strlen( filesystemtype ) + 1; 22fc: 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 : "/"; 2300: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; 2304: eb002a4e bl cc44 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2308: 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; 230c: e280b001 add fp, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; 2310: 01a0a006 moveq sl, r6 2314: 0a000002 beq 2324 2318: e1a00006 mov r0, r6 231c: eb002a48 bl cc44 2320: e280a001 add sl, r0, #1 size_t target_length = strlen( target ); 2324: e59d0004 ldr r0, [sp, #4] 2328: eb002a45 bl cc44 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; 232c: e28b1075 add r1, fp, #117 ; 0x75 2330: 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 ); 2334: 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 ); 2338: e081100a add r1, r1, sl 233c: e3a00001 mov r0, #1 2340: ebfffe00 bl 1b48 if ( mt_entry != NULL ) { 2344: e2504000 subs r4, r0, #0 2348: 0a00001e beq 23c8 char *str = (char *) mt_entry + sizeof( *mt_entry ); 234c: e2849074 add r9, r4, #116 ; 0x74 strcpy( str, filesystemtype ); 2350: e1a00009 mov r0, r9 2354: e1a01008 mov r1, r8 2358: eb0029e9 bl cb04 mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { 235c: e3560000 cmp r6, #0 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; 2360: e584906c str r9, [r4, #108] ; 0x6c str += filesystemtype_size; 2364: e089900b add r9, r9, fp if ( source_or_null != NULL ) { 2368: 0a000004 beq 2380 strcpy( str, source_or_null ); 236c: e1a00009 mov r0, r9 2370: e1a01006 mov r1, r6 2374: eb0029e2 bl cb04 mt_entry->dev = str; 2378: e5849070 str r9, [r4, #112] ; 0x70 str += source_size; 237c: e089900a add r9, r9, sl } strcpy( str, target ); 2380: e59d1004 ldr r1, [sp, #4] 2384: e1a00009 mov r0, r9 2388: eb0029dd bl cb04 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 238c: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2390: e59fe1b4 ldr lr, [pc, #436] ; 254c ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; 2394: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 2398: e8be000f ldm lr!, {r0, r1, r2, r3} 239c: e284c038 add ip, r4, #56 ; 0x38 23a0: e8ac000f stmia ip!, {r0, r1, r2, r3} 23a4: e8be000f ldm lr!, {r0, r1, r2, r3} 23a8: e8ac000f stmia ip!, {r0, r1, r2, r3} 23ac: 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 ) { 23b0: e3550000 cmp r5, #0 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; 23b4: 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; 23b8: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; 23bc: 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 ) { 23c0: 0a00002e beq 2480 23c4: ea000003 b 23d8 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); 23c8: eb00262d bl bc84 <__errno> <== NOT EXECUTED 23cc: e3a0300c mov r3, #12 <== NOT EXECUTED 23d0: e5803000 str r3, [r0] 23d4: ea000058 b 253c * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( 23d8: e3a03001 mov r3, #1 23dc: e28d6014 add r6, sp, #20 23e0: e58d3000 str r3, [sp] 23e4: e1a00007 mov r0, r7 23e8: e59d1008 ldr r1, [sp, #8] 23ec: e3a02007 mov r2, #7 23f0: e1a03006 mov r3, r6 23f4: ebfffe0e bl 1c34 23f8: e3700001 cmn r0, #1 23fc: 0a000048 beq 2524 /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { 2400: e1a00006 mov r0, r6 2404: e59d3020 ldr r3, [sp, #32] 2408: e1a0e00f mov lr, pc 240c: e593f010 ldr pc, [r3, #16] 2410: e3500001 cmp r0, #1 2414: 0a000002 beq 2424 errno = ENOTDIR; 2418: eb002619 bl bc84 <__errno> 241c: e3a03014 mov r3, #20 2420: ea000006 b 2440 /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { 2424: e59f0124 ldr r0, [pc, #292] ; 2550 2428: e59d1014 ldr r1, [sp, #20] 242c: ebffff87 bl 2250 2430: e3500000 cmp r0, #0 2434: 0a000003 beq 2448 errno = EBUSY; 2438: eb002611 bl bc84 <__errno> 243c: e3a03010 mov r3, #16 2440: e5803000 str r3, [r0] goto cleanup_and_bail; 2444: ea000037 b 2528 * 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; 2448: e59d3014 ldr r3, [sp, #20] 244c: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; 2450: e59d301c ldr r3, [sp, #28] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2454: e59d2024 ldr r2, [sp, #36] ; 0x24 * 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; 2458: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; 245c: e59d3020 ldr r3, [sp, #32] mt_entry->mt_point_node.mt_entry = loc.mt_entry; 2460: e5842018 str r2, [r4, #24] * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; 2464: 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 ) ) { 2468: e1a00004 mov r0, r4 246c: e1a0e00f mov lr, pc 2470: e593f020 ldr pc, [r3, #32] 2474: e3500000 cmp r0, #0 2478: 0a00000b beq 24ac 247c: ea000029 b 2528 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); 2480: e59f30cc ldr r3, [pc, #204] ; 2554 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; 2484: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2488: e5933000 ldr r3, [r3] 248c: 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; 2490: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { 2494: 0a000004 beq 24ac errno = EINVAL; 2498: eb0025f9 bl bc84 <__errno> <== NOT EXECUTED 249c: e3a03016 mov r3, #22 <== NOT EXECUTED 24a0: 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; 24a4: 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; 24a8: ea00001e b 2528 <== 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 ) ) { 24ac: e1a00004 mov r0, r4 24b0: e59d104c ldr r1, [sp, #76] ; 0x4c 24b4: e59d3010 ldr r3, [sp, #16] 24b8: e1a0e00f mov lr, pc 24bc: e12fff13 bx r3 24c0: e2507000 subs r7, r0, #0 24c4: 0a000004 beq 24dc /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); 24c8: e1a00004 mov r0, r4 <== NOT EXECUTED 24cc: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED 24d0: e1a0e00f mov lr, pc <== NOT EXECUTED 24d4: e593f028 ldr pc, [r3, #40] ; 0x28 <== NOT EXECUTED goto cleanup_and_bail; 24d8: ea000012 b 2528 <== NOT EXECUTED } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); 24dc: ebffff51 bl 2228 24e0: e59f006c ldr r0, [pc, #108] ; 2554 24e4: e1a01004 mov r1, r4 24e8: eb000cc2 bl 57f8 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); 24ec: ebffff53 bl 2240 if ( !has_target ) 24f0: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; 24f4: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) 24f8: 1a000010 bne 2540 rtems_filesystem_root = mt_entry->mt_fs_root; 24fc: e59f3054 ldr r3, [pc, #84] ; 2558 2500: e284401c add r4, r4, #28 2504: e593c000 ldr ip, [r3] 2508: e8b4000f ldm r4!, {r0, r1, r2, r3} 250c: e28cc018 add ip, ip, #24 2510: e8ac000f stmia ip!, {r0, r1, r2, r3} 2514: e5943000 ldr r3, [r4] return 0; 2518: 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; 251c: e58c3000 str r3, [ip] 2520: ea000006 b 2540 ) { 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; 2524: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); 2528: e1a00004 mov r0, r4 252c: ebfffe00 bl 1d34 if ( loc_to_free ) 2530: e3560000 cmp r6, #0 rtems_filesystem_freenode( loc_to_free ); 2534: 11a00006 movne r0, r6 2538: 1bfffdf8 blne 1d20 return -1; 253c: e3e00000 mvn r0, #0 } 2540: e28dd028 add sp, sp, #40 ; 0x28 2544: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00002560 : */ int newlib_free_buffers( FILE *fp ) { 2560: e92d4010 push {r4, lr} 2564: e1a04000 mov r4, r0 switch ( fileno(fp) ) { 2568: eb0026c8 bl c090 256c: e3500002 cmp r0, #2 2570: 8a00000b bhi 25a4 case 0: case 1: case 2: if (fp->_flags & __SMBF) { 2574: e1d430bc ldrh r3, [r4, #12] 2578: e3130080 tst r3, #128 ; 0x80 257c: 0a00000a beq 25ac free( fp->_bf._base ); 2580: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 2584: ebfffdea bl 1d34 <== NOT EXECUTED fp->_flags &= ~__SMBF; 2588: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED 258c: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED 2590: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; 2594: e3a03000 mov r3, #0 <== NOT EXECUTED 2598: e5843000 str r3, [r4] <== NOT EXECUTED 259c: e5843010 str r3, [r4, #16] <== NOT EXECUTED 25a0: ea000001 b 25ac <== NOT EXECUTED } break; default: fclose(fp); 25a4: e1a00004 mov r0, r4 <== NOT EXECUTED 25a8: eb002603 bl bdbc <== NOT EXECUTED } return 0; } 25ac: e3a00000 mov r0, #0 25b0: e8bd8010 pop {r4, pc} =============================================================================== 0000368c : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 368c: e92d4011 push {r0, r4, lr} 3690: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { 3694: e5913034 ldr r3, [r1, #52] ; 0x34 3698: e3130001 tst r3, #1 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { 369c: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { 36a0: 0a000045 beq 37bc switch (c) { 36a4: e5dd2000 ldrb r2, [sp] 36a8: e2421008 sub r1, r2, #8 36ac: e3510005 cmp r1, #5 36b0: 979ff101 ldrls pc, [pc, r1, lsl #2] 36b4: ea00002c b 376c 36b8: 00003758 .word 0x00003758 <== NOT EXECUTED 36bc: 00003730 .word 0x00003730 <== NOT EXECUTED 36c0: 000036d0 .word 0x000036d0 <== NOT EXECUTED 36c4: 0000376c .word 0x0000376c <== NOT EXECUTED 36c8: 0000376c .word 0x0000376c <== NOT EXECUTED 36cc: 000036f8 .word 0x000036f8 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) 36d0: e3130020 tst r3, #32 tty->column = 0; 36d4: 13a02000 movne r2, #0 36d8: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { 36dc: e3130004 tst r3, #4 36e0: 0a000035 beq 37bc rtems_termios_puts ("\r", 1, tty); 36e4: e59f00e4 ldr r0, [pc, #228] ; 37d0 36e8: e3a01001 mov r1, #1 36ec: e1a02004 mov r2, r4 36f0: ebffffa5 bl 358c 36f4: ea00000b b 3728 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) 36f8: e3130010 tst r3, #16 <== NOT EXECUTED 36fc: 0a000002 beq 370c <== NOT EXECUTED 3700: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED 3704: e3520000 cmp r2, #0 <== NOT EXECUTED 3708: 0a00002f beq 37cc <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { 370c: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; 3710: 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) { 3714: 0a000028 beq 37bc <== NOT EXECUTED c = '\n'; 3718: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 371c: 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'; 3720: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) 3724: 0a000024 beq 37bc <== NOT EXECUTED tty->column = 0; 3728: e3a03000 mov r3, #0 372c: ea000021 b 37b8 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 3730: e5942028 ldr r2, [r4, #40] ; 0x28 3734: e2021007 and r1, r2, #7 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3738: e2033b06 and r3, r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); 373c: e2611008 rsb r1, r1, #8 if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3740: e3530b06 cmp r3, #6144 ; 0x1800 3744: e0813002 add r3, r1, r2 tty->column += i; 3748: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); 374c: 059f0080 ldreq r0, [pc, #128] ; 37d4 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { 3750: 1a000018 bne 37b8 3754: ea00001a b 37c4 } tty->column += i; break; case '\b': if (tty->column > 0) 3758: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED 375c: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; 3760: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) 3764: ca000013 bgt 37b8 <== NOT EXECUTED 3768: ea000013 b 37bc <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) 376c: e3130002 tst r3, #2 3770: 0a000007 beq 3794 c = toupper(c); 3774: e59f305c ldr r3, [pc, #92] ; 37d8 <== NOT EXECUTED 3778: e5933000 ldr r3, [r3] <== NOT EXECUTED 377c: e0833002 add r3, r3, r2 <== NOT EXECUTED 3780: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED 3784: e2033003 and r3, r3, #3 <== NOT EXECUTED 3788: e3530002 cmp r3, #2 <== NOT EXECUTED 378c: 02422020 subeq r2, r2, #32 <== NOT EXECUTED 3790: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) 3794: e59f203c ldr r2, [pc, #60] ; 37d8 3798: e5dd3000 ldrb r3, [sp] 379c: e5922000 ldr r2, [r2] 37a0: e0823003 add r3, r2, r3 37a4: e5d33001 ldrb r3, [r3, #1] 37a8: e3130020 tst r3, #32 37ac: 1a000002 bne 37bc tty->column++; 37b0: e5943028 ldr r3, [r4, #40] ; 0x28 37b4: e2833001 add r3, r3, #1 37b8: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); 37bc: e1a0000d mov r0, sp 37c0: e3a01001 mov r1, #1 37c4: e1a02004 mov r2, r4 37c8: ebffff6f bl 358c } 37cc: e8bd8018 pop {r3, r4, pc} =============================================================================== 0000b0cc : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { b0cc: e59f3058 ldr r3, [pc, #88] ; b12c b0d0: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { b0d4: e92d4070 push {r4, r5, r6, lr} b0d8: e1a04000 mov r4, r0 b0dc: e1a05002 mov r5, r2 *(unsigned int *)buffer = pipe->Length; PIPE_UNLOCK(pipe); return 0; } return -EINVAL; b0e0: 13e00015 mvnne r0, #21 uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { b0e4: 18bd8070 popne {r4, r5, r6, pc} if (buffer == NULL) b0e8: e3520000 cmp r2, #0 return -EFAULT; b0ec: 03e0000d mvneq r0, #13 void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) b0f0: 08bd8070 popeq {r4, r5, r6, pc} return -EFAULT; if (! PIPE_LOCK(pipe)) b0f4: e3a01000 mov r1, #0 b0f8: e5940028 ldr r0, [r4, #40] ; 0x28 b0fc: e1a02001 mov r2, r1 b100: ebffeced bl 64bc b104: e2506000 subs r6, r0, #0 b108: 1a000005 bne b124 return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; b10c: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); b110: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; b114: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); b118: ebffed2d bl 65d4 return 0; b11c: e1a00006 mov r0, r6 b120: e8bd8070 pop {r4, r5, r6, pc} if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; if (! PIPE_LOCK(pipe)) return -EINTR; b124: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } b128: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 0000adb4 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { adb4: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} adb8: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) adbc: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { adc0: e1a04000 mov r4, r0 adc4: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) adc8: e5900028 ldr r0, [r0, #40] ; 0x28 adcc: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { add0: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) add4: ebffedb8 bl 64bc add8: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); addc: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) ade0: 0a000043 beq aef4 ade4: ea00004e b af24 <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) ade8: e5947014 ldr r7, [r4, #20] adec: e3570000 cmp r7, #0 adf0: 0a000044 beq af08 goto out_locked; if (LIBIO_NODELAY(iop)) { adf4: e59a8014 ldr r8, [sl, #20] adf8: e2188001 ands r8, r8, #1 adfc: 1a000040 bne af04 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; ae00: e5943018 ldr r3, [r4, #24] ae04: e2833001 add r3, r3, #1 ae08: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); ae0c: e5940028 ldr r0, [r4, #40] ; 0x28 ae10: ebffedef bl 65d4 if (! PIPE_READWAIT(pipe)) ae14: e1a01008 mov r1, r8 ae18: e594002c ldr r0, [r4, #44] ; 0x2c ae1c: eb0003fa bl be0c ae20: e3500000 cmp r0, #0 ae24: 01a07000 moveq r7, r0 ae28: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { ae2c: e1a01008 mov r1, r8 ae30: e5940028 ldr r0, [r4, #40] ; 0x28 ae34: e1a02008 mov r2, r8 ae38: ebffed9f bl 64bc ae3c: e3500000 cmp r0, #0 ae40: 1a000033 bne af14 /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ae44: e5943018 ldr r3, [r4, #24] if (ret != 0) ae48: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; ae4c: e2433001 sub r3, r3, #1 ae50: e5843018 str r3, [r4, #24] if (ret != 0) ae54: 1a00002b bne af08 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { ae58: e594300c ldr r3, [r4, #12] ae5c: e3530000 cmp r3, #0 ae60: 0affffe0 beq ade8 if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); ae64: e0667005 rsb r7, r6, r5 ae68: e1530007 cmp r3, r7 ae6c: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; ae70: e5948004 ldr r8, [r4, #4] ae74: e5943008 ldr r3, [r4, #8] ae78: e5941000 ldr r1, [r4] ae7c: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { ae80: e1570008 cmp r7, r8 ae84: 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); ae88: d0811003 addle r1, r1, r3 ae8c: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { ae90: da000006 ble aeb0 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); ae94: e0811003 add r1, r1, r3 ae98: e1a02008 mov r2, r8 ae9c: eb000b0a bl dacc memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); aea0: e0860008 add r0, r6, r8 aea4: e5941000 ldr r1, [r4] aea8: e0890000 add r0, r9, r0 aeac: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); aeb0: eb000b05 bl dacc pipe->Start += chunk; aeb4: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; aeb8: e5941004 ldr r1, [r4, #4] aebc: e0870000 add r0, r7, r0 aec0: eb002eb3 bl 16994 <__umodsi3> pipe->Length -= chunk; aec4: e594300c ldr r3, [r4, #12] aec8: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) aecc: e3530000 cmp r3, #0 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; aed0: e5840008 str r0, [r4, #8] pipe->Length -= chunk; aed4: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; aed8: 05843008 streq r3, [r4, #8] if (pipe->waitingWriters > 0) aedc: e594301c ldr r3, [r4, #28] aee0: e3530000 cmp r3, #0 PIPE_WAKEUPWRITERS(pipe); aee4: 15940030 ldrne r0, [r4, #48] ; 0x30 aee8: 11a0100d movne r1, sp aeec: 1b0003b0 blne bdb4 read += chunk; aef0: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { aef4: e1560005 cmp r6, r5 aef8: 3affffd6 bcc ae58 aefc: e3a07000 mov r7, #0 af00: ea000000 b af08 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; af04: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); af08: e5940028 ldr r0, [r4, #40] ; 0x28 af0c: ebffedb0 bl 65d4 af10: ea000000 b af18 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; af14: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; af18: e3560000 cmp r6, #0 af1c: d1a06007 movle r6, r7 af20: ea000000 b af28 ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; af24: e3e06003 mvn r6, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } af28: e1a00006 mov r0, r6 af2c: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000a9bc : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a9bc: e92d40f1 push {r0, r4, r5, r6, r7, lr} a9c0: e1a06001 mov r6, r1 a9c4: e1a05000 mov r5, r0 pipe_control_t *pipe = *pipep; a9c8: e5904000 ldr r4, [r0] uint32_t mode; if (pipe_lock()) a9cc: ebffffbf bl a8d0 a9d0: e2501000 subs r1, r0, #0 a9d4: 1a000004 bne a9ec /* WARN pipe not freed and pipep not set to NULL! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) a9d8: e5940028 ldr r0, [r4, #40] ; 0x28 a9dc: e1a02001 mov r2, r1 a9e0: ebffeeb5 bl 64bc a9e4: e3500000 cmp r0, #0 a9e8: 0a000001 beq a9f4 /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); a9ec: e59f00a8 ldr r0, [pc, #168] ; aa9c <== NOT EXECUTED a9f0: ebfff02f bl 6ab4 <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); a9f4: e5963014 ldr r3, [r6, #20] if (mode & LIBIO_FLAGS_READ) a9f8: e3130002 tst r3, #2 if (!PIPE_LOCK(pipe)) /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); a9fc: e2036006 and r6, r3, #6 if (mode & LIBIO_FLAGS_READ) pipe->Readers --; aa00: 15943010 ldrne r3, [r4, #16] aa04: 12433001 subne r3, r3, #1 aa08: 15843010 strne r3, [r4, #16] if (mode & LIBIO_FLAGS_WRITE) aa0c: e3160004 tst r6, #4 pipe->Writers --; aa10: 15943014 ldrne r3, [r4, #20] aa14: 12433001 subne r3, r3, #1 aa18: 15843014 strne r3, [r4, #20] PIPE_UNLOCK(pipe); aa1c: e5940028 ldr r0, [r4, #40] ; 0x28 aa20: ebffeeeb bl 65d4 if (pipe->Readers == 0 && pipe->Writers == 0) { aa24: e5943010 ldr r3, [r4, #16] aa28: e3530000 cmp r3, #0 aa2c: 1a000006 bne aa4c aa30: e5947014 ldr r7, [r4, #20] aa34: e3570000 cmp r7, #0 aa38: 1a000003 bne aa4c #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); aa3c: e1a00004 mov r0, r4 aa40: ebffffc6 bl a960 *pipep = NULL; aa44: e5857000 str r7, [r5] aa48: ea000010 b aa90 } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) aa4c: e2562004 subs r2, r6, #4 aa50: 13a02001 movne r2, #1 aa54: e3530000 cmp r3, #0 aa58: 13a02000 movne r2, #0 aa5c: e3520000 cmp r2, #0 /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); aa60: 15940030 ldrne r0, [r4, #48] ; 0x30 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) aa64: 1a000007 bne aa88 /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) aa68: e5943014 ldr r3, [r4, #20] aa6c: e2566002 subs r6, r6, #2 aa70: 13a06001 movne r6, #1 aa74: e3530000 cmp r3, #0 aa78: 13a06000 movne r6, #0 aa7c: e3560000 cmp r6, #0 aa80: 0a000002 beq aa90 PIPE_WAKEUPREADERS(pipe); aa84: e594002c ldr r0, [r4, #44] ; 0x2c aa88: e1a0100d mov r1, sp aa8c: eb0004c8 bl bdb4 pipe_unlock(); aa90: ebffffbf bl a994 if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } aa94: e3a00000 mov r0, #0 aa98: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 0000a994 : static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); a994: e59f3018 ldr r3, [pc, #24] ; a9b4 return -ENOMEM; } } static void pipe_unlock(void) { a998: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); a99c: e5930000 ldr r0, [r3] a9a0: ebffef0b bl 65d4 if (sc != RTEMS_SUCCESSFUL) { a9a4: e3500000 cmp r0, #0 a9a8: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); a9ac: e59f0004 ldr r0, [pc, #4] ; a9b8 <== NOT EXECUTED a9b0: ebfff03f bl 6ab4 <== NOT EXECUTED =============================================================================== 0000af30 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { af30: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) af34: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { af38: e1a04000 mov r4, r0 af3c: e1a0b001 mov fp, r1 af40: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; af44: 01a05007 moveq r5, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) af48: 0a00005d beq b0c4 return 0; if (! PIPE_LOCK(pipe)) af4c: e3a01000 mov r1, #0 af50: e5900028 ldr r0, [r0, #40] ; 0x28 af54: e1a02001 mov r2, r1 af58: ebffed57 bl 64bc af5c: e3500000 cmp r0, #0 return -EINTR; af60: 13e05003 mvnne r5, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) af64: 1a000056 bne b0c4 return -EINTR; if (pipe->Readers == 0) { af68: e5945010 ldr r5, [r4, #16] af6c: e3550000 cmp r5, #0 af70: 0a00004c beq b0a8 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; af74: e5949004 ldr r9, [r4, #4] af78: e1570009 cmp r7, r9 af7c: 91a09007 movls r9, r7 af80: 83a09001 movhi r9, #1 /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; af84: e1a05000 mov r5, r0 af88: ea000040 b b090 /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { af8c: e598a014 ldr sl, [r8, #20] af90: e21aa001 ands sl, sl, #1 af94: 1a000041 bne b0a0 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; af98: e594301c ldr r3, [r4, #28] af9c: e2833001 add r3, r3, #1 afa0: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); afa4: e5940028 ldr r0, [r4, #40] ; 0x28 afa8: ebffed89 bl 65d4 if (! PIPE_WRITEWAIT(pipe)) afac: e1a0100a mov r1, sl afb0: e5940030 ldr r0, [r4, #48] ; 0x30 afb4: eb000394 bl be0c afb8: e3500000 cmp r0, #0 afbc: 01a06000 moveq r6, r0 afc0: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { afc4: e1a0100a mov r1, sl afc8: e5940028 ldr r0, [r4, #40] ; 0x28 afcc: e1a0200a mov r2, sl afd0: ebffed39 bl 64bc afd4: e3500000 cmp r0, #0 afd8: 1a000036 bne b0b8 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; afdc: e594301c ldr r3, [r4, #28] if (ret != 0) afe0: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; afe4: e2433001 sub r3, r3, #1 afe8: e584301c str r3, [r4, #28] if (ret != 0) afec: 1a00002e bne b0ac goto out_locked; if (pipe->Readers == 0) { aff0: e5943010 ldr r3, [r4, #16] aff4: e3530000 cmp r3, #0 aff8: 0a00002a beq b0a8 /* 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) { affc: e594a004 ldr sl, [r4, #4] b000: e594300c ldr r3, [r4, #12] b004: e063200a rsb r2, r3, sl b008: e1520009 cmp r2, r9 b00c: 3affffde bcc af8c goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); b010: e5940008 ldr r0, [r4, #8] b014: e1a0100a mov r1, sl b018: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); b01c: e0656007 rsb r6, r5, r7 b020: e1520006 cmp r2, r6 b024: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); b028: eb002e59 bl 16994 <__umodsi3> b02c: e5943000 ldr r3, [r4] b030: e060a00a rsb sl, r0, sl if (chunk > chunk1) { b034: e156000a cmp r6, sl b038: 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); b03c: d0830000 addle r0, r3, r0 b040: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { b044: da000006 ble b064 memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); b048: e1a0200a mov r2, sl b04c: e0830000 add r0, r3, r0 b050: eb000a9d bl dacc memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); b054: e08a1005 add r1, sl, r5 b058: e5940000 ldr r0, [r4] b05c: e08b1001 add r1, fp, r1 b060: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); b064: eb000a98 bl dacc pipe->Length += chunk; b068: e594300c ldr r3, [r4, #12] b06c: e0833006 add r3, r3, r6 b070: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) b074: e5943018 ldr r3, [r4, #24] b078: e3530000 cmp r3, #0 PIPE_WAKEUPREADERS(pipe); b07c: 1594002c ldrne r0, [r4, #44] ; 0x2c b080: 11a0100d movne r1, sp b084: 1b00034a blne bdb4 written += chunk; b088: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; b08c: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { b090: e1550007 cmp r5, r7 b094: 3affffd8 bcc affc b098: e3a06000 mov r6, #0 b09c: ea000002 b b0ac while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; b0a0: e3e0600a mvn r6, #10 b0a4: ea000000 b b0ac pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; b0a8: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); b0ac: e5940028 ldr r0, [r4, #40] ; 0x28 b0b0: ebffed47 bl 65d4 b0b4: ea000000 b b0bc PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; b0b8: e3e06003 mvn r6, #3 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; b0bc: e3550000 cmp r5, #0 b0c0: d1a05006 movle r5, r6 } b0c4: e1a00005 mov r0, r5 b0c8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00010ee4 : ssize_t read( int fd, void *buffer, size_t count ) { 10ee4: e92d4030 push {r4, r5, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); 10ee8: e59f4098 ldr r4, [pc, #152] ; 10f88 10eec: e5944000 ldr r4, [r4] 10ef0: e1500004 cmp r0, r4 10ef4: 2a000006 bcs 10f14 iop = rtems_libio_iop( fd ); 10ef8: e59f408c ldr r4, [pc, #140] ; 10f8c 10efc: e5944000 ldr r4, [r4] 10f00: e3a05038 mov r5, #56 ; 0x38 10f04: e0244095 mla r4, r5, r0, r4 rtems_libio_check_is_open( iop ); 10f08: e5940014 ldr r0, [r4, #20] 10f0c: e3100c01 tst r0, #256 ; 0x100 10f10: 1a000002 bne 10f20 10f14: ebffeb5a bl bc84 <__errno> 10f18: e3a03009 mov r3, #9 10f1c: ea000007 b 10f40 rtems_libio_check_buffer( buffer ); 10f20: e3510000 cmp r1, #0 10f24: 0a000003 beq 10f38 rtems_libio_check_count( count ); 10f28: e3520000 cmp r2, #0 10f2c: 0a000013 beq 10f80 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); 10f30: e3100002 tst r0, #2 10f34: 1a000004 bne 10f4c 10f38: ebffeb51 bl bc84 <__errno> <== NOT EXECUTED 10f3c: e3a03016 mov r3, #22 <== NOT EXECUTED 10f40: e5803000 str r3, [r0] 10f44: e3e00000 mvn r0, #0 10f48: e8bd8030 pop {r4, r5, pc} return 0; /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); 10f4c: e5943020 ldr r3, [r4, #32] 10f50: e1a00004 mov r0, r4 10f54: e1a0e00f mov lr, pc 10f58: e593f008 ldr pc, [r3, #8] if ( rc > 0 ) 10f5c: e3500000 cmp r0, #0 10f60: d8bd8030 pople {r4, r5, pc} iop->offset += rc; 10f64: e284300c add r3, r4, #12 10f68: e893000c ldm r3, {r2, r3} 10f6c: e0922000 adds r2, r2, r0 10f70: e0a33fc0 adc r3, r3, r0, asr #31 10f74: e584200c str r2, [r4, #12] 10f78: e5843010 str r3, [r4, #16] 10f7c: 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 ); 10f80: e1a00002 mov r0, r2 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } 10f84: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== 000050a4 : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 50a4: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) 50a8: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { 50ac: e24dd018 sub sp, sp, #24 50b0: e1a07000 mov r7, r0 50b4: e1a05002 mov r5, r2 rtems_filesystem_location_info_t loc; int result; if (!buf) 50b8: 1a000002 bne 50c8 rtems_set_errno_and_return_minus_one( EFAULT ); 50bc: eb0026b5 bl eb98 <__errno> <== NOT EXECUTED 50c0: e3a0300e mov r3, #14 <== NOT EXECUTED 50c4: ea000013 b 5118 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 50c8: eb002e37 bl 109ac 50cc: e28d4004 add r4, sp, #4 50d0: e1a01000 mov r1, r0 50d4: e3a02000 mov r2, #0 50d8: e1a00007 mov r0, r7 50dc: e1a03004 mov r3, r4 50e0: e58d2000 str r2, [sp] 50e4: ebfffbb3 bl 3fb8 0, &loc, false ); if ( result != 0 ) 50e8: e3500000 cmp r0, #0 50ec: 1a000015 bne 5148 return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ 50f0: e1a00004 mov r0, r4 50f4: e59d3010 ldr r3, [sp, #16] 50f8: e1a0e00f mov lr, pc 50fc: e593f010 ldr pc, [r3, #16] 5100: e3500004 cmp r0, #4 5104: 0a000005 beq 5120 rtems_filesystem_freenode( &loc ); 5108: e1a00004 mov r0, r4 510c: ebfffbe4 bl 40a4 rtems_set_errno_and_return_minus_one( EINVAL ); 5110: eb0026a0 bl eb98 <__errno> 5114: e3a03016 mov r3, #22 5118: e5803000 str r3, [r0] 511c: ea000009 b 5148 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); 5120: e1a02005 mov r2, r5 5124: e1a00004 mov r0, r4 5128: e1a01006 mov r1, r6 512c: e59d3010 ldr r3, [sp, #16] 5130: e1a0e00f mov lr, pc 5134: e593f03c ldr pc, [r3, #60] ; 0x3c 5138: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); 513c: e1a00004 mov r0, r4 5140: ebfffbd7 bl 40a4 return result; 5144: ea000000 b 514c rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) return -1; 5148: e3e05000 mvn r5, #0 result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } 514c: e1a00005 mov r0, r5 5150: e28dd018 add sp, sp, #24 5154: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 00010fe8 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 10fe8: e59f310c ldr r3, [pc, #268] ; 110fc 10fec: e5932010 ldr r2, [r3, #16] 10ff0: e2822001 add r2, r2, #1 void *realloc( void *ptr, size_t size ) { 10ff4: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); 10ff8: 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())) { 10ffc: e59f30fc ldr r3, [pc, #252] ; 11100 11000: e5933000 ldr r3, [r3] 11004: e3530003 cmp r3, #3 void *realloc( void *ptr, size_t size ) { 11008: e1a04000 mov r4, r0 1100c: 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())) { 11010: 1a000009 bne 1103c if (_Thread_Dispatch_disable_level > 0) 11014: e59f30e8 ldr r3, [pc, #232] ; 11104 11018: e5933000 ldr r3, [r3] 1101c: e3530000 cmp r3, #0 return (void *) 0; 11020: 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) 11024: 1a000032 bne 110f4 return (void *) 0; if (_ISR_Nest_level > 0) 11028: e59f20d8 ldr r2, [pc, #216] ; 11108 1102c: e5922000 ldr r2, [r2] 11030: e3520000 cmp r2, #0 return (void *) 0; 11034: 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) 11038: 1a00002d bne 110f4 } /* * Continue with realloc(). */ if ( !ptr ) 1103c: e3540000 cmp r4, #0 11040: 1a000003 bne 11054 return malloc( size ); 11044: e1a00005 mov r0, r5 11048: ebffc408 bl 2070 1104c: e1a04000 mov r4, r0 11050: ea000027 b 110f4 if ( !size ) { 11054: e3550000 cmp r5, #0 11058: 1a000003 bne 1106c free( ptr ); 1105c: e1a00004 mov r0, r4 <== NOT EXECUTED 11060: ebffc333 bl 1d34 <== NOT EXECUTED return (void *) 0; 11064: e1a04005 mov r4, r5 <== NOT EXECUTED 11068: ea000021 b 110f4 <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { 1106c: e59f6098 ldr r6, [pc, #152] ; 1110c 11070: e1a01004 mov r1, r4 11074: e5960000 ldr r0, [r6] 11078: e1a0200d mov r2, sp 1107c: eb00004e bl 111bc <_Protected_heap_Get_block_size> 11080: e2507000 subs r7, r0, #0 11084: 1a000004 bne 1109c errno = EINVAL; 11088: ebffeafd bl bc84 <__errno> 1108c: e3a03016 mov r3, #22 11090: e5803000 str r3, [r0] return (void *) 0; 11094: e1a04007 mov r4, r7 11098: ea000015 b 110f4 } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { 1109c: e5960000 ldr r0, [r6] 110a0: e1a01004 mov r1, r4 110a4: e1a02005 mov r2, r5 110a8: eb000054 bl 11200 <_Protected_heap_Resize_block> 110ac: e3500000 cmp r0, #0 110b0: 1a00000f bne 110f4 * 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 ); 110b4: e1a00005 mov r0, r5 110b8: ebffc3ec bl 2070 MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 110bc: e59f3038 ldr r3, [pc, #56] ; 110fc 110c0: e5932004 ldr r2, [r3, #4] if ( !new_area ) { 110c4: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ 110c8: e2422001 sub r2, r2, #1 110cc: e5832004 str r2, [r3, #4] if ( !new_area ) { 110d0: 0a000006 beq 110f0 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); 110d4: e59d2000 ldr r2, [sp] 110d8: e1a01004 mov r1, r4 110dc: e1550002 cmp r5, r2 110e0: 31a02005 movcc r2, r5 110e4: ebffed14 bl c53c free( ptr ); 110e8: e1a00004 mov r0, r4 110ec: ebffc310 bl 1d34 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; 110f0: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } 110f4: e1a00004 mov r0, r4 110f8: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 00003ce0 : #include int rmdir( const char *pathname ) { 3ce0: e92d40f0 push {r4, r5, r6, r7, lr} 3ce4: e24dd030 sub sp, sp, #48 ; 0x30 3ce8: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); 3cec: ebfffb54 bl 2a44 if ( parentpathlen == 0 ) 3cf0: e2504000 subs r4, r0, #0 3cf4: e28d3018 add r3, sp, #24 3cf8: 1a000005 bne 3d14 rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); 3cfc: e1a00006 mov r0, r6 3d00: e28d102c add r1, sp, #44 ; 0x2c 3d04: e1a02003 mov r2, r3 3d08: eb000048 bl 3e30 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 3d0c: e1a05004 mov r5, r4 3d10: ea000008 b 3d38 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, 3d14: e3a02000 mov r2, #0 3d18: e58d2000 str r2, [sp] 3d1c: e1a00006 mov r0, r6 3d20: e1a01004 mov r1, r4 3d24: e2822002 add r2, r2, #2 3d28: ebfffb27 bl 29cc RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 3d2c: e3500000 cmp r0, #0 3d30: 1a00003a bne 3e20 return -1; free_parentloc = true; 3d34: e3a05001 mov r5, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 3d38: e28de018 add lr, sp, #24 3d3c: e8be000f ldm lr!, {r0, r1, r2, r3} 3d40: e28dc004 add ip, sp, #4 3d44: e8ac000f stmia ip!, {r0, r1, r2, r3} name = pathname + parentpathlen; 3d48: e0864004 add r4, r6, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 3d4c: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 3d50: e1a00004 mov r0, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 3d54: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 3d58: eb0027d1 bl dca4 3d5c: e1a01000 mov r1, r0 3d60: e1a00004 mov r0, r4 3d64: ebfffb44 bl 2a7c 3d68: e0846000 add r6, r4, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 3d6c: e1a00006 mov r0, r6 3d70: eb0027cb bl dca4 3d74: e28d4004 add r4, sp, #4 3d78: e1a01000 mov r1, r0 3d7c: e3a02000 mov r2, #0 3d80: e1a00006 mov r0, r6 3d84: e1a03004 mov r3, r4 3d88: e58d2000 str r2, [sp] 3d8c: ebfffae6 bl 292c 0, &loc, false ); if ( result != 0 ) { 3d90: e3500000 cmp r0, #0 3d94: 0a000004 beq 3dac if ( free_parentloc ) 3d98: e3550000 cmp r5, #0 3d9c: 0a00001f beq 3e20 rtems_filesystem_freenode( &parentloc ); 3da0: e28d0018 add r0, sp, #24 <== NOT EXECUTED 3da4: ebfffbd0 bl 2cec <== NOT EXECUTED 3da8: ea00001c b 3e20 <== NOT EXECUTED } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ 3dac: e1a00004 mov r0, r4 3db0: e59d3010 ldr r3, [sp, #16] 3db4: e1a0e00f mov lr, pc 3db8: e593f010 ldr pc, [r3, #16] 3dbc: e3500001 cmp r0, #1 3dc0: 0a000008 beq 3de8 rtems_filesystem_freenode( &loc ); 3dc4: e1a00004 mov r0, r4 3dc8: ebfffbc7 bl 2cec if ( free_parentloc ) 3dcc: e3550000 cmp r5, #0 rtems_filesystem_freenode( &parentloc ); 3dd0: 128d0018 addne r0, sp, #24 3dd4: 1bfffbc4 blne 2cec rtems_set_errno_and_return_minus_one( ENOTDIR ); 3dd8: eb0023ec bl cd90 <__errno> 3ddc: e3a03014 mov r3, #20 3de0: e5803000 str r3, [r0] 3de4: ea00000d b 3e20 /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); 3de8: e28d6018 add r6, sp, #24 3dec: e1a01004 mov r1, r4 3df0: e59d300c ldr r3, [sp, #12] 3df4: e1a00006 mov r0, r6 3df8: e1a0e00f mov lr, pc 3dfc: e593f034 ldr pc, [r3, #52] ; 0x34 3e00: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); 3e04: e1a00004 mov r0, r4 3e08: ebfffbb7 bl 2cec if ( free_parentloc ) 3e0c: e3550000 cmp r5, #0 3e10: 0a000003 beq 3e24 rtems_filesystem_freenode( &parentloc ); 3e14: e1a00006 mov r0, r6 3e18: ebfffbb3 bl 2cec 3e1c: ea000000 b 3e24 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 3e20: e3e07000 mvn r7, #0 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 3e24: e1a00007 mov r0, r7 3e28: e28dd030 add sp, sp, #48 ; 0x30 3e2c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 000022f8 : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 22f8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 22fc: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { 2300: e24dd040 sub sp, sp, #64 ; 0x40 2304: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) 2308: 0a000057 beq 246c * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 230c: e28d5030 add r5, sp, #48 ; 0x30 2310: e1a00005 mov r0, r5 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 2314: e28d4028 add r4, sp, #40 ; 0x28 * When not using nanosecond CPU usage resolution, we have to count * the number of "ticks" we gave credit for to give the user a rough * guideline as to what each number means proportionally. */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _TOD_Get_uptime( &uptime ); 2318: eb001489 bl 7544 <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); 231c: e1a01005 mov r1, r5 2320: e59f014c ldr r0, [pc, #332] ; 2474 2324: e1a02004 mov r2, r4 2328: eb001d3c bl 9820 <_Timespec_Subtract> } } } #endif (*print)( 232c: e1a00008 mov r0, r8 2330: e59f1140 ldr r1, [pc, #320] ; 2478 2334: e1a0e00f mov lr, pc 2338: e12fff1a bx sl 233c: e59f5138 ldr r5, [pc, #312] ; 247c the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2340: e28db008 add fp, sp, #8 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) 2344: e5b53004 ldr r3, [r5, #4]! 2348: e3530000 cmp r3, #0 234c: 0a00003a beq 243c continue; information = _Objects_Information_table[ api_index ][ 1 ]; 2350: e5936004 ldr r6, [r3, #4] if ( information ) { 2354: e3560000 cmp r6, #0 2358: 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( 235c: 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 ) { 2360: 1a000032 bne 2430 2364: ea000034 b 243c <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; 2368: e596301c ldr r3, [r6, #28] 236c: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) 2370: e3540000 cmp r4, #0 2374: 0a00002c beq 242c continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); 2378: e3a0100d mov r1, #13 237c: e1a0200b mov r2, fp 2380: e5940008 ldr r0, [r4, #8] 2384: eb000fe4 bl 631c (*print)( 2388: e5942008 ldr r2, [r4, #8] 238c: e1a0300b mov r3, fp 2390: e1a00008 mov r0, r8 2394: e59f10e4 ldr r1, [pc, #228] ; 2480 2398: e1a0e00f mov lr, pc 239c: 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; 23a0: e2843084 add r3, r4, #132 ; 0x84 23a4: e893000c ldm r3, {r2, r3} 23a8: e58d2020 str r2, [sp, #32] 23ac: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { 23b0: e59f20cc ldr r2, [pc, #204] ; 2484 23b4: e5923004 ldr r3, [r2, #4] 23b8: e5932008 ldr r2, [r3, #8] 23bc: e5943008 ldr r3, [r4, #8] 23c0: e1520003 cmp r2, r3 23c4: 1a000006 bne 23e4 Timestamp_Control used; _Timestamp_Subtract( 23c8: e59f00b8 ldr r0, [pc, #184] ; 2488 23cc: e28d1030 add r1, sp, #48 ; 0x30 23d0: e1a02009 mov r2, r9 23d4: eb001d11 bl 9820 <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); 23d8: e28d0020 add r0, sp, #32 23dc: e1a01009 mov r1, r9 23e0: eb001cd3 bl 9734 <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); 23e4: e28d203c add r2, sp, #60 ; 0x3c 23e8: e28d3038 add r3, sp, #56 ; 0x38 23ec: e28d0020 add r0, sp, #32 23f0: e28d1028 add r1, sp, #40 ; 0x28 23f4: eb001ce6 bl 9794 <_Timespec_Divide> /* * Print the information */ (*print)( context, 23f8: e3a01ffa mov r1, #1000 ; 0x3e8 23fc: e59d0024 ldr r0, [sp, #36] ; 0x24 2400: eb0051b8 bl 16ae8 <__aeabi_uidiv> 2404: e59d203c ldr r2, [sp, #60] ; 0x3c 2408: e58d2000 str r2, [sp] 240c: e59d2038 ldr r2, [sp, #56] ; 0x38 2410: e1a03000 mov r3, r0 2414: e58d2004 str r2, [sp, #4] 2418: e1a00008 mov r0, r8 241c: e59f1068 ldr r1, [pc, #104] ; 248c 2420: e59d2020 ldr r2, [sp, #32] 2424: e1a0e00f mov lr, pc 2428: 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++ ) { 242c: e2877001 add r7, r7, #1 2430: e1d631b0 ldrh r3, [r6, #16] 2434: e1570003 cmp r7, r3 2438: 9affffca bls 2368 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; 243c: e59f304c ldr r3, [pc, #76] ; 2490 2440: e1550003 cmp r5, r3 2444: 1affffbe bne 2344 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( 2448: e3a01ffa mov r1, #1000 ; 0x3e8 244c: e59d002c ldr r0, [sp, #44] ; 0x2c 2450: eb0051a4 bl 16ae8 <__aeabi_uidiv> 2454: e59f1038 ldr r1, [pc, #56] ; 2494 2458: e1a03000 mov r3, r0 245c: e59d2028 ldr r2, [sp, #40] ; 0x28 2460: e1a00008 mov r0, r8 2464: e1a0e00f mov lr, pc 2468: e12fff1a bx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } 246c: e28dd040 add sp, sp, #64 ; 0x40 2470: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000bc40 : [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { bc40: e3500000 cmp r0, #0 [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { bc44: e92d4010 push {r4, lr} if (sc == RTEMS_SUCCESSFUL) { bc48: 08bd8010 popeq {r4, pc} return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { bc4c: e350001c cmp r0, #28 <== NOT EXECUTED eno = status_code_to_errno [sc]; bc50: 959f3014 ldrls r3, [pc, #20] ; bc6c <== NOT EXECUTED int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; bc54: 83a04016 movhi r4, #22 <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; bc58: 97934100 ldrls r4, [r3, r0, lsl #2] <== NOT EXECUTED } errno = eno; bc5c: eb000008 bl bc84 <__errno> <== NOT EXECUTED bc60: e5804000 str r4, [r0] <== NOT EXECUTED return -1; bc64: e3e00000 mvn r0, #0 <== NOT EXECUTED } } bc68: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== 00001c34 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1c34: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} 1c38: e1a06003 mov r6, r3 /* * Verify Input parameters. */ if ( !pathname ) 1c3c: e2507000 subs r7, r0, #0 int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { int i = 0; 1c40: e3a03000 mov r3, #0 size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1c44: e1a05001 mov r5, r1 1c48: e1a04002 mov r4, r2 int i = 0; 1c4c: e58d3004 str r3, [sp, #4] /* * Verify Input parameters. */ if ( !pathname ) 1c50: 1a000002 bne 1c60 rtems_set_errno_and_return_minus_one( EFAULT ); 1c54: eb00280a bl bc84 <__errno> <== NOT EXECUTED 1c58: e3a0300e mov r3, #14 <== NOT EXECUTED 1c5c: ea000003 b 1c70 <== NOT EXECUTED if ( !pathloc ) 1c60: e3560000 cmp r6, #0 1c64: 1a000004 bne 1c7c rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1c68: eb002805 bl bc84 <__errno> <== NOT EXECUTED 1c6c: e3a03005 mov r3, #5 <== NOT EXECUTED 1c70: e5803000 str r3, [r0] <== NOT EXECUTED 1c74: e3e00000 mvn r0, #0 <== NOT EXECUTED 1c78: ea00000a b 1ca8 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); 1c7c: e28d1004 add r1, sp, #4 1c80: e1a02006 mov r2, r6 1c84: eb00038b bl 2ab8 /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], 1c88: e59d1004 ldr r1, [sp, #4] 1c8c: e59d301c ldr r3, [sp, #28] 1c90: e0870001 add r0, r7, r1 1c94: e58d3000 str r3, [sp] 1c98: e0611005 rsb r1, r1, r5 1c9c: e1a02004 mov r2, r4 1ca0: e1a03006 mov r3, r6 1ca4: ebffffba bl 1b94 pathnamelen - i, flags, pathloc, follow_link ); } 1ca8: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} =============================================================================== 00001b94 : /* * Verify Input parameters. */ if ( !pathname ) 1b94: e3500000 cmp r0, #0 size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { 1b98: e92d4030 push {r4, r5, lr} 1b9c: e1a05002 mov r5, r2 1ba0: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) 1ba4: 1a000002 bne 1bb4 rtems_set_errno_and_return_minus_one( EFAULT ); 1ba8: eb002835 bl bc84 <__errno> <== NOT EXECUTED 1bac: e3a0300e mov r3, #14 <== NOT EXECUTED 1bb0: ea000003 b 1bc4 <== NOT EXECUTED if ( !pathloc ) 1bb4: e3530000 cmp r3, #0 1bb8: 1a000004 bne 1bd0 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ 1bbc: eb002830 bl bc84 <__errno> <== NOT EXECUTED 1bc0: e3a03005 mov r3, #5 <== NOT EXECUTED 1bc4: e5803000 str r3, [r0] <== NOT EXECUTED 1bc8: e3e00000 mvn r0, #0 <== NOT EXECUTED 1bcc: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); 1bd0: e593c00c ldr ip, [r3, #12] 1bd4: e1a0e00f mov lr, pc 1bd8: e59cf000 ldr pc, [ip] /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { 1bdc: e59d200c ldr r2, [sp, #12] 1be0: e2703001 rsbs r3, r0, #1 1be4: 33a03000 movcc r3, #0 1be8: e3520000 cmp r2, #0 1bec: 03a03000 moveq r3, #0 1bf0: e3530000 cmp r3, #0 1bf4: 08bd8030 popeq {r4, r5, pc} type = (*pathloc->ops->node_type_h)( pathloc ); 1bf8: e594300c ldr r3, [r4, #12] 1bfc: e1a00004 mov r0, r4 1c00: e1a0e00f mov lr, pc 1c04: e593f010 ldr pc, [r3, #16] if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1c08: e2400003 sub r0, r0, #3 1c0c: e3500001 cmp r0, #1 1c10: 8a000005 bhi 1c2c * 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 ); 1c14: e594300c ldr r3, [r4, #12] 1c18: e1a00004 mov r0, r4 1c1c: e1a01005 mov r1, r5 1c20: e1a0e00f mov lr, pc 1c24: e593f034 ldr pc, [r3, #52] ; 0x34 1c28: e8bd8030 pop {r4, r5, pc} if ( (result == 0) && follow_link ) { type = (*pathloc->ops->node_type_h)( pathloc ); if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || 1c2c: e3a00000 mov r0, #0 result = (*pathloc->ops->eval_link_h)( pathloc, flags ); } } return result; } 1c30: e8bd8030 pop {r4, r5, pc} =============================================================================== 00001a38 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1a38: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; 1a3c: e59f60e0 ldr r6, [pc, #224] ; 1b24 1a40: e5963000 ldr r3, [r6] 1a44: e3a02012 mov r2, #18 1a48: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1a4c: e59f30d4 ldr r3, [pc, #212] ; 1b28 1a50: e5933000 ldr r3, [r3] 1a54: e3530000 cmp r3, #0 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { 1a58: e24dd018 sub sp, sp, #24 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); 1a5c: 059f00c8 ldreq r0, [pc, #200] ; 1b2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) 1a60: 0a00000a beq 1a90 rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1a64: e59f30c4 ldr r3, [pc, #196] ; 1b30 status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1a68: e3a05000 mov r5, #0 */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; 1a6c: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); 1a70: e58d5000 str r5, [sp] 1a74: e2830008 add r0, r3, #8 1a78: e8900003 ldm r0, {r0, r1} 1a7c: e893000c ldm r3, {r2, r3} 1a80: eb000208 bl 22a8 if ( status == -1 ) 1a84: e3700001 cmn r0, #1 1a88: 1a000001 bne 1a94 rtems_fatal_error_occurred( 0xABCD0002 ); 1a8c: e59f00a0 ldr r0, [pc, #160] ; 1b34 <== NOT EXECUTED 1a90: eb000ead bl 554c <== NOT EXECUTED rtems_filesystem_link_counts = 0; 1a94: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1a98: 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; 1a9c: 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); 1aa0: e3a01001 mov r1, #1 1aa4: e1a03004 mov r3, r4 1aa8: e1a02005 mov r2, r5 1aac: e59f0084 ldr r0, [pc, #132] ; 1b38 rtems_filesystem_root = loc; 1ab0: e1a07004 mov r7, r4 * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1ab4: e58d5000 str r5, [sp] 1ab8: eb00005d bl 1c34 rtems_filesystem_root = loc; 1abc: e596c000 ldr ip, [r6] 1ac0: e8b7000f ldm r7!, {r0, r1, r2, r3} 1ac4: e28cc018 add ip, ip, #24 1ac8: e8ac000f stmia ip!, {r0, r1, r2, r3} 1acc: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1ad0: 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; 1ad4: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 1ad8: e1a02005 mov r2, r5 1adc: e1a03004 mov r3, r4 1ae0: e59f0050 ldr r0, [pc, #80] ; 1b38 1ae4: e58d5000 str r5, [sp] 1ae8: eb000051 bl 1c34 rtems_filesystem_current = loc; 1aec: e596c000 ldr ip, [r6] 1af0: e8b4000f ldm r4!, {r0, r1, r2, r3} 1af4: e28cc004 add ip, ip, #4 1af8: e8ac000f stmia ip!, {r0, r1, r2, r3} 1afc: 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); 1b00: e59f0034 ldr r0, [pc, #52] ; 1b3c /* 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; 1b04: 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); 1b08: e59f1030 ldr r1, [pc, #48] ; 1b40 1b0c: eb000193 bl 2160 if ( status != 0 ) 1b10: e3500000 cmp r0, #0 rtems_fatal_error_occurred( 0xABCD0003 ); 1b14: 159f0028 ldrne r0, [pc, #40] ; 1b44 * 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 ) 1b18: 1affffdc bne 1a90 * 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. */ } 1b1c: e28dd018 add sp, sp, #24 1b20: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 000096b0 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { 96b0: e92d41f0 push {r4, r5, r6, r7, r8, lr} 96b4: e1a06000 mov r6, r0 96b8: e1a07001 mov r7, r1 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; 96bc: 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]; 96c0: e59f4078 ldr r4, [pc, #120] ; 9740 rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { 96c4: ea000004 b 96dc stop = (*routine)( table_entry, routine_arg ); 96c8: e1a00004 mov r0, r4 96cc: e1a01007 mov r1, r7 96d0: e1a0e00f mov lr, pc 96d4: e12fff16 bx r6 ++table_entry; 96d8: 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 ) { 96dc: e5943000 ldr r3, [r4] 96e0: e3530000 cmp r3, #0 96e4: 0a000002 beq 96f4 96e8: e3500000 cmp r0, #0 96ec: 0afffff5 beq 96c8 96f0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { 96f4: e2508000 subs r8, r0, #0 96f8: 18bd81f0 popne {r4, r5, r6, r7, r8, pc} } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 96fc: e59f5040 ldr r5, [pc, #64] ; 9744 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { rtems_libio_lock(); 9700: ebffffe0 bl 9688 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 9704: e4954004 ldr r4, [r5], #4 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 9708: ea000005 b 9724 !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 ); 970c: e2840008 add r0, r4, #8 9710: e1a01007 mov r1, r7 9714: e1a0e00f mov lr, pc 9718: e12fff16 bx r6 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } 971c: 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 ); 9720: e1a08000 mov r8, r0 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( 9724: e1540005 cmp r4, r5 9728: 0a000001 beq 9734 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; 972c: e3580000 cmp r8, #0 9730: 0afffff5 beq 970c ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); } rtems_libio_unlock(); 9734: ebffffd9 bl 96a0 9738: e1a00008 mov r0, r8 } return stop; } 973c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00002624 : void *rtems_gxx_getspecific(__gthread_key_t key) { 2624: e92d4031 push {r0, r4, r5, lr} 2628: e1a04000 mov r4, r0 rtems_status_code status; void *p= 0; 262c: e3a05000 mov r5, #0 2630: e28d2004 add r2, sp, #4 2634: 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 ); 2638: e1a00005 mov r0, r5 263c: e1a01004 mov r1, r4 2640: e1a0200d mov r2, sp 2644: eb000e2e bl 5f04 if ( status == RTEMS_SUCCESSFUL ) { 2648: e1500005 cmp r0, r5 /* We do not have to do this, but what the heck ! */ p= key->val; 264c: 05943000 ldreq r3, [r4] 2650: 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 ) { 2654: 0a000007 beq 2678 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 ); 2658: e1a00005 mov r0, r5 <== NOT EXECUTED 265c: e1a01004 mov r1, r4 <== NOT EXECUTED 2660: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED 2664: eb000dde bl 5de4 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) { 2668: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); } key->val = (void *)0; 266c: 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"); 2670: 159f0008 ldrne r0, [pc, #8] ; 2680 <== NOT EXECUTED 2674: 1b001e89 blne a0a0 <== NOT EXECUTED p, rtems_task_self() ); #endif return p; } 2678: e59d0000 ldr r0, [sp] 267c: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== 000025e4 : { #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; 25e4: e3a03000 mov r3, #0 <== NOT EXECUTED 25e8: e5803000 str r3, [r0] <== NOT EXECUTED return 0; } 25ec: e1a00003 mov r0, r3 <== NOT EXECUTED 25f0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00002704 : int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex) { 2704: 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); 2708: e5900000 ldr r0, [r0] <== NOT EXECUTED 270c: eb000c1a bl 577c <== NOT EXECUTED if ( status == RTEMS_SUCCESSFUL ) 2710: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; return -1; } 2714: 13e00000 mvnne r0, #0 <== NOT EXECUTED 2718: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== 00002f20 : } } rtems_status_code rtems_libio_set_private_env(void) { 2f20: 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); 2f24: e3a00000 mov r0, #0 free(env); } } rtems_status_code rtems_libio_set_private_env(void) { 2f28: 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); 2f2c: e1a01000 mov r1, r0 2f30: e28d2018 add r2, sp, #24 2f34: eb000a64 bl 58cc if (sc != RTEMS_SUCCESSFUL) return sc; 2f38: e2508000 subs r8, r0, #0 2f3c: 1a000037 bne 3020 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { 2f40: e59f40e4 ldr r4, [pc, #228] ; 302c 2f44: e59f30e4 ldr r3, [pc, #228] ; 3030 2f48: e5942000 ldr r2, [r4] 2f4c: e1520003 cmp r2, r3 2f50: 1a00000f bne 2f94 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); 2f54: e2800048 add r0, r0, #72 ; 0x48 2f58: ebfffd51 bl 24a4 if (!tmp) 2f5c: e2505000 subs r5, r0, #0 return RTEMS_NO_MEMORY; 2f60: 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) 2f64: 0a00002d beq 3020 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( 2f68: e1a00008 mov r0, r8 2f6c: e1a01004 mov r1, r4 2f70: e59f20bc ldr r2, [pc, #188] ; 3034 2f74: eb000aa4 bl 5a0c RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { 2f78: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; 2f7c: 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) { 2f80: 0a000003 beq 2f94 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); 2f84: e1a00005 mov r0, r5 <== NOT EXECUTED 2f88: ebfffbdf bl 1f0c <== NOT EXECUTED return sc; 2f8c: e1a08006 mov r8, r6 <== NOT EXECUTED 2f90: ea000022 b 3020 <== NOT EXECUTED } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ 2f94: e59f6090 ldr r6, [pc, #144] ; 302c 2f98: e5964000 ldr r4, [r6] 2f9c: e59f108c ldr r1, [pc, #140] ; 3030 2fa0: e1a00004 mov r0, r4 2fa4: e3a02048 mov r2, #72 ; 0x48 2fa8: eb00267a bl c998 rtems_current_user_env->task_id=task_id; /* mark the local values*/ 2fac: 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); 2fb0: 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*/ 2fb4: 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); 2fb8: e28d4004 add r4, sp, #4 2fbc: e1a03004 mov r3, r4 2fc0: e3a01001 mov r1, #1 2fc4: e1a02005 mov r2, r5 2fc8: e59f0068 ldr r0, [pc, #104] ; 3038 rtems_filesystem_root = loc; 2fcc: e1a07004 mov r7, 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); 2fd0: e58d5000 str r5, [sp] 2fd4: ebfffb8c bl 1e0c rtems_filesystem_root = loc; 2fd8: e596c000 ldr ip, [r6] 2fdc: e8b7000f ldm r7!, {r0, r1, r2, r3} 2fe0: e28cc018 add ip, ip, #24 2fe4: e8ac000f stmia ip!, {r0, r1, r2, r3} 2fe8: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2fec: 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; 2ff0: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); 2ff4: e1a02005 mov r2, r5 2ff8: e1a03004 mov r3, r4 2ffc: e59f0034 ldr r0, [pc, #52] ; 3038 3000: e58d5000 str r5, [sp] 3004: ebfffb80 bl 1e0c rtems_filesystem_current = loc; 3008: e596c000 ldr ip, [r6] 300c: e8b4000f ldm r4!, {r0, r1, r2, r3} 3010: e28cc004 add ip, ip, #4 3014: e8ac000f stmia ip!, {r0, r1, r2, r3} 3018: e5973000 ldr r3, [r7] 301c: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } 3020: e1a00008 mov r0, r8 3024: e28dd01c add sp, sp, #28 3028: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 0000303c : * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { 303c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED 3040: 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); 3044: e3a00000 mov r0, #0 <== NOT EXECUTED 3048: e1a01000 mov r1, r0 <== NOT EXECUTED 304c: e1a0200d mov r2, sp <== NOT EXECUTED 3050: eb000a1d bl 58cc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 3054: e2503000 subs r3, r0, #0 <== NOT EXECUTED 3058: 1a00001c bne 30d0 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { 305c: e59f1074 ldr r1, [pc, #116] ; 30d8 <== NOT EXECUTED 3060: e5915000 ldr r5, [r1] <== NOT EXECUTED 3064: e59d3000 ldr r3, [sp] <== NOT EXECUTED 3068: e5952000 ldr r2, [r5] <== NOT EXECUTED 306c: e1520003 cmp r2, r3 <== NOT EXECUTED 3070: 1a000005 bne 308c <== 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); 3074: eb000a8e bl 5ab4 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; 3078: e2503000 subs r3, r0, #0 <== NOT EXECUTED 307c: 1a000013 bne 30d0 <== NOT EXECUTED free_user_env(tmp); 3080: e1a00005 mov r0, r5 <== NOT EXECUTED 3084: ebffff98 bl 2eec <== NOT EXECUTED 3088: ea000004 b 30a0 <== NOT EXECUTED } else { sc = rtems_task_variable_get( 308c: e1a00004 mov r0, r4 <== NOT EXECUTED 3090: e28d2004 add r2, sp, #4 <== NOT EXECUTED 3094: eb000aa4 bl 5b2c <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) 3098: e2503000 subs r3, r0, #0 <== NOT EXECUTED 309c: 1a000008 bne 30c4 <== NOT EXECUTED goto bailout; } /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( 30a0: e59f4030 ldr r4, [pc, #48] ; 30d8 <== NOT EXECUTED 30a4: e59f2030 ldr r2, [pc, #48] ; 30dc <== NOT EXECUTED 30a8: e3a00000 mov r0, #0 <== NOT EXECUTED 30ac: e1a01004 mov r1, r4 <== NOT EXECUTED 30b0: eb000a55 bl 5a0c <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) 30b4: 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; 30b8: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED 30bc: 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) 30c0: 0a000002 beq 30d0 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; 30c4: e59f1014 ldr r1, [pc, #20] ; 30e0 <== NOT EXECUTED 30c8: e59f2008 ldr r2, [pc, #8] ; 30d8 <== NOT EXECUTED 30cc: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } 30d0: e1a00003 mov r0, r3 <== NOT EXECUTED 30d4: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== 00009458 : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 9458: e2003006 and r3, r0, #6 945c: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; 9460: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { 9464: 0a000005 beq 9480 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { 9468: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; 946c: 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) { 9470: 1a000002 bne 9480 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; 9474: e3100004 tst r0, #4 <== NOT EXECUTED 9478: 03a03000 moveq r3, #0 <== NOT EXECUTED 947c: 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 ) { 9480: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; 9484: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { 9488: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; 948c: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { 9490: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; 9494: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } 9498: e1a00003 mov r0, r3 949c: e12fff1e bx lr =============================================================================== 0000ba08 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { ba08: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} ba0c: e24dd048 sub sp, sp, #72 ; 0x48 ba10: e1a0b001 mov fp, r1 int success = 0; char *dup_path = strdup(path); ba14: eb0009e6 bl e1b4 if (dup_path != NULL) { ba18: e2505000 subs r5, r0, #0 success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; ba1c: 03e00000 mvneq r0, #0 rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { ba20: 0a000056 beq bb80 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ba24: e5d53000 ldrb r3, [r5] ba28: e3a06000 mov r6, #0 ba2c: e353002f cmp r3, #47 ; 0x2f ++p; ba30: 02857001 addeq r7, r5, #1 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ ba34: 11a07005 movne r7, r5 ba38: e3a03001 mov r3, #1 ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') ba3c: e1a09006 mov r9, r6 retval = 0; break; } } if (!last) *p = '/'; ba40: 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) { ba44: 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') ba48: e4d72001 ldrb r2, [r7], #1 ba4c: e3520000 cmp r2, #0 last = 1; ba50: 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') ba54: 0a000002 beq ba64 last = 1; else if (p[0] != '/') ba58: e352002f cmp r2, #47 ; 0x2f ba5c: 03a02000 moveq r2, #0 ba60: 1afffff8 bne ba48 continue; *p = '\0'; if (!last && p[1] == '\0') ba64: e3520000 cmp r2, #0 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; ba68: e5479001 strb r9, [r7, #-1] if (!last && p[1] == '\0') ba6c: 13a04001 movne r4, #1 ba70: 1a000002 bne ba80 ba74: e5d74000 ldrb r4, [r7] ba78: e2744001 rsbs r4, r4, #1 ba7c: 33a04000 movcc r4, #0 last = 1; if (first) { ba80: e3530000 cmp r3, #0 ba84: 0a000004 beq ba9c * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); ba88: e3a00000 mov r0, #0 ba8c: eb000069 bl bc38 ba90: e1a06000 mov r6, r0 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); ba94: e3c000c0 bic r0, r0, #192 ; 0xc0 ba98: eb000066 bl bc38 first = 0; } if (last) ba9c: e3540000 cmp r4, #0 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { baa0: 059f10f0 ldreq r1, [pc, #240] ; bb98 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) baa4: 0a000002 beq bab4 (void)umask(oumask); baa8: e1a00006 mov r0, r6 baac: eb000061 bl bc38 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { bab0: e1a0100b mov r1, fp bab4: e1a00005 mov r0, r5 bab8: ebffdea7 bl 355c babc: e3500000 cmp r0, #0 bac0: aa00001f bge bb44 if (errno == EEXIST || errno == EISDIR) { bac4: eb0005d2 bl d214 <__errno> bac8: e5903000 ldr r3, [r0] bacc: e3530011 cmp r3, #17 bad0: 0a000003 beq bae4 bad4: eb0005ce bl d214 <__errno> <== NOT EXECUTED bad8: e5903000 ldr r3, [r0] <== NOT EXECUTED badc: e3530015 cmp r3, #21 <== NOT EXECUTED bae0: 1a00001c bne bb58 <== NOT EXECUTED if (stat(path, &sb) < 0) { bae4: e1a00005 mov r0, r5 bae8: e1a0100d mov r1, sp baec: eb00002a bl bb9c baf0: e3500000 cmp r0, #0 baf4: ba000017 blt bb58 retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { baf8: e59d300c ldr r3, [sp, #12] bafc: e2033a0f and r3, r3, #61440 ; 0xf000 bb00: e3530901 cmp r3, #16384 ; 0x4000 bb04: 0a00000b beq bb38 if (last) bb08: e3540000 cmp r4, #0 bb0c: 0a000004 beq bb24 errno = EEXIST; bb10: eb0005bf bl d214 <__errno> bb14: e3a03011 mov r3, #17 bb18: e5803000 str r3, [r0] else errno = ENOTDIR; retval = 0; bb1c: e3a07000 mov r7, #0 bb20: ea000011 b bb6c break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; bb24: eb0005ba bl d214 <__errno> <== NOT EXECUTED bb28: e3a03014 mov r3, #20 <== NOT EXECUTED bb2c: e5803000 str r3, [r0] <== NOT EXECUTED retval = 0; bb30: e1a07004 mov r7, r4 <== NOT EXECUTED bb34: ea00000a b bb64 <== NOT EXECUTED break; } if (last) bb38: e3540000 cmp r4, #0 bb3c: 1a000011 bne bb88 bb40: ea000001 b bb4c } else { retval = 0; break; } } if (!last) bb44: e3540000 cmp r4, #0 bb48: 1a000010 bne bb90 *p = '/'; bb4c: e547a001 strb sl, [r7, #-1] bb50: e3a03000 mov r3, #0 bb54: eaffffbb b ba48 } if (!first && !last) bb58: 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; bb5c: e3a07000 mov r7, #0 <== NOT EXECUTED } } if (!last) *p = '/'; } if (!first && !last) bb60: 1a000001 bne bb6c <== NOT EXECUTED (void)umask(oumask); bb64: e1a00006 mov r0, r6 <== NOT EXECUTED bb68: eb000032 bl bc38 <== NOT EXECUTED int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); bb6c: e1a00005 mov r0, r5 bb70: ebffdcd7 bl 2ed4 } return success != 0 ? 0 : -1; bb74: e3570000 cmp r7, #0 bb78: 13a00000 movne r0, #0 bb7c: 03e00000 mvneq r0, #0 } bb80: e28dd048 add sp, sp, #72 ; 0x48 bb84: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} errno = ENOTDIR; retval = 0; break; } if (last) retval = 2; bb88: e3a07002 mov r7, #2 bb8c: eafffff6 b bb6c } else { retval = 0; break; } } if (!last) bb90: e3a07001 mov r7, #1 bb94: eafffff4 b bb6c =============================================================================== 000013e8 : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 13e8: e59f303c ldr r3, [pc, #60] ; 142c /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 13ec: e92d4800 push {fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; 13f0: e5932004 ldr r2, [r3, #4] ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 13f4: e59230c4 ldr r3, [r2, #196] ; 0xc4 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { 13f8: e28db004 add fp, sp, #4 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { 13fc: e15b0003 cmp fp, r3 1400: 3a000003 bcc 1414 return false; } if ( sp > (the_stack->area + the_stack->size) ) { 1404: e59220c0 ldr r2, [r2, #192] ; 0xc0 1408: e0833002 add r3, r3, r2 140c: e15b0003 cmp fp, r3 1410: 9a000003 bls 1424 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); 1414: e59f3010 ldr r3, [pc, #16] ; 142c <== NOT EXECUTED 1418: e3a01001 mov r1, #1 <== NOT EXECUTED 141c: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED 1420: ebffffad bl 12dc <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } 1424: e3a00000 mov r0, #0 1428: e8bd8800 pop {fp, pc} =============================================================================== 0000ada8 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { ada8: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) adac: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { adb0: e1a05000 mov r5, r0 adb4: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; adb8: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) adbc: 0a000018 beq ae24 return RTEMS_INVALID_ADDRESS; errno = 0; adc0: eb00078d bl cbfc <__errno> adc4: e3a03000 mov r3, #0 adc8: 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 ); adcc: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; add0: 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 ); add4: e1a00005 mov r0, r5 add8: e3a02010 mov r2, #16 addc: eb001513 bl 10230 #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 ) ade0: e3560000 cmp r6, #0 *endptr = end; ade4: 159d3000 ldrne r3, [sp] ade8: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) adec: e59d3000 ldr r3, [sp] adf0: e1530005 cmp r3, r5 *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); adf4: e1a07000 mov r7, r0 if ( endptr ) *endptr = end; /* nothing was converted */ if ( end == s ) return RTEMS_NOT_DEFINED; adf8: 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 ) adfc: 0a000008 beq ae24 return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) ae00: e3770001 cmn r7, #1 ae04: 1a000004 bne ae1c ae08: eb00077b bl cbfc <__errno> <== NOT EXECUTED ae0c: e5903000 ldr r3, [r0] <== NOT EXECUTED ae10: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; ae14: 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)) ae18: 0a000001 beq ae24 <== 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; ae1c: e5847000 str r7, [r4] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; ae20: e3a00000 mov r0, #0 } ae24: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== 0000166c : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { 166c: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} 1670: e24ddf6b sub sp, sp, #428 ; 0x1ac 1674: e58d1010 str r1, [sp, #16] 1678: e58d2018 str r2, [sp, #24] 167c: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( 1680: eb003825 bl f71c 1684: e3a02000 mov r2, #0 1688: e1a01000 mov r1, r0 168c: e28d3f65 add r3, sp, #404 ; 0x194 1690: e59d000c ldr r0, [sp, #12] 1694: e58d2000 str r2, [sp] 1698: eb0002b3 bl 216c strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) 169c: e2504000 subs r4, r0, #0 16a0: 1a00006c bne 1858 return -1; if (root_loc.ops != &IMFS_ops 16a4: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 16a8: e59f21c0 ldr r2, [pc, #448] ; 1870 16ac: e1530002 cmp r3, r2 16b0: 0a000005 beq 16cc && root_loc.ops != &fifoIMFS_ops) 16b4: e59f21b8 ldr r2, [pc, #440] ; 1874 <== NOT EXECUTED 16b8: e1530002 cmp r3, r2 <== NOT EXECUTED 16bc: 1a000065 bne 1858 <== NOT EXECUTED 16c0: ea000001 b 16cc <== NOT EXECUTED 16c4: e1a08004 mov r8, r4 16c8: ea000006 b 16e8 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 16cc: e28d2f65 add r2, sp, #404 ; 0x194 16d0: e58d2004 str r2, [sp, #4] 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops 16d4: 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); 16d8: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 16dc: e28d9d06 add r9, sp, #384 ; 0x180 * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); 16e0: e28d501c add r5, sp, #28 16e4: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) 16e8: e59d3018 ldr r3, [sp, #24] 16ec: e2884c02 add r4, r8, #512 ; 0x200 16f0: e1540003 cmp r4, r3 16f4: 8a000059 bhi 1860 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; 16f8: e59de010 ldr lr, [sp, #16] 16fc: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) 1700: e2880c01 add r0, r8, #256 ; 0x100 1704: e2800001 add r0, r0, #1 1708: e59f1168 ldr r1, [pc, #360] ; 1878 170c: e3a02007 mov r2, #7 1710: eb003819 bl f77c 1714: e2506000 subs r6, r0, #0 1718: 1a000050 bne 1860 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); 171c: e3a02063 mov r2, #99 ; 0x63 1720: e1a01008 mov r1, r8 1724: e1a00007 mov r0, r7 1728: eb00386f bl f8ec filename[MAX_NAME_FIELD_SIZE] = '\0'; 172c: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 1730: e3a01008 mov r1, #8 1734: 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]; 1738: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); 173c: eb001d37 bl 8c20 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1740: 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); 1744: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); 1748: e288007c add r0, r8, #124 ; 0x7c 174c: eb001d33 bl 8c20 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1750: 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); 1754: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); 1758: e2880094 add r0, r8, #148 ; 0x94 175c: eb001d2f bl 8c20 <_rtems_octal2ulong> 1760: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) 1764: e1a00008 mov r0, r8 1768: e58d3008 str r3, [sp, #8] 176c: eb001d39 bl 8c58 <_rtems_tar_header_checksum> 1770: e59d3008 ldr r3, [sp, #8] 1774: e1500003 cmp r0, r3 1778: 1a000038 bne 1860 * 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) { 177c: e3560035 cmp r6, #53 ; 0x35 1780: 1a000012 bne 17d0 strcpy(full_filename, mountpoint); 1784: e59d100c ldr r1, [sp, #12] 1788: e1a00005 mov r0, r5 178c: eb00361e bl f00c if (full_filename[strlen(full_filename)-1] != '/') 1790: e1a00005 mov r0, r5 1794: eb0037e0 bl f71c 1798: e28d2f6b add r2, sp, #428 ; 0x1ac 179c: e0820000 add r0, r2, r0 17a0: e5503191 ldrb r3, [r0, #-401] ; 0x191 17a4: e353002f cmp r3, #47 ; 0x2f strcat(full_filename, "/"); 17a8: 11a00005 movne r0, r5 17ac: 159f10c8 ldrne r1, [pc, #200] ; 187c 17b0: 1b00355e blne ed30 strcat(full_filename, filename); 17b4: e1a01007 mov r1, r7 17b8: e1a00005 mov r0, r5 17bc: eb00355b bl ed30 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); 17c0: e1a00005 mov r0, r5 17c4: e59f10b4 ldr r1, [pc, #180] ; 1880 17c8: eb000487 bl 29ec 17cc: eaffffbc b 16c4 * 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) { 17d0: e3560030 cmp r6, #48 ; 0x30 17d4: 1affffba bne 16c4 const char *name; loc = root_loc; 17d8: e59dc004 ldr ip, [sp, #4] 17dc: e8bc000f ldm ip!, {r0, r1, r2, r3} 17e0: e1a0e009 mov lr, r9 17e4: e8ae000f stmia lr!, {r0, r1, r2, r3} 17e8: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 17ec: e1a00007 mov r0, r7 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; 17f0: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { 17f4: e1a01009 mov r1, r9 17f8: e28d2f6a add r2, sp, #424 ; 0x1a8 17fc: eb001ff0 bl 97c4 1800: e2506000 subs r6, r0, #0 1804: 1a00000d bne 1840 node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, 1808: e59d2014 ldr r2, [sp, #20] 180c: e1a03b82 lsl r3, r2, #23 1810: 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( 1814: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 1818: e3833902 orr r3, r3, #32768 ; 0x8000 181c: e1a00009 mov r0, r9 1820: e3a01006 mov r1, #6 1824: e58d6000 str r6, [sp] 1828: eb001e54 bl 9180 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]; 182c: e59d2010 ldr r2, [sp, #16] 1830: 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; 1834: e580b050 str fp, [r0, #80] ; 0x50 1838: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; 183c: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; 1840: e28bbf7f add fp, fp, #508 ; 0x1fc 1844: e28bb003 add fp, fp, #3 offset += 512 * nblocks; 1848: e3cbbf7f bic fp, fp, #508 ; 0x1fc 184c: e3cbb003 bic fp, fp, #3 1850: e08b4004 add r4, fp, r4 1854: eaffff9a b 16c4 if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; 1858: e3e04000 mvn r4, #0 <== NOT EXECUTED 185c: ea000000 b 1864 <== NOT EXECUTED 1860: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } 1864: e1a00004 mov r0, r4 1868: e28ddf6b add sp, sp, #428 ; 0x1ac 186c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000b82c : rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { b82c: 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 ) b830: e252a000 subs sl, r2, #0 rtems_status_code rtems_task_mode( rtems_mode mode_set, rtems_mode mask, rtems_mode *previous_mode_set ) { b834: e1a04000 mov r4, r0 b838: 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; b83c: 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 ) b840: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; b844: e59f314c ldr r3, [pc, #332] ; b998 b848: 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; b84c: e5d78074 ldrb r8, [r7, #116] ; 0x74 if ( !previous_mode_set ) return RTEMS_INVALID_ADDRESS; executing = _Thread_Executing; api = executing->API_Extensions[ THREAD_API_RTEMS ]; b850: e5976100 ldr r6, [r7, #256] ; 0x100 asr = &api->Signal; old_mode = (executing->is_preemptible) ? RTEMS_PREEMPT : RTEMS_NO_PREEMPT; if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) b854: 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; b858: 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; b85c: 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; b860: 03a08c01 moveq r8, #256 ; 0x100 b864: 13a08000 movne r8, #0 if ( executing->budget_algorithm == THREAD_CPU_BUDGET_ALGORITHM_NONE ) b868: e3530000 cmp r3, #0 old_mode |= RTEMS_NO_TIMESLICE; else old_mode |= RTEMS_TIMESLICE; b86c: 13888c02 orrne r8, r8, #512 ; 0x200 old_mode |= (asr->is_enabled) ? RTEMS_ASR : RTEMS_NO_ASR; b870: e3590000 cmp r9, #0 b874: 03a09b01 moveq r9, #1024 ; 0x400 b878: 13a09000 movne r9, #0 old_mode |= _ISR_Get_level(); b87c: ebfff306 bl 849c <_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; b880: e1899000 orr r9, r9, r0 old_mode |= _ISR_Get_level(); b884: e1898008 orr r8, r9, r8 /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) b888: 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; b88c: e58a8000 str r8, [sl] /* * These are generic thread scheduling characteristics. */ if ( mask & RTEMS_PREEMPT_MASK ) b890: 0a000003 beq b8a4 executing->is_preemptible = _Modes_Is_preempt(mode_set) ? true : false; b894: e3140c01 tst r4, #256 ; 0x100 b898: 13a03000 movne r3, #0 b89c: 03a03001 moveq r3, #1 b8a0: e5c73074 strb r3, [r7, #116] ; 0x74 if ( mask & RTEMS_TIMESLICE_MASK ) { b8a4: e3150c02 tst r5, #512 ; 0x200 b8a8: 0a000006 beq b8c8 if ( _Modes_Is_timeslice(mode_set) ) { b8ac: e2143c02 ands r3, r4, #512 ; 0x200 executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_RESET_TIMESLICE; b8b0: 13a03001 movne r3, #1 b8b4: 1587307c strne r3, [r7, #124] ; 0x7c executing->cpu_time_budget = _Thread_Ticks_per_timeslice; b8b8: 159f30dc ldrne r3, [pc, #220] ; b99c b8bc: 15933000 ldrne r3, [r3] } else executing->budget_algorithm = THREAD_CPU_BUDGET_ALGORITHM_NONE; b8c0: 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; b8c4: 15873078 strne r3, [r7, #120] ; 0x78 /* * Set the new interrupt level */ if ( mask & RTEMS_INTERRUPT_MASK ) b8c8: e3150080 tst r5, #128 ; 0x80 b8cc: 0a000001 beq b8d8 */ RTEMS_INLINE_ROUTINE void _Modes_Set_interrupt_level ( Modes_Control mode_set ) { _ISR_Set_level( _Modes_Get_interrupt_level( mode_set ) ); b8d0: e2040080 and r0, r4, #128 ; 0x80 b8d4: ebfff2eb bl 8488 <_CPU_ISR_Set_level> */ is_asr_enabled = false; needs_asr_dispatching = false; if ( mask & RTEMS_ASR_MASK ) { b8d8: e2150b01 ands r0, r5, #1024 ; 0x400 b8dc: 0a000013 beq b930 * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( b8e0: 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 ) { b8e4: e5d62008 ldrb r2, [r6, #8] * Output: * *previous_mode_set - previous mode set * always return RTEMS_SUCCESSFUL; */ rtems_status_code rtems_task_mode( b8e8: 13a03000 movne r3, #0 b8ec: 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 ) { b8f0: e1520003 cmp r2, r3 /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; b8f4: 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 ) { b8f8: 0a00000c beq b930 asr->is_enabled = is_asr_enabled; b8fc: e5c63008 strb r3, [r6, #8] static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( b900: e10f3000 mrs r3, CPSR b904: e3832080 orr r2, r3, #128 ; 0x80 b908: e129f002 msr CPSR_fc, r2 { rtems_signal_set _signals; ISR_Level _level; _ISR_Disable( _level ); _signals = information->signals_pending; b90c: e2861014 add r1, r6, #20 b910: e8910006 ldm r1, {r1, r2} information->signals_pending = information->signals_posted; information->signals_posted = _signals; b914: 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; b918: e5861018 str r1, [r6, #24] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( b91c: e129f003 msr CPSR_fc, r3 _ASR_Swap_signals( asr ); if ( _ASR_Are_signals_pending( asr ) ) { b920: e5960014 ldr r0, [r6, #20] /* * This is specific to the RTEMS API */ is_asr_enabled = false; needs_asr_dispatching = false; b924: e3500000 cmp r0, #0 b928: 13a00001 movne r0, #1 b92c: 03a00000 moveq r0, #0 needs_asr_dispatching = true; } } } if ( _System_state_Is_up( _System_state_Get() ) ) b930: e59f3068 ldr r3, [pc, #104] ; b9a0 b934: e5933000 ldr r3, [r3] b938: e3530003 cmp r3, #3 b93c: 1a000013 bne b990 */ RTEMS_INLINE_ROUTINE bool _Thread_Evaluate_mode( void ) { Thread_Control *executing; executing = _Thread_Executing; b940: e59f2050 ldr r2, [pc, #80] ; b998 b944: e5923004 ldr r3, [r2, #4] if ( !_States_Is_ready( executing->current_state ) || b948: e5931010 ldr r1, [r3, #16] b94c: e3510000 cmp r1, #0 b950: 1a000005 bne b96c b954: e5922008 ldr r2, [r2, #8] b958: e1530002 cmp r3, r2 b95c: 0a000006 beq b97c ( !_Thread_Is_heir( executing ) && executing->is_preemptible ) ) { b960: e5d33074 ldrb r3, [r3, #116] ; 0x74 b964: e3530000 cmp r3, #0 b968: 0a000003 beq b97c _Context_Switch_necessary = true; b96c: e59f3024 ldr r3, [pc, #36] ; b998 b970: e3a02001 mov r2, #1 b974: e5c32010 strb r2, [r3, #16] b978: ea000001 b b984 if ( _Thread_Evaluate_mode() || needs_asr_dispatching ) b97c: e3500000 cmp r0, #0 b980: 08bd87f0 popeq {r4, r5, r6, r7, r8, r9, sl, pc} _Thread_Dispatch(); b984: ebffece5 bl 6d20 <_Thread_Dispatch> return RTEMS_SUCCESSFUL; b988: e3a00000 mov r0, #0 b98c: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} b990: e3a00000 mov r0, #0 <== NOT EXECUTED } b994: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} <== NOT EXECUTED =============================================================================== 000031d8 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; 31d8: e59f300c ldr r3, [pc, #12] ; 31ec <== NOT EXECUTED 31dc: e5830008 str r0, [r3, #8] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; 31e0: e8830006 stm r3, {r1, r2} <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } 31e4: e3a00000 mov r0, #0 <== NOT EXECUTED 31e8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== 00003040 : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3040: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { 3044: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3048: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( 304c: e59f3174 ldr r3, [pc, #372] ; 31c8 3050: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { 3054: 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( 3058: e1a02001 mov r2, r1 305c: e5930000 ldr r0, [r3] 3060: eb0007a3 bl 4ef4 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 3064: e3500000 cmp r0, #0 3068: 1a000022 bne 30f8 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { 306c: e5943008 ldr r3, [r4, #8] 3070: e2433001 sub r3, r3, #1 3074: e3530000 cmp r3, #0 3078: e5843008 str r3, [r4, #8] 307c: 1a00004c bne 31b4 if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 3080: e59420cc ldr r2, [r4, #204] ; 0xcc 3084: e59f3140 ldr r3, [pc, #320] ; 31cc 3088: e0833282 add r3, r3, r2, lsl #5 308c: e5931004 ldr r1, [r3, #4] 3090: e3510000 cmp r1, #0 3094: 0a000003 beq 30a8 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); 3098: e1a00004 mov r0, r4 309c: e1a0e00f mov lr, pc 30a0: e12fff11 bx r1 30a4: ea000006 b 30c4 } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 30a8: e5940018 ldr r0, [r4, #24] 30ac: e1a02001 mov r2, r1 30b0: eb00078f bl 4ef4 if (sc != RTEMS_SUCCESSFUL) { 30b4: e3500000 cmp r0, #0 30b8: 1a00000e bne 30f8 rtems_fatal_error_occurred (sc); } drainOutput (tty); 30bc: e1a00004 mov r0, r4 30c0: ebfffeb2 bl 2b90 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 30c4: e59430b4 ldr r3, [r4, #180] ; 0xb4 30c8: e3530002 cmp r3, #2 30cc: 1a00000a bne 30fc /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); 30d0: e59400c4 ldr r0, [r4, #196] ; 0xc4 30d4: e3a01001 mov r1, #1 30d8: eb000673 bl 4aac if (sc != RTEMS_SUCCESSFUL) 30dc: e3500000 cmp r0, #0 30e0: 1a000004 bne 30f8 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); 30e4: e59400c8 ldr r0, [r4, #200] ; 0xc8 30e8: e3a01001 mov r1, #1 30ec: eb00066e bl 4aac if (sc != RTEMS_SUCCESSFUL) 30f0: e3500000 cmp r0, #0 30f4: 0a000000 beq 30fc rtems_fatal_error_occurred (sc); 30f8: eb000913 bl 554c <== NOT EXECUTED } if (tty->device.lastClose) 30fc: e594309c ldr r3, [r4, #156] ; 0x9c 3100: e3530000 cmp r3, #0 (*tty->device.lastClose)(tty->major, tty->minor, arg); 3104: 1284000c addne r0, r4, #12 3108: 18900003 ldmne r0, {r0, r1} 310c: 11a02005 movne r2, r5 3110: 11a0e00f movne lr, pc 3114: 112fff13 bxne r3 if (tty->forw == NULL) { 3118: e894000c ldm r4, {r2, r3} 311c: 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; 3120: 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) { 3124: 1a000003 bne 3138 rtems_termios_ttyTail = tty->back; 3128: e59f10a0 ldr r1, [pc, #160] ; 31d0 if ( rtems_termios_ttyTail != NULL ) { 312c: 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; 3130: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; 3134: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3138: e5942004 ldr r2, [r4, #4] 313c: e5943000 ldr r3, [r4] 3140: 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; 3144: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { 3148: 1a000003 bne 315c rtems_termios_ttyHead = tty->forw; 314c: e59f1080 ldr r1, [pc, #128] ; 31d4 if ( rtems_termios_ttyHead != NULL ) { 3150: e3530000 cmp r3, #0 } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; 3154: e5813000 str r3, [r1] if ( rtems_termios_ttyHead != NULL ) { rtems_termios_ttyHead->back = NULL; 3158: 15832004 strne r2, [r3, #4] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); 315c: e5940014 ldr r0, [r4, #20] 3160: eb00073c bl 4e58 rtems_semaphore_delete (tty->osem); 3164: e5940018 ldr r0, [r4, #24] 3168: eb00073a bl 4e58 rtems_semaphore_delete (tty->rawOutBuf.Semaphore); 316c: e594008c ldr r0, [r4, #140] ; 0x8c 3170: eb000738 bl 4e58 if ((tty->device.pollRead == NULL) || 3174: e59430a0 ldr r3, [r4, #160] ; 0xa0 3178: e3530000 cmp r3, #0 317c: 0a000002 beq 318c 3180: e59430b4 ldr r3, [r4, #180] ; 0xb4 3184: e3530002 cmp r3, #2 3188: 1a000001 bne 3194 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); 318c: e5940068 ldr r0, [r4, #104] ; 0x68 3190: eb000730 bl 4e58 free (tty->rawInBuf.theBuf); 3194: e5940058 ldr r0, [r4, #88] ; 0x58 3198: ebfffae5 bl 1d34 free (tty->rawOutBuf.theBuf); 319c: e594007c ldr r0, [r4, #124] ; 0x7c 31a0: ebfffae3 bl 1d34 free (tty->cbuf); 31a4: e594001c ldr r0, [r4, #28] 31a8: ebfffae1 bl 1d34 free (tty); 31ac: e1a00004 mov r0, r4 31b0: ebfffadf bl 1d34 } rtems_semaphore_release (rtems_termios_ttyMutex); 31b4: e59f300c ldr r3, [pc, #12] ; 31c8 31b8: e5930000 ldr r0, [r3] 31bc: eb000792 bl 500c return RTEMS_SUCCESSFUL; } 31c0: e3a00000 mov r0, #0 31c4: e8bd8030 pop {r4, r5, pc} =============================================================================== 00004554 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4554: e5902090 ldr r2, [r0, #144] ; 0x90 4558: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 455c: e59010b4 ldr r1, [r0, #180] ; 0xb4 4560: e3510002 cmp r1, #2 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { 4564: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; 4568: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 456c: 1a000004 bne 4584 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); 4570: e59000c8 ldr r0, [r0, #200] ; 0xc8 4574: eb00014c bl 4aac if (sc != RTEMS_SUCCESSFUL) 4578: e2503000 subs r3, r0, #0 457c: 0a00000d beq 45b8 rtems_fatal_error_occurred (sc); 4580: eb0003f1 bl 554c <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { 4584: e59030cc ldr r3, [r0, #204] ; 0xcc 4588: e3530005 cmp r3, #5 458c: 1a000007 bne 45b0 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { 4590: e59f3028 ldr r3, [pc, #40] ; 45c0 4594: e59330b4 ldr r3, [r3, #180] ; 0xb4 4598: e3530000 cmp r3, #0 459c: 0a000005 beq 45b8 rtems_termios_linesw[tty->t_line].l_start(tty); 45a0: e1a0e00f mov lr, pc 45a4: e12fff13 bx r3 } return 0; /* nothing to output in IRQ... */ 45a8: e3a03000 mov r3, #0 45ac: ea000001 b 45b8 } return rtems_termios_refill_transmitter(tty); } 45b0: 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); 45b4: eaffff5a b 4324 } 45b8: e1a00003 mov r0, r3 45bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== 00004020 : * 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) { 4020: 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) { 4024: e59030cc ldr r3, [r0, #204] ; 0xcc 4028: e59f7288 ldr r7, [pc, #648] ; 42b8 402c: e0873283 add r3, r7, r3, lsl #5 4030: e5939010 ldr r9, [r3, #16] 4034: e3590000 cmp r9, #0 * device receive interrupt handler. * Returns the number of characters dropped because of overflow. */ int rtems_termios_enqueue_raw_characters (void *ttyp, char *buf, int len) { 4038: e1a04000 mov r4, r0 403c: 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) { 4040: 11a05002 movne r5, r2 4044: 1a00000d bne 4080 /* * 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); 4048: e2803030 add r3, r0, #48 ; 0x30 404c: 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, 4050: 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) { 4054: e1a08002 mov r8, r2 4058: 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, 405c: e58d3004 str r3, [sp, #4] 4060: ea00008b b 4294 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); 4064: e59430cc ldr r3, [r4, #204] ; 0xcc 4068: e4d60001 ldrb r0, [r6], #1 406c: e0873283 add r3, r7, r3, lsl #5 4070: e1a01004 mov r1, r4 4074: e1a0e00f mov lr, pc 4078: e593f010 ldr pc, [r3, #16] 407c: 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--) { 4080: e3550000 cmp r5, #0 4084: 1afffff6 bne 4064 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { 4088: e59430e4 ldr r3, [r4, #228] ; 0xe4 408c: e3530000 cmp r3, #0 4090: 1a000086 bne 42b0 4094: e59430dc ldr r3, [r4, #220] ; 0xdc 4098: e3530000 cmp r3, #0 409c: 0a000083 beq 42b0 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 40a0: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 40a4: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 40a8: e1a0e00f mov lr, pc <== NOT EXECUTED 40ac: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 40b0: e3a03001 mov r3, #1 <== NOT EXECUTED 40b4: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 40b8: ea00007c b 42b0 <== 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) { 40bc: e59430b8 ldr r3, [r4, #184] ; 0xb8 40c0: e3130c02 tst r3, #512 ; 0x200 } return 0; } while (len--) { c = *buf++; 40c4: 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) { 40c8: 0a00000f beq 410c /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { 40cc: e5d4204a ldrb r2, [r4, #74] ; 0x4a 40d0: e152000a cmp r2, sl 40d4: e5d43049 ldrb r3, [r4, #73] ; 0x49 40d8: 1a000007 bne 40fc if (c == tty->termios.c_cc[VSTART]) { 40dc: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; 40e0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 40e4: 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; 40e8: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; 40ec: 13833010 orrne r3, r3, #16 <== NOT EXECUTED 40f0: 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) { 40f4: e3a09001 mov r9, #1 <== NOT EXECUTED 40f8: ea000005 b 4114 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 40fc: e153000a cmp r3, sl /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; 4100: 059430b8 ldreq r3, [r4, #184] ; 0xb8 4104: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { 4108: 0afffff8 beq 40f0 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { 410c: e3590000 cmp r9, #0 4110: 0a000014 beq 4168 /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { 4114: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4118: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED 411c: e3530020 cmp r3, #32 <== NOT EXECUTED 4120: 1a00005a bne 4290 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 4124: ebfffa95 bl 2b80 <== NOT EXECUTED 4128: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 412c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4130: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 4134: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 4138: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 413c: e3530000 cmp r3, #0 <== NOT EXECUTED 4140: 0a000006 beq 4160 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); 4144: 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)( 4148: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 414c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 4150: e0811003 add r1, r1, r3 <== NOT EXECUTED 4154: e3a02001 mov r2, #1 <== NOT EXECUTED 4158: e1a0e00f mov lr, pc <== NOT EXECUTED 415c: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 4160: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED 4164: ea000049 b 4290 <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; 4168: e5940060 ldr r0, [r4, #96] ; 0x60 416c: e5941064 ldr r1, [r4, #100] ; 0x64 4170: e2800001 add r0, r0, #1 4174: eb002d09 bl f5a0 <__umodsi3> 4178: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); 417c: ebfffa7f bl 2b80 4180: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) 4184: e594305c ldr r3, [r4, #92] ; 0x5c 4188: e5940064 ldr r0, [r4, #100] ; 0x64 418c: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && 4190: e5941064 ldr r1, [r4, #100] ; 0x64 4194: e0800007 add r0, r0, r7 4198: eb002d00 bl f5a0 <__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) 419c: e59430c0 ldr r3, [r4, #192] ; 0xc0 41a0: e1500003 cmp r0, r3 41a4: 9a000025 bls 4240 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { 41a8: 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) && 41ac: e3130001 tst r3, #1 <== NOT EXECUTED 41b0: 1a000022 bne 4240 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; 41b4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 41b8: e3833001 orr r3, r3, #1 <== NOT EXECUTED 41bc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) 41c0: e59f30f4 ldr r3, [pc, #244] ; 42bc <== NOT EXECUTED 41c4: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED 41c8: e0023003 and r3, r2, r3 <== NOT EXECUTED 41cc: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED 41d0: 1a00000e bne 4210 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || 41d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 41d8: e3130020 tst r3, #32 <== NOT EXECUTED 41dc: 1a000002 bne 41ec <== NOT EXECUTED 41e0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 41e4: e3530000 cmp r3, #0 <== NOT EXECUTED 41e8: 1a000014 bne 4240 <== 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; 41ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 41f0: e3833002 orr r3, r3, #2 <== NOT EXECUTED 41f4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, 41f8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 41fc: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED 4200: e3a02001 mov r2, #1 <== NOT EXECUTED 4204: e1a0e00f mov lr, pc <== NOT EXECUTED 4208: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 420c: ea00000b b 4240 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { 4210: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4214: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED 4218: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED 421c: 1a000007 bne 4240 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; 4220: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4224: e3833004 orr r3, r3, #4 <== NOT EXECUTED 4228: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { 422c: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED 4230: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); 4234: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 4238: 11a0e00f movne lr, pc <== NOT EXECUTED 423c: 112fff13 bxne r3 <== NOT EXECUTED 4240: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 4244: e594305c ldr r3, [r4, #92] ; 0x5c 4248: e1570003 cmp r7, r3 dropped++; 424c: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { 4250: 0a00000e beq 4290 dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; 4254: e5943058 ldr r3, [r4, #88] ; 0x58 4258: 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 )) { 425c: e59430e4 ldr r3, [r4, #228] ; 0xe4 4260: e3530000 cmp r3, #0 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; 4264: 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 )) { 4268: 1a000008 bne 4290 426c: e59430dc ldr r3, [r4, #220] ; 0xdc 4270: e3530000 cmp r3, #0 4274: 0a000005 beq 4290 (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); 4278: e59d0000 ldr r0, [sp] <== NOT EXECUTED 427c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED 4280: e1a0e00f mov lr, pc <== NOT EXECUTED 4284: e12fff13 bx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; 4288: e3a03001 mov r3, #1 <== NOT EXECUTED 428c: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED 4290: e2488001 sub r8, r8, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { 4294: e3580000 cmp r8, #0 4298: 1affff87 bne 40bc } } } } tty->rawInBufDropped += dropped; 429c: e5943078 ldr r3, [r4, #120] ; 0x78 42a0: e0833005 add r3, r3, r5 42a4: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); 42a8: e5940068 ldr r0, [r4, #104] ; 0x68 42ac: eb000356 bl 500c return dropped; } 42b0: e1a00005 mov r0, r5 42b4: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 000031f0 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 31f0: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { 31f4: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 31f8: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; 31fc: 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; 3200: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; 3204: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { 3208: 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); 320c: e1a02001 mov r2, r1 3210: e5940018 ldr r0, [r4, #24] 3214: eb000736 bl 4ef4 if (sc != RTEMS_SUCCESSFUL) { 3218: e2506000 subs r6, r0, #0 321c: 1a0000d4 bne 3574 args->ioctl_return = sc; return sc; } switch (args->command) { 3220: e5953004 ldr r3, [r5, #4] 3224: e3530004 cmp r3, #4 3228: 0a0000a8 beq 34d0 322c: 8a000005 bhi 3248 3230: e3530002 cmp r3, #2 3234: 0a000029 beq 32e0 3238: 8a00009d bhi 34b4 323c: e3530001 cmp r3, #1 3240: 1a000010 bne 3288 3244: ea00001b b 32b8 3248: e59f2330 ldr r2, [pc, #816] ; 3580 324c: e1530002 cmp r3, r2 3250: 0a0000ba beq 3540 3254: 8a000002 bhi 3264 3258: e3530005 cmp r3, #5 325c: 1a000009 bne 3288 3260: ea000096 b 34c0 <== NOT EXECUTED 3264: e59f2318 ldr r2, [pc, #792] ; 3584 3268: 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; 326c: 05953008 ldreq r3, [r5, #8] 3270: 059420cc ldreq r2, [r4, #204] ; 0xcc 3274: 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) { 3278: 0a0000bb beq 356c 327c: e2822105 add r2, r2, #1073741825 ; 0x40000001 3280: e1530002 cmp r3, r2 3284: 0a000095 beq 34e0 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 3288: e59420cc ldr r2, [r4, #204] ; 0xcc 328c: e59f32f4 ldr r3, [pc, #756] ; 3588 3290: e0833282 add r3, r3, r2, lsl #5 3294: e5933018 ldr r3, [r3, #24] 3298: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; 329c: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { 32a0: 0a0000b1 beq 356c sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); 32a4: e1a00004 mov r0, r4 32a8: e1a01005 mov r1, r5 32ac: e1a0e00f mov lr, pc 32b0: e12fff13 bx r3 32b4: ea00009f b 3538 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; 32b8: e5957008 ldr r7, [r5, #8] 32bc: e284c030 add ip, r4, #48 ; 0x30 32c0: e8bc000f ldm ip!, {r0, r1, r2, r3} 32c4: e1a0e007 mov lr, r7 32c8: e8ae000f stmia lr!, {r0, r1, r2, r3} 32cc: e8bc000f ldm ip!, {r0, r1, r2, r3} 32d0: e8ae000f stmia lr!, {r0, r1, r2, r3} 32d4: e59c3000 ldr r3, [ip] 32d8: e58e3000 str r3, [lr] break; 32dc: ea0000a2 b 356c case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; 32e0: e595e008 ldr lr, [r5, #8] 32e4: e8be000f ldm lr!, {r0, r1, r2, r3} 32e8: e284c030 add ip, r4, #48 ; 0x30 32ec: e8ac000f stmia ip!, {r0, r1, r2, r3} 32f0: e8be000f ldm lr!, {r0, r1, r2, r3} 32f4: e8ac000f stmia ip!, {r0, r1, r2, r3} 32f8: e59e3000 ldr r3, [lr] 32fc: 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) && 3300: e59430b8 ldr r3, [r4, #184] ; 0xb8 3304: e3130c02 tst r3, #512 ; 0x200 3308: 0a000018 beq 3370 !(tty->termios.c_iflag & IXON)) { 330c: 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) && 3310: e3130b01 tst r3, #1024 ; 0x400 3314: 1a000015 bne 3370 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); 3318: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 331c: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED 3320: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { 3324: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3328: e3130020 tst r3, #32 <== NOT EXECUTED 332c: 0a00000f beq 3370 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); 3330: ebfffe12 bl 2b80 <== NOT EXECUTED 3334: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; 3338: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 333c: e3c33020 bic r3, r3, #32 <== NOT EXECUTED 3340: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { 3344: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3348: e3530000 cmp r3, #0 <== NOT EXECUTED 334c: 0a000006 beq 336c <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); 3350: 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)( 3354: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED 3358: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 335c: e0811003 add r1, r1, r3 <== NOT EXECUTED 3360: e3a02001 mov r2, #1 <== NOT EXECUTED 3364: e1a0e00f mov lr, pc <== NOT EXECUTED 3368: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 336c: 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)) { 3370: e59430b8 ldr r3, [r4, #184] ; 0xb8 3374: e3130b01 tst r3, #1024 ; 0x400 3378: 0a000008 beq 33a0 337c: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED 3380: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED 3384: 1a000005 bne 33a0 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); 3388: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 338c: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED 3390: 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); 3394: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3398: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 339c: 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)) { 33a0: e59430b8 ldr r3, [r4, #184] ; 0xb8 33a4: e3130c01 tst r3, #256 ; 0x100 33a8: 0a000010 beq 33f0 33ac: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED 33b0: e3530000 cmp r3, #0 <== NOT EXECUTED 33b4: ba00000d blt 33f0 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); 33b8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 33bc: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED 33c0: 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)) { 33c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 33c8: e3130004 tst r3, #4 <== NOT EXECUTED 33cc: 0a000004 beq 33e4 <== NOT EXECUTED 33d0: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 33d4: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 33d8: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 33dc: 11a0e00f movne lr, pc <== NOT EXECUTED 33e0: 112fff13 bxne r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); 33e4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 33e8: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 33ec: 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) { 33f0: e5943038 ldr r3, [r4, #56] ; 0x38 33f4: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; 33f8: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 33fc: b3833c01 orrlt r3, r3, #256 ; 0x100 3400: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { 3404: e5943030 ldr r3, [r4, #48] ; 0x30 3408: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; 340c: 159420b8 ldrne r2, [r4, #184] ; 0xb8 3410: 13822b01 orrne r2, r2, #1024 ; 0x400 3414: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { 3418: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; 341c: 159430b8 ldrne r3, [r4, #184] ; 0xb8 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { 3420: e594703c ldr r7, [r4, #60] ; 0x3c if (tty->termios.c_iflag & IXOFF) { tty->flow_ctrl |= FL_MDXOF; } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { tty->flow_ctrl |= FL_MDXON; 3424: 13833c02 orrne r3, r3, #512 ; 0x200 3428: 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) { 342c: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3430: 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) { 3434: 1a000013 bne 3488 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3438: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; 343c: eb000519 bl 48a8 3440: e3a0100a mov r1, #10 3444: e0000098 mul r0, r8, r0 3448: eb002fbc bl f340 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { 344c: e5d43046 ldrb r3, [r4, #70] ; 0x46 3450: e3530000 cmp r3, #0 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * 3454: e5840054 str r0, [r4, #84] ; 0x54 3458: e5d42047 ldrb r2, [r4, #71] ; 0x47 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { 345c: 0a000005 beq 3478 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3460: 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; 3464: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3468: 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; 346c: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3470: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED 3474: ea000006 b 3494 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { 3478: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; 347c: 03a03001 moveq r3, #1 3480: 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]) { 3484: 0a000002 beq 3494 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; 3488: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; 348c: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; 3490: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) 3494: e59430a8 ldr r3, [r4, #168] ; 0xa8 3498: e3530000 cmp r3, #0 349c: 0a000032 beq 356c (*tty->device.setAttributes)(tty->minor, &tty->termios); 34a0: e5940010 ldr r0, [r4, #16] 34a4: e2841030 add r1, r4, #48 ; 0x30 34a8: e1a0e00f mov lr, pc 34ac: e12fff13 bx r3 34b0: ea00002d b 356c break; case RTEMS_IO_TCDRAIN: drainOutput (tty); 34b4: e1a00004 mov r0, r4 34b8: ebfffdb4 bl 2b90 break; 34bc: ea00002a b 356c case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; 34c0: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 34c4: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED 34c8: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; 34cc: ea000026 b 356c <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; 34d0: e897000c ldm r7, {r2, r3} <== NOT EXECUTED 34d4: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED 34d8: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; 34dc: ea000022 b 356c <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { 34e0: e59420cc ldr r2, [r4, #204] ; 0xcc 34e4: e59f309c ldr r3, [pc, #156] ; 3588 34e8: e0833282 add r3, r3, r2, lsl #5 34ec: e5933004 ldr r3, [r3, #4] 34f0: e3530000 cmp r3, #0 34f4: 0a000003 beq 3508 sc = rtems_termios_linesw[tty->t_line].l_close(tty); 34f8: e1a00004 mov r0, r4 34fc: e1a0e00f mov lr, pc 3500: e12fff13 bx r3 3504: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); 3508: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ 350c: 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); 3510: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ 3514: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { 3518: e59f2068 ldr r2, [pc, #104] ; 3588 * 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); 351c: 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) { 3520: e7923283 ldr r3, [r2, r3, lsl #5] 3524: e3530000 cmp r3, #0 3528: 0a00000f beq 356c sc = rtems_termios_linesw[tty->t_line].l_open(tty); 352c: e1a00004 mov r0, r4 3530: e1a0e00f mov lr, pc 3534: e12fff13 bx r3 3538: e1a06000 mov r6, r0 353c: ea00000a b 356c case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; 3540: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED 3544: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) 3548: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; 354c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3550: e2840020 add r0, r4, #32 <== NOT EXECUTED 3554: e8900003 ldm r0, {r0, r1} <== NOT EXECUTED 3558: e0401001 sub r1, r0, r1 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; 355c: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; 3560: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED 3564: e0813003 add r3, r1, r3 <== NOT EXECUTED 3568: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); 356c: e5940018 ldr r0, [r4, #24] 3570: eb0006a5 bl 500c args->ioctl_return = sc; 3574: e585600c str r6, [r5, #12] return sc; } 3578: e1a00006 mov r0, r6 357c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 00002bec : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2bec: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} 2bf0: e58d300c str r3, [sp, #12] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2bf4: e59f3404 ldr r3, [pc, #1028] ; 3000 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2bf8: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2bfc: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { 2c00: e1a09000 mov r9, r0 2c04: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( 2c08: e5930000 ldr r0, [r3] 2c0c: e1a02001 mov r2, r1 2c10: eb0008b7 bl 4ef4 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) 2c14: e2506000 subs r6, r0, #0 2c18: 1a0000ee bne 2fd8 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { 2c1c: e59f33e0 ldr r3, [pc, #992] ; 3004 2c20: e5937000 ldr r7, [r3] 2c24: e1a05007 mov r5, r7 2c28: ea000006 b 2c48 if ((tty->major == major) && (tty->minor == minor)) 2c2c: e595300c ldr r3, [r5, #12] 2c30: e1530009 cmp r3, r9 2c34: 1a000002 bne 2c44 2c38: e5953010 ldr r3, [r5, #16] 2c3c: e153000a cmp r3, sl 2c40: 0a0000c3 beq 2f54 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) { 2c44: e5955000 ldr r5, [r5] 2c48: e3550000 cmp r5, #0 2c4c: 1afffff6 bne 2c2c 2c50: ea0000e3 b 2fe4 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; 2c54: e59f23ac ldr r2, [pc, #940] ; 3008 2c58: e5923000 ldr r3, [r2] 2c5c: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2c60: e5950064 ldr r0, [r5, #100] ; 0x64 2c64: e58d2008 str r2, [sp, #8] 2c68: ebfffd00 bl 2070 if (tty->rawInBuf.theBuf == NULL) { 2c6c: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); 2c70: e1a0b000 mov fp, r0 2c74: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { 2c78: e59d2008 ldr r2, [sp, #8] 2c7c: 1a000006 bne 2c9c free(tty); 2c80: e1a00005 mov r0, r5 <== NOT EXECUTED 2c84: ebfffc2a bl 1d34 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); 2c88: e59f3370 ldr r3, [pc, #880] ; 3000 <== NOT EXECUTED 2c8c: e5930000 ldr r0, [r3] <== NOT EXECUTED 2c90: eb0008dd bl 500c <== NOT EXECUTED return RTEMS_NO_MEMORY; 2c94: e3a0601a mov r6, #26 <== NOT EXECUTED 2c98: ea0000ce b 2fd8 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; 2c9c: e5923004 ldr r3, [r2, #4] 2ca0: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 2ca4: e5950088 ldr r0, [r5, #136] ; 0x88 2ca8: e58d2008 str r2, [sp, #8] 2cac: ebfffcef bl 2070 if (tty->rawOutBuf.theBuf == NULL) { 2cb0: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); 2cb4: e1a03000 mov r3, r0 2cb8: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { 2cbc: e59d2008 ldr r2, [sp, #8] 2cc0: 0a000008 beq 2ce8 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 2cc4: e5920008 ldr r0, [r2, #8] 2cc8: e58d3008 str r3, [sp, #8] 2ccc: ebfffce7 bl 2070 if (tty->cbuf == NULL) { 2cd0: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); 2cd4: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { 2cd8: e59d3008 ldr r3, [sp, #8] 2cdc: 1a000004 bne 2cf4 free((void *)(tty->rawOutBuf.theBuf)); 2ce0: e1a00003 mov r0, r3 <== NOT EXECUTED 2ce4: ebfffc12 bl 1d34 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); 2ce8: e1a0000b mov r0, fp <== NOT EXECUTED 2cec: ebfffc10 bl 1d34 <== NOT EXECUTED 2cf0: eaffffe2 b 2c80 <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 2cf4: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; 2cf8: e5853004 str r3, [r5, #4] if (rtems_termios_ttyHead != NULL) 2cfc: e1570003 cmp r7, r3 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; 2d00: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; 2d04: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; 2d08: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; 2d0c: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; 2d10: 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; 2d14: e59f32e8 ldr r3, [pc, #744] ; 3004 2d18: e5834000 str r4, [r3] if (rtems_termios_ttyTail == NULL) 2d1c: e59f32e8 ldr r3, [pc, #744] ; 300c 2d20: e5932000 ldr r2, [r3] * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; 2d24: 15875004 strne r5, [r7, #4] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; 2d28: e5857000 str r7, [r5] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), 2d2c: e59f72d4 ldr r7, [pc, #724] ; 3008 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) 2d30: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; 2d34: 05834000 streq r4, [r3] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2d38: e59f02d0 ldr r0, [pc, #720] ; 3010 rtems_build_name ('T', 'R', 'i', c), 2d3c: e5d7300c ldrb r3, [r7, #12] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2d40: 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; 2d44: e584a010 str sl, [r4, #16] tty->major = major; 2d48: e584900c str r9, [r4, #12] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( 2d4c: e1830000 orr r0, r3, r0 2d50: e58d2000 str r2, [sp] 2d54: e3a03000 mov r3, #0 2d58: e3a01001 mov r1, #1 2d5c: e3a02054 mov r2, #84 ; 0x54 2d60: eb0007d1 bl 4cac 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) 2d64: e2503000 subs r3, r0, #0 2d68: 1a000096 bne 2fc8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), 2d6c: 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 ( 2d70: e59f029c ldr r0, [pc, #668] ; 3014 2d74: e2841018 add r1, r4, #24 2d78: e58d1000 str r1, [sp] 2d7c: e1820000 orr r0, r2, r0 2d80: e3a01001 mov r1, #1 2d84: e3a02054 mov r2, #84 ; 0x54 2d88: eb0007c7 bl 4cac 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) 2d8c: e2501000 subs r1, r0, #0 2d90: 1a00008c bne 2fc8 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), 2d94: 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 ( 2d98: e59f0278 ldr r0, [pc, #632] ; 3018 2d9c: e284208c add r2, r4, #140 ; 0x8c 2da0: e58d2000 str r2, [sp] 2da4: e1830000 orr r0, r3, r0 2da8: e3a02020 mov r2, #32 2dac: e1a03001 mov r3, r1 2db0: eb0007bd bl 4cac rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 2db4: e250b000 subs fp, r0, #0 2db8: 1a000082 bne 2fc8 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; 2dbc: e59de00c ldr lr, [sp, #12] 2dc0: e8be000f ldm lr!, {r0, r1, r2, r3} 2dc4: e284c098 add ip, r4, #152 ; 0x98 2dc8: e8ac000f stmia ip!, {r0, r1, r2, r3} 2dcc: e89e000f ldm lr, {r0, r1, r2, r3} 2dd0: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2dd4: e59430b4 ldr r3, [r4, #180] ; 0xb4 2dd8: e3530002 cmp r3, #2 RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); tty->rawOutBufState = rob_idle; 2ddc: e584b094 str fp, [r4, #148] ; 0x94 tty->device = *callbacks; /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2de0: 1a000017 bne 2e44 sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), 2de4: e5d7300c ldrb r3, [r7, #12] /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( 2de8: e59f022c ldr r0, [pc, #556] ; 301c 2dec: e28420c8 add r2, r4, #200 ; 0xc8 2df0: e58d2004 str r2, [sp, #4] 2df4: e1830000 orr r0, r3, r0 2df8: e3a02b01 mov r2, #1024 ; 0x400 2dfc: e3a0100a mov r1, #10 2e00: e3a03c05 mov r3, #1280 ; 0x500 2e04: e58db000 str fp, [sp] 2e08: eb0008a6 bl 50a8 TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) 2e0c: e2502000 subs r2, r0, #0 2e10: 1a00006c bne 2fc8 rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), 2e14: 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 ( 2e18: e59f0200 ldr r0, [pc, #512] ; 3020 2e1c: e58d2000 str r2, [sp] 2e20: e28420c4 add r2, r4, #196 ; 0xc4 2e24: e58d2004 str r2, [sp, #4] 2e28: e1830000 orr r0, r3, r0 2e2c: e3a01009 mov r1, #9 2e30: e3a02b01 mov r2, #1024 ; 0x400 2e34: e3a03c05 mov r3, #1280 ; 0x500 2e38: eb00089a bl 50a8 TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) 2e3c: e3500000 cmp r0, #0 2e40: 1a000060 bne 2fc8 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || 2e44: e59430a0 ldr r3, [r4, #160] ; 0xa0 2e48: e3530000 cmp r3, #0 2e4c: 0a000002 beq 2e5c 2e50: e59430b4 ldr r3, [r4, #180] ; 0xb4 2e54: e3530002 cmp r3, #2 2e58: 1a00000b bne 2e8c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), 2e5c: e59f31a4 ldr r3, [pc, #420] ; 3008 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( 2e60: e59f01bc ldr r0, [pc, #444] ; 3024 rtems_build_name ('T', 'R', 'r', c), 2e64: 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 ( 2e68: e2842068 add r2, r4, #104 ; 0x68 2e6c: e3a01000 mov r1, #0 2e70: e58d2000 str r2, [sp] 2e74: e1830000 orr r0, r3, r0 2e78: e3a02024 mov r2, #36 ; 0x24 2e7c: e1a03001 mov r3, r1 2e80: eb000789 bl 4cac rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) 2e84: e3500000 cmp r0, #0 2e88: 1a00004e bne 2fc8 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; 2e8c: e59f3194 ldr r3, [pc, #404] ; 3028 2e90: e5843030 str r3, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; 2e94: e59f3190 ldr r3, [pc, #400] ; 302c 2e98: e5843034 str r3, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; 2e9c: e59f318c ldr r3, [pc, #396] ; 3030 2ea0: e5843038 str r3, [r4, #56] ; 0x38 tty->termios.c_lflag = 2ea4: e59f3188 ldr r3, [pc, #392] ; 3034 2ea8: e584303c str r3, [r4, #60] ; 0x3c ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; 2eac: e3a03003 mov r3, #3 2eb0: e5c43041 strb r3, [r4, #65] ; 0x41 tty->termios.c_cc[VQUIT] = '\034'; 2eb4: e2833019 add r3, r3, #25 2eb8: e5c43042 strb r3, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; 2ebc: e2833063 add r3, r3, #99 ; 0x63 2ec0: e5c43043 strb r3, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; 2ec4: e3a03015 mov r3, #21 2ec8: e5c43044 strb r3, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; 2ecc: e3a03004 mov r3, #4 2ed0: e5c43045 strb r3, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; 2ed4: 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; 2ed8: 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'; 2edc: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; 2ee0: e5c43051 strb r3, [r4, #81] ; 0x51 tty->termios.c_cc[VSTART] = '\021'; 2ee4: e3a02011 mov r2, #17 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 2ee8: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VERASE] = '\177'; tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; 2eec: e5c42049 strb r2, [r4, #73] ; 0x49 tty->termios.c_cc[VSTOP] = '\023'; 2ef0: e2822002 add r2, r2, #2 2ef4: e5c4204a strb r2, [r4, #74] ; 0x4a /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 2ef8: e1a030a3 lsr r3, r3, #1 tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; 2efc: e2822007 add r2, r2, #7 2f00: e5c4204b strb r2, [r4, #75] ; 0x4b /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; 2f04: e58430bc str r3, [r4, #188] ; 0xbc tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 2f08: e3a02012 mov r2, #18 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 2f0c: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; 2f10: e5c4204d strb r2, [r4, #77] ; 0x4d tty->termios.c_cc[VDISCARD] = '\017'; 2f14: e3a0200f mov r2, #15 2f18: 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; 2f1c: e0833083 add r3, r3, r3, lsl #1 tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; 2f20: e2822008 add r2, r2, #8 2f24: 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; 2f28: e1a03123 lsr r3, r3, #2 tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; tty->termios.c_cc[VWERASE] = '\027'; tty->termios.c_cc[VLNEXT] = '\026'; 2f2c: e3a02016 mov r2, #22 2f30: e5c42050 strb r2, [r4, #80] ; 0x50 tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; 2f34: e58430c0 str r3, [r4, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') 2f38: e59f30c8 ldr r3, [pc, #200] ; 3008 2f3c: e5d3200c ldrb r2, [r3, #12] 2f40: e352007a cmp r2, #122 ; 0x7a 2f44: e2821001 add r1, r2, #1 c = 'a'; 2f48: 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') 2f4c: e5c3100c strb r1, [r3, #12] c = 'a'; 2f50: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; 2f54: e5983000 ldr r3, [r8] 2f58: e5835034 str r5, [r3, #52] ; 0x34 if (!tty->refcount++) { 2f5c: e5953008 ldr r3, [r5, #8] 2f60: e2832001 add r2, r3, #1 2f64: e3530000 cmp r3, #0 2f68: e5852008 str r2, [r5, #8] 2f6c: 1a000016 bne 2fcc if (tty->device.firstOpen) 2f70: e5953098 ldr r3, [r5, #152] ; 0x98 2f74: e3530000 cmp r3, #0 (*tty->device.firstOpen)(major, minor, arg); 2f78: 11a00009 movne r0, r9 2f7c: 11a0100a movne r1, sl 2f80: 11a02008 movne r2, r8 2f84: 11a0e00f movne lr, pc 2f88: 112fff13 bxne r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { 2f8c: e59530b4 ldr r3, [r5, #180] ; 0xb4 2f90: e3530002 cmp r3, #2 2f94: 1a00000c bne 2fcc sc = rtems_task_start( 2f98: e59500c4 ldr r0, [r5, #196] ; 0xc4 2f9c: e59f1094 ldr r1, [pc, #148] ; 3038 2fa0: e1a02005 mov r2, r5 2fa4: eb0008e7 bl 5348 tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2fa8: e3500000 cmp r0, #0 2fac: 1a000005 bne 2fc8 rtems_fatal_error_occurred (sc); sc = rtems_task_start( 2fb0: e59500c8 ldr r0, [r5, #200] ; 0xc8 2fb4: e59f1080 ldr r1, [pc, #128] ; 303c 2fb8: e1a02005 mov r2, r5 2fbc: eb0008e1 bl 5348 tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) 2fc0: e3500000 cmp r0, #0 2fc4: 0a000000 beq 2fcc rtems_fatal_error_occurred (sc); 2fc8: eb00095f bl 554c } } rtems_semaphore_release (rtems_termios_ttyMutex); 2fcc: e59f302c ldr r3, [pc, #44] ; 3000 2fd0: e5930000 ldr r0, [r3] 2fd4: eb00080c bl 500c return RTEMS_SUCCESSFUL; } 2fd8: e1a00006 mov r0, r6 2fdc: e28dd010 add sp, sp, #16 2fe0: 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)); 2fe4: e3a00001 mov r0, #1 2fe8: e3a010e8 mov r1, #232 ; 0xe8 2fec: ebfffad5 bl 1b48 if (tty == NULL) { 2ff0: e2504000 subs r4, r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); 2ff4: e1a05000 mov r5, r0 if (tty == NULL) { 2ff8: 1affff15 bne 2c54 2ffc: eaffff21 b 2c88 <== NOT EXECUTED =============================================================================== 00003cd4 : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; 3cd4: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3cd8: 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; 3cdc: 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); 3ce0: 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; 3ce4: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; 3ce8: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { 3cec: 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); 3cf0: e1a02001 mov r2, r1 3cf4: e5940014 ldr r0, [r4, #20] 3cf8: eb00047d bl 4ef4 if (sc != RTEMS_SUCCESSFUL) 3cfc: e2507000 subs r7, r0, #0 3d00: 1a0000be bne 4000 return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { 3d04: e59420cc ldr r2, [r4, #204] ; 0xcc 3d08: e59f32f8 ldr r3, [pc, #760] ; 4008 3d0c: e0833282 add r3, r3, r2, lsl #5 3d10: e5933008 ldr r3, [r3, #8] 3d14: e3530000 cmp r3, #0 3d18: 0a000005 beq 3d34 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); 3d1c: e1a00004 mov r0, r4 3d20: e1a01005 mov r1, r5 3d24: e1a0e00f mov lr, pc 3d28: e12fff13 bx r3 3d2c: e1a07000 mov r7, r0 3d30: ea0000ae b 3ff0 tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { 3d34: e5942024 ldr r2, [r4, #36] ; 0x24 3d38: e5943020 ldr r3, [r4, #32] 3d3c: e1520003 cmp r2, r3 3d40: 1a0000a1 bne 3fcc tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; 3d44: e5943028 ldr r3, [r4, #40] ; 0x28 3d48: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && 3d4c: e59430a0 ldr r3, [r4, #160] ; 0xa0 3d50: e3530000 cmp r3, #0 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; 3d54: e5847020 str r7, [r4, #32] 3d58: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; if (tty->device.pollRead != NULL && 3d5c: 0a00003b beq 3e50 3d60: e59430b4 ldr r3, [r4, #180] ; 0xb4 3d64: e3530000 cmp r3, #0 3d68: 1a000038 bne 3e50 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { 3d6c: e594303c ldr r3, [r4, #60] ; 0x3c 3d70: e3130002 tst r3, #2 3d74: 0a00000d beq 3db0 for (;;) { n = (*tty->device.pollRead)(tty->minor); 3d78: e5940010 ldr r0, [r4, #16] 3d7c: e1a0e00f mov lr, pc 3d80: e594f0a0 ldr pc, [r4, #160] ; 0xa0 if (n < 0) { 3d84: e3500000 cmp r0, #0 3d88: aa000002 bge 3d98 rtems_task_wake_after (1); 3d8c: e3a00001 mov r0, #1 3d90: eb000584 bl 53a8 3d94: eafffff7 b 3d78 } else { if (siproc (n, tty)) 3d98: e20000ff and r0, r0, #255 ; 0xff 3d9c: e1a01004 mov r1, r4 3da0: ebffff86 bl 3bc0 3da4: e3500000 cmp r0, #0 3da8: 0afffff2 beq 3d78 3dac: ea000086 b 3fcc } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); 3db0: eb0002c4 bl 48c8 <== NOT EXECUTED 3db4: e1a06000 mov r6, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); 3db8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3dbc: e1a0e00f mov lr, pc <== NOT EXECUTED 3dc0: e594f0a0 ldr pc, [r4, #160] ; 0xa0 <== NOT EXECUTED if (n < 0) { 3dc4: e3500000 cmp r0, #0 <== NOT EXECUTED 3dc8: aa000013 bge 3e1c <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { 3dcc: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3dd0: e3530000 cmp r3, #0 <== NOT EXECUTED 3dd4: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3dd8: 0a000005 beq 3df4 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { 3ddc: e3530000 cmp r3, #0 <== NOT EXECUTED 3de0: 0a00000a beq 3e10 <== NOT EXECUTED 3de4: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED 3de8: e3530000 cmp r3, #0 <== NOT EXECUTED 3dec: 0a000007 beq 3e10 <== NOT EXECUTED 3df0: ea000001 b 3dfc <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) 3df4: e3530000 cmp r3, #0 <== NOT EXECUTED 3df8: 0a000073 beq 3fcc <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); 3dfc: eb0002b1 bl 48c8 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { 3e00: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED 3e04: e0660000 rsb r0, r6, r0 <== NOT EXECUTED 3e08: e1500003 cmp r0, r3 <== NOT EXECUTED 3e0c: 8a00006e bhi 3fcc <== NOT EXECUTED break; } } rtems_task_wake_after (1); 3e10: e3a00001 mov r0, #1 <== NOT EXECUTED 3e14: eb000563 bl 53a8 <== NOT EXECUTED 3e18: eaffffe6 b 3db8 <== NOT EXECUTED } else { siproc (n, tty); 3e1c: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED 3e20: e1a01004 mov r1, r4 <== NOT EXECUTED 3e24: ebffff65 bl 3bc0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3e28: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3e2c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED 3e30: e1520003 cmp r2, r3 <== NOT EXECUTED 3e34: aa000064 bge 3fcc <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) 3e38: e3530000 cmp r3, #0 <== NOT EXECUTED 3e3c: 0affffdd beq 3db8 <== NOT EXECUTED 3e40: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED 3e44: e3530000 cmp r3, #0 <== NOT EXECUTED 3e48: 0affffda beq 3db8 <== NOT EXECUTED 3e4c: eaffffd7 b 3db0 <== 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)( 3e50: 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; 3e54: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; 3e58: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { 3e5c: e59f91a8 ldr r9, [pc, #424] ; 400c 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)( 3e60: e58d2000 str r2, [sp] 3e64: ea000040 b 3f6c 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; 3e68: e594005c ldr r0, [r4, #92] ; 0x5c 3e6c: e5941064 ldr r1, [r4, #100] ; 0x64 3e70: e2800001 add r0, r0, #1 3e74: eb002dc9 bl f5a0 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; 3e78: e5943058 ldr r3, [r4, #88] ; 0x58 3e7c: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; 3e80: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) 3e84: e5943060 ldr r3, [r4, #96] ; 0x60 3e88: e5942064 ldr r2, [r4, #100] ; 0x64 3e8c: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) 3e90: e0600003 rsb r0, r0, r3 3e94: e5941064 ldr r1, [r4, #100] ; 0x64 3e98: eb002dc0 bl f5a0 <__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) 3e9c: e59430bc ldr r3, [r4, #188] ; 0xbc 3ea0: e1500003 cmp r0, r3 3ea4: 2a00001f bcs 3f28 % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; 3ea8: e59430b8 ldr r3, [r4, #184] ; 0xb8 3eac: e3c33001 bic r3, r3, #1 3eb0: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) 3eb4: e59f3154 ldr r3, [pc, #340] ; 4010 3eb8: e59420b8 ldr r2, [r4, #184] ; 0xb8 3ebc: e0023003 and r3, r2, r3 3ec0: e59f2148 ldr r2, [pc, #328] ; 4010 3ec4: e1530002 cmp r3, r2 3ec8: 1a00000b bne 3efc == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) 3ecc: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED 3ed0: e3530000 cmp r3, #0 <== NOT EXECUTED 3ed4: 0a000002 beq 3ee4 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { 3ed8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3edc: e3130020 tst r3, #32 <== NOT EXECUTED 3ee0: 0a000005 beq 3efc <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( 3ee4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED 3ee8: e59d1000 ldr r1, [sp] <== NOT EXECUTED 3eec: e3a02001 mov r2, #1 <== NOT EXECUTED 3ef0: e1a0e00f mov lr, pc <== NOT EXECUTED 3ef4: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED 3ef8: ea00000a b 3f28 <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { 3efc: e59430b8 ldr r3, [r4, #184] ; 0xb8 3f00: e3130c01 tst r3, #256 ; 0x100 3f04: 0a000007 beq 3f28 tty->flow_ctrl &= ~FL_IRTSOFF; 3f08: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 3f0c: e3c33004 bic r3, r3, #4 <== NOT EXECUTED 3f10: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { 3f14: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED 3f18: e3530000 cmp r3, #0 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); 3f1c: 15940010 ldrne r0, [r4, #16] <== NOT EXECUTED 3f20: 11a0e00f movne lr, pc <== NOT EXECUTED 3f24: 112fff13 bxne r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { 3f28: e594303c ldr r3, [r4, #60] ; 0x3c 3f2c: e3130002 tst r3, #2 3f30: 0a000005 beq 3f4c if (siproc (c, tty)) 3f34: e1a0000a mov r0, sl 3f38: e1a01004 mov r1, r4 3f3c: ebffff1f bl 3bc0 wait = 0; 3f40: e3500000 cmp r0, #0 3f44: 13a06000 movne r6, #0 3f48: ea000006 b 3f68 } else { siproc (c, tty); 3f4c: e1a0000a mov r0, sl <== NOT EXECUTED 3f50: e1a01004 mov r1, r4 <== NOT EXECUTED 3f54: ebffff19 bl 3bc0 <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) 3f58: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED 3f5c: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; 3f60: e1520003 cmp r2, r3 <== NOT EXECUTED 3f64: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; 3f68: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3f6c: e594205c ldr r2, [r4, #92] ; 0x5c 3f70: e5943060 ldr r3, [r4, #96] ; 0x60 3f74: e1520003 cmp r2, r3 3f78: 0a000004 beq 3f90 (tty->ccount < (CBUFSIZE-1))) { 3f7c: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3f80: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { 3f84: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && 3f88: e1520003 cmp r2, r3 3f8c: baffffb5 blt 3e68 } /* * Wait for characters */ if ( wait ) { 3f90: e3560000 cmp r6, #0 3f94: 0a00000c beq 3fcc sc = rtems_semaphore_obtain( 3f98: e2840068 add r0, r4, #104 ; 0x68 3f9c: e8900003 ldm r0, {r0, r1} 3fa0: e1a0200a mov r2, sl 3fa4: eb0003d2 bl 4ef4 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) 3fa8: e3500000 cmp r0, #0 3fac: 0affffee beq 3f6c 3fb0: ea000005 b 3fcc <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; 3fb4: e594201c ldr r2, [r4, #28] 3fb8: e7d22003 ldrb r2, [r2, r3] 3fbc: e2833001 add r3, r3, #1 3fc0: e4cb2001 strb r2, [fp], #1 3fc4: e5843024 str r3, [r4, #36] ; 0x24 count--; 3fc8: e2488001 sub r8, r8, #1 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { 3fcc: e3580000 cmp r8, #0 3fd0: 0a000003 beq 3fe4 3fd4: e2842020 add r2, r4, #32 3fd8: e892000c ldm r2, {r2, r3} 3fdc: e1530002 cmp r3, r2 3fe0: bafffff3 blt 3fb4 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; 3fe4: e5953010 ldr r3, [r5, #16] 3fe8: e0688003 rsb r8, r8, r3 3fec: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; 3ff0: e3a03000 mov r3, #0 3ff4: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); 3ff8: e5940014 ldr r0, [r4, #20] 3ffc: eb000402 bl 500c return sc; } 4000: e1a00007 mov r0, r7 4004: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 00004324 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) 4324: e59020b8 ldr r2, [r0, #184] ; 0xb8 4328: e59f31b8 ldr r3, [pc, #440] ; 44e8 432c: e0023003 and r3, r2, r3 4330: e59f21b4 ldr r2, [pc, #436] ; 44ec 4334: e1530002 cmp r3, r2 * in task-driven mode, this function is called in Tx task context * in interrupt-driven mode, this function is called in TxIRQ context */ int rtems_termios_refill_transmitter (struct rtems_termios_tty *tty) { 4338: e92d4070 push {r4, r5, r6, lr} 433c: 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)) 4340: 1a00000c bne 4378 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); 4344: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED 4348: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED 434c: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 4350: e1a0e00f mov lr, pc <== NOT EXECUTED 4354: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 4358: ebfffa08 bl 2b80 <== NOT EXECUTED tty->t_dqlen--; 435c: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 4360: e2433001 sub r3, r3, #1 <== NOT EXECUTED 4364: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; 4368: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 436c: e3833002 orr r3, r3, #2 <== NOT EXECUTED 4370: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); 4374: ea00000f b 43b8 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { 4378: e59030b8 ldr r3, [r0, #184] ; 0xb8 437c: e2033003 and r3, r3, #3 4380: e3530002 cmp r3, #2 4384: 1a00000e bne 43c4 * 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); 4388: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED 438c: e3a02001 mov r2, #1 <== NOT EXECUTED 4390: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED 4394: e1a0e00f mov lr, pc <== NOT EXECUTED 4398: e594f0a4 ldr pc, [r4, #164] ; 0xa4 <== NOT EXECUTED rtems_interrupt_disable(level); 439c: ebfff9f7 bl 2b80 <== NOT EXECUTED tty->t_dqlen--; 43a0: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED 43a4: e2433001 sub r3, r3, #1 <== NOT EXECUTED 43a8: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; 43ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 43b0: e3c33002 bic r3, r3, #2 <== NOT EXECUTED 43b4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 43b8: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; 43bc: e3a05001 mov r5, #1 <== NOT EXECUTED 43c0: ea000046 b 44e0 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { 43c4: e5902080 ldr r2, [r0, #128] ; 0x80 43c8: e5903084 ldr r3, [r0, #132] ; 0x84 43cc: e1520003 cmp r2, r3 43d0: 1a000005 bne 43ec /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { 43d4: e5903094 ldr r3, [r0, #148] ; 0x94 43d8: e3530002 cmp r3, #2 43dc: 1a00003e bne 44dc /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 43e0: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED 43e4: eb000308 bl 500c <== NOT EXECUTED 43e8: ea00003b b 44dc <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); 43ec: ebfff9e3 bl 2b80 len = tty->t_dqlen; tty->t_dqlen = 0; 43f0: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; 43f4: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; 43f8: e5843090 str r3, [r4, #144] ; 0x90 43fc: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 4400: e5943084 ldr r3, [r4, #132] ; 0x84 4404: e5941088 ldr r1, [r4, #136] ; 0x88 4408: e0820003 add r0, r2, r3 440c: eb002c63 bl f5a0 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { 4410: e5943094 ldr r3, [r4, #148] ; 0x94 4414: e3530002 cmp r3, #2 rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; 4418: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; 441c: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); 4420: 0594008c ldreq r0, [r4, #140] ; 0x8c 4424: 0b0002f8 bleq 500c } if (newTail == tty->rawOutBuf.Head) { 4428: e5943080 ldr r3, [r4, #128] ; 0x80 442c: e1560003 cmp r6, r3 4430: 1a00000a bne 4460 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4434: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 4438: e3a05000 mov r5, #0 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 443c: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; 4440: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; 4444: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { 4448: 0a000021 beq 44d4 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); 444c: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED 4450: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED 4454: e1a0e00f mov lr, pc <== NOT EXECUTED 4458: e12fff13 bx r3 <== NOT EXECUTED 445c: ea00001c b 44d4 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) 4460: e59430b8 ldr r3, [r4, #184] ; 0xb8 4464: e2033e21 and r3, r3, #528 ; 0x210 4468: e3530e21 cmp r3, #528 ; 0x210 446c: 1a000008 bne 4494 == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); 4470: ebfff9c2 bl 2b80 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; 4474: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED 4478: e3833020 orr r3, r3, #32 <== NOT EXECUTED 447c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ 4480: e3a03001 mov r3, #1 <== NOT EXECUTED 4484: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED 4488: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; 448c: e3a05000 mov r5, #0 <== NOT EXECUTED 4490: ea00000f b 44d4 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) 4494: e5943080 ldr r3, [r4, #128] ; 0x80 4498: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; 449c: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; 44a0: 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)) { 44a4: 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; 44a8: 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)) { 44ac: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( 44b0: e594107c ldr r1, [r4, #124] ; 0x7c nToSend = tty->rawOutBuf.Head - newTail; /* when flow control XON or XOF, don't send blocks of data */ /* to allow fast reaction on incoming flow ctrl and low latency*/ /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; 44b4: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ 44b8: e3a03001 mov r3, #1 44bc: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( 44c0: e5940010 ldr r0, [r4, #16] 44c4: e0811006 add r1, r1, r6 44c8: e1a02005 mov r2, r5 44cc: e1a0e00f mov lr, pc 44d0: e594f0a4 ldr pc, [r4, #164] ; 0xa4 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ 44d4: e5846084 str r6, [r4, #132] ; 0x84 44d8: ea000000 b 44e0 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; 44dc: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } 44e0: e1a00005 mov r0, r5 44e4: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000061d4 : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 61d4: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { 61d8: e92d41f0 push {r4, r5, r6, r7, r8, lr} 61dc: e1a05000 mov r5, r0 61e0: e1a08001 mov r8, r1 61e4: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { 61e8: 0a00000e beq 6228 if (rtems_panic_in_progress++) 61ec: e59f212c ldr r2, [pc, #300] ; 6320 61f0: e5923000 ldr r3, [r2] 61f4: e2831001 add r1, r3, #1 61f8: e3530000 cmp r3, #0 61fc: e5821000 str r1, [r2] 6200: 0a000003 beq 6214 rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; 6204: e59f3118 ldr r3, [pc, #280] ; 6324 <== NOT EXECUTED 6208: e5932000 ldr r2, [r3] <== NOT EXECUTED 620c: e2822001 add r2, r2, #1 <== NOT EXECUTED 6210: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) 6214: e59f3104 ldr r3, [pc, #260] ; 6320 6218: e5933000 ldr r3, [r3] 621c: e3530002 cmp r3, #2 return 0; 6220: 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) 6224: ca00003b bgt 6318 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ 6228: e59f30f8 ldr r3, [pc, #248] ; 6328 622c: e5933000 ldr r3, [r3] 6230: e5930008 ldr r0, [r3, #8] 6234: eb002bc7 bl 11158 status = error_flag & ~RTEMS_ERROR_MASK; 6238: e3c56207 bic r6, r5, #1879048192 ; 0x70000000 if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ 623c: e2155101 ands r5, r5, #1073741824 ; 0x40000000 6240: 0a000001 beq 624c local_errno = errno; 6244: eb002acc bl 10d7c <__errno> 6248: 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); 624c: e59f70d4 ldr r7, [pc, #212] ; 6328 6250: e5973000 ldr r3, [r7] 6254: e1a02004 mov r2, r4 6258: e593000c ldr r0, [r3, #12] 625c: e1a01008 mov r1, r8 6260: eb004433 bl 17334 if (status) 6264: 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); 6268: e1a04000 mov r4, r0 if (status) 626c: 0a000008 beq 6294 chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); 6270: e5973000 ldr r3, [r7] 6274: e1a00006 mov r0, r6 6278: e593700c ldr r7, [r3, #12] 627c: ebffffd0 bl 61c4 6280: e59f10a4 ldr r1, [pc, #164] ; 632c 6284: e1a02000 mov r2, r0 6288: e1a00007 mov r0, r7 628c: eb002c97 bl 114f0 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += 6290: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { 6294: e3550000 cmp r5, #0 6298: 0a000015 beq 62f4 if ((local_errno > 0) && *strerror(local_errno)) 629c: da00000d ble 62d8 62a0: e1a00005 mov r0, r5 62a4: eb002f9a bl 12114 62a8: e5d03000 ldrb r3, [r0] 62ac: e3530000 cmp r3, #0 62b0: 0a000008 beq 62d8 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); 62b4: e59f306c ldr r3, [pc, #108] ; 6328 62b8: e5933000 ldr r3, [r3] 62bc: e1a00005 mov r0, r5 62c0: e593600c ldr r6, [r3, #12] 62c4: eb002f92 bl 12114 62c8: e59f1060 ldr r1, [pc, #96] ; 6330 62cc: e1a02000 mov r2, r0 62d0: e1a00006 mov r0, r6 62d4: ea000004 b 62ec else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); 62d8: e59f3048 ldr r3, [pc, #72] ; 6328 62dc: e5933000 ldr r3, [r3] 62e0: e59f104c ldr r1, [pc, #76] ; 6334 62e4: e593000c ldr r0, [r3, #12] 62e8: e1a02005 mov r2, r5 62ec: eb002c7f bl 114f0 62f0: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); 62f4: e59f502c ldr r5, [pc, #44] ; 6328 62f8: e5953000 ldr r3, [r5] 62fc: e59f1034 ldr r1, [pc, #52] ; 6338 6300: e593000c ldr r0, [r3, #12] 6304: eb002c79 bl 114f0 (void) fflush(stderr); 6308: 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"); 630c: e0804004 add r4, r0, r4 (void) fflush(stderr); 6310: e593000c ldr r0, [r3, #12] 6314: eb002b8f bl 11158 return chars_written; } 6318: e1a00004 mov r0, r4 631c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== 0000245c : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 245c: 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; 2460: e3a04000 mov r4, #0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2464: e58d1000 str r1, [sp] unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2468: e59fb0d4 ldr fp, [pc, #212] ; 2544 limit++; continue; } sign = 1; } if (!isdigit(c)) 246c: e59f90d4 ldr r9, [pc, #212] ; 2548 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { 2470: e1a05000 mov r5, r0 int c; unsigned int i = 0; unsigned int limit = INT_MAX; 2474: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; 2478: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) 247c: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); 2480: e5953004 ldr r3, [r5, #4] 2484: e2433001 sub r3, r3, #1 2488: e3530000 cmp r3, #0 248c: e5853004 str r3, [r5, #4] 2490: a5953000 ldrge r3, [r5] 2494: a4d36001 ldrbge r6, [r3], #1 2498: a5853000 strge r3, [r5] 249c: aa000003 bge 24b0 24a0: e59b0000 ldr r0, [fp] <== NOT EXECUTED 24a4: e1a01005 mov r1, r5 <== NOT EXECUTED 24a8: eb0030f1 bl e874 <__srget_r> <== NOT EXECUTED 24ac: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') 24b0: e356003a cmp r6, #58 ; 0x3a 24b4: 0a000019 beq 2520 break; if (sign == 0) { 24b8: e3540000 cmp r4, #0 24bc: 1a000004 bne 24d4 if (c == '-') { 24c0: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; 24c4: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; 24c8: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { 24cc: 0affffeb beq 2480 sign = -1; limit++; continue; } sign = 1; 24d0: e3a04001 mov r4, #1 } if (!isdigit(c)) 24d4: e5993000 ldr r3, [r9] 24d8: e0833006 add r3, r3, r6 24dc: e5d30001 ldrb r0, [r3, #1] 24e0: e2100004 ands r0, r0, #4 24e4: 0a000015 beq 2540 return 0; d = c - '0'; if ((i > (limit / 10)) 24e8: e1a00008 mov r0, r8 24ec: e3a0100a mov r1, #10 24f0: eb0039e9 bl 10c9c <__aeabi_uidiv> 24f4: e1570000 cmp r7, r0 24f8: 8a00000f bhi 253c } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; 24fc: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) 2500: 1a000004 bne 2518 2504: e1a00008 mov r0, r8 <== NOT EXECUTED 2508: e3a0100a mov r1, #10 <== NOT EXECUTED 250c: eb003a7a bl 10efc <__umodsi3> <== NOT EXECUTED 2510: e1560000 cmp r6, r0 <== NOT EXECUTED 2514: 8a000008 bhi 253c <== NOT EXECUTED return 0; i = i * 10 + d; 2518: e027679a mla r7, sl, r7, r6 251c: eaffffd7 b 2480 } if (sign == 0) 2520: e3540000 cmp r4, #0 return 0; 2524: 01a00004 moveq r0, r4 *val = i * sign; 2528: 10040497 mulne r4, r7, r4 252c: 159d3000 ldrne r3, [sp] return 1; 2530: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; 2534: 15834000 strne r4, [r3] return 1; 2538: ea000000 b 2540 if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; 253c: e3a00000 mov r0, #0 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } 2540: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== 0000254c : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 254c: e92d41f0 push {r4, r5, r6, r7, r8, lr} 2550: e1a06003 mov r6, r3 int c; *name = *bufp; 2554: e5923000 ldr r3, [r2] /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2558: e59d7018 ldr r7, [sp, #24] int c; *name = *bufp; for (;;) { c = getc(fp); 255c: e59f80d4 ldr r8, [pc, #212] ; 2638 static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { int c; *name = *bufp; 2560: e5813000 str r3, [r1] /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { 2564: e1a04000 mov r4, r0 2568: e1a05002 mov r5, r2 int c; *name = *bufp; for (;;) { c = getc(fp); 256c: e5943004 ldr r3, [r4, #4] 2570: e2433001 sub r3, r3, #1 2574: e3530000 cmp r3, #0 2578: e5843004 str r3, [r4, #4] 257c: a5943000 ldrge r3, [r4] 2580: a4d30001 ldrbge r0, [r3], #1 2584: a5843000 strge r3, [r4] 2588: b5980000 ldrlt r0, [r8] 258c: b1a01004 movlt r1, r4 2590: bb0030b7 bllt e874 <__srget_r> if (c == ':') { 2594: e350003a cmp r0, #58 ; 0x3a 2598: 1a000002 bne 25a8 if (nlFlag) 259c: e3570000 cmp r7, #0 25a0: 0a000013 beq 25f4 25a4: ea00001f b 2628 return 0; break; } if (c == '\n') { 25a8: e350000a cmp r0, #10 25ac: 1a000002 bne 25bc if (!nlFlag) 25b0: e3570000 cmp r7, #0 25b4: 1a00000e bne 25f4 25b8: ea000018 b 2620 return 0; break; } if (c == EOF) 25bc: e3700001 cmn r0, #1 25c0: 0a000018 beq 2628 return 0; if (*nleft < 2) 25c4: e5963000 ldr r3, [r6] 25c8: e3530001 cmp r3, #1 25cc: 9a000017 bls 2630 return 0; **bufp = c; 25d0: e5953000 ldr r3, [r5] 25d4: e5c30000 strb r0, [r3] ++(*bufp); 25d8: e5953000 ldr r3, [r5] 25dc: e2833001 add r3, r3, #1 25e0: e5853000 str r3, [r5] --(*nleft); 25e4: e5963000 ldr r3, [r6] 25e8: e2433001 sub r3, r3, #1 25ec: e5863000 str r3, [r6] } 25f0: eaffffdd b 256c **bufp = '\0'; 25f4: e5953000 ldr r3, [r5] 25f8: e3a02000 mov r2, #0 25fc: e5c32000 strb r2, [r3] ++(*bufp); 2600: e5953000 ldr r3, [r5] 2604: e2833001 add r3, r3, #1 2608: e5853000 str r3, [r5] --(*nleft); 260c: e5963000 ldr r3, [r6] 2610: e2433001 sub r3, r3, #1 2614: e5863000 str r3, [r6] return 1; 2618: e3a00001 mov r0, #1 261c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} return 0; break; } if (c == '\n') { if (!nlFlag) return 0; 2620: e1a00007 mov r0, r7 2624: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} break; } if (c == EOF) return 0; 2628: e3a00000 mov r0, #0 262c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} if (*nleft < 2) return 0; 2630: e3a00000 mov r0, #0 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } 2634: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== 00003bc0 : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { 3bc0: e591203c ldr r2, [r1, #60] ; 0x3c 3bc4: e59f304c ldr r3, [pc, #76] ; 3c18 3bc8: e0023003 and r3, r2, r3 3bcc: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { 3bd0: e92d4030 push {r4, r5, lr} 3bd4: e1a04001 mov r4, r1 3bd8: 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)) { 3bdc: 0a00000b beq 3c10 rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); 3be0: e5910018 ldr r0, [r1, #24] 3be4: e3a01000 mov r1, #0 3be8: e1a02001 mov r2, r1 3bec: eb0004c0 bl 4ef4 i = iproc (c, tty); 3bf0: e1a01004 mov r1, r4 3bf4: e1a00005 mov r0, r5 3bf8: ebffff8b bl 3a2c 3bfc: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); 3c00: e5940018 ldr r0, [r4, #24] 3c04: eb000500 bl 500c } else { i = iproc (c, tty); } return i; } 3c08: e1a00005 mov r0, r5 3c0c: e8bd8030 pop {r4, r5, pc} 3c10: 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); 3c14: eaffff84 b 3a2c <== NOT EXECUTED =============================================================================== 00007568 : int truncate( const char *path, off_t length ) { 7568: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED 756c: e1a05001 mov r5, r1 <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); 7570: e3a01001 mov r1, #1 <== NOT EXECUTED int truncate( const char *path, off_t length ) { 7574: e1a06002 mov r6, r2 <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); 7578: ebfff77d bl 5374 <== NOT EXECUTED if ( fd == -1 ) 757c: e3700001 cmn r0, #1 <== NOT EXECUTED ) { int status; int fd; fd = open( path, O_WRONLY ); 7580: e1a04000 mov r4, r0 <== NOT EXECUTED if ( fd == -1 ) return -1; 7584: 01a05000 moveq r5, r0 <== NOT EXECUTED { int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) 7588: 0a000005 beq 75a4 <== NOT EXECUTED return -1; status = ftruncate( fd, length ); 758c: e1a01005 mov r1, r5 <== NOT EXECUTED 7590: e1a02006 mov r2, r6 <== NOT EXECUTED 7594: eb00146c bl c74c <== NOT EXECUTED 7598: e1a05000 mov r5, r0 <== NOT EXECUTED (void) close( fd ); 759c: e1a00004 mov r0, r4 <== NOT EXECUTED 75a0: ebfff30f bl 41e4 <== NOT EXECUTED return status; } 75a4: e1a00005 mov r0, r5 <== NOT EXECUTED 75a8: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== 00005600 : #include int unlink( const char *path ) { 5600: e92d40f0 push {r4, r5, r6, r7, lr} 5604: e24dd030 sub sp, sp, #48 ; 0x30 5608: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); 560c: ebfff56b bl 2bc0 if ( parentpathlen == 0 ) 5610: e2504000 subs r4, r0, #0 5614: e28d3018 add r3, sp, #24 5618: 1a000005 bne 5634 rtems_filesystem_get_start_loc( path, &i, &parentloc ); 561c: e1a00006 mov r0, r6 5620: e28d102c add r1, sp, #44 ; 0x2c 5624: e1a02003 mov r2, r3 5628: ebfff931 bl 3af4 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; 562c: e1a05004 mov r5, r4 5630: ea000008 b 5658 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, 5634: e3a02000 mov r2, #0 5638: e58d2000 str r2, [sp] 563c: e1a00006 mov r0, r6 5640: e1a01004 mov r1, r4 5644: e2822002 add r2, r2, #2 5648: ebfff53e bl 2b48 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) 564c: e3500000 cmp r0, #0 5650: 1a00003a bne 5740 return -1; free_parentloc = true; 5654: e3a05001 mov r5, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 5658: e28de018 add lr, sp, #24 565c: e8be000f ldm lr!, {r0, r1, r2, r3} 5660: e28dc004 add ip, sp, #4 5664: e8ac000f stmia ip!, {r0, r1, r2, r3} name = path + parentpathlen; 5668: e0864004 add r4, r6, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 566c: e59e3000 ldr r3, [lr] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5670: e1a00004 mov r0, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; 5674: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); 5678: eb002c71 bl 10844 567c: e1a01000 mov r1, r0 5680: e1a00004 mov r0, r4 5684: ebfff55b bl 2bf8 5688: e0846000 add r6, r4, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 568c: e1a00006 mov r0, r6 5690: eb002c6b bl 10844 5694: e28d4004 add r4, sp, #4 5698: e1a01000 mov r1, r0 569c: e3a02000 mov r2, #0 56a0: e1a00006 mov r0, r6 56a4: e1a03004 mov r3, r4 56a8: e58d2000 str r2, [sp] 56ac: ebfff4fd bl 2aa8 0, &loc, false ); if ( result != 0 ) { 56b0: e3500000 cmp r0, #0 56b4: 0a000004 beq 56cc if ( free_parentloc ) 56b8: e3550000 cmp r5, #0 <== NOT EXECUTED 56bc: 0a00001f beq 5740 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); 56c0: e28d0018 add r0, sp, #24 <== NOT EXECUTED 56c4: ebfff55a bl 2c34 <== NOT EXECUTED 56c8: ea00001c b 5740 <== NOT EXECUTED return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { 56cc: e1a00004 mov r0, r4 56d0: e59d3010 ldr r3, [sp, #16] 56d4: e1a0e00f mov lr, pc 56d8: e593f010 ldr pc, [r3, #16] 56dc: e3500001 cmp r0, #1 56e0: 1a000008 bne 5708 rtems_filesystem_freenode( &loc ); 56e4: e1a00004 mov r0, r4 56e8: ebfff551 bl 2c34 if ( free_parentloc ) 56ec: e3550000 cmp r5, #0 rtems_filesystem_freenode( &parentloc ); 56f0: 128d0018 addne r0, sp, #24 56f4: 1bfff54e blne 2c34 rtems_set_errno_and_return_minus_one( EISDIR ); 56f8: eb00288c bl f930 <__errno> 56fc: e3a03015 mov r3, #21 5700: e5803000 str r3, [r0] 5704: ea00000d b 5740 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); 5708: e28d6018 add r6, sp, #24 570c: e1a01004 mov r1, r4 5710: e59d3010 ldr r3, [sp, #16] 5714: e1a00006 mov r0, r6 5718: e1a0e00f mov lr, pc 571c: e593f00c ldr pc, [r3, #12] 5720: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); 5724: e1a00004 mov r0, r4 5728: ebfff541 bl 2c34 if ( free_parentloc ) 572c: e3550000 cmp r5, #0 5730: 0a000003 beq 5744 rtems_filesystem_freenode( &parentloc ); 5734: e1a00006 mov r0, r6 5738: ebfff53d bl 2c34 573c: ea000000 b 5744 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; 5740: e3e07000 mvn r7, #0 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } 5744: e1a00007 mov r0, r7 5748: e28dd030 add sp, sp, #48 ; 0x30 574c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== 0000589c : */ int unmount( const char *path ) { 589c: e92d4070 push {r4, r5, r6, lr} 58a0: e24dd018 sub sp, sp, #24 58a4: 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 ) ) 58a8: eb00222a bl e158 58ac: e28d4004 add r4, sp, #4 58b0: e3a03001 mov r3, #1 58b4: e1a01000 mov r1, r0 58b8: e58d3000 str r3, [sp] 58bc: e1a00005 mov r0, r5 58c0: e3a02000 mov r2, #0 58c4: e1a03004 mov r3, r4 58c8: ebfff46e bl 2a88 58cc: e3500000 cmp r0, #0 58d0: 1a000040 bne 59d8 return -1; mt_entry = loc.mt_entry; 58d4: 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 ){ 58d8: e59d3004 ldr r3, [sp, #4] 58dc: e595201c ldr r2, [r5, #28] 58e0: e1520003 cmp r2, r3 58e4: 0a000004 beq 58fc rtems_filesystem_freenode( &loc ); 58e8: e1a00004 mov r0, r4 58ec: ebfff4a0 bl 2b74 rtems_set_errno_and_return_minus_one( EACCES ); 58f0: eb001c9c bl cb68 <__errno> 58f4: e3a0300d mov r3, #13 58f8: ea000011 b 5944 /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); 58fc: e1a00004 mov r0, r4 5900: ebfff49b bl 2b74 * 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 ) 5904: e59f30d8 ldr r3, [pc, #216] ; 59e4 5908: e5933000 ldr r3, [r3] 590c: e5933014 ldr r3, [r3, #20] 5910: e1530005 cmp r3, r5 5914: 0a000008 beq 593c /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, 5918: e59f00c8 ldr r0, [pc, #200] ; 59e8 591c: e595102c ldr r1, [r5, #44] ; 0x2c 5920: ebfff6b5 bl 33fc 5924: e3500000 cmp r0, #0 5928: 1a000003 bne 593c * 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 ) 592c: e1a00005 mov r0, r5 5930: ebfff56a bl 2ee0 5934: e3500001 cmp r0, #1 5938: 1a000003 bne 594c rtems_set_errno_and_return_minus_one( EBUSY ); 593c: eb001c89 bl cb68 <__errno> 5940: e3a03010 mov r3, #16 5944: e5803000 str r3, [r0] 5948: ea000022 b 59d8 * 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 ) 594c: e5953014 ldr r3, [r5, #20] 5950: e1a00005 mov r0, r5 5954: e1a0e00f mov lr, pc 5958: e593f028 ldr pc, [r3, #40] ; 0x28 595c: e2506000 subs r6, r0, #0 5960: 1a00001c bne 59d8 * 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){ 5964: e5953028 ldr r3, [r5, #40] ; 0x28 5968: e1a00005 mov r0, r5 596c: e1a0e00f mov lr, pc 5970: e593f02c ldr pc, [r3, #44] ; 0x2c 5974: e2504000 subs r4, r0, #0 5978: 0a000007 beq 599c if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) 597c: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED 5980: e1a00005 mov r0, r5 <== NOT EXECUTED 5984: e1a0e00f mov lr, pc <== NOT EXECUTED 5988: e593f020 ldr pc, [r3, #32] <== NOT EXECUTED 598c: e3500000 cmp r0, #0 <== NOT EXECUTED 5990: 0a000010 beq 59d8 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); 5994: e1a00006 mov r0, r6 <== NOT EXECUTED 5998: eb0003c5 bl 68b4 <== 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 ); 599c: e59f6048 ldr r6, [pc, #72] ; 59ec 59a0: e1a01004 mov r1, r4 59a4: e1a02004 mov r2, r4 59a8: e5960000 ldr r0, [r6] 59ac: eb000242 bl 62bc */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); 59b0: e1a00005 mov r0, r5 59b4: eb000474 bl 6b8c <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); 59b8: e5960000 ldr r0, [r6] 59bc: eb000284 bl 63d4 /* * 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 ); 59c0: e2850008 add r0, r5, #8 59c4: ebfff46a bl 2b74 free( mt_entry ); 59c8: e1a00005 mov r0, r5 59cc: ebfff46d bl 2b88 return 0; 59d0: e1a00004 mov r0, r4 59d4: ea000000 b 59dc */ 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; 59d8: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } 59dc: e28dd018 add sp, sp, #24 59e0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== 000057a4 : int utime( const char *path, const struct utimbuf *times ) { 57a4: e92d4030 push {r4, r5, lr} 57a8: e24dd020 sub sp, sp, #32 57ac: e1a04001 mov r4, r1 57b0: 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 ) ) 57b4: eb002416 bl e814 57b8: e3a03001 mov r3, #1 57bc: e1a01000 mov r1, r0 57c0: e58d3000 str r3, [sp] 57c4: e1a00005 mov r0, r5 57c8: e3a02000 mov r2, #0 57cc: e28d3004 add r3, sp, #4 57d0: ebfff344 bl 24e8 57d4: e3500000 cmp r0, #0 return -1; 57d8: 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 ) ) 57dc: 1a00000e bne 581c return -1; if ( times == NULL ) { 57e0: e3540000 cmp r4, #0 57e4: 1a000003 bne 57f8 now.actime = now.modtime = time( NULL ); 57e8: eb00245c bl e960