=============================================================================== a00087c0 : { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; switch( node->type ) { a00087c0: e5902000 ldr r2, [r0] ) { IMFS_jnode_t *node = loc->node_access; IMFS_fs_info_t *fs_info; fs_info = loc->mt_entry->fs_info; a00087c4: e5903010 ldr r3, [r0, #16] switch( node->type ) { a00087c8: 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; a00087cc: e5933034 ldr r3, [r3, #52] ; 0x34 switch( node->type ) { a00087d0: e2422001 sub r2, r2, #1 a00087d4: e3520006 cmp r2, #6 a00087d8: 979ff102 ldrls pc, [pc, r2, lsl #2] a00087dc: ea000010 b a0008824 <== NOT EXECUTED a00087e0: a00087fc .word 0xa00087fc <== NOT EXECUTED a00087e4: a0008804 .word 0xa0008804 <== NOT EXECUTED a00087e8: a000880c .word 0xa000880c <== NOT EXECUTED a00087ec: a000880c .word 0xa000880c <== NOT EXECUTED a00087f0: a0008814 .word 0xa0008814 <== NOT EXECUTED a00087f4: a0008814 .word 0xa0008814 <== NOT EXECUTED a00087f8: a000881c .word 0xa000881c <== NOT EXECUTED case IMFS_DIRECTORY: loc->handlers = fs_info->directory_handlers; a00087fc: e593300c ldr r3, [r3, #12] a0008800: ea000006 b a0008820 break; case IMFS_DEVICE: loc->handlers = &IMFS_device_handlers; a0008804: e59f3020 ldr r3, [pc, #32] ; a000882c a0008808: ea000004 b a0008820 break; case IMFS_SYM_LINK: case IMFS_HARD_LINK: loc->handlers = &IMFS_link_handlers; a000880c: e59f301c ldr r3, [pc, #28] ; a0008830 a0008810: ea000002 b a0008820 break; case IMFS_LINEAR_FILE: loc->handlers = fs_info->memfile_handlers; break; case IMFS_MEMORY_FILE: loc->handlers = fs_info->memfile_handlers; a0008814: e5933008 ldr r3, [r3, #8] a0008818: ea000000 b a0008820 break; case IMFS_FIFO: loc->handlers = fs_info->fifo_handlers; a000881c: e5933010 ldr r3, [r3, #16] a0008820: e5803008 str r3, [r0, #8] break; } return 0; } a0008824: e3a00000 mov r0, #0 a0008828: e12fff1e bx lr =============================================================================== a0008648 : IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a0008648: 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 ) a000864c: e2508000 subs r8, r0, #0 IMFS_jnode_types_t type, const char *name, mode_t mode, const IMFS_types_union *info ) { a0008650: e1a04001 mov r4, r1 a0008654: e59d5018 ldr r5, [sp, #24] a0008658: e1a01002 mov r1, r2 IMFS_fs_info_t *fs_info; /* * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) a000865c: 0a000043 beq a0008770 return NULL; parent = parent_loc->node_access; fs_info = parent_loc->mt_entry->fs_info; a0008660: e5982010 ldr r2, [r8, #16] /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && a0008664: e3540007 cmp r4, #7 * MUST have a parent node to call this routine. */ if ( parent_loc == NULL ) return NULL; parent = parent_loc->node_access; a0008668: e5987000 ldr r7, [r8] fs_info = parent_loc->mt_entry->fs_info; a000866c: e5926034 ldr r6, [r2, #52] ; 0x34 /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && a0008670: 1a000004 bne a0008688 a0008674: e5960010 ldr r0, [r6, #16] a0008678: e59f20f8 ldr r2, [pc, #248] ; a0008778 a000867c: e1500002 cmp r0, r2 fs_info->fifo_handlers == &rtems_filesystem_handlers_default ) return NULL; a0008680: 03a08000 moveq r8, #0 fs_info = parent_loc->mt_entry->fs_info; /* * Reject creation of FIFOs if support is disabled. */ if ( type == IMFS_FIFO && a0008684: 0a000039 beq a0008770 return NULL; /* * Allocate filesystem node and fill in basic information */ node = IMFS_allocate_node( type, name, mode & ~rtems_filesystem_umask ); a0008688: e59f20ec ldr r2, [pc, #236] ; a000877c a000868c: e1a00004 mov r0, r4 a0008690: e5922000 ldr r2, [r2] a0008694: e592202c ldr r2, [r2, #44] ; 0x2c a0008698: e1c32002 bic r2, r3, r2 a000869c: ebffffcc bl a00085d4 if ( !node ) a00086a0: e2508000 subs r8, r0, #0 a00086a4: 0a000031 beq a0008770 return NULL; /* * Set the type specific information */ switch (type) { a00086a8: e2444001 sub r4, r4, #1 a00086ac: e3540006 cmp r4, #6 a00086b0: 979ff104 ldrls pc, [pc, r4, lsl #2] a00086b4: ea000025 b a0008750 <== NOT EXECUTED a00086b8: a00086d4 .word 0xa00086d4 <== NOT EXECUTED a00086bc: a00086f8 .word 0xa00086f8 <== NOT EXECUTED a00086c0: a00086f0 .word 0xa00086f0 <== NOT EXECUTED a00086c4: a00086f0 .word 0xa00086f0 <== NOT EXECUTED a00086c8: a0008724 .word 0xa0008724 <== NOT EXECUTED a00086cc: a000870c .word 0xa000870c <== NOT EXECUTED a00086d0: a0008748 .word 0xa0008748 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a00086d4: e2883054 add r3, r8, #84 ; 0x54 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a00086d8: e5883050 str r3, [r8, #80] ; 0x50 the_chain->permanent_null = NULL; a00086dc: e3a03000 mov r3, #0 a00086e0: e5883054 str r3, [r8, #84] ; 0x54 case IMFS_DIRECTORY: rtems_chain_initialize_empty(&node->info.directory.Entries); a00086e4: e2883050 add r3, r8, #80 ; 0x50 the_chain->last = _Chain_Head(the_chain); a00086e8: e5883058 str r3, [r8, #88] ; 0x58 a00086ec: ea000017 b a0008750 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; a00086f0: e5953000 ldr r3, [r5] a00086f4: ea000014 b a000874c break; case IMFS_DEVICE: node->info.device.major = info->device.major; a00086f8: e5953000 ldr r3, [r5] a00086fc: e5883050 str r3, [r8, #80] ; 0x50 node->info.device.minor = info->device.minor; a0008700: e5953004 ldr r3, [r5, #4] a0008704: e5883054 str r3, [r8, #84] ; 0x54 break; a0008708: ea000010 b a0008750 case IMFS_LINEAR_FILE: node->info.linearfile.size = 0; a000870c: e3a03000 mov r3, #0 a0008710: e3a04000 mov r4, #0 a0008714: e5883050 str r3, [r8, #80] ; 0x50 a0008718: e5884054 str r4, [r8, #84] ; 0x54 node->info.linearfile.direct = 0; a000871c: e3a03000 mov r3, #0 a0008720: e5883058 str r3, [r8, #88] ; 0x58 case IMFS_MEMORY_FILE: node->info.file.size = 0; a0008724: e3a03000 mov r3, #0 a0008728: e3a04000 mov r4, #0 a000872c: e5883050 str r3, [r8, #80] ; 0x50 a0008730: e5884054 str r4, [r8, #84] ; 0x54 node->info.file.indirect = 0; a0008734: e3a03000 mov r3, #0 a0008738: e5883058 str r3, [r8, #88] ; 0x58 node->info.file.doubly_indirect = 0; a000873c: e588305c str r3, [r8, #92] ; 0x5c node->info.file.triply_indirect = 0; a0008740: e5883060 str r3, [r8, #96] ; 0x60 break; a0008744: ea000001 b a0008750 case IMFS_FIFO: node->info.fifo.pipe = NULL; a0008748: e3a03000 mov r3, #0 a000874c: 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; a0008750: e5963004 ldr r3, [r6, #4] /* * This node MUST have a parent, so put it in that directory list. */ node->Parent = parent; a0008754: e5887008 str r7, [r8, #8] a0008758: e2870050 add r0, r7, #80 ; 0x50 node->st_ino = ++fs_info->ino_count; a000875c: e2833001 add r3, r3, #1 a0008760: e5863004 str r3, [r6, #4] a0008764: e1a01008 mov r1, r8 a0008768: e5883038 str r3, [r8, #56] ; 0x38 a000876c: ebfff413 bl a00057c0 <_Chain_Append> rtems_chain_append( &parent->info.directory.Entries, &node->Node ); return node; } a0008770: e1a00008 mov r0, r8 a0008774: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a00088b8 : const char *pathname, /* IN */ size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a00088b8: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a00088bc: e24dd040 sub sp, sp, #64 ; 0x40 a00088c0: e1a0a000 mov sl, r0 a00088c4: e1a06001 mov r6, r1 a00088c8: e58d2000 str r2, [sp] a00088cc: e1a04003 mov r4, r3 /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a00088d0: e5935000 ldr r5, [r3] rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; int len; IMFS_token_types type = IMFS_CURRENT_DIR; a00088d4: e3a09001 mov r9, #1 size_t pathnamelen, /* IN */ int flags, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { int i = 0; a00088d8: 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) ) { a00088dc: ea000064 b a0008a74 type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a00088e0: e08a0007 add r0, sl, r7 a00088e4: e1a01006 mov r1, r6 a00088e8: e28d2004 add r2, sp, #4 a00088ec: e28d303c add r3, sp, #60 ; 0x3c a00088f0: eb0001d8 bl a0009058 pathnamelen -= len; i += len; if ( !pathloc->node_access ) a00088f4: e594b000 ldr fp, [r4] * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { type = IMFS_get_token( &pathname[i], pathnamelen, token, &len ); a00088f8: e1a09000 mov r9, r0 pathnamelen -= len; a00088fc: e59d803c ldr r8, [sp, #60] ; 0x3c i += len; if ( !pathloc->node_access ) a0008900: e35b0000 cmp fp, #0 a0008904: 0a000052 beq a0008a54 rtems_set_errno_and_return_minus_one( ENOENT ); /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a0008908: e3500000 cmp r0, #0 a000890c: 0a000006 beq a000892c if ( node->type == IMFS_DIRECTORY ) a0008910: e595104c ldr r1, [r5, #76] ; 0x4c a0008914: e3510001 cmp r1, #1 a0008918: 1a000003 bne a000892c if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a000891c: e1a00004 mov r0, r4 a0008920: ebffffc3 bl a0008834 a0008924: e3500000 cmp r0, #0 a0008928: 0a000078 beq a0008b10 rtems_set_errno_and_return_minus_one( EACCES ); node = pathloc->node_access; switch( type ) { a000892c: 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; a0008930: e0686006 rsb r6, r8, r6 i += len; a0008934: 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; a0008938: e1a0500b mov r5, fp switch( type ) { a000893c: 0a000023 beq a00089d0 a0008940: e3590004 cmp r9, #4 a0008944: 0a000047 beq a0008a68 a0008948: e3590002 cmp r9, #2 a000894c: 1a000048 bne a0008a74 case IMFS_UP_DIR: /* * Am I at the root of all filesystems? (chroot'ed?) */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) a0008950: e59f21d4 ldr r2, [pc, #468] ; a0008b2c a0008954: e5923000 ldr r3, [r2] a0008958: e5933018 ldr r3, [r3, #24] a000895c: e15b0003 cmp fp, r3 a0008960: 0a000043 beq a0008a74 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access) { a0008964: e594e010 ldr lr, [r4, #16] /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == a0008968: e59e301c ldr r3, [lr, #28] a000896c: e15b0003 cmp fp, r3 a0008970: 1a000010 bne a00089b8 */ if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; /* Throw out the .. in this case */ } else { newloc = pathloc->mt_entry->mt_point_node; a0008974: e28dc028 add ip, sp, #40 ; 0x28 a0008978: e28ee008 add lr, lr, #8 a000897c: e8be000f ldm lr!, {r0, r1, r2, r3} a0008980: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008984: e59ee000 ldr lr, [lr] a0008988: e58ce000 str lr, [ip] *pathloc = newloc; a000898c: e28dc028 add ip, sp, #40 ; 0x28 a0008990: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008994: e1a0c004 mov ip, r4 a0008998: e8ac000f stmia ip!, {r0, r1, r2, r3} a000899c: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)(&(pathname[i-len]), a00089a0: e594300c ldr r3, [r4, #12] a00089a4: e0680007 rsb r0, r8, r7 a00089a8: e08a0000 add r0, sl, r0 a00089ac: e593c000 ldr ip, [r3] a00089b0: e0881006 add r1, r8, r6 a00089b4: ea000048 b a0008adc pathnamelen+len, flags,pathloc); } } else { if ( !node->Parent ) a00089b8: e59b5008 ldr r5, [fp, #8] a00089bc: e3550000 cmp r5, #0 a00089c0: 1a000026 bne a0008a60 rtems_set_errno_and_return_minus_one( ENOENT ); a00089c4: eb000cca bl a000bcf4 <__errno> a00089c8: e5809000 str r9, [r0] a00089cc: ea000052 b a0008b1c case IMFS_NAME: /* * If we are at a link follow it. */ if ( node->type == IMFS_HARD_LINK ) { a00089d0: e59b304c ldr r3, [fp, #76] ; 0x4c a00089d4: e3530003 cmp r3, #3 a00089d8: 1a000006 bne a00089f8 IMFS_evaluate_hard_link( pathloc, 0 ); a00089dc: e1a00004 mov r0, r4 a00089e0: e3a01000 mov r1, #0 a00089e4: ebffff9a bl a0008854 node = pathloc->node_access; a00089e8: e5945000 ldr r5, [r4] if ( !node ) a00089ec: e3550000 cmp r5, #0 a00089f0: 1a000009 bne a0008a1c a00089f4: ea00000b b a0008a28 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( ENOTDIR ); } else if ( node->type == IMFS_SYM_LINK ) { a00089f8: e3530004 cmp r3, #4 a00089fc: 1a000006 bne a0008a1c result = IMFS_evaluate_sym_link( pathloc, 0 ); a0008a00: e1a00004 mov r0, r4 a0008a04: e3a01000 mov r1, #0 a0008a08: eb000048 bl a0008b30 node = pathloc->node_access; if ( result == -1 ) a0008a0c: 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 ); a0008a10: e1a08000 mov r8, r0 node = pathloc->node_access; a0008a14: e5945000 ldr r5, [r4] if ( result == -1 ) a0008a18: 0a000040 beq a0008b20 /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a0008a1c: e595304c ldr r3, [r5, #76] ; 0x4c a0008a20: e3530001 cmp r3, #1 a0008a24: 0a000002 beq a0008a34 rtems_set_errno_and_return_minus_one( ENOTDIR ); a0008a28: eb000cb1 bl a000bcf4 <__errno> a0008a2c: e3a03014 mov r3, #20 a0008a30: ea000038 b a0008b18 /* * 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 ) { a0008a34: e595e05c ldr lr, [r5, #92] ; 0x5c a0008a38: e35e0000 cmp lr, #0 a0008a3c: 1a000015 bne a0008a98 /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a0008a40: e1a00005 mov r0, r5 a0008a44: e28d1004 add r1, sp, #4 a0008a48: eb00015e bl a0008fc8 if ( !node ) a0008a4c: e2505000 subs r5, r0, #0 a0008a50: 1a000002 bne a0008a60 rtems_set_errno_and_return_minus_one( ENOENT ); a0008a54: eb000ca6 bl a000bcf4 <__errno> a0008a58: e3a03002 mov r3, #2 a0008a5c: ea00002d b a0008b18 /* * Set the node access to the point we have found. */ pathloc->node_access = node; a0008a60: e5845000 str r5, [r4] a0008a64: ea000002 b a0008a74 case IMFS_NO_MORE_PATH: case IMFS_CURRENT_DIR: break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a0008a68: eb000ca1 bl a000bcf4 <__errno> a0008a6c: e3a0305b mov r3, #91 ; 0x5b a0008a70: ea000028 b a0008b18 /* * Evaluate all tokens until we are done or an error occurs. */ while( (type != IMFS_NO_MORE_PATH) && (type != IMFS_INVALID_TOKEN) ) { a0008a74: e3590004 cmp r9, #4 a0008a78: 13590000 cmpne r9, #0 a0008a7c: 1affff97 bne a00088e0 * 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 ) { a0008a80: e595304c ldr r3, [r5, #76] ; 0x4c a0008a84: e3530001 cmp r3, #1 a0008a88: 1a000018 bne a0008af0 if ( node->info.directory.mt_fs != NULL ) { a0008a8c: e595e05c ldr lr, [r5, #92] ; 0x5c a0008a90: e35e0000 cmp lr, #0 a0008a94: 0a000015 beq a0008af0 newloc = node->info.directory.mt_fs->mt_fs_root; a0008a98: e28dc028 add ip, sp, #40 ; 0x28 a0008a9c: e28ee01c add lr, lr, #28 a0008aa0: e8be000f ldm lr!, {r0, r1, r2, r3} a0008aa4: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008aa8: e59ee000 ldr lr, [lr] a0008aac: e58ce000 str lr, [ip] *pathloc = newloc; a0008ab0: e28dc028 add ip, sp, #40 ; 0x28 a0008ab4: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008ab8: e1a0c004 mov ip, r4 a0008abc: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008ac0: e58ce000 str lr, [ip] return (*pathloc->ops->evalpath_h)( &pathname[i-len], a0008ac4: e594300c ldr r3, [r4, #12] a0008ac8: e59d103c ldr r1, [sp, #60] ; 0x3c a0008acc: e593c000 ldr ip, [r3] a0008ad0: e0610007 rsb r0, r1, r7 a0008ad4: e08a0000 add r0, sl, r0 a0008ad8: e0861001 add r1, r6, r1 a0008adc: e59d2000 ldr r2, [sp] a0008ae0: e1a03004 mov r3, r4 a0008ae4: e12fff3c blx ip a0008ae8: e1a08000 mov r8, r0 a0008aec: ea00000b b a0008b20 flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a0008af0: e1a00004 mov r0, r4 a0008af4: ebffff31 bl a00087c0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a0008af8: e59d1000 ldr r1, [sp] flags, pathloc ); } else { result = IMFS_Set_handlers( pathloc ); } } else { result = IMFS_Set_handlers( pathloc ); a0008afc: e1a08000 mov r8, r0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( pathloc, flags ) ) a0008b00: e1a00004 mov r0, r4 a0008b04: ebffff4a bl a0008834 a0008b08: e3500000 cmp r0, #0 a0008b0c: 1a000003 bne a0008b20 rtems_set_errno_and_return_minus_one( EACCES ); a0008b10: eb000c77 bl a000bcf4 <__errno> a0008b14: e3a0300d mov r3, #13 a0008b18: e5803000 str r3, [r0] a0008b1c: e3e08000 mvn r8, #0 return result; } a0008b20: e1a00008 mov r0, r8 a0008b24: e28dd040 add sp, sp, #64 ; 0x40 a0008b28: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0008c94 : int IMFS_evaluate_for_make( const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { a0008c94: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a0008c98: e24dd040 sub sp, sp, #64 ; 0x40 a0008c9c: e1a07000 mov r7, r0 a0008ca0: e1a04001 mov r4, r1 a0008ca4: e58d2000 str r2, [sp] /* * This was filled in by the caller and is valid in the * mount table. */ node = pathloc->node_access; a0008ca8: e5916000 ldr r6, [r1] /* * Get the path length. */ pathlen = strlen( path ); a0008cac: eb001000 bl a000ccb4 const char *path, /* IN */ rtems_filesystem_location_info_t *pathloc, /* IN/OUT */ const char **name /* OUT */ ) { int i = 0; a0008cb0: e3a05000 mov r5, #0 node = pathloc->node_access; /* * Get the path length. */ pathlen = strlen( path ); a0008cb4: 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 ); a0008cb8: e1a01008 mov r1, r8 a0008cbc: e0870005 add r0, r7, r5 a0008cc0: e28d2004 add r2, sp, #4 a0008cc4: e28d303c add r3, sp, #60 ; 0x3c a0008cc8: eb0000e2 bl a0009058 pathlen -= len; i += len; if ( !pathloc->node_access ) a0008ccc: e5949000 ldr r9, [r4] */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a0008cd0: e59da03c ldr sl, [sp, #60] ; 0x3c * Evaluate all tokens until we are done or an error occurs. */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); a0008cd4: e1a0b000 mov fp, r0 pathlen -= len; i += len; if ( !pathloc->node_access ) a0008cd8: e3590000 cmp r9, #0 */ while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; a0008cdc: e06a8008 rsb r8, sl, r8 i += len; if ( !pathloc->node_access ) a0008ce0: 0a00006c beq a0008e98 /* * I cannot move out of this directory without execute permission. */ if ( type != IMFS_NO_MORE_PATH ) a0008ce4: e3500000 cmp r0, #0 a0008ce8: 0a000006 beq a0008d08 if ( node->type == IMFS_DIRECTORY ) a0008cec: e596104c ldr r1, [r6, #76] ; 0x4c a0008cf0: e3510001 cmp r1, #1 a0008cf4: 1a000003 bne a0008d08 if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_SEARCH ) ) a0008cf8: e1a00004 mov r0, r4 a0008cfc: ebfffecc bl a0008834 a0008d00: e3500000 cmp r0, #0 a0008d04: 0a000078 beq a0008eec while( !done ) { type = IMFS_get_token( &path[i], pathlen, token, &len ); pathlen -= len; i += len; a0008d08: 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; a0008d0c: e1a06009 mov r6, r9 switch( type ) { a0008d10: e35b0004 cmp fp, #4 a0008d14: 979ff10b ldrls pc, [pc, fp, lsl #2] a0008d18: eaffffe6 b a0008cb8 <== NOT EXECUTED a0008d1c: a0008e58 .word 0xa0008e58 <== NOT EXECUTED a0008d20: a0008cb8 .word 0xa0008cb8 <== NOT EXECUTED a0008d24: a0008d30 .word 0xa0008d30 <== NOT EXECUTED a0008d28: a0008d9c .word 0xa0008d9c <== NOT EXECUTED a0008d2c: a0008e64 .word 0xa0008e64 <== 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 ) a0008d30: e59f21d0 ldr r2, [pc, #464] ; a0008f08 a0008d34: e5923000 ldr r3, [r2] a0008d38: e5933018 ldr r3, [r3, #24] a0008d3c: e1590003 cmp r9, r3 a0008d40: 0affffdc beq a0008cb8 /* * Am I at the root of this mounted filesystem? */ if (pathloc->node_access == pathloc->mt_entry->mt_fs_root.node_access){ a0008d44: e594e010 ldr lr, [r4, #16] a0008d48: e59e301c ldr r3, [lr, #28] a0008d4c: e1590003 cmp r9, r3 a0008d50: 1a00000d bne a0008d8c if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; a0008d54: e28dc028 add ip, sp, #40 ; 0x28 a0008d58: e28ee008 add lr, lr, #8 a0008d5c: e8be000f ldm lr!, {r0, r1, r2, r3} a0008d60: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008d64: e59ee000 ldr lr, [lr] *pathloc = newloc; return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0008d68: e06a5005 rsb r5, sl, r5 if ( pathloc->node_access == rtems_filesystem_root.node_access ) { break; } else { newloc = pathloc->mt_entry->mt_point_node; a0008d6c: e58ce000 str lr, [ip] *pathloc = newloc; a0008d70: e28dc028 add ip, sp, #40 ; 0x28 a0008d74: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008d78: e1a0c004 mov ip, r4 a0008d7c: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008d80: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0008d84: e594300c ldr r3, [r4, #12] a0008d88: ea000025 b a0008e24 } } else { if ( !node->Parent ) a0008d8c: e5996008 ldr r6, [r9, #8] a0008d90: e3560000 cmp r6, #0 a0008d94: 1a00002d bne a0008e50 a0008d98: ea00003e b a0008e98 pathloc->node_access = node; break; case IMFS_NAME: if ( node->type == IMFS_HARD_LINK ) { a0008d9c: e599304c ldr r3, [r9, #76] ; 0x4c a0008da0: e3530003 cmp r3, #3 a0008da4: 0a000001 beq a0008db0 result = IMFS_evaluate_link( pathloc, 0 ); if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { a0008da8: e3530004 cmp r3, #4 a0008dac: 1a000005 bne a0008dc8 result = IMFS_evaluate_link( pathloc, 0 ); a0008db0: e1a00004 mov r0, r4 a0008db4: e3a01000 mov r1, #0 a0008db8: ebffff88 bl a0008be0 if ( result == -1 ) a0008dbc: e3700001 cmn r0, #1 if ( result == -1 ) return -1; } else if ( node->type == IMFS_SYM_LINK ) { result = IMFS_evaluate_link( pathloc, 0 ); a0008dc0: e1a06000 mov r6, r0 if ( result == -1 ) a0008dc4: 0a00004c beq a0008efc return -1; } node = pathloc->node_access; a0008dc8: e5940000 ldr r0, [r4] if ( !node ) a0008dcc: e3500000 cmp r0, #0 a0008dd0: 0a00003d beq a0008ecc /* * Only a directory can be decended into. */ if ( node->type != IMFS_DIRECTORY ) a0008dd4: e590304c ldr r3, [r0, #76] ; 0x4c a0008dd8: e3530001 cmp r3, #1 a0008ddc: 1a00003a bne a0008ecc /* * 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 ) { a0008de0: e590e05c ldr lr, [r0, #92] ; 0x5c a0008de4: e35e0000 cmp lr, #0 a0008de8: 0a000014 beq a0008e40 newloc = node->info.directory.mt_fs->mt_fs_root; a0008dec: e28dc028 add ip, sp, #40 ; 0x28 a0008df0: e28ee01c add lr, lr, #28 a0008df4: e8be000f ldm lr!, {r0, r1, r2, r3} a0008df8: e8ac000f stmia ip!, {r0, r1, r2, r3} a0008dfc: e59ee000 ldr lr, [lr] a0008e00: e58ce000 str lr, [ip] *pathloc = newloc; a0008e04: e28dc028 add ip, sp, #40 ; 0x28 a0008e08: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008e0c: e1a0c004 mov ip, r4 a0008e10: e8ac000f stmia ip!, {r0, r1, r2, r3} return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0008e14: e59d203c ldr r2, [sp, #60] ; 0x3c * new fs root node and let them finish evaluating the path. */ if ( node->info.directory.mt_fs != NULL ) { newloc = node->info.directory.mt_fs->mt_fs_root; *pathloc = newloc; a0008e18: e58ce000 str lr, [ip] return (*pathloc->ops->evalformake_h)( &path[i-len], pathloc, name ); a0008e1c: e594300c ldr r3, [r4, #12] a0008e20: e0625005 rsb r5, r2, r5 a0008e24: e5933004 ldr r3, [r3, #4] a0008e28: e0870005 add r0, r7, r5 a0008e2c: e1a01004 mov r1, r4 a0008e30: e59d2000 ldr r2, [sp] a0008e34: e12fff33 blx r3 a0008e38: e1a06000 mov r6, r0 a0008e3c: ea00002e b a0008efc /* * Otherwise find the token name in the present location. */ node = IMFS_find_match_in_dir( node, token ); a0008e40: e28d1004 add r1, sp, #4 a0008e44: eb00005f bl a0008fc8 /* * If there is no node we have found the name of the node we * wish to create. */ if ( ! node ) a0008e48: e2506000 subs r6, r0, #0 a0008e4c: 0a000007 beq a0008e70 done = true; else pathloc->node_access = node; a0008e50: e5846000 str r6, [r4] a0008e54: eaffff97 b a0008cb8 break; case IMFS_NO_MORE_PATH: rtems_set_errno_and_return_minus_one( EEXIST ); a0008e58: eb000ba5 bl a000bcf4 <__errno> a0008e5c: e3a03011 mov r3, #17 a0008e60: ea000023 b a0008ef4 break; case IMFS_INVALID_TOKEN: rtems_set_errno_and_return_minus_one( ENAMETOOLONG ); a0008e64: eb000ba2 bl a000bcf4 <__errno> a0008e68: e3a0305b mov r3, #91 ; 0x5b a0008e6c: ea000020 b a0008ef4 case IMFS_CURRENT_DIR: break; } } *name = &path[ i - len ]; a0008e70: e59d303c ldr r3, [sp, #60] ; 0x3c a0008e74: e59d2000 ldr r2, [sp] a0008e78: e0633005 rsb r3, r3, r5 a0008e7c: e0873003 add r3, r7, r3 a0008e80: 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( a0008e84: 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++) { a0008e88: ea000005 b a0008ea4 if ( !IMFS_is_separator( path[ i ] ) ) a0008e8c: ebffe714 bl a0002ae4 a0008e90: e3500000 cmp r0, #0 a0008e94: 1a000002 bne a0008ea4 rtems_set_errno_and_return_minus_one( ENOENT ); a0008e98: eb000b95 bl a000bcf4 <__errno> a0008e9c: e3a03002 mov r3, #2 a0008ea0: ea000013 b a0008ef4 /* * 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++) { a0008ea4: e4d50001 ldrb r0, [r5], #1 a0008ea8: e3500000 cmp r0, #0 a0008eac: 1afffff6 bne a0008e8c /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a0008eb0: e1a00004 mov r0, r4 a0008eb4: ebfffe41 bl a00087c0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a0008eb8: e5943000 ldr r3, [r4] /* * Verify we can execute and write to this directory. */ result = IMFS_Set_handlers( pathloc ); a0008ebc: e1a06000 mov r6, r0 /* * The returned node must be a directory */ node = pathloc->node_access; if ( node->type != IMFS_DIRECTORY ) a0008ec0: e593304c ldr r3, [r3, #76] ; 0x4c a0008ec4: e3530001 cmp r3, #1 a0008ec8: 0a000002 beq a0008ed8 rtems_set_errno_and_return_minus_one( ENOTDIR ); a0008ecc: eb000b88 bl a000bcf4 <__errno> a0008ed0: e3a03014 mov r3, #20 a0008ed4: ea000006 b a0008ef4 /* * We must have Write and execute permission on the returned node. */ if ( !IMFS_evaluate_permission( pathloc, RTEMS_LIBIO_PERMS_WX ) ) a0008ed8: e1a00004 mov r0, r4 a0008edc: e3a01003 mov r1, #3 a0008ee0: ebfffe53 bl a0008834 a0008ee4: e3500000 cmp r0, #0 a0008ee8: 1a000003 bne a0008efc rtems_set_errno_and_return_minus_one( EACCES ); a0008eec: eb000b80 bl a000bcf4 <__errno> a0008ef0: e3a0300d mov r3, #13 a0008ef4: e5803000 str r3, [r0] a0008ef8: e3e06000 mvn r6, #0 return result; } a0008efc: e1a00006 mov r0, r6 a0008f00: e28dd040 add sp, sp, #64 ; 0x40 a0008f04: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0008854 : int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { IMFS_jnode_t *jnode = node->node_access; a0008854: e5903000 ldr r3, [r0] int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a0008858: e92d4030 push {r4, r5, lr} /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) a000885c: e593204c ldr r2, [r3, #76] ; 0x4c int IMFS_evaluate_hard_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a0008860: e1a04000 mov r4, r0 a0008864: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_HARD_LINK ) a0008868: e3520003 cmp r2, #3 a000886c: 0a000001 beq a0008878 rtems_fatal_error_occurred (0xABCD0000); a0008870: e59f003c ldr r0, [pc, #60] ; a00088b4 <== NOT EXECUTED a0008874: ebfff325 bl a0005510 <== NOT EXECUTED /* * Set the hard link value and the handlers. */ node->node_access = jnode->info.hard_link.link_node; a0008878: e5933050 ldr r3, [r3, #80] ; 0x50 a000887c: e5803000 str r3, [r0] IMFS_Set_handlers( node ); a0008880: ebffffce bl a00087c0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a0008884: e1a00004 mov r0, r4 a0008888: e1a01005 mov r1, r5 a000888c: ebffffe8 bl a0008834 a0008890: e3500000 cmp r0, #0 a0008894: 1a000004 bne a00088ac rtems_set_errno_and_return_minus_one( EACCES ); a0008898: eb000d15 bl a000bcf4 <__errno> <== NOT EXECUTED a000889c: e3a0300d mov r3, #13 <== NOT EXECUTED a00088a0: e5803000 str r3, [r0] <== NOT EXECUTED a00088a4: e3e00000 mvn r0, #0 <== NOT EXECUTED a00088a8: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED return result; a00088ac: e3a00000 mov r0, #0 } a00088b0: e8bd8030 pop {r4, r5, pc} =============================================================================== a0008b30 : int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a0008b30: e92d4071 push {r0, r4, r5, r6, lr} IMFS_jnode_t *jnode = node->node_access; a0008b34: e5906000 ldr r6, [r0] int IMFS_evaluate_sym_link( rtems_filesystem_location_info_t *node, /* IN/OUT */ int flags /* IN */ ) { a0008b38: e1a04000 mov r4, r0 a0008b3c: e1a05001 mov r5, r1 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) a0008b40: e596304c ldr r3, [r6, #76] ; 0x4c a0008b44: e3530004 cmp r3, #4 rtems_fatal_error_occurred (0xABCD0000); a0008b48: 159f0088 ldrne r0, [pc, #136] ; a0008bd8 /* * Check for things that should never happen. */ if ( jnode->type != IMFS_SYM_LINK ) a0008b4c: 1a000003 bne a0008b60 rtems_fatal_error_occurred (0xABCD0000); if ( !jnode->Parent ) a0008b50: e5963008 ldr r3, [r6, #8] a0008b54: e3530000 cmp r3, #0 a0008b58: 1a000001 bne a0008b64 rtems_fatal_error_occurred( 0xBAD00000 ); a0008b5c: e59f0078 ldr r0, [pc, #120] ; a0008bdc <== NOT EXECUTED a0008b60: ebfff26a bl a0005510 <== NOT EXECUTED * root depending on the symbolic links path. */ node->node_access = jnode->Parent; rtems_filesystem_get_sym_start_loc( a0008b64: e5960050 ldr r0, [r6, #80] ; 0x50 a0008b68: e1a0100d mov r1, sp a0008b6c: 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; a0008b70: e5843000 str r3, [r4] rtems_filesystem_get_sym_start_loc( a0008b74: eb000353 bl a00098c8 /* * Use eval path to evaluate the path of the symbolic link. */ result = IMFS_eval_path( a0008b78: e59d3000 ldr r3, [sp] a0008b7c: e5966050 ldr r6, [r6, #80] ; 0x50 a0008b80: e0866003 add r6, r6, r3 a0008b84: e1a00006 mov r0, r6 a0008b88: eb001049 bl a000ccb4 a0008b8c: e1a02005 mov r2, r5 a0008b90: e1a01000 mov r1, r0 a0008b94: e1a03004 mov r3, r4 a0008b98: e1a00006 mov r0, r6 a0008b9c: ebffff45 bl a00088b8 a0008ba0: e1a06000 mov r6, r0 strlen( &jnode->info.sym_link.name[i] ), flags, node ); IMFS_Set_handlers( node ); a0008ba4: e1a00004 mov r0, r4 a0008ba8: ebffff04 bl a00087c0 /* * Verify we have the correct permissions for this node. */ if ( !IMFS_evaluate_permission( node, flags ) ) a0008bac: e1a00004 mov r0, r4 a0008bb0: e1a01005 mov r1, r5 a0008bb4: ebffff1e bl a0008834 a0008bb8: e3500000 cmp r0, #0 a0008bbc: 1a000003 bne a0008bd0 rtems_set_errno_and_return_minus_one( EACCES ); a0008bc0: eb000c4b bl a000bcf4 <__errno> <== NOT EXECUTED a0008bc4: e3a0300d mov r3, #13 <== NOT EXECUTED a0008bc8: e5803000 str r3, [r0] <== NOT EXECUTED a0008bcc: e3e06000 mvn r6, #0 <== NOT EXECUTED return result; } a0008bd0: e1a00006 mov r0, r6 a0008bd4: e8bd8078 pop {r3, r4, r5, r6, pc} =============================================================================== a000207c : } int IMFS_fifo_close( rtems_libio_t *iop ) { a000207c: e92d4070 push {r4, r5, r6, lr} IMFS_jnode_t *jnode = iop->pathinfo.node_access; a0002080: e5905018 ldr r5, [r0, #24] } int IMFS_fifo_close( rtems_libio_t *iop ) { a0002084: e1a04000 mov r4, r0 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); a0002088: e1a01004 mov r1, r4 a000208c: e2850050 add r0, r5, #80 ; 0x50 a0002090: eb002265 bl a000aa2c if (err == 0) { a0002094: e2506000 subs r6, r0, #0 a0002098: 1a000005 bne a00020b4 iop->flags &= ~LIBIO_FLAGS_OPEN; a000209c: e5943014 ldr r3, [r4, #20] IMFS_check_node_remove(jnode); a00020a0: e1a00005 mov r0, r5 IMFS_jnode_t *jnode = iop->pathinfo.node_access; int err = pipe_release(&JNODE2PIPE(jnode), iop); if (err == 0) { iop->flags &= ~LIBIO_FLAGS_OPEN; a00020a4: e3c33c01 bic r3, r3, #256 ; 0x100 a00020a8: e5843014 str r3, [r4, #20] IMFS_check_node_remove(jnode); a00020ac: eb000183 bl a00026c0 a00020b0: ea000004 b a00020c8 } IMFS_FIFO_RETURN(err); a00020b4: aa000003 bge a00020c8 <== NOT EXECUTED a00020b8: eb002c7c bl a000d2b0 <__errno> <== NOT EXECUTED a00020bc: e2666000 rsb r6, r6, #0 <== NOT EXECUTED a00020c0: e5806000 str r6, [r0] <== NOT EXECUTED a00020c4: e3e06000 mvn r6, #0 <== NOT EXECUTED } a00020c8: e1a00006 mov r0, r6 a00020cc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a0008f0c : ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a0008f0c: 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; a0008f10: e1a0c000 mov ip, r0 a0008f14: 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 ) { a0008f18: 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; a0008f1c: e1a0e00d mov lr, sp ((IMFS_jnode_t *)( rtems_chain_head( jnode_get_control( jnode ) )->next)) int IMFS_fsunmount( rtems_filesystem_mount_table_entry_t *temp_mt_entry ) { a0008f20: e1a05000 mov r5, r0 * Traverse tree that starts at the mt_fs_root and deallocate memory * associated memory space */ jnode = (IMFS_jnode_t *)temp_mt_entry->mt_fs_root.node_access; loc = temp_mt_entry->mt_fs_root; a0008f24: e8bc000f ldm ip!, {r0, r1, r2, r3} a0008f28: e8ae000f stmia lr!, {r0, r1, r2, r3} a0008f2c: e59c3000 ldr r3, [ip] a0008f30: e58e3000 str r3, [lr] /* * Set this to null to indicate that it is being unmounted. */ temp_mt_entry->mt_fs_root.node_access = NULL; a0008f34: e3a03000 mov r3, #0 a0008f38: e585301c str r3, [r5, #28] do { next = jnode->Parent; loc.node_access = (void *)jnode; IMFS_Set_handlers( &loc ); a0008f3c: e1a0500d mov r5, sp a0008f40: e1a0000d mov r0, sp */ temp_mt_entry->mt_fs_root.node_access = NULL; do { next = jnode->Parent; a0008f44: e5946008 ldr r6, [r4, #8] loc.node_access = (void *)jnode; a0008f48: e58d4000 str r4, [sp] IMFS_Set_handlers( &loc ); a0008f4c: ebfffe1b bl a00087c0 if ( jnode->type != IMFS_DIRECTORY ) { a0008f50: e594304c ldr r3, [r4, #76] ; 0x4c a0008f54: e3530001 cmp r3, #1 a0008f58: 1a000003 bne a0008f6c result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { a0008f5c: e5942050 ldr r2, [r4, #80] ; 0x50 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0008f60: e2843054 add r3, r4, #84 ; 0x54 a0008f64: e1520003 cmp r2, r3 a0008f68: 1a000005 bne a0008f84 result = IMFS_unlink( NULL, &loc ); a0008f6c: e3a00000 mov r0, #0 a0008f70: e1a0100d mov r1, sp a0008f74: ebffe208 bl a000179c if (result != 0) a0008f78: e3500000 cmp r0, #0 a0008f7c: 1a00000c bne a0008fb4 return -1; jnode = next; a0008f80: e1a04006 mov r4, r6 } if ( jnode != NULL ) { a0008f84: e3540000 cmp r4, #0 a0008f88: 0a00000b beq a0008fbc if ( jnode->type == IMFS_DIRECTORY ) { a0008f8c: e594304c ldr r3, [r4, #76] ; 0x4c a0008f90: e3530001 cmp r3, #1 a0008f94: 1affffe9 bne a0008f40 if ( jnode_has_children( jnode ) ) a0008f98: e5943050 ldr r3, [r4, #80] ; 0x50 a0008f9c: e2842054 add r2, r4, #84 ; 0x54 a0008fa0: e1530002 cmp r3, r2 a0008fa4: 0affffe5 beq a0008f40 jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); a0008fa8: e2534000 subs r4, r3, #0 a0008fac: 1affffe3 bne a0008f40 a0008fb0: ea000001 b a0008fbc <== NOT EXECUTED return -1; jnode = next; } else if ( jnode_has_no_children( jnode ) ) { result = IMFS_unlink( NULL, &loc ); if (result != 0) return -1; a0008fb4: e3e00000 mvn r0, #0 <== NOT EXECUTED a0008fb8: ea000000 b a0008fc0 <== NOT EXECUTED jnode = jnode_get_first_child( jnode ); } } } while (jnode != NULL); return 0; a0008fbc: e1a00004 mov r0, r4 } a0008fc0: e28dd014 add sp, sp, #20 a0008fc4: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a00013b4 : 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 ) { a00013b4: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} a00013b8: 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, a00013bc: e59f30cc ldr r3, [pc, #204] ; a0001490 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 ) { a00013c0: e1a0a001 mov sl, r1 a00013c4: e1a08002 mov r8, r2 IMFS_jnode_t *jnode; /* * determine/check value for imfs_memfile_bytes_per_block */ IMFS_determine_bytes_per_block(&imfs_memfile_bytes_per_block, a00013c8: 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 ) { a00013cc: 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, a00013d0: 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) { a00013d4: e3a02010 mov r2, #16 a00013d8: e1520003 cmp r2, r3 a00013dc: 0a000003 beq a00013f0 a00013e0: e2511001 subs r1, r1, #1 a00013e4: e1a02082 lsl r2, r2, #1 a00013e8: 1afffffa bne a00013d8 is_valid = true; } } *dest_bytes_per_block = ((is_valid) ? requested_bytes_per_block : default_bytes_per_block); a00013ec: 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) a00013f0: e59f609c ldr r6, [pc, #156] ; a0001494 a00013f4: 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(); a00013f8: eb001ce0 bl a0008780 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; a00013fc: e59fe094 ldr lr, [pc, #148] ; a0001498 a0001400: e284c038 add ip, r4, #56 ; 0x38 /* * Create the root node * * NOTE: UNIX root is 755 and owned by root/root (0/0). */ temp_mt_entry->mt_fs_root.node_access = IMFS_create_root_node(); a0001404: e584001c str r0, [r4, #28] a0001408: 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; a000140c: e8be000f ldm lr!, {r0, r1, r2, r3} a0001410: e8ac000f stmia ip!, {r0, r1, r2, r3} a0001414: e8be000f ldm lr!, {r0, r1, r2, r3} a0001418: e8ac000f stmia ip!, {r0, r1, r2, r3} a000141c: 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; a0001420: 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; a0001424: 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; a0001428: 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 ) ); a000142c: e3a00001 mov r0, #1 a0001430: e3a01014 mov r1, #20 a0001434: eb0001a2 bl a0001ac4 if ( !fs_info ) { a0001438: e3500000 cmp r0, #0 a000143c: 1a000006 bne a000145c free(temp_mt_entry->mt_fs_root.node_access); a0001440: e1a00005 mov r0, r5 <== NOT EXECUTED a0001444: eb00021a bl a0001cb4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); a0001448: eb002a29 bl a000bcf4 <__errno> <== NOT EXECUTED a000144c: e3a0300c mov r3, #12 <== NOT EXECUTED a0001450: e5803000 str r3, [r0] <== NOT EXECUTED a0001454: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001458: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; a000145c: e5963004 ldr r3, [r6, #4] fs_info->ino_count = 1; fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; fs_info->fifo_handlers = fifo_handlers; a0001460: e59d201c ldr r2, [sp, #28] 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; a0001464: e5840034 str r0, [r4, #52] ; 0x34 /* * Set st_ino for the root to 1. */ fs_info->instance = imfs_instance++; a0001468: e5803000 str r3, [r0] a000146c: e2833001 add r3, r3, #1 a0001470: e5863004 str r3, [r6, #4] fs_info->ino_count = 1; a0001474: e3a03001 mov r3, #1 a0001478: e9800108 stmib r0, {r3, r8} fs_info->memfile_handlers = memfile_handlers; fs_info->directory_handlers = directory_handlers; a000147c: e580700c str r7, [r0, #12] fs_info->fifo_handlers = fifo_handlers; a0001480: e5802010 str r2, [r0, #16] jnode = temp_mt_entry->mt_fs_root.node_access; jnode->st_ino = fs_info->ino_count; a0001484: e5853038 str r3, [r5, #56] ; 0x38 return 0; a0001488: e3a00000 mov r0, #0 } a000148c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a000149c : int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { a000149c: e92d4070 push {r4, r5, r6, lr} int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; a00014a0: 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 */ ) { a00014a4: e24dd048 sub sp, sp, #72 ; 0x48 a00014a8: e1a05001 mov r5, r1 int i; /* * Verify this node can be linked to. */ info.hard_link.link_node = to_loc->node_access; a00014ac: e58d3028 str r3, [sp, #40] ; 0x28 if ( info.hard_link.link_node->st_nlink >= LINK_MAX ) a00014b0: e1d333b4 ldrh r3, [r3, #52] ; 0x34 int IMFS_link( rtems_filesystem_location_info_t *to_loc, /* IN */ rtems_filesystem_location_info_t *parent_loc, /* IN */ const char *token /* IN */ ) { a00014b4: 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 ) a00014b8: e3530007 cmp r3, #7 a00014bc: 9a000002 bls a00014cc rtems_set_errno_and_return_minus_one( EMLINK ); a00014c0: eb002a0b bl a000bcf4 <__errno> a00014c4: e3a0301f mov r3, #31 a00014c8: ea000012 b a0001518 /* * Remove any separators at the end of the string. */ IMFS_get_token( token, strlen( token ), new_name, &i ); a00014cc: e1a00002 mov r0, r2 a00014d0: eb002df7 bl a000ccb4 a00014d4: e28d4004 add r4, sp, #4 a00014d8: e1a01000 mov r1, r0 a00014dc: e1a02004 mov r2, r4 a00014e0: e28d3044 add r3, sp, #68 ; 0x44 a00014e4: e1a00006 mov r0, r6 a00014e8: eb001eda bl a0009058 new_node = IMFS_create_node( parent_loc, IMFS_HARD_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info a00014ec: 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( a00014f0: e58d3000 str r3, [sp] a00014f4: e1a00005 mov r0, r5 a00014f8: e3a01003 mov r1, #3 a00014fc: e1a02004 mov r2, r4 a0001500: e59f3050 ldr r3, [pc, #80] ; a0001558 a0001504: eb001c4f bl a0008648 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if ( !new_node ) a0001508: e3500000 cmp r0, #0 a000150c: 1a000004 bne a0001524 rtems_set_errno_and_return_minus_one( ENOMEM ); a0001510: eb0029f7 bl a000bcf4 <__errno> <== NOT EXECUTED a0001514: e3a0300c mov r3, #12 <== NOT EXECUTED a0001518: e5803000 str r3, [r0] a000151c: e3e00000 mvn r0, #0 a0001520: ea00000a b a0001550 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; a0001524: e59d3028 ldr r3, [sp, #40] ; 0x28 IMFS_update_ctime( info.hard_link.link_node ); a0001528: e28d003c add r0, sp, #60 ; 0x3c a000152c: e3a01000 mov r1, #0 rtems_set_errno_and_return_minus_one( ENOMEM ); /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; a0001530: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a0001534: e2822001 add r2, r2, #1 a0001538: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( info.hard_link.link_node ); a000153c: eb000211 bl a0001d88 a0001540: e59d203c ldr r2, [sp, #60] ; 0x3c a0001544: e59d3028 ldr r3, [sp, #40] ; 0x28 return 0; a0001548: e3a00000 mov r0, #0 /* * Increment the link count of the node being pointed to. */ info.hard_link.link_node->st_nlink++; IMFS_update_ctime( info.hard_link.link_node ); a000154c: e5832048 str r2, [r3, #72] ; 0x48 return 0; } a0001550: e28dd048 add sp, sp, #72 ; 0x48 a0001554: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000ac04 : MEMFILE_STATIC int IMFS_memfile_addblock( IMFS_jnode_t *the_jnode, unsigned int block ) { a000ac04: e92d4030 push {r4, r5, lr} #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a000ac08: e3a02001 mov r2, #1 a000ac0c: ebfffefa bl a000a7fc if ( *block_entry_ptr ) a000ac10: e5904000 ldr r4, [r0] #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); a000ac14: e1a05000 mov r5, r0 if ( *block_entry_ptr ) a000ac18: e3540000 cmp r4, #0 a000ac1c: 1a000005 bne a000ac38 #if 0 fprintf(stdout, "%d %p", block, block_entry_ptr ); fflush(stdout); #endif memory = memfile_alloc_block(); a000ac20: ebfffee8 bl a000a7c8 if ( !memory ) a000ac24: e3500000 cmp r0, #0 a000ac28: 0a000004 beq a000ac40 return 1; *block_entry_ptr = memory; a000ac2c: e5850000 str r0, [r5] return 0; a000ac30: e1a00004 mov r0, r4 a000ac34: e8bd8030 pop {r4, r5, pc} assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif block_entry_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 1 ); if ( *block_entry_ptr ) return 0; a000ac38: e3a00000 mov r0, #0 a000ac3c: e8bd8030 pop {r4, r5, pc} fflush(stdout); #endif memory = memfile_alloc_block(); if ( !memory ) return 1; a000ac40: e3a00001 mov r0, #1 <== NOT EXECUTED *block_entry_ptr = memory; return 0; } a000ac44: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a000ae00 : #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a000ae00: e59f3110 ldr r3, [pc, #272] ; a000af18 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000ae04: 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 ) a000ae08: e593b000 ldr fp, [r3] MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000ae0c: e1a05002 mov r5, r2 a000ae10: e1a04000 mov r4, r0 #if defined(RTEMS_DEBUG) assert( the_jnode ); assert( the_jnode->type == IMFS_MEMORY_FILE ); #endif if ( new_length >= IMFS_MEMFILE_MAXIMUM_SIZE ) a000ae14: e1a0312b lsr r3, fp, #2 a000ae18: e2832001 add r2, r3, #1 a000ae1c: e0020293 mul r2, r3, r2 MEMFILE_STATIC int IMFS_memfile_extend( IMFS_jnode_t *the_jnode, off_t new_length ) { a000ae20: 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 ) a000ae24: e2822001 add r2, r2, #1 a000ae28: e0030392 mul r3, r2, r3 a000ae2c: e3a02000 mov r2, #0 a000ae30: e2433001 sub r3, r3, #1 a000ae34: e1520005 cmp r2, r5 a000ae38: e003039b mul r3, fp, r3 a000ae3c: ca000005 bgt a000ae58 a000ae40: 1a000001 bne a000ae4c a000ae44: e1530001 cmp r3, r1 a000ae48: 8a000002 bhi a000ae58 rtems_set_errno_and_return_minus_one( EINVAL ); a000ae4c: eb0003a8 bl a000bcf4 <__errno> a000ae50: e3a03016 mov r3, #22 a000ae54: ea000025 b a000aef0 if ( new_length <= the_jnode->info.file.size ) a000ae58: e5948054 ldr r8, [r4, #84] ; 0x54 a000ae5c: e5947050 ldr r7, [r4, #80] ; 0x50 a000ae60: e1550008 cmp r5, r8 a000ae64: ca000002 bgt a000ae74 a000ae68: 1a000028 bne a000af10 a000ae6c: e1560007 cmp r6, r7 a000ae70: 9a000026 bls a000af10 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a000ae74: e1a0cfcb asr ip, fp, #31 a000ae78: e1a0300c mov r3, ip a000ae7c: e1a0200b mov r2, fp a000ae80: e1a00006 mov r0, r6 a000ae84: e1a01005 mov r1, r5 a000ae88: e58dc000 str ip, [sp] a000ae8c: eb001213 bl a000f6e0 <__divdi3> old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a000ae90: e59dc000 ldr ip, [sp] a000ae94: e1a01008 mov r1, r8 /* * Calculate the number of range of blocks to allocate */ new_blocks = new_length / IMFS_MEMFILE_BYTES_PER_BLOCK; a000ae98: e1a0a000 mov sl, r0 old_blocks = the_jnode->info.file.size / IMFS_MEMFILE_BYTES_PER_BLOCK; a000ae9c: e1a0200b mov r2, fp a000aea0: e1a00007 mov r0, r7 a000aea4: e1a0300c mov r3, ip a000aea8: eb00120c bl a000f6e0 <__divdi3> a000aeac: e1a08000 mov r8, r0 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a000aeb0: e1a07000 mov r7, r0 a000aeb4: ea000011 b a000af00 if ( IMFS_memfile_addblock( the_jnode, block ) ) { a000aeb8: e1a00004 mov r0, r4 a000aebc: e1a01007 mov r1, r7 a000aec0: ebffff4f bl a000ac04 a000aec4: e3500000 cmp r0, #0 a000aec8: 0a00000b beq a000aefc a000aecc: ea000003 b a000aee0 <== NOT EXECUTED for ( ; block>=old_blocks ; block-- ) { IMFS_memfile_remove_block( the_jnode, block ); a000aed0: e1a01007 mov r1, r7 <== NOT EXECUTED a000aed4: e1a00004 mov r0, r4 <== NOT EXECUTED a000aed8: ebffffbd bl a000add4 <== 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-- ) { a000aedc: e2477001 sub r7, r7, #1 <== NOT EXECUTED a000aee0: e1570008 cmp r7, r8 <== NOT EXECUTED a000aee4: 2afffff9 bcs a000aed0 <== NOT EXECUTED IMFS_memfile_remove_block( the_jnode, block ); } rtems_set_errno_and_return_minus_one( ENOSPC ); a000aee8: eb000381 bl a000bcf4 <__errno> <== NOT EXECUTED a000aeec: e3a0301c mov r3, #28 <== NOT EXECUTED a000aef0: e5803000 str r3, [r0] a000aef4: e3e00000 mvn r0, #0 a000aef8: ea000005 b a000af14 /* * Now allocate each of those blocks. */ for ( block=old_blocks ; block<=new_blocks ; block++ ) { a000aefc: e2877001 add r7, r7, #1 a000af00: e157000a cmp r7, sl a000af04: 9affffeb bls a000aeb8 /* * Set the new length of the file. */ the_jnode->info.file.size = new_length; a000af08: e5846050 str r6, [r4, #80] ; 0x50 a000af0c: 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; a000af10: e3a00000 mov r0, #0 * Set the new length of the file. */ the_jnode->info.file.size = new_length; return 0; } a000af14: e8bd8df8 pop {r3, r4, r5, r6, r7, r8, sl, fp, pc} =============================================================================== a000a7fc : /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a7fc: e59f31dc ldr r3, [pc, #476] ; a000a9e0 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000a800: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a804: e5935000 ldr r5, [r3] #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000a808: e1a04000 mov r4, r0 a000a80c: e1a06001 mov r6, r1 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a810: e1a05125 lsr r5, r5, #2 a000a814: e2453001 sub r3, r5, #1 a000a818: e1510003 cmp r1, r3 #endif IMFS_jnode_t *the_jnode, unsigned int block, int malloc_it ) { a000a81c: e1a08002 mov r8, r2 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { a000a820: 8a00000e bhi a000a860 p = info->indirect; if ( malloc_it ) { a000a824: e3520000 cmp r2, #0 /* * Is the block number in the simple indirect portion? */ if ( my_block <= LAST_INDIRECT ) { p = info->indirect; a000a828: e5900058 ldr r0, [r0, #88] ; 0x58 if ( malloc_it ) { a000a82c: 0a000007 beq a000a850 if ( !p ) { a000a830: e3500000 cmp r0, #0 a000a834: 1a000003 bne a000a848 p = memfile_alloc_block(); a000a838: ebffffe2 bl a000a7c8 if ( !p ) a000a83c: e3500000 cmp r0, #0 a000a840: 0a000065 beq a000a9dc return 0; info->indirect = p; a000a844: e5840058 str r0, [r4, #88] ; 0x58 } return &info->indirect[ my_block ]; a000a848: e5940058 ldr r0, [r4, #88] ; 0x58 a000a84c: ea000001 b a000a858 } if ( !p ) a000a850: e3500000 cmp r0, #0 a000a854: 0a000060 beq a000a9dc return 0; return &info->indirect[ my_block ]; a000a858: e0800106 add r0, r0, r6, lsl #2 a000a85c: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * Is the block number in the doubly indirect portion? */ if ( my_block <= LAST_DOUBLY_INDIRECT ) { a000a860: e2853001 add r3, r5, #1 a000a864: e0030395 mul r3, r5, r3 a000a868: e2432001 sub r2, r3, #1 a000a86c: e1510002 cmp r1, r2 a000a870: 8a000021 bhi a000a8fc #if 0 fprintf(stdout, "(d %d) ", block ); fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; a000a874: e0656001 rsb r6, r5, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a878: e1a00006 mov r0, r6 a000a87c: e1a01005 mov r1, r5 a000a880: eb001362 bl a000f610 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a884: e1a01005 mov r1, r5 fflush(stdout); #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a888: e1a07000 mov r7, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a88c: e1a00006 mov r0, r6 a000a890: eb0012c6 bl a000f3b0 <__aeabi_uidiv> p = info->doubly_indirect; if ( malloc_it ) { a000a894: e3580000 cmp r8, #0 #endif my_block -= FIRST_DOUBLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a898: e1a05000 mov r5, r0 p = info->doubly_indirect; a000a89c: e594005c ldr r0, [r4, #92] ; 0x5c if ( malloc_it ) { a000a8a0: 0a00000e beq a000a8e0 if ( !p ) { a000a8a4: e3500000 cmp r0, #0 a000a8a8: 1a000003 bne a000a8bc p = memfile_alloc_block(); a000a8ac: ebffffc5 bl a000a7c8 if ( !p ) a000a8b0: e3500000 cmp r0, #0 a000a8b4: 0a000048 beq a000a9dc return 0; info->doubly_indirect = p; a000a8b8: e584005c str r0, [r4, #92] ; 0x5c } p1 = (block_p *)p[ doubly ]; a000a8bc: e0804105 add r4, r0, r5, lsl #2 a000a8c0: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p1 ) { a000a8c4: e3500000 cmp r0, #0 a000a8c8: 1a000009 bne a000a8f4 p1 = memfile_alloc_block(); a000a8cc: ebffffbd bl a000a7c8 if ( !p1 ) a000a8d0: e3500000 cmp r0, #0 return 0; p[ doubly ] = (block_p) p1; a000a8d4: 15840000 strne r0, [r4] } p1 = (block_p *)p[ doubly ]; if ( !p1 ) { p1 = memfile_alloc_block(); if ( !p1 ) a000a8d8: 1a000005 bne a000a8f4 a000a8dc: ea00003e b a000a9dc <== NOT EXECUTED } return (block_p *)&p1[ singly ]; } if ( !p ) a000a8e0: e3500000 cmp r0, #0 a000a8e4: 0a00003c beq a000a9dc return 0; p = (block_p *)p[ doubly ]; a000a8e8: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p ) a000a8ec: e3500000 cmp r0, #0 a000a8f0: 0a000039 beq a000a9dc #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 ]; a000a8f4: e0800107 add r0, r0, r7, lsl #2 a000a8f8: 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 ) { a000a8fc: e2832001 add r2, r3, #1 a000a900: e0020295 mul r2, r5, r2 a000a904: e2422001 sub r2, r2, #1 a000a908: e1510002 cmp r1, r2 a000a90c: 8a000031 bhi a000a9d8 my_block -= FIRST_TRIPLY_INDIRECT; a000a910: e0636001 rsb r6, r3, r1 singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a914: e1a00006 mov r0, r6 a000a918: e1a01005 mov r1, r5 a000a91c: eb00133b bl a000f610 <__umodsi3> doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a920: e1a01005 mov r1, r5 */ if ( my_block <= LAST_TRIPLY_INDIRECT ) { my_block -= FIRST_TRIPLY_INDIRECT; singly = my_block % IMFS_MEMFILE_BLOCK_SLOTS; a000a924: e1a0a000 mov sl, r0 doubly = my_block / IMFS_MEMFILE_BLOCK_SLOTS; a000a928: e1a00006 mov r0, r6 a000a92c: eb00129f bl a000f3b0 <__aeabi_uidiv> triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000a930: 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; a000a934: e1a06000 mov r6, r0 triply = doubly / IMFS_MEMFILE_BLOCK_SLOTS; a000a938: eb00129c bl a000f3b0 <__aeabi_uidiv> doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000a93c: 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; a000a940: e1a07000 mov r7, r0 doubly %= IMFS_MEMFILE_BLOCK_SLOTS; a000a944: e1a00006 mov r0, r6 a000a948: eb001330 bl a000f610 <__umodsi3> p = info->triply_indirect; if ( malloc_it ) { a000a94c: 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; a000a950: e1a05000 mov r5, r0 p = info->triply_indirect; a000a954: e5940060 ldr r0, [r4, #96] ; 0x60 if ( malloc_it ) { a000a958: 0a000016 beq a000a9b8 if ( !p ) { a000a95c: e3500000 cmp r0, #0 a000a960: 1a000003 bne a000a974 p = memfile_alloc_block(); a000a964: ebffff97 bl a000a7c8 if ( !p ) a000a968: e3500000 cmp r0, #0 a000a96c: 0a00001a beq a000a9dc return 0; info->triply_indirect = p; a000a970: e5840060 str r0, [r4, #96] ; 0x60 } p1 = (block_p *) p[ triply ]; a000a974: e0804107 add r4, r0, r7, lsl #2 a000a978: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) { a000a97c: e3500000 cmp r0, #0 a000a980: 1a000003 bne a000a994 p1 = memfile_alloc_block(); a000a984: ebffff8f bl a000a7c8 if ( !p1 ) a000a988: e3500000 cmp r0, #0 a000a98c: 0a000012 beq a000a9dc return 0; p[ triply ] = (block_p) p1; a000a990: e5840000 str r0, [r4] } p2 = (block_p *)p1[ doubly ]; a000a994: e0804105 add r4, r0, r5, lsl #2 a000a998: e7900105 ldr r0, [r0, r5, lsl #2] if ( !p2 ) { a000a99c: e3500000 cmp r0, #0 a000a9a0: 1a00000a bne a000a9d0 p2 = memfile_alloc_block(); a000a9a4: ebffff87 bl a000a7c8 if ( !p2 ) a000a9a8: e3500000 cmp r0, #0 return 0; p1[ doubly ] = (block_p) p2; a000a9ac: 15840000 strne r0, [r4] } p2 = (block_p *)p1[ doubly ]; if ( !p2 ) { p2 = memfile_alloc_block(); if ( !p2 ) a000a9b0: 1a000006 bne a000a9d0 a000a9b4: ea000008 b a000a9dc <== NOT EXECUTED p1[ doubly ] = (block_p) p2; } return (block_p *)&p2[ singly ]; } if ( !p ) a000a9b8: e3500000 cmp r0, #0 a000a9bc: 0a000006 beq a000a9dc #if 0 fprintf(stdout, "(t %d %d %d %d %d) ", block, my_block, triply, doubly, singly ); fflush(stdout); #endif p1 = (block_p *) p[ triply ]; a000a9c0: e7900107 ldr r0, [r0, r7, lsl #2] if ( !p1 ) a000a9c4: e3500000 cmp r0, #0 a000a9c8: 0a000003 beq a000a9dc p2 = (block_p *)p1[ doubly ]; if ( !p ) return 0; return (block_p *)&p2[ singly ]; a000a9cc: e7900105 ldr r0, [r0, r5, lsl #2] a000a9d0: e080010a add r0, r0, sl, lsl #2 a000a9d4: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} /* * This means the requested block number is out of range. */ return 0; a000a9d8: e3a00000 mov r0, #0 <== NOT EXECUTED } a000a9dc: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000a9e4 : IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a000a9e4: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Error checks on arguments */ if ( !dest ) a000a9e8: e2537000 subs r7, r3, #0 IMFS_jnode_t *the_jnode, off_t start, unsigned char *destination, unsigned int length ) { a000a9ec: e1a04000 mov r4, r0 a000a9f0: e1a08001 mov r8, r1 a000a9f4: e1a09002 mov r9, r2 a000a9f8: e59d6034 ldr r6, [sp, #52] ; 0x34 /* * Error checks on arguments */ if ( !dest ) a000a9fc: 0a000001 beq a000aa08 /* * If there is nothing to read, then quick exit. */ my_length = length; if ( !my_length ) a000aa00: e3560000 cmp r6, #0 a000aa04: 1a000004 bne a000aa1c rtems_set_errno_and_return_minus_one( EINVAL ); a000aa08: eb0004b9 bl a000bcf4 <__errno> <== NOT EXECUTED a000aa0c: e3a03016 mov r3, #22 <== NOT EXECUTED a000aa10: e5803000 str r3, [r0] <== NOT EXECUTED a000aa14: e3e06000 mvn r6, #0 <== NOT EXECUTED a000aa18: ea00006b b a000abcc <== NOT EXECUTED /* * Linear files (as created from a tar file are easier to handle * than block files). */ if (the_jnode->type == IMFS_LINEAR_FILE) { a000aa1c: e590304c ldr r3, [r0, #76] ; 0x4c a000aa20: e3530006 cmp r3, #6 a000aa24: 1a000012 bne a000aa74 unsigned char *file_ptr; file_ptr = (unsigned char *)the_jnode->info.linearfile.direct; if (my_length > (the_jnode->info.linearfile.size - start)) a000aa28: e280b050 add fp, r0, #80 ; 0x50 a000aa2c: e89b0c00 ldm fp, {sl, fp} a000aa30: e1a0200a mov r2, sl a000aa34: 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; a000aa38: e5901058 ldr r1, [r0, #88] ; 0x58 if (my_length > (the_jnode->info.linearfile.size - start)) a000aa3c: e0522008 subs r2, r2, r8 a000aa40: e0c33009 sbc r3, r3, r9 a000aa44: e3a00000 mov r0, #0 a000aa48: e1500003 cmp r0, r3 a000aa4c: ca000002 bgt a000aa5c a000aa50: 1a000002 bne a000aa60 a000aa54: e1560002 cmp r6, r2 a000aa58: 9a000000 bls a000aa60 my_length = the_jnode->info.linearfile.size - start; a000aa5c: e068600a rsb r6, r8, sl memcpy(dest, &file_ptr[start], my_length); a000aa60: e1a00007 mov r0, r7 a000aa64: e0811008 add r1, r1, r8 a000aa68: e1a02006 mov r2, r6 a000aa6c: eb0006ce bl a000c5ac a000aa70: ea000050 b a000abb8 /* * 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; a000aa74: e1a03001 mov r3, r1 if ( last_byte > the_jnode->info.file.size ) a000aa78: e5901054 ldr r1, [r0, #84] ; 0x54 a000aa7c: e5905050 ldr r5, [r0, #80] ; 0x50 a000aa80: e3a00000 mov r0, #0 a000aa84: 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; a000aa88: e0862008 add r2, r6, r8 if ( last_byte > the_jnode->info.file.size ) a000aa8c: ca000002 bgt a000aa9c a000aa90: 1a000003 bne a000aaa4 a000aa94: e1520005 cmp r2, r5 a000aa98: 9a000001 bls a000aaa4 my_length = the_jnode->info.file.size - start; a000aa9c: e0635005 rsb r5, r3, r5 a000aaa0: ea000000 b a000aaa8 * 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 ) a000aaa4: e1a05006 mov r5, r6 /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000aaa8: e59f3128 ldr r3, [pc, #296] ; a000abd8 a000aaac: e1a00008 mov r0, r8 a000aab0: e1a01009 mov r1, r9 a000aab4: e593b000 ldr fp, [r3] a000aab8: e1a0200b mov r2, fp a000aabc: e1a03fc2 asr r3, r2, #31 a000aac0: e88d000c stm sp, {r2, r3} a000aac4: eb00143f bl a000fbc8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000aac8: e89d000c ldm sp, {r2, r3} /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000aacc: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000aad0: e1a01009 mov r1, r9 a000aad4: e1a00008 mov r0, r8 a000aad8: eb001300 bl a000f6e0 <__divdi3> if ( start_offset ) { a000aadc: 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; a000aae0: e1a08000 mov r8, r0 if ( start_offset ) { a000aae4: 0a000012 beq a000ab34 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 ); a000aae8: e1a00004 mov r0, r4 a000aaec: e1a01008 mov r1, r8 a000aaf0: e3a02000 mov r2, #0 a000aaf4: ebffff40 bl a000a7fc if ( !block_ptr ) a000aaf8: e3500000 cmp r0, #0 return copied; a000aafc: 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 ) a000ab00: 0a000031 beq a000abcc return copied; memcpy( dest, &(*block_ptr)[ start_offset ], to_copy ); a000ab04: 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; a000ab08: e066a00b rsb sl, r6, fp a000ab0c: e155000a cmp r5, sl a000ab10: 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 ); a000ab14: e1a00007 mov r0, r7 a000ab18: e0811006 add r1, r1, r6 a000ab1c: e1a0200a mov r2, sl a000ab20: eb0006a1 bl a000c5ac dest += to_copy; a000ab24: e087700a add r7, r7, sl block++; a000ab28: e2888001 add r8, r8, #1 my_length -= to_copy; a000ab2c: e06a5005 rsb r5, sl, r5 copied += to_copy; a000ab30: e1a0600a mov r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; a000ab34: e59f909c ldr r9, [pc, #156] ; a000abd8 a000ab38: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a000ab3c: ea00000d b a000ab78 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000ab40: e1a00004 mov r0, r4 a000ab44: e1a01008 mov r1, r8 a000ab48: e3a02000 mov r2, #0 a000ab4c: ebffff2a bl a000a7fc if ( !block_ptr ) a000ab50: e2503000 subs r3, r0, #0 a000ab54: 0a00001c beq a000abcc return copied; memcpy( dest, &(*block_ptr)[ 0 ], to_copy ); a000ab58: e1a00007 mov r0, r7 a000ab5c: e5931000 ldr r1, [r3] a000ab60: e1a0200a mov r2, sl a000ab64: eb000690 bl a000c5ac dest += to_copy; a000ab68: e087700a add r7, r7, sl block++; a000ab6c: e2888001 add r8, r8, #1 my_length -= to_copy; a000ab70: e06a5005 rsb r5, sl, r5 copied += to_copy; a000ab74: 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 ) { a000ab78: e5993000 ldr r3, [r9] a000ab7c: e1550003 cmp r5, r3 a000ab80: 2affffee bcs a000ab40 #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif if ( my_length ) { a000ab84: e3550000 cmp r5, #0 a000ab88: 0a00000a beq a000abb8 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000ab8c: e1a00004 mov r0, r4 a000ab90: e1a01008 mov r1, r8 a000ab94: e3a02000 mov r2, #0 a000ab98: ebffff17 bl a000a7fc if ( !block_ptr ) a000ab9c: e2503000 subs r3, r0, #0 a000aba0: 0a000009 beq a000abcc return copied; memcpy( dest, &(*block_ptr)[ 0 ], my_length ); a000aba4: e1a00007 mov r0, r7 a000aba8: e5931000 ldr r1, [r3] a000abac: e1a02005 mov r2, r5 a000abb0: eb00067d bl a000c5ac copied += my_length; a000abb4: e0856006 add r6, r5, r6 } IMFS_update_atime( the_jnode ); a000abb8: e28d0008 add r0, sp, #8 a000abbc: e3a01000 mov r1, #0 a000abc0: ebffdc70 bl a0001d88 a000abc4: e59d3008 ldr r3, [sp, #8] a000abc8: e5843040 str r3, [r4, #64] ; 0x40 return copied; } a000abcc: e1a00006 mov r0, r6 a000abd0: e28dd010 add sp, sp, #16 a000abd4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000acbc : */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a000acbc: 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; a000acc0: e59f3108 ldr r3, [pc, #264] ; a000add0 */ int IMFS_memfile_remove( IMFS_jnode_t *the_jnode ) { a000acc4: 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; a000acc8: e5935000 ldr r5, [r3] * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a000accc: e5903058 ldr r3, [r0, #88] ; 0x58 /* * Eventually this could be set smarter at each call to * memfile_free_blocks_in_table to greatly speed this up. */ to_free = IMFS_MEMFILE_BLOCK_SLOTS; a000acd0: e1a05125 lsr r5, r5, #2 * + triply indirect */ info = &the_jnode->info.file; if ( info->indirect ) { a000acd4: e3530000 cmp r3, #0 a000acd8: 0a000002 beq a000ace8 memfile_free_blocks_in_table( &info->indirect, to_free ); a000acdc: e2800058 add r0, r0, #88 ; 0x58 a000ace0: e1a01005 mov r1, r5 a000ace4: ebffffdf bl a000ac68 } if ( info->doubly_indirect ) { a000ace8: e594305c ldr r3, [r4, #92] ; 0x5c a000acec: e3530000 cmp r3, #0 a000acf0: 13a06000 movne r6, #0 for ( i=0 ; i if ( info->indirect ) { memfile_free_blocks_in_table( &info->indirect, to_free ); } if ( info->doubly_indirect ) { a000acf8: 1a000009 bne a000ad24 a000acfc: ea00000e b a000ad3c for ( i=0 ; idoubly_indirect[i] ) { a000ad00: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED a000ad04: e1a00106 lsl r0, r6, #2 <== NOT EXECUTED a000ad08: e7932106 ldr r2, [r3, r6, lsl #2] <== NOT EXECUTED a000ad0c: e3520000 cmp r2, #0 <== NOT EXECUTED a000ad10: 0a000002 beq a000ad20 <== NOT EXECUTED memfile_free_blocks_in_table( a000ad14: e0830000 add r0, r3, r0 <== NOT EXECUTED a000ad18: e1a01005 mov r1, r5 <== NOT EXECUTED a000ad1c: ebffffd1 bl a000ac68 <== 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 ); a000ad30: e284005c add r0, r4, #92 ; 0x5c <== NOT EXECUTED a000ad34: e1a01005 mov r1, r5 <== NOT EXECUTED a000ad38: ebffffca bl a000ac68 <== NOT EXECUTED } if ( info->triply_indirect ) { a000ad3c: e5943060 ldr r3, [r4, #96] ; 0x60 a000ad40: e3530000 cmp r3, #0 a000ad44: 13a06000 movne r6, #0 for ( i=0 ; i } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { a000ad4c: 1a000017 bne a000adb0 a000ad50: ea00001c b a000adc8 for ( i=0 ; itriply_indirect[i]; a000ad54: e5943060 ldr r3, [r4, #96] ; 0x60 <== NOT EXECUTED } memfile_free_blocks_in_table( &info->doubly_indirect, to_free ); } if ( info->triply_indirect ) { a000ad58: e1a09106 lsl r9, r6, #2 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; a000ad5c: e7938106 ldr r8, [r3, r6, lsl #2] <== NOT EXECUTED if ( !p ) /* ensure we have a valid pointer */ a000ad60: e3580000 cmp r8, #0 <== NOT EXECUTED a000ad64: 0a000014 beq a000adbc <== NOT EXECUTED * * Regardless until the IMFS implementation is proven, it * is better to stick to simple, easy to understand algorithms. */ int IMFS_memfile_remove( a000ad68: e2488004 sub r8, r8, #4 <== NOT EXECUTED a000ad6c: e3a07000 mov r7, #0 <== NOT EXECUTED a000ad70: ea000006 b a000ad90 <== NOT EXECUTED for ( i=0 ; itriply_indirect[i]; if ( !p ) /* ensure we have a valid pointer */ break; for ( j=0 ; j <== NOT EXECUTED memfile_free_blocks_in_table( (block_p **)&p[j], to_free); a000ad80: e1a00008 mov r0, r8 <== NOT EXECUTED a000ad84: e1a01005 mov r1, r5 <== NOT EXECUTED a000ad88: ebffffb6 bl a000ac68 <== 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( a000ad9c: e5940060 ldr r0, [r4, #96] ; 0x60 <== NOT EXECUTED a000ada0: e1a01005 mov r1, r5 <== 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( &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( a000adbc: e2840060 add r0, r4, #96 ; 0x60 <== NOT EXECUTED a000adc0: e1a01005 mov r1, r5 <== NOT EXECUTED a000adc4: ebffffa7 bl a000ac68 <== NOT EXECUTED (block_p **)&info->triply_indirect, to_free ); } return 0; } a000adc8: e3a00000 mov r0, #0 a000adcc: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a000add4 : MEMFILE_STATIC int IMFS_memfile_remove_block( IMFS_jnode_t *the_jnode, unsigned int block ) { a000add4: 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 ); a000add8: e3a02000 mov r2, #0 <== NOT EXECUTED a000addc: ebfffe86 bl a000a7fc <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { a000ade0: e2503000 subs r3, r0, #0 <== NOT EXECUTED a000ade4: 0a000003 beq a000adf8 <== NOT EXECUTED ptr = *block_ptr; *block_ptr = 0; a000ade8: e3a02000 mov r2, #0 <== NOT EXECUTED #if defined(RTEMS_DEBUG) assert( block_ptr ); #endif if ( block_ptr ) { ptr = *block_ptr; a000adec: e5930000 ldr r0, [r3] <== NOT EXECUTED *block_ptr = 0; a000adf0: e5832000 str r2, [r3] <== NOT EXECUTED memfile_free_block( ptr ); a000adf4: ebffff93 bl a000ac48 <== NOT EXECUTED } return 1; } a000adf8: e3a00001 mov r0, #1 <== NOT EXECUTED a000adfc: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a000af1c : IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000af1c: e92d4ff7 push {r0, r1, r2, r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Error check arguments */ if ( !source ) a000af20: e2538000 subs r8, r3, #0 IMFS_jnode_t *the_jnode, off_t start, const unsigned char *source, unsigned int length ) { a000af24: e1a04000 mov r4, r0 a000af28: e1a07001 mov r7, r1 a000af2c: e1a0a002 mov sl, r2 a000af30: e59d5030 ldr r5, [sp, #48] ; 0x30 /* * Error check arguments */ if ( !source ) a000af34: 0a000001 beq a000af40 /* * If there is nothing to write, then quick exit. */ my_length = length; if ( !my_length ) a000af38: e3550000 cmp r5, #0 a000af3c: 1a000002 bne a000af4c rtems_set_errno_and_return_minus_one( EINVAL ); a000af40: eb00036b bl a000bcf4 <__errno> <== NOT EXECUTED a000af44: e3a03016 mov r3, #22 <== NOT EXECUTED a000af48: ea00000e b a000af88 <== 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 ) { a000af4c: e5903054 ldr r3, [r0, #84] ; 0x54 /* * If the last byte we are supposed to write is past the end of this * in memory file, then extend the length. */ last_byte = start + length; a000af50: e0851001 add r1, r5, r1 if ( last_byte > the_jnode->info.file.size ) { a000af54: e3530000 cmp r3, #0 a000af58: ba000003 blt a000af6c a000af5c: 1a00000c bne a000af94 a000af60: e5903050 ldr r3, [r0, #80] ; 0x50 a000af64: e1530001 cmp r3, r1 a000af68: 2a000009 bcs a000af94 status = IMFS_memfile_extend( the_jnode, last_byte ); a000af6c: e1a00004 mov r0, r4 a000af70: e3a02000 mov r2, #0 a000af74: ebffffa1 bl a000ae00 if ( status ) a000af78: e3500000 cmp r0, #0 a000af7c: 0a000004 beq a000af94 rtems_set_errno_and_return_minus_one( ENOSPC ); a000af80: eb00035b bl a000bcf4 <__errno> a000af84: e3a0301c mov r3, #28 a000af88: e5803000 str r3, [r0] a000af8c: e3e06000 mvn r6, #0 a000af90: ea00004d b a000b0cc /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000af94: e59f3138 ldr r3, [pc, #312] ; a000b0d4 a000af98: e1a00007 mov r0, r7 a000af9c: e1a0100a mov r1, sl a000afa0: e5939000 ldr r9, [r3] a000afa4: e1a0b009 mov fp, r9 a000afa8: e1a0cfcb asr ip, fp, #31 a000afac: e1a0300c mov r3, ip a000afb0: e1a0200b mov r2, fp a000afb4: e58dc000 str ip, [sp] a000afb8: eb001302 bl a000fbc8 <__moddi3> block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000afbc: e59dc000 ldr ip, [sp] /* * Phase 1: possibly the last part of one block */ start_offset = start % IMFS_MEMFILE_BYTES_PER_BLOCK; a000afc0: e1a06000 mov r6, r0 block = start / IMFS_MEMFILE_BYTES_PER_BLOCK; a000afc4: e1a0100a mov r1, sl a000afc8: e1a00007 mov r0, r7 a000afcc: e1a0200b mov r2, fp a000afd0: e1a0300c mov r3, ip a000afd4: eb0011c1 bl a000f6e0 <__divdi3> if ( start_offset ) { a000afd8: 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; a000afdc: e1a07000 mov r7, r0 if ( start_offset ) { a000afe0: 0a000012 beq a000b030 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 ); a000afe4: e1a00004 mov r0, r4 a000afe8: e1a01007 mov r1, r7 a000afec: e3a02000 mov r2, #0 a000aff0: ebfffe01 bl a000a7fc if ( !block_ptr ) a000aff4: e3500000 cmp r0, #0 return copied; a000aff8: 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 ) a000affc: 0a000032 beq a000b0cc block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a000b000: 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; a000b004: e066a009 rsb sl, r6, r9 a000b008: e15a0005 cmp sl, r5 a000b00c: 21a0a005 movcs sl, r5 block, to_copy, src ); #endif memcpy( &(*block_ptr)[ start_offset ], src, to_copy ); a000b010: e0800006 add r0, r0, r6 a000b014: e1a01008 mov r1, r8 a000b018: e1a0200a mov r2, sl a000b01c: eb000562 bl a000c5ac src += to_copy; a000b020: e088800a add r8, r8, sl block++; a000b024: e2877001 add r7, r7, #1 my_length -= to_copy; a000b028: e06a5005 rsb r5, sl, r5 copied += to_copy; a000b02c: e1a0600a mov r6, sl /* * Phase 2: all of zero of more blocks */ to_copy = IMFS_MEMFILE_BYTES_PER_BLOCK; a000b030: e59f909c ldr r9, [pc, #156] ; a000b0d4 a000b034: e599a000 ldr sl, [r9] while ( my_length >= IMFS_MEMFILE_BYTES_PER_BLOCK ) { a000b038: ea00000d b a000b074 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000b03c: e1a00004 mov r0, r4 a000b040: e1a01007 mov r1, r7 a000b044: e3a02000 mov r2, #0 a000b048: ebfffdeb bl a000a7fc if ( !block_ptr ) a000b04c: e3500000 cmp r0, #0 a000b050: 0a00001d beq a000b0cc 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 ); a000b054: e1a01008 mov r1, r8 a000b058: e5900000 ldr r0, [r0] a000b05c: e1a0200a mov r2, sl a000b060: eb000551 bl a000c5ac src += to_copy; a000b064: e088800a add r8, r8, sl block++; a000b068: e2877001 add r7, r7, #1 my_length -= to_copy; a000b06c: 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( a000b070: 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 ) { a000b074: e5993000 ldr r3, [r9] a000b078: e1550003 cmp r5, r3 a000b07c: 2affffee bcs a000b03c #if defined(RTEMS_DEBUG) assert( my_length < IMFS_MEMFILE_BYTES_PER_BLOCK ); #endif to_copy = my_length; if ( my_length ) { a000b080: e3550000 cmp r5, #0 a000b084: 0a00000a beq a000b0b4 block_ptr = IMFS_memfile_get_block_pointer( the_jnode, block, 0 ); a000b088: e1a00004 mov r0, r4 a000b08c: e1a01007 mov r1, r7 a000b090: e3a02000 mov r2, #0 a000b094: ebfffdd8 bl a000a7fc if ( !block_ptr ) a000b098: e3500000 cmp r0, #0 a000b09c: 0a00000a beq a000b0cc 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 ); a000b0a0: e5900000 ldr r0, [r0] a000b0a4: e1a01008 mov r1, r8 a000b0a8: e1a02005 mov r2, r5 a000b0ac: eb00053e bl a000c5ac my_length = 0; copied += to_copy; a000b0b0: e0866005 add r6, r6, r5 } IMFS_mtime_ctime_update( the_jnode ); a000b0b4: e28d0004 add r0, sp, #4 a000b0b8: e3a01000 mov r1, #0 a000b0bc: ebffdb31 bl a0001d88 a000b0c0: e59d3004 ldr r3, [sp, #4] a000b0c4: e5843044 str r3, [r4, #68] ; 0x44 a000b0c8: e5843048 str r3, [r4, #72] ; 0x48 return copied; } a000b0cc: e1a00006 mov r0, r6 a000b0d0: e8bd8ffe pop {r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000155c : const char *token, /* IN */ mode_t mode, /* IN */ dev_t dev, /* IN */ rtems_filesystem_location_info_t *pathloc /* IN/OUT */ ) { a000155c: e92d40f0 push {r4, r5, r6, r7, lr} a0001560: e24dd040 sub sp, sp, #64 ; 0x40 a0001564: e1a04001 mov r4, r1 a0001568: e1a07000 mov r7, r0 a000156c: e1a06002 mov r6, r2 a0001570: 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 ); a0001574: eb002dce bl a000ccb4 a0001578: e28d303c add r3, sp, #60 ; 0x3c a000157c: e1a01000 mov r1, r0 a0001580: e28d2004 add r2, sp, #4 a0001584: e1a00007 mov r0, r7 a0001588: eb001eb2 bl a0009058 /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) a000158c: e2043a0f and r3, r4, #61440 ; 0xf000 a0001590: e3530901 cmp r3, #16384 ; 0x4000 a0001594: 0a00000d beq a00015d0 type = IMFS_DIRECTORY; else if ( S_ISREG(mode) ) a0001598: e3530902 cmp r3, #32768 ; 0x8000 a000159c: 0a00000d beq a00015d8 type = IMFS_MEMORY_FILE; else if ( S_ISBLK(mode) || S_ISCHR(mode) ) { a00015a0: e3530a06 cmp r3, #24576 ; 0x6000 a00015a4: 13530a02 cmpne r3, #8192 ; 0x2000 type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); a00015a8: 058d6028 streq r6, [sp, #40] ; 0x28 a00015ac: 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; a00015b0: 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) ) { a00015b4: 0a000008 beq a00015dc type = IMFS_DEVICE; rtems_filesystem_split_dev_t( dev, info.device.major, info.device.minor ); } else if (S_ISFIFO(mode)) a00015b8: e3530a01 cmp r3, #4096 ; 0x1000 type = IMFS_FIFO; a00015bc: 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)) a00015c0: 0a000005 beq a00015dc type = IMFS_FIFO; else { rtems_set_errno_and_return_minus_one( EINVAL ); a00015c4: eb0029ca bl a000bcf4 <__errno> <== NOT EXECUTED a00015c8: e3a03016 mov r3, #22 <== NOT EXECUTED a00015cc: ea00000d b a0001608 <== NOT EXECUTED /* * Figure out what type of IMFS node this is. */ if ( S_ISDIR(mode) ) type = IMFS_DIRECTORY; a00015d0: e3a01001 mov r1, #1 a00015d4: ea000000 b a00015dc else if ( S_ISREG(mode) ) type = IMFS_MEMORY_FILE; a00015d8: e3a01005 mov r1, #5 new_node = IMFS_create_node( pathloc, type, new_name, mode, &info a00015dc: 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( a00015e0: e58d3000 str r3, [sp] a00015e4: e59d0054 ldr r0, [sp, #84] ; 0x54 a00015e8: e28d2004 add r2, sp, #4 a00015ec: e1a03004 mov r3, r4 a00015f0: eb001c14 bl a0008648 new_name, mode, &info ); if ( !new_node ) a00015f4: e3500000 cmp r0, #0 rtems_set_errno_and_return_minus_one( ENOMEM ); return 0; a00015f8: 13a00000 movne r0, #0 new_name, mode, &info ); if ( !new_node ) a00015fc: 1a000003 bne a0001610 rtems_set_errno_and_return_minus_one( ENOMEM ); a0001600: eb0029bb bl a000bcf4 <__errno> a0001604: e3a0300c mov r3, #12 a0001608: e5803000 str r3, [r0] a000160c: e3e00000 mvn r0, #0 return 0; } a0001610: e28dd040 add sp, sp, #64 ; 0x40 a0001614: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0001618 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0001618: e5903008 ldr r3, [r0, #8] #include int IMFS_mount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a000161c: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a0001620: e593204c ldr r2, [r3, #76] ; 0x4c a0001624: e3520001 cmp r2, #1 a0001628: 0a000004 beq a0001640 rtems_set_errno_and_return_minus_one( ENOTDIR ); a000162c: eb0029b0 bl a000bcf4 <__errno> <== NOT EXECUTED a0001630: e3a03014 mov r3, #20 <== NOT EXECUTED a0001634: e5803000 str r3, [r0] <== NOT EXECUTED a0001638: e3e00000 mvn r0, #0 <== NOT EXECUTED a000163c: 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; a0001640: e583005c str r0, [r3, #92] ; 0x5c return 0; a0001644: e3a00000 mov r0, #0 } a0001648: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0003718 : */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a0003718: e92d4030 push {r4, r5, lr} #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); a000371c: e59f50e0 ldr r5, [pc, #224] ; a0003804 */ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { a0003720: e1a04000 mov r4, r0 #if defined(RTEMS_DEBUG) assert( the_jnode ); #endif fprintf(stdout, "%s", the_jnode->name ); a0003724: e280000c add r0, r0, #12 a0003728: e5953000 ldr r3, [r5] a000372c: e5931008 ldr r1, [r3, #8] a0003730: eb0030bb bl a000fa24 switch( the_jnode->type ) { a0003734: e594204c ldr r2, [r4, #76] ; 0x4c a0003738: e2423001 sub r3, r2, #1 a000373c: e3530006 cmp r3, #6 a0003740: 979ff103 ldrls pc, [pc, r3, lsl #2] a0003744: ea000026 b a00037e4 <== NOT EXECUTED a0003748: a0003764 .word 0xa0003764 <== NOT EXECUTED a000374c: a0003778 .word 0xa0003778 <== NOT EXECUTED a0003750: a00037c4 .word 0xa00037c4 <== NOT EXECUTED a0003754: a00037c4 .word 0xa00037c4 <== NOT EXECUTED a0003758: a00037ac .word 0xa00037ac <== NOT EXECUTED a000375c: a0003790 .word 0xa0003790 <== NOT EXECUTED a0003760: a00037d0 .word 0xa00037d0 <== NOT EXECUTED case IMFS_DIRECTORY: fprintf(stdout, "/" ); a0003764: e5953000 ldr r3, [r5] a0003768: e3a0002f mov r0, #47 ; 0x2f a000376c: e5931008 ldr r1, [r3, #8] a0003770: eb003076 bl a000f950 break; a0003774: ea00001f b a00037f8 case IMFS_DEVICE: fprintf(stdout, " (device %" PRId32 ", %" PRId32 ")", a0003778: e5953000 ldr r3, [r5] a000377c: e59f1084 ldr r1, [pc, #132] ; a0003808 a0003780: e5942050 ldr r2, [r4, #80] ; 0x50 a0003784: e5930008 ldr r0, [r3, #8] a0003788: e5943054 ldr r3, [r4, #84] ; 0x54 a000378c: ea000004 b a00037a4 the_jnode->info.device.major, the_jnode->info.device.minor ); break; case IMFS_LINEAR_FILE: fprintf(stdout, " (file %" PRId32 " %p)", a0003790: e5953000 ldr r3, [r5] <== NOT EXECUTED a0003794: e59f1070 ldr r1, [pc, #112] ; a000380c <== NOT EXECUTED a0003798: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED a000379c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED a00037a0: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED a00037a4: eb003049 bl a000f8d0 (uint32_t)the_jnode->info.linearfile.size, the_jnode->info.linearfile.direct ); break; a00037a8: ea000012 b a00037f8 the_jnode->info.file.indirect, the_jnode->info.file.doubly_indirect, the_jnode->info.file.triply_indirect ); #else fprintf(stdout, " (file %" PRId32 ")", a00037ac: e5953000 ldr r3, [r5] <== NOT EXECUTED a00037b0: e59f1058 ldr r1, [pc, #88] ; a0003810 <== NOT EXECUTED a00037b4: e5942050 ldr r2, [r4, #80] ; 0x50 <== NOT EXECUTED a00037b8: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED a00037bc: eb003043 bl a000f8d0 <== NOT EXECUTED (uint32_t)the_jnode->info.file.size ); #endif break; a00037c0: ea00000c b a00037f8 <== NOT EXECUTED case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); a00037c4: e5953000 ldr r3, [r5] <== NOT EXECUTED a00037c8: e59f0044 ldr r0, [pc, #68] ; a0003814 <== NOT EXECUTED a00037cc: ea000001 b a00037d8 <== NOT EXECUTED return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); a00037d0: e5953000 ldr r3, [r5] <== NOT EXECUTED a00037d4: e59f003c ldr r0, [pc, #60] ; a0003818 <== NOT EXECUTED a00037d8: e5931008 ldr r1, [r3, #8] <== NOT EXECUTED default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); } a00037dc: 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" ); a00037e0: ea00308f b a000fa24 <== NOT EXECUTED return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); a00037e4: e5953000 ldr r3, [r5] <== NOT EXECUTED a00037e8: e59f102c ldr r1, [pc, #44] ; a000381c <== NOT EXECUTED a00037ec: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED return; } puts(""); } a00037f0: 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 ); a00037f4: ea003035 b a000f8d0 <== NOT EXECUTED return; } puts(""); a00037f8: e59f0020 ldr r0, [pc, #32] ; a0003820 } a00037fc: e8bd4030 pop {r4, r5, lr} default: fprintf(stdout, " bad type %d\n", the_jnode->type ); return; } puts(""); a0003800: ea00377b b a00115f4 =============================================================================== a0001658 : ) { IMFS_jnode_t *node; int i; node = loc->node_access; a0001658: e5903000 ldr r3, [r0] int IMFS_readlink( rtems_filesystem_location_info_t *loc, char *buf, /* OUT */ size_t bufsize ) { a000165c: e52de004 push {lr} ; (str lr, [sp, #-4]!) IMFS_jnode_t *node; int i; node = loc->node_access; if ( node->type != IMFS_SYM_LINK ) a0001660: e593004c ldr r0, [r3, #76] ; 0x4c a0001664: e3500004 cmp r0, #4 a0001668: 03a00000 moveq r0, #0 a000166c: 0a000006 beq a000168c rtems_set_errno_and_return_minus_one( EINVAL ); a0001670: eb00299f bl a000bcf4 <__errno> <== NOT EXECUTED a0001674: e3a03016 mov r3, #22 <== NOT EXECUTED a0001678: e5803000 str r3, [r0] <== NOT EXECUTED a000167c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001680: 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]; a0001684: 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++ ) a0001688: e2800001 add r0, r0, #1 a000168c: e1500002 cmp r0, r2 a0001690: 249df004 popcs {pc} ; (ldrcs pc, [sp], #4) a0001694: e593c050 ldr ip, [r3, #80] ; 0x50 a0001698: e7dcc000 ldrb ip, [ip, r0] a000169c: e35c0000 cmp ip, #0 a00016a0: 1afffff7 bne a0001684 buf[i] = node->info.sym_link.name[i]; return i; } a00016a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a00016a8 : 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 */ ) { a00016a8: 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; a00016ac: 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 */ ) { a00016b0: 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 ); a00016b4: e1a01003 mov r1, r3 <== NOT EXECUTED a00016b8: e284000c add r0, r4, #12 <== NOT EXECUTED a00016bc: e3a02020 mov r2, #32 <== NOT EXECUTED a00016c0: eb002d93 bl a000cd14 <== NOT EXECUTED if ( the_jnode->Parent != NULL ) a00016c4: e5943008 ldr r3, [r4, #8] <== NOT EXECUTED a00016c8: e3530000 cmp r3, #0 <== NOT EXECUTED a00016cc: 0a000001 beq a00016d8 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a00016d0: e1a00004 mov r0, r4 <== NOT EXECUTED a00016d4: eb001044 bl a00057ec <_Chain_Extract> <== NOT EXECUTED rtems_chain_extract( (rtems_chain_node *) the_jnode ); new_parent = new_parent_loc->node_access; a00016d8: 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 ); a00016dc: e1a01004 mov r1, r4 <== NOT EXECUTED the_jnode->Parent = new_parent; a00016e0: e5840008 str r0, [r4, #8] <== NOT EXECUTED a00016e4: e2800050 add r0, r0, #80 ; 0x50 <== NOT EXECUTED a00016e8: eb001034 bl a00057c0 <_Chain_Append> <== NOT EXECUTED rtems_chain_append( &new_parent->info.directory.Entries, &the_jnode->Node ); /* * Update the time. */ IMFS_update_ctime( the_jnode ); a00016ec: e1a0000d mov r0, sp <== NOT EXECUTED a00016f0: e3a01000 mov r1, #0 <== NOT EXECUTED a00016f4: eb0001a3 bl a0001d88 <== NOT EXECUTED a00016f8: e59d3000 ldr r3, [sp] <== NOT EXECUTED return 0; } a00016fc: 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 ); a0001700: e5843048 str r3, [r4, #72] ; 0x48 <== NOT EXECUTED return 0; } a0001704: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== a0009204 : { IMFS_fs_info_t *fs_info; IMFS_jnode_t *the_jnode; IMFS_device_t *io; the_jnode = loc->node_access; a0009204: e5903000 ldr r3, [r0] int IMFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a0009208: e92d4800 push {fp, lr} IMFS_device_t *io; the_jnode = loc->node_access; switch ( the_jnode->type ) { a000920c: e593204c ldr r2, [r3, #76] ; 0x4c a0009210: e2422002 sub r2, r2, #2 a0009214: e3520005 cmp r2, #5 a0009218: 979ff102 ldrls pc, [pc, r2, lsl #2] a000921c: ea000012 b a000926c <== NOT EXECUTED a0009220: a0009238 .word 0xa0009238 <== NOT EXECUTED a0009224: a000926c .word 0xa000926c <== NOT EXECUTED a0009228: a0009258 .word 0xa0009258 <== NOT EXECUTED a000922c: a000924c .word 0xa000924c <== NOT EXECUTED a0009230: a000924c .word 0xa000924c <== NOT EXECUTED a0009234: a0009258 .word 0xa0009258 <== NOT EXECUTED case IMFS_DEVICE: io = &the_jnode->info.device; buf->st_rdev = rtems_filesystem_make_dev_t( io->major, io->minor ); a0009238: e5932054 ldr r2, [r3, #84] ; 0x54 rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a000923c: e593c050 ldr ip, [r3, #80] ; 0x50 a0009240: e581201c str r2, [r1, #28] a0009244: e581c018 str ip, [r1, #24] break; a0009248: ea00000c b a0009280 case IMFS_LINEAR_FILE: case IMFS_MEMORY_FILE: buf->st_size = the_jnode->info.file.size; a000924c: e283c050 add ip, r3, #80 ; 0x50 a0009250: e89c1800 ldm ip, {fp, ip} a0009254: ea000001 b a0009260 case IMFS_SYM_LINK: buf->st_size = 0; break; case IMFS_FIFO: buf->st_size = 0; a0009258: e3a0b000 mov fp, #0 a000925c: e3a0c000 mov ip, #0 a0009260: e581b020 str fp, [r1, #32] a0009264: e581c024 str ip, [r1, #36] ; 0x24 break; a0009268: ea000004 b a0009280 default: rtems_set_errno_and_return_minus_one( ENOTSUP ); a000926c: eb000aa0 bl a000bcf4 <__errno> <== NOT EXECUTED a0009270: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a0009274: e5803000 str r3, [r0] <== NOT EXECUTED a0009278: e3e00000 mvn r0, #0 <== NOT EXECUTED a000927c: 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; a0009280: e5902010 ldr r2, [r0, #16] a0009284: e59f0054 ldr r0, [pc, #84] ; a00092e0 buf->st_dev = rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); a0009288: e5922034 ldr r2, [r2, #52] ; 0x34 a000928c: 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 = a0009290: e5810000 str r0, [r1] buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; buf->st_ctime = the_jnode->stat_ctime; return 0; a0009294: e3a00000 mov r0, #0 /* * 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 = a0009298: e5812004 str r2, [r1, #4] rtems_filesystem_make_dev_t( IMFS_DEVICE_MAJOR_NUMBER, fs_info->instance ); buf->st_mode = the_jnode->st_mode; a000929c: e5932030 ldr r2, [r3, #48] ; 0x30 a00092a0: e581200c str r2, [r1, #12] buf->st_nlink = the_jnode->st_nlink; a00092a4: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a00092a8: e1c121b0 strh r2, [r1, #16] buf->st_ino = the_jnode->st_ino; a00092ac: e5932038 ldr r2, [r3, #56] ; 0x38 a00092b0: e5812008 str r2, [r1, #8] buf->st_uid = the_jnode->st_uid; a00092b4: e1d323bc ldrh r2, [r3, #60] ; 0x3c a00092b8: e1c121b2 strh r2, [r1, #18] buf->st_gid = the_jnode->st_gid; a00092bc: e1d323be ldrh r2, [r3, #62] ; 0x3e a00092c0: e1c121b4 strh r2, [r1, #20] buf->st_atime = the_jnode->stat_atime; a00092c4: e5932040 ldr r2, [r3, #64] ; 0x40 a00092c8: e5812028 str r2, [r1, #40] ; 0x28 buf->st_mtime = the_jnode->stat_mtime; a00092cc: e5932044 ldr r2, [r3, #68] ; 0x44 buf->st_ctime = the_jnode->stat_ctime; a00092d0: e5933048 ldr r3, [r3, #72] ; 0x48 buf->st_ino = the_jnode->st_ino; buf->st_uid = the_jnode->st_uid; buf->st_gid = the_jnode->st_gid; buf->st_atime = the_jnode->stat_atime; buf->st_mtime = the_jnode->stat_mtime; a00092d4: e5812030 str r2, [r1, #48] ; 0x30 buf->st_ctime = the_jnode->stat_ctime; a00092d8: e5813038 str r3, [r1, #56] ; 0x38 return 0; } a00092dc: e8bd8800 pop {fp, pc} =============================================================================== a0001708 : int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { a0001708: e92d40f0 push {r4, r5, r6, r7, lr} a000170c: e1a05000 mov r5, r0 a0001710: 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 ); a0001714: e1a00002 mov r0, r2 int IMFS_symlink( rtems_filesystem_location_info_t *parent_loc, const char *link_name, const char *node_name ) { a0001718: e1a06001 mov r6, r1 a000171c: 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 ); a0001720: eb002d63 bl a000ccb4 a0001724: e28d4004 add r4, sp, #4 a0001728: e1a01000 mov r1, r0 a000172c: e1a02004 mov r2, r4 a0001730: e28d303c add r3, sp, #60 ; 0x3c a0001734: e1a00007 mov r0, r7 a0001738: eb001e46 bl a0009058 /* * Duplicate link name */ info.sym_link.name = strdup(link_name); a000173c: e1a00006 mov r0, r6 a0001740: eb002d47 bl a000cc64 if (info.sym_link.name == NULL) { a0001744: 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); a0001748: e58d0028 str r0, [sp, #40] ; 0x28 if (info.sym_link.name == NULL) { a000174c: 0a00000b beq a0001780 new_node = IMFS_create_node( parent_loc, IMFS_SYM_LINK, new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info a0001750: 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( a0001754: e58d3000 str r3, [sp] a0001758: e1a00005 mov r0, r5 a000175c: e3a01004 mov r1, #4 a0001760: e1a02004 mov r2, r4 a0001764: e59f302c ldr r3, [pc, #44] ; a0001798 a0001768: eb001bb6 bl a0008648 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a000176c: e3500000 cmp r0, #0 free(info.sym_link.name); rtems_set_errno_and_return_minus_one(ENOMEM); } return 0; a0001770: 13a00000 movne r0, #0 new_name, ( S_IFLNK | ( S_IRWXU | S_IRWXG | S_IRWXO )), &info ); if (new_node == NULL) { a0001774: 1a000005 bne a0001790 free(info.sym_link.name); a0001778: e59d0028 ldr r0, [sp, #40] ; 0x28 <== NOT EXECUTED a000177c: eb00014c bl a0001cb4 <== NOT EXECUTED rtems_set_errno_and_return_minus_one(ENOMEM); a0001780: eb00295b bl a000bcf4 <__errno> <== NOT EXECUTED a0001784: e3a0300c mov r3, #12 <== NOT EXECUTED a0001788: e5803000 str r3, [r0] <== NOT EXECUTED a000178c: e3e00000 mvn r0, #0 <== NOT EXECUTED } return 0; } a0001790: e28dd040 add sp, sp, #64 ; 0x40 a0001794: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000179c : int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a000179c: 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; a00017a0: e5915000 ldr r5, [r1] int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a00017a4: e24dd01c sub sp, sp, #28 a00017a8: e1a06000 mov r6, r0 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a00017ac: e595304c ldr r3, [r5, #76] ; 0x4c int IMFS_unlink( rtems_filesystem_location_info_t *parentloc, /* IN */ rtems_filesystem_location_info_t *loc /* IN */ ) { a00017b0: e1a04001 mov r4, r1 /* * If this is the last last pointer to the node * free the node. */ if ( node->type == IMFS_HARD_LINK ) { a00017b4: e3530003 cmp r3, #3 a00017b8: 1a000024 bne a0001850 if ( !node->info.hard_link.link_node ) a00017bc: e595e050 ldr lr, [r5, #80] ; 0x50 a00017c0: e35e0000 cmp lr, #0 a00017c4: 1a000003 bne a00017d8 rtems_set_errno_and_return_minus_one( EINVAL ); a00017c8: eb002949 bl a000bcf4 <__errno> <== NOT EXECUTED a00017cc: e3a03016 mov r3, #22 <== NOT EXECUTED a00017d0: e5803000 str r3, [r0] <== NOT EXECUTED a00017d4: ea000023 b a0001868 <== NOT EXECUTED the_link = *loc; a00017d8: e1a0c00d mov ip, sp a00017dc: e1a07001 mov r7, r1 a00017e0: e8b7000f ldm r7!, {r0, r1, r2, r3} a00017e4: e8ac000f stmia ip!, {r0, r1, r2, r3} a00017e8: e5973000 ldr r3, [r7] the_link.node_access = node->info.hard_link.link_node; a00017ec: e28d701c add r7, sp, #28 a00017f0: e527e01c str lr, [r7, #-28]! IMFS_Set_handlers( &the_link ); a00017f4: 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; a00017f8: e58c3000 str r3, [ip] the_link.node_access = node->info.hard_link.link_node; IMFS_Set_handlers( &the_link ); a00017fc: eb001bef bl a00087c0 /* * 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) a0001800: e5953050 ldr r3, [r5, #80] ; 0x50 a0001804: e1d323b4 ldrh r2, [r3, #52] ; 0x34 a0001808: e3520001 cmp r2, #1 a000180c: 1a000007 bne a0001830 { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); a0001810: e59d3008 ldr r3, [sp, #8] a0001814: e1a00006 mov r0, r6 a0001818: e1a0100d mov r1, sp a000181c: e5933034 ldr r3, [r3, #52] ; 0x34 a0001820: e12fff33 blx r3 if ( result != 0 ) a0001824: e3500000 cmp r0, #0 a0001828: 0a000008 beq a0001850 a000182c: ea00000d b a0001868 return -1; } else { node->info.hard_link.link_node->st_nlink --; a0001830: e2422001 sub r2, r2, #1 a0001834: e1c323b4 strh r2, [r3, #52] ; 0x34 IMFS_update_ctime( node->info.hard_link.link_node ); a0001838: e28d0014 add r0, sp, #20 a000183c: e3a01000 mov r1, #0 a0001840: eb000150 bl a0001d88 a0001844: e5953050 ldr r3, [r5, #80] ; 0x50 a0001848: e59d2014 ldr r2, [sp, #20] a000184c: e5832048 str r2, [r3, #72] ; 0x48 /* * Now actually free the node we were asked to free. */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); a0001850: e5943008 ldr r3, [r4, #8] a0001854: e1a00006 mov r0, r6 a0001858: e1a01004 mov r1, r4 a000185c: e5933034 ldr r3, [r3, #52] ; 0x34 a0001860: e12fff33 blx r3 return result; a0001864: ea000000 b a000186c if ( node->info.hard_link.link_node->st_nlink == 1) { result = (*the_link.handlers->rmnod_h)( parentloc, &the_link ); if ( result != 0 ) return -1; a0001868: e3e00000 mvn r0, #0 */ result = (*loc->handlers->rmnod_h)( parentloc, loc ); return result; } a000186c: e28dd01c add sp, sp, #28 a0001870: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0001874 : rtems_filesystem_mount_table_entry_t *mt_entry ) { IMFS_jnode_t *node; node = mt_entry->mt_point_node.node_access; a0001874: e5903008 ldr r3, [r0, #8] #include int IMFS_unmount( rtems_filesystem_mount_table_entry_t *mt_entry ) { a0001878: e52de004 push {lr} ; (str lr, [sp, #-4]!) /* * Is the node that we are mounting onto a directory node ? */ if ( node->type != IMFS_DIRECTORY ) a000187c: e593204c ldr r2, [r3, #76] ; 0x4c a0001880: e3520001 cmp r2, #1 a0001884: 0a000002 beq a0001894 rtems_set_errno_and_return_minus_one( ENOTDIR ); a0001888: eb002919 bl a000bcf4 <__errno> <== NOT EXECUTED a000188c: e3a03014 mov r3, #20 <== NOT EXECUTED a0001890: ea000004 b a00018a8 <== NOT EXECUTED /* * Did the node indicate that there was a directory mounted here? */ if ( node->info.directory.mt_fs == NULL ) a0001894: e593205c ldr r2, [r3, #92] ; 0x5c a0001898: e3520000 cmp r2, #0 a000189c: 1a000004 bne a00018b4 rtems_set_errno_and_return_minus_one( EINVAL ); /* XXX */ a00018a0: eb002913 bl a000bcf4 <__errno> <== NOT EXECUTED a00018a4: e3a03016 mov r3, #22 <== NOT EXECUTED a00018a8: e5803000 str r3, [r0] <== NOT EXECUTED a00018ac: e3e00000 mvn r0, #0 <== NOT EXECUTED a00018b0: 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; a00018b4: e3a00000 mov r0, #0 a00018b8: e583005c str r0, [r3, #92] ; 0x5c return 0; } a00018bc: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a000116c : Stack_check_Dope_stack(&Stack_check_Interrupt_stack); } #endif Stack_check_Initialized = 1; } a000116c: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0014c20 <_CORE_message_queue_Broadcast>: { Thread_Control *the_thread; uint32_t number_broadcasted; Thread_Wait_information *waitp; if ( size > the_message_queue->maximum_message_size ) { a0014c20: 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 ) { a0014c24: 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 ) { a0014c28: 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 ) { a0014c2c: e1a06000 mov r6, r0 a0014c30: e1a0a001 mov sl, r1 a0014c34: e1a07002 mov r7, r2 a0014c38: 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 ) { a0014c3c: 8a000013 bhi a0014c90 <_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 ) { a0014c40: e5905048 ldr r5, [r0, #72] ; 0x48 a0014c44: e3550000 cmp r5, #0 a0014c48: 0a000009 beq a0014c74 <_CORE_message_queue_Broadcast+0x54> *count = 0; a0014c4c: e3a00000 mov r0, #0 a0014c50: e5880000 str r0, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0014c54: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} const void *source, void *destination, size_t size ) { memcpy(destination, source, size); a0014c58: e594002c ldr r0, [r4, #44] ; 0x2c a0014c5c: e1a0100a mov r1, sl a0014c60: e1a02007 mov r2, r7 a0014c64: eb001ea8 bl a001c70c buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0014c68: e5943028 ldr r3, [r4, #40] ; 0x28 */ number_broadcasted = 0; while ((the_thread = _Thread_queue_Dequeue(&the_message_queue->Wait_queue))) { waitp = &the_thread->Wait; number_broadcasted += 1; a0014c6c: e2855001 add r5, r5, #1 buffer, waitp->return_argument_second.mutable_object, size ); *(size_t *) the_thread->Wait.return_argument = size; a0014c70: e5837000 str r7, [r3] /* * There must be no pending messages if there is a thread waiting to * receive a message. */ number_broadcasted = 0; while ((the_thread = a0014c74: e1a00006 mov r0, r6 a0014c78: eb0009b2 bl a0017348 <_Thread_queue_Dequeue> a0014c7c: e2504000 subs r4, r0, #0 a0014c80: 1afffff4 bne a0014c58 <_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; a0014c84: e5885000 str r5, [r8] return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; a0014c88: e1a00004 mov r0, r4 a0014c8c: 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; a0014c90: e3a00001 mov r0, #1 <== NOT EXECUTED #endif } *count = number_broadcasted; return CORE_MESSAGE_QUEUE_STATUS_SUCCESSFUL; } a0014c94: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} <== NOT EXECUTED =============================================================================== a000dc6c <_CORE_message_queue_Initialize>: CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc6c: e92d40f0 push {r4, r5, r6, r7, lr} /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { a000dc70: e3130003 tst r3, #3 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc74: e1a04000 mov r4, r0 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; a000dc78: e3a00000 mov r0, #0 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc7c: e1a06002 mov r6, r2 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; a000dc80: e5842044 str r2, [r4, #68] ; 0x44 CORE_message_queue_Control *the_message_queue, CORE_message_queue_Attributes *the_message_queue_attributes, uint32_t maximum_pending_messages, size_t maximum_message_size ) { a000dc84: e1a05001 mov r5, r1 size_t message_buffering_required; size_t allocated_message_size; the_message_queue->maximum_pending_messages = maximum_pending_messages; the_message_queue->number_of_pending_messages = 0; a000dc88: e5840048 str r0, [r4, #72] ; 0x48 the_message_queue->maximum_message_size = maximum_message_size; a000dc8c: e584304c str r3, [r4, #76] ; 0x4c /* * Round size up to multiple of a pointer for chain init and * check for overflow on adding overhead to each message. */ allocated_message_size = maximum_message_size; if (allocated_message_size & (sizeof(uint32_t) - 1)) { a000dc90: 01a02003 moveq r2, r3 a000dc94: 0a000003 beq a000dca8 <_CORE_message_queue_Initialize+0x3c> allocated_message_size += sizeof(uint32_t); a000dc98: e2832004 add r2, r3, #4 allocated_message_size &= ~(sizeof(uint32_t) - 1); a000dc9c: e3c22003 bic r2, r2, #3 } if (allocated_message_size < maximum_message_size) a000dca0: e1520003 cmp r2, r3 a000dca4: 3a00001e bcc a000dd24 <_CORE_message_queue_Initialize+0xb8> /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); a000dca8: e2827010 add r7, r2, #16 /* * Calculate how much total memory is required for message buffering and * check for overflow on the multiplication. */ message_buffering_required = (size_t) maximum_pending_messages * a000dcac: e0000796 mul r0, r6, r7 (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) a000dcb0: e1500002 cmp r0, r2 a000dcb4: 3a000018 bcc a000dd1c <_CORE_message_queue_Initialize+0xb0> /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a000dcb8: eb000acd bl a00107f4 <_Workspace_Allocate> if (the_message_queue->message_buffers == 0) a000dcbc: e3500000 cmp r0, #0 /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) _Workspace_Allocate( message_buffering_required ); a000dcc0: e1a01000 mov r1, r0 return false; /* * Attempt to allocate the message memory */ the_message_queue->message_buffers = (CORE_message_queue_Buffer *) a000dcc4: e584005c str r0, [r4, #92] ; 0x5c _Workspace_Allocate( message_buffering_required ); if (the_message_queue->message_buffers == 0) a000dcc8: 0a000015 beq a000dd24 <_CORE_message_queue_Initialize+0xb8> /* * Initialize the pool of inactive messages, pending messages, * and set of waiting threads. */ _Chain_Initialize ( a000dccc: e2840060 add r0, r4, #96 ; 0x60 a000dcd0: e1a02006 mov r2, r6 a000dcd4: e1a03007 mov r3, r7 a000dcd8: eb001229 bl a0012584 <_Chain_Initialize> */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a000dcdc: e2843054 add r3, r4, #84 ; 0x54 allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); _Thread_queue_Initialize( a000dce0: e5951000 ldr r1, [r5] */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a000dce4: e5843050 str r3, [r4, #80] ; 0x50 the_chain->permanent_null = NULL; a000dce8: e3a03000 mov r3, #0 a000dcec: e5843054 str r3, [r4, #84] ; 0x54 the_message_queue->message_buffers, (size_t) maximum_pending_messages, allocated_message_size + sizeof( CORE_message_queue_Buffer_control ) ); _Chain_Initialize_empty( &the_message_queue->Pending_messages ); a000dcf0: e2843050 add r3, r4, #80 ; 0x50 the_chain->last = _Chain_Head(the_chain); a000dcf4: e5843058 str r3, [r4, #88] ; 0x58 _Thread_queue_Initialize( a000dcf8: e1a00004 mov r0, r4 a000dcfc: e3510001 cmp r1, #1 a000dd00: 13a01000 movne r1, #0 a000dd04: 03a01001 moveq r1, #1 a000dd08: e3a02080 mov r2, #128 ; 0x80 a000dd0c: e3a03006 mov r3, #6 a000dd10: eb0007e3 bl a000fca4 <_Thread_queue_Initialize> THREAD_QUEUE_DISCIPLINE_PRIORITY : THREAD_QUEUE_DISCIPLINE_FIFO, STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; a000dd14: e3a00001 mov r0, #1 a000dd18: e8bd80f0 pop {r4, r5, r6, r7, pc} */ message_buffering_required = (size_t) maximum_pending_messages * (allocated_message_size + sizeof(CORE_message_queue_Buffer_control)); if (message_buffering_required < allocated_message_size) return false; a000dd1c: e3a00000 mov r0, #0 <== NOT EXECUTED a000dd20: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED STATES_WAITING_FOR_MESSAGE, CORE_MESSAGE_QUEUE_STATUS_TIMEOUT ); return true; } a000dd24: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0009e98 <_CORE_mutex_Seize_interrupt_trylock>: { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a0009e98: e59f212c ldr r2, [pc, #300] ; a0009fcc <_CORE_mutex_Seize_interrupt_trylock+0x134> #if defined(__RTEMS_DO_NOT_INLINE_CORE_MUTEX_SEIZE__) int _CORE_mutex_Seize_interrupt_trylock( CORE_mutex_Control *the_mutex, ISR_Level *level_p ) { a0009e9c: e1a03000 mov r3, r0 executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a0009ea0: e593c050 ldr ip, [r3, #80] ; 0x50 { Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; a0009ea4: e5922004 ldr r2, [r2, #4] executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a0009ea8: e3a00000 mov r0, #0 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a0009eac: e15c0000 cmp ip, r0 a0009eb0: e92d4010 push {r4, lr} Thread_Control *executing; /* disabled when you get here */ executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; a0009eb4: e5820034 str r0, [r2, #52] ; 0x34 if ( !_CORE_mutex_Is_locked( the_mutex ) ) { a0009eb8: 0a00002c beq a0009f70 <_CORE_mutex_Seize_interrupt_trylock+0xd8> the_mutex->lock = CORE_MUTEX_LOCKED; a0009ebc: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->holder = executing; the_mutex->holder_id = executing->Object.id; a0009ec0: e5920008 ldr r0, [r2, #8] executing = _Thread_Executing; executing->Wait.return_code = CORE_MUTEX_STATUS_SUCCESSFUL; if ( !_CORE_mutex_Is_locked( the_mutex ) ) { the_mutex->lock = CORE_MUTEX_LOCKED; the_mutex->holder = executing; a0009ec4: e583205c str r2, [r3, #92] ; 0x5c the_mutex->holder_id = executing->Object.id; a0009ec8: e5830060 str r0, [r3, #96] ; 0x60 the_mutex->nest_count = 1; a0009ecc: e3a00001 mov r0, #1 a0009ed0: e5830054 str r0, [r3, #84] ; 0x54 return _CORE_mutex_Seize_interrupt_trylock_body( the_mutex, level_p ); } a0009ed4: e5930048 ldr r0, [r3, #72] ; 0x48 if ( _CORE_mutex_Is_inherit_priority( &the_mutex->Attributes ) || a0009ed8: e3500002 cmp r0, #2 a0009edc: 0a000001 beq a0009ee8 <_CORE_mutex_Seize_interrupt_trylock+0x50> a0009ee0: e3500003 cmp r0, #3 a0009ee4: 1a000004 bne a0009efc <_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++; a0009ee8: e592c01c ldr ip, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a0009eec: 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++; a0009ef0: e28c4001 add r4, ip, #1 a0009ef4: e582401c str r4, [r2, #28] } if ( !_CORE_mutex_Is_priority_ceiling( &the_mutex->Attributes ) ) { a0009ef8: 0a000000 beq a0009f00 <_CORE_mutex_Seize_interrupt_trylock+0x68> _ISR_Enable( *level_p ); a0009efc: ea00002a b a0009fac <_CORE_mutex_Seize_interrupt_trylock+0x114> */ { Priority_Control ceiling; Priority_Control current; ceiling = the_mutex->Attributes.priority_ceiling; a0009f00: e593004c ldr r0, [r3, #76] ; 0x4c current = executing->current_priority; a0009f04: e5924014 ldr r4, [r2, #20] if ( current == ceiling ) { a0009f08: e1540000 cmp r4, r0 a0009f0c: 1a000000 bne a0009f14 <_CORE_mutex_Seize_interrupt_trylock+0x7c> _ISR_Enable( *level_p ); a0009f10: ea000025 b a0009fac <_CORE_mutex_Seize_interrupt_trylock+0x114> return 0; } if ( current > ceiling ) { a0009f14: 9a00000b bls a0009f48 <_CORE_mutex_Seize_interrupt_trylock+0xb0> rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a0009f18: e59f20b0 ldr r2, [pc, #176] ; a0009fd0 <_CORE_mutex_Seize_interrupt_trylock+0x138> a0009f1c: e5920000 ldr r0, [r2] a0009f20: e2800001 add r0, r0, #1 a0009f24: e5820000 str r0, [r2] a0009f28: e5912000 ldr r2, [r1] a0009f2c: e129f002 msr CPSR_fc, r2 _Thread_Disable_dispatch(); _ISR_Enable( *level_p ); _Thread_Change_priority( a0009f30: e3a02000 mov r2, #0 a0009f34: e593005c ldr r0, [r3, #92] ; 0x5c a0009f38: e593104c ldr r1, [r3, #76] ; 0x4c a0009f3c: ebfff276 bl a000691c <_Thread_Change_priority> the_mutex->holder, the_mutex->Attributes.priority_ceiling, false ); _Thread_Enable_dispatch(); a0009f40: ebfff3bf bl a0006e44 <_Thread_Enable_dispatch> a0009f44: ea00001a b a0009fb4 <_CORE_mutex_Seize_interrupt_trylock+0x11c> return 0; } /* if ( current < ceiling ) */ { executing->Wait.return_code = CORE_MUTEX_STATUS_CEILING_VIOLATED; a0009f48: e3a00006 mov r0, #6 a0009f4c: e5820034 str r0, [r2, #52] ; 0x34 the_mutex->lock = CORE_MUTEX_UNLOCKED; a0009f50: e3a00001 mov r0, #1 a0009f54: e5830050 str r0, [r3, #80] ; 0x50 the_mutex->nest_count = 0; /* undo locking above */ a0009f58: e3a00000 mov r0, #0 a0009f5c: e5830054 str r0, [r3, #84] ; 0x54 executing->resource_count--; /* undo locking above */ a0009f60: e582c01c str ip, [r2, #28] a0009f64: e5913000 ldr r3, [r1] a0009f68: e129f003 msr CPSR_fc, r3 a0009f6c: 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 ) ) { a0009f70: e593005c ldr r0, [r3, #92] ; 0x5c a0009f74: e1500002 cmp r0, r2 a0009f78: 1a00000f bne a0009fbc <_CORE_mutex_Seize_interrupt_trylock+0x124> switch ( the_mutex->Attributes.lock_nesting_behavior ) { a0009f7c: e5932040 ldr r2, [r3, #64] ; 0x40 a0009f80: e3520000 cmp r2, #0 a0009f84: 0a000002 beq a0009f94 <_CORE_mutex_Seize_interrupt_trylock+0xfc> a0009f88: e3520001 cmp r2, #1 a0009f8c: 1a00000c bne a0009fc4 <_CORE_mutex_Seize_interrupt_trylock+0x12c> a0009f90: ea000003 b a0009fa4 <_CORE_mutex_Seize_interrupt_trylock+0x10c><== NOT EXECUTED case CORE_MUTEX_NESTING_ACQUIRES: the_mutex->nest_count++; a0009f94: e5932054 ldr r2, [r3, #84] ; 0x54 a0009f98: e2822001 add r2, r2, #1 a0009f9c: e5832054 str r2, [r3, #84] ; 0x54 _ISR_Enable( *level_p ); a0009fa0: ea000001 b a0009fac <_CORE_mutex_Seize_interrupt_trylock+0x114> return 0; case CORE_MUTEX_NESTING_IS_ERROR: executing->Wait.return_code = CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED; a0009fa4: e3a03002 mov r3, #2 <== NOT EXECUTED a0009fa8: e5803034 str r3, [r0, #52] ; 0x34 <== NOT EXECUTED a0009fac: e5913000 ldr r3, [r1] a0009fb0: e129f003 msr CPSR_fc, r3 _ISR_Enable( *level_p ); return 0; a0009fb4: e3a00000 mov r0, #0 a0009fb8: e8bd8010 pop {r4, pc} /* * The mutex is not available and the caller must deal with the possibility * of blocking. */ return 1; a0009fbc: e3a00001 mov r0, #1 a0009fc0: e8bd8010 pop {r4, pc} a0009fc4: e3a00001 mov r0, #1 a0009fc8: e8bd8010 pop {r4, pc} =============================================================================== a0006c9c <_Heap_Walk>: bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006c9c: 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; a0006ca0: e5903014 ldr r3, [r0, #20] bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006ca4: e24dd030 sub sp, sp, #48 ; 0x30 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; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006ca8: e59f44c8 ldr r4, [pc, #1224] ; a0007178 <_Heap_Walk+0x4dc> int source, bool dump ) { uintptr_t const page_size = heap->page_size; uintptr_t const min_block_size = heap->min_block_size; a0006cac: e58d3024 str r3, [sp, #36] ; 0x24 Heap_Block *const first_block = heap->first_block; Heap_Block *const last_block = heap->last_block; a0006cb0: e5903024 ldr r3, [r0, #36] ; 0x24 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006cb4: e31200ff tst r2, #255 ; 0xff 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; a0006cb8: e590c020 ldr ip, [r0, #32] Heap_Block *const last_block = heap->last_block; a0006cbc: e58d3028 str r3, [sp, #40] ; 0x28 Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006cc0: e59f34b4 ldr r3, [pc, #1204] ; a000717c <_Heap_Walk+0x4e0> bool _Heap_Walk( Heap_Control *heap, int source, bool dump ) { a0006cc4: e1a06000 mov r6, r0 a0006cc8: e1a05001 mov r5, r1 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; Heap_Block *block = first_block; Heap_Walk_printer printer = dump ? _Heap_Walk_print : _Heap_Walk_print_nothing; a0006ccc: 11a04003 movne r4, r3 if ( !_System_state_Is_up( _System_state_Get() ) ) { a0006cd0: e59f34a8 ldr r3, [pc, #1192] ; a0007180 <_Heap_Walk+0x4e4> Heap_Control *heap, int source, bool dump ) { uintptr_t const page_size = heap->page_size; a0006cd4: e5909010 ldr r9, [r0, #16] uintptr_t const min_block_size = heap->min_block_size; Heap_Block *const first_block = heap->first_block; a0006cd8: 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() ) ) { a0006cdc: e5933000 ldr r3, [r3] a0006ce0: e3530003 cmp r3, #3 a0006ce4: 1a000118 bne a000714c <_Heap_Walk+0x4b0> 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)( a0006ce8: e59dc024 ldr ip, [sp, #36] ; 0x24 a0006cec: e59d2020 ldr r2, [sp, #32] a0006cf0: e58dc000 str ip, [sp] a0006cf4: e5903018 ldr r3, [r0, #24] a0006cf8: e58d3004 str r3, [sp, #4] a0006cfc: e590301c ldr r3, [r0, #28] a0006d00: e58d200c str r2, [sp, #12] a0006d04: e59f2478 ldr r2, [pc, #1144] ; a0007184 <_Heap_Walk+0x4e8> a0006d08: e58d3008 str r3, [sp, #8] a0006d0c: e59d3028 ldr r3, [sp, #40] ; 0x28 a0006d10: e58d3010 str r3, [sp, #16] a0006d14: e5903008 ldr r3, [r0, #8] a0006d18: e58d3014 str r3, [sp, #20] a0006d1c: e590300c ldr r3, [r0, #12] a0006d20: e1a00001 mov r0, r1 a0006d24: e3a01000 mov r1, #0 a0006d28: e58d3018 str r3, [sp, #24] a0006d2c: e1a03009 mov r3, r9 a0006d30: e12fff34 blx r4 heap->area_begin, heap->area_end, first_block, last_block, first_free_block, last_free_block ); if ( page_size == 0 ) { a0006d34: e3590000 cmp r9, #0 a0006d38: 1a000005 bne a0006d54 <_Heap_Walk+0xb8> (*printer)( source, true, "page size is zero\n" ); a0006d3c: e1a00005 mov r0, r5 a0006d40: e3a01001 mov r1, #1 a0006d44: e59f243c ldr r2, [pc, #1084] ; a0007188 <_Heap_Walk+0x4ec> a0006d48: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006d4c: e1a08009 mov r8, r9 a0006d50: ea0000fe b a0007150 <_Heap_Walk+0x4b4> (*printer)( source, true, "page size is zero\n" ); return false; } if ( !_Addresses_Is_aligned( (void *) page_size ) ) { a0006d54: e2198003 ands r8, r9, #3 (*printer)( a0006d58: 11a00005 movne r0, r5 a0006d5c: 13a01001 movne r1, #1 a0006d60: 159f2424 ldrne r2, [pc, #1060] ; a000718c <_Heap_Walk+0x4f0> a0006d64: 11a03009 movne r3, r9 a0006d68: 1a0000ff bne a000716c <_Heap_Walk+0x4d0> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006d6c: e59d0024 ldr r0, [sp, #36] ; 0x24 a0006d70: e1a01009 mov r1, r9 a0006d74: ebffe73e bl a0000a74 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( min_block_size, page_size ) ) { a0006d78: e250b000 subs fp, r0, #0 a0006d7c: 0a000005 beq a0006d98 <_Heap_Walk+0xfc> (*printer)( a0006d80: e1a00005 mov r0, r5 a0006d84: e3a01001 mov r1, #1 a0006d88: e59f2400 ldr r2, [pc, #1024] ; a0007190 <_Heap_Walk+0x4f4> a0006d8c: e59d3024 ldr r3, [sp, #36] ; 0x24 a0006d90: e12fff34 blx r4 a0006d94: ea0000ed b a0007150 <_Heap_Walk+0x4b4> a0006d98: e59dc020 ldr ip, [sp, #32] a0006d9c: e1a01009 mov r1, r9 a0006da0: e28c0008 add r0, ip, #8 a0006da4: ebffe732 bl a0000a74 <__umodsi3> ); return false; } if ( a0006da8: e250a000 subs sl, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( first_block ), page_size ) ) { (*printer)( a0006dac: 11a00005 movne r0, r5 a0006db0: 13a01001 movne r1, #1 a0006db4: 159f23d8 ldrne r2, [pc, #984] ; a0007194 <_Heap_Walk+0x4f8> a0006db8: 159d3020 ldrne r3, [sp, #32] a0006dbc: 1a0000c3 bne a00070d0 <_Heap_Walk+0x434> 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; a0006dc0: e59d2020 ldr r2, [sp, #32] a0006dc4: e5928004 ldr r8, [r2, #4] ); return false; } if ( !_Heap_Is_prev_used( first_block ) ) { a0006dc8: e2188001 ands r8, r8, #1 (*printer)( a0006dcc: 01a00005 moveq r0, r5 a0006dd0: 03a01001 moveq r1, #1 a0006dd4: 059f23bc ldreq r2, [pc, #956] ; a0007198 <_Heap_Walk+0x4fc> a0006dd8: 0a000009 beq a0006e04 <_Heap_Walk+0x168> - 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; a0006ddc: e59d3028 ldr r3, [sp, #40] ; 0x28 a0006de0: e5937004 ldr r7, [r3, #4] a0006de4: 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); a0006de8: 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; a0006dec: e5978004 ldr r8, [r7, #4] ); return false; } if ( _Heap_Is_free( last_block ) ) { a0006df0: e2188001 ands r8, r8, #1 a0006df4: 1a000004 bne a0006e0c <_Heap_Walk+0x170> (*printer)( a0006df8: e59f239c ldr r2, [pc, #924] ; a000719c <_Heap_Walk+0x500> a0006dfc: e1a00005 mov r0, r5 a0006e00: e3a01001 mov r1, #1 a0006e04: e12fff34 blx r4 a0006e08: ea0000d0 b a0007150 <_Heap_Walk+0x4b4> ); return false; } if ( a0006e0c: e59dc020 ldr ip, [sp, #32] a0006e10: e157000c cmp r7, ip a0006e14: 0a000005 beq a0006e30 <_Heap_Walk+0x194> _Heap_Block_at( last_block, _Heap_Block_size( last_block ) ) != first_block ) { (*printer)( a0006e18: e1a00005 mov r0, r5 <== NOT EXECUTED a0006e1c: e3a01001 mov r1, #1 <== NOT EXECUTED a0006e20: e59f2378 ldr r2, [pc, #888] ; a00071a0 <_Heap_Walk+0x504> <== NOT EXECUTED a0006e24: e12fff34 blx r4 <== NOT EXECUTED if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006e28: e1a0800a mov r8, sl <== NOT EXECUTED a0006e2c: ea0000c7 b a0007150 <_Heap_Walk+0x4b4> <== NOT EXECUTED int source, Heap_Walk_printer printer, Heap_Control *heap ) { uintptr_t const page_size = heap->page_size; a0006e30: e596b010 ldr fp, [r6, #16] block = next_block; } while ( block != first_block ); return true; } a0006e34: 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 ); a0006e38: e1a0a006 mov sl, r6 a0006e3c: ea000032 b a0006f0c <_Heap_Walk+0x270> 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; a0006e40: e5963020 ldr r3, [r6, #32] a0006e44: e1530008 cmp r3, r8 a0006e48: 83a0c000 movhi ip, #0 a0006e4c: 8a000003 bhi a0006e60 <_Heap_Walk+0x1c4> a0006e50: e596c024 ldr ip, [r6, #36] ; 0x24 a0006e54: e15c0008 cmp ip, r8 a0006e58: 33a0c000 movcc ip, #0 a0006e5c: 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 ) ) { a0006e60: e21cc0ff ands ip, ip, #255 ; 0xff (*printer)( a0006e64: 01a00005 moveq r0, r5 a0006e68: 03a01001 moveq r1, #1 a0006e6c: 059f2330 ldreq r2, [pc, #816] ; a00071a4 <_Heap_Walk+0x508> a0006e70: 0a000012 beq a0006ec0 <_Heap_Walk+0x224> RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006e74: e2880008 add r0, r8, #8 a0006e78: e1a0100b mov r1, fp a0006e7c: ebffe6fc bl a0000a74 <__umodsi3> ); return false; } if ( a0006e80: e250c000 subs ip, r0, #0 !_Heap_Is_aligned( _Heap_Alloc_area_of_block( free_block ), page_size ) ) { (*printer)( a0006e84: 11a00005 movne r0, r5 a0006e88: 13a01001 movne r1, #1 a0006e8c: 159f2314 ldrne r2, [pc, #788] ; a00071a8 <_Heap_Walk+0x50c> a0006e90: 11a03008 movne r3, r8 a0006e94: 1a0000b4 bne a000716c <_Heap_Walk+0x4d0> - 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; a0006e98: e5983004 ldr r3, [r8, #4] a0006e9c: e3c33001 bic r3, r3, #1 block = next_block; } while ( block != first_block ); return true; } a0006ea0: 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; a0006ea4: e5933004 ldr r3, [r3, #4] ); return false; } if ( _Heap_Is_used( free_block ) ) { a0006ea8: e2133001 ands r3, r3, #1 a0006eac: e58d302c str r3, [sp, #44] ; 0x2c a0006eb0: 0a000008 beq a0006ed8 <_Heap_Walk+0x23c> (*printer)( a0006eb4: e59f22f0 ldr r2, [pc, #752] ; a00071ac <_Heap_Walk+0x510> a0006eb8: e1a00005 mov r0, r5 a0006ebc: e3a01001 mov r1, #1 a0006ec0: e1a03008 mov r3, r8 a0006ec4: e58dc01c str ip, [sp, #28] a0006ec8: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006ecc: e59dc01c ldr ip, [sp, #28] a0006ed0: e1a0800c mov r8, ip a0006ed4: ea00009d b a0007150 <_Heap_Walk+0x4b4> ); return false; } if ( free_block->prev != prev_block ) { a0006ed8: e598300c ldr r3, [r8, #12] a0006edc: e153000a cmp r3, sl a0006ee0: 0a000007 beq a0006f04 <_Heap_Walk+0x268> (*printer)( a0006ee4: e58d3000 str r3, [sp] a0006ee8: e1a00005 mov r0, r5 a0006eec: e1a03008 mov r3, r8 a0006ef0: e3a01001 mov r1, #1 a0006ef4: e59f22b4 ldr r2, [pc, #692] ; a00071b0 <_Heap_Walk+0x514> a0006ef8: e12fff34 blx r4 if ( !_System_state_Is_up( _System_state_Get() ) ) { return true; } if ( !_Heap_Walk_check_control( source, printer, heap ) ) { return false; a0006efc: e59d802c ldr r8, [sp, #44] ; 0x2c a0006f00: ea000092 b a0007150 <_Heap_Walk+0x4b4> return false; } prev_block = free_block; free_block = free_block->next; a0006f04: e1a0a008 mov sl, r8 a0006f08: 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 ) { a0006f0c: e1580006 cmp r8, r6 a0006f10: 1affffca bne a0006e40 <_Heap_Walk+0x1a4> a0006f14: ea000000 b a0006f1c <_Heap_Walk+0x280> block->prev_size ); } block = next_block; } while ( block != first_block ); a0006f18: e1a07008 mov r7, r8 return true; } a0006f1c: 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; a0006f20: 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; a0006f24: 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); a0006f28: 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; a0006f2c: e1520008 cmp r2, r8 a0006f30: 83a0b000 movhi fp, #0 a0006f34: 8a000003 bhi a0006f48 <_Heap_Walk+0x2ac> a0006f38: e596b024 ldr fp, [r6, #36] ; 0x24 a0006f3c: e15b0008 cmp fp, r8 a0006f40: 33a0b000 movcc fp, #0 a0006f44: 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 ) ) { a0006f48: e21bb0ff ands fp, fp, #255 ; 0xff a0006f4c: 1a000006 bne a0006f6c <_Heap_Walk+0x2d0> (*printer)( a0006f50: e58d8000 str r8, [sp] a0006f54: e1a00005 mov r0, r5 a0006f58: e3a01001 mov r1, #1 a0006f5c: e59f2250 ldr r2, [pc, #592] ; a00071b4 <_Heap_Walk+0x518> a0006f60: e1a03007 mov r3, r7 a0006f64: e12fff34 blx r4 a0006f68: ea000059 b a00070d4 <_Heap_Walk+0x438> 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; a0006f6c: e59d2028 ldr r2, [sp, #40] ; 0x28 RTEMS_INLINE_ROUTINE bool _Heap_Is_aligned( uintptr_t value, uintptr_t alignment ) { return (value % alignment) == 0; a0006f70: e1a0000a mov r0, sl a0006f74: e1a01009 mov r1, r9 a0006f78: e057b002 subs fp, r7, r2 a0006f7c: 13a0b001 movne fp, #1 a0006f80: e58d301c str r3, [sp, #28] a0006f84: ebffe6ba bl a0000a74 <__umodsi3> ); return false; } if ( !_Heap_Is_aligned( block_size, page_size ) && is_not_last_block ) { a0006f88: e3500000 cmp r0, #0 a0006f8c: e59d301c ldr r3, [sp, #28] a0006f90: 0a000005 beq a0006fac <_Heap_Walk+0x310> a0006f94: e35b0000 cmp fp, #0 (*printer)( a0006f98: 158da000 strne sl, [sp] a0006f9c: 11a00005 movne r0, r5 a0006fa0: 13a01001 movne r1, #1 a0006fa4: 159f220c ldrne r2, [pc, #524] ; a00071b8 <_Heap_Walk+0x51c> a0006fa8: 1a000013 bne a0006ffc <_Heap_Walk+0x360> ); return false; } if ( block_size < min_block_size && is_not_last_block ) { a0006fac: e59dc024 ldr ip, [sp, #36] ; 0x24 a0006fb0: e15a000c cmp sl, ip a0006fb4: 2a000008 bcs a0006fdc <_Heap_Walk+0x340> a0006fb8: e35b0000 cmp fp, #0 a0006fbc: 0a000006 beq a0006fdc <_Heap_Walk+0x340> (*printer)( a0006fc0: e88d1400 stm sp, {sl, ip} a0006fc4: e1a00005 mov r0, r5 a0006fc8: e3a01001 mov r1, #1 a0006fcc: e59f21e8 ldr r2, [pc, #488] ; a00071bc <_Heap_Walk+0x520> a0006fd0: e1a03007 mov r3, r7 a0006fd4: e12fff34 blx r4 a0006fd8: ea000064 b a0007170 <_Heap_Walk+0x4d4> ); return false; } if ( next_block_begin <= block_begin && is_not_last_block ) { a0006fdc: e1580007 cmp r8, r7 a0006fe0: 8a000008 bhi a0007008 <_Heap_Walk+0x36c> a0006fe4: e35b0000 cmp fp, #0 a0006fe8: 0a000006 beq a0007008 <_Heap_Walk+0x36c> (*printer)( a0006fec: e59f21cc ldr r2, [pc, #460] ; a00071c0 <_Heap_Walk+0x524> a0006ff0: e58d8000 str r8, [sp] a0006ff4: e1a00005 mov r0, r5 a0006ff8: e3a01001 mov r1, #1 a0006ffc: e1a03007 mov r3, r7 a0007000: e12fff34 blx r4 a0007004: ea000059 b a0007170 <_Heap_Walk+0x4d4> 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; a0007008: e203b001 and fp, r3, #1 a000700c: e5983004 ldr r3, [r8, #4] ); return false; } if ( !_Heap_Is_prev_used( next_block ) ) { a0007010: e3130001 tst r3, #1 a0007014: 1a000038 bne a00070fc <_Heap_Walk+0x460> 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 ? a0007018: 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)( a000701c: e5963008 ldr r3, [r6, #8] block = next_block; } while ( block != first_block ); return true; } a0007020: 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)( a0007024: e1520003 cmp r2, r3 a0007028: 059f0194 ldreq r0, [pc, #404] ; a00071c4 <_Heap_Walk+0x528> a000702c: 0a000003 beq a0007040 <_Heap_Walk+0x3a4> block, block_size, block->prev, block->prev == first_free_block ? " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), a0007030: e59f3190 ldr r3, [pc, #400] ; a00071c8 <_Heap_Walk+0x52c> a0007034: e1520006 cmp r2, r6 a0007038: e59f018c ldr r0, [pc, #396] ; a00071cc <_Heap_Walk+0x530> a000703c: 01a00003 moveq r0, r3 block->next, block->next == last_free_block ? a0007040: 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)( a0007044: e1530001 cmp r3, r1 a0007048: 059f1180 ldreq r1, [pc, #384] ; a00071d0 <_Heap_Walk+0x534> a000704c: 0a000003 beq a0007060 <_Heap_Walk+0x3c4> " (= first free)" : (block->prev == free_list_head ? " (= head)" : ""), block->next, block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") a0007050: e59fc17c ldr ip, [pc, #380] ; a00071d4 <_Heap_Walk+0x538> a0007054: e1530006 cmp r3, r6 a0007058: e59f116c ldr r1, [pc, #364] ; a00071cc <_Heap_Walk+0x530> a000705c: 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)( a0007060: e58d2004 str r2, [sp, #4] a0007064: e58d0008 str r0, [sp, #8] a0007068: e58d300c str r3, [sp, #12] a000706c: e58d1010 str r1, [sp, #16] a0007070: e1a03007 mov r3, r7 a0007074: e58da000 str sl, [sp] a0007078: e1a00005 mov r0, r5 a000707c: e3a01000 mov r1, #0 a0007080: e59f2150 ldr r2, [pc, #336] ; a00071d8 <_Heap_Walk+0x53c> a0007084: e12fff34 blx r4 block->next == last_free_block ? " (= last free)" : (block->next == free_list_tail ? " (= tail)" : "") ); if ( block_size != next_block->prev_size ) { a0007088: e5983000 ldr r3, [r8] a000708c: e15a0003 cmp sl, r3 a0007090: 0a000008 beq a00070b8 <_Heap_Walk+0x41c> (*printer)( a0007094: e58d3004 str r3, [sp, #4] a0007098: e58da000 str sl, [sp] a000709c: e58d8008 str r8, [sp, #8] a00070a0: e1a00005 mov r0, r5 a00070a4: e3a01001 mov r1, #1 a00070a8: e59f212c ldr r2, [pc, #300] ; a00071dc <_Heap_Walk+0x540> a00070ac: e1a03007 mov r3, r7 a00070b0: e12fff34 blx r4 a00070b4: ea00002d b a0007170 <_Heap_Walk+0x4d4> ); return false; } if ( !prev_used ) { a00070b8: e35b0000 cmp fp, #0 a00070bc: 1a000006 bne a00070dc <_Heap_Walk+0x440> (*printer)( a00070c0: e59f2118 ldr r2, [pc, #280] ; a00071e0 <_Heap_Walk+0x544> a00070c4: e1a00005 mov r0, r5 a00070c8: e3a01001 mov r1, #1 a00070cc: e1a03007 mov r3, r7 a00070d0: e12fff34 blx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a00070d4: e1a0800b mov r8, fp a00070d8: ea00001c b a0007150 <_Heap_Walk+0x4b4> block = next_block; } while ( block != first_block ); return true; } a00070dc: e5963008 ldr r3, [r6, #8] a00070e0: ea000002 b a00070f0 <_Heap_Walk+0x454> { 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 ) { a00070e4: e1530007 cmp r3, r7 a00070e8: 0a000014 beq a0007140 <_Heap_Walk+0x4a4> return true; } free_block = free_block->next; a00070ec: 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 ) { a00070f0: e1530006 cmp r3, r6 a00070f4: 1afffffa bne a00070e4 <_Heap_Walk+0x448> a00070f8: ea000017 b a000715c <_Heap_Walk+0x4c0> if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; } } else if (prev_used) { a00070fc: e35b0000 cmp fp, #0 a0007100: 0a000006 beq a0007120 <_Heap_Walk+0x484> (*printer)( a0007104: e58da000 str sl, [sp] a0007108: e1a00005 mov r0, r5 a000710c: e3a01000 mov r1, #0 a0007110: e59f20cc ldr r2, [pc, #204] ; a00071e4 <_Heap_Walk+0x548> a0007114: e1a03007 mov r3, r7 a0007118: e12fff34 blx r4 a000711c: ea000007 b a0007140 <_Heap_Walk+0x4a4> "block 0x%08x: size %u\n", block, block_size ); } else { (*printer)( a0007120: e58da000 str sl, [sp] a0007124: e5973000 ldr r3, [r7] a0007128: e1a00005 mov r0, r5 a000712c: e1a0100b mov r1, fp a0007130: e58d3004 str r3, [sp, #4] a0007134: e59f20ac ldr r2, [pc, #172] ; a00071e8 <_Heap_Walk+0x54c> a0007138: e1a03007 mov r3, r7 a000713c: e12fff34 blx r4 block->prev_size ); } block = next_block; } while ( block != first_block ); a0007140: e59d2020 ldr r2, [sp, #32] a0007144: e1580002 cmp r8, r2 a0007148: 1affff72 bne a0006f18 <_Heap_Walk+0x27c> 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; a000714c: e3a08001 mov r8, #1 block = next_block; } while ( block != first_block ); return true; } a0007150: e1a00008 mov r0, r8 a0007154: e28dd030 add sp, sp, #48 ; 0x30 a0007158: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} return false; } if ( !_Heap_Walk_is_in_free_list( heap, block ) ) { (*printer)( a000715c: e59f2088 ldr r2, [pc, #136] ; a00071ec <_Heap_Walk+0x550> a0007160: e1a00005 mov r0, r5 a0007164: e3a01001 mov r1, #1 a0007168: e1a03007 mov r3, r7 a000716c: e12fff34 blx r4 return false; } if ( !_Heap_Is_prev_used( next_block ) ) { if ( !_Heap_Walk_check_free_block( source, printer, heap, block ) ) { return false; a0007170: e3a08000 mov r8, #0 a0007174: eafffff5 b a0007150 <_Heap_Walk+0x4b4> =============================================================================== a0007b0c <_Objects_Id_to_name>: */ Objects_Name_or_id_lookup_errors _Objects_Id_to_name ( Objects_Id id, Objects_Name *name ) { a0007b0c: e92d4011 push {r0, r4, lr} a0007b10: e1a04001 mov r4, r1 /* * Caller is trusted for name != NULL. */ tmpId = (id == OBJECTS_ID_OF_SELF) ? _Thread_Executing->Object.id : id; a0007b14: e2501000 subs r1, r0, #0 a0007b18: 059f306c ldreq r3, [pc, #108] ; a0007b8c <_Objects_Id_to_name+0x80> a0007b1c: 05933004 ldreq r3, [r3, #4] a0007b20: 05931008 ldreq r1, [r3, #8] a0007b24: e1a03c21 lsr r3, r1, #24 a0007b28: 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 ) a0007b2c: e2432001 sub r2, r3, #1 a0007b30: e3520002 cmp r2, #2 a0007b34: 8a00000d bhi a0007b70 <_Objects_Id_to_name+0x64> a0007b38: ea00000e b a0007b78 <_Objects_Id_to_name+0x6c> */ RTEMS_INLINE_ROUTINE uint32_t _Objects_Get_class( Objects_Id id ) { return (uint32_t) a0007b3c: 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 ]; a0007b40: e7930102 ldr r0, [r3, r2, lsl #2] if ( !information ) a0007b44: e3500000 cmp r0, #0 a0007b48: 0a000008 beq a0007b70 <_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 ); a0007b4c: e1a0200d mov r2, sp a0007b50: ebffffd3 bl a0007aa4 <_Objects_Get> if ( !the_object ) a0007b54: e3500000 cmp r0, #0 a0007b58: 0a000004 beq a0007b70 <_Objects_Id_to_name+0x64> return OBJECTS_INVALID_ID; *name = the_object->name; a0007b5c: e590300c ldr r3, [r0, #12] a0007b60: e5843000 str r3, [r4] _Thread_Enable_dispatch(); a0007b64: eb000214 bl a00083bc <_Thread_Enable_dispatch> return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; a0007b68: e3a00000 mov r0, #0 a0007b6c: ea000000 b a0007b74 <_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; a0007b70: e3a00003 mov r0, #3 return OBJECTS_INVALID_ID; *name = the_object->name; _Thread_Enable_dispatch(); return OBJECTS_NAME_OR_ID_LOOKUP_SUCCESSFUL; } a0007b74: 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 ] ) a0007b78: e59f2010 ldr r2, [pc, #16] ; a0007b90 <_Objects_Id_to_name+0x84> a0007b7c: e7923103 ldr r3, [r2, r3, lsl #2] a0007b80: e3530000 cmp r3, #0 a0007b84: 1affffec bne a0007b3c <_Objects_Id_to_name+0x30> a0007b88: eafffff8 b a0007b70 <_Objects_Id_to_name+0x64> <== NOT EXECUTED =============================================================================== a0005e9c <_TOD_Validate>: { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a0005e9c: e59f30b4 ldr r3, [pc, #180] ; a0005f58 <_TOD_Validate+0xbc> */ bool _TOD_Validate( const rtems_time_of_day *the_tod ) { a0005ea0: e92d4010 push {r4, lr} uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0005ea4: e2504000 subs r4, r0, #0 { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / rtems_configuration_get_microseconds_per_tick(); a0005ea8: e593100c ldr r1, [r3, #12] if ((!the_tod) || a0005eac: 0a000021 beq a0005f38 <_TOD_Validate+0x9c> ) { uint32_t days_in_month; uint32_t ticks_per_second; ticks_per_second = TOD_MICROSECONDS_PER_SECOND / a0005eb0: e59f00a4 ldr r0, [pc, #164] ; a0005f5c <_TOD_Validate+0xc0> a0005eb4: eb004325 bl a0016b50 <__aeabi_uidiv> rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || a0005eb8: e5943018 ldr r3, [r4, #24] a0005ebc: e1530000 cmp r3, r0 a0005ec0: 2a000020 bcs a0005f48 <_TOD_Validate+0xac> (the_tod->ticks >= ticks_per_second) || a0005ec4: e5943014 ldr r3, [r4, #20] a0005ec8: e353003b cmp r3, #59 ; 0x3b a0005ecc: 8a00001d bhi a0005f48 <_TOD_Validate+0xac> (the_tod->second >= TOD_SECONDS_PER_MINUTE) || a0005ed0: e5943010 ldr r3, [r4, #16] a0005ed4: e353003b cmp r3, #59 ; 0x3b a0005ed8: 8a00001a bhi a0005f48 <_TOD_Validate+0xac> (the_tod->minute >= TOD_MINUTES_PER_HOUR) || a0005edc: e594300c ldr r3, [r4, #12] a0005ee0: e3530017 cmp r3, #23 a0005ee4: 8a000017 bhi a0005f48 <_TOD_Validate+0xac> (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || a0005ee8: e5943004 ldr r3, [r4, #4] rtems_configuration_get_microseconds_per_tick(); if ((!the_tod) || (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || a0005eec: e3530000 cmp r3, #0 a0005ef0: 0a000012 beq a0005f40 <_TOD_Validate+0xa4> (the_tod->month == 0) || a0005ef4: e353000c cmp r3, #12 a0005ef8: 8a000012 bhi a0005f48 <_TOD_Validate+0xac> (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a0005efc: e5942000 ldr r2, [r4] (the_tod->ticks >= ticks_per_second) || (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || a0005f00: e59f1058 ldr r1, [pc, #88] ; a0005f60 <_TOD_Validate+0xc4> a0005f04: e1520001 cmp r2, r1 a0005f08: 9a000010 bls a0005f50 <_TOD_Validate+0xb4> (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) a0005f0c: e5940008 ldr r0, [r4, #8] (the_tod->second >= TOD_SECONDS_PER_MINUTE) || (the_tod->minute >= TOD_MINUTES_PER_HOUR) || (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || a0005f10: e3500000 cmp r0, #0 a0005f14: 0a00000e beq a0005f54 <_TOD_Validate+0xb8> (the_tod->day == 0) ) return false; if ( (the_tod->year % 4) == 0 ) a0005f18: e3120003 tst r2, #3 a0005f1c: e59f2040 ldr r2, [pc, #64] ; a0005f64 <_TOD_Validate+0xc8> days_in_month = _TOD_Days_per_month[ 1 ][ the_tod->month ]; a0005f20: 0283300d addeq r3, r3, #13 else days_in_month = _TOD_Days_per_month[ 0 ][ the_tod->month ]; a0005f24: e7924103 ldr r4, [r2, r3, lsl #2] * false - if the the_tod is invalid * * NOTE: This routine only works for leap-years through 2099. */ bool _TOD_Validate( a0005f28: e1500004 cmp r0, r4 a0005f2c: 83a00000 movhi r0, #0 a0005f30: 93a00001 movls r0, #1 a0005f34: e8bd8010 pop {r4, pc} (the_tod->hour >= TOD_HOURS_PER_DAY) || (the_tod->month == 0) || (the_tod->month > TOD_MONTHS_PER_YEAR) || (the_tod->year < TOD_BASE_YEAR) || (the_tod->day == 0) ) return false; a0005f38: e1a00004 mov r0, r4 <== NOT EXECUTED a0005f3c: e8bd8010 pop {r4, pc} <== NOT EXECUTED a0005f40: e1a00003 mov r0, r3 <== NOT EXECUTED a0005f44: e8bd8010 pop {r4, pc} <== NOT EXECUTED a0005f48: e3a00000 mov r0, #0 a0005f4c: e8bd8010 pop {r4, pc} a0005f50: e3a00000 mov r0, #0 if ( the_tod->day > days_in_month ) return false; return true; } a0005f54: e8bd8010 pop {r4, pc} =============================================================================== a0006efc <_Thread_Initialize>: Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a0006efc: e92d45f0 push {r4, r5, r6, r7, r8, sl, lr} /* * Zero out all the allocated memory fields */ for ( i=0 ; i <= THREAD_API_LAST ; i++ ) the_thread->API_Extensions[i] = NULL; a0006f00: e3a06000 mov r6, #0 a0006f04: e5816100 str r6, [r1, #256] ; 0x100 a0006f08: e5816104 str r6, [r1, #260] ; 0x104 extensions_area = NULL; the_thread->libc_reent = NULL; a0006f0c: e58160fc str r6, [r1, #252] ; 0xfc Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a0006f10: e1a05000 mov r5, r0 a0006f14: e1a04001 mov r4, r1 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); a0006f18: e1a00001 mov r0, r1 a0006f1c: e1a01003 mov r1, r3 Thread_CPU_budget_algorithms budget_algorithm, Thread_CPU_budget_algorithm_callout budget_callout, uint32_t isr_level, Objects_Name name ) { a0006f20: e1a07003 mov r7, r3 a0006f24: e59d8020 ldr r8, [sp, #32] a0006f28: e5dda024 ldrb sl, [sp, #36] ; 0x24 /* * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); a0006f2c: eb000261 bl a00078b8 <_Thread_Stack_Allocate> if ( !actual_stack_size || actual_stack_size < stack_size ) a0006f30: e1500006 cmp r0, r6 a0006f34: 13a03000 movne r3, #0 a0006f38: 03a03001 moveq r3, #1 a0006f3c: e1500007 cmp r0, r7 a0006f40: 21a07003 movcs r7, r3 a0006f44: 33837001 orrcc r7, r3, #1 a0006f48: e1570006 cmp r7, r6 a0006f4c: 1a00004c bne a0007084 <_Thread_Initialize+0x188> Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; a0006f50: e59430c8 ldr r3, [r4, #200] ; 0xc8 the_stack->size = size; a0006f54: e58400c0 str r0, [r4, #192] ; 0xc0 Watchdog_Service_routine_entry routine, Objects_Id id, void *user_data ) { the_watchdog->state = WATCHDOG_INACTIVE; a0006f58: e5847050 str r7, [r4, #80] ; 0x50 Stack_Control *the_stack, void *starting_address, size_t size ) { the_stack->area = starting_address; a0006f5c: e58430c4 str r3, [r4, #196] ; 0xc4 #endif /* * Allocate the extensions area for this thread */ if ( _Thread_Maximum_extensions ) { a0006f60: e59f312c ldr r3, [pc, #300] ; a0007094 <_Thread_Initialize+0x198> the_watchdog->routine = routine; a0006f64: e5847064 str r7, [r4, #100] ; 0x64 the_watchdog->id = id; a0006f68: e5847068 str r7, [r4, #104] ; 0x68 a0006f6c: e5936000 ldr r6, [r3] the_watchdog->user_data = user_data; a0006f70: e584706c str r7, [r4, #108] ; 0x6c a0006f74: e3560000 cmp r6, #0 a0006f78: 0a000004 beq a0006f90 <_Thread_Initialize+0x94> extensions_area = _Workspace_Allocate( a0006f7c: e2866001 add r6, r6, #1 a0006f80: e1a00106 lsl r0, r6, #2 a0006f84: eb000452 bl a00080d4 <_Workspace_Allocate> (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) a0006f88: e2506000 subs r6, r0, #0 a0006f8c: 0a000028 beq a0007034 <_Thread_Initialize+0x138> * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { a0006f90: e3560000 cmp r6, #0 (_Thread_Maximum_extensions + 1) * sizeof( void * ) ); if ( !extensions_area ) goto failed; } the_thread->extensions = (void **) extensions_area; a0006f94: e5846108 str r6, [r4, #264] ; 0x108 * if they are linked to the thread. An extension user may * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { a0006f98: 0a000009 beq a0006fc4 <_Thread_Initialize+0xc8> for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0006f9c: e59f30f0 ldr r3, [pc, #240] ; a0007094 <_Thread_Initialize+0x198> a0006fa0: e1a02006 mov r2, r6 a0006fa4: e5930000 ldr r0, [r3] a0006fa8: e3a03000 mov r3, #0 the_thread->extensions[i] = NULL; a0006fac: e1a01003 mov r1, r3 a0006fb0: ea000001 b a0006fbc <_Thread_Initialize+0xc0> a0006fb4: e4821004 str r1, [r2], #4 * create the extension long after tasks have been created * so they cannot rely on the thread create user extension * call. */ if ( the_thread->extensions ) { for ( i = 0; i <= _Thread_Maximum_extensions ; i++ ) a0006fb8: e2833001 add r3, r3, #1 a0006fbc: e1530000 cmp r3, r0 a0006fc0: 9afffffb bls a0006fb4 <_Thread_Initialize+0xb8> /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; a0006fc4: e59d3028 ldr r3, [sp, #40] ; 0x28 } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; a0006fc8: e3a07000 mov r7, #0 /* * General initialization */ the_thread->Start.is_preemptible = is_preemptible; a0006fcc: e5c4a0ac strb sl, [r4, #172] ; 0xac the_thread->Start.budget_algorithm = budget_algorithm; a0006fd0: e58430b0 str r3, [r4, #176] ; 0xb0 the_thread->Start.budget_callout = budget_callout; a0006fd4: e59d302c ldr r3, [sp, #44] ; 0x2c #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; a0006fd8: e3a0a001 mov sl, #1 the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); a0006fdc: e1a00004 mov r0, r4 * General initialization */ the_thread->Start.is_preemptible = is_preemptible; the_thread->Start.budget_algorithm = budget_algorithm; the_thread->Start.budget_callout = budget_callout; a0006fe0: e58430b4 str r3, [r4, #180] ; 0xb4 case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0006fe4: e59d3030 ldr r3, [sp, #48] ; 0x30 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; the_thread->resource_count = 0; the_thread->real_priority = priority; the_thread->Start.initial_priority = priority; _Thread_Set_priority( the_thread, priority ); a0006fe8: e1a01008 mov r1, r8 #endif } the_thread->Start.isr_level = isr_level; the_thread->current_state = STATES_DORMANT; a0006fec: e584a010 str sl, [r4, #16] case THREAD_CPU_BUDGET_ALGORITHM_CALLOUT: break; #endif } the_thread->Start.isr_level = isr_level; a0006ff0: e58430b8 str r3, [r4, #184] ; 0xb8 the_thread->current_state = STATES_DORMANT; the_thread->Wait.queue = NULL; a0006ff4: e5847044 str r7, [r4, #68] ; 0x44 the_thread->resource_count = 0; a0006ff8: e584701c str r7, [r4, #28] the_thread->real_priority = priority; a0006ffc: e5848018 str r8, [r4, #24] the_thread->Start.initial_priority = priority; a0007000: e58480bc str r8, [r4, #188] ; 0xbc _Thread_Set_priority( the_thread, priority ); a0007004: eb00019d bl a0007680 <_Thread_Set_priority> _Thread_Stack_Free( the_thread ); return false; } a0007008: e595301c ldr r3, [r5, #28] Objects_Information *information, Objects_Control *the_object, Objects_Name name ) { _Objects_Set_local_object( a000700c: e1d420b8 ldrh r2, [r4, #8] /* * Initialize the CPU usage statistics */ #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ _Timestamp_Set_to_zero( &the_thread->cpu_time_used ); a0007010: e5847084 str r7, [r4, #132] ; 0x84 a0007014: e5847088 str r7, [r4, #136] ; 0x88 #if defined(RTEMS_DEBUG) if ( index > information->maximum ) return; #endif information->local_table[ index ] = the_object; a0007018: e7834102 str r4, [r3, r2, lsl #2] information, _Objects_Get_index( the_object->id ), the_object ); the_object->name = name; a000701c: e59d3034 ldr r3, [sp, #52] ; 0x34 * enabled when we get here. We want to be able to run the * user extensions with dispatching enabled. The Allocator * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); a0007020: e1a00004 mov r0, r4 a0007024: e584300c str r3, [r4, #12] a0007028: eb000328 bl a0007cd0 <_User_extensions_Thread_create> if ( extension_status ) a000702c: e1500007 cmp r0, r7 a0007030: 1a000015 bne a000708c <_Thread_Initialize+0x190> return true; failed: if ( the_thread->libc_reent ) a0007034: e59400fc ldr r0, [r4, #252] ; 0xfc a0007038: e3500000 cmp r0, #0 a000703c: 0a000000 beq a0007044 <_Thread_Initialize+0x148> _Workspace_Free( the_thread->libc_reent ); a0007040: eb000429 bl a00080ec <_Workspace_Free> for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0007044: e5940100 ldr r0, [r4, #256] ; 0x100 a0007048: e3500000 cmp r0, #0 a000704c: 0a000000 beq a0007054 <_Thread_Initialize+0x158> _Workspace_Free( the_thread->API_Extensions[i] ); a0007050: eb000425 bl a00080ec <_Workspace_Free> failed: if ( the_thread->libc_reent ) _Workspace_Free( the_thread->libc_reent ); for ( i=0 ; i <= THREAD_API_LAST ; i++ ) if ( the_thread->API_Extensions[i] ) a0007054: e5940104 ldr r0, [r4, #260] ; 0x104 a0007058: e3500000 cmp r0, #0 a000705c: 0a000000 beq a0007064 <_Thread_Initialize+0x168> _Workspace_Free( the_thread->API_Extensions[i] ); a0007060: eb000421 bl a00080ec <_Workspace_Free> <== NOT EXECUTED if ( extensions_area ) a0007064: e3560000 cmp r6, #0 a0007068: 0a000001 beq a0007074 <_Thread_Initialize+0x178> (void) _Workspace_Free( extensions_area ); a000706c: e1a00006 mov r0, r6 a0007070: eb00041d bl a00080ec <_Workspace_Free> #if ( CPU_HARDWARE_FP == TRUE ) || ( CPU_SOFTWARE_FP == TRUE ) if ( fp_area ) (void) _Workspace_Free( fp_area ); #endif _Thread_Stack_Free( the_thread ); a0007074: e1a00004 mov r0, r4 a0007078: eb000225 bl a0007914 <_Thread_Stack_Free> return false; a000707c: e3a00000 mov r0, #0 a0007080: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * Allocate and Initialize the stack for this thread. */ #if !defined(RTEMS_SCORE_THREAD_ENABLE_USER_PROVIDED_STACK_VIA_API) actual_stack_size = _Thread_Stack_Allocate( the_thread, stack_size ); if ( !actual_stack_size || actual_stack_size < stack_size ) return false; /* stack allocation failed */ a0007084: e1a00006 mov r0, r6 a0007088: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} * Mutex provides sufficient protection to let the user extensions * run safely. */ extension_status = _User_extensions_Thread_create( the_thread ); if ( extension_status ) return true; a000708c: e1a0000a mov r0, sl _Thread_Stack_Free( the_thread ); return false; } a0007090: e8bd85f0 pop {r4, r5, r6, r7, r8, sl, pc} =============================================================================== a000a53c <_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 ) { a000a53c: e92d4070 push {r4, r5, r6, lr} a000a540: e20220ff and r2, r2, #255 ; 0xff a000a544: e1a04001 mov r4, r1 static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a000a548: e10f1000 mrs r1, CPSR a000a54c: e3813080 orr r3, r1, #128 ; 0x80 a000a550: 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); a000a554: e59f30a8 ldr r3, [pc, #168] ; a000a604 <_Thread_queue_Extract_priority_helper+0xc8> a000a558: e5940010 ldr r0, [r4, #16] a000a55c: 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 ) ) { a000a560: e3530000 cmp r3, #0 a000a564: 1a000000 bne a000a56c <_Thread_queue_Extract_priority_helper+0x30> _ISR_Enable( level ); a000a568: ea000015 b a000a5c4 <_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)); a000a56c: 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; a000a570: e8941001 ldm r4, {r0, ip} */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a000a574: e284503c add r5, r4, #60 ; 0x3c previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a000a578: 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; a000a57c: 058c0000 streq r0, [ip] next_node->previous = previous_node; a000a580: 0580c004 streq ip, [r0, #4] */ next_node = the_node->next; previous_node = the_node->previous; if ( !_Chain_Is_empty( &the_thread->Wait.Block2n ) ) { a000a584: 0a00000c beq a000a5bc <_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; a000a588: e5945040 ldr r5, [r4, #64] ; 0x40 new_second_node = new_first_node->next; a000a58c: e5936000 ldr r6, [r3] previous_node->next = new_first_node; next_node->previous = new_first_node; a000a590: e5803004 str r3, [r0, #4] new_first_node->next = next_node; new_first_node->previous = previous_node; if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a000a594: e1530005 cmp r3, r5 new_first_node = the_thread->Wait.Block2n.first; new_first_thread = (Thread_Control *) new_first_node; last_node = the_thread->Wait.Block2n.last; new_second_node = new_first_node->next; previous_node->next = new_first_node; a000a598: e58c3000 str r3, [ip] next_node->previous = new_first_node; new_first_node->next = next_node; new_first_node->previous = previous_node; a000a59c: e8831001 stm r3, {r0, ip} if ( !_Chain_Has_only_one_node( &the_thread->Wait.Block2n ) ) { a000a5a0: 0a000005 beq a000a5bc <_Thread_queue_Extract_priority_helper+0x80> /* > two threads on 2-n */ new_second_node->previous = _Chain_Head( &new_first_thread->Wait.Block2n ); a000a5a4: 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 = a000a5a8: e5860004 str r0, [r6, #4] _Chain_Head( &new_first_thread->Wait.Block2n ); new_first_thread->Wait.Block2n.first = new_second_node; a000a5ac: e5836038 str r6, [r3, #56] ; 0x38 new_first_thread->Wait.Block2n.last = last_node; a000a5b0: e5835040 str r5, [r3, #64] ; 0x40 a000a5b4: e283303c add r3, r3, #60 ; 0x3c last_node->next = _Chain_Tail( &new_first_thread->Wait.Block2n ); a000a5b8: e5853000 str r3, [r5] /* * If we are not supposed to touch timers or the thread's state, return. */ if ( requeuing ) { a000a5bc: e3520000 cmp r2, #0 a000a5c0: 0a000001 beq a000a5cc <_Thread_queue_Extract_priority_helper+0x90> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a000a5c4: e129f001 msr CPSR_fc, r1 a000a5c8: e8bd8070 pop {r4, r5, r6, pc} _ISR_Enable( level ); return; } if ( !_Watchdog_Is_active( &the_thread->Timer ) ) { a000a5cc: e5943050 ldr r3, [r4, #80] ; 0x50 a000a5d0: e3530002 cmp r3, #2 a000a5d4: 0a000001 beq a000a5e0 <_Thread_queue_Extract_priority_helper+0xa4> a000a5d8: e129f001 msr CPSR_fc, r1 a000a5dc: ea000004 b a000a5f4 <_Thread_queue_Extract_priority_helper+0xb8> a000a5e0: e3a03003 mov r3, #3 <== NOT EXECUTED a000a5e4: e5843050 str r3, [r4, #80] ; 0x50 <== NOT EXECUTED a000a5e8: 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 ); a000a5ec: e2840048 add r0, r4, #72 ; 0x48 <== NOT EXECUTED a000a5f0: ebfff654 bl a0007f48 <_Watchdog_Remove> <== NOT EXECUTED a000a5f4: e59f100c ldr r1, [pc, #12] ; a000a608 <_Thread_queue_Extract_priority_helper+0xcc> a000a5f8: e1a00004 mov r0, r4 #if defined(RTEMS_MULTIPROCESSING) if ( !_Objects_Is_local_id( the_thread->Object.id ) ) _Thread_MP_Free_proxy( the_thread ); #endif } a000a5fc: e8bd4070 pop {r4, r5, r6, lr} a000a600: eafff12a b a0006ab0 <_Thread_Clear_state> =============================================================================== a00140f0 <_Timer_server_Body>: * @a arg points to the corresponding timer server control block. */ static rtems_task _Timer_server_Body( rtems_task_argument arg ) { a00140f0: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a00140f4: e24dd018 sub sp, sp, #24 a00140f8: 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; a00140fc: e3a03000 mov r3, #0 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0014100: e28ba004 add sl, fp, #4 a0014104: e28d7004 add r7, sp, #4 a0014108: e1a04000 mov r4, r0 */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a001410c: e58da00c str sl, [sp, #12] the_chain->permanent_null = NULL; a0014110: e58d3010 str r3, [sp, #16] the_chain->last = _Chain_Head(the_chain); a0014114: e58db014 str fp, [sp, #20] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0014118: e1a0500d mov r5, sp */ RTEMS_INLINE_ROUTINE void _Chain_Initialize_empty( Chain_Control *the_chain ) { the_chain->first = _Chain_Tail(the_chain); a001411c: e58d7000 str r7, [sp] the_chain->permanent_null = NULL; a0014120: e98d2008 stmib sp, {r3, sp} */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014124: 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; a0014128: 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 ); a001412c: 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; a0014130: e59f2154 ldr r2, [pc, #340] ; a001428c <_Timer_server_Body+0x19c> */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014134: e1a00009 mov r0, r9 static void _Timer_server_Process_interval_watchdogs( Timer_server_Watchdogs *watchdogs, Chain_Control *fire_chain ) { Watchdog_Interval snapshot = _Watchdog_Ticks_since_boot; a0014138: e5923000 ldr r3, [r2] /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; a001413c: e594103c ldr r1, [r4, #60] ; 0x3c watchdogs->last_snapshot = snapshot; _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014140: e1a02005 mov r2, r5 /* * We assume adequate unsigned arithmetic here. */ Watchdog_Interval delta = snapshot - watchdogs->last_snapshot; watchdogs->last_snapshot = snapshot; a0014144: e584303c str r3, [r4, #60] ; 0x3c _Watchdog_Adjust_to_chain( &watchdogs->Chain, delta, fire_chain ); a0014148: e0611003 rsb r1, r1, r3 a001414c: eb00108a bl a001837c <_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(); a0014150: e59f3138 ldr r3, [pc, #312] ; a0014290 <_Timer_server_Body+0x1a0> Watchdog_Interval last_snapshot = watchdogs->last_snapshot; a0014154: 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(); a0014158: 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 ) { a001415c: e1560002 cmp r6, r2 a0014160: 9a000004 bls a0014178 <_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 ); a0014164: e0621006 rsb r1, r2, r6 a0014168: e1a00008 mov r0, r8 a001416c: e1a02005 mov r2, r5 a0014170: eb001081 bl a001837c <_Watchdog_Adjust_to_chain> a0014174: ea000004 b a001418c <_Timer_server_Body+0x9c> } else if ( snapshot < last_snapshot ) { a0014178: 2a000003 bcs a001418c <_Timer_server_Body+0x9c> /* * 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 ); a001417c: e1a00008 mov r0, r8 a0014180: e3a01001 mov r1, #1 a0014184: e0662002 rsb r2, r6, r2 a0014188: eb001053 bl a00182dc <_Watchdog_Adjust> } watchdogs->last_snapshot = snapshot; a001418c: 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 ); a0014190: e5940078 ldr r0, [r4, #120] ; 0x78 a0014194: eb000284 bl a0014bac <_Chain_Get> if ( timer == NULL ) { a0014198: e2506000 subs r6, r0, #0 a001419c: 0a000009 beq a00141c8 <_Timer_server_Body+0xd8> static void _Timer_server_Insert_timer( Timer_server_Control *ts, Timer_Control *timer ) { if ( timer->the_class == TIMER_INTERVAL_ON_TASK ) { a00141a0: e5963038 ldr r3, [r6, #56] ; 0x38 a00141a4: e3530001 cmp r3, #1 _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); a00141a8: 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 ) { a00141ac: 0a000002 beq a00141bc <_Timer_server_Body+0xcc> _Watchdog_Insert( &ts->Interval_watchdogs.Chain, &timer->Ticker ); } else if ( timer->the_class == TIMER_TIME_OF_DAY_ON_TASK ) { a00141b0: e3530003 cmp r3, #3 a00141b4: 1afffff5 bne a0014190 <_Timer_server_Body+0xa0> _Watchdog_Insert( &ts->TOD_watchdogs.Chain, &timer->Ticker ); a00141b8: e1a00008 mov r0, r8 a00141bc: e2861010 add r1, r6, #16 a00141c0: eb001098 bl a0018428 <_Watchdog_Insert> a00141c4: eafffff1 b a0014190 <_Timer_server_Body+0xa0> * of zero it will be processed in the next iteration of the timer server * body loop. */ _Timer_server_Process_insertions( ts ); _ISR_Disable( level ); a00141c8: ebffff96 bl a0014028 if ( _Chain_Is_empty( insert_chain ) ) { a00141cc: e59d300c ldr r3, [sp, #12] a00141d0: e153000a cmp r3, sl a00141d4: 1a000006 bne a00141f4 <_Timer_server_Body+0x104> ts->insert_chain = NULL; a00141d8: e5846078 str r6, [r4, #120] ; 0x78 a00141dc: 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 ) ) { a00141e0: e59d3000 ldr r3, [sp] a00141e4: e1530007 cmp r3, r7 ) { if ( !_Chain_Is_empty(the_chain)) return _Chain_Get_first_unprotected(the_chain); else return NULL; a00141e8: 13a06000 movne r6, #0 a00141ec: 1a000002 bne a00141fc <_Timer_server_Body+0x10c> a00141f0: ea000013 b a0014244 <_Timer_server_Body+0x154> a00141f4: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED a00141f8: eaffffcc b a0014130 <_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 ); a00141fc: ebffff89 bl a0014028 */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a0014200: e59d2000 ldr r2, [sp] */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Get_unprotected( Chain_Control *the_chain ) { if ( !_Chain_Is_empty(the_chain)) a0014204: e1520007 cmp r2, r7 a0014208: 0a00000b beq a001423c <_Timer_server_Body+0x14c> { Chain_Node *return_node; Chain_Node *new_first; return_node = the_chain->first; new_first = return_node->next; a001420c: e5923000 ldr r3, [r2] watchdog = (Watchdog_Control *) _Chain_Get_unprotected( &fire_chain ); if ( watchdog != NULL ) { a0014210: e3520000 cmp r2, #0 the_chain->first = new_first; a0014214: e58d3000 str r3, [sp] new_first->previous = _Chain_Head(the_chain); a0014218: e5835004 str r5, [r3, #4] a001421c: 0a000006 beq a001423c <_Timer_server_Body+0x14c> watchdog->state = WATCHDOG_INACTIVE; a0014220: e5826008 str r6, [r2, #8] a0014224: 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 ); a0014228: e592301c ldr r3, [r2, #28] a001422c: e5920020 ldr r0, [r2, #32] a0014230: e5921024 ldr r1, [r2, #36] ; 0x24 a0014234: e12fff33 blx r3 } a0014238: eaffffef b a00141fc <_Timer_server_Body+0x10c> a001423c: e129f000 msr CPSR_fc, r0 a0014240: eaffffb8 b a0014128 <_Timer_server_Body+0x38> } else { ts->active = false; a0014244: e3a03000 mov r3, #0 a0014248: e5c4307c strb r3, [r4, #124] ; 0x7c /* * Block until there is something to do. */ _Thread_Disable_dispatch(); a001424c: ebffff79 bl a0014038 <_Thread_Disable_dispatch> _Thread_Set_state( ts->thread, STATES_DELAYING ); a0014250: e3a01008 mov r1, #8 a0014254: e5940000 ldr r0, [r4] a0014258: eb000de2 bl a00179e8 <_Thread_Set_state> _Timer_server_Reset_interval_system_watchdog( ts ); a001425c: e1a00004 mov r0, r4 a0014260: ebffff7a bl a0014050 <_Timer_server_Reset_interval_system_watchdog> _Timer_server_Reset_tod_system_watchdog( ts ); a0014264: e1a00004 mov r0, r4 a0014268: ebffff8c bl a00140a0 <_Timer_server_Reset_tod_system_watchdog> _Thread_Enable_dispatch(); a001426c: eb000b63 bl a0017000 <_Thread_Enable_dispatch> ts->active = true; a0014270: e3a03001 mov r3, #1 a0014274: 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 ); a0014278: e2840008 add r0, r4, #8 a001427c: eb0010bf bl a0018580 <_Watchdog_Remove> static void _Timer_server_Stop_tod_system_watchdog( Timer_server_Control *ts ) { _Watchdog_Remove( &ts->TOD_watchdogs.System_watchdog ); a0014280: e2840040 add r0, r4, #64 ; 0x40 a0014284: eb0010bd bl a0018580 <_Watchdog_Remove> a0014288: eaffffa6 b a0014128 <_Timer_server_Body+0x38> =============================================================================== a0009780 <_Timespec_Greater_than>: bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) a0009780: e5902000 ldr r2, [r0] a0009784: e5913000 ldr r3, [r1] a0009788: e1520003 cmp r2, r3 return true; a000978c: c3a00001 movgt r0, #1 bool _Timespec_Greater_than( const struct timespec *lhs, const struct timespec *rhs ) { if ( lhs->tv_sec > rhs->tv_sec ) a0009790: c12fff1e bxgt lr return true; if ( lhs->tv_sec < rhs->tv_sec ) a0009794: ba000005 blt a00097b0 <_Timespec_Greater_than+0x30> #include #include #include bool _Timespec_Greater_than( a0009798: e5900004 ldr r0, [r0, #4] a000979c: e5913004 ldr r3, [r1, #4] a00097a0: e1500003 cmp r0, r3 a00097a4: d3a00000 movle r0, #0 a00097a8: c3a00001 movgt r0, #1 a00097ac: e12fff1e bx lr { if ( lhs->tv_sec > rhs->tv_sec ) return true; if ( lhs->tv_sec < rhs->tv_sec ) return false; a00097b0: e3a00000 mov r0, #0 <== NOT EXECUTED /* ASSERT: lhs->tv_sec == rhs->tv_sec */ if ( lhs->tv_nsec > rhs->tv_nsec ) return true; return false; } a00097b4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a001f5a4 <__kill>: #endif int __kill( pid_t pid, int sig ) { return 0; } a001f5a4: e3a00000 mov r0, #0 <== NOT EXECUTED a001f5a8: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0010d90 <_exit>: extern void FINI_SYMBOL( void ); #endif void EXIT_SYMBOL(int status) { a0010d90: e1a04000 mov r4, r0 a0010d94: 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(); a0010d98: eb000220 bl a0011620 <___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(); a0010d9c: ebffffde bl a0010d1c rtems_shutdown_executive(status); a0010da0: e1a00004 mov r0, r4 a0010da4: eb000036 bl a0010e84 a0010da8: eafffffe b a0010da8 <_exit+0x18> <== NOT EXECUTED =============================================================================== a0001dec <_gettimeofday>: int _gettimeofday( struct timeval *tp, struct timezone *tzp ) { return gettimeofday( tp, tzp ); a0001dec: eaffffe5 b a0001d88 <== NOT EXECUTED =============================================================================== a0005678 <_rename_r>: int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { a0005678: e92d40f0 push {r4, r5, r6, r7, 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 ); a000567c: e1a00001 mov r0, r1 <== NOT EXECUTED int _rename_r( struct _reent *ptr __attribute__((unused)), const char *old, const char *new ) { a0005680: e24dd048 sub sp, sp, #72 ; 0x48 <== NOT EXECUTED a0005684: e1a04001 mov r4, r1 <== NOT EXECUTED a0005688: e1a07002 mov r7, 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 ); a000568c: ebfffb1d bl a0004308 <== NOT EXECUTED if ( old_parent_pathlen == 0 ) a0005690: e2506000 subs r6, r0, #0 <== NOT EXECUTED a0005694: e28d3018 add r3, sp, #24 <== NOT EXECUTED a0005698: 1a000005 bne a00056b4 <_rename_r+0x3c> <== NOT EXECUTED rtems_filesystem_get_start_loc( old, &i, &old_parent_loc ); a000569c: e1a00004 mov r0, r4 <== NOT EXECUTED a00056a0: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED a00056a4: e1a02003 mov r2, r3 <== NOT EXECUTED a00056a8: eb0000e1 bl a0005a34 <== 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; a00056ac: e1a05006 mov r5, r6 <== NOT EXECUTED a00056b0: ea000008 b a00056d8 <_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, a00056b4: e3a02000 mov r2, #0 <== NOT EXECUTED a00056b8: e58d2000 str r2, [sp] <== NOT EXECUTED a00056bc: e1a00004 mov r0, r4 <== NOT EXECUTED a00056c0: e1a01006 mov r1, r6 <== NOT EXECUTED a00056c4: e2822002 add r2, r2, #2 <== NOT EXECUTED a00056c8: ebfffaf0 bl a0004290 <== NOT EXECUTED RTEMS_LIBIO_PERMS_WRITE, &old_parent_loc, false ); if ( result != 0 ) a00056cc: e3500000 cmp r0, #0 <== NOT EXECUTED a00056d0: 1a000057 bne a0005834 <_rename_r+0x1bc> <== NOT EXECUTED return -1; free_old_parentloc = true; a00056d4: e3a05001 mov r5, #1 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; a00056d8: e28dc02c add ip, sp, #44 ; 0x2c <== NOT EXECUTED a00056dc: e28de018 add lr, sp, #24 <== NOT EXECUTED a00056e0: e8be000f ldm lr!, {r0, r1, r2, r3} <== NOT EXECUTED a00056e4: e8ac000f stmia ip!, {r0, r1, r2, r3} <== NOT EXECUTED a00056e8: e59e3000 ldr r3, [lr] <== NOT EXECUTED name = old + old_parent_pathlen; a00056ec: e0844006 add r4, r4, r6 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a00056f0: e1a00004 mov r0, r4 <== NOT EXECUTED /* * Start from the parent to find the node that should be under it. */ old_loc = old_parent_loc; a00056f4: e58c3000 str r3, [ip] <== NOT EXECUTED name = old + old_parent_pathlen; a00056f8: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a00056fc: eb0032cd bl a0012238 <== NOT EXECUTED a0005700: e1a01000 mov r1, r0 <== NOT EXECUTED a0005704: e1a00004 mov r0, r4 <== NOT EXECUTED a0005708: ebfffb0c bl a0004340 <== NOT EXECUTED a000570c: e0844000 add r4, r4, r0 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), a0005710: 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 ) ); a0005714: e58d4040 str r4, [sp, #64] ; 0x40 <== NOT EXECUTED result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), a0005718: eb0032c6 bl a0012238 <== NOT EXECUTED a000571c: e28d602c add r6, sp, #44 ; 0x2c <== NOT EXECUTED a0005720: e1a01000 mov r1, r0 <== NOT EXECUTED a0005724: e3a02000 mov r2, #0 <== NOT EXECUTED a0005728: e1a00004 mov r0, r4 <== NOT EXECUTED a000572c: e1a03006 mov r3, r6 <== NOT EXECUTED a0005730: e58d2000 str r2, [sp] <== NOT EXECUTED a0005734: ebfffaad bl a00041f0 <== NOT EXECUTED 0, &old_loc, false ); if ( result != 0 ) { a0005738: e3500000 cmp r0, #0 <== NOT EXECUTED a000573c: 0a000003 beq a0005750 <_rename_r+0xd8> <== NOT EXECUTED if ( free_old_parentloc ) a0005740: e3550000 cmp r5, #0 <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); a0005744: 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 ) a0005748: 0a000039 beq a0005834 <_rename_r+0x1bc> <== NOT EXECUTED a000574c: ea000014 b a00057a4 <_rename_r+0x12c> <== NOT EXECUTED /* * Get the parent of the new node we are renaming to. */ rtems_filesystem_get_start_loc( new, &i, &new_parent_loc ); a0005750: e28d4004 add r4, sp, #4 <== NOT EXECUTED a0005754: e1a00007 mov r0, r7 <== NOT EXECUTED a0005758: e28d1044 add r1, sp, #68 ; 0x44 <== NOT EXECUTED a000575c: e1a02004 mov r2, r4 <== NOT EXECUTED a0005760: eb0000b3 bl a0005a34 <== NOT EXECUTED result = (*new_parent_loc.ops->evalformake_h)( &new[i], &new_parent_loc, &name ); a0005764: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED a0005768: e59d0044 ldr r0, [sp, #68] ; 0x44 <== NOT EXECUTED a000576c: e1a01004 mov r1, r4 <== NOT EXECUTED a0005770: e5933004 ldr r3, [r3, #4] <== NOT EXECUTED a0005774: e0870000 add r0, r7, r0 <== NOT EXECUTED a0005778: e28d2040 add r2, sp, #64 ; 0x40 <== NOT EXECUTED a000577c: e12fff33 blx r3 <== NOT EXECUTED if ( result != 0 ) { a0005780: e3500000 cmp r0, #0 <== NOT EXECUTED a0005784: 0a000008 beq a00057ac <_rename_r+0x134> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); a0005788: e1a00004 mov r0, r4 <== NOT EXECUTED a000578c: ebfffafa bl a000437c <== NOT EXECUTED if ( free_old_parentloc ) a0005790: e3550000 cmp r5, #0 <== NOT EXECUTED a0005794: 0a000001 beq a00057a0 <_rename_r+0x128> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); a0005798: e28d0018 add r0, sp, #24 <== NOT EXECUTED a000579c: ebfffaf6 bl a000437c <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); a00057a0: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED a00057a4: ebfffaf4 bl a000437c <== NOT EXECUTED a00057a8: ea000021 b a0005834 <_rename_r+0x1bc> <== 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 ) { a00057ac: e59d3014 ldr r3, [sp, #20] <== NOT EXECUTED a00057b0: e59d2028 ldr r2, [sp, #40] ; 0x28 <== NOT EXECUTED a00057b4: e1520003 cmp r2, r3 <== NOT EXECUTED a00057b8: 0a00000b beq a00057ec <_rename_r+0x174> <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); a00057bc: e1a00004 mov r0, r4 <== NOT EXECUTED a00057c0: ebfffaed bl a000437c <== NOT EXECUTED if ( free_old_parentloc ) a00057c4: e3550000 cmp r5, #0 <== NOT EXECUTED a00057c8: 0a000001 beq a00057d4 <_rename_r+0x15c> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); a00057cc: e28d0018 add r0, sp, #24 <== NOT EXECUTED a00057d0: ebfffae9 bl a000437c <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); a00057d4: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED a00057d8: ebfffae7 bl a000437c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EXDEV ); a00057dc: eb0025b0 bl a000eea4 <__errno> <== NOT EXECUTED a00057e0: e3a03012 mov r3, #18 <== NOT EXECUTED a00057e4: e5803000 str r3, [r0] <== NOT EXECUTED a00057e8: ea000011 b a0005834 <_rename_r+0x1bc> <== NOT EXECUTED } result = (*new_parent_loc.ops->rename_h)( &old_parent_loc, &old_loc, &new_parent_loc, name ); a00057ec: e59d3010 ldr r3, [sp, #16] <== NOT EXECUTED a00057f0: e28d7018 add r7, sp, #24 <== NOT EXECUTED a00057f4: e1a01006 mov r1, r6 <== NOT EXECUTED a00057f8: e593c040 ldr ip, [r3, #64] ; 0x40 <== NOT EXECUTED a00057fc: e1a02004 mov r2, r4 <== NOT EXECUTED a0005800: e59d3040 ldr r3, [sp, #64] ; 0x40 <== NOT EXECUTED a0005804: e1a00007 mov r0, r7 <== NOT EXECUTED a0005808: e12fff3c blx ip <== NOT EXECUTED a000580c: e1a06000 mov r6, r0 <== NOT EXECUTED rtems_filesystem_freenode( &new_parent_loc ); a0005810: e1a00004 mov r0, r4 <== NOT EXECUTED a0005814: ebfffad8 bl a000437c <== NOT EXECUTED if ( free_old_parentloc ) a0005818: e3550000 cmp r5, #0 <== NOT EXECUTED a000581c: 0a000001 beq a0005828 <_rename_r+0x1b0> <== NOT EXECUTED rtems_filesystem_freenode( &old_parent_loc ); a0005820: e1a00007 mov r0, r7 <== NOT EXECUTED a0005824: ebfffad4 bl a000437c <== NOT EXECUTED rtems_filesystem_freenode( &old_loc ); a0005828: e28d002c add r0, sp, #44 ; 0x2c <== NOT EXECUTED a000582c: ebfffad2 bl a000437c <== NOT EXECUTED return result; a0005830: ea000000 b a0005838 <_rename_r+0x1c0> <== 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; a0005834: e3e06000 mvn r6, #0 <== NOT EXECUTED if ( free_old_parentloc ) rtems_filesystem_freenode( &old_parent_loc ); rtems_filesystem_freenode( &old_loc ); return result; } a0005838: e1a00006 mov r0, r6 <== NOT EXECUTED a000583c: e28dd048 add sp, sp, #72 ; 0x48 <== NOT EXECUTED a0005840: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED =============================================================================== a0005684 <_unlink_r>: int _unlink_r( struct _reent *ptr __attribute__((unused)), const char *path ) { return unlink( path ); a0005684: e1a00001 mov r0, r1 <== NOT EXECUTED a0005688: eaffffa8 b a0005530 <== NOT EXECUTED =============================================================================== a0001b04 : #include int chroot( const char *pathname ) { a0001b04: 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) { a0001b08: e59f50b4 ldr r5, [pc, #180] ; a0001bc4 a0001b0c: e59f30b4 ldr r3, [pc, #180] ; a0001bc8 #include int chroot( const char *pathname ) { a0001b10: e24dd018 sub sp, sp, #24 int result; rtems_filesystem_location_info_t loc; /* an automatic call to new private env the first time */ if (rtems_current_user_env == &rtems_global_user_env) { a0001b14: e5954000 ldr r4, [r5] #include int chroot( const char *pathname ) { a0001b18: 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) { a0001b1c: e1540003 cmp r4, r3 a0001b20: 1a000007 bne a0001b44 rtems_libio_set_private_env(); /* try to set a new private env*/ a0001b24: eb0004c9 bl a0002e50 if (rtems_current_user_env == &rtems_global_user_env) /* not ok */ a0001b28: e5953000 ldr r3, [r5] a0001b2c: e1530004 cmp r3, r4 a0001b30: 1a000003 bne a0001b44 rtems_set_errno_and_return_minus_one( ENOTSUP ); a0001b34: eb00295d bl a000c0b0 <__errno> <== NOT EXECUTED a0001b38: e3a03086 mov r3, #134 ; 0x86 <== NOT EXECUTED a0001b3c: e5803000 str r3, [r0] <== NOT EXECUTED a0001b40: ea000008 b a0001b68 <== NOT EXECUTED } result = chdir(pathname); a0001b44: e1a00006 mov r0, r6 a0001b48: eb001fa4 bl a00099e0 if (result) { a0001b4c: e2502000 subs r2, r0, #0 a0001b50: 0a000006 beq a0001b70 rtems_set_errno_and_return_minus_one( errno ); a0001b54: eb002955 bl a000c0b0 <__errno> <== NOT EXECUTED a0001b58: e1a04000 mov r4, r0 <== NOT EXECUTED a0001b5c: eb002953 bl a000c0b0 <__errno> <== NOT EXECUTED a0001b60: e5903000 ldr r3, [r0] <== NOT EXECUTED a0001b64: e5843000 str r3, [r4] <== NOT EXECUTED a0001b68: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001b6c: ea000012 b a0001bbc <== NOT EXECUTED } /* clone the new root location */ if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { a0001b70: e28d4004 add r4, sp, #4 a0001b74: e59f0050 ldr r0, [pc, #80] ; a0001bcc a0001b78: e3a01001 mov r1, #1 a0001b7c: e1a03004 mov r3, r4 a0001b80: e58d2000 str r2, [sp] a0001b84: eb000059 bl a0001cf0 a0001b88: e2505000 subs r5, r0, #0 a0001b8c: 1afffff0 bne a0001b54 /* 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); a0001b90: e59f602c ldr r6, [pc, #44] ; a0001bc4 a0001b94: e5960000 ldr r0, [r6] a0001b98: e2800018 add r0, r0, #24 a0001b9c: eb00008e bl a0001ddc rtems_filesystem_root = loc; a0001ba0: e8b4000f ldm r4!, {r0, r1, r2, r3} a0001ba4: e596c000 ldr ip, [r6] a0001ba8: e28cc018 add ip, ip, #24 a0001bac: e8ac000f stmia ip!, {r0, r1, r2, r3} a0001bb0: e5943000 ldr r3, [r4] return 0; a0001bb4: e1a00005 mov r0, r5 if (rtems_filesystem_evaluate_path(".", 1, 0, &loc, 0)) { /* our cwd has changed, though - but there is no easy way of return :-( */ rtems_set_errno_and_return_minus_one( errno ); } rtems_filesystem_freenode(&rtems_filesystem_root); rtems_filesystem_root = loc; a0001bb8: e58c3000 str r3, [ip] return 0; } a0001bbc: e28dd018 add sp, sp, #24 a0001bc0: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a00084ec : const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { a00084ec: 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; a00084f0: e5936000 ldr r6, [r3] const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { a00084f4: e1a09000 mov r9, r0 a00084f8: e1a04001 mov r4, r1 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) a00084fc: e3560000 cmp r6, #0 const char *pathname, size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc ) { a0008500: 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) a0008504: 13a07000 movne r7, #0 rtems_set_errno_and_return_minus_one( EFAULT ); for (i = 0; i < rtems_device_table_size; i++) { a0008508: 159fa094 ldrne sl, [pc, #148] ; a00085a4 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) a000850c: 1a00001c bne a0008584 rtems_set_errno_and_return_minus_one( EFAULT ); a0008510: eb00064f bl a0009e54 <__errno> <== NOT EXECUTED a0008514: e3a0300e mov r3, #14 <== NOT EXECUTED a0008518: e5803000 str r3, [r0] <== NOT EXECUTED a000851c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0008520: 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) a0008524: e5968000 ldr r8, [r6] a0008528: e3580000 cmp r8, #0 a000852c: 0a000012 beq a000857c continue; if (strncmp(pathname, device_name_table[i].device_name, pathnamelen) != 0) a0008530: e1a00009 mov r0, r9 a0008534: e1a01008 mov r1, r8 a0008538: e1a02004 mov r2, r4 a000853c: eb000a0d bl a000ad78 a0008540: e3500000 cmp r0, #0 a0008544: 1a00000c bne a000857c continue; if (device_name_table[i].device_name[pathnamelen] != '\0') a0008548: e7d80004 ldrb r0, [r8, r4] a000854c: e3500000 cmp r0, #0 a0008550: 1a000009 bne a000857c continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; pathloc->handlers = &devFS_file_handlers; a0008554: e59f304c ldr r3, [pc, #76] ; a00085a8 if (device_name_table[i].device_name[pathnamelen] != '\0') continue; /* find the device, set proper values */ pathloc->node_access = (void *)&device_name_table[i]; a0008558: e5856000 str r6, [r5] pathloc->handlers = &devFS_file_handlers; a000855c: e5853008 str r3, [r5, #8] pathloc->ops = &devFS_ops; a0008560: e59f3044 ldr r3, [pc, #68] ; a00085ac a0008564: e585300c str r3, [r5, #12] pathloc->mt_entry = rtems_filesystem_root.mt_entry; a0008568: e59f3040 ldr r3, [pc, #64] ; a00085b0 a000856c: e5933000 ldr r3, [r3] a0008570: e5933028 ldr r3, [r3, #40] ; 0x28 a0008574: e5853010 str r3, [r5, #16] return 0; a0008578: 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++) { a000857c: e2877001 add r7, r7, #1 a0008580: e2866014 add r6, r6, #20 a0008584: e59a3000 ldr r3, [sl] a0008588: e1570003 cmp r7, r3 a000858c: 3affffe4 bcc a0008524 pathloc->mt_entry = rtems_filesystem_root.mt_entry; return 0; } /* no such file or directory */ rtems_set_errno_and_return_minus_one( ENOENT ); a0008590: eb00062f bl a0009e54 <__errno> a0008594: e3a03002 mov r3, #2 a0008598: e5803000 str r3, [r0] a000859c: e3e00000 mvn r0, #0 } a00085a0: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a000145c : int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { a000145c: 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( a0001460: e59f7058 ldr r7, [pc, #88] ; a00014c0 int devFS_initialize( rtems_filesystem_mount_table_entry_t *temp_mt_entry, const void *data ) { a0001464: 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( a0001468: e3a06014 mov r6, #20 a000146c: e5970000 ldr r0, [r7] a0001470: e0000096 mul r0, r6, r0 a0001474: eb001a9a bl a0007ee4 <_Workspace_Allocate> sizeof( rtems_device_name_t ) * ( rtems_device_table_size ) ); /* no memory for device filesystem */ if (!device_name_table) a0001478: e2505000 subs r5, r0, #0 a000147c: 1a000004 bne a0001494 rtems_set_errno_and_return_minus_one( ENOMEM ); a0001480: eb002273 bl a0009e54 <__errno> <== NOT EXECUTED a0001484: e3a0300c mov r3, #12 <== NOT EXECUTED a0001488: e5803000 str r3, [r0] <== NOT EXECUTED a000148c: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001490: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED memset( a0001494: e5972000 ldr r2, [r7] a0001498: e3a01000 mov r1, #0 a000149c: e0020296 mul r2, r6, r2 a00014a0: eb0024d8 bl a000a808 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; a00014a4: e59f3018 ldr r3, [pc, #24] ; a00014c4 temp_mt_entry->mt_fs_root.ops = &devFS_ops; /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; a00014a8: e584501c str r5, [r4, #28] return 0; a00014ac: e3a00000 mov r0, #0 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; a00014b0: e5843024 str r3, [r4, #36] ; 0x24 temp_mt_entry->mt_fs_root.ops = &devFS_ops; a00014b4: e2833038 add r3, r3, #56 ; 0x38 a00014b8: e5843028 str r3, [r4, #40] ; 0x28 /* Set the node_access to device name table */ temp_mt_entry->mt_fs_root.node_access = (void *)device_name_table; return 0; } a00014bc: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000167c : int devFS_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a000167c: e92d400f push {r0, r1, r2, r3, lr} rtems_libio_ioctl_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; a0001680: e5903018 ldr r3, [r0, #24] args.iop = iop; a0001684: e88d0007 stm sp, {r0, r1, r2} args.command = command; args.buffer = buffer; status = rtems_io_control( a0001688: e5930008 ldr r0, [r3, #8] a000168c: e593100c ldr r1, [r3, #12] a0001690: e1a0200d mov r2, sp a0001694: eb000f17 bl a00052f8 np->major, np->minor, (void *) &args ); if ( status ) a0001698: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; a000169c: 059d000c ldreq r0, [sp, #12] np->major, np->minor, (void *) &args ); if ( status ) a00016a0: 0a000000 beq a00016a8 return rtems_deviceio_errno(status); a00016a4: eb001bc5 bl a00085c0 <== NOT EXECUTED return args.ioctl_return; } a00016a8: e28dd010 add sp, sp, #16 a00016ac: e8bd8000 pop {pc} =============================================================================== a00014c8 : const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { a00014c8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} a00014cc: e58d2000 str r2, [sp] a00014d0: 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') && a00014d4: e5d03000 ldrb r3, [r0] const char *path, mode_t mode, dev_t dev, rtems_filesystem_location_info_t *pathloc ) { a00014d8: e1a04000 mov r4, r0 a00014dc: 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') && a00014e0: e3530064 cmp r3, #100 ; 0x64 a00014e4: 1a000008 bne a000150c a00014e8: e5d03001 ldrb r3, [r0, #1] a00014ec: e3530065 cmp r3, #101 ; 0x65 a00014f0: 1a000005 bne a000150c a00014f4: e5d03002 ldrb r3, [r0, #2] a00014f8: e3530076 cmp r3, #118 ; 0x76 a00014fc: 1a000002 bne a000150c (path[2] == 'v') && (path[3] == '\0')) a0001500: e5d00003 ldrb r0, [r0, #3] a0001504: e3500000 cmp r0, #0 a0001508: 0a000039 beq a00015f4 return 0; /* must be a character device or a block device */ if (!S_ISBLK(mode) && !S_ISCHR(mode)) a000150c: e205aa0f and sl, r5, #61440 ; 0xf000 a0001510: e35a0a02 cmp sl, #8192 ; 0x2000 a0001514: 135a0a06 cmpne sl, #24576 ; 0x6000 a0001518: 03a0a000 moveq sl, #0 a000151c: 13a0a001 movne sl, #1 a0001520: 0a000002 beq a0001530 rtems_set_errno_and_return_minus_one( EINVAL ); a0001524: eb00224a bl a0009e54 <__errno> <== NOT EXECUTED a0001528: e3a03016 mov r3, #22 <== NOT EXECUTED a000152c: ea000008 b a0001554 <== 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; a0001530: e59d3028 ldr r3, [sp, #40] ; 0x28 a0001534: e5936000 ldr r6, [r3] if (!device_name_table) a0001538: e3560000 cmp r6, #0 a000153c: 13e07000 mvnne r7, #0 a0001540: 11a0800a movne r8, sl rtems_set_errno_and_return_minus_one( EFAULT ); for (slot = -1, i = 0; i < rtems_device_table_size; i++){ a0001544: 159fb0ac ldrne fp, [pc, #172] ; a00015f8 a0001548: 1a000011 bne a0001594 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 ); a000154c: eb002240 bl a0009e54 <__errno> <== NOT EXECUTED a0001550: e3a0300e mov r3, #14 <== NOT EXECUTED a0001554: e5803000 str r3, [r0] <== NOT EXECUTED a0001558: e3e00000 mvn r0, #0 <== NOT EXECUTED a000155c: ea000024 b a00015f4 <== NOT EXECUTED for (slot = -1, i = 0; i < rtems_device_table_size; i++){ if (device_name_table[i].device_name == NULL) a0001560: e796100a ldr r1, [r6, sl] a0001564: e3510000 cmp r1, #0 a0001568: 0a000006 beq a0001588 slot = i; else if (strcmp(path, device_name_table[i].device_name) == 0) a000156c: e1a00004 mov r0, r4 <== NOT EXECUTED a0001570: eb002520 bl a000a9f8 <== NOT EXECUTED a0001574: e3500000 cmp r0, #0 <== NOT EXECUTED a0001578: 1a000003 bne a000158c <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EEXIST ); a000157c: eb002234 bl a0009e54 <__errno> <== NOT EXECUTED a0001580: e3a03011 mov r3, #17 <== NOT EXECUTED a0001584: eafffff2 b a0001554 <== 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; a0001588: 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++){ a000158c: e2888001 add r8, r8, #1 a0001590: e28aa014 add sl, sl, #20 a0001594: e59b3000 ldr r3, [fp] a0001598: e1580003 cmp r8, r3 a000159c: 3affffef bcc a0001560 else if (strcmp(path, device_name_table[i].device_name) == 0) rtems_set_errno_and_return_minus_one( EEXIST ); } if (slot == -1) a00015a0: e3770001 cmn r7, #1 a00015a4: 1a000004 bne a00015bc rtems_set_errno_and_return_minus_one( ENOMEM ); a00015a8: eb002229 bl a0009e54 <__errno> <== NOT EXECUTED a00015ac: e3a0300c mov r3, #12 <== NOT EXECUTED a00015b0: e5803000 str r3, [r0] <== NOT EXECUTED a00015b4: e1a00007 mov r0, r7 <== NOT EXECUTED a00015b8: ea00000d b a00015f4 <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a00015bc: e10fa000 mrs sl, CPSR a00015c0: e38a3080 orr r3, sl, #128 ; 0x80 a00015c4: e129f003 msr CPSR_fc, r3 _ISR_Disable(level); device_name_table[slot].device_name = (char *)path; a00015c8: e3a03014 mov r3, #20 a00015cc: e0070793 mul r7, r3, r7 device_name_table[slot].device_name_length = strlen(path); a00015d0: 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; a00015d4: e7864007 str r4, [r6, r7] device_name_table[slot].device_name_length = strlen(path); a00015d8: eb0025ce bl a000ad18 device_name_table[slot].major = major; a00015dc: 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; a00015e0: e0868007 add r8, r6, r7 device_name_table[slot].device_name_length = strlen(path); a00015e4: e9880209 stmib r8, {r0, r3, r9} device_name_table[slot].major = major; device_name_table[slot].minor = minor; device_name_table[slot].mode = mode; a00015e8: e5885010 str r5, [r8, #16] static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a00015ec: e129f00a msr CPSR_fc, sl _ISR_Enable(level); return 0; a00015f0: e3a00000 mov r0, #0 } a00015f4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a00016e0 : ssize_t devFS_read( rtems_libio_t *iop, void *buffer, size_t count ) { a00016e0: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} <== NOT EXECUTED rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; a00016e4: e280c00c add ip, r0, #12 <== NOT EXECUTED a00016e8: e89c1800 ldm ip, {fp, ip} <== NOT EXECUTED args.buffer = buffer; args.count = count; a00016ec: e58d2010 str r2, [sp, #16] <== NOT EXECUTED args.flags = iop->flags; a00016f0: e5902014 ldr r2, [r0, #20] <== NOT EXECUTED { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; a00016f4: e5903018 ldr r3, [r0, #24] <== NOT EXECUTED args.iop = iop; a00016f8: e58d0000 str r0, [sp] <== NOT EXECUTED args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; a00016fc: e58d2014 str r2, [sp, #20] <== NOT EXECUTED args.bytes_moved = 0; a0001700: e3a02000 mov r2, #0 <== NOT EXECUTED np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; a0001704: e58d100c str r1, [sp, #12] <== NOT EXECUTED args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a0001708: e58d2018 str r2, [sp, #24] <== NOT EXECUTED status = rtems_io_read( a000170c: e5930008 ldr r0, [r3, #8] <== NOT EXECUTED a0001710: e593100c ldr r1, [r3, #12] <== NOT EXECUTED a0001714: 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; a0001718: 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( a000171c: eb000f53 bl a0005470 <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) a0001720: e3500000 cmp r0, #0 <== NOT EXECUTED return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a0001724: 059d0018 ldreq r0, [sp, #24] <== NOT EXECUTED np->major, np->minor, (void *) &args ); if ( status ) a0001728: 0a000000 beq a0001730 <== NOT EXECUTED return rtems_deviceio_errno(status); a000172c: eb001ba3 bl a00085c0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } a0001730: e28dd01c add sp, sp, #28 <== NOT EXECUTED a0001734: e8bd8800 pop {fp, pc} <== NOT EXECUTED =============================================================================== a0001738 : struct stat *buf ) { rtems_device_name_t *the_dev; the_dev = (rtems_device_name_t *)loc->node_access; a0001738: e5903000 ldr r3, [r0] int devFS_stat( rtems_filesystem_location_info_t *loc, struct stat *buf ) { a000173c: 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) a0001740: e3530000 cmp r3, #0 a0001744: 1a000004 bne a000175c rtems_set_errno_and_return_minus_one( EFAULT ); a0001748: eb0021c1 bl a0009e54 <__errno> <== NOT EXECUTED a000174c: e3a0300e mov r3, #14 <== NOT EXECUTED a0001750: e5803000 str r3, [r0] <== NOT EXECUTED a0001754: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001758: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED rtems_device_minor_number _minor ) { union __rtems_dev_t temp; temp.__overlay.major = _major; a000175c: e2830008 add r0, r3, #8 a0001760: e890000d ldm r0, {r0, r2, r3} buf->st_rdev = rtems_filesystem_make_dev_t( the_dev->major, the_dev->minor ); a0001764: e5810018 str r0, [r1, #24] a0001768: e581201c str r2, [r1, #28] buf->st_mode = the_dev->mode; a000176c: e581300c str r3, [r1, #12] return 0; a0001770: e3a00000 mov r0, #0 } a0001774: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0001778 : ssize_t devFS_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a0001778: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; a000177c: e280c00c add ip, r0, #12 a0001780: e89c1800 ldm ip, {fp, ip} args.buffer = (void *) buffer; args.count = count; a0001784: e58d2010 str r2, [sp, #16] args.flags = iop->flags; a0001788: e5902014 ldr r2, [r0, #20] { rtems_libio_rw_args_t args; rtems_status_code status; rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; a000178c: e5903018 ldr r3, [r0, #24] args.iop = iop; a0001790: e58d0000 str r0, [sp] args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; a0001794: e58d2014 str r2, [sp, #20] args.bytes_moved = 0; a0001798: e3a02000 mov r2, #0 np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; a000179c: e58d100c str r1, [sp, #12] args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a00017a0: e58d2018 str r2, [sp, #24] status = rtems_io_write( a00017a4: e5930008 ldr r0, [r3, #8] a00017a8: e593100c ldr r1, [r3, #12] a00017ac: e1a0200d mov r2, sp rtems_device_name_t *np; np = (rtems_device_name_t *)iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; a00017b0: e98d1800 stmib sp, {fp, ip} args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( a00017b4: eb000f42 bl a00054c4 np->major, np->minor, (void *) &args ); if ( status ) a00017b8: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a00017bc: 059d0018 ldreq r0, [sp, #24] np->major, np->minor, (void *) &args ); if ( status ) a00017c0: 0a000000 beq a00017c8 return rtems_deviceio_errno(status); a00017c4: eb001b7d bl a00085c0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } a00017c8: e28dd01c add sp, sp, #28 a00017cc: e8bd8800 pop {fp, pc} =============================================================================== a000b4c0 : rtems_libio_t *iop, rtems_off64_t length ) { return 0; } a000b4c0: e3a00000 mov r0, #0 <== NOT EXECUTED a000b4c4: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000b480 : int device_ioctl( rtems_libio_t *iop, uint32_t command, void *buffer ) { a000b480: e92d400f push {r0, r1, r2, r3, lr} args.iop = iop; args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; a000b484: e5903018 ldr r3, [r0, #24] { rtems_libio_ioctl_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; args.iop = iop; a000b488: e88d0007 stm sp, {r0, r1, r2} args.command = command; args.buffer = buffer; the_jnode = iop->pathinfo.node_access; status = rtems_io_control( a000b48c: e5930050 ldr r0, [r3, #80] ; 0x50 a000b490: e5931054 ldr r1, [r3, #84] ; 0x54 a000b494: e1a0200d mov r2, sp a000b498: eb000171 bl a000ba64 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a000b49c: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return args.ioctl_return; a000b4a0: 059d000c ldreq r0, [sp, #12] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a000b4a4: 0a000000 beq a000b4ac return rtems_deviceio_errno(status); a000b4a8: eb000200 bl a000bcb0 <== NOT EXECUTED return args.ioctl_return; } a000b4ac: e28dd010 add sp, sp, #16 a000b4b0: e8bd8000 pop {pc} =============================================================================== a000b3d0 : ssize_t device_read( rtems_libio_t *iop, void *buffer, size_t count ) { a000b3d0: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; a000b3d4: e280c00c add ip, r0, #12 a000b3d8: e89c1800 ldm ip, {fp, ip} args.buffer = buffer; args.count = count; a000b3dc: e58d2010 str r2, [sp, #16] args.flags = iop->flags; a000b3e0: e5902014 ldr r2, [r0, #20] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000b3e4: e5903018 ldr r3, [r0, #24] args.iop = iop; a000b3e8: e58d0000 str r0, [sp] args.offset = iop->offset; args.buffer = buffer; args.count = count; args.flags = iop->flags; a000b3ec: e58d2014 str r2, [sp, #20] args.bytes_moved = 0; a000b3f0: e3a02000 mov r2, #0 the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = buffer; a000b3f4: e58d100c str r1, [sp, #12] args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a000b3f8: e58d2018 str r2, [sp, #24] status = rtems_io_read( a000b3fc: e5930050 ldr r0, [r3, #80] ; 0x50 a000b400: e5931054 ldr r1, [r3, #84] ; 0x54 a000b404: e1a0200d mov r2, sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; a000b408: e98d1800 stmib sp, {fp, ip} args.buffer = buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_read( a000b40c: eb0001be bl a000bb0c the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a000b410: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a000b414: 059d0018 ldreq r0, [sp, #24] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a000b418: 0a000000 beq a000b420 return rtems_deviceio_errno(status); a000b41c: eb000223 bl a000bcb0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } a000b420: e28dd01c add sp, sp, #28 a000b424: e8bd8800 pop {fp, pc} =============================================================================== a000b428 : ssize_t device_write( rtems_libio_t *iop, const void *buffer, size_t count ) { a000b428: e92d487f push {r0, r1, r2, r3, r4, r5, r6, fp, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; a000b42c: e280c00c add ip, r0, #12 a000b430: e89c1800 ldm ip, {fp, ip} args.buffer = (void *) buffer; args.count = count; a000b434: e58d2010 str r2, [sp, #16] args.flags = iop->flags; a000b438: e5902014 ldr r2, [r0, #20] { rtems_libio_rw_args_t args; rtems_status_code status; IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000b43c: e5903018 ldr r3, [r0, #24] args.iop = iop; a000b440: e58d0000 str r0, [sp] args.offset = iop->offset; args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; a000b444: e58d2014 str r2, [sp, #20] args.bytes_moved = 0; a000b448: e3a02000 mov r2, #0 the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; args.buffer = (void *) buffer; a000b44c: e58d100c str r1, [sp, #12] args.count = count; args.flags = iop->flags; args.bytes_moved = 0; a000b450: e58d2018 str r2, [sp, #24] status = rtems_io_write( a000b454: e5930050 ldr r0, [r3, #80] ; 0x50 a000b458: e5931054 ldr r1, [r3, #84] ; 0x54 a000b45c: e1a0200d mov r2, sp IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; args.iop = iop; args.offset = iop->offset; a000b460: e98d1800 stmib sp, {fp, ip} args.buffer = (void *) buffer; args.count = count; args.flags = iop->flags; args.bytes_moved = 0; status = rtems_io_write( a000b464: eb0001bd bl a000bb60 the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a000b468: e3500000 cmp r0, #0 return rtems_deviceio_errno(status); return (ssize_t) args.bytes_moved; a000b46c: 059d0018 ldreq r0, [sp, #24] the_jnode->info.device.major, the_jnode->info.device.minor, (void *) &args ); if ( status ) a000b470: 0a000000 beq a000b478 return rtems_deviceio_errno(status); a000b474: eb00020d bl a000bcb0 <== NOT EXECUTED return (ssize_t) args.bytes_moved; } a000b478: e28dd01c add sp, sp, #28 a000b47c: e8bd8800 pop {fp, pc} =============================================================================== a0002b58 : drainOutput (struct rtems_termios_tty *tty) { rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002b58: e59030b4 ldr r3, [r0, #180] ; 0xb4 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { a0002b5c: e92d4030 push {r4, r5, lr} rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002b60: e3530000 cmp r3, #0 /* * Drain output queue */ static void drainOutput (struct rtems_termios_tty *tty) { a0002b64: e1a04000 mov r4, r0 rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts != TERMIOS_POLLED) { a0002b68: 0a000011 beq a0002bb4 rtems_interrupt_disable (level); a0002b6c: ebfffff5 bl a0002b48 while (tty->rawOutBuf.Tail != tty->rawOutBuf.Head) { tty->rawOutBufState = rob_wait; a0002b70: 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) { a0002b74: ea000009 b a0002ba0 tty->rawOutBufState = rob_wait; a0002b78: e5845094 str r5, [r4, #148] ; 0x94 <== NOT EXECUTED static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0002b7c: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( a0002b80: e3a01000 mov r1, #0 <== NOT EXECUTED a0002b84: e594008c ldr r0, [r4, #140] ; 0x8c <== NOT EXECUTED a0002b88: e1a02001 mov r2, r1 <== NOT EXECUTED a0002b8c: eb0008c9 bl a0004eb8 <== NOT EXECUTED tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0002b90: e3500000 cmp r0, #0 <== NOT EXECUTED a0002b94: 0a000000 beq a0002b9c <== NOT EXECUTED rtems_fatal_error_occurred (sc); a0002b98: eb000a5c bl a0005510 <== NOT EXECUTED rtems_interrupt_disable (level); a0002b9c: ebffffe9 bl a0002b48 <== 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) { a0002ba0: e5942084 ldr r2, [r4, #132] ; 0x84 a0002ba4: e5943080 ldr r3, [r4, #128] ; 0x80 a0002ba8: e1520003 cmp r2, r3 a0002bac: 1afffff1 bne a0002b78 a0002bb0: e129f000 msr CPSR_fc, r0 a0002bb4: e8bd8030 pop {r4, r5, pc} =============================================================================== a0002370 : int dup2( int fildes, int fildes2 ) { a0002370: e92d4070 push {r4, r5, r6, lr} a0002374: e24dd048 sub sp, sp, #72 ; 0x48 a0002378: e1a04001 mov r4, r1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); a000237c: e1a0100d mov r1, sp int dup2( int fildes, int fildes2 ) { a0002380: e1a06000 mov r6, r0 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); a0002384: eb000179 bl a0002970 if ( status == -1 ) a0002388: e3700001 cmn r0, #1 /* * If fildes is not valid, then fildes2 should not be closed. */ status = fstat( fildes, &buf ); a000238c: e1a0500d mov r5, sp if ( status == -1 ) a0002390: 0a000008 beq a00023b8 /* * If fildes2 is not valid, then we should not do anything either. */ status = fstat( fildes2, &buf ); a0002394: e1a00004 mov r0, r4 a0002398: e1a0100d mov r1, sp a000239c: eb000173 bl a0002970 if ( status == -1 ) a00023a0: e3700001 cmn r0, #1 a00023a4: 0a000003 beq a00023b8 /* * This fcntl handles everything else. */ return fcntl( fildes, F_DUPFD, fildes2 ); a00023a8: e1a00006 mov r0, r6 <== NOT EXECUTED a00023ac: e3a01000 mov r1, #0 <== NOT EXECUTED a00023b0: e1a02004 mov r2, r4 <== NOT EXECUTED a00023b4: eb000067 bl a0002558 <== NOT EXECUTED } a00023b8: e28dd048 add sp, sp, #72 ; 0x48 a00023bc: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a0003824 : * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { if (tty->ccount == 0) a0003824: e5903020 ldr r3, [r0, #32] * FIXME: Needs support for WERASE and ECHOPRT. * FIXME: Some of the tests should check for IEXTEN, too. */ static void erase (struct rtems_termios_tty *tty, int lineFlag) { a0003828: e92d41f0 push {r4, r5, r6, r7, r8, lr} if (tty->ccount == 0) a000382c: 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) { a0003830: e1a04000 mov r4, r0 a0003834: e1a07001 mov r7, r1 if (tty->ccount == 0) a0003838: 0a000067 beq a00039dc return; if (lineFlag) { a000383c: e3510000 cmp r1, #0 a0003840: 0a000061 beq a00039cc if (!(tty->termios.c_lflag & ECHO)) { a0003844: e590303c ldr r3, [r0, #60] ; 0x3c a0003848: e2132008 ands r2, r3, #8 a000384c: 1a000001 bne a0003858 tty->ccount = 0; a0003850: e5802020 str r2, [r0, #32] <== NOT EXECUTED return; a0003854: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED } if (!(tty->termios.c_lflag & ECHOE)) { a0003858: e2133010 ands r3, r3, #16 a000385c: 1a00005a bne a00039cc tty->ccount = 0; a0003860: e5803020 str r3, [r0, #32] <== NOT EXECUTED echo (tty->termios.c_cc[VKILL], tty); a0003864: e1a01004 mov r1, r4 <== NOT EXECUTED a0003868: e5d00044 ldrb r0, [r0, #68] ; 0x44 <== NOT EXECUTED a000386c: ebffffc9 bl a0003798 <== NOT EXECUTED if (tty->termios.c_lflag & ECHOK) a0003870: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED a0003874: e3130020 tst r3, #32 <== NOT EXECUTED echo ('\n', tty); a0003878: 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) a000387c: 0a000056 beq a00039dc <== NOT EXECUTED a0003880: ea00000b b a00038b4 <== NOT EXECUTED } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; if (tty->termios.c_lflag & ECHO) { a0003884: e594303c ldr r3, [r4, #60] ; 0x3c return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; a0003888: e594001c ldr r0, [r4, #28] a000388c: e2411001 sub r1, r1, #1 a0003890: e5841020 str r1, [r4, #32] if (tty->termios.c_lflag & ECHO) { a0003894: e3130008 tst r3, #8 return; } } while (tty->ccount) { unsigned char c = tty->cbuf[--tty->ccount]; a0003898: e7d05001 ldrb r5, [r0, r1] if (tty->termios.c_lflag & ECHO) { a000389c: 0a000047 beq a00039c0 if (!lineFlag && !(tty->termios.c_lflag & ECHOE)) { a00038a0: e3570000 cmp r7, #0 a00038a4: 1a000005 bne a00038c0 a00038a8: e3130010 tst r3, #16 a00038ac: 1a000003 bne a00038c0 echo (tty->termios.c_cc[VERASE], tty); a00038b0: e5d40043 ldrb r0, [r4, #67] ; 0x43 <== NOT EXECUTED a00038b4: e1a01004 mov r1, r4 <== NOT EXECUTED } } if (!lineFlag) break; } } a00038b8: 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); a00038bc: eaffffb5 b a0003798 <== NOT EXECUTED } else if (c == '\t') { a00038c0: e3550009 cmp r5, #9 a00038c4: 1a00001f bne a0003948 int col = tty->read_start_column; a00038c8: 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)) { a00038cc: 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; a00038d0: 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) a00038d4: e2033c02 and r3, r3, #512 ; 0x200 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { a00038d8: ea00000c b a0003910 c = tty->cbuf[i++]; a00038dc: e7d0c002 ldrb ip, [r0, r2] a00038e0: e2822001 add r2, r2, #1 if (c == '\t') { a00038e4: e35c0009 cmp ip, #9 col = (col | 7) + 1; a00038e8: 03855007 orreq r5, r5, #7 /* * Find the character before the tab */ while (i != tty->ccount) { c = tty->cbuf[i++]; if (c == '\t') { a00038ec: 0a000006 beq a000390c col = (col | 7) + 1; } else if (iscntrl (c)) { a00038f0: e088c00c add ip, r8, ip a00038f4: e5dcc001 ldrb ip, [ip, #1] a00038f8: e31c0020 tst ip, #32 a00038fc: 0a000002 beq a000390c if (tty->termios.c_lflag & ECHOCTL) a0003900: e3530000 cmp r3, #0 <== NOT EXECUTED col += 2; a0003904: 12855002 addne r5, r5, #2 <== NOT EXECUTED a0003908: ea000000 b a0003910 <== NOT EXECUTED } else { col++; a000390c: e2855001 add r5, r5, #1 int i = 0; /* * Find the character before the tab */ while (i != tty->ccount) { a0003910: e1520001 cmp r2, r1 a0003914: 1afffff0 bne a00038dc a0003918: ea000006 b a0003938 /* * Back up over the tab */ while (tty->column > col) { rtems_termios_puts ("\b", 1, tty); a000391c: e59f00bc ldr r0, [pc, #188] ; a00039e0 a0003920: e3a01001 mov r1, #1 a0003924: e1a02004 mov r2, r4 a0003928: ebffff05 bl a0003544 tty->column--; a000392c: e5943028 ldr r3, [r4, #40] ; 0x28 a0003930: e2433001 sub r3, r3, #1 a0003934: e5843028 str r3, [r4, #40] ; 0x28 } /* * Back up over the tab */ while (tty->column > col) { a0003938: e5943028 ldr r3, [r4, #40] ; 0x28 a000393c: e1530005 cmp r3, r5 a0003940: cafffff5 bgt a000391c a0003944: ea00001d b a00039c0 rtems_termios_puts ("\b", 1, tty); tty->column--; } } else { if (iscntrl (c) && (tty->termios.c_lflag & ECHOCTL)) { a0003948: e5962000 ldr r2, [r6] a000394c: e2855001 add r5, r5, #1 a0003950: e7d22005 ldrb r2, [r2, r5] a0003954: e3120020 tst r2, #32 a0003958: 0a000009 beq a0003984 a000395c: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED a0003960: 0a000007 beq a0003984 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); a0003964: e59f0078 ldr r0, [pc, #120] ; a00039e4 <== NOT EXECUTED a0003968: e3a01003 mov r1, #3 <== NOT EXECUTED a000396c: e1a02004 mov r2, r4 <== NOT EXECUTED a0003970: ebfffef3 bl a0003544 <== NOT EXECUTED if (tty->column) a0003974: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003978: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; a000397c: 12433001 subne r3, r3, #1 <== NOT EXECUTED a0003980: 15843028 strne r3, [r4, #40] ; 0x28 <== NOT EXECUTED } if (!iscntrl (c) || (tty->termios.c_lflag & ECHOCTL)) { a0003984: e5963000 ldr r3, [r6] a0003988: e7d33005 ldrb r3, [r3, r5] a000398c: e3130020 tst r3, #32 a0003990: 0a000002 beq a00039a0 a0003994: e594303c ldr r3, [r4, #60] ; 0x3c <== NOT EXECUTED a0003998: e3130c02 tst r3, #512 ; 0x200 <== NOT EXECUTED a000399c: 0a000007 beq a00039c0 <== NOT EXECUTED rtems_termios_puts ("\b \b", 3, tty); a00039a0: e59f003c ldr r0, [pc, #60] ; a00039e4 a00039a4: e3a01003 mov r1, #3 a00039a8: e1a02004 mov r2, r4 a00039ac: ebfffee4 bl a0003544 if (tty->column) a00039b0: e5943028 ldr r3, [r4, #40] ; 0x28 a00039b4: e3530000 cmp r3, #0 tty->column--; a00039b8: 12433001 subne r3, r3, #1 a00039bc: 15843028 strne r3, [r4, #40] ; 0x28 } } } if (!lineFlag) a00039c0: e3570000 cmp r7, #0 a00039c4: 1a000001 bne a00039d0 a00039c8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} a00039cc: e59f6014 ldr r6, [pc, #20] ; a00039e8 echo ('\n', tty); return; } } while (tty->ccount) { a00039d0: e5941020 ldr r1, [r4, #32] a00039d4: e3510000 cmp r1, #0 a00039d8: 1affffa9 bne a0003884 a00039dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0002558 : int fcntl( int fd, int cmd, ... ) { a0002558: e92d000e push {r1, r2, r3} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a000255c: e59f21a8 ldr r2, [pc, #424] ; a000270c int fcntl( int fd, int cmd, ... ) { a0002560: e92d40f1 push {r0, r4, r5, r6, r7, lr} int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a0002564: e5921000 ldr r1, [r2] ... ) { int ret; va_list ap; va_start( ap, cmd ); a0002568: e28d301c add r3, sp, #28 int fcntl( int fd, int cmd, ... ) { a000256c: e59d7018 ldr r7, [sp, #24] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a0002570: e1500001 cmp r0, r1 ... ) { int ret; va_list ap; va_start( ap, cmd ); a0002574: e58d3000 str r3, [sp] int fd2; int flags; int mask; int ret = 0; rtems_libio_check_fd( fd ); a0002578: 2a000006 bcs a0002598 iop = rtems_libio_iop( fd ); a000257c: e59f218c ldr r2, [pc, #396] ; a0002710 a0002580: e3a04038 mov r4, #56 ; 0x38 a0002584: e5922000 ldr r2, [r2] a0002588: e0242490 mla r4, r0, r4, r2 rtems_libio_check_is_open(iop); a000258c: e5940014 ldr r0, [r4, #20] a0002590: e3100c01 tst r0, #256 ; 0x100 a0002594: 1a000002 bne a00025a4 a0002598: eb00299f bl a000cc1c <__errno> a000259c: e3a03009 mov r3, #9 a00025a0: ea000047 b a00026c4 /* * This switch should contain all the cases from POSIX. */ switch ( cmd ) { a00025a4: e3570009 cmp r7, #9 a00025a8: 979ff107 ldrls pc, [pc, r7, lsl #2] a00025ac: ea000042 b a00026bc a00025b0: a00025d8 .word 0xa00025d8 <== NOT EXECUTED a00025b4: a0002648 .word 0xa0002648 <== NOT EXECUTED a00025b8: a0002658 .word 0xa0002658 <== NOT EXECUTED a00025bc: a0002678 .word 0xa0002678 <== NOT EXECUTED a00025c0: a0002684 .word 0xa0002684 <== NOT EXECUTED a00025c4: a00026b0 .word 0xa00026b0 <== NOT EXECUTED a00025c8: a00026b0 .word 0xa00026b0 <== NOT EXECUTED a00025cc: a00026b0 .word 0xa00026b0 <== NOT EXECUTED a00025d0: a00026b0 .word 0xa00026b0 <== NOT EXECUTED a00025d4: a00026b0 .word 0xa00026b0 <== NOT EXECUTED case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); a00025d8: e5933000 ldr r3, [r3] if ( fd2 ) a00025dc: e3530000 cmp r3, #0 a00025e0: 0a000004 beq a00025f8 diop = rtems_libio_iop( fd2 ); a00025e4: e1530001 cmp r3, r1 <== NOT EXECUTED a00025e8: 33a06038 movcc r6, #56 ; 0x38 <== NOT EXECUTED a00025ec: 30262693 mlacc r6, r3, r6, r2 <== NOT EXECUTED a00025f0: 3a000005 bcc a000260c <== NOT EXECUTED a00025f4: ea000003 b a0002608 <== NOT EXECUTED else { /* allocate a file control block */ diop = rtems_libio_allocate(); a00025f8: eb00019c bl a0002c70 if ( diop == 0 ) { a00025fc: e2506000 subs r6, r0, #0 a0002600: 1a000001 bne a000260c a0002604: ea00003b b a00026f8 <== NOT EXECUTED switch ( cmd ) { case F_DUPFD: /* dup */ fd2 = va_arg( ap, int ); if ( fd2 ) diop = rtems_libio_iop( fd2 ); a0002608: e3a06000 mov r6, #0 <== NOT EXECUTED ret = -1; break; } } diop->flags = iop->flags; a000260c: e5943014 ldr r3, [r4, #20] diop->pathinfo = iop->pathinfo; a0002610: e286c018 add ip, r6, #24 a0002614: e2845018 add r5, r4, #24 ret = -1; break; } } diop->flags = iop->flags; a0002618: e5863014 str r3, [r6, #20] diop->pathinfo = iop->pathinfo; a000261c: e8b5000f ldm r5!, {r0, r1, r2, r3} a0002620: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002624: e5953000 ldr r3, [r5] a0002628: e58c3000 str r3, [ip] ret = (int) (diop - rtems_libio_iops); a000262c: e59f30dc ldr r3, [pc, #220] ; a0002710 a0002630: e5933000 ldr r3, [r3] a0002634: e0636006 rsb r6, r3, r6 a0002638: e59f30d4 ldr r3, [pc, #212] ; a0002714 a000263c: e1a061c6 asr r6, r6, #3 a0002640: e0060693 mul r6, r3, r6 a0002644: ea000020 b a00026cc break; case F_GETFD: /* get f_flags */ ret = ((iop->flags & LIBIO_FLAGS_CLOSE_ON_EXEC) != 0); a0002648: e3100b02 tst r0, #2048 ; 0x800 a000264c: 03a06000 moveq r6, #0 a0002650: 13a06001 movne r6, #1 a0002654: ea00001e b a00026d4 * 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 ) ) a0002658: e5936000 ldr r6, [r3] a000265c: e3560000 cmp r6, #0 iop->flags |= LIBIO_FLAGS_CLOSE_ON_EXEC; a0002660: 13800b02 orrne r0, r0, #2048 ; 0x800 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; a0002664: 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; a0002668: 15840014 strne r0, [r4, #20] else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; a000266c: 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 ) ) a0002670: 0a000017 beq a00026d4 a0002674: ea00000b b a00026a8 else iop->flags &= ~LIBIO_FLAGS_CLOSE_ON_EXEC; break; case F_GETFL: /* more flags (cloexec) */ ret = rtems_libio_to_fcntl_flags( iop->flags ); a0002678: eb00016a bl a0002c28 a000267c: e1a06000 mov r6, r0 a0002680: ea000011 b a00026cc break; case F_SETFL: flags = rtems_libio_fcntl_flags( va_arg( ap, int ) ); a0002684: e5930000 ldr r0, [r3] a0002688: eb000159 bl a0002bf4 /* * XXX If we are turning on append, should we seek to the end? */ iop->flags = (iop->flags & ~mask) | (flags & mask); a000268c: e5942014 ldr r2, [r4, #20] a0002690: e59f3080 ldr r3, [pc, #128] ; a0002718 a0002694: e3c22c02 bic r2, r2, #512 ; 0x200 a0002698: e0003003 and r3, r0, r3 a000269c: e3c22001 bic r2, r2, #1 a00026a0: e1833002 orr r3, r3, r2 a00026a4: e5843014 str r3, [r4, #20] rtems_libio_t *iop; rtems_libio_t *diop; int fd2; int flags; int mask; int ret = 0; a00026a8: e3a06000 mov r6, #0 a00026ac: ea000008 b a00026d4 errno = ENOTSUP; ret = -1; break; case F_GETOWN: /* for sockets. */ errno = ENOTSUP; a00026b0: eb002959 bl a000cc1c <__errno> a00026b4: e3a03086 mov r3, #134 ; 0x86 a00026b8: ea000001 b a00026c4 ret = -1; break; default: errno = EINVAL; a00026bc: eb002956 bl a000cc1c <__errno> a00026c0: e3a03016 mov r3, #22 a00026c4: e5803000 str r3, [r0] a00026c8: ea00000a b a00026f8 /* * If we got this far successfully, then we give the optional * filesystem specific handler a chance to process this. */ if (ret >= 0) { a00026cc: e3560000 cmp r6, #0 a00026d0: ba000009 blt a00026fc int err = (*iop->pathinfo.handlers->fcntl_h)( cmd, iop ); a00026d4: e5943020 ldr r3, [r4, #32] a00026d8: e1a01004 mov r1, r4 a00026dc: e1a00007 mov r0, r7 a00026e0: e5933030 ldr r3, [r3, #48] ; 0x30 a00026e4: e12fff33 blx r3 if (err) { a00026e8: e2504000 subs r4, r0, #0 a00026ec: 0a000002 beq a00026fc errno = err; a00026f0: eb002949 bl a000cc1c <__errno> <== NOT EXECUTED a00026f4: e5804000 str r4, [r0] <== NOT EXECUTED ret = -1; a00026f8: e3e06000 mvn r6, #0 va_list ap; va_start( ap, cmd ); ret = vfcntl(fd,cmd,ap); va_end(ap); return ret; } a00026fc: e1a00006 mov r0, r6 a0002700: e8bd40f8 pop {r3, r4, r5, r6, r7, lr} a0002704: e28dd00c add sp, sp, #12 a0002708: e12fff1e bx lr =============================================================================== a000ab10 : */ int fifo_open( pipe_control_t **pipep, rtems_libio_t *iop ) { a000ab10: e92d45f3 push {r0, r1, r4, r5, r6, r7, r8, sl, lr} a000ab14: e1a06000 mov r6, r0 a000ab18: e1a07001 mov r7, r1 ) { pipe_control_t *pipe; int err = 0; err = pipe_lock(); a000ab1c: ebffff87 bl a000a940 if (err) a000ab20: e250a000 subs sl, r0, #0 a000ab24: 1a0000bd bne a000ae20 return err; pipe = *pipep; a000ab28: e5964000 ldr r4, [r6] if (pipe == NULL) { a000ab2c: e3540000 cmp r4, #0 a000ab30: 1a00003a bne a000ac20 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a000ab34: e2800034 add r0, r0, #52 ; 0x34 a000ab38: ebffe23d bl a0003434 if (pipe == NULL) a000ab3c: e2508000 subs r8, r0, #0 { static char c = 'a'; pipe_control_t *pipe; int err = -ENOMEM; pipe = malloc(sizeof(pipe_control_t)); a000ab40: e1a04000 mov r4, r0 if (pipe == NULL) a000ab44: 0a000033 beq a000ac18 return err; memset(pipe, 0, sizeof(pipe_control_t)); a000ab48: e1a0100a mov r1, sl a000ab4c: e3a02034 mov r2, #52 ; 0x34 a000ab50: eb000c43 bl a000dc64 pipe->Size = PIPE_BUF; a000ab54: e3a00c02 mov r0, #512 ; 0x200 a000ab58: e5840004 str r0, [r4, #4] pipe->Buffer = malloc(pipe->Size); a000ab5c: ebffe234 bl a0003434 if (! pipe->Buffer) a000ab60: 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); a000ab64: e5840000 str r0, [r4] if (! pipe->Buffer) a000ab68: 0a000028 beq a000ac10 goto err_buf; err = -ENOMEM; if (rtems_barrier_create( rtems_build_name ('P', 'I', 'r', c), a000ab6c: e59f52b4 ldr r5, [pc, #692] ; a000ae28 if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( a000ab70: e59f02b4 ldr r0, [pc, #692] ; a000ae2c a000ab74: e1a0100a mov r1, sl rtems_build_name ('P', 'I', 'r', c), a000ab78: e5d53000 ldrb r3, [r5] if (! pipe->Buffer) goto err_buf; err = -ENOMEM; if (rtems_barrier_create( a000ab7c: e1a0200a mov r2, sl a000ab80: e1830000 orr r0, r3, r0 a000ab84: e284302c add r3, r4, #44 ; 0x2c a000ab88: eb000455 bl a000bce4 a000ab8c: e2501000 subs r1, r0, #0 a000ab90: 1a00001c bne a000ac08 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), a000ab94: 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( a000ab98: e59f0290 ldr r0, [pc, #656] ; a000ae30 a000ab9c: e1a02001 mov r2, r1 a000aba0: e1830000 orr r0, r3, r0 a000aba4: e2843030 add r3, r4, #48 ; 0x30 a000aba8: eb00044d bl a000bce4 a000abac: e2503000 subs r3, r0, #0 a000abb0: 1a000012 bne a000ac00 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, a000abb4: 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( a000abb8: e59f0274 ldr r0, [pc, #628] ; a000ae34 a000abbc: e2841028 add r1, r4, #40 ; 0x28 a000abc0: e58d1000 str r1, [sp] a000abc4: e1820000 orr r0, r2, r0 a000abc8: e3a01001 mov r1, #1 a000abcc: e3a02010 mov r2, #16 a000abd0: ebffed9d bl a000624c a000abd4: e3500000 cmp r0, #0 a000abd8: 1a000006 bne a000abf8 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a000abdc: e5d53000 ldrb r3, [r5] a000abe0: e353007a cmp r3, #122 ; 0x7a a000abe4: e2832001 add r2, r3, #1 c = 'a'; a000abe8: 03a03061 moveq r3, #97 ; 0x61 #ifdef RTEMS_POSIX_API pipe_interruptible(pipe); #endif *pipep = pipe; if (c ++ == 'z') a000abec: e5c52000 strb r2, [r5] c = 'a'; a000abf0: 05c53000 strbeq r3, [r5] a000abf4: ea000009 b a000ac20 return 0; err_sem: rtems_barrier_delete(pipe->writeBarrier); a000abf8: e5980030 ldr r0, [r8, #48] ; 0x30 a000abfc: eb000468 bl a000bda4 err_wbar: rtems_barrier_delete(pipe->readBarrier); a000ac00: e598002c ldr r0, [r8, #44] ; 0x2c a000ac04: eb000466 bl a000bda4 err_rbar: free(pipe->Buffer); a000ac08: e5980000 ldr r0, [r8] a000ac0c: ebffe092 bl a0002e5c err_buf: free(pipe); a000ac10: e1a00008 mov r0, r8 a000ac14: ebffe090 bl a0002e5c if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; a000ac18: e3e0a00b mvn sl, #11 a000ac1c: ea00000e b a000ac5c err = pipe_alloc(&pipe); if (err) goto out; } if (! PIPE_LOCK(pipe)) a000ac20: e3a01000 mov r1, #0 a000ac24: e5940028 ldr r0, [r4, #40] ; 0x28 a000ac28: e1a02001 mov r2, r1 a000ac2c: ebffee18 bl a0006494 err = -EINTR; if (*pipep == NULL) { a000ac30: e5963000 ldr r3, [r6] if (err) goto out; } if (! PIPE_LOCK(pipe)) err = -EINTR; a000ac34: e3500000 cmp r0, #0 a000ac38: 03a0a000 moveq sl, #0 a000ac3c: 13e0a003 mvnne sl, #3 if (*pipep == NULL) { a000ac40: e3530000 cmp r3, #0 a000ac44: 1a000004 bne a000ac5c if (err) a000ac48: e35a0000 cmp sl, #0 pipe_free(pipe); else *pipep = pipe; a000ac4c: 05864000 streq r4, [r6] if (! PIPE_LOCK(pipe)) err = -EINTR; if (*pipep == NULL) { if (err) a000ac50: 0a000001 beq a000ac5c pipe_free(pipe); a000ac54: e1a00004 mov r0, r4 <== NOT EXECUTED a000ac58: ebffff5c bl a000a9d0 <== NOT EXECUTED else *pipep = pipe; } out: pipe_unlock(); a000ac5c: ebffff68 bl a000aa04 pipe_control_t *pipe; unsigned int prevCounter; int err; err = pipe_new(pipep); if (err) a000ac60: e35a0000 cmp sl, #0 a000ac64: 1a00006d bne a000ae20 return err; pipe = *pipep; switch (LIBIO_ACCMODE(iop)) { a000ac68: e5973014 ldr r3, [r7, #20] int err; err = pipe_new(pipep); if (err) return err; pipe = *pipep; a000ac6c: e5964000 ldr r4, [r6] switch (LIBIO_ACCMODE(iop)) { a000ac70: e2033006 and r3, r3, #6 a000ac74: e3530004 cmp r3, #4 a000ac78: 0a000025 beq a000ad14 a000ac7c: e3530006 cmp r3, #6 a000ac80: 0a000049 beq a000adac a000ac84: e3530002 cmp r3, #2 a000ac88: 1a00005d bne a000ae04 case LIBIO_FLAGS_READ: pipe->readerCounter ++; a000ac8c: e5943020 ldr r3, [r4, #32] a000ac90: e2833001 add r3, r3, #1 a000ac94: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) a000ac98: e5943010 ldr r3, [r4, #16] a000ac9c: e2832001 add r2, r3, #1 a000aca0: e3530000 cmp r3, #0 a000aca4: e5842010 str r2, [r4, #16] a000aca8: 1a000002 bne a000acb8 PIPE_WAKEUPWRITERS(pipe); a000acac: e5940030 ldr r0, [r4, #48] ; 0x30 a000acb0: e28d1004 add r1, sp, #4 a000acb4: eb000462 bl a000be44 if (pipe->Writers == 0) { a000acb8: e5943014 ldr r3, [r4, #20] a000acbc: e3530000 cmp r3, #0 a000acc0: 1a00004f bne a000ae04 /* Not an error */ if (LIBIO_NODELAY(iop)) a000acc4: e5973014 ldr r3, [r7, #20] a000acc8: e3130001 tst r3, #1 a000accc: 1a00004c bne a000ae04 break; prevCounter = pipe->writerCounter; a000acd0: e5945024 ldr r5, [r4, #36] ; 0x24 err = -EINTR; /* Wait until a writer opens the pipe */ do { PIPE_UNLOCK(pipe); a000acd4: e5940028 ldr r0, [r4, #40] ; 0x28 a000acd8: ebffee33 bl a00065ac if (! PIPE_READWAIT(pipe)) a000acdc: e3a01000 mov r1, #0 a000ace0: e594002c ldr r0, [r4, #44] ; 0x2c a000ace4: eb00046c bl a000be9c a000ace8: e2501000 subs r1, r0, #0 a000acec: 1a000047 bne a000ae10 goto out_error; if (! PIPE_LOCK(pipe)) a000acf0: e5940028 ldr r0, [r4, #40] ; 0x28 a000acf4: e1a02001 mov r2, r1 a000acf8: ebffede5 bl a0006494 a000acfc: e3500000 cmp r0, #0 a000ad00: 1a000042 bne a000ae10 goto out_error; } while (prevCounter == pipe->writerCounter); a000ad04: e5943024 ldr r3, [r4, #36] ; 0x24 a000ad08: e1550003 cmp r5, r3 a000ad0c: 0afffff0 beq a000acd4 a000ad10: ea00003b b a000ae04 } break; case LIBIO_FLAGS_WRITE: pipe->writerCounter ++; a000ad14: e5943024 ldr r3, [r4, #36] ; 0x24 a000ad18: e2833001 add r3, r3, #1 a000ad1c: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) a000ad20: e5943014 ldr r3, [r4, #20] a000ad24: e2832001 add r2, r3, #1 a000ad28: e3530000 cmp r3, #0 a000ad2c: e5842014 str r2, [r4, #20] a000ad30: 1a000002 bne a000ad40 PIPE_WAKEUPREADERS(pipe); a000ad34: e594002c ldr r0, [r4, #44] ; 0x2c a000ad38: e28d1004 add r1, sp, #4 a000ad3c: eb000440 bl a000be44 if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a000ad40: e5943010 ldr r3, [r4, #16] a000ad44: e3530000 cmp r3, #0 a000ad48: 1a00002d bne a000ae04 a000ad4c: e5973014 ldr r3, [r7, #20] a000ad50: e3130001 tst r3, #1 err = -ENXIO; goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; a000ad54: 05945020 ldreq r5, [r4, #32] pipe->writerCounter ++; if (pipe->Writers ++ == 0) PIPE_WAKEUPREADERS(pipe); if (pipe->Readers == 0 && LIBIO_NODELAY(iop)) { a000ad58: 0a000003 beq a000ad6c PIPE_UNLOCK(pipe); a000ad5c: e5940028 ldr r0, [r4, #40] ; 0x28 a000ad60: ebffee11 bl a00065ac err = -ENXIO; a000ad64: e3e0a005 mvn sl, #5 goto out_error; a000ad68: ea000029 b a000ae14 if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; do { PIPE_UNLOCK(pipe); a000ad6c: e5940028 ldr r0, [r4, #40] ; 0x28 a000ad70: ebffee0d bl a00065ac if (! PIPE_WRITEWAIT(pipe)) a000ad74: e3a01000 mov r1, #0 a000ad78: e5940030 ldr r0, [r4, #48] ; 0x30 a000ad7c: eb000446 bl a000be9c a000ad80: e2501000 subs r1, r0, #0 a000ad84: 1a000021 bne a000ae10 goto out_error; if (! PIPE_LOCK(pipe)) a000ad88: e5940028 ldr r0, [r4, #40] ; 0x28 a000ad8c: e1a02001 mov r2, r1 a000ad90: ebffedbf bl a0006494 a000ad94: e3500000 cmp r0, #0 a000ad98: 1a00001c bne a000ae10 goto out_error; } while (prevCounter == pipe->readerCounter); a000ad9c: e5943020 ldr r3, [r4, #32] a000ada0: e1550003 cmp r5, r3 a000ada4: 0afffff0 beq a000ad6c a000ada8: ea000015 b a000ae04 } break; case LIBIO_FLAGS_READ_WRITE: pipe->readerCounter ++; a000adac: e5943020 ldr r3, [r4, #32] a000adb0: e2833001 add r3, r3, #1 a000adb4: e5843020 str r3, [r4, #32] if (pipe->Readers ++ == 0) a000adb8: e5943010 ldr r3, [r4, #16] a000adbc: e2832001 add r2, r3, #1 a000adc0: e3530000 cmp r3, #0 a000adc4: e5842010 str r2, [r4, #16] a000adc8: 1a000002 bne a000add8 PIPE_WAKEUPWRITERS(pipe); a000adcc: e5940030 ldr r0, [r4, #48] ; 0x30 a000add0: e28d1004 add r1, sp, #4 a000add4: eb00041a bl a000be44 pipe->writerCounter ++; a000add8: e5943024 ldr r3, [r4, #36] ; 0x24 a000addc: e2833001 add r3, r3, #1 a000ade0: e5843024 str r3, [r4, #36] ; 0x24 if (pipe->Writers ++ == 0) a000ade4: e5943014 ldr r3, [r4, #20] a000ade8: e2832001 add r2, r3, #1 a000adec: e3530000 cmp r3, #0 a000adf0: e5842014 str r2, [r4, #20] a000adf4: 1a000002 bne a000ae04 PIPE_WAKEUPREADERS(pipe); a000adf8: e594002c ldr r0, [r4, #44] ; 0x2c a000adfc: e28d1004 add r1, sp, #4 a000ae00: eb00040f bl a000be44 break; } PIPE_UNLOCK(pipe); a000ae04: e5940028 ldr r0, [r4, #40] ; 0x28 a000ae08: ebffede7 bl a00065ac return 0; a000ae0c: ea000003 b a000ae20 goto out_error; } if (pipe->Readers == 0) { prevCounter = pipe->readerCounter; err = -EINTR; a000ae10: e3e0a003 mvn sl, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; out_error: pipe_release(pipep, iop); a000ae14: e1a00006 mov r0, r6 a000ae18: e1a01007 mov r1, r7 a000ae1c: ebffff02 bl a000aa2c return err; } a000ae20: e1a0000a mov r0, sl a000ae24: e8bd85fc pop {r2, r3, r4, r5, r6, r7, r8, sl, pc} =============================================================================== a000279c : { long return_value; rtems_libio_t *iop; rtems_filesystem_limits_and_options_t *the_limits; rtems_libio_check_fd(fd); a000279c: e59f3104 ldr r3, [pc, #260] ; a00028a8 long fpathconf( int fd, int name ) { a00027a0: 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); a00027a4: e5933000 ldr r3, [r3] a00027a8: e1500003 cmp r0, r3 a00027ac: 2a000006 bcs a00027cc iop = rtems_libio_iop(fd); a00027b0: e59f30f4 ldr r3, [pc, #244] ; a00028ac a00027b4: e3a02038 mov r2, #56 ; 0x38 a00027b8: e5933000 ldr r3, [r3] a00027bc: e0203092 mla r0, r2, r0, r3 rtems_libio_check_is_open(iop); a00027c0: e5903014 ldr r3, [r0, #20] a00027c4: e3130c01 tst r3, #256 ; 0x100 a00027c8: 1a000002 bne a00027d8 a00027cc: eb002912 bl a000cc1c <__errno> a00027d0: e3a03009 mov r3, #9 a00027d4: ea000003 b a00027e8 rtems_libio_check_permissions(iop, LIBIO_FLAGS_READ); a00027d8: e3130002 tst r3, #2 a00027dc: 1a000004 bne a00027f4 a00027e0: eb00290d bl a000cc1c <__errno> <== NOT EXECUTED a00027e4: e3a03016 mov r3, #22 <== NOT EXECUTED a00027e8: e5803000 str r3, [r0] a00027ec: e3e00000 mvn r0, #0 a00027f0: e49df004 pop {pc} ; (ldr pc, [sp], #4) /* * Now process the information request. */ the_limits = &iop->pathinfo.mt_entry->pathconf_limits_and_options; a00027f4: e5903028 ldr r3, [r0, #40] ; 0x28 switch ( name ) { a00027f8: e351000b cmp r1, #11 a00027fc: 979ff101 ldrls pc, [pc, r1, lsl #2] a0002800: ea000023 b a0002894 a0002804: a0002834 .word 0xa0002834 <== NOT EXECUTED a0002808: a000283c .word 0xa000283c <== NOT EXECUTED a000280c: a0002844 .word 0xa0002844 <== NOT EXECUTED a0002810: a000284c .word 0xa000284c <== NOT EXECUTED a0002814: a0002854 .word 0xa0002854 <== NOT EXECUTED a0002818: a000285c .word 0xa000285c <== NOT EXECUTED a000281c: a0002864 .word 0xa0002864 <== NOT EXECUTED a0002820: a000286c .word 0xa000286c <== NOT EXECUTED a0002824: a0002874 .word 0xa0002874 <== NOT EXECUTED a0002828: a000287c .word 0xa000287c <== NOT EXECUTED a000282c: a0002884 .word 0xa0002884 <== NOT EXECUTED a0002830: a000288c .word 0xa000288c <== NOT EXECUTED case _PC_LINK_MAX: return_value = the_limits->link_max; a0002834: e5930038 ldr r0, [r3, #56] ; 0x38 break; a0002838: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_CANON: return_value = the_limits->max_canon; a000283c: e593003c ldr r0, [r3, #60] ; 0x3c break; a0002840: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_MAX_INPUT: return_value = the_limits->max_input; a0002844: e5930040 ldr r0, [r3, #64] ; 0x40 break; a0002848: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NAME_MAX: return_value = the_limits->name_max; a000284c: e5930044 ldr r0, [r3, #68] ; 0x44 break; a0002850: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PATH_MAX: return_value = the_limits->path_max; a0002854: e5930048 ldr r0, [r3, #72] ; 0x48 break; a0002858: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PIPE_BUF: return_value = the_limits->pipe_buf; a000285c: e593004c ldr r0, [r3, #76] ; 0x4c break; a0002860: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_CHOWN_RESTRICTED: return_value = the_limits->posix_chown_restrictions; a0002864: e5930054 ldr r0, [r3, #84] ; 0x54 break; a0002868: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_NO_TRUNC: return_value = the_limits->posix_no_trunc; a000286c: e5930058 ldr r0, [r3, #88] ; 0x58 break; a0002870: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_VDISABLE: return_value = the_limits->posix_vdisable; a0002874: e5930064 ldr r0, [r3, #100] ; 0x64 break; a0002878: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_ASYNC_IO: return_value = the_limits->posix_async_io; a000287c: e5930050 ldr r0, [r3, #80] ; 0x50 break; a0002880: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_PRIO_IO: return_value = the_limits->posix_prio_io; a0002884: e593005c ldr r0, [r3, #92] ; 0x5c break; a0002888: e49df004 pop {pc} ; (ldr pc, [sp], #4) case _PC_SYNC_IO: return_value = the_limits->posix_sync_io; a000288c: e5930060 ldr r0, [r3, #96] ; 0x60 break; a0002890: e49df004 pop {pc} ; (ldr pc, [sp], #4) default: rtems_set_errno_and_return_minus_one( EINVAL ); a0002894: eb0028e0 bl a000cc1c <__errno> a0002898: e3a03016 mov r3, #22 a000289c: e5803000 str r3, [r0] a00028a0: e3e00000 mvn r0, #0 break; } return return_value; } a00028a4: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0002e18 : static void free_user_env(void *venv) { rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0002e18: e59f302c ldr r3, [pc, #44] ; a0002e4c <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { a0002e1c: e92d4010 push {r4, lr} <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0002e20: e1500003 cmp r0, r3 <== NOT EXECUTED * NOTE: this must be called with * thread dispatching disabled! */ static void free_user_env(void *venv) { a0002e24: e1a04000 mov r4, r0 <== NOT EXECUTED rtems_user_env_t *env = (rtems_user_env_t*) venv ; if (env != &rtems_global_user_env a0002e28: 0a000006 beq a0002e48 <== NOT EXECUTED #ifdef HAVE_USERENV_REFCNT && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); a0002e2c: e2800004 add r0, r0, #4 <== NOT EXECUTED a0002e30: ebfffbe9 bl a0001ddc <== NOT EXECUTED rtems_filesystem_freenode( &env->root_directory); a0002e34: e2840018 add r0, r4, #24 <== NOT EXECUTED a0002e38: ebfffbe7 bl a0001ddc <== NOT EXECUTED free(env); a0002e3c: e1a00004 mov r0, r4 <== NOT EXECUTED } } a0002e40: e8bd4010 pop {r4, lr} <== NOT EXECUTED && --env->refcnt <= 0 #endif ) { rtems_filesystem_freenode( &env->current_directory); rtems_filesystem_freenode( &env->root_directory); free(env); a0002e44: eafffbe9 b a0001df0 <== NOT EXECUTED a0002e48: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a0009364 : ) { rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a0009364: e59f30bc ldr r3, [pc, #188] ; a0009428 int ftruncate( int fd, off_t length ) { a0009368: e92d4070 push {r4, r5, r6, lr} rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a000936c: e5933000 ldr r3, [r3] int ftruncate( int fd, off_t length ) { a0009370: e24dd014 sub sp, sp, #20 a0009374: e1a05001 mov r5, r1 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a0009378: e1500003 cmp r0, r3 int ftruncate( int fd, off_t length ) { a000937c: e1a06002 mov r6, r2 rtems_libio_t *iop; rtems_filesystem_location_info_t loc; rtems_libio_check_fd( fd ); a0009380: 2a000006 bcs a00093a0 iop = rtems_libio_iop( fd ); a0009384: e59f30a0 ldr r3, [pc, #160] ; a000942c a0009388: e3a04038 mov r4, #56 ; 0x38 a000938c: e5933000 ldr r3, [r3] a0009390: e0243490 mla r4, r0, r4, r3 rtems_libio_check_is_open(iop); a0009394: e5943014 ldr r3, [r4, #20] a0009398: e3130c01 tst r3, #256 ; 0x100 a000939c: 1a000002 bne a00093ac a00093a0: eb000a53 bl a000bcf4 <__errno> a00093a4: e3a03009 mov r3, #9 a00093a8: ea000013 b a00093fc /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a00093ac: e1a0c00d mov ip, sp a00093b0: e284e018 add lr, r4, #24 a00093b4: e8be000f ldm lr!, {r0, r1, r2, r3} a00093b8: e8ac000f stmia ip!, {r0, r1, r2, r3} a00093bc: e59e3000 ldr r3, [lr] if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) a00093c0: e1a0000d mov r0, sp /* * Make sure we are not working on a directory */ loc = iop->pathinfo; a00093c4: e58c3000 str r3, [ip] if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) a00093c8: e59d300c ldr r3, [sp, #12] a00093cc: e5933010 ldr r3, [r3, #16] a00093d0: e12fff33 blx r3 a00093d4: e3500001 cmp r0, #1 a00093d8: 1a000002 bne a00093e8 rtems_set_errno_and_return_minus_one( EISDIR ); a00093dc: eb000a44 bl a000bcf4 <__errno> <== NOT EXECUTED a00093e0: e3a03015 mov r3, #21 <== NOT EXECUTED a00093e4: ea000004 b a00093fc <== NOT EXECUTED rtems_libio_check_permissions( iop, LIBIO_FLAGS_WRITE ); a00093e8: e5943014 ldr r3, [r4, #20] a00093ec: e3130004 tst r3, #4 a00093f0: 1a000004 bne a0009408 a00093f4: eb000a3e bl a000bcf4 <__errno> a00093f8: e3a03016 mov r3, #22 a00093fc: e5803000 str r3, [r0] a0009400: e3e00000 mvn r0, #0 a0009404: ea000005 b a0009420 return (*iop->pathinfo.handlers->ftruncate_h)( iop, length ); a0009408: e5943020 ldr r3, [r4, #32] a000940c: e1a00004 mov r0, r4 a0009410: e1a01005 mov r1, r5 a0009414: e5933020 ldr r3, [r3, #32] a0009418: e1a02006 mov r2, r6 a000941c: e12fff33 blx r3 } a0009420: e28dd014 add sp, sp, #20 a0009424: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a0001d88 : */ int gettimeofday( struct timeval *tp, void * __tz __attribute__((unused)) ) { a0001d88: e92d4033 push {r0, r1, r4, r5, lr} /* struct timezone* tzp = (struct timezone*) __tz; */ if ( !tp ) a0001d8c: e2504000 subs r4, r0, #0 a0001d90: 1a000004 bne a0001da8 rtems_set_errno_and_return_minus_one( EFAULT ); a0001d94: eb0027d6 bl a000bcf4 <__errno> <== NOT EXECUTED a0001d98: e3a0300e mov r3, #14 <== NOT EXECUTED a0001d9c: e5803000 str r3, [r0] <== NOT EXECUTED a0001da0: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001da4: ea00000c b a0001ddc <== NOT EXECUTED static inline uint32_t arm_interrupt_disable( void ) { uint32_t arm_switch_reg; uint32_t level; asm volatile ( a0001da8: e10f5000 mrs r5, CPSR a0001dac: e3853080 orr r3, r5, #128 ; 0x80 a0001db0: e129f003 msr CPSR_fc, r3 ISR_Level level; struct timespec now; suseconds_t useconds; _ISR_Disable(level); _TOD_Get( &now ); a0001db4: e1a0000d mov r0, sp a0001db8: eb000f82 bl a0005bc8 <_TOD_Get> static inline void arm_interrupt_enable( uint32_t level ) { ARM_SWITCH_REGISTERS; asm volatile ( a0001dbc: 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; a0001dc0: 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; a0001dc4: e59d0004 ldr r0, [sp, #4] a0001dc8: e3a01ffa mov r1, #1000 ; 0x3e8 time->tv_sec = now.tv_sec; a0001dcc: 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; a0001dd0: eb0035bc bl a000f4c8 <__aeabi_idiv> time->tv_sec = now.tv_sec; time->tv_usec = useconds; a0001dd4: 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; a0001dd8: e3a00000 mov r0, #0 } a0001ddc: e8bd803c pop {r2, r3, r4, r5, pc} =============================================================================== a000b4c8 : 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 ) a000b4c8: e5903018 ldr r3, [r0, #24] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000b4cc: 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 ) a000b4d0: e593304c ldr r3, [r3, #76] ; 0x4c a000b4d4: e3530001 cmp r3, #1 a000b4d8: 1a000005 bne a000b4f4 return -1; /* It wasn't a directory --> return error */ iop->offset = 0; a000b4dc: e3a03000 mov r3, #0 a000b4e0: e3a04000 mov r4, #0 a000b4e4: e580300c str r3, [r0, #12] a000b4e8: e5804010 str r4, [r0, #16] return 0; a000b4ec: e3a00000 mov r0, #0 a000b4f0: 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 */ a000b4f4: e3e00000 mvn r0, #0 <== NOT EXECUTED iop->offset = 0; return 0; } a000b4f8: e8bd8010 pop {r4, pc} <== NOT EXECUTED =============================================================================== a00039ec : * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { if (tty->termios.c_iflag & ISTRIP) a00039ec: e5913030 ldr r3, [r1, #48] ; 0x30 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a00039f0: e92d4030 push {r4, r5, lr} if (tty->termios.c_iflag & ISTRIP) a00039f4: e3130020 tst r3, #32 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a00039f8: e20050ff and r5, r0, #255 ; 0xff if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; a00039fc: 1200507f andne r5, r0, #127 ; 0x7f if (tty->termios.c_iflag & IUCLC) a0003a00: e3130c02 tst r3, #512 ; 0x200 /* * Process a single input character */ static int iproc (unsigned char c, struct rtems_termios_tty *tty) { a0003a04: e1a04001 mov r4, r1 if (tty->termios.c_iflag & ISTRIP) c &= 0x7f; if (tty->termios.c_iflag & IUCLC) a0003a08: 0a000007 beq a0003a2c c = tolower (c); a0003a0c: e59f2170 ldr r2, [pc, #368] ; a0003b84 a0003a10: e5922000 ldr r2, [r2] a0003a14: e0822005 add r2, r2, r5 a0003a18: e5d22001 ldrb r2, [r2, #1] a0003a1c: e2022003 and r2, r2, #3 a0003a20: e3520001 cmp r2, #1 a0003a24: 02855020 addeq r5, r5, #32 a0003a28: e20550ff and r5, r5, #255 ; 0xff if (c == '\r') { a0003a2c: e355000d cmp r5, #13 a0003a30: 1a000005 bne a0003a4c if (tty->termios.c_iflag & IGNCR) a0003a34: e3130080 tst r3, #128 ; 0x80 a0003a38: 1a00004b bne a0003b6c return 0; if (tty->termios.c_iflag & ICRNL) c = '\n'; a0003a3c: e3130c01 tst r3, #256 ; 0x100 a0003a40: 03a0500d moveq r5, #13 a0003a44: 13a0500a movne r5, #10 a0003a48: ea000007 b a0003a6c } else if ((c == '\n') && (tty->termios.c_iflag & INLCR)) { a0003a4c: e355000a cmp r5, #10 a0003a50: 1a000003 bne a0003a64 c = '\r'; a0003a54: e3130040 tst r3, #64 ; 0x40 a0003a58: 03a0500a moveq r5, #10 a0003a5c: 13a0500d movne r5, #13 a0003a60: ea000001 b a0003a6c } if ((c != '\0') && (tty->termios.c_lflag & ICANON)) { a0003a64: e3550000 cmp r5, #0 a0003a68: 0a00002e beq a0003b28 a0003a6c: e594303c ldr r3, [r4, #60] ; 0x3c a0003a70: e3130002 tst r3, #2 a0003a74: 0a00002b beq a0003b28 if (c == tty->termios.c_cc[VERASE]) { a0003a78: e5d42043 ldrb r2, [r4, #67] ; 0x43 a0003a7c: e1520005 cmp r2, r5 erase (tty, 0); a0003a80: 01a00004 moveq r0, r4 a0003a84: 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]) { a0003a88: 0a000004 beq a0003aa0 erase (tty, 0); return 0; } else if (c == tty->termios.c_cc[VKILL]) { a0003a8c: e5d42044 ldrb r2, [r4, #68] ; 0x44 a0003a90: e1520005 cmp r2, r5 a0003a94: 1a000003 bne a0003aa8 erase (tty, 1); a0003a98: e1a00004 mov r0, r4 a0003a9c: e3a01001 mov r1, #1 a0003aa0: ebffff5f bl a0003824 a0003aa4: ea000030 b a0003b6c return 0; } else if (c == tty->termios.c_cc[VEOF]) { a0003aa8: e5d42045 ldrb r2, [r4, #69] ; 0x45 a0003aac: e1520005 cmp r2, r5 a0003ab0: 0a00002f beq a0003b74 return 1; } else if (c == '\n') { a0003ab4: e355000a cmp r5, #10 a0003ab8: 1a000009 bne a0003ae4 if (tty->termios.c_lflag & (ECHO | ECHONL)) a0003abc: e3130048 tst r3, #72 ; 0x48 a0003ac0: 0a000002 beq a0003ad0 echo (c, tty); a0003ac4: e1a00005 mov r0, r5 a0003ac8: e1a01004 mov r1, r4 a0003acc: ebffff31 bl a0003798 tty->cbuf[tty->ccount++] = c; a0003ad0: e5943020 ldr r3, [r4, #32] a0003ad4: e594201c ldr r2, [r4, #28] a0003ad8: e3a0100a mov r1, #10 a0003adc: e7c21003 strb r1, [r2, r3] a0003ae0: ea00000d b a0003b1c return 1; } else if ((c == tty->termios.c_cc[VEOL]) || a0003ae4: e5d4204c ldrb r2, [r4, #76] ; 0x4c a0003ae8: e1520005 cmp r2, r5 a0003aec: 0a000002 beq a0003afc a0003af0: e5d42051 ldrb r2, [r4, #81] ; 0x51 a0003af4: e1520005 cmp r2, r5 a0003af8: 1a00000a bne a0003b28 (c == tty->termios.c_cc[VEOL2])) { if (tty->termios.c_lflag & ECHO) a0003afc: e3130008 tst r3, #8 <== NOT EXECUTED a0003b00: 0a000002 beq a0003b10 <== NOT EXECUTED echo (c, tty); a0003b04: e1a00005 mov r0, r5 <== NOT EXECUTED a0003b08: e1a01004 mov r1, r4 <== NOT EXECUTED a0003b0c: ebffff21 bl a0003798 <== NOT EXECUTED tty->cbuf[tty->ccount++] = c; a0003b10: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED a0003b14: e594201c ldr r2, [r4, #28] <== NOT EXECUTED a0003b18: e7c25003 strb r5, [r2, r3] <== NOT EXECUTED a0003b1c: e2833001 add r3, r3, #1 a0003b20: e5843020 str r3, [r4, #32] a0003b24: ea000012 b a0003b74 } /* * FIXME: Should do IMAXBEL handling somehow */ if (tty->ccount < (CBUFSIZE-1)) { a0003b28: e59f3058 ldr r3, [pc, #88] ; a0003b88 a0003b2c: e5942020 ldr r2, [r4, #32] a0003b30: e5933008 ldr r3, [r3, #8] a0003b34: e2433001 sub r3, r3, #1 a0003b38: e1520003 cmp r2, r3 a0003b3c: aa00000e bge a0003b7c if (tty->termios.c_lflag & ECHO) a0003b40: e594303c ldr r3, [r4, #60] ; 0x3c a0003b44: e3130008 tst r3, #8 a0003b48: 0a000002 beq a0003b58 echo (c, tty); a0003b4c: e1a00005 mov r0, r5 a0003b50: e1a01004 mov r1, r4 a0003b54: ebffff0f bl a0003798 tty->cbuf[tty->ccount++] = c; a0003b58: e5943020 ldr r3, [r4, #32] a0003b5c: e594201c ldr r2, [r4, #28] a0003b60: e7c25003 strb r5, [r2, r3] a0003b64: e2833001 add r3, r3, #1 a0003b68: 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; a0003b6c: e3a00000 mov r0, #0 a0003b70: 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; a0003b74: e3a00001 mov r0, #1 a0003b78: 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; a0003b7c: e3a00000 mov r0, #0 <== NOT EXECUTED } a0003b80: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a001f594 : #if !defined(RTEMS_POSIX_API) int kill( pid_t pid, int sig ) { return 0; } a001f594: e3a00000 mov r0, #0 <== NOT EXECUTED a001f598: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a0010d1c : /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) a0010d1c: e59f3060 ldr r3, [pc, #96] ; a0010d84 extern void _wrapup_reent(struct _reent *); extern void _reclaim_reent(struct _reent *); void libc_wrapup(void) { a0010d20: e92d4030 push {r4, r5, lr} /* * In case RTEMS is already down, don't do this. It could be * dangerous. */ if (!_System_state_Is_up(_System_state_Get())) a0010d24: e5933000 ldr r3, [r3] a0010d28: e3530003 cmp r3, #3 a0010d2c: 1a000013 bne a0010d80 /* * This was already done if the user called exit() directly . _wrapup_reent(0); */ if (_REENT != _global_impure_ptr) { a0010d30: e59f3050 ldr r3, [pc, #80] ; a0010d88 a0010d34: e59f5050 ldr r5, [pc, #80] ; a0010d8c a0010d38: e5934000 ldr r4, [r3] a0010d3c: e5953000 ldr r3, [r5] a0010d40: e1530004 cmp r3, r4 a0010d44: 0a000002 beq a0010d54 _wrapup_reent(_global_impure_ptr); a0010d48: e1a00004 mov r0, r4 a0010d4c: eb0001b1 bl a0011418 <_wrapup_reent> /* Don't reclaim this one, just in case we do printfs * on the way out to ROM. */ _reclaim_reent(&libc_global_reent); #endif _REENT = _global_impure_ptr; a0010d50: e5854000 str r4, [r5] * * Should this be changed to do *all* file streams? * _fwalk (_REENT, fclose); */ fclose (stdin); a0010d54: e59f4030 ldr r4, [pc, #48] ; a0010d8c a0010d58: e5943000 ldr r3, [r4] a0010d5c: e5930004 ldr r0, [r3, #4] a0010d60: ebffec31 bl a000be2c fclose (stdout); a0010d64: e5943000 ldr r3, [r4] a0010d68: e5930008 ldr r0, [r3, #8] a0010d6c: ebffec2e bl a000be2c fclose (stderr); a0010d70: e5943000 ldr r3, [r4] a0010d74: e593000c ldr r0, [r3, #12] } a0010d78: e8bd4030 pop {r4, r5, lr} * _fwalk (_REENT, fclose); */ fclose (stdin); fclose (stdout); fclose (stderr); a0010d7c: eaffec2a b a000be2c a0010d80: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED =============================================================================== a00023d4 : * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; a00023d4: e59f30a0 ldr r3, [pc, #160] ; a000247c } void *malloc_sbrk_extend_and_allocate( size_t size ) { a00023d8: e92d40f0 push {r4, r5, r6, r7, lr} * Round to the "requested sbrk amount" so hopefully we won't have * to grow again for a while. This effectively does sbrk() calls * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; a00023dc: e5934000 ldr r4, [r3] } void *malloc_sbrk_extend_and_allocate( size_t size ) { a00023e0: e1a05000 mov r5, r0 * in "page" amounts. */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) a00023e4: e3540000 cmp r4, #0 a00023e8: 0a00001f beq a000246c return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); a00023ec: e1a01004 mov r1, r4 a00023f0: e0800004 add r0, r0, r4 a00023f4: eb00353d bl a000f8f0 <__aeabi_uidiv> a00023f8: e0040490 mul r4, r0, r4 starting_address = (void *) sbrk(the_size); a00023fc: e1a00004 mov r0, r4 a0002400: ebfff84d bl a000053c if ( starting_address == (void*) -1 ) a0002404: e3700001 cmn r0, #1 if ( sbrk_amount == 0 ) return (void *) 0; the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); a0002408: e1a01000 mov r1, r0 if ( starting_address == (void*) -1 ) a000240c: 0a000018 beq a0002474 return (void *) 0; if ( !_Protected_heap_Extend( a0002410: e59f6068 ldr r6, [pc, #104] ; a0002480 a0002414: e1a02004 mov r2, r4 a0002418: e5960000 ldr r0, [r6] a000241c: eb0011c8 bl a0006b44 <_Protected_heap_Extend> a0002420: e2507000 subs r7, r0, #0 a0002424: 1a000006 bne a0002444 RTEMS_Malloc_Heap, starting_address, the_size) ) { sbrk(-the_size); a0002428: e2640000 rsb r0, r4, #0 a000242c: ebfff842 bl a000053c errno = ENOMEM; a0002430: eb0027aa bl a000c2e0 <__errno> a0002434: e3a0300c mov r3, #12 a0002438: e5803000 str r3, [r0] return (void *) 0; a000243c: e1a00007 mov r0, r7 a0002440: e8bd80f0 pop {r4, r5, r6, r7, pc} } MSBUMP(space_available, the_size); a0002444: e59f3038 ldr r3, [pc, #56] ; a0002484 a0002448: e5960000 ldr r0, [r6] a000244c: e1a01005 mov r1, r5 a0002450: e5932000 ldr r2, [r3] a0002454: e0844002 add r4, r4, r2 a0002458: e3a02000 mov r2, #0 a000245c: e5834000 str r4, [r3] a0002460: e1a03002 mov r3, r2 return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } a0002464: e8bd40f0 pop {r4, r5, r6, r7, lr} a0002468: ea0011a2 b a0006af8 <_Protected_heap_Allocate_aligned_with_boundary> */ sbrk_amount = RTEMS_Malloc_Sbrk_amount; if ( sbrk_amount == 0 ) return (void *) 0; a000246c: e1a00004 mov r0, r4 <== NOT EXECUTED a0002470: e8bd80f0 pop {r4, r5, r6, r7, pc} <== NOT EXECUTED the_size = ((size + sbrk_amount) / sbrk_amount * sbrk_amount); starting_address = (void *) sbrk(the_size); if ( starting_address == (void*) -1 ) return (void *) 0; a0002474: e3a00000 mov r0, #0 MSBUMP(space_available, the_size); return_this = _Protected_heap_Allocate( RTEMS_Malloc_Heap, size ); return return_this; } a0002478: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000ac68 : void memfile_free_blocks_in_table( block_p **block_table, int entries ) { a000ac68: e92d41f0 push {r4, r5, r6, r7, r8, lr} */ #if defined(RTEMS_DEBUG) assert( block_table ); #endif if ( !block_table ) a000ac6c: 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 a000ac84: ea00000b b a000acb8 <== NOT EXECUTED */ b = *block_table; for ( i=0 ; i memfile_free_block( b[i] ); a000ac94: ebffffeb bl a000ac48 b[i] = 0; a000ac98: 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 ); a000aca8: e5950000 ldr r0, [r5] a000acac: ebffffe5 bl a000ac48 *block_table = 0; a000acb0: e3a03000 mov r3, #0 a000acb4: e5853000 str r3, [r5] a000acb8: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a000b1b0 : int memfile_ftruncate( rtems_libio_t *iop, rtems_off64_t length ) { a000b1b0: e92d4013 push {r0, r1, r4, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000b1b4: 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 ) a000b1b8: e5943054 ldr r3, [r4, #84] ; 0x54 a000b1bc: e1530002 cmp r3, r2 a000b1c0: ba000003 blt a000b1d4 a000b1c4: 1a000005 bne a000b1e0 a000b1c8: e5943050 ldr r3, [r4, #80] ; 0x50 a000b1cc: e1530001 cmp r3, r1 a000b1d0: 2a000002 bcs a000b1e0 return IMFS_memfile_extend( the_jnode, length ); a000b1d4: e1a00004 mov r0, r4 <== NOT EXECUTED a000b1d8: ebffff08 bl a000ae00 <== NOT EXECUTED a000b1dc: ea000008 b a000b204 <== 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; a000b1e0: e5841050 str r1, [r4, #80] ; 0x50 a000b1e4: e5842054 str r2, [r4, #84] ; 0x54 iop->size = the_jnode->info.file.size; a000b1e8: e9800006 stmib r0, {r1, r2} IMFS_update_atime( the_jnode ); a000b1ec: e3a01000 mov r1, #0 a000b1f0: e1a0000d mov r0, sp a000b1f4: ebffdae3 bl a0001d88 a000b1f8: e59d3000 ldr r3, [sp] return 0; a000b1fc: e3a00000 mov r0, #0 */ the_jnode->info.file.size = length; iop->size = the_jnode->info.file.size; IMFS_update_atime( the_jnode ); a000b200: e5843040 str r3, [r4, #64] ; 0x40 return 0; } a000b204: e8bd801c pop {r2, r3, r4, pc} =============================================================================== a000b208 : rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a000b208: e92d4030 push {r4, r5, lr} IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000b20c: e5905018 ldr r5, [r0, #24] rtems_off64_t memfile_lseek( rtems_libio_t *iop, rtems_off64_t offset, int whence ) { a000b210: e1a04000 mov r4, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; if (the_jnode->type == IMFS_LINEAR_FILE) { a000b214: e595304c ldr r3, [r5, #76] ; 0x4c a000b218: e3530006 cmp r3, #6 a000b21c: 1a00000b bne a000b250 if (iop->offset > the_jnode->info.linearfile.size) a000b220: e5953054 ldr r3, [r5, #84] ; 0x54 a000b224: e5901010 ldr r1, [r0, #16] a000b228: e5952050 ldr r2, [r5, #80] ; 0x50 a000b22c: e1510003 cmp r1, r3 a000b230: ca000003 bgt a000b244 a000b234: 1a000014 bne a000b28c a000b238: e590100c ldr r1, [r0, #12] a000b23c: e1510002 cmp r1, r2 a000b240: 9a000011 bls a000b28c iop->offset = the_jnode->info.linearfile.size; a000b244: e584200c str r2, [r4, #12] <== NOT EXECUTED a000b248: e5843010 str r3, [r4, #16] <== NOT EXECUTED a000b24c: ea00000e b a000b28c <== NOT EXECUTED } else { /* Must be a block file (IMFS_MEMORY_FILE). */ if (IMFS_memfile_extend( the_jnode, iop->offset )) a000b250: e1a00005 mov r0, r5 a000b254: e284200c add r2, r4, #12 a000b258: e8920006 ldm r2, {r1, r2} a000b25c: ebfffee7 bl a000ae00 a000b260: e3500000 cmp r0, #0 a000b264: 0a000005 beq a000b280 rtems_set_errno_and_return_minus_one( ENOSPC ); a000b268: eb0002a1 bl a000bcf4 <__errno> <== NOT EXECUTED a000b26c: e3a0301c mov r3, #28 <== NOT EXECUTED a000b270: e5803000 str r3, [r0] <== NOT EXECUTED a000b274: e3e04000 mvn r4, #0 <== NOT EXECUTED a000b278: e3e03000 mvn r3, #0 <== NOT EXECUTED a000b27c: ea000004 b a000b294 <== NOT EXECUTED iop->size = the_jnode->info.file.size; a000b280: e2853050 add r3, r5, #80 ; 0x50 a000b284: e893000c ldm r3, {r2, r3} a000b288: e984000c stmib r4, {r2, r3} } return iop->offset; a000b28c: e284400c add r4, r4, #12 a000b290: e8940018 ldm r4, {r3, r4} } a000b294: e1a00003 mov r0, r3 a000b298: e1a01004 mov r1, r4 a000b29c: e8bd8030 pop {r4, r5, pc} =============================================================================== a000b114 : the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000b114: e5903014 ldr r3, [r0, #20] rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000b118: e92d4031 push {r0, r4, r5, lr} the_jnode = iop->pathinfo.node_access; /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000b11c: e3130f81 tst r3, #516 ; 0x204 rtems_libio_t *iop, const char *pathname, uint32_t flag, uint32_t mode ) { a000b120: e1a05000 mov r5, r0 IMFS_jnode_t *the_jnode; the_jnode = iop->pathinfo.node_access; a000b124: e5904018 ldr r4, [r0, #24] /* * Perform 'copy on write' for linear files */ if ((iop->flags & (LIBIO_FLAGS_WRITE | LIBIO_FLAGS_APPEND)) a000b128: 0a000015 beq a000b184 && (the_jnode->type == IMFS_LINEAR_FILE)) { a000b12c: e594304c ldr r3, [r4, #76] ; 0x4c a000b130: e3530006 cmp r3, #6 a000b134: 1a000012 bne a000b184 uint32_t count = the_jnode->info.linearfile.size; a000b138: 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; a000b13c: 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; a000b140: e3a02005 mov r2, #5 <== NOT EXECUTED a000b144: e584204c str r2, [r4, #76] ; 0x4c <== NOT EXECUTED the_jnode->info.file.size = 0; a000b148: e3a01000 mov r1, #0 <== NOT EXECUTED a000b14c: 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) a000b150: 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; a000b154: e5943058 ldr r3, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->type = IMFS_MEMORY_FILE; the_jnode->info.file.size = 0; a000b158: e5841050 str r1, [r4, #80] ; 0x50 <== NOT EXECUTED a000b15c: e5842054 str r2, [r4, #84] ; 0x54 <== NOT EXECUTED the_jnode->info.file.indirect = 0; a000b160: e5840058 str r0, [r4, #88] ; 0x58 <== NOT EXECUTED the_jnode->info.file.doubly_indirect = 0; a000b164: e584005c str r0, [r4, #92] ; 0x5c <== NOT EXECUTED the_jnode->info.file.triply_indirect = 0; a000b168: e5840060 str r0, [r4, #96] ; 0x60 <== NOT EXECUTED if ((count != 0) a000b16c: 0a000004 beq a000b184 <== NOT EXECUTED && (IMFS_memfile_write(the_jnode, 0, buffer, count) == -1)) a000b170: e1a00004 mov r0, r4 <== NOT EXECUTED a000b174: e58dc000 str ip, [sp] <== NOT EXECUTED a000b178: ebffff67 bl a000af1c <== NOT EXECUTED a000b17c: e3700001 cmn r0, #1 <== NOT EXECUTED a000b180: 0a000009 beq a000b1ac <== NOT EXECUTED return -1; } if (iop->flags & LIBIO_FLAGS_APPEND) a000b184: e5953014 ldr r3, [r5, #20] a000b188: e3130c02 tst r3, #512 ; 0x200 iop->offset = the_jnode->info.file.size; a000b18c: 12843050 addne r3, r4, #80 ; 0x50 a000b190: 1893000c ldmne r3, {r2, r3} a000b194: 1585200c strne r2, [r5, #12] a000b198: 15853010 strne r3, [r5, #16] iop->size = the_jnode->info.file.size; a000b19c: e2844050 add r4, r4, #80 ; 0x50 a000b1a0: e8940018 ldm r4, {r3, r4} a000b1a4: e9850018 stmib r5, {r3, r4} return 0; a000b1a8: e3a00000 mov r0, #0 } a000b1ac: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== a0002130 : int mknod( const char *pathname, mode_t mode, dev_t dev ) { a0002130: 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) ) ) a0002134: e3110a0f tst r1, #61440 ; 0xf000 int mknod( const char *pathname, mode_t mode, dev_t dev ) { a0002138: e24dd020 sub sp, sp, #32 a000213c: e1a06000 mov r6, r0 a0002140: e1a05001 mov r5, r1 a0002144: e1a07002 mov r7, r2 a0002148: 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) ) ) a000214c: 1a000003 bne a0002160 rtems_set_errno_and_return_minus_one( EINVAL ); a0002150: eb0026e7 bl a000bcf4 <__errno> <== NOT EXECUTED a0002154: e3a03016 mov r3, #22 <== NOT EXECUTED a0002158: e5803000 str r3, [r0] <== NOT EXECUTED a000215c: ea000018 b a00021c4 <== NOT EXECUTED rtems_filesystem_get_start_loc( pathname, &i, &temp_loc ); a0002160: e28d4004 add r4, sp, #4 a0002164: e28d101c add r1, sp, #28 a0002168: e1a02004 mov r2, r4 a000216c: eb000242 bl a0002a7c result = (*temp_loc.ops->evalformake_h)( a0002170: e59d3010 ldr r3, [sp, #16] a0002174: e59d001c ldr r0, [sp, #28] a0002178: e1a01004 mov r1, r4 a000217c: e5933004 ldr r3, [r3, #4] a0002180: e0860000 add r0, r6, r0 a0002184: e28d2018 add r2, sp, #24 a0002188: e12fff33 blx r3 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) a000218c: e3500000 cmp r0, #0 a0002190: 1a00000b bne a00021c4 return -1; result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); a0002194: e59d3010 ldr r3, [sp, #16] a0002198: e58d4000 str r4, [sp] a000219c: e1a01005 mov r1, r5 a00021a0: e593c014 ldr ip, [r3, #20] a00021a4: e59d0018 ldr r0, [sp, #24] a00021a8: e1a02007 mov r2, r7 a00021ac: e1a03008 mov r3, r8 a00021b0: e12fff3c blx ip a00021b4: e1a05000 mov r5, r0 rtems_filesystem_freenode( &temp_loc ); a00021b8: e1a00004 mov r0, r4 a00021bc: ebfffeb7 bl a0001ca0 return result; a00021c0: ea000000 b a00021c8 &pathname[i], &temp_loc, &name_start ); if ( result != 0 ) return -1; a00021c4: e3e05000 mvn r5, #0 result = (*temp_loc.ops->mknod_h)( name_start, mode, dev, &temp_loc ); rtems_filesystem_freenode( &temp_loc ); return result; } a00021c8: e1a00005 mov r0, r5 a00021cc: e28dd020 add sp, sp, #32 a00021d0: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0002264 : const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { a0002264: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && a0002268: e3530001 cmp r3, #1 const char *target, const char *filesystemtype, rtems_filesystem_options_t options, const void *data ) { a000226c: e24dd028 sub sp, sp, #40 ; 0x28 a0002270: e1a06000 mov r6, r0 a0002274: e1a07001 mov r7, r1 a0002278: e1a08002 mov r8, r2 a000227c: e58d300c str r3, [sp, #12] /* * Are the file system options valid? */ if ( options != RTEMS_FILESYSTEM_READ_ONLY && a0002280: 8a000004 bhi a0002298 rtems_set_errno_and_return_minus_one( EINVAL ); /* * Get mount handler */ mount_h = rtems_filesystem_get_mount_handler( filesystemtype ); a0002284: e1a00002 mov r0, r2 a0002288: eb001d3a bl a0009778 if ( !mount_h ) a000228c: e3500000 cmp r0, #0 a0002290: e58d0010 str r0, [sp, #16] a0002294: 1a000002 bne a00022a4 rtems_set_errno_and_return_minus_one( EINVAL ); a0002298: eb002695 bl a000bcf4 <__errno> a000229c: e3a03016 mov r3, #22 a00022a0: ea000039 b a000238c const char *target_or_null, const char *filesystemtype, size_t *target_length_ptr ) { const char *target = target_or_null != NULL ? target_or_null : "/"; a00022a4: e59f3258 ldr r3, [pc, #600] ; a0002504 { 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; a00022a8: e2575000 subs r5, r7, #0 a00022ac: 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 : "/"; a00022b0: e3550000 cmp r5, #0 a00022b4: 11a03007 movne r3, r7 size_t filesystemtype_size = strlen( filesystemtype ) + 1; a00022b8: 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 : "/"; a00022bc: e58d3004 str r3, [sp, #4] size_t filesystemtype_size = strlen( filesystemtype ) + 1; a00022c0: eb002a7b bl a000ccb4 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; a00022c4: 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; a00022c8: e280b001 add fp, r0, #1 size_t source_size = source_or_null != NULL ? strlen( source_or_null ) + 1 : 0; a00022cc: 01a0a006 moveq sl, r6 a00022d0: 0a000002 beq a00022e0 a00022d4: e1a00006 mov r0, r6 a00022d8: eb002a75 bl a000ccb4 a00022dc: e280a001 add sl, r0, #1 size_t target_length = strlen( target ); a00022e0: e59d0004 ldr r0, [sp, #4] a00022e4: eb002a72 bl a000ccb4 size_t size = sizeof( rtems_filesystem_mount_table_entry_t ) + filesystemtype_size + source_size + target_length + 1; a00022e8: e28b1075 add r1, fp, #117 ; 0x75 a00022ec: 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 ); a00022f0: 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 ); a00022f4: e081100a add r1, r1, sl a00022f8: e3a00001 mov r0, #1 a00022fc: ebfffdf0 bl a0001ac4 if ( mt_entry != NULL ) { a0002300: e2504000 subs r4, r0, #0 a0002304: 0a00001e beq a0002384 char *str = (char *) mt_entry + sizeof( *mt_entry ); a0002308: e2849074 add r9, r4, #116 ; 0x74 strcpy( str, filesystemtype ); a000230c: e1a00009 mov r0, r9 a0002310: e1a01008 mov r1, r8 a0002314: eb002a16 bl a000cb74 mt_entry->type = str; str += filesystemtype_size; if ( source_or_null != NULL ) { a0002318: e3560000 cmp r6, #0 if ( mt_entry != NULL ) { char *str = (char *) mt_entry + sizeof( *mt_entry ); strcpy( str, filesystemtype ); mt_entry->type = str; a000231c: e584906c str r9, [r4, #108] ; 0x6c str += filesystemtype_size; a0002320: e089900b add r9, r9, fp if ( source_or_null != NULL ) { a0002324: 0a000004 beq a000233c strcpy( str, source_or_null ); a0002328: e1a00009 mov r0, r9 a000232c: e1a01006 mov r1, r6 a0002330: eb002a0f bl a000cb74 mt_entry->dev = str; a0002334: e5849070 str r9, [r4, #112] ; 0x70 str += source_size; a0002338: e089900a add r9, r9, sl } strcpy( str, target ); a000233c: e59d1004 ldr r1, [sp, #4] a0002340: e1a00009 mov r0, r9 a0002344: eb002a0a bl a000cb74 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; a0002348: e59d300c ldr r3, [sp, #12] mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; a000234c: e59fe1b4 ldr lr, [pc, #436] ; a0002508 a0002350: e284c038 add ip, r4, #56 ; 0x38 ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); mt_entry->mt_fs_root.mt_entry = mt_entry; mt_entry->options = options; a0002354: e5843030 str r3, [r4, #48] ; 0x30 mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; a0002358: e8be000f ldm lr!, {r0, r1, r2, r3} a000235c: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002360: e8be000f ldm lr!, {r0, r1, r2, r3} a0002364: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002368: 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 ) { a000236c: e3550000 cmp r5, #0 mt_entry->dev = str; str += source_size; } strcpy( str, target ); mt_entry->target = str; a0002370: 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; a0002374: e584402c str r4, [r4, #44] ; 0x2c mt_entry->options = options; mt_entry->pathconf_limits_and_options = rtems_filesystem_default_pathconf; a0002378: 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 ) { a000237c: 0a00002e beq a000243c a0002380: ea000003 b a0002394 target, filesystemtype, &target_length ); if ( !mt_entry ) rtems_set_errno_and_return_minus_one( ENOMEM ); a0002384: eb00265a bl a000bcf4 <__errno> <== NOT EXECUTED a0002388: e3a0300c mov r3, #12 <== NOT EXECUTED a000238c: e5803000 str r3, [r0] a0002390: ea000058 b a00024f8 * The mount_point should be a directory with read/write/execute * permissions in the existing tree. */ if ( has_target ) { if ( rtems_filesystem_evaluate_path( a0002394: e3a03001 mov r3, #1 a0002398: e28d6014 add r6, sp, #20 a000239c: e58d3000 str r3, [sp] a00023a0: e1a00007 mov r0, r7 a00023a4: e59d1008 ldr r1, [sp, #8] a00023a8: e3a02007 mov r2, #7 a00023ac: e1a03006 mov r3, r6 a00023b0: ebfffdff bl a0001bb4 a00023b4: e3700001 cmn r0, #1 a00023b8: 0a000047 beq a00024dc /* * Test to see if it is a directory */ if ( loc.ops->node_type_h( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ) { a00023bc: e59d3020 ldr r3, [sp, #32] a00023c0: e1a00006 mov r0, r6 a00023c4: e5933010 ldr r3, [r3, #16] a00023c8: e12fff33 blx r3 a00023cc: e3500001 cmp r0, #1 a00023d0: 0a000002 beq a00023e0 errno = ENOTDIR; a00023d4: eb002646 bl a000bcf4 <__errno> a00023d8: e3a03014 mov r3, #20 a00023dc: ea000006 b a00023fc /* * You can only mount one file system onto a single mount point. */ if ( rtems_filesystem_mount_iterate( is_node_fs_root, loc.node_access ) ) { a00023e0: e59f0124 ldr r0, [pc, #292] ; a000250c a00023e4: e59d1014 ldr r1, [sp, #20] a00023e8: ebffff88 bl a0002210 a00023ec: e3500000 cmp r0, #0 a00023f0: 0a000003 beq a0002404 errno = EBUSY; a00023f4: eb00263e bl a000bcf4 <__errno> a00023f8: e3a03010 mov r3, #16 a00023fc: e5803000 str r3, [r0] goto cleanup_and_bail; a0002400: ea000036 b a00024e0 * 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; a0002404: e59d3014 ldr r3, [sp, #20] mt_entry->mt_point_node.handlers = loc.handlers; mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; a0002408: e59d2024 ldr r2, [sp, #36] ; 0x24 /* * This link to the parent is only done when we are dealing with system * below the base file system */ if ( loc.ops->mount_h( mt_entry ) ) { a000240c: e1a00004 mov r0, r4 * 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; a0002410: e5843008 str r3, [r4, #8] mt_entry->mt_point_node.handlers = loc.handlers; a0002414: e59d301c ldr r3, [sp, #28] mt_entry->mt_point_node.ops = loc.ops; mt_entry->mt_point_node.mt_entry = loc.mt_entry; a0002418: e5842018 str r2, [r4, #24] * until the system is unmounted. It may be needed to correctly * traverse the tree. */ mt_entry->mt_point_node.node_access = loc.node_access; mt_entry->mt_point_node.handlers = loc.handlers; a000241c: e5843010 str r3, [r4, #16] mt_entry->mt_point_node.ops = loc.ops; a0002420: e59d3020 ldr r3, [sp, #32] a0002424: 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 ) ) { a0002428: e5933020 ldr r3, [r3, #32] a000242c: e12fff33 blx r3 a0002430: e3500000 cmp r0, #0 a0002434: 0a00000b beq a0002468 a0002438: ea000028 b a00024e0 <== NOT EXECUTED */ RTEMS_INLINE_ROUTINE bool _Chain_Is_empty( Chain_Control *the_chain ) { return (the_chain->first == _Chain_Tail(the_chain)); a000243c: e59f30cc ldr r3, [pc, #204] ; a0002510 */ RTEMS_INLINE_ROUTINE Chain_Node *_Chain_Tail( Chain_Control *the_chain ) { return (Chain_Node *) &the_chain->permanent_null; a0002440: e2832004 add r2, r3, #4 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { a0002444: e5933000 ldr r3, [r3] a0002448: 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; a000244c: 01a06005 moveq r6, r5 } } else { /* * Do we already have a base file system ? */ if ( !rtems_chain_is_empty( &mount_chain ) ) { a0002450: 0a000004 beq a0002468 errno = EINVAL; a0002454: eb002626 bl a000bcf4 <__errno> <== NOT EXECUTED a0002458: e3a03016 mov r3, #22 <== NOT EXECUTED a000245c: 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; a0002460: 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; a0002464: ea00001d b a00024e0 <== 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 ) ) { a0002468: e1a00004 mov r0, r4 a000246c: e59d104c ldr r1, [sp, #76] ; 0x4c a0002470: e59d3010 ldr r3, [sp, #16] a0002474: e12fff33 blx r3 a0002478: e2507000 subs r7, r0, #0 a000247c: 0a000004 beq a0002494 /* * Try to undo the mount operation */ loc.ops->unmount_h( mt_entry ); a0002480: e59d3020 ldr r3, [sp, #32] <== NOT EXECUTED a0002484: e1a00004 mov r0, r4 <== NOT EXECUTED a0002488: e5933028 ldr r3, [r3, #40] ; 0x28 <== NOT EXECUTED a000248c: e12fff33 blx r3 <== NOT EXECUTED goto cleanup_and_bail; a0002490: ea000012 b a00024e0 <== NOT EXECUTED } /* * Add the mount table entry to the mount table chain */ rtems_libio_lock(); a0002494: ebffff53 bl a00021e8 a0002498: e59f0070 ldr r0, [pc, #112] ; a0002510 a000249c: e1a01004 mov r1, r4 a00024a0: eb000cc6 bl a00057c0 <_Chain_Append> rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); a00024a4: ebffff55 bl a0002200 if ( !has_target ) a00024a8: e3550000 cmp r5, #0 rtems_filesystem_root = mt_entry->mt_fs_root; return 0; a00024ac: 11a00007 movne r0, r7 */ rtems_libio_lock(); rtems_chain_append( &mount_chain, &mt_entry->Node ); rtems_libio_unlock(); if ( !has_target ) a00024b0: 1a000011 bne a00024fc rtems_filesystem_root = mt_entry->mt_fs_root; a00024b4: e59f3058 ldr r3, [pc, #88] ; a0002514 a00024b8: e284401c add r4, r4, #28 a00024bc: e593c000 ldr ip, [r3] a00024c0: e8b4000f ldm r4!, {r0, r1, r2, r3} a00024c4: e28cc018 add ip, ip, #24 a00024c8: e8ac000f stmia ip!, {r0, r1, r2, r3} a00024cc: e5943000 ldr r3, [r4] return 0; a00024d0: 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; a00024d4: e58c3000 str r3, [ip] a00024d8: ea000007 b a00024fc ) { 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; a00024dc: e3a06000 mov r6, #0 <== NOT EXECUTED return 0; cleanup_and_bail: free( mt_entry ); a00024e0: e1a00004 mov r0, r4 a00024e4: ebfffdf2 bl a0001cb4 if ( loc_to_free ) a00024e8: e3560000 cmp r6, #0 a00024ec: 0a000001 beq a00024f8 rtems_filesystem_freenode( loc_to_free ); a00024f0: e1a00006 mov r0, r6 a00024f4: ebfffde9 bl a0001ca0 return -1; a00024f8: e3e00000 mvn r0, #0 } a00024fc: e28dd028 add sp, sp, #40 ; 0x28 a0002500: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000251c : */ int newlib_free_buffers( FILE *fp ) { a000251c: e92d4010 push {r4, lr} a0002520: e1a04000 mov r4, r0 switch ( fileno(fp) ) { a0002524: eb0026f5 bl a000c100 a0002528: e3500002 cmp r0, #2 a000252c: 8a00000b bhi a0002560 case 0: case 1: case 2: if (fp->_flags & __SMBF) { a0002530: e1d430bc ldrh r3, [r4, #12] a0002534: e3130080 tst r3, #128 ; 0x80 a0002538: 0a00000a beq a0002568 free( fp->_bf._base ); a000253c: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0002540: ebfffddb bl a0001cb4 <== NOT EXECUTED fp->_flags &= ~__SMBF; a0002544: e1d430bc ldrh r3, [r4, #12] <== NOT EXECUTED a0002548: e3c33080 bic r3, r3, #128 ; 0x80 <== NOT EXECUTED a000254c: e1c430bc strh r3, [r4, #12] <== NOT EXECUTED fp->_bf._base = fp->_p = (unsigned char *) NULL; a0002550: e3a03000 mov r3, #0 <== NOT EXECUTED a0002554: e5843000 str r3, [r4] <== NOT EXECUTED a0002558: e5843010 str r3, [r4, #16] <== NOT EXECUTED a000255c: ea000001 b a0002568 <== NOT EXECUTED } break; default: fclose(fp); a0002560: e1a00004 mov r0, r4 <== NOT EXECUTED a0002564: eb002630 bl a000be2c <== NOT EXECUTED } return 0; } a0002568: e3a00000 mov r0, #0 a000256c: e8bd8010 pop {r4, pc} =============================================================================== a00021a4 : rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { a00021a4: e92d4010 push {r4, lr} rtems_device_driver status; if ( !initialized ) { a00021a8: e59f303c ldr r3, [pc, #60] ; a00021ec rtems_device_driver null_initialize( rtems_device_major_number major, rtems_device_minor_number minor __attribute__((unused)), void *pargp __attribute__((unused)) ) { a00021ac: e1a04000 mov r4, r0 rtems_device_driver status; if ( !initialized ) { a00021b0: e5d32000 ldrb r2, [r3] a00021b4: e3520000 cmp r2, #0 a00021b8: 1a000009 bne a00021e4 initialized = 1; a00021bc: e3a01001 mov r1, #1 a00021c0: e5c31000 strb r1, [r3] status = rtems_io_register_name( a00021c4: e59f0024 ldr r0, [pc, #36] ; a00021f0 a00021c8: e1a01004 mov r1, r4 a00021cc: eb00016e bl a000278c "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) a00021d0: e3500000 cmp r0, #0 rtems_fatal_error_occurred(status); NULL_major = major; a00021d4: 059f3018 ldreq r3, [pc, #24] ; a00021f4 a00021d8: 05834000 streq r4, [r3] "/dev/null", major, (rtems_device_minor_number) 0 ); if (status != RTEMS_SUCCESSFUL) a00021dc: 0a000000 beq a00021e4 rtems_fatal_error_occurred(status); a00021e0: eb001111 bl a000662c <== NOT EXECUTED NULL_major = major; } return RTEMS_SUCCESSFUL; } a00021e4: e3a00000 mov r0, #0 a00021e8: e8bd8010 pop {r4, pc} =============================================================================== a0003648 : /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { a0003648: e92d4011 push {r0, r4, lr} a000364c: e5cd0000 strb r0, [sp] int i; if (tty->termios.c_oflag & OPOST) { a0003650: e5913034 ldr r3, [r1, #52] ; 0x34 /* * Handle output processing */ static void oproc (unsigned char c, struct rtems_termios_tty *tty) { a0003654: e1a04001 mov r4, r1 int i; if (tty->termios.c_oflag & OPOST) { a0003658: e3130001 tst r3, #1 a000365c: 0a000045 beq a0003778 switch (c) { a0003660: e5dd2000 ldrb r2, [sp] a0003664: e2421008 sub r1, r2, #8 a0003668: e3510005 cmp r1, #5 a000366c: 979ff101 ldrls pc, [pc, r1, lsl #2] a0003670: ea00002c b a0003728 a0003674: a0003714 .word 0xa0003714 <== NOT EXECUTED a0003678: a00036ec .word 0xa00036ec <== NOT EXECUTED a000367c: a000368c .word 0xa000368c <== NOT EXECUTED a0003680: a0003728 .word 0xa0003728 <== NOT EXECUTED a0003684: a0003728 .word 0xa0003728 <== NOT EXECUTED a0003688: a00036b4 .word 0xa00036b4 <== NOT EXECUTED case '\n': if (tty->termios.c_oflag & ONLRET) a000368c: e3130020 tst r3, #32 tty->column = 0; a0003690: 13a02000 movne r2, #0 a0003694: 15842028 strne r2, [r4, #40] ; 0x28 if (tty->termios.c_oflag & ONLCR) { a0003698: e3130004 tst r3, #4 a000369c: 0a000035 beq a0003778 rtems_termios_puts ("\r", 1, tty); a00036a0: e59f00e4 ldr r0, [pc, #228] ; a000378c a00036a4: e3a01001 mov r1, #1 a00036a8: e1a02004 mov r2, r4 a00036ac: ebffffa4 bl a0003544 a00036b0: ea00000b b a00036e4 tty->column = 0; } break; case '\r': if ((tty->termios.c_oflag & ONOCR) && (tty->column == 0)) a00036b4: e3130010 tst r3, #16 <== NOT EXECUTED a00036b8: 0a000002 beq a00036c8 <== NOT EXECUTED a00036bc: e5942028 ldr r2, [r4, #40] ; 0x28 <== NOT EXECUTED a00036c0: e3520000 cmp r2, #0 <== NOT EXECUTED a00036c4: 0a00002f beq a0003788 <== NOT EXECUTED return; if (tty->termios.c_oflag & OCRNL) { a00036c8: e2132008 ands r2, r3, #8 <== NOT EXECUTED c = '\n'; if (tty->termios.c_oflag & ONLRET) tty->column = 0; break; } tty->column = 0; a00036cc: 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) { a00036d0: 0a000028 beq a0003778 <== NOT EXECUTED c = '\n'; a00036d4: e3a0200a mov r2, #10 <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) a00036d8: 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'; a00036dc: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (tty->termios.c_oflag & ONLRET) a00036e0: 0a000024 beq a0003778 <== NOT EXECUTED tty->column = 0; a00036e4: e3a03000 mov r3, #0 a00036e8: ea000021 b a0003774 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); a00036ec: e5942028 ldr r2, [r4, #40] ; 0x28 if ((tty->termios.c_oflag & TABDLY) == XTABS) { a00036f0: e2033b06 and r3, r3, #6144 ; 0x1800 a00036f4: e3530b06 cmp r3, #6144 ; 0x1800 } tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); a00036f8: e2021007 and r1, r2, #7 a00036fc: e2611008 rsb r1, r1, #8 a0003700: e0813002 add r3, r1, r2 if ((tty->termios.c_oflag & TABDLY) == XTABS) { tty->column += i; a0003704: 05843028 streq r3, [r4, #40] ; 0x28 rtems_termios_puts ( " ", i, tty); a0003708: 059f0080 ldreq r0, [pc, #128] ; a0003790 tty->column = 0; break; case '\t': i = 8 - (tty->column & 7); if ((tty->termios.c_oflag & TABDLY) == XTABS) { a000370c: 1a000018 bne a0003774 a0003710: ea00001a b a0003780 } tty->column += i; break; case '\b': if (tty->column > 0) a0003714: e5943028 ldr r3, [r4, #40] ; 0x28 <== NOT EXECUTED a0003718: e3530000 cmp r3, #0 <== NOT EXECUTED tty->column--; a000371c: c2433001 subgt r3, r3, #1 <== NOT EXECUTED } tty->column += i; break; case '\b': if (tty->column > 0) a0003720: ca000013 bgt a0003774 <== NOT EXECUTED a0003724: ea000013 b a0003778 <== NOT EXECUTED tty->column--; break; default: if (tty->termios.c_oflag & OLCUC) a0003728: e3130002 tst r3, #2 a000372c: 0a000007 beq a0003750 c = toupper(c); a0003730: e59f305c ldr r3, [pc, #92] ; a0003794 <== NOT EXECUTED a0003734: e5933000 ldr r3, [r3] <== NOT EXECUTED a0003738: e0833002 add r3, r3, r2 <== NOT EXECUTED a000373c: e5d33001 ldrb r3, [r3, #1] <== NOT EXECUTED a0003740: e2033003 and r3, r3, #3 <== NOT EXECUTED a0003744: e3530002 cmp r3, #2 <== NOT EXECUTED a0003748: 02422020 subeq r2, r2, #32 <== NOT EXECUTED a000374c: e5cd2000 strb r2, [sp] <== NOT EXECUTED if (!iscntrl(c)) a0003750: e59f203c ldr r2, [pc, #60] ; a0003794 a0003754: e5dd3000 ldrb r3, [sp] a0003758: e5922000 ldr r2, [r2] a000375c: e0823003 add r3, r2, r3 a0003760: e5d33001 ldrb r3, [r3, #1] a0003764: e3130020 tst r3, #32 a0003768: 1a000002 bne a0003778 tty->column++; a000376c: e5943028 ldr r3, [r4, #40] ; 0x28 a0003770: e2833001 add r3, r3, #1 a0003774: e5843028 str r3, [r4, #40] ; 0x28 break; } } rtems_termios_puts (&c, 1, tty); a0003778: e1a0000d mov r0, sp a000377c: e3a01001 mov r1, #1 a0003780: e1a02004 mov r2, r4 a0003784: ebffff6e bl a0003544 } a0003788: e8bd8018 pop {r3, r4, pc} =============================================================================== a000b158 : uint32_t cmd, void *buffer, rtems_libio_t *iop ) { if (cmd == FIONREAD) { a000b158: e59f3060 ldr r3, [pc, #96] ; a000b1c0 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a000b15c: e92d4070 push {r4, r5, r6, lr} if (cmd == FIONREAD) { a000b160: e1510003 cmp r1, r3 pipe_control_t *pipe, uint32_t cmd, void *buffer, rtems_libio_t *iop ) { a000b164: e1a04000 mov r4, r0 a000b168: e1a05002 mov r5, r2 if (cmd == FIONREAD) { a000b16c: 1a00000d bne a000b1a8 if (buffer == NULL) a000b170: e3520000 cmp r2, #0 a000b174: 0a00000d beq a000b1b0 return -EFAULT; if (! PIPE_LOCK(pipe)) a000b178: e3a01000 mov r1, #0 a000b17c: e5900028 ldr r0, [r0, #40] ; 0x28 a000b180: e1a02001 mov r2, r1 a000b184: ebffecc2 bl a0006494 a000b188: e2506000 subs r6, r0, #0 a000b18c: 1a000009 bne a000b1b8 return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; a000b190: e594300c ldr r3, [r4, #12] PIPE_UNLOCK(pipe); a000b194: e5940028 ldr r0, [r4, #40] ; 0x28 if (! PIPE_LOCK(pipe)) return -EINTR; /* Return length of pipe */ *(unsigned int *)buffer = pipe->Length; a000b198: e5853000 str r3, [r5] PIPE_UNLOCK(pipe); a000b19c: ebffed02 bl a00065ac return 0; a000b1a0: e1a00006 mov r0, r6 a000b1a4: e8bd8070 pop {r4, r5, r6, pc} } return -EINVAL; a000b1a8: e3e00015 mvn r0, #21 a000b1ac: e8bd8070 pop {r4, r5, r6, pc} rtems_libio_t *iop ) { if (cmd == FIONREAD) { if (buffer == NULL) return -EFAULT; a000b1b0: e3e0000d mvn r0, #13 a000b1b4: e8bd8070 pop {r4, r5, r6, pc} if (! PIPE_LOCK(pipe)) return -EINTR; a000b1b8: e3e00003 mvn r0, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); return 0; } return -EINVAL; } a000b1bc: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a000ae38 : pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000ae38: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} a000ae3c: e1a09001 mov r9, r1 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000ae40: e3a01000 mov r1, #0 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000ae44: e1a04000 mov r4, r0 a000ae48: e1a05002 mov r5, r2 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000ae4c: e5900028 ldr r0, [r0, #40] ; 0x28 a000ae50: e1a02001 mov r2, r1 pipe_control_t *pipe, void *buffer, size_t count, rtems_libio_t *iop ) { a000ae54: e1a0a003 mov sl, r3 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000ae58: ebffed8d bl a0006494 a000ae5c: e2506000 subs r6, r0, #0 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) PIPE_WAKEUPWRITERS(pipe); a000ae60: 01a0b00d moveq fp, sp rtems_libio_t *iop ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) a000ae64: 0a000044 beq a000af7c a000ae68: ea00004f b a000afac <== NOT EXECUTED return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { /* Not an error */ if (pipe->Writers == 0) a000ae6c: e5947014 ldr r7, [r4, #20] a000ae70: e3570000 cmp r7, #0 a000ae74: 0a000045 beq a000af90 goto out_locked; if (LIBIO_NODELAY(iop)) { a000ae78: e59a8014 ldr r8, [sl, #20] a000ae7c: e2188001 ands r8, r8, #1 a000ae80: 1a000041 bne a000af8c ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a000ae84: e5943018 ldr r3, [r4, #24] PIPE_UNLOCK(pipe); a000ae88: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until pipe is no more empty or no writer exists */ pipe->waitingReaders ++; a000ae8c: e2833001 add r3, r3, #1 a000ae90: e5843018 str r3, [r4, #24] PIPE_UNLOCK(pipe); a000ae94: ebffedc4 bl a00065ac if (! PIPE_READWAIT(pipe)) a000ae98: e1a01008 mov r1, r8 a000ae9c: e594002c ldr r0, [r4, #44] ; 0x2c a000aea0: eb0003fd bl a000be9c a000aea4: e3500000 cmp r0, #0 a000aea8: 01a07000 moveq r7, r0 a000aeac: 13e07003 mvnne r7, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000aeb0: e1a01008 mov r1, r8 a000aeb4: e5940028 ldr r0, [r4, #40] ; 0x28 a000aeb8: e1a02008 mov r2, r8 a000aebc: ebffed74 bl a0006494 a000aec0: e3500000 cmp r0, #0 a000aec4: 1a000034 bne a000af9c /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a000aec8: e5943018 ldr r3, [r4, #24] if (ret != 0) a000aecc: e3570000 cmp r7, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingReaders --; a000aed0: e2433001 sub r3, r3, #1 a000aed4: e5843018 str r3, [r4, #24] if (ret != 0) a000aed8: 1a00002c bne a000af90 if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { while (PIPE_EMPTY(pipe)) { a000aedc: e594300c ldr r3, [r4, #12] a000aee0: e3530000 cmp r3, #0 a000aee4: 0affffe0 beq a000ae6c if (ret != 0) goto out_locked; } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); a000aee8: e0667005 rsb r7, r6, r5 a000aeec: e1530007 cmp r3, r7 a000aef0: 31a07003 movcc r7, r3 chunk1 = pipe->Size - pipe->Start; a000aef4: e5948004 ldr r8, [r4, #4] a000aef8: e5943008 ldr r3, [r4, #8] a000aefc: e5941000 ldr r1, [r4] a000af00: e0890006 add r0, r9, r6 a000af04: e0638008 rsb r8, r3, r8 if (chunk > chunk1) { a000af08: e1570008 cmp r7, r8 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); a000af0c: d0811003 addle r1, r1, r3 a000af10: d1a02007 movle r2, r7 } /* Read chunk bytes */ chunk = MIN(count - read, pipe->Length); chunk1 = pipe->Size - pipe->Start; if (chunk > chunk1) { a000af14: da000006 ble a000af34 memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk1); a000af18: e0811003 add r1, r1, r3 a000af1c: e1a02008 mov r2, r8 a000af20: eb000b10 bl a000db68 memcpy(buffer + read + chunk1, pipe->Buffer, chunk - chunk1); a000af24: e5941000 ldr r1, [r4] a000af28: e0860008 add r0, r6, r8 a000af2c: e0890000 add r0, r9, r0 a000af30: e0682007 rsb r2, r8, r7 } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); a000af34: eb000b0b bl a000db68 pipe->Start += chunk; a000af38: e5940008 ldr r0, [r4, #8] pipe->Start %= pipe->Size; a000af3c: e5941004 ldr r1, [r4, #4] a000af40: e0870000 add r0, r7, r0 a000af44: eb002eb9 bl a0016a30 <__umodsi3> pipe->Length -= chunk; a000af48: e594300c ldr r3, [r4, #12] } else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; a000af4c: e5840008 str r0, [r4, #8] pipe->Length -= chunk; a000af50: e0673003 rsb r3, r7, r3 /* For buffering optimization */ if (PIPE_EMPTY(pipe)) a000af54: e3530000 cmp r3, #0 pipe->Start = 0; a000af58: 05843008 streq r3, [r4, #8] else memcpy(buffer + read, pipe->Buffer + pipe->Start, chunk); pipe->Start += chunk; pipe->Start %= pipe->Size; pipe->Length -= chunk; a000af5c: e584300c str r3, [r4, #12] /* For buffering optimization */ if (PIPE_EMPTY(pipe)) pipe->Start = 0; if (pipe->waitingWriters > 0) a000af60: e594301c ldr r3, [r4, #28] a000af64: e3530000 cmp r3, #0 a000af68: 0a000002 beq a000af78 PIPE_WAKEUPWRITERS(pipe); a000af6c: e5940030 ldr r0, [r4, #48] ; 0x30 a000af70: e1a0100d mov r1, sp a000af74: eb0003b2 bl a000be44 read += chunk; a000af78: e0866007 add r6, r6, r7 int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; while (read < count) { a000af7c: e1560005 cmp r6, r5 a000af80: 3affffd5 bcc a000aedc a000af84: e3a07000 mov r7, #0 a000af88: ea000000 b a000af90 /* Not an error */ if (pipe->Writers == 0) goto out_locked; if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; a000af8c: e3e0700a mvn r7, #10 PIPE_WAKEUPWRITERS(pipe); read += chunk; } out_locked: PIPE_UNLOCK(pipe); a000af90: e5940028 ldr r0, [r4, #40] ; 0x28 a000af94: ebffed84 bl a00065ac a000af98: ea000000 b a000afa0 PIPE_UNLOCK(pipe); if (! PIPE_READWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingReaders not restored! */ ret = -EINTR; a000af9c: e3e07003 mvn r7, #3 <== NOT EXECUTED PIPE_UNLOCK(pipe); out_nolock: if (read > 0) return read; return ret; a000afa0: e3560000 cmp r6, #0 a000afa4: d1a06007 movle r6, r7 a000afa8: ea000000 b a000afb0 ) { int chunk, chunk1, read = 0, ret = 0; if (! PIPE_LOCK(pipe)) return -EINTR; a000afac: e3e06003 mvn r6, #3 <== NOT EXECUTED out_nolock: if (read > 0) return read; return ret; } a000afb0: e1a00006 mov r0, r6 a000afb4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000aa2c : */ int pipe_release( pipe_control_t **pipep, rtems_libio_t *iop ) { a000aa2c: e92d40f1 push {r0, r4, r5, r6, r7, lr} a000aa30: e1a06001 mov r6, r1 a000aa34: e1a05000 mov r5, r0 pipe_control_t *pipe = *pipep; a000aa38: e5904000 ldr r4, [r0] uint32_t mode; if (pipe_lock()) a000aa3c: ebffffbf bl a000a940 a000aa40: e2501000 subs r1, r0, #0 a000aa44: 1a000004 bne a000aa5c /* WARN pipe not freed and pipep not set to NULL! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); if (!PIPE_LOCK(pipe)) a000aa48: e5940028 ldr r0, [r4, #40] ; 0x28 a000aa4c: e1a02001 mov r2, r1 a000aa50: ebffee8f bl a0006494 a000aa54: e3500000 cmp r0, #0 a000aa58: 0a000001 beq a000aa64 /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); a000aa5c: e59f00a8 ldr r0, [pc, #168] ; a000ab0c <== NOT EXECUTED a000aa60: ebfff009 bl a0006a8c <== NOT EXECUTED mode = LIBIO_ACCMODE(iop); a000aa64: e5963014 ldr r3, [r6, #20] if (mode & LIBIO_FLAGS_READ) pipe->Readers --; if (mode & LIBIO_FLAGS_WRITE) pipe->Writers --; PIPE_UNLOCK(pipe); a000aa68: e5940028 ldr r0, [r4, #40] ; 0x28 /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); if (mode & LIBIO_FLAGS_READ) a000aa6c: e3130002 tst r3, #2 if (!PIPE_LOCK(pipe)) /* WARN pipe not released! */ /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); mode = LIBIO_ACCMODE(iop); a000aa70: e2036006 and r6, r3, #6 if (mode & LIBIO_FLAGS_READ) pipe->Readers --; a000aa74: 15943010 ldrne r3, [r4, #16] a000aa78: 12433001 subne r3, r3, #1 a000aa7c: 15843010 strne r3, [r4, #16] if (mode & LIBIO_FLAGS_WRITE) a000aa80: e3160004 tst r6, #4 pipe->Writers --; a000aa84: 15943014 ldrne r3, [r4, #20] a000aa88: 12433001 subne r3, r3, #1 a000aa8c: 15843014 strne r3, [r4, #20] PIPE_UNLOCK(pipe); a000aa90: ebffeec5 bl a00065ac if (pipe->Readers == 0 && pipe->Writers == 0) { a000aa94: e5943010 ldr r3, [r4, #16] a000aa98: e3530000 cmp r3, #0 a000aa9c: 1a000006 bne a000aabc a000aaa0: e5947014 ldr r7, [r4, #20] a000aaa4: e3570000 cmp r7, #0 a000aaa8: 1a000003 bne a000aabc #if 0 /* To delete an anonymous pipe file when all users closed it */ if (pipe->Anonymous) delfile = TRUE; #endif pipe_free(pipe); a000aaac: e1a00004 mov r0, r4 a000aab0: ebffffc6 bl a000a9d0 *pipep = NULL; a000aab4: e5857000 str r7, [r5] a000aab8: ea000010 b a000ab00 } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) a000aabc: e2562004 subs r2, r6, #4 a000aac0: 13a02001 movne r2, #1 a000aac4: e3530000 cmp r3, #0 a000aac8: 13a02000 movne r2, #0 a000aacc: e3520000 cmp r2, #0 /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); a000aad0: 15940030 ldrne r0, [r4, #48] ; 0x30 delfile = TRUE; #endif pipe_free(pipe); *pipep = NULL; } else if (pipe->Readers == 0 && mode != LIBIO_FLAGS_WRITE) a000aad4: 1a000007 bne a000aaf8 /* Notify waiting Writers that all their partners left */ PIPE_WAKEUPWRITERS(pipe); else if (pipe->Writers == 0 && mode != LIBIO_FLAGS_READ) a000aad8: e5943014 ldr r3, [r4, #20] a000aadc: e2566002 subs r6, r6, #2 a000aae0: 13a06001 movne r6, #1 a000aae4: e3530000 cmp r3, #0 a000aae8: 13a06000 movne r6, #0 a000aaec: e3560000 cmp r6, #0 a000aaf0: 0a000002 beq a000ab00 PIPE_WAKEUPREADERS(pipe); a000aaf4: e594002c ldr r0, [r4, #44] ; 0x2c a000aaf8: e1a0100d mov r1, sp a000aafc: eb0004d0 bl a000be44 pipe_unlock(); a000ab00: ebffffbf bl a000aa04 if(iop->pathinfo.ops->unlink_h(&iop->pathinfo)) return -errno; #endif return 0; } a000ab04: e3a00000 mov r0, #0 a000ab08: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== a000aa04 : static void pipe_unlock(void) { rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); a000aa04: e59f3018 ldr r3, [pc, #24] ; a000aa24 return -ENOMEM; } } static void pipe_unlock(void) { a000aa08: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc = RTEMS_SUCCESSFUL; sc = rtems_semaphore_release(pipe_semaphore); a000aa0c: e5930000 ldr r0, [r3] a000aa10: ebffeee5 bl a00065ac if (sc != RTEMS_SUCCESSFUL) { a000aa14: e3500000 cmp r0, #0 a000aa18: 049df004 popeq {pc} ; (ldreq pc, [sp], #4) /* FIXME */ rtems_fatal_error_occurred(0xdeadbeef); a000aa1c: e59f0004 ldr r0, [pc, #4] ; a000aa28 <== NOT EXECUTED a000aa20: ebfff019 bl a0006a8c <== NOT EXECUTED =============================================================================== a000afb8 : pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { a000afb8: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) a000afbc: e2527000 subs r7, r2, #0 pipe_control_t *pipe, const void *buffer, size_t count, rtems_libio_t *iop ) { a000afc0: e1a04000 mov r4, r0 a000afc4: e1a0b001 mov fp, r1 a000afc8: e1a08003 mov r8, r3 int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) return 0; a000afcc: 01a05007 moveq r5, r7 ) { int chunk, chunk1, written = 0, ret = 0; /* Write nothing */ if (count == 0) a000afd0: 0a00005e beq a000b150 return 0; if (! PIPE_LOCK(pipe)) a000afd4: e3a01000 mov r1, #0 a000afd8: e5900028 ldr r0, [r0, #40] ; 0x28 a000afdc: e1a02001 mov r2, r1 a000afe0: ebffed2b bl a0006494 a000afe4: e3500000 cmp r0, #0 return -EINTR; a000afe8: 13e05003 mvnne r5, #3 /* Write nothing */ if (count == 0) return 0; if (! PIPE_LOCK(pipe)) a000afec: 1a000057 bne a000b150 return -EINTR; if (pipe->Readers == 0) { a000aff0: e5945010 ldr r5, [r4, #16] a000aff4: e3550000 cmp r5, #0 a000aff8: 0a00004d beq a000b134 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; a000affc: e5949004 ldr r9, [r4, #4] /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; a000b000: e1a05000 mov r5, r0 ret = -EPIPE; goto out_locked; } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; a000b004: e1570009 cmp r7, r9 a000b008: 91a09007 movls r9, r7 a000b00c: 83a09001 movhi r9, #1 a000b010: ea000041 b a000b11c while (written < count) { while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { a000b014: e598a014 ldr sl, [r8, #20] a000b018: e21aa001 ands sl, sl, #1 a000b01c: 1a000042 bne a000b12c ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; a000b020: e594301c ldr r3, [r4, #28] PIPE_UNLOCK(pipe); a000b024: e5940028 ldr r0, [r4, #40] ; 0x28 ret = -EAGAIN; goto out_locked; } /* Wait until there is chunk bytes space or no reader exists */ pipe->waitingWriters ++; a000b028: e2833001 add r3, r3, #1 a000b02c: e584301c str r3, [r4, #28] PIPE_UNLOCK(pipe); a000b030: ebffed5d bl a00065ac if (! PIPE_WRITEWAIT(pipe)) a000b034: e1a0100a mov r1, sl a000b038: e5940030 ldr r0, [r4, #48] ; 0x30 a000b03c: eb000396 bl a000be9c a000b040: e3500000 cmp r0, #0 a000b044: 01a06000 moveq r6, r0 a000b048: 13e06003 mvnne r6, #3 ret = -EINTR; if (! PIPE_LOCK(pipe)) { a000b04c: e1a0100a mov r1, sl a000b050: e5940028 ldr r0, [r4, #40] ; 0x28 a000b054: e1a0200a mov r2, sl a000b058: ebffed0d bl a0006494 a000b05c: e3500000 cmp r0, #0 a000b060: 1a000037 bne a000b144 /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a000b064: e594301c ldr r3, [r4, #28] if (ret != 0) a000b068: e3560000 cmp r6, #0 if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; goto out_nolock; } pipe->waitingWriters --; a000b06c: e2433001 sub r3, r3, #1 a000b070: e584301c str r3, [r4, #28] if (ret != 0) a000b074: 1a00002f bne a000b138 goto out_locked; if (pipe->Readers == 0) { a000b078: e5943010 ldr r3, [r4, #16] a000b07c: e3530000 cmp r3, #0 a000b080: 0a00002b beq a000b134 /* 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) { a000b084: e594a004 ldr sl, [r4, #4] a000b088: e594300c ldr r3, [r4, #12] a000b08c: e063200a rsb r2, r3, sl a000b090: e1520009 cmp r2, r9 a000b094: 3affffde bcc a000b014 goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); a000b098: e5940008 ldr r0, [r4, #8] a000b09c: e1a0100a mov r1, sl ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a000b0a0: e0656007 rsb r6, r5, r7 chunk1 = pipe->Size - PIPE_WSTART(pipe); a000b0a4: e0830000 add r0, r3, r0 ret = -EPIPE; goto out_locked; } } chunk = MIN(count - written, PIPE_SPACE(pipe)); a000b0a8: e1520006 cmp r2, r6 a000b0ac: 31a06002 movcc r6, r2 chunk1 = pipe->Size - PIPE_WSTART(pipe); a000b0b0: eb002e5e bl a0016a30 <__umodsi3> a000b0b4: e5943000 ldr r3, [r4] a000b0b8: e060a00a rsb sl, r0, sl if (chunk > chunk1) { a000b0bc: e156000a cmp r6, sl a000b0c0: 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); a000b0c4: d0830000 addle r0, r3, r0 a000b0c8: d1a02006 movle r2, r6 } } chunk = MIN(count - written, PIPE_SPACE(pipe)); chunk1 = pipe->Size - PIPE_WSTART(pipe); if (chunk > chunk1) { a000b0cc: da000006 ble a000b0ec memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk1); a000b0d0: e1a0200a mov r2, sl a000b0d4: e0830000 add r0, r3, r0 a000b0d8: eb000aa2 bl a000db68 memcpy(pipe->Buffer, buffer + written + chunk1, chunk - chunk1); a000b0dc: e5940000 ldr r0, [r4] a000b0e0: e08a1005 add r1, sl, r5 a000b0e4: e08b1001 add r1, fp, r1 a000b0e8: e06a2006 rsb r2, sl, r6 } else memcpy(pipe->Buffer + PIPE_WSTART(pipe), buffer + written, chunk); a000b0ec: eb000a9d bl a000db68 pipe->Length += chunk; a000b0f0: e594300c ldr r3, [r4, #12] a000b0f4: e0833006 add r3, r3, r6 a000b0f8: e584300c str r3, [r4, #12] if (pipe->waitingReaders > 0) a000b0fc: e5943018 ldr r3, [r4, #24] a000b100: e3530000 cmp r3, #0 a000b104: 0a000002 beq a000b114 PIPE_WAKEUPREADERS(pipe); a000b108: e594002c ldr r0, [r4, #44] ; 0x2c a000b10c: e1a0100d mov r1, sp a000b110: eb00034b bl a000be44 written += chunk; a000b114: e0855006 add r5, r5, r6 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; a000b118: e3a09001 mov r9, #1 } /* Write of PIPE_BUF bytes or less shall not be interleaved */ chunk = count <= pipe->Size ? count : 1; while (written < count) { a000b11c: e1550007 cmp r5, r7 a000b120: 3affffd7 bcc a000b084 a000b124: e3a06000 mov r6, #0 a000b128: ea000002 b a000b138 while (PIPE_SPACE(pipe) < chunk) { if (LIBIO_NODELAY(iop)) { ret = -EAGAIN; a000b12c: e3e0600a mvn r6, #10 a000b130: ea000000 b a000b138 pipe->waitingWriters --; if (ret != 0) goto out_locked; if (pipe->Readers == 0) { ret = -EPIPE; a000b134: e3e0601f mvn r6, #31 /* Write of more than PIPE_BUF bytes can be interleaved */ chunk = 1; } out_locked: PIPE_UNLOCK(pipe); a000b138: e5940028 ldr r0, [r4, #40] ; 0x28 a000b13c: ebffed1a bl a00065ac a000b140: ea000000 b a000b148 PIPE_UNLOCK(pipe); if (! PIPE_WRITEWAIT(pipe)) ret = -EINTR; if (! PIPE_LOCK(pipe)) { /* WARN waitingWriters not restored! */ ret = -EINTR; a000b144: e3e06003 mvn r6, #3 <== NOT EXECUTED kill(getpid(), SIGPIPE); #endif if (written > 0) return written; return ret; a000b148: e3550000 cmp r5, #0 a000b14c: d1a05006 movle r5, r6 } a000b150: e1a00005 mov r0, r5 a000b154: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0010dac : ssize_t read( int fd, void *buffer, size_t count ) { a0010dac: e92d4030 push {r4, r5, lr} ssize_t rc; rtems_libio_t *iop; rtems_libio_check_fd( fd ); a0010db0: e59f4098 ldr r4, [pc, #152] ; a0010e50 a0010db4: e5944000 ldr r4, [r4] a0010db8: e1500004 cmp r0, r4 a0010dbc: 2a000006 bcs a0010ddc iop = rtems_libio_iop( fd ); a0010dc0: e59f408c ldr r4, [pc, #140] ; a0010e54 a0010dc4: e3a05038 mov r5, #56 ; 0x38 a0010dc8: e5944000 ldr r4, [r4] a0010dcc: e0244095 mla r4, r5, r0, r4 rtems_libio_check_is_open( iop ); a0010dd0: e5940014 ldr r0, [r4, #20] a0010dd4: e3100c01 tst r0, #256 ; 0x100 a0010dd8: 1a000002 bne a0010de8 a0010ddc: ebffebc4 bl a000bcf4 <__errno> a0010de0: e3a03009 mov r3, #9 a0010de4: ea000007 b a0010e08 rtems_libio_check_buffer( buffer ); a0010de8: e3510000 cmp r1, #0 a0010dec: 0a000003 beq a0010e00 rtems_libio_check_count( count ); a0010df0: e3520000 cmp r2, #0 a0010df4: 0a000013 beq a0010e48 rtems_libio_check_permissions( iop, LIBIO_FLAGS_READ ); a0010df8: e3100002 tst r0, #2 a0010dfc: 1a000004 bne a0010e14 a0010e00: ebffebbb bl a000bcf4 <__errno> <== NOT EXECUTED a0010e04: e3a03016 mov r3, #22 <== NOT EXECUTED a0010e08: e5803000 str r3, [r0] a0010e0c: e3e00000 mvn r0, #0 a0010e10: e8bd8030 pop {r4, r5, pc} return 0; /* * Now process the read(). */ rc = (*iop->pathinfo.handlers->read_h)( iop, buffer, count ); a0010e14: e5943020 ldr r3, [r4, #32] a0010e18: e1a00004 mov r0, r4 a0010e1c: e5933008 ldr r3, [r3, #8] a0010e20: e12fff33 blx r3 if ( rc > 0 ) a0010e24: e3500000 cmp r0, #0 a0010e28: da000007 ble a0010e4c iop->offset += rc; a0010e2c: e284300c add r3, r4, #12 a0010e30: e893000c ldm r3, {r2, r3} a0010e34: e0922000 adds r2, r2, r0 a0010e38: e0a33fc0 adc r3, r3, r0, asr #31 a0010e3c: e584200c str r2, [r4, #12] a0010e40: e5843010 str r3, [r4, #16] a0010e44: 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 ); a0010e48: e1a00002 mov r0, r2 <== NOT EXECUTED if ( rc > 0 ) iop->offset += rc; return rc; } a0010e4c: e8bd8030 pop {r4, r5, pc} =============================================================================== a000506c : ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { a000506c: e92d40f0 push {r4, r5, r6, r7, lr} rtems_filesystem_location_info_t loc; int result; if (!buf) a0005070: e2516000 subs r6, r1, #0 ssize_t readlink( const char *pathname, char *buf, size_t bufsize ) { a0005074: e24dd018 sub sp, sp, #24 a0005078: e1a07000 mov r7, r0 a000507c: e1a05002 mov r5, r2 rtems_filesystem_location_info_t loc; int result; if (!buf) a0005080: 1a000002 bne a0005090 rtems_set_errno_and_return_minus_one( EFAULT ); a0005084: eb0026e2 bl a000ec14 <__errno> <== NOT EXECUTED a0005088: e3a0300e mov r3, #14 <== NOT EXECUTED a000508c: ea000013 b a00050e0 <== NOT EXECUTED result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), a0005090: eb002e64 bl a0010a28 a0005094: e28d4004 add r4, sp, #4 a0005098: e1a01000 mov r1, r0 a000509c: e3a02000 mov r2, #0 a00050a0: e1a00007 mov r0, r7 a00050a4: e1a03004 mov r3, r4 a00050a8: e58d2000 str r2, [sp] a00050ac: ebfffba2 bl a0003f3c 0, &loc, false ); if ( result != 0 ) a00050b0: e3500000 cmp r0, #0 a00050b4: 1a000015 bne a0005110 return -1; if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_SYM_LINK ){ a00050b8: e59d3010 ldr r3, [sp, #16] a00050bc: e1a00004 mov r0, r4 a00050c0: e5933010 ldr r3, [r3, #16] a00050c4: e12fff33 blx r3 a00050c8: e3500004 cmp r0, #4 a00050cc: 0a000005 beq a00050e8 rtems_filesystem_freenode( &loc ); a00050d0: e1a00004 mov r0, r4 a00050d4: ebfffbd3 bl a0004028 rtems_set_errno_and_return_minus_one( EINVAL ); a00050d8: eb0026cd bl a000ec14 <__errno> a00050dc: e3a03016 mov r3, #22 a00050e0: e5803000 str r3, [r0] a00050e4: ea000009 b a0005110 } result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); a00050e8: e59d3010 ldr r3, [sp, #16] a00050ec: e1a02005 mov r2, r5 a00050f0: e1a00004 mov r0, r4 a00050f4: e593303c ldr r3, [r3, #60] ; 0x3c a00050f8: e1a01006 mov r1, r6 a00050fc: e12fff33 blx r3 a0005100: e1a05000 mov r5, r0 rtems_filesystem_freenode( &loc ); a0005104: e1a00004 mov r0, r4 a0005108: ebfffbc6 bl a0004028 return result; a000510c: ea000000 b a0005114 rtems_set_errno_and_return_minus_one( EFAULT ); result = rtems_filesystem_evaluate_path( pathname, strlen( pathname ), 0, &loc, false ); if ( result != 0 ) return -1; a0005110: e3e05000 mvn r5, #0 result = (*loc.ops->readlink_h)( &loc, buf, bufsize ); rtems_filesystem_freenode( &loc ); return result; } a0005114: e1a00005 mov r0, r5 a0005118: e28dd018 add sp, sp, #24 a000511c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a0010eb0 : ) { uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0010eb0: e59f310c ldr r3, [pc, #268] ; a0010fc4 void *realloc( void *ptr, size_t size ) { a0010eb4: e92d40f1 push {r0, r4, r5, r6, r7, lr} uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0010eb8: e5932010 ldr r2, [r3, #16] void *realloc( void *ptr, size_t size ) { a0010ebc: e1a04000 mov r4, r0 a0010ec0: e1a05001 mov r5, r1 uintptr_t old_size; char *new_area; MSBUMP(realloc_calls, 1); a0010ec4: e2822001 add r2, r2, #1 a0010ec8: 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())) { a0010ecc: e59f30f4 ldr r3, [pc, #244] ; a0010fc8 a0010ed0: e5933000 ldr r3, [r3] a0010ed4: e3530003 cmp r3, #3 a0010ed8: 1a000009 bne a0010f04 if (_Thread_Dispatch_disable_level > 0) a0010edc: e59f30e8 ldr r3, [pc, #232] ; a0010fcc a0010ee0: e5933000 ldr r3, [r3] a0010ee4: e3530000 cmp r3, #0 return (void *) 0; a0010ee8: 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) a0010eec: 1a000032 bne a0010fbc return (void *) 0; if (_ISR_Nest_level > 0) a0010ef0: e59f20d8 ldr r2, [pc, #216] ; a0010fd0 a0010ef4: e5922000 ldr r2, [r2] a0010ef8: e3520000 cmp r2, #0 return (void *) 0; a0010efc: 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) a0010f00: 1a00002d bne a0010fbc } /* * Continue with realloc(). */ if ( !ptr ) a0010f04: e3540000 cmp r4, #0 a0010f08: 1a000003 bne a0010f1c return malloc( size ); a0010f0c: e1a00005 mov r0, r5 a0010f10: ebffc445 bl a000202c a0010f14: e1a04000 mov r4, r0 a0010f18: ea000027 b a0010fbc if ( !size ) { a0010f1c: e3550000 cmp r5, #0 a0010f20: 1a000003 bne a0010f34 free( ptr ); a0010f24: e1a00004 mov r0, r4 <== NOT EXECUTED a0010f28: ebffc361 bl a0001cb4 <== NOT EXECUTED return (void *) 0; a0010f2c: e1a04005 mov r4, r5 <== NOT EXECUTED a0010f30: ea000021 b a0010fbc <== NOT EXECUTED } if ( !_Protected_heap_Get_block_size(RTEMS_Malloc_Heap, ptr, &old_size) ) { a0010f34: e59f6098 ldr r6, [pc, #152] ; a0010fd4 a0010f38: e1a01004 mov r1, r4 a0010f3c: e1a0200d mov r2, sp a0010f40: e5960000 ldr r0, [r6] a0010f44: eb00004e bl a0011084 <_Protected_heap_Get_block_size> a0010f48: e2507000 subs r7, r0, #0 a0010f4c: 1a000004 bne a0010f64 errno = EINVAL; a0010f50: ebffeb67 bl a000bcf4 <__errno> a0010f54: e3a03016 mov r3, #22 a0010f58: e5803000 str r3, [r0] return (void *) 0; a0010f5c: e1a04007 mov r4, r7 a0010f60: ea000015 b a0010fbc } /* * Now resize it. */ if ( _Protected_heap_Resize_block( RTEMS_Malloc_Heap, ptr, size ) ) { a0010f64: e5960000 ldr r0, [r6] a0010f68: e1a01004 mov r1, r4 a0010f6c: e1a02005 mov r2, r5 a0010f70: eb000054 bl a00110c8 <_Protected_heap_Resize_block> a0010f74: e3500000 cmp r0, #0 a0010f78: 1a00000f bne a0010fbc * 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 ); a0010f7c: e1a00005 mov r0, r5 a0010f80: ebffc429 bl a000202c MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ a0010f84: e59f3038 ldr r3, [pc, #56] ; a0010fc4 if ( !new_area ) { a0010f88: e2506000 subs r6, r0, #0 * and the C Standard. */ new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ a0010f8c: e5932004 ldr r2, [r3, #4] a0010f90: e2422001 sub r2, r2, #1 a0010f94: e5832004 str r2, [r3, #4] if ( !new_area ) { a0010f98: 0a000006 beq a0010fb8 return (void *) 0; } memcpy( new_area, ptr, (size < old_size) ? size : old_size ); a0010f9c: e59d2000 ldr r2, [sp] a0010fa0: e1a01004 mov r1, r4 a0010fa4: e1550002 cmp r5, r2 a0010fa8: 31a02005 movcc r2, r5 a0010fac: ebffed7e bl a000c5ac free( ptr ); a0010fb0: e1a00004 mov r0, r4 a0010fb4: ebffc33e bl a0001cb4 new_area = malloc( size ); MSBUMP(malloc_calls, (uint32_t) -1); /* subtract off the malloc */ if ( !new_area ) { return (void *) 0; a0010fb8: e1a04006 mov r4, r6 memcpy( new_area, ptr, (size < old_size) ? size : old_size ); free( ptr ); return new_area; } a0010fbc: e1a00004 mov r0, r4 a0010fc0: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== a0003ca8 : #include int rmdir( const char *pathname ) { a0003ca8: e92d40f0 push {r4, r5, r6, r7, lr} a0003cac: e24dd030 sub sp, sp, #48 ; 0x30 a0003cb0: e1a06000 mov r6, r0 /* * Get the parent node of the node we wish to remove. Find the parent path. */ parentpathlen = rtems_filesystem_dirname ( pathname ); a0003cb4: ebfffb42 bl a00029c4 if ( parentpathlen == 0 ) a0003cb8: e2504000 subs r4, r0, #0 a0003cbc: e28d3018 add r3, sp, #24 a0003cc0: 1a000005 bne a0003cdc rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); a0003cc4: e1a00006 mov r0, r6 a0003cc8: e28d102c add r1, sp, #44 ; 0x2c a0003ccc: e1a02003 mov r2, r3 a0003cd0: eb000049 bl a0003dfc const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; a0003cd4: e1a05004 mov r5, r4 a0003cd8: ea000008 b a0003d00 parentpathlen = rtems_filesystem_dirname ( pathname ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( pathname, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path(pathname, parentpathlen, a0003cdc: e3a02000 mov r2, #0 a0003ce0: e58d2000 str r2, [sp] a0003ce4: e1a00006 mov r0, r6 a0003ce8: e1a01004 mov r1, r4 a0003cec: e2822002 add r2, r2, #2 a0003cf0: ebfffb15 bl a000294c RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) a0003cf4: e3500000 cmp r0, #0 a0003cf8: 1a00003b bne a0003dec return -1; free_parentloc = true; a0003cfc: e3a05001 mov r5, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; a0003d00: e28dc004 add ip, sp, #4 a0003d04: e28de018 add lr, sp, #24 a0003d08: e8be000f ldm lr!, {r0, r1, r2, r3} a0003d0c: e8ac000f stmia ip!, {r0, r1, r2, r3} a0003d10: e59e3000 ldr r3, [lr] name = pathname + parentpathlen; a0003d14: e0864004 add r4, r6, r4 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a0003d18: e1a00004 mov r0, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; a0003d1c: e58c3000 str r3, [ip] name = pathname + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a0003d20: eb0027fb bl a000dd14 a0003d24: e1a01000 mov r1, r0 a0003d28: e1a00004 mov r0, r4 a0003d2c: ebfffb32 bl a00029fc a0003d30: e0846000 add r6, r4, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), a0003d34: e1a00006 mov r0, r6 a0003d38: eb0027f5 bl a000dd14 a0003d3c: e28d4004 add r4, sp, #4 a0003d40: e1a01000 mov r1, r0 a0003d44: e3a02000 mov r2, #0 a0003d48: e1a00006 mov r0, r6 a0003d4c: e1a03004 mov r3, r4 a0003d50: e58d2000 str r2, [sp] a0003d54: ebfffad4 bl a00028ac 0, &loc, false ); if ( result != 0 ) { a0003d58: e3500000 cmp r0, #0 a0003d5c: 0a000004 beq a0003d74 if ( free_parentloc ) a0003d60: e3550000 cmp r5, #0 a0003d64: 0a000020 beq a0003dec rtems_filesystem_freenode( &parentloc ); a0003d68: e28d0018 add r0, sp, #24 <== NOT EXECUTED a0003d6c: ebfffbbe bl a0002c6c <== NOT EXECUTED a0003d70: ea00001d b a0003dec <== NOT EXECUTED } /* * Verify you can remove this node as a directory. */ if ( (*loc.ops->node_type_h)( &loc ) != RTEMS_FILESYSTEM_DIRECTORY ){ a0003d74: e59d3010 ldr r3, [sp, #16] a0003d78: e1a00004 mov r0, r4 a0003d7c: e5933010 ldr r3, [r3, #16] a0003d80: e12fff33 blx r3 a0003d84: e3500001 cmp r0, #1 a0003d88: 0a000009 beq a0003db4 rtems_filesystem_freenode( &loc ); a0003d8c: e1a00004 mov r0, r4 a0003d90: ebfffbb5 bl a0002c6c if ( free_parentloc ) a0003d94: e3550000 cmp r5, #0 a0003d98: 0a000001 beq a0003da4 rtems_filesystem_freenode( &parentloc ); a0003d9c: e28d0018 add r0, sp, #24 a0003da0: ebfffbb1 bl a0002c6c rtems_set_errno_and_return_minus_one( ENOTDIR ); a0003da4: eb002415 bl a000ce00 <__errno> a0003da8: e3a03014 mov r3, #20 a0003dac: e5803000 str r3, [r0] a0003db0: ea00000d b a0003dec /* * Use the filesystems rmnod to remove the node. */ result = (*loc.handlers->rmnod_h)( &parentloc, &loc ); a0003db4: e59d300c ldr r3, [sp, #12] a0003db8: e28d6018 add r6, sp, #24 a0003dbc: e1a01004 mov r1, r4 a0003dc0: e5933034 ldr r3, [r3, #52] ; 0x34 a0003dc4: e1a00006 mov r0, r6 a0003dc8: e12fff33 blx r3 a0003dcc: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); a0003dd0: e1a00004 mov r0, r4 a0003dd4: ebfffba4 bl a0002c6c if ( free_parentloc ) a0003dd8: e3550000 cmp r5, #0 a0003ddc: 0a000003 beq a0003df0 rtems_filesystem_freenode( &parentloc ); a0003de0: e1a00006 mov r0, r6 a0003de4: ebfffba0 bl a0002c6c a0003de8: ea000000 b a0003df0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; a0003dec: e3e07000 mvn r7, #0 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } a0003df0: e1a00007 mov r0, r7 a0003df4: e28dd030 add sp, sp, #48 ; 0x30 a0003df8: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a000226c : void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { a000226c: 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 ) a0002270: e251a000 subs sl, r1, #0 void rtems_cpu_usage_report_with_plugin( void *context, rtems_printk_plugin_t print ) { a0002274: e24dd040 sub sp, sp, #64 ; 0x40 a0002278: e1a08000 mov r8, r0 Timestamp_Control uptime, total, ran; #else uint32_t total_units = 0; #endif if ( !print ) a000227c: 0a000053 beq a00023d0 * 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 ); a0002280: e28d5030 add r5, sp, #48 ; 0x30 a0002284: e1a00005 mov r0, r5 _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); a0002288: 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 ); a000228c: eb0014a2 bl a000751c <_TOD_Get_uptime> _Timestamp_Subtract( &CPU_usage_Uptime_at_last_reset, &uptime, &total ); a0002290: e1a01005 mov r1, r5 a0002294: e59f013c ldr r0, [pc, #316] ; a00023d8 a0002298: e1a02004 mov r2, r4 a000229c: eb001d66 bl a000983c <_Timespec_Subtract> } } } #endif (*print)( a00022a0: e1a00008 mov r0, r8 a00022a4: e59f1130 ldr r1, [pc, #304] ; a00023dc a00022a8: e12fff3a blx sl a00022ac: e59f512c ldr r5, [pc, #300] ; a00023e0 the_thread = (Thread_Control *)information->local_table[ i ]; if ( !the_thread ) continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); a00022b0: e28db008 add fp, sp, #8 ); for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { if ( !_Objects_Information_table[ api_index ] ) a00022b4: e5b53004 ldr r3, [r5, #4]! a00022b8: e3530000 cmp r3, #0 a00022bc: 0a000038 beq a00023a4 continue; information = _Objects_Information_table[ api_index ][ 1 ]; a00022c0: e5936004 ldr r6, [r3, #4] if ( information ) { a00022c4: e3560000 cmp r6, #0 a00022c8: 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( a00022cc: 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 ) { a00022d0: 1a000030 bne a0002398 a00022d4: ea000032 b a00023a4 <== NOT EXECUTED for ( i=1 ; i <= information->maximum ; i++ ) { the_thread = (Thread_Control *)information->local_table[ i ]; a00022d8: e596301c ldr r3, [r6, #28] a00022dc: e7934107 ldr r4, [r3, r7, lsl #2] if ( !the_thread ) a00022e0: e3540000 cmp r4, #0 a00022e4: 0a00002a beq a0002394 continue; rtems_object_get_name( the_thread->Object.id, sizeof(name), name ); a00022e8: e3a0100d mov r1, #13 a00022ec: e1a0200b mov r2, fp a00022f0: e5940008 ldr r0, [r4, #8] a00022f4: eb000ff7 bl a00062d8 (*print)( a00022f8: e5942008 ldr r2, [r4, #8] a00022fc: e1a0300b mov r3, fp a0002300: e1a00008 mov r0, r8 a0002304: e59f10d8 ldr r1, [pc, #216] ; a00023e4 a0002308: e12fff3a blx 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; a000230c: e2843084 add r3, r4, #132 ; 0x84 a0002310: e893000c ldm r3, {r2, r3} a0002314: e58d2020 str r2, [sp, #32] a0002318: e58d3024 str r3, [sp, #36] ; 0x24 if ( _Thread_Executing->Object.id == the_thread->Object.id ) { a000231c: e59f20c4 ldr r2, [pc, #196] ; a00023e8 a0002320: e5923004 ldr r3, [r2, #4] a0002324: e5932008 ldr r2, [r3, #8] a0002328: e5943008 ldr r3, [r4, #8] a000232c: e1520003 cmp r2, r3 a0002330: 1a000006 bne a0002350 Timestamp_Control used; _Timestamp_Subtract( a0002334: e59f00b0 ldr r0, [pc, #176] ; a00023ec a0002338: e28d1030 add r1, sp, #48 ; 0x30 a000233c: e1a02009 mov r2, r9 a0002340: eb001d3d bl a000983c <_Timespec_Subtract> &_Thread_Time_of_last_context_switch, &uptime, &used ); _Timestamp_Add_to( &ran, &used ); a0002344: e28d0020 add r0, sp, #32 a0002348: e1a01009 mov r1, r9 a000234c: eb001cfe bl a000974c <_Timespec_Add_to> }; _Timestamp_Divide( &ran, &total, &ival, &fval ); a0002350: e28d203c add r2, sp, #60 ; 0x3c a0002354: e28d3038 add r3, sp, #56 ; 0x38 a0002358: e28d0020 add r0, sp, #32 a000235c: e28d1028 add r1, sp, #40 ; 0x28 a0002360: eb001d11 bl a00097ac <_Timespec_Divide> /* * Print the information */ (*print)( context, a0002364: e3a01ffa mov r1, #1000 ; 0x3e8 a0002368: e59d0024 ldr r0, [sp, #36] ; 0x24 a000236c: eb0051f7 bl a0016b50 <__aeabi_uidiv> a0002370: e59d203c ldr r2, [sp, #60] ; 0x3c a0002374: e1a03000 mov r3, r0 a0002378: e59f1070 ldr r1, [pc, #112] ; a00023f0 a000237c: e58d2000 str r2, [sp] a0002380: e59d2038 ldr r2, [sp, #56] ; 0x38 a0002384: e1a00008 mov r0, r8 a0002388: e58d2004 str r2, [sp, #4] a000238c: e59d2020 ldr r2, [sp, #32] a0002390: e12fff3a blx 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++ ) { a0002394: e2877001 add r7, r7, #1 a0002398: e1d631b0 ldrh r3, [r6, #16] a000239c: e1570003 cmp r7, r3 a00023a0: 9affffcc bls a00022d8 " ID | NAME | TICKS | PERCENT\n" #endif "------------+----------------------------------------+---------------+---------\n" ); for ( api_index = 1 ; a00023a4: e59f3048 ldr r3, [pc, #72] ; a00023f4 a00023a8: e1550003 cmp r5, r3 a00023ac: 1affffc0 bne a00022b4 } } } #ifndef __RTEMS_USE_TICKS_FOR_STATISTICS__ (*print)( a00023b0: e3a01ffa mov r1, #1000 ; 0x3e8 a00023b4: e59d002c ldr r0, [sp, #44] ; 0x2c a00023b8: eb0051e4 bl a0016b50 <__aeabi_uidiv> a00023bc: e59f1034 ldr r1, [pc, #52] ; a00023f8 a00023c0: e1a03000 mov r3, r0 a00023c4: e59d2028 ldr r2, [sp, #40] ; 0x28 a00023c8: e1a00008 mov r0, r8 a00023cc: e12fff3a blx sl "-------------------------------------------------------------------------------\n", _Watchdog_Ticks_since_boot - CPU_usage_Ticks_at_last_reset, total_units ); #endif } a00023d0: e28dd040 add sp, sp, #64 ; 0x40 a00023d4: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a000bcb0 : [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { a000bcb0: e3500000 cmp r0, #0 [RTEMS_IO_ERROR] = EIO, [RTEMS_PROXY_BLOCKING] = EIO }; int rtems_deviceio_errno(rtems_status_code sc) { a000bcb4: e92d4010 push {r4, lr} if (sc == RTEMS_SUCCESSFUL) { a000bcb8: 0a000006 beq a000bcd8 return 0; } else { int eno = EINVAL; if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { a000bcbc: e350001c cmp r0, #28 <== NOT EXECUTED eno = status_code_to_errno [sc]; a000bcc0: 959f3014 ldrls r3, [pc, #20] ; a000bcdc <== NOT EXECUTED int rtems_deviceio_errno(rtems_status_code sc) { if (sc == RTEMS_SUCCESSFUL) { return 0; } else { int eno = EINVAL; a000bcc4: 83a04016 movhi r4, #22 <== NOT EXECUTED if ((unsigned) sc <= RTEMS_STATUS_CODES_LAST) { eno = status_code_to_errno [sc]; a000bcc8: 97934100 ldrls r4, [r3, r0, lsl #2] <== NOT EXECUTED } errno = eno; a000bccc: eb000008 bl a000bcf4 <__errno> <== NOT EXECUTED a000bcd0: e5804000 str r4, [r0] <== NOT EXECUTED return -1; a000bcd4: e3e00000 mvn r0, #0 <== NOT EXECUTED } } a000bcd8: e8bd8010 pop {r4, pc} =============================================================================== a0001bb4 : size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { a0001bb4: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} a0001bb8: e1a06003 mov r6, r3 /* * Verify Input parameters. */ if ( !pathname ) a0001bbc: e2507000 subs r7, r0, #0 int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { int i = 0; a0001bc0: e3a03000 mov r3, #0 size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { a0001bc4: e1a05001 mov r5, r1 a0001bc8: e1a04002 mov r4, r2 int i = 0; a0001bcc: e58d3004 str r3, [sp, #4] /* * Verify Input parameters. */ if ( !pathname ) a0001bd0: 1a000002 bne a0001be0 rtems_set_errno_and_return_minus_one( EFAULT ); a0001bd4: eb002846 bl a000bcf4 <__errno> <== NOT EXECUTED a0001bd8: e3a0300e mov r3, #14 <== NOT EXECUTED a0001bdc: ea000003 b a0001bf0 <== NOT EXECUTED if ( !pathloc ) a0001be0: e3560000 cmp r6, #0 a0001be4: 1a000004 bne a0001bfc rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ a0001be8: eb002841 bl a000bcf4 <__errno> <== NOT EXECUTED a0001bec: e3a03005 mov r3, #5 <== NOT EXECUTED a0001bf0: e5803000 str r3, [r0] <== NOT EXECUTED a0001bf4: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001bf8: ea00000a b a0001c28 <== NOT EXECUTED /* * Evaluate the path using the optable evalpath. */ rtems_filesystem_get_start_loc( pathname, &i, pathloc ); a0001bfc: e28d1004 add r1, sp, #4 a0001c00: e1a02006 mov r2, r6 a0001c04: eb00039c bl a0002a7c /* * We evaluation the path relative to the start location we get got. */ return rtems_filesystem_evaluate_relative_path( &pathname[i], a0001c08: e59d1004 ldr r1, [sp, #4] a0001c0c: e59d301c ldr r3, [sp, #28] a0001c10: e1a02004 mov r2, r4 a0001c14: e0870001 add r0, r7, r1 a0001c18: e58d3000 str r3, [sp] a0001c1c: e0611005 rsb r1, r1, r5 a0001c20: e1a03006 mov r3, r6 a0001c24: ebffffba bl a0001b14 pathnamelen - i, flags, pathloc, follow_link ); } a0001c28: e8bd80fc pop {r2, r3, r4, r5, r6, r7, pc} =============================================================================== a0001b14 : /* * Verify Input parameters. */ if ( !pathname ) a0001b14: e3500000 cmp r0, #0 size_t pathnamelen, int flags, rtems_filesystem_location_info_t *pathloc, int follow_link ) { a0001b18: e92d4030 push {r4, r5, lr} a0001b1c: e1a05002 mov r5, r2 a0001b20: e1a04003 mov r4, r3 /* * Verify Input parameters. */ if ( !pathname ) a0001b24: 1a000002 bne a0001b34 rtems_set_errno_and_return_minus_one( EFAULT ); a0001b28: eb002871 bl a000bcf4 <__errno> <== NOT EXECUTED a0001b2c: e3a0300e mov r3, #14 <== NOT EXECUTED a0001b30: ea000003 b a0001b44 <== NOT EXECUTED if ( !pathloc ) a0001b34: e3530000 cmp r3, #0 a0001b38: 1a000004 bne a0001b50 rtems_set_errno_and_return_minus_one( EIO ); /* should never happen */ a0001b3c: eb00286c bl a000bcf4 <__errno> <== NOT EXECUTED a0001b40: e3a03005 mov r3, #5 <== NOT EXECUTED a0001b44: e5803000 str r3, [r0] <== NOT EXECUTED a0001b48: e3e00000 mvn r0, #0 <== NOT EXECUTED a0001b4c: e8bd8030 pop {r4, r5, pc} <== NOT EXECUTED result = (*pathloc->ops->evalpath_h)( pathname, pathnamelen, flags, pathloc ); a0001b50: e593c00c ldr ip, [r3, #12] a0001b54: e59cc000 ldr ip, [ip] a0001b58: e12fff3c blx ip /* * Get the Node type and determine if you need to follow the link or * not. */ if ( (result == 0) && follow_link ) { a0001b5c: e59d200c ldr r2, [sp, #12] a0001b60: e2703001 rsbs r3, r0, #1 a0001b64: 33a03000 movcc r3, #0 a0001b68: e3520000 cmp r2, #0 a0001b6c: 03a03000 moveq r3, #0 a0001b70: e3530000 cmp r3, #0 a0001b74: 0a00000d beq a0001bb0 type = (*pathloc->ops->node_type_h)( pathloc ); a0001b78: e594300c ldr r3, [r4, #12] a0001b7c: e1a00004 mov r0, r4 a0001b80: e5933010 ldr r3, [r3, #16] a0001b84: e12fff33 blx r3 if ( ( type == RTEMS_FILESYSTEM_HARD_LINK ) || a0001b88: e2400003 sub r0, r0, #3 a0001b8c: e3500001 cmp r0, #1 a0001b90: 83a00000 movhi r0, #0 a0001b94: 8a000005 bhi a0001bb0 * 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 ); a0001b98: e594300c ldr r3, [r4, #12] a0001b9c: e1a00004 mov r0, r4 a0001ba0: e1a01005 mov r1, r5 a0001ba4: e5933034 ldr r3, [r3, #52] ; 0x34 a0001ba8: e12fff33 blx r3 a0001bac: e8bd8030 pop {r4, r5, pc} } } return result; } a0001bb0: e8bd8030 pop {r4, r5, pc} =============================================================================== a00019b4 : * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { a00019b4: e92d40f0 push {r4, r5, r6, r7, lr} /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; a00019b8: e59f60e0 ldr r6, [pc, #224] ; a0001aa0 a00019bc: e3a02012 mov r2, #18 * configuration is a single instantiation of the IMFS or miniIMFS with * a single "/dev" directory in it. */ void rtems_filesystem_initialize( void ) { a00019c0: e24dd018 sub sp, sp, #24 /* * Set the default umask to "022". */ rtems_filesystem_umask = 022; a00019c4: e5963000 ldr r3, [r6] a00019c8: e583202c str r2, [r3, #44] ; 0x2c /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a00019cc: e59f30d0 ldr r3, [pc, #208] ; a0001aa4 a00019d0: e5933000 ldr r3, [r3] a00019d4: e3530000 cmp r3, #0 rtems_fatal_error_occurred( 0xABCD0001 ); a00019d8: 059f00c8 ldreq r0, [pc, #200] ; a0001aa8 /* * mount the first filesystem. */ if ( rtems_filesystem_mount_table_size == 0 ) a00019dc: 0a00000a beq a0001a0c rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; a00019e0: e59f30c4 ldr r3, [pc, #196] ; a0001aac status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); a00019e4: e3a05000 mov r5, #0 */ if ( rtems_filesystem_mount_table_size == 0 ) rtems_fatal_error_occurred( 0xABCD0001 ); mt = &rtems_filesystem_mount_table[0]; a00019e8: e5933000 ldr r3, [r3] status = mount( mt->device, mt->mount_point, mt->type, mt->fsoptions, NULL ); a00019ec: e58d5000 str r5, [sp] a00019f0: e5930008 ldr r0, [r3, #8] a00019f4: e593100c ldr r1, [r3, #12] a00019f8: e893000c ldm r3, {r2, r3} a00019fc: eb000218 bl a0002264 if ( status == -1 ) a0001a00: e3700001 cmn r0, #1 a0001a04: 1a000001 bne a0001a10 rtems_fatal_error_occurred( 0xABCD0002 ); a0001a08: e59f00a0 ldr r0, [pc, #160] ; a0001ab0 <== NOT EXECUTED a0001a0c: eb000ebf bl a0005510 <== NOT EXECUTED rtems_filesystem_link_counts = 0; a0001a10: e5963000 ldr r3, [r6] * gonna hit performance. * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001a14: e28d4004 add r4, sp, #4 a0001a18: e3a01001 mov r1, #1 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; a0001a1c: 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); a0001a20: e1a02005 mov r2, r5 a0001a24: e1a03004 mov r3, r4 a0001a28: e59f0084 ldr r0, [pc, #132] ; a0001ab4 a0001a2c: e58d5000 str r5, [sp] a0001a30: eb00005f bl a0001bb4 rtems_filesystem_root = loc; a0001a34: e596c000 ldr ip, [r6] a0001a38: e1a07004 mov r7, r4 a0001a3c: e8b7000f ldm r7!, {r0, r1, r2, r3} a0001a40: e28cc018 add ip, ip, #24 a0001a44: e8ac000f stmia ip!, {r0, r1, r2, r3} a0001a48: e5973000 ldr r3, [r7] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001a4c: e3a01001 mov r1, #1 a0001a50: e1a02005 mov r2, r5 * * Till Straumann, 10/25/2002 */ /* Clone the root pathloc */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); rtems_filesystem_root = loc; a0001a54: e58c3000 str r3, [ip] /* One more clone for the current node */ rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0001a58: e59f0054 ldr r0, [pc, #84] ; a0001ab4 a0001a5c: e1a03004 mov r3, r4 a0001a60: e58d5000 str r5, [sp] a0001a64: eb000052 bl a0001bb4 rtems_filesystem_current = loc; a0001a68: e8b4000f ldm r4!, {r0, r1, r2, r3} a0001a6c: e596c000 ldr ip, [r6] a0001a70: e28cc004 add ip, ip, #4 a0001a74: e8ac000f stmia ip!, {r0, r1, r2, r3} a0001a78: 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); a0001a7c: e59f0034 ldr r0, [pc, #52] ; a0001ab8 a0001a80: e59f1034 ldr r1, [pc, #52] ; a0001abc /* 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; a0001a84: 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); a0001a88: eb0001a4 bl a0002120 if ( status != 0 ) a0001a8c: e3500000 cmp r0, #0 rtems_fatal_error_occurred( 0xABCD0003 ); a0001a90: 159f0028 ldrne r0, [pc, #40] ; a0001ac0 * 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 ) a0001a94: 1affffdc bne a0001a0c * 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. */ } a0001a98: e28dd018 add sp, sp, #24 a0001a9c: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a00096e8 : bool rtems_filesystem_iterate( rtems_per_filesystem_routine routine, void *routine_arg ) { a00096e8: e92d41f0 push {r4, r5, r6, r7, r8, lr} a00096ec: e1a06000 mov r6, r0 a00096f0: e1a07001 mov r7, r1 const rtems_filesystem_table_t *table_entry = &rtems_filesystem_table [0]; rtems_chain_node *node = NULL; bool stop = false; a00096f4: 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]; a00096f8: e59f4070 ldr r4, [pc, #112] ; a0009770 rtems_chain_node *node = NULL; bool stop = false; while ( table_entry->type && !stop ) { a00096fc: ea000003 b a0009710 stop = (*routine)( table_entry, routine_arg ); a0009700: e1a00004 mov r0, r4 a0009704: e1a01007 mov r1, r7 a0009708: e12fff36 blx r6 ++table_entry; a000970c: 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 ) { a0009710: e5943000 ldr r3, [r4] a0009714: e3530000 cmp r3, #0 a0009718: 0a000002 beq a0009728 a000971c: e3500000 cmp r0, #0 a0009720: 0afffff6 beq a0009700 a0009724: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { a0009728: e2508000 subs r8, r0, #0 a000972c: 1a00000e bne a000976c } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } a0009730: e59f503c ldr r5, [pc, #60] ; a0009774 stop = (*routine)( table_entry, routine_arg ); ++table_entry; } if ( !stop ) { rtems_libio_lock(); a0009734: ebffffe1 bl a00096c0 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } a0009738: e4954004 ldr r4, [r5], #4 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( a000973c: ea000004 b a0009754 !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 ); a0009740: e2840008 add r0, r4, #8 a0009744: e1a01007 mov r1, r7 a0009748: e12fff36 blx r6 } } rtems_libio_unlock(); rtems_set_errno_and_return_minus_one( ENOENT ); } a000974c: 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 ); a0009750: e1a08000 mov r8, r0 ++table_entry; } if ( !stop ) { rtems_libio_lock(); for ( a0009754: e1540005 cmp r4, r5 a0009758: 0a000001 beq a0009764 node = rtems_chain_first( &filesystem_chain ); !rtems_chain_is_tail( &filesystem_chain, node ) && !stop; a000975c: e3580000 cmp r8, #0 a0009760: 0afffff6 beq a0009740 ) { const filesystem_node *fsn = (filesystem_node *) node; stop = (*routine)( &fsn->entry, routine_arg ); } rtems_libio_unlock(); a0009764: ebffffdb bl a00096d8 a0009768: e1a00008 mov r0, r8 } return stop; } a000976c: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a00025d8 : void *rtems_gxx_getspecific(__gthread_key_t key) { a00025d8: e92d4031 push {r0, r4, r5, lr} a00025dc: e1a04000 mov r4, r0 rtems_status_code status; void *p= 0; a00025e0: e3a05000 mov r5, #0 a00025e4: e28d2004 add r2, sp, #4 a00025e8: 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 ); a00025ec: e1a00005 mov r0, r5 a00025f0: e1a01004 mov r1, r4 a00025f4: e1a0200d mov r2, sp a00025f8: eb000e36 bl a0005ed8 if ( status == RTEMS_SUCCESSFUL ) { a00025fc: e1500005 cmp r0, r5 /* We do not have to do this, but what the heck ! */ p= key->val; a0002600: 05943000 ldreq r3, [r4] a0002604: 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 ) { a0002608: 0a000008 beq a0002630 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 ); a000260c: e1a00005 mov r0, r5 <== NOT EXECUTED a0002610: e1a01004 mov r1, r4 <== NOT EXECUTED a0002614: e5942004 ldr r2, [r4, #4] <== NOT EXECUTED a0002618: eb000de6 bl a0005db8 <== NOT EXECUTED if ( status != RTEMS_SUCCESSFUL ) { a000261c: e3500000 cmp r0, #0 <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); } key->val = (void *)0; a0002620: 05840000 streq r0, [r4] <== NOT EXECUTED } 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 ); if ( status != RTEMS_SUCCESSFUL ) { a0002624: 0a000001 beq a0002630 <== NOT EXECUTED rtems_panic ("rtems_gxx_getspecific"); a0002628: e59f0008 ldr r0, [pc, #8] ; a0002638 <== NOT EXECUTED a000262c: eb001eaa bl a000a0dc <== NOT EXECUTED p, rtems_task_self() ); #endif return p; } a0002630: e59d0000 ldr r0, [sp] a0002634: e8bd8038 pop {r3, r4, r5, pc} =============================================================================== a0002594 : { #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: dtor key=%x, ptr=%x\n", key, ptr ); #endif key->val = 0; a0002594: e3a03000 mov r3, #0 <== NOT EXECUTED a0002598: e5803000 str r3, [r0] <== NOT EXECUTED return 0; } a000259c: e1a00003 mov r0, r3 <== NOT EXECUTED a00025a0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a00026c0 : int rtems_gxx_mutex_destroy (__gthread_mutex_t *mutex) { a00026c0: 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); a00026c4: e5900000 ldr r0, [r0] <== NOT EXECUTED a00026c8: eb000c1f bl a000574c <== NOT EXECUTED if ( status == RTEMS_SUCCESSFUL ) a00026cc: e3500000 cmp r0, #0 <== NOT EXECUTED return 0; return -1; } a00026d0: 13e00000 mvnne r0, #0 <== NOT EXECUTED a00026d4: e49df004 pop {pc} ; (ldr pc, [sp], #4) <== NOT EXECUTED =============================================================================== a0002668 : /* * MUTEX support */ void rtems_gxx_mutex_init (__gthread_mutex_t *mutex) { a0002668: e92d4001 push {r0, lr} #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init =%X\n", *mutex ); #endif status = rtems_semaphore_create( a000266c: e3a01001 mov r1, #1 a0002670: e58d0000 str r0, [sp] a0002674: e3a02054 mov r2, #84 ; 0x54 a0002678: e59f0018 ldr r0, [pc, #24] ; a0002698 a000267c: e3a03000 mov r3, #0 a0002680: eb000bc6 bl a00055a0 RTEMS_PRIORITY|RTEMS_BINARY_SEMAPHORE| RTEMS_INHERIT_PRIORITY|RTEMS_NO_PRIORITY_CEILING|RTEMS_LOCAL, 0, (rtems_id *)mutex ); if ( status != RTEMS_SUCCESSFUL ) { a0002684: e3500000 cmp r0, #0 a0002688: 0a000001 beq a0002694 "gxx_wrappers: mutex init failed %s (%d)\n", rtems_status_text(status), status ); #endif rtems_panic ("rtems_gxx_mutex_init"); a000268c: e59f0008 ldr r0, [pc, #8] ; a000269c <== NOT EXECUTED a0002690: eb001e91 bl a000a0dc <== NOT EXECUTED } #ifdef DEBUG_GXX_WRAPPERS printk( "gxx_wrappers: mutex init complete =%X\n", *mutex ); #endif } a0002694: e8bd8008 pop {r3, pc} =============================================================================== a0002e50 : } } rtems_status_code rtems_libio_set_private_env(void) { a0002e50: 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); a0002e54: e3a00000 mov r0, #0 free(env); } } rtems_status_code rtems_libio_set_private_env(void) { a0002e58: 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); a0002e5c: e1a01000 mov r1, r0 a0002e60: e28d2018 add r2, sp, #24 a0002e64: eb000a63 bl a00057f8 if (sc != RTEMS_SUCCESSFUL) return sc; a0002e68: e2508000 subs r8, r0, #0 a0002e6c: 1a000037 bne a0002f50 /* Only for the first time a malloc is necesary */ if (rtems_current_user_env==&rtems_global_user_env) { a0002e70: e59f40e4 ldr r4, [pc, #228] ; a0002f5c a0002e74: e59f30e4 ldr r3, [pc, #228] ; a0002f60 a0002e78: e5942000 ldr r2, [r4] a0002e7c: e1520003 cmp r2, r3 a0002e80: 1a00000f bne a0002ec4 rtems_user_env_t *tmp = malloc(sizeof(rtems_user_env_t)); a0002e84: e2800048 add r0, r0, #72 ; 0x48 a0002e88: ebfffd4e bl a00023c8 if (!tmp) a0002e8c: e2505000 subs r5, r0, #0 return RTEMS_NO_MEMORY; a0002e90: 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) a0002e94: 0a00002d beq a0002f50 #ifdef HAVE_USERENV_REFCNT tmp->refcnt = 1; #endif sc = rtems_task_variable_add( a0002e98: e1a00008 mov r0, r8 a0002e9c: e1a01004 mov r1, r4 a0002ea0: e59f20bc ldr r2, [pc, #188] ; a0002f64 a0002ea4: eb000aa3 bl a0005938 RTEMS_SELF, (void*)&rtems_current_user_env, (void(*)(void *))free_user_env ); if (sc != RTEMS_SUCCESSFUL) { a0002ea8: e2506000 subs r6, r0, #0 * not initialized yet */ free(tmp); return sc; } rtems_current_user_env = tmp; a0002eac: 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) { a0002eb0: 0a000003 beq a0002ec4 /* don't use free_user_env because the pathlocs are * not initialized yet */ free(tmp); a0002eb4: e1a00005 mov r0, r5 <== NOT EXECUTED a0002eb8: ebfffbcc bl a0001df0 <== NOT EXECUTED return sc; a0002ebc: e1a08006 mov r8, r6 <== NOT EXECUTED a0002ec0: ea000022 b a0002f50 <== NOT EXECUTED } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ a0002ec4: e59f6090 ldr r6, [pc, #144] ; a0002f5c a0002ec8: e59f1090 ldr r1, [pc, #144] ; a0002f60 a0002ecc: e3a02048 mov r2, #72 ; 0x48 a0002ed0: e5964000 ldr r4, [r6] * 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); a0002ed4: e3a05000 mov r5, #0 return sc; } rtems_current_user_env = tmp; } *rtems_current_user_env = rtems_global_user_env; /* get the global values*/ a0002ed8: e1a00004 mov r0, r4 a0002edc: eb0026a1 bl a000c968 rtems_current_user_env->task_id=task_id; /* mark the local values*/ a0002ee0: 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); a0002ee4: e3a01001 mov r1, #1 a0002ee8: e1a02005 mov r2, r5 } 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*/ a0002eec: 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); a0002ef0: e28d4004 add r4, sp, #4 a0002ef4: e1a03004 mov r3, r4 a0002ef8: e59f0068 ldr r0, [pc, #104] ; a0002f68 a0002efc: e58d5000 str r5, [sp] a0002f00: ebfffb7a bl a0001cf0 rtems_filesystem_root = loc; a0002f04: e596c000 ldr ip, [r6] a0002f08: e1a07004 mov r7, r4 a0002f0c: e8b7000f ldm r7!, {r0, r1, r2, r3} a0002f10: e28cc018 add ip, ip, #24 a0002f14: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002f18: e5973000 ldr r3, [r7] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0002f1c: e3a01001 mov r1, #1 a0002f20: e1a02005 mov r2, r5 * 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; a0002f24: e58c3000 str r3, [ip] rtems_filesystem_evaluate_path("/", 1, 0, &loc, 0); a0002f28: e59f0038 ldr r0, [pc, #56] ; a0002f68 a0002f2c: e1a03004 mov r3, r4 a0002f30: e58d5000 str r5, [sp] a0002f34: ebfffb6d bl a0001cf0 rtems_filesystem_current = loc; a0002f38: e8b4000f ldm r4!, {r0, r1, r2, r3} a0002f3c: e596c000 ldr ip, [r6] a0002f40: e28cc004 add ip, ip, #4 a0002f44: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002f48: e5973000 ldr r3, [r7] a0002f4c: e58c3000 str r3, [ip] return RTEMS_SUCCESSFUL; } a0002f50: e1a00008 mov r0, r8 a0002f54: e28dd01c add sp, sp, #28 a0002f58: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0002f6c : * while changing any of those (chdir(), chroot()). */ #ifndef HAVE_USERENV_REFCNT rtems_status_code rtems_libio_share_private_env(rtems_id task_id) { a0002f6c: e92d4033 push {r0, r1, r4, r5, lr} <== NOT EXECUTED a0002f70: 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); a0002f74: e3a00000 mov r0, #0 <== NOT EXECUTED a0002f78: e1a01000 mov r1, r0 <== NOT EXECUTED a0002f7c: e1a0200d mov r2, sp <== NOT EXECUTED a0002f80: eb000a1c bl a00057f8 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; a0002f84: e2503000 subs r3, r0, #0 <== NOT EXECUTED a0002f88: 1a00001c bne a0003000 <== NOT EXECUTED if (rtems_current_user_env->task_id==current_task_id) { a0002f8c: e59f1074 ldr r1, [pc, #116] ; a0003008 <== NOT EXECUTED a0002f90: e59d3000 ldr r3, [sp] <== NOT EXECUTED a0002f94: e5915000 ldr r5, [r1] <== NOT EXECUTED a0002f98: e5952000 ldr r2, [r5] <== NOT EXECUTED a0002f9c: e1520003 cmp r2, r3 <== NOT EXECUTED a0002fa0: 1a000005 bne a0002fbc <== 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); a0002fa4: eb000a8d bl a00059e0 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) return sc; a0002fa8: e2503000 subs r3, r0, #0 <== NOT EXECUTED a0002fac: 1a000013 bne a0003000 <== NOT EXECUTED free_user_env(tmp); a0002fb0: e1a00005 mov r0, r5 <== NOT EXECUTED a0002fb4: ebffff97 bl a0002e18 <== NOT EXECUTED a0002fb8: ea000004 b a0002fd0 <== NOT EXECUTED } else { sc = rtems_task_variable_get( a0002fbc: e1a00004 mov r0, r4 <== NOT EXECUTED a0002fc0: e28d2004 add r2, sp, #4 <== NOT EXECUTED a0002fc4: eb000aa3 bl a0005a58 <== NOT EXECUTED task_id,(void*)&rtems_current_user_env, (void*)&shared_user_env ); if (sc != RTEMS_SUCCESSFUL) a0002fc8: e2503000 subs r3, r0, #0 <== NOT EXECUTED a0002fcc: 1a000008 bne a0002ff4 <== NOT EXECUTED goto bailout; } /* AT THIS POINT, rtems_current_user_env is DANGLING */ sc = rtems_task_variable_add( a0002fd0: e59f4030 ldr r4, [pc, #48] ; a0003008 <== NOT EXECUTED a0002fd4: e59f2030 ldr r2, [pc, #48] ; a000300c <== NOT EXECUTED a0002fd8: e3a00000 mov r0, #0 <== NOT EXECUTED a0002fdc: e1a01004 mov r1, r4 <== NOT EXECUTED a0002fe0: eb000a54 bl a0005938 <== NOT EXECUTED RTEMS_SELF,(void*)&rtems_current_user_env,free_user_env); if (sc != RTEMS_SUCCESSFUL) a0002fe4: 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; a0002fe8: 059d2004 ldreq r2, [sp, #4] <== NOT EXECUTED a0002fec: 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) a0002ff0: 0a000002 beq a0003000 <== NOT EXECUTED return RTEMS_SUCCESSFUL; bailout: /* fallback to the global env */ rtems_current_user_env = &rtems_global_user_env; a0002ff4: e59f1014 ldr r1, [pc, #20] ; a0003010 <== NOT EXECUTED a0002ff8: e59f2008 ldr r2, [pc, #8] ; a0003008 <== NOT EXECUTED a0002ffc: e5821000 str r1, [r2] <== NOT EXECUTED return sc; } a0003000: e1a00003 mov r0, r3 <== NOT EXECUTED a0003004: e8bd803c pop {r2, r3, r4, r5, pc} <== NOT EXECUTED =============================================================================== a000948c : uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a000948c: e2003006 and r3, r0, #6 a0009490: e3530006 cmp r3, #6 fcntl_flags |= O_RDWR; a0009494: 03a03002 moveq r3, #2 uint32_t flags ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { a0009498: 0a000005 beq a00094b4 fcntl_flags |= O_RDWR; } else if ( (flags & LIBIO_FLAGS_READ) == LIBIO_FLAGS_READ) { a000949c: e3100002 tst r0, #2 fcntl_flags |= O_RDONLY; a00094a0: 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) { a00094a4: 1a000002 bne a00094b4 ) { uint32_t fcntl_flags = 0; if ( (flags & LIBIO_FLAGS_READ_WRITE) == LIBIO_FLAGS_READ_WRITE ) { fcntl_flags |= O_RDWR; a00094a8: e3100004 tst r0, #4 <== NOT EXECUTED a00094ac: 03a03000 moveq r3, #0 <== NOT EXECUTED a00094b0: 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 ) { a00094b4: e3100001 tst r0, #1 fcntl_flags |= O_NONBLOCK; a00094b8: 13833901 orrne r3, r3, #16384 ; 0x4000 } if ( (flags & LIBIO_FLAGS_APPEND) == LIBIO_FLAGS_APPEND ) { a00094bc: e3100c02 tst r0, #512 ; 0x200 fcntl_flags |= O_APPEND; a00094c0: 13833008 orrne r3, r3, #8 } if ( (flags & LIBIO_FLAGS_CREATE) == LIBIO_FLAGS_CREATE ) { a00094c4: e3100b01 tst r0, #1024 ; 0x400 fcntl_flags |= O_CREAT; a00094c8: 13833c02 orrne r3, r3, #512 ; 0x200 } return fcntl_flags; } a00094cc: e1a00003 mov r0, r3 a00094d0: e12fff1e bx lr =============================================================================== a000ba98 : return (retval); } int rtems_mkdir(const char *path, mode_t mode) { a000ba98: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000ba9c: e24dd048 sub sp, sp, #72 ; 0x48 a000baa0: e1a0b001 mov fp, r1 int success = 0; char *dup_path = strdup(path); a000baa4: eb0009e9 bl a000e250 if (dup_path != NULL) { a000baa8: e2505000 subs r5, r0, #0 success = build(dup_path, mode); free(dup_path); } return success != 0 ? 0 : -1; a000baac: 03e00000 mvneq r0, #0 rtems_mkdir(const char *path, mode_t mode) { int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { a000bab0: 0a000056 beq a000bc10 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ a000bab4: e5d53000 ldrb r3, [r5] a000bab8: e3a06000 mov r6, #0 ++p; for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') a000babc: e1a09006 mov r9, r6 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ a000bac0: e353002f cmp r3, #47 ; 0x2f ++p; a000bac4: 02857001 addeq r7, r5, #1 char *p; p = path; oumask = 0; retval = 1; if (p[0] == '/') /* Skip leading '/'. */ a000bac8: 11a07005 movne r7, r5 a000bacc: e3a03001 mov r3, #1 retval = 0; break; } } if (!last) *p = '/'; a000bad0: 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) { a000bad4: 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') a000bad8: e4d72001 ldrb r2, [r7], #1 a000badc: e3520000 cmp r2, #0 last = 1; a000bae0: 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') a000bae4: 0a000002 beq a000baf4 last = 1; else if (p[0] != '/') a000bae8: e352002f cmp r2, #47 ; 0x2f a000baec: 03a02000 moveq r2, #0 a000baf0: 1afffff8 bne a000bad8 continue; *p = '\0'; if (!last && p[1] == '\0') a000baf4: e3520000 cmp r2, #0 for (first = 1, last = 0; !last ; ++p) { if (p[0] == '\0') last = 1; else if (p[0] != '/') continue; *p = '\0'; a000baf8: e5479001 strb r9, [r7, #-1] if (!last && p[1] == '\0') a000bafc: 13a04001 movne r4, #1 a000bb00: 1a000002 bne a000bb10 a000bb04: e5d74000 ldrb r4, [r7] a000bb08: e2744001 rsbs r4, r4, #1 a000bb0c: 33a04000 movcc r4, #0 last = 1; if (first) { a000bb10: e3530000 cmp r3, #0 a000bb14: 0a000004 beq a000bb2c * mkdir [-m mode] dir * * We change the user's umask and then restore it, * instead of doing chmod's. */ oumask = umask(0); a000bb18: e3a00000 mov r0, #0 a000bb1c: eb000069 bl a000bcc8 a000bb20: e1a06000 mov r6, r0 numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); a000bb24: e3c000c0 bic r0, r0, #192 ; 0xc0 a000bb28: eb000066 bl a000bcc8 first = 0; } if (last) a000bb2c: e3540000 cmp r4, #0 (void)umask(oumask); if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { a000bb30: 059f10f0 ldreq r1, [pc, #240] ; a000bc28 oumask = umask(0); numask = oumask & ~(S_IWUSR | S_IXUSR); (void)umask(numask); first = 0; } if (last) a000bb34: 0a000002 beq a000bb44 (void)umask(oumask); a000bb38: e1a00006 mov r0, r6 a000bb3c: eb000061 bl a000bcc8 if (mkdir(path, last ? omode : S_IRWXU | S_IRWXG | S_IRWXO) < 0) { a000bb40: e1a0100b mov r1, fp a000bb44: e1a00005 mov r0, r5 a000bb48: ebffde76 bl a0003528 a000bb4c: e3500000 cmp r0, #0 a000bb50: aa00001f bge a000bbd4 if (errno == EEXIST || errno == EISDIR) { a000bb54: eb0005d5 bl a000d2b0 <__errno> a000bb58: e5903000 ldr r3, [r0] a000bb5c: e3530011 cmp r3, #17 a000bb60: 0a000003 beq a000bb74 a000bb64: eb0005d1 bl a000d2b0 <__errno> <== NOT EXECUTED a000bb68: e5903000 ldr r3, [r0] <== NOT EXECUTED a000bb6c: e3530015 cmp r3, #21 <== NOT EXECUTED a000bb70: 1a00001c bne a000bbe8 <== NOT EXECUTED if (stat(path, &sb) < 0) { a000bb74: e1a00005 mov r0, r5 a000bb78: e1a0100d mov r1, sp a000bb7c: eb00002a bl a000bc2c a000bb80: e3500000 cmp r0, #0 a000bb84: ba000017 blt a000bbe8 retval = 0; break; } else if (!S_ISDIR(sb.st_mode)) { a000bb88: e59d300c ldr r3, [sp, #12] a000bb8c: e2033a0f and r3, r3, #61440 ; 0xf000 a000bb90: e3530901 cmp r3, #16384 ; 0x4000 a000bb94: 0a00000b beq a000bbc8 if (last) a000bb98: e3540000 cmp r4, #0 a000bb9c: 0a000004 beq a000bbb4 errno = EEXIST; a000bba0: eb0005c2 bl a000d2b0 <__errno> a000bba4: e3a03011 mov r3, #17 a000bba8: e5803000 str r3, [r0] else errno = ENOTDIR; retval = 0; a000bbac: e3a07000 mov r7, #0 a000bbb0: ea000011 b a000bbfc break; } else if (!S_ISDIR(sb.st_mode)) { if (last) errno = EEXIST; else errno = ENOTDIR; a000bbb4: eb0005bd bl a000d2b0 <__errno> <== NOT EXECUTED a000bbb8: e3a03014 mov r3, #20 <== NOT EXECUTED a000bbbc: e5803000 str r3, [r0] <== NOT EXECUTED retval = 0; a000bbc0: e1a07004 mov r7, r4 <== NOT EXECUTED a000bbc4: ea00000a b a000bbf4 <== NOT EXECUTED break; } if (last) a000bbc8: e3540000 cmp r4, #0 a000bbcc: 1a000011 bne a000bc18 a000bbd0: ea000001 b a000bbdc } else { retval = 0; break; } } if (!last) a000bbd4: e3540000 cmp r4, #0 a000bbd8: 1a000010 bne a000bc20 *p = '/'; a000bbdc: e547a001 strb sl, [r7, #-1] a000bbe0: e3a03000 mov r3, #0 a000bbe4: eaffffbb b a000bad8 } if (!first && !last) a000bbe8: 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; a000bbec: e3a07000 mov r7, #0 <== NOT EXECUTED } } if (!last) *p = '/'; } if (!first && !last) a000bbf0: 1a000001 bne a000bbfc <== NOT EXECUTED (void)umask(oumask); a000bbf4: e1a00006 mov r0, r6 <== NOT EXECUTED a000bbf8: eb000032 bl a000bcc8 <== NOT EXECUTED int success = 0; char *dup_path = strdup(path); if (dup_path != NULL) { success = build(dup_path, mode); free(dup_path); a000bbfc: e1a00005 mov r0, r5 a000bc00: ebffdc95 bl a0002e5c } return success != 0 ? 0 : -1; a000bc04: e3570000 cmp r7, #0 a000bc08: 13a00000 movne r0, #0 a000bc0c: 03e00000 mvneq r0, #0 } a000bc10: e28dd048 add sp, sp, #72 ; 0x48 a000bc14: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} errno = ENOTDIR; retval = 0; break; } if (last) retval = 2; a000bc18: e3a07002 mov r7, #2 a000bc1c: eafffff6 b a000bbfc } else { retval = 0; break; } } if (!last) a000bc20: e3a07001 mov r7, #1 a000bc24: eafffff4 b a000bbfc =============================================================================== a00012cc : /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; a00012cc: e59f303c ldr r3, [pc, #60] ; a0001310 /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { a00012d0: e92d4800 push {fp, lr} Stack_Control *the_stack = &_Thread_Executing->Start.Initial_stack; a00012d4: e5932004 ldr r2, [r3, #4] /* * Check if blown */ bool rtems_stack_checker_is_blown( void ) { a00012d8: e28db004 add fp, sp, #4 ) { #if defined(__GNUC__) void *sp = __builtin_frame_address(0); if ( sp < the_stack->area ) { a00012dc: e59230c4 ldr r3, [r2, #196] ; 0xc4 a00012e0: e15b0003 cmp fp, r3 a00012e4: 3a000003 bcc a00012f8 return false; } if ( sp > (the_stack->area + the_stack->size) ) { a00012e8: e59220c0 ldr r2, [r2, #192] ; 0xc0 a00012ec: e0833002 add r3, r3, r2 a00012f0: e15b0003 cmp fp, r3 a00012f4: 9a000003 bls a0001308 /* * Let's report as much as we can. */ if ( !sp_ok || !pattern_ok ) { Stack_check_report_blown_task( _Thread_Executing, pattern_ok ); a00012f8: e59f3010 ldr r3, [pc, #16] ; a0001310 <== NOT EXECUTED a00012fc: e3a01001 mov r1, #1 <== NOT EXECUTED a0001300: e5930004 ldr r0, [r3, #4] <== NOT EXECUTED a0001304: ebffffab bl a00011b8 <== NOT EXECUTED /* * The Stack Pointer and the Pattern Area are OK so return false. */ return false; } a0001308: e3a00000 mov r0, #0 a000130c: e8bd8800 pop {fp, pc} =============================================================================== a000ad30 : #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a000ad30: e92d40f1 push {r0, r4, r5, r6, r7, lr} STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a000ad34: e2514000 subs r4, r1, #0 #if defined(STRING_TO_INTEGER) && !defined(STRING_TO_POINTER) , int base #endif ) { a000ad38: e1a05000 mov r5, r0 a000ad3c: e1a06002 mov r6, r2 STRING_TO_INPUT_TYPE result; char *end; if ( !n ) return RTEMS_INVALID_ADDRESS; a000ad40: 03a00009 moveq r0, #9 ) { STRING_TO_INPUT_TYPE result; char *end; if ( !n ) a000ad44: 0a000018 beq a000adac return RTEMS_INVALID_ADDRESS; errno = 0; a000ad48: eb000791 bl a000cb94 <__errno> a000ad4c: e3a03000 mov r3, #0 a000ad50: 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 ); a000ad54: e1a0100d mov r1, sp if ( !n ) return RTEMS_INVALID_ADDRESS; errno = 0; *n = 0; a000ad58: 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 ); a000ad5c: e1a00005 mov r0, r5 a000ad60: e3a02010 mov r2, #16 a000ad64: eb001517 bl a00101c8 #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 ) a000ad68: e3560000 cmp r6, #0 *endptr = end; a000ad6c: 159d3000 ldrne r3, [sp] *n = 0; #ifdef STRING_TO_FLOAT result = STRING_TO_METHOD( s, &end ); #elif defined(STRING_TO_POINTER) result = STRING_TO_METHOD( s, &end, 16 ); a000ad70: e1a07000 mov r7, r0 result = STRING_TO_METHOD( s, &end, base ); #endif /* If the user wants the end pointer back, then return it. */ if ( endptr ) *endptr = end; a000ad74: 15863000 strne r3, [r6] /* nothing was converted */ if ( end == s ) a000ad78: e59d3000 ldr r3, [sp] a000ad7c: e1530005 cmp r3, r5 return RTEMS_NOT_DEFINED; a000ad80: 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 ) a000ad84: 0a000008 beq a000adac return RTEMS_INVALID_NUMBER; #endif #ifdef STRING_TO_MAX /* there was an overflow */ if ( (result == STRING_TO_MAX) && (errno == ERANGE)) a000ad88: e3770001 cmn r7, #1 a000ad8c: 1a000004 bne a000ada4 a000ad90: eb00077f bl a000cb94 <__errno> <== NOT EXECUTED a000ad94: e5903000 ldr r3, [r0] <== NOT EXECUTED a000ad98: e3530022 cmp r3, #34 ; 0x22 <== NOT EXECUTED return RTEMS_INVALID_NUMBER; a000ad9c: 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)) a000ada0: 0a000001 beq a000adac <== 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; a000ada4: e5847000 str r7, [r4] #else *n = (STRING_TO_TYPE) result; #endif return RTEMS_SUCCESSFUL; a000ada8: e3a00000 mov r0, #0 } a000adac: e8bd80f8 pop {r3, r4, r5, r6, r7, pc} =============================================================================== a0001548 : int rtems_tarfs_load( char *mountpoint, uint8_t *tar_image, size_t tar_size ) { a0001548: e92d4ff0 push {r4, r5, r6, r7, r8, r9, sl, fp, lr} a000154c: e24ddf6b sub sp, sp, #428 ; 0x1ac a0001550: e58d1010 str r1, [sp, #16] a0001554: e58d2018 str r2, [sp, #24] a0001558: e58d000c str r0, [sp, #12] int offset; unsigned long nblocks; IMFS_jnode_t *node; int status; status = rtems_filesystem_evaluate_path( a000155c: eb00386a bl a000f70c a0001560: e3a02000 mov r2, #0 a0001564: e1a01000 mov r1, r0 a0001568: e28d3f65 add r3, sp, #404 ; 0x194 a000156c: e59d000c ldr r0, [sp, #12] a0001570: e58d2000 str r2, [sp] a0001574: eb0002b6 bl a0002054 strlen(mountpoint), 0, &root_loc, 0 ); if (status != 0) a0001578: e2504000 subs r4, r0, #0 a000157c: 1a00006d bne a0001738 return -1; if (root_loc.ops != &IMFS_ops a0001580: e59d31a0 ldr r3, [sp, #416] ; 0x1a0 a0001584: e59f21c4 ldr r2, [pc, #452] ; a0001750 a0001588: e1530002 cmp r3, r2 a000158c: 0a000005 beq a00015a8 && root_loc.ops != &fifoIMFS_ops) a0001590: e59f21bc ldr r2, [pc, #444] ; a0001754 <== NOT EXECUTED a0001594: e1530002 cmp r3, r2 <== NOT EXECUTED a0001598: 1a000066 bne a0001738 <== NOT EXECUTED a000159c: ea000001 b a00015a8 <== NOT EXECUTED a00015a0: e1a08004 mov r8, r4 a00015a4: ea000006 b a00015c4 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a00015a8: e28d2f65 add r2, sp, #404 ; 0x194 0 ); if (status != 0) return -1; if (root_loc.ops != &IMFS_ops a00015ac: 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); a00015b0: e28d7f47 add r7, sp, #284 ; 0x11c * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a00015b4: e28d9d06 add r9, sp, #384 ; 0x180 a00015b8: e58d2004 str r2, [sp, #4] * - For directories, just create directories as usual. IMFS * will take care of the rest. * - For files, create a file node with special tarfs properties. */ if (linkflag == DIRTYPE) { strcpy(full_filename, mountpoint); a00015bc: e28d501c add r5, sp, #28 a00015c0: e1a0a004 mov sl, r4 /* * Create an IMFS node structure pointing to tar image memory. */ offset = 0; while (1) { if (offset + 512 > tar_size) a00015c4: e59d3018 ldr r3, [sp, #24] a00015c8: e2884c02 add r4, r8, #512 ; 0x200 a00015cc: e1540003 cmp r4, r3 a00015d0: 8a00005a bhi a0001740 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; a00015d4: e59de010 ldr lr, [sp, #16] offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) a00015d8: e59f1178 ldr r1, [pc, #376] ; a0001758 a00015dc: e3a02007 mov r2, #7 break; /* * Read a header. */ hdr_ptr = (char *) &tar_image[offset]; a00015e0: e08e8008 add r8, lr, r8 offset += 512; if (strncmp(&hdr_ptr[257], "ustar ", 7)) a00015e4: e2880c01 add r0, r8, #256 ; 0x100 a00015e8: e2800001 add r0, r0, #1 a00015ec: eb00385e bl a000f76c a00015f0: e2506000 subs r6, r0, #0 a00015f4: 1a000051 bne a0001740 break; strncpy(filename, hdr_ptr, MAX_NAME_FIELD_SIZE); a00015f8: e3a02063 mov r2, #99 ; 0x63 a00015fc: e1a01008 mov r1, r8 a0001600: e1a00007 mov r0, r7 a0001604: eb0038b4 bl a000f8dc filename[MAX_NAME_FIELD_SIZE] = '\0'; a0001608: e5cd617f strb r6, [sp, #383] ; 0x17f linkflag = hdr_ptr[156]; file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a000160c: e3a01008 mov r1, #8 a0001610: 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]; a0001614: e5d8609c ldrb r6, [r8, #156] ; 0x9c file_mode = _rtems_octal2ulong(&hdr_ptr[100], 8); a0001618: eb001d62 bl a0008ba8 <_rtems_octal2ulong> file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); a000161c: 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); a0001620: e58d0014 str r0, [sp, #20] file_size = _rtems_octal2ulong(&hdr_ptr[124], 12); a0001624: e288007c add r0, r8, #124 ; 0x7c a0001628: eb001d5e bl a0008ba8 <_rtems_octal2ulong> hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); a000162c: 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); a0001630: e1a0b000 mov fp, r0 hdr_chksum = _rtems_octal2ulong(&hdr_ptr[148], 8); a0001634: e2880094 add r0, r8, #148 ; 0x94 a0001638: eb001d5a bl a0008ba8 <_rtems_octal2ulong> a000163c: e1a03000 mov r3, r0 if (_rtems_tar_header_checksum(hdr_ptr) != hdr_chksum) a0001640: e1a00008 mov r0, r8 a0001644: e58d3008 str r3, [sp, #8] a0001648: eb001d64 bl a0008be0 <_rtems_tar_header_checksum> a000164c: e59d3008 ldr r3, [sp, #8] a0001650: e1500003 cmp r0, r3 a0001654: 1a000039 bne a0001740 * 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) { a0001658: e3560035 cmp r6, #53 ; 0x35 a000165c: 1a000013 bne a00016b0 strcpy(full_filename, mountpoint); a0001660: e59d100c ldr r1, [sp, #12] a0001664: e1a00005 mov r0, r5 a0001668: eb003663 bl a000effc if (full_filename[strlen(full_filename)-1] != '/') a000166c: e1a00005 mov r0, r5 a0001670: eb003825 bl a000f70c a0001674: e28d2f6b add r2, sp, #428 ; 0x1ac a0001678: e0820000 add r0, r2, r0 a000167c: e5503191 ldrb r3, [r0, #-401] ; 0x191 a0001680: e353002f cmp r3, #47 ; 0x2f a0001684: 0a000002 beq a0001694 strcat(full_filename, "/"); a0001688: e1a00005 mov r0, r5 <== NOT EXECUTED a000168c: e59f10c8 ldr r1, [pc, #200] ; a000175c <== NOT EXECUTED a0001690: eb0035a2 bl a000ed20 <== NOT EXECUTED strcat(full_filename, filename); a0001694: e1a01007 mov r1, r7 a0001698: e1a00005 mov r0, r5 a000169c: eb00359f bl a000ed20 mkdir(full_filename, S_IRWXU | S_IRWXG | S_IRWXO); a00016a0: e1a00005 mov r0, r5 a00016a4: e59f10b4 ldr r1, [pc, #180] ; a0001760 a00016a8: eb00049a bl a0002918 a00016ac: eaffffbb b a00015a0 * 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) { a00016b0: e3560030 cmp r6, #48 ; 0x30 a00016b4: 1affffb9 bne a00015a0 const char *name; loc = root_loc; a00016b8: e59dc004 ldr ip, [sp, #4] a00016bc: e1a0e009 mov lr, r9 a00016c0: e8bc000f ldm ip!, {r0, r1, r2, r3} a00016c4: e8ae000f stmia lr!, {r0, r1, r2, r3} a00016c8: e59c2000 ldr r2, [ip] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { a00016cc: e1a00007 mov r0, r7 a00016d0: e1a01009 mov r1, r9 * should not have this path. */ else if (linkflag == REGTYPE) { const char *name; loc = root_loc; a00016d4: e58e2000 str r2, [lr] if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { a00016d8: e28d2f6a add r2, sp, #424 ; 0x1a8 a00016dc: eb00201c bl a0009754 a00016e0: e2506000 subs r6, r0, #0 a00016e4: 1a00000d bne a0001720 node = IMFS_create_node( &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a00016e8: e59d2014 ldr r2, [sp, #20] else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( a00016ec: e1a00009 mov r0, r9 a00016f0: e3a01006 mov r1, #6 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a00016f4: e1a03b82 lsl r3, r2, #23 else if (linkflag == REGTYPE) { const char *name; loc = root_loc; if (IMFS_evaluate_for_make(filename, &loc, &name) == 0) { node = IMFS_create_node( a00016f8: e59d21a8 ldr r2, [sp, #424] ; 0x1a8 &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, a00016fc: 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( a0001700: e3833902 orr r3, r3, #32768 ; 0x8000 a0001704: e58d6000 str r6, [sp] a0001708: eb001e7e bl a0009108 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]; a000170c: e59d2010 ldr r2, [sp, #16] &loc, IMFS_LINEAR_FILE, (char *)name, (file_mode & (S_IRWXU | S_IRWXG | S_IRWXO)) | S_IFREG, NULL ); node->info.linearfile.size = file_size; a0001710: e580b050 str fp, [r0, #80] ; 0x50 a0001714: e5806054 str r6, [r0, #84] ; 0x54 node->info.linearfile.direct = &tar_image[offset]; a0001718: e0823004 add r3, r2, r4 a000171c: e5803058 str r3, [r0, #88] ; 0x58 } nblocks = (((file_size) + 511) & ~511) / 512; a0001720: e28bbf7f add fp, fp, #508 ; 0x1fc a0001724: e28bb003 add fp, fp, #3 offset += 512 * nblocks; a0001728: e3cbbf7f bic fp, fp, #508 ; 0x1fc a000172c: e3cbb003 bic fp, fp, #3 a0001730: e08b4004 add r4, fp, r4 a0001734: eaffff99 b a00015a0 if (status != 0) return -1; if (root_loc.ops != &IMFS_ops && root_loc.ops != &fifoIMFS_ops) return -1; a0001738: e3e04000 mvn r4, #0 <== NOT EXECUTED a000173c: ea000000 b a0001744 <== NOT EXECUTED a0001740: e1a0400a mov r4, sl nblocks = (((file_size) + 511) & ~511) / 512; offset += 512 * nblocks; } } return status; } a0001744: e1a00004 mov r0, r4 a0001748: e28ddf6b add sp, sp, #428 ; 0x1ac a000174c: e8bd8ff0 pop {r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a00031a0 : int cbufsize, int raw_input, int raw_output ) { rtems_termios_cbufsize = cbufsize; a00031a0: e59f300c ldr r3, [pc, #12] ; a00031b4 <== NOT EXECUTED a00031a4: e5830008 str r0, [r3, #8] <== NOT EXECUTED rtems_termios_raw_input_size = raw_input; a00031a8: e8830006 stm r3, {r1, r2} <== NOT EXECUTED rtems_termios_raw_output_size = raw_output; return RTEMS_SUCCESSFUL; } a00031ac: e3a00000 mov r0, #0 <== NOT EXECUTED a00031b0: e12fff1e bx lr <== NOT EXECUTED =============================================================================== a000300c : rtems_status_code rtems_termios_close (void *arg) { rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a000300c: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_close (void *arg) { a0003010: e92d4030 push {r4, r5, lr} rtems_libio_open_close_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003014: e5934034 ldr r4, [r3, #52] ; 0x34 rtems_status_code sc; sc = rtems_semaphore_obtain( a0003018: e59f3170 ldr r3, [pc, #368] ; a0003190 a000301c: e3a01000 mov r1, #0 } } rtems_status_code rtems_termios_close (void *arg) { a0003020: 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( a0003024: e1a02001 mov r2, r1 a0003028: e5930000 ldr r0, [r3] a000302c: eb0007a1 bl a0004eb8 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0003030: e3500000 cmp r0, #0 a0003034: 1a000021 bne a00030c0 rtems_fatal_error_occurred (sc); if (--tty->refcount == 0) { a0003038: e5943008 ldr r3, [r4, #8] a000303c: e2433001 sub r3, r3, #1 a0003040: e3530000 cmp r3, #0 a0003044: e5843008 str r3, [r4, #8] a0003048: 1a00004b bne a000317c if (rtems_termios_linesw[tty->t_line].l_close != NULL) { a000304c: e59420cc ldr r2, [r4, #204] ; 0xcc a0003050: e59f313c ldr r3, [pc, #316] ; a0003194 a0003054: e0833282 add r3, r3, r2, lsl #5 a0003058: e5931004 ldr r1, [r3, #4] a000305c: e3510000 cmp r1, #0 a0003060: 0a000002 beq a0003070 /* * call discipline-specific close */ sc = rtems_termios_linesw[tty->t_line].l_close(tty); a0003064: e1a00004 mov r0, r4 a0003068: e12fff31 blx r1 a000306c: ea000006 b a000308c } else { /* * default: just flush output buffer */ sc = rtems_semaphore_obtain(tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003070: e5940018 ldr r0, [r4, #24] a0003074: e1a02001 mov r2, r1 a0003078: eb00078e bl a0004eb8 if (sc != RTEMS_SUCCESSFUL) { a000307c: e3500000 cmp r0, #0 a0003080: 1a00000e bne a00030c0 rtems_fatal_error_occurred (sc); } drainOutput (tty); a0003084: e1a00004 mov r0, r4 a0003088: ebfffeb2 bl a0002b58 } if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a000308c: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0003090: e3530002 cmp r3, #2 a0003094: 1a00000a bne a00030c4 /* * send "terminate" to I/O tasks */ sc = rtems_event_send( tty->rxTaskId, TERMIOS_RX_TERMINATE_EVENT ); a0003098: e59400c4 ldr r0, [r4, #196] ; 0xc4 a000309c: e3a01001 mov r1, #1 a00030a0: eb000672 bl a0004a70 if (sc != RTEMS_SUCCESSFUL) a00030a4: e3500000 cmp r0, #0 a00030a8: 1a000004 bne a00030c0 rtems_fatal_error_occurred (sc); sc = rtems_event_send( tty->txTaskId, TERMIOS_TX_TERMINATE_EVENT ); a00030ac: e59400c8 ldr r0, [r4, #200] ; 0xc8 a00030b0: e3a01001 mov r1, #1 a00030b4: eb00066d bl a0004a70 if (sc != RTEMS_SUCCESSFUL) a00030b8: e3500000 cmp r0, #0 a00030bc: 0a000000 beq a00030c4 rtems_fatal_error_occurred (sc); a00030c0: eb000912 bl a0005510 <== NOT EXECUTED } if (tty->device.lastClose) a00030c4: e594309c ldr r3, [r4, #156] ; 0x9c a00030c8: e3530000 cmp r3, #0 a00030cc: 0a000003 beq a00030e0 (*tty->device.lastClose)(tty->major, tty->minor, arg); a00030d0: e594000c ldr r0, [r4, #12] a00030d4: e5941010 ldr r1, [r4, #16] a00030d8: e1a02005 mov r2, r5 a00030dc: e12fff33 blx r3 if (tty->forw == NULL) { a00030e0: e894000c ldm r4, {r2, r3} a00030e4: 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; a00030e8: 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) { a00030ec: 1a000003 bne a0003100 rtems_termios_ttyTail = tty->back; a00030f0: e59f10a0 ldr r1, [pc, #160] ; a0003198 if ( rtems_termios_ttyTail != NULL ) { a00030f4: 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; a00030f8: e5813000 str r3, [r1] if ( rtems_termios_ttyTail != NULL ) { rtems_termios_ttyTail->forw = NULL; a00030fc: 15832000 strne r2, [r3] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { a0003100: e5942004 ldr r2, [r4, #4] a0003104: e5943000 ldr r3, [r4] a0003108: 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; a000310c: 15823000 strne r3, [r2] } } else { tty->forw->back = tty->back; } if (tty->back == NULL) { a0003110: 1a000003 bne a0003124 rtems_termios_ttyHead = tty->forw; a0003114: e59f1080 ldr r1, [pc, #128] ; a000319c if ( rtems_termios_ttyHead != NULL ) { a0003118: e3530000 cmp r3, #0 rtems_termios_ttyHead->back = NULL; a000311c: 15832004 strne r2, [r3, #4] } else { tty->forw->back = tty->back; } if (tty->back == NULL) { rtems_termios_ttyHead = tty->forw; a0003120: e5813000 str r3, [r1] } } else { tty->back->forw = tty->forw; } rtems_semaphore_delete (tty->isem); a0003124: e5940014 ldr r0, [r4, #20] a0003128: eb00073b bl a0004e1c rtems_semaphore_delete (tty->osem); a000312c: e5940018 ldr r0, [r4, #24] a0003130: eb000739 bl a0004e1c rtems_semaphore_delete (tty->rawOutBuf.Semaphore); a0003134: e594008c ldr r0, [r4, #140] ; 0x8c a0003138: eb000737 bl a0004e1c if ((tty->device.pollRead == NULL) || a000313c: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0003140: e3530000 cmp r3, #0 a0003144: 0a000002 beq a0003154 a0003148: e59430b4 ldr r3, [r4, #180] ; 0xb4 a000314c: e3530002 cmp r3, #2 a0003150: 1a000001 bne a000315c (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)) rtems_semaphore_delete (tty->rawInBuf.Semaphore); a0003154: e5940068 ldr r0, [r4, #104] ; 0x68 a0003158: eb00072f bl a0004e1c free (tty->rawInBuf.theBuf); a000315c: e5940058 ldr r0, [r4, #88] ; 0x58 a0003160: ebfffad3 bl a0001cb4 free (tty->rawOutBuf.theBuf); a0003164: e594007c ldr r0, [r4, #124] ; 0x7c a0003168: ebfffad1 bl a0001cb4 free (tty->cbuf); a000316c: e594001c ldr r0, [r4, #28] a0003170: ebfffacf bl a0001cb4 free (tty); a0003174: e1a00004 mov r0, r4 a0003178: ebfffacd bl a0001cb4 } rtems_semaphore_release (rtems_termios_ttyMutex); a000317c: e59f300c ldr r3, [pc, #12] ; a0003190 a0003180: e5930000 ldr r0, [r3] a0003184: eb000791 bl a0004fd0 return RTEMS_SUCCESSFUL; } a0003188: e3a00000 mov r0, #0 a000318c: e8bd8030 pop {r4, r5, pc} =============================================================================== a0004518 : rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a0004518: e5902090 ldr r2, [r0, #144] ; 0x90 * for each transmitted character. * It returns number of characters left to transmit */ int rtems_termios_dequeue_characters (void *ttyp, int len) { a000451c: e52de004 push {lr} ; (str lr, [sp, #-4]!) rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a0004520: e0822001 add r2, r2, r1 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0004524: e59010b4 ldr r1, [r0, #180] ; 0xb4 rtems_status_code sc; /* * sum up character count already sent */ tty->t_dqlen += len; a0004528: e5802090 str r2, [r0, #144] ; 0x90 if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a000452c: e3510002 cmp r1, #2 a0004530: 1a000004 bne a0004548 /* * send wake up to transmitter task */ sc = rtems_event_send(tty->txTaskId, TERMIOS_TX_START_EVENT); a0004534: e59000c8 ldr r0, [r0, #200] ; 0xc8 a0004538: eb00014c bl a0004a70 if (sc != RTEMS_SUCCESSFUL) a000453c: e2503000 subs r3, r0, #0 a0004540: 0a00000c beq a0004578 rtems_fatal_error_occurred (sc); a0004544: eb0003f1 bl a0005510 <== NOT EXECUTED return 0; /* nothing to output in IRQ... */ } if (tty->t_line == PPPDISC ) { a0004548: e59030cc ldr r3, [r0, #204] ; 0xcc a000454c: e3530005 cmp r3, #5 a0004550: 1a000006 bne a0004570 /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a0004554: e59f3024 ldr r3, [pc, #36] ; a0004580 a0004558: e59330b4 ldr r3, [r3, #180] ; 0xb4 a000455c: e3530000 cmp r3, #0 a0004560: 0a000004 beq a0004578 rtems_termios_linesw[tty->t_line].l_start(tty); a0004564: e12fff33 blx r3 } return 0; /* nothing to output in IRQ... */ a0004568: e3a03000 mov r3, #0 a000456c: ea000001 b a0004578 } return rtems_termios_refill_transmitter(tty); } a0004570: 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); a0004574: eaffff5a b a00042e4 } a0004578: e1a00003 mov r0, r3 a000457c: e49df004 pop {pc} ; (ldr pc, [sp], #4) =============================================================================== a0003fe4 : * 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) { a0003fe4: 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) { a0003fe8: e59030cc ldr r3, [r0, #204] ; 0xcc a0003fec: e59f7280 ldr r7, [pc, #640] ; a0004274 * 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) { a0003ff0: e1a04000 mov r4, r0 a0003ff4: 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) { a0003ff8: e0873283 add r3, r7, r3, lsl #5 a0003ffc: e5939010 ldr r9, [r3, #16] a0004000: e3590000 cmp r9, #0 a0004004: 11a05002 movne r5, r2 a0004008: 1a00000d bne a0004044 /* * 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); a000400c: e2803030 add r3, r0, #48 ; 0x30 a0004010: 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, a0004014: 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) { a0004018: e1a0a002 mov sl, r2 a000401c: 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, a0004020: e58d3004 str r3, [sp, #4] a0004024: ea000089 b a0004250 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); a0004028: e59430cc ldr r3, [r4, #204] ; 0xcc a000402c: e4d60001 ldrb r0, [r6], #1 a0004030: e1a01004 mov r1, r4 a0004034: e0873283 add r3, r7, r3, lsl #5 a0004038: e5933010 ldr r3, [r3, #16] a000403c: e12fff33 blx r3 a0004040: 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--) { a0004044: e3550000 cmp r5, #0 a0004048: 1afffff6 bne a0004028 } /* * check to see if rcv wakeup callback was set */ if (( !tty->tty_rcvwakeup ) && ( tty->tty_rcv.sw_pfn != NULL )) { a000404c: e59430e4 ldr r3, [r4, #228] ; 0xe4 a0004050: e3530000 cmp r3, #0 a0004054: 1a000084 bne a000426c a0004058: e59430dc ldr r3, [r4, #220] ; 0xdc a000405c: e3530000 cmp r3, #0 a0004060: 0a000081 beq a000426c (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); a0004064: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED a0004068: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED a000406c: e12fff33 blx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; a0004070: e3a03001 mov r3, #1 <== NOT EXECUTED a0004074: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED a0004078: ea00007b b a000426c <== 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) { a000407c: e59430b8 ldr r3, [r4, #184] ; 0xb8 } return 0; } while (len--) { c = *buf++; a0004080: e4d68001 ldrb r8, [r6], #1 /* FIXME: implement IXANY: any character restarts output */ /* if incoming XON/XOFF controls outgoing stream: */ if (tty->flow_ctrl & FL_MDXON) { a0004084: e3130c02 tst r3, #512 ; 0x200 a0004088: 0a00000f beq a00040cc /* if received char is V_STOP and V_START (both are equal value) */ if (c == tty->termios.c_cc[VSTOP]) { a000408c: e5d4204a ldrb r2, [r4, #74] ; 0x4a a0004090: e5d43049 ldrb r3, [r4, #73] ; 0x49 a0004094: e1520008 cmp r2, r8 a0004098: 1a000007 bne a00040bc if (c == tty->termios.c_cc[VSTART]) { a000409c: e1530002 cmp r3, r2 <== NOT EXECUTED /* received VSTOP and VSTART==VSTOP? */ /* then toggle "stop output" status */ tty->flow_ctrl = tty->flow_ctrl ^ FL_ORCVXOF; a00040a0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; a00040a4: 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; a00040a8: 02233010 eoreq r3, r3, #16 <== NOT EXECUTED } else { /* VSTOP received (other code than VSTART) */ /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; a00040ac: 13833010 orrne r3, r3, #16 <== NOT EXECUTED a00040b0: 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) { a00040b4: e3a09001 mov r9, #1 <== NOT EXECUTED a00040b8: ea000005 b a00040d4 <== NOT EXECUTED /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { a00040bc: e1530008 cmp r3, r8 /* VSTART received */ /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; a00040c0: 059430b8 ldreq r3, [r4, #184] ; 0xb8 a00040c4: 03c33010 biceq r3, r3, #16 /* stop output */ tty->flow_ctrl |= FL_ORCVXOF; } flow_rcv = true; } else if (c == tty->termios.c_cc[VSTART]) { a00040c8: 0afffff8 beq a00040b0 /* restart output */ tty->flow_ctrl &= ~FL_ORCVXOF; flow_rcv = true; } } if (flow_rcv) { a00040cc: e3590000 cmp r9, #0 a00040d0: 0a000014 beq a0004128 /* restart output according to FL_ORCVXOF flag */ if ((tty->flow_ctrl & (FL_ORCVXOF | FL_OSTOP)) == FL_OSTOP) { a00040d4: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00040d8: e2033030 and r3, r3, #48 ; 0x30 <== NOT EXECUTED a00040dc: e3530020 cmp r3, #32 <== NOT EXECUTED a00040e0: 1a000059 bne a000424c <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); a00040e4: ebfffa97 bl a0002b48 <== NOT EXECUTED a00040e8: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; a00040ec: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00040f0: e3c33020 bic r3, r3, #32 <== NOT EXECUTED a00040f4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a00040f8: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a00040fc: e3530000 cmp r3, #0 <== NOT EXECUTED a0004100: 0a000006 beq a0004120 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail], 1); a0004104: e5942084 ldr r2, [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)( a0004108: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED a000410c: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0004110: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0004114: e0811002 add r1, r1, r2 <== NOT EXECUTED a0004118: e3a02001 mov r2, #1 <== NOT EXECUTED a000411c: e12fff33 blx r3 <== NOT EXECUTED a0004120: e129f007 msr CPSR_fc, r7 <== NOT EXECUTED a0004124: ea000048 b a000424c <== NOT EXECUTED } /* reenable interrupts */ rtems_interrupt_enable(level); } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; a0004128: e5940060 ldr r0, [r4, #96] ; 0x60 a000412c: e5941064 ldr r1, [r4, #100] ; 0x64 a0004130: e2800001 add r0, r0, #1 a0004134: eb002d35 bl a000f610 <__umodsi3> a0004138: e1a07000 mov r7, r0 /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); a000413c: ebfffa81 bl a0002b48 a0004140: e1a0b000 mov fp, r0 if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) a0004144: e594305c ldr r3, [r4, #92] ; 0x5c a0004148: e5940064 ldr r0, [r4, #100] ; 0x64 % tty->rawInBuf.Size) > tty->highwater) && a000414c: e5941064 ldr r1, [r4, #100] ; 0x64 } } else { newTail = (tty->rawInBuf.Tail + 1) % tty->rawInBuf.Size; /* if chars_in_buffer > highwater */ rtems_interrupt_disable(level); if ((((newTail - tty->rawInBuf.Head + tty->rawInBuf.Size) a0004150: e0630000 rsb r0, r3, r0 % tty->rawInBuf.Size) > tty->highwater) && a0004154: e0800007 add r0, r0, r7 a0004158: eb002d2c bl a000f610 <__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) a000415c: e59430c0 ldr r3, [r4, #192] ; 0xc0 a0004160: e1500003 cmp r0, r3 a0004164: 9a000025 bls a0004200 % tty->rawInBuf.Size) > tty->highwater) && !(tty->flow_ctrl & FL_IREQXOF)) { a0004168: 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) && a000416c: e3130001 tst r3, #1 <== NOT EXECUTED a0004170: 1a000022 bne a0004200 <== NOT EXECUTED !(tty->flow_ctrl & FL_IREQXOF)) { /* incoming data stream should be stopped */ tty->flow_ctrl |= FL_IREQXOF; a0004174: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004178: e3833001 orr r3, r3, #1 <== NOT EXECUTED a000417c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED if ((tty->flow_ctrl & (FL_MDXOF | FL_ISNTXOF)) a0004180: e59420b8 ldr r2, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004184: e59f30ec ldr r3, [pc, #236] ; a0004278 <== NOT EXECUTED a0004188: e0023003 and r3, r2, r3 <== NOT EXECUTED a000418c: e3530b01 cmp r3, #1024 ; 0x400 <== NOT EXECUTED a0004190: 1a00000e bne a00041d0 <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || a0004194: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004198: e3130020 tst r3, #32 <== NOT EXECUTED a000419c: 1a000002 bne a00041ac <== NOT EXECUTED a00041a0: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a00041a4: e3530000 cmp r3, #0 <== NOT EXECUTED a00041a8: 1a000014 bne a0004200 <== 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; a00041ac: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, a00041b0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00041b4: e59d1004 ldr r1, [sp, #4] <== NOT EXECUTED == (FL_MDXOF ) ) { if ((tty->flow_ctrl & FL_OSTOP) || (tty->rawOutBufState == rob_idle)) { /* if tx is stopped due to XOFF or out of data */ /* call write function here */ tty->flow_ctrl |= FL_ISNTXOF; a00041b8: e3833002 orr r3, r3, #2 <== NOT EXECUTED a00041bc: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED (*tty->device.write)(tty->minor, a00041c0: e3a02001 mov r2, #1 <== NOT EXECUTED a00041c4: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a00041c8: e12fff33 blx r3 <== NOT EXECUTED a00041cc: ea00000b b a0004200 <== NOT EXECUTED (void *)&(tty->termios.c_cc[VSTOP]), 1); } } else if ((tty->flow_ctrl & (FL_MDRTS | FL_IRTSOFF)) == (FL_MDRTS) ) { a00041d0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00041d4: e2033f41 and r3, r3, #260 ; 0x104 <== NOT EXECUTED a00041d8: e3530c01 cmp r3, #256 ; 0x100 <== NOT EXECUTED a00041dc: 1a000007 bne a0004200 <== NOT EXECUTED tty->flow_ctrl |= FL_IRTSOFF; a00041e0: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00041e4: e3833004 orr r3, r3, #4 <== NOT EXECUTED a00041e8: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* deactivate RTS line */ if (tty->device.stopRemoteTx != NULL) { a00041ec: e59430ac ldr r3, [r4, #172] ; 0xac <== NOT EXECUTED a00041f0: e3530000 cmp r3, #0 <== NOT EXECUTED a00041f4: 0a000001 beq a0004200 <== NOT EXECUTED tty->device.stopRemoteTx(tty->minor); a00041f8: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00041fc: e12fff33 blx r3 <== NOT EXECUTED a0004200: e129f00b msr CPSR_fc, fp } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { a0004204: e594305c ldr r3, [r4, #92] ; 0x5c a0004208: e1570003 cmp r7, r3 dropped++; a000420c: 02855001 addeq r5, r5, #1 } /* reenable interrupts */ rtems_interrupt_enable(level); if (newTail == tty->rawInBuf.Head) { a0004210: 0a00000d beq a000424c dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; a0004214: e5943058 ldr r3, [r4, #88] ; 0x58 a0004218: e7c38007 strb r8, [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 )) { a000421c: e59430e4 ldr r3, [r4, #228] ; 0xe4 if (newTail == tty->rawInBuf.Head) { dropped++; } else { tty->rawInBuf.theBuf[newTail] = c; tty->rawInBuf.Tail = newTail; a0004220: 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 )) { a0004224: e3530000 cmp r3, #0 a0004228: 1a000007 bne a000424c a000422c: e59430dc ldr r3, [r4, #220] ; 0xdc a0004230: e3530000 cmp r3, #0 a0004234: 0a000004 beq a000424c (*tty->tty_rcv.sw_pfn)(&tty->termios, tty->tty_rcv.sw_arg); a0004238: e59d0000 ldr r0, [sp] <== NOT EXECUTED a000423c: e59410e0 ldr r1, [r4, #224] ; 0xe0 <== NOT EXECUTED a0004240: e12fff33 blx r3 <== NOT EXECUTED tty->tty_rcvwakeup = 1; a0004244: e3a03001 mov r3, #1 <== NOT EXECUTED a0004248: e58430e4 str r3, [r4, #228] ; 0xe4 <== NOT EXECUTED a000424c: e24aa001 sub sl, sl, #1 tty->tty_rcvwakeup = 1; } return 0; } while (len--) { a0004250: e35a0000 cmp sl, #0 a0004254: 1affff88 bne a000407c } } } } tty->rawInBufDropped += dropped; a0004258: e5943078 ldr r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); a000425c: e5940068 ldr r0, [r4, #104] ; 0x68 } } } } tty->rawInBufDropped += dropped; a0004260: e0833005 add r3, r3, r5 a0004264: e5843078 str r3, [r4, #120] ; 0x78 rtems_semaphore_release (tty->rawInBuf.Semaphore); a0004268: eb000358 bl a0004fd0 return dropped; } a000426c: e1a00005 mov r0, r5 a0004270: e8bd8ffc pop {r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a00031b8 : rtems_status_code rtems_termios_ioctl (void *arg) { rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a00031b8: e5903000 ldr r3, [r0] } } rtems_status_code rtems_termios_ioctl (void *arg) { a00031bc: e92d41f0 push {r4, r5, r6, r7, r8, lr} rtems_libio_ioctl_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a00031c0: e5934034 ldr r4, [r3, #52] ; 0x34 struct ttywakeup *wakeup = (struct ttywakeup *)args->buffer; rtems_status_code sc; args->ioctl_return = 0; a00031c4: 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; a00031c8: e5907008 ldr r7, [r0, #8] rtems_status_code sc; args->ioctl_return = 0; a00031cc: e580100c str r1, [r0, #12] } } rtems_status_code rtems_termios_ioctl (void *arg) { a00031d0: 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); a00031d4: e1a02001 mov r2, r1 a00031d8: e5940018 ldr r0, [r4, #24] a00031dc: eb000735 bl a0004eb8 if (sc != RTEMS_SUCCESSFUL) { a00031e0: e2506000 subs r6, r0, #0 a00031e4: 1a0000d0 bne a000352c args->ioctl_return = sc; return sc; } switch (args->command) { a00031e8: e5953004 ldr r3, [r5, #4] a00031ec: e3530004 cmp r3, #4 a00031f0: 0a0000a6 beq a0003490 a00031f4: 8a000005 bhi a0003210 a00031f8: e3530002 cmp r3, #2 a00031fc: 0a000028 beq a00032a4 a0003200: 8a00009b bhi a0003474 a0003204: e3530001 cmp r3, #1 a0003208: 1a000010 bne a0003250 a000320c: ea00001a b a000327c a0003210: e59f2320 ldr r2, [pc, #800] ; a0003538 a0003214: e1530002 cmp r3, r2 a0003218: 0a0000b6 beq a00034f8 a000321c: 8a000002 bhi a000322c a0003220: e3530005 cmp r3, #5 a0003224: 1a000009 bne a0003250 a0003228: ea000094 b a0003480 <== NOT EXECUTED a000322c: e59f2308 ldr r2, [pc, #776] ; a000353c a0003230: 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; a0003234: 05953008 ldreq r3, [r5, #8] a0003238: 059420cc ldreq r2, [r4, #204] ; 0xcc a000323c: 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) { a0003240: 0a0000b7 beq a0003524 a0003244: e2822105 add r2, r2, #1073741825 ; 0x40000001 a0003248: e1530002 cmp r3, r2 a000324c: 0a000093 beq a00034a0 default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { a0003250: e59420cc ldr r2, [r4, #204] ; 0xcc a0003254: e59f32e4 ldr r3, [pc, #740] ; a0003540 a0003258: e0833282 add r3, r3, r2, lsl #5 a000325c: e5933018 ldr r3, [r3, #24] a0003260: e3530000 cmp r3, #0 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); } else { sc = RTEMS_INVALID_NUMBER; a0003264: 03a0600a moveq r6, #10 args->ioctl_return = sc; return sc; } switch (args->command) { default: if (rtems_termios_linesw[tty->t_line].l_ioctl != NULL) { a0003268: 0a0000ad beq a0003524 sc = rtems_termios_linesw[tty->t_line].l_ioctl(tty,args); a000326c: e1a00004 mov r0, r4 a0003270: e1a01005 mov r1, r5 a0003274: e12fff33 blx r3 a0003278: ea00009c b a00034f0 sc = RTEMS_INVALID_NUMBER; } break; case RTEMS_IO_GET_ATTRIBUTES: *(struct termios *)args->buffer = tty->termios; a000327c: e5957008 ldr r7, [r5, #8] a0003280: e284c030 add ip, r4, #48 ; 0x30 a0003284: e8bc000f ldm ip!, {r0, r1, r2, r3} a0003288: e1a0e007 mov lr, r7 a000328c: e8ae000f stmia lr!, {r0, r1, r2, r3} a0003290: e8bc000f ldm ip!, {r0, r1, r2, r3} a0003294: e8ae000f stmia lr!, {r0, r1, r2, r3} a0003298: e59c3000 ldr r3, [ip] a000329c: e58e3000 str r3, [lr] break; a00032a0: ea00009f b a0003524 case RTEMS_IO_SET_ATTRIBUTES: tty->termios = *(struct termios *)args->buffer; a00032a4: e595e008 ldr lr, [r5, #8] a00032a8: e284c030 add ip, r4, #48 ; 0x30 a00032ac: e8be000f ldm lr!, {r0, r1, r2, r3} a00032b0: e8ac000f stmia ip!, {r0, r1, r2, r3} a00032b4: e8be000f ldm lr!, {r0, r1, r2, r3} a00032b8: e8ac000f stmia ip!, {r0, r1, r2, r3} a00032bc: e59e3000 ldr r3, [lr] a00032c0: 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) && a00032c4: e59430b8 ldr r3, [r4, #184] ; 0xb8 a00032c8: e3130c02 tst r3, #512 ; 0x200 a00032cc: 0a000018 beq a0003334 !(tty->termios.c_iflag & IXON)) { a00032d0: 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) && a00032d4: e3130b01 tst r3, #1024 ; 0x400 a00032d8: 1a000015 bne a0003334 !(tty->termios.c_iflag & IXON)) { /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXON | FL_ORCVXOF); a00032dc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00032e0: e3c33e21 bic r3, r3, #528 ; 0x210 <== NOT EXECUTED a00032e4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* has output been stopped due to received XOFF? */ if (tty->flow_ctrl & FL_OSTOP) { a00032e8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00032ec: e3130020 tst r3, #32 <== NOT EXECUTED a00032f0: 0a00000f beq a0003334 <== NOT EXECUTED /* disable interrupts */ rtems_interrupt_disable(level); a00032f4: ebfffe13 bl a0002b48 <== NOT EXECUTED a00032f8: e1a07000 mov r7, r0 <== NOT EXECUTED tty->flow_ctrl &= ~FL_OSTOP; a00032fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003300: e3c33020 bic r3, r3, #32 <== NOT EXECUTED a0003304: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* check for chars in output buffer (or rob_state?) */ if (tty->rawOutBufState != rob_idle) { a0003308: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a000330c: e3530000 cmp r3, #0 <== NOT EXECUTED a0003310: 0a000006 beq a0003330 <== NOT EXECUTED /* if chars available, call write function... */ (*tty->device.write)( tty->minor, &tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); a0003314: e5942084 ldr r2, [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)( a0003318: e594107c ldr r1, [r4, #124] ; 0x7c <== NOT EXECUTED a000331c: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0003320: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0003324: e0811002 add r1, r1, r2 <== NOT EXECUTED a0003328: e3a02001 mov r2, #1 <== NOT EXECUTED a000332c: e12fff33 blx r3 <== NOT EXECUTED a0003330: 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)) { a0003334: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003338: e3130b01 tst r3, #1024 ; 0x400 a000333c: 0a000008 beq a0003364 a0003340: e5943030 ldr r3, [r4, #48] ; 0x30 <== NOT EXECUTED a0003344: e3130a01 tst r3, #4096 ; 0x1000 <== NOT EXECUTED a0003348: 1a000005 bne a0003364 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDXOF); a000334c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003350: e3c33b01 bic r3, r3, #1024 ; 0x400 <== NOT EXECUTED a0003354: 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); a0003358: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a000335c: e3c33002 bic r3, r3, #2 <== NOT EXECUTED a0003360: 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)) { a0003364: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003368: e3130c01 tst r3, #256 ; 0x100 a000336c: 0a000010 beq a00033b4 a0003370: e5943038 ldr r3, [r4, #56] ; 0x38 <== NOT EXECUTED a0003374: e3530000 cmp r3, #0 <== NOT EXECUTED a0003378: ba00000d blt a00033b4 <== NOT EXECUTED /* clear related flags in flow_ctrl */ tty->flow_ctrl &= ~(FL_MDRTS); a000337c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003380: e3c33c01 bic r3, r3, #256 ; 0x100 <== NOT EXECUTED a0003384: 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)) { a0003388: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a000338c: e3130004 tst r3, #4 <== NOT EXECUTED a0003390: 0a000004 beq a00033a8 <== NOT EXECUTED a0003394: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED a0003398: e3530000 cmp r3, #0 <== NOT EXECUTED a000339c: 0a000001 beq a00033a8 <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); a00033a0: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a00033a4: e12fff33 blx r3 <== NOT EXECUTED } tty->flow_ctrl &= ~(FL_IRTSOFF); a00033a8: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a00033ac: e3c33004 bic r3, r3, #4 <== NOT EXECUTED a00033b0: 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) { a00033b4: e5943038 ldr r3, [r4, #56] ; 0x38 tty->termios = *(struct termios *)args->buffer; /* check for and process change in flow control options */ termios_set_flowctrl(tty); if (tty->termios.c_lflag & ICANON) { a00033b8: e594703c ldr r7, [r4, #60] ; 0x3c /* * check for flow control options to be switched on */ /* check for incoming RTS/CTS flow control switched on */ if (tty->termios.c_cflag & CRTSCTS) { a00033bc: e3530000 cmp r3, #0 tty->flow_ctrl |= FL_MDRTS; a00033c0: b59430b8 ldrlt r3, [r4, #184] ; 0xb8 a00033c4: b3833c01 orrlt r3, r3, #256 ; 0x100 a00033c8: b58430b8 strlt r3, [r4, #184] ; 0xb8 } /* check for incoming XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXOFF) { a00033cc: e5943030 ldr r3, [r4, #48] ; 0x30 a00033d0: e3130a01 tst r3, #4096 ; 0x1000 tty->flow_ctrl |= FL_MDXOF; a00033d4: 159420b8 ldrne r2, [r4, #184] ; 0xb8 a00033d8: 13822b01 orrne r2, r2, #1024 ; 0x400 a00033dc: 158420b8 strne r2, [r4, #184] ; 0xb8 } /* check for outgoing XON/XOF flow control switched on */ if (tty->termios.c_iflag & IXON) { a00033e0: e3130b01 tst r3, #1024 ; 0x400 tty->flow_ctrl |= FL_MDXON; a00033e4: 159430b8 ldrne r3, [r4, #184] ; 0xb8 a00033e8: 13833c02 orrne r3, r3, #512 ; 0x200 a00033ec: 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) { a00033f0: e2177002 ands r7, r7, #2 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; a00033f4: 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) { a00033f8: 1a000013 bne a000344c tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * a00033fc: e5d48046 ldrb r8, [r4, #70] ; 0x46 rtems_clock_get_ticks_per_second() / 10; a0003400: eb000518 bl a0004868 a0003404: e3a0100a mov r1, #10 a0003408: e0000098 mul r0, r8, r0 a000340c: eb002fe7 bl a000f3b0 <__aeabi_uidiv> if (tty->termios.c_cc[VTIME]) { a0003410: e5d43046 ldrb r3, [r4, #70] ; 0x46 if (tty->termios.c_lflag & ICANON) { tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->vtimeTicks = tty->termios.c_cc[VTIME] * a0003414: e5840054 str r0, [r4, #84] ; 0x54 a0003418: e5d42047 ldrb r2, [r4, #71] ; 0x47 rtems_clock_get_ticks_per_second() / 10; if (tty->termios.c_cc[VTIME]) { a000341c: e3530000 cmp r3, #0 a0003420: 0a000005 beq a000343c tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a0003424: 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; a0003428: e5840070 str r0, [r4, #112] ; 0x70 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a000342c: 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; a0003430: e584706c str r7, [r4, #108] ; 0x6c <== NOT EXECUTED tty->rawInBufSemaphoreTimeout = tty->vtimeTicks; if (tty->termios.c_cc[VMIN]) tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a0003434: e5840074 str r0, [r4, #116] ; 0x74 <== NOT EXECUTED a0003438: ea000006 b a0003458 <== NOT EXECUTED else tty->rawInBufSemaphoreFirstTimeout = tty->vtimeTicks; } else { if (tty->termios.c_cc[VMIN]) { a000343c: e3520000 cmp r2, #0 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; a0003440: 03a03001 moveq r3, #1 a0003444: 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]) { a0003448: 0a000002 beq a0003458 tty->rawInBufSemaphoreOptions = RTEMS_WAIT; a000344c: e584306c str r3, [r4, #108] ; 0x6c tty->rawInBufSemaphoreTimeout = RTEMS_NO_TIMEOUT; a0003450: e5843070 str r3, [r4, #112] ; 0x70 tty->rawInBufSemaphoreFirstTimeout = RTEMS_NO_TIMEOUT; a0003454: e5843074 str r3, [r4, #116] ; 0x74 } else { tty->rawInBufSemaphoreOptions = RTEMS_NO_WAIT; } } } if (tty->device.setAttributes) a0003458: e59430a8 ldr r3, [r4, #168] ; 0xa8 a000345c: e3530000 cmp r3, #0 a0003460: 0a00002f beq a0003524 (*tty->device.setAttributes)(tty->minor, &tty->termios); a0003464: e5940010 ldr r0, [r4, #16] a0003468: e2841030 add r1, r4, #48 ; 0x30 a000346c: e12fff33 blx r3 a0003470: ea00002b b a0003524 break; case RTEMS_IO_TCDRAIN: drainOutput (tty); a0003474: e1a00004 mov r0, r4 a0003478: ebfffdb6 bl a0002b58 break; a000347c: ea000028 b a0003524 case RTEMS_IO_SNDWAKEUP: tty->tty_snd = *wakeup; a0003480: e897000c ldm r7, {r2, r3} <== NOT EXECUTED a0003484: e58420d4 str r2, [r4, #212] ; 0xd4 <== NOT EXECUTED a0003488: e58430d8 str r3, [r4, #216] ; 0xd8 <== NOT EXECUTED break; a000348c: ea000024 b a0003524 <== NOT EXECUTED case RTEMS_IO_RCVWAKEUP: tty->tty_rcv = *wakeup; a0003490: e897000c ldm r7, {r2, r3} <== NOT EXECUTED a0003494: e58420dc str r2, [r4, #220] ; 0xdc <== NOT EXECUTED a0003498: e58430e0 str r3, [r4, #224] ; 0xe0 <== NOT EXECUTED break; a000349c: ea000020 b a0003524 <== NOT EXECUTED #if 1 /* FIXME */ case TIOCSETD: /* * close old line discipline */ if (rtems_termios_linesw[tty->t_line].l_close != NULL) { a00034a0: e59420cc ldr r2, [r4, #204] ; 0xcc a00034a4: e59f3094 ldr r3, [pc, #148] ; a0003540 a00034a8: e0833282 add r3, r3, r2, lsl #5 a00034ac: e5933004 ldr r3, [r3, #4] a00034b0: e3530000 cmp r3, #0 a00034b4: 0a000002 beq a00034c4 sc = rtems_termios_linesw[tty->t_line].l_close(tty); a00034b8: e1a00004 mov r0, r4 a00034bc: e12fff33 blx r3 a00034c0: e1a06000 mov r6, r0 } tty->t_line=*(int*)(args->buffer); a00034c4: e5953008 ldr r3, [r5, #8] tty->t_sc = NULL; /* ensure that no more valid data */ a00034c8: 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); a00034cc: e5933000 ldr r3, [r3] tty->t_sc = NULL; /* ensure that no more valid data */ a00034d0: e58420d0 str r2, [r4, #208] ; 0xd0 /* * open new line discipline */ if (rtems_termios_linesw[tty->t_line].l_open != NULL) { a00034d4: e59f2064 ldr r2, [pc, #100] ; a0003540 * 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); a00034d8: 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) { a00034dc: e7923283 ldr r3, [r2, r3, lsl #5] a00034e0: e3530000 cmp r3, #0 a00034e4: 0a00000e beq a0003524 sc = rtems_termios_linesw[tty->t_line].l_open(tty); a00034e8: e1a00004 mov r0, r4 a00034ec: e12fff33 blx r3 a00034f0: e1a06000 mov r6, r0 a00034f4: ea00000a b a0003524 case TIOCGETD: *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; a00034f8: e5942060 ldr r2, [r4, #96] ; 0x60 <== NOT EXECUTED a00034fc: e594305c ldr r3, [r4, #92] ; 0x5c <== NOT EXECUTED if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; a0003500: e5940020 ldr r0, [r4, #32] <== NOT EXECUTED a0003504: e5941024 ldr r1, [r4, #36] ; 0x24 <== NOT EXECUTED *(int*)(args->buffer)=tty->t_line; break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) a0003508: e0523003 subs r3, r2, r3 <== NOT EXECUTED rawnc += tty->rawInBuf.Size; a000350c: 45942064 ldrmi r2, [r4, #100] ; 0x64 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; a0003510: e0611000 rsb r1, r1, r0 <== NOT EXECUTED break; #endif case FIONREAD: { int rawnc = tty->rawInBuf.Tail - tty->rawInBuf.Head; if ( rawnc < 0 ) rawnc += tty->rawInBuf.Size; a0003514: 40833002 addmi r3, r3, r2 <== NOT EXECUTED /* Half guess that this is the right operation */ *(int *)args->buffer = tty->ccount - tty->cindex + rawnc; a0003518: e5952008 ldr r2, [r5, #8] <== NOT EXECUTED a000351c: e0813003 add r3, r1, r3 <== NOT EXECUTED a0003520: e5823000 str r3, [r2] <== NOT EXECUTED } break; } rtems_semaphore_release (tty->osem); a0003524: e5940018 ldr r0, [r4, #24] a0003528: eb0006a8 bl a0004fd0 args->ioctl_return = sc; a000352c: e585600c str r6, [r5, #12] return sc; } a0003530: e1a00006 mov r0, r6 a0003534: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0002bb8 : rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { a0002bb8: e92d4fff push {r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, sl, fp, lr} a0002bbc: e58d300c str r3, [sp, #12] struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( a0002bc0: e59f3404 ldr r3, [pc, #1028] ; a0002fcc rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { a0002bc4: e1a0a001 mov sl, r1 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( a0002bc8: e3a01000 mov r1, #0 rtems_device_major_number major, rtems_device_minor_number minor, void *arg, const rtems_termios_callbacks *callbacks ) { a0002bcc: e1a09000 mov r9, r0 a0002bd0: e1a08002 mov r8, r2 struct rtems_termios_tty *tty; /* * See if the device has already been opened */ sc = rtems_semaphore_obtain( a0002bd4: e5930000 ldr r0, [r3] a0002bd8: e1a02001 mov r2, r1 a0002bdc: eb0008b5 bl a0004eb8 rtems_termios_ttyMutex, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a0002be0: e2506000 subs r6, r0, #0 a0002be4: 1a0000ee bne a0002fa4 return sc; for (tty = rtems_termios_ttyHead ; tty != NULL ; tty = tty->forw) { a0002be8: e59f33e0 ldr r3, [pc, #992] ; a0002fd0 a0002bec: e5937000 ldr r7, [r3] a0002bf0: e1a05007 mov r5, r7 a0002bf4: ea000006 b a0002c14 if ((tty->major == major) && (tty->minor == minor)) a0002bf8: e595300c ldr r3, [r5, #12] a0002bfc: e1530009 cmp r3, r9 a0002c00: 1a000002 bne a0002c10 a0002c04: e5953010 ldr r3, [r5, #16] a0002c08: e153000a cmp r3, sl a0002c0c: 0a0000c3 beq a0002f20 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) { a0002c10: e5955000 ldr r5, [r5] a0002c14: e3550000 cmp r5, #0 a0002c18: 1afffff6 bne a0002bf8 a0002c1c: ea0000e3 b a0002fb0 return RTEMS_NO_MEMORY; } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; a0002c20: e59f23ac ldr r2, [pc, #940] ; a0002fd4 a0002c24: e5923000 ldr r3, [r2] a0002c28: e5853064 str r3, [r5, #100] ; 0x64 tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); a0002c2c: e5950064 ldr r0, [r5, #100] ; 0x64 a0002c30: e58d2008 str r2, [sp, #8] a0002c34: ebfffcfc bl a000202c if (tty->rawInBuf.theBuf == NULL) { a0002c38: e3500000 cmp r0, #0 } /* * allocate raw input buffer */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); a0002c3c: e1a0b000 mov fp, r0 a0002c40: e5850058 str r0, [r5, #88] ; 0x58 if (tty->rawInBuf.theBuf == NULL) { a0002c44: e59d2008 ldr r2, [sp, #8] a0002c48: 1a000006 bne a0002c68 free(tty); a0002c4c: e1a00005 mov r0, r5 <== NOT EXECUTED a0002c50: ebfffc17 bl a0001cb4 <== NOT EXECUTED rtems_semaphore_release (rtems_termios_ttyMutex); a0002c54: e59f3370 ldr r3, [pc, #880] ; a0002fcc <== NOT EXECUTED return RTEMS_NO_MEMORY; a0002c58: e3a0601a mov r6, #26 <== NOT EXECUTED */ tty->rawInBuf.Size = RAW_INPUT_BUFFER_SIZE; tty->rawInBuf.theBuf = malloc (tty->rawInBuf.Size); if (tty->rawInBuf.theBuf == NULL) { free(tty); rtems_semaphore_release (rtems_termios_ttyMutex); a0002c5c: e5930000 ldr r0, [r3] <== NOT EXECUTED a0002c60: eb0008da bl a0004fd0 <== NOT EXECUTED return RTEMS_NO_MEMORY; a0002c64: ea0000ce b a0002fa4 <== NOT EXECUTED } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; a0002c68: e5923004 ldr r3, [r2, #4] a0002c6c: e5853088 str r3, [r5, #136] ; 0x88 tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); a0002c70: e5950088 ldr r0, [r5, #136] ; 0x88 a0002c74: e58d2008 str r2, [sp, #8] a0002c78: ebfffceb bl a000202c if (tty->rawOutBuf.theBuf == NULL) { a0002c7c: e3500000 cmp r0, #0 } /* * allocate raw output buffer */ tty->rawOutBuf.Size = RAW_OUTPUT_BUFFER_SIZE; tty->rawOutBuf.theBuf = malloc (tty->rawOutBuf.Size); a0002c80: e1a03000 mov r3, r0 a0002c84: e585007c str r0, [r5, #124] ; 0x7c if (tty->rawOutBuf.theBuf == NULL) { a0002c88: e59d2008 ldr r2, [sp, #8] a0002c8c: 0a000008 beq a0002cb4 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); a0002c90: e5920008 ldr r0, [r2, #8] a0002c94: e58d3008 str r3, [sp, #8] a0002c98: ebfffce3 bl a000202c if (tty->cbuf == NULL) { a0002c9c: e3500000 cmp r0, #0 return RTEMS_NO_MEMORY; } /* * allocate cooked buffer */ tty->cbuf = malloc (CBUFSIZE); a0002ca0: e585001c str r0, [r5, #28] if (tty->cbuf == NULL) { a0002ca4: e59d3008 ldr r3, [sp, #8] a0002ca8: 1a000004 bne a0002cc0 free((void *)(tty->rawOutBuf.theBuf)); a0002cac: e1a00003 mov r0, r3 <== NOT EXECUTED a0002cb0: ebfffbff bl a0001cb4 <== NOT EXECUTED free((void *)(tty->rawInBuf.theBuf)); a0002cb4: e1a0000b mov r0, fp <== NOT EXECUTED a0002cb8: ebfffbfd bl a0001cb4 <== NOT EXECUTED a0002cbc: eaffffe2 b a0002c4c <== NOT EXECUTED return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; a0002cc0: e3a03000 mov r3, #0 /* * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; a0002cc4: e5853004 str r3, [r5, #4] if (rtems_termios_ttyHead != NULL) a0002cc8: e1570003 cmp r7, r3 return RTEMS_NO_MEMORY; } /* * Initialize wakeup callbacks */ tty->tty_snd.sw_pfn = NULL; a0002ccc: e58530d4 str r3, [r5, #212] ; 0xd4 tty->tty_snd.sw_arg = NULL; a0002cd0: e58530d8 str r3, [r5, #216] ; 0xd8 tty->tty_rcv.sw_pfn = NULL; a0002cd4: e58530dc str r3, [r5, #220] ; 0xdc tty->tty_rcv.sw_arg = NULL; a0002cd8: e58530e0 str r3, [r5, #224] ; 0xe0 tty->tty_rcvwakeup = 0; a0002cdc: 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; a0002ce0: e59f32e8 ldr r3, [pc, #744] ; a0002fd0 * link tty */ tty->forw = rtems_termios_ttyHead; tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; a0002ce4: 15875004 strne r5, [r7, #4] tty->tty_rcvwakeup = 0; /* * link tty */ tty->forw = rtems_termios_ttyHead; a0002ce8: e5857000 str r7, [r5] tty->back = NULL; if (rtems_termios_ttyHead != NULL) rtems_termios_ttyHead->back = tty; rtems_termios_ttyHead = tty; a0002cec: e5834000 str r4, [r3] if (rtems_termios_ttyTail == NULL) a0002cf0: e59f32e0 ldr r3, [pc, #736] ; a0002fd8 /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), a0002cf4: e59f72d8 ldr r7, [pc, #728] ; a0002fd4 tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( a0002cf8: e59f02dc ldr r0, [pc, #732] ; a0002fdc 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) a0002cfc: e5932000 ldr r2, [r3] rtems_termios_ttyTail = tty; tty->minor = minor; a0002d00: e584a010 str sl, [r4, #16] tty->major = major; a0002d04: e584900c str r9, [r4, #12] 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) a0002d08: e3520000 cmp r2, #0 rtems_termios_ttyTail = tty; a0002d0c: 05834000 streq r4, [r3] /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'i', c), a0002d10: e5d7300c ldrb r3, [r7, #12] tty->major = major; /* * Set up mutex semaphores */ sc = rtems_semaphore_create ( a0002d14: e2842014 add r2, r4, #20 a0002d18: e58d2000 str r2, [sp] a0002d1c: e1830000 orr r0, r3, r0 a0002d20: e3a01001 mov r1, #1 a0002d24: e3a03000 mov r3, #0 a0002d28: e3a02054 mov r2, #84 ; 0x54 a0002d2c: eb0007cf bl a0004c70 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) a0002d30: e2503000 subs r3, r0, #0 a0002d34: 1a000096 bne a0002f94 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'o', c), a0002d38: 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 ( a0002d3c: e59f029c ldr r0, [pc, #668] ; a0002fe0 a0002d40: e2841018 add r1, r4, #24 a0002d44: e58d1000 str r1, [sp] a0002d48: e1820000 orr r0, r2, r0 a0002d4c: e3a01001 mov r1, #1 a0002d50: e3a02054 mov r2, #84 ; 0x54 a0002d54: eb0007c5 bl a0004c70 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) a0002d58: e2501000 subs r1, r0, #0 a0002d5c: 1a00008c bne a0002f94 rtems_fatal_error_occurred (sc); sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'x', c), a0002d60: 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 ( a0002d64: e59f0278 ldr r0, [pc, #632] ; a0002fe4 a0002d68: e284208c add r2, r4, #140 ; 0x8c a0002d6c: e58d2000 str r2, [sp] a0002d70: e1830000 orr r0, r3, r0 a0002d74: e3a02020 mov r2, #32 a0002d78: e1a03001 mov r3, r1 a0002d7c: eb0007bb bl a0004c70 rtems_build_name ('T', 'R', 'x', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_FIFO, RTEMS_NO_PRIORITY, &tty->rawOutBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) a0002d80: e250b000 subs fp, r0, #0 a0002d84: 1a000082 bne a0002f94 tty->rawOutBufState = rob_idle; /* * Set callbacks */ tty->device = *callbacks; a0002d88: e59de00c ldr lr, [sp, #12] a0002d8c: e284c098 add ip, r4, #152 ; 0x98 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; a0002d90: e584b094 str fp, [r4, #148] ; 0x94 /* * Set callbacks */ tty->device = *callbacks; a0002d94: e8be000f ldm lr!, {r0, r1, r2, r3} a0002d98: e8ac000f stmia ip!, {r0, r1, r2, r3} a0002d9c: e89e000f ldm lr, {r0, r1, r2, r3} a0002da0: e88c000f stm ip, {r0, r1, r2, r3} /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0002da4: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0002da8: e3530002 cmp r3, #2 a0002dac: 1a000017 bne a0002e10 sc = rtems_task_create ( rtems_build_name ('T', 'x', 'T', c), a0002db0: e5d7300c ldrb r3, [r7, #12] /* * Create I/O tasks */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { sc = rtems_task_create ( a0002db4: e59f022c ldr r0, [pc, #556] ; a0002fe8 a0002db8: e28420c8 add r2, r4, #200 ; 0xc8 a0002dbc: e58d2004 str r2, [sp, #4] a0002dc0: e1830000 orr r0, r3, r0 a0002dc4: e3a02b01 mov r2, #1024 ; 0x400 a0002dc8: e3a0100a mov r1, #10 a0002dcc: e3a03c05 mov r3, #1280 ; 0x500 a0002dd0: e58db000 str fp, [sp] a0002dd4: eb0008a4 bl a000506c TERMIOS_TXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->txTaskId); if (sc != RTEMS_SUCCESSFUL) a0002dd8: e2502000 subs r2, r0, #0 a0002ddc: 1a00006c bne a0002f94 rtems_fatal_error_occurred (sc); sc = rtems_task_create ( rtems_build_name ('R', 'x', 'T', c), a0002de0: 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 ( a0002de4: e59f0200 ldr r0, [pc, #512] ; a0002fec a0002de8: e58d2000 str r2, [sp] a0002dec: e28420c4 add r2, r4, #196 ; 0xc4 a0002df0: e58d2004 str r2, [sp, #4] a0002df4: e1830000 orr r0, r3, r0 a0002df8: e3a01009 mov r1, #9 a0002dfc: e3a02b01 mov r2, #1024 ; 0x400 a0002e00: e3a03c05 mov r3, #1280 ; 0x500 a0002e04: eb000898 bl a000506c TERMIOS_RXTASK_STACKSIZE, RTEMS_NO_PREEMPT | RTEMS_NO_TIMESLICE | RTEMS_NO_ASR, RTEMS_NO_FLOATING_POINT | RTEMS_LOCAL, &tty->rxTaskId); if (sc != RTEMS_SUCCESSFUL) a0002e08: e3500000 cmp r0, #0 a0002e0c: 1a000060 bne a0002f94 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || a0002e10: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0002e14: e3530000 cmp r3, #0 a0002e18: 0a000002 beq a0002e28 a0002e1c: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0002e20: e3530002 cmp r3, #2 a0002e24: 1a00000b bne a0002e58 (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( rtems_build_name ('T', 'R', 'r', c), a0002e28: e59f31a4 ldr r3, [pc, #420] ; a0002fd4 rtems_fatal_error_occurred (sc); } if ((tty->device.pollRead == NULL) || (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN)){ sc = rtems_semaphore_create ( a0002e2c: e59f01bc ldr r0, [pc, #444] ; a0002ff0 a0002e30: e2842068 add r2, r4, #104 ; 0x68 rtems_build_name ('T', 'R', 'r', c), a0002e34: 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 ( a0002e38: e3a01000 mov r1, #0 a0002e3c: e58d2000 str r2, [sp] a0002e40: e1830000 orr r0, r3, r0 a0002e44: e3a02024 mov r2, #36 ; 0x24 a0002e48: e1a03001 mov r3, r1 a0002e4c: eb000787 bl a0004c70 rtems_build_name ('T', 'R', 'r', c), 0, RTEMS_SIMPLE_BINARY_SEMAPHORE | RTEMS_PRIORITY, RTEMS_NO_PRIORITY, &tty->rawInBuf.Semaphore); if (sc != RTEMS_SUCCESSFUL) a0002e50: e3500000 cmp r0, #0 a0002e54: 1a00004e bne a0002f94 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; a0002e58: e59f3194 ldr r3, [pc, #404] ; a0002ff4 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'; a0002e5c: e3a02011 mov r2, #17 a0002e60: e5c42049 strb r2, [r4, #73] ; 0x49 } /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; a0002e64: e5843030 str r3, [r4, #48] ; 0x30 tty->termios.c_oflag = OPOST | ONLCR | XTABS; a0002e68: e59f3188 ldr r3, [pc, #392] ; a0002ff8 tty->termios.c_cc[VKILL] = '\025'; tty->termios.c_cc[VEOF] = '\004'; tty->termios.c_cc[VEOL] = '\000'; tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; a0002e6c: e2822002 add r2, r2, #2 a0002e70: e5c4204a strb r2, [r4, #74] ; 0x4a /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; a0002e74: e5843034 str r3, [r4, #52] ; 0x34 tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; a0002e78: e59f317c ldr r3, [pc, #380] ; a0002ffc 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'; a0002e7c: e2822007 add r2, r2, #7 a0002e80: e5c4204b strb r2, [r4, #75] ; 0x4b /* * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; a0002e84: e5843038 str r3, [r4, #56] ; 0x38 tty->termios.c_lflag = a0002e88: e59f3170 ldr r3, [pc, #368] ; a0003000 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'; a0002e8c: e3a02012 mov r2, #18 a0002e90: e5c4204d strb r2, [r4, #77] ; 0x4d * Set default parameters */ tty->termios.c_iflag = BRKINT | ICRNL | IXON | IMAXBEL; tty->termios.c_oflag = OPOST | ONLCR | XTABS; tty->termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL; tty->termios.c_lflag = a0002e94: e584303c str r3, [r4, #60] ; 0x3c ISIG | ICANON | IEXTEN | ECHO | ECHOK | ECHOE | ECHOCTL; tty->termios.c_cc[VINTR] = '\003'; a0002e98: e3a03003 mov r3, #3 a0002e9c: e5c43041 strb r3, [r4, #65] ; 0x41 tty->termios.c_cc[VQUIT] = '\034'; a0002ea0: e2833019 add r3, r3, #25 a0002ea4: e5c43042 strb r3, [r4, #66] ; 0x42 tty->termios.c_cc[VERASE] = '\177'; a0002ea8: e2833063 add r3, r3, #99 ; 0x63 a0002eac: e5c43043 strb r3, [r4, #67] ; 0x43 tty->termios.c_cc[VKILL] = '\025'; a0002eb0: e3a03015 mov r3, #21 a0002eb4: e5c43044 strb r3, [r4, #68] ; 0x44 tty->termios.c_cc[VEOF] = '\004'; a0002eb8: e3a03004 mov r3, #4 a0002ebc: e5c43045 strb r3, [r4, #69] ; 0x45 tty->termios.c_cc[VEOL] = '\000'; a0002ec0: 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; a0002ec4: 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'; a0002ec8: e5c4304c strb r3, [r4, #76] ; 0x4c tty->termios.c_cc[VEOL2] = '\000'; a0002ecc: e5c43051 strb r3, [r4, #81] ; 0x51 /* start with no flow control, clear flow control flags */ tty->flow_ctrl = 0; /* * set low/highwater mark for XON/XOFF support */ tty->lowwater = tty->rawInBuf.Size * 1/2; a0002ed0: e5943064 ldr r3, [r4, #100] ; 0x64 tty->termios.c_cc[VEOL2] = '\000'; tty->termios.c_cc[VSTART] = '\021'; tty->termios.c_cc[VSTOP] = '\023'; tty->termios.c_cc[VSUSP] = '\032'; tty->termios.c_cc[VREPRINT] = '\022'; tty->termios.c_cc[VDISCARD] = '\017'; a0002ed4: e3a0200f mov r2, #15 a0002ed8: e5c4204e strb r2, [r4, #78] ; 0x4e /* 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; a0002edc: e1a030a3 lsr r3, r3, #1 a0002ee0: e58430bc str r3, [r4, #188] ; 0xbc tty->highwater = tty->rawInBuf.Size * 3/4; a0002ee4: e5943064 ldr r3, [r4, #100] ; 0x64 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'; a0002ee8: e2822008 add r2, r2, #8 a0002eec: 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; a0002ef0: e0833083 add r3, r3, r3, lsl #1 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'; a0002ef4: e3a02016 mov r2, #22 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; a0002ef8: e1a03123 lsr r3, r3, #2 a0002efc: e58430c0 str r3, [r4, #192] ; 0xc0 /* * Bump name characer */ if (c++ == 'z') a0002f00: e59f30cc ldr r3, [pc, #204] ; a0002fd4 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'; a0002f04: e5c42050 strb r2, [r4, #80] ; 0x50 tty->lowwater = tty->rawInBuf.Size * 1/2; tty->highwater = tty->rawInBuf.Size * 3/4; /* * Bump name characer */ if (c++ == 'z') a0002f08: e5d3200c ldrb r2, [r3, #12] a0002f0c: e352007a cmp r2, #122 ; 0x7a a0002f10: e2821001 add r1, r2, #1 c = 'a'; a0002f14: 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') a0002f18: e5c3100c strb r1, [r3, #12] c = 'a'; a0002f1c: 05c3200c strbeq r2, [r3, #12] } args->iop->data1 = tty; a0002f20: e5983000 ldr r3, [r8] a0002f24: e5835034 str r5, [r3, #52] ; 0x34 if (!tty->refcount++) { a0002f28: e5953008 ldr r3, [r5, #8] a0002f2c: e2832001 add r2, r3, #1 a0002f30: e3530000 cmp r3, #0 a0002f34: e5852008 str r2, [r5, #8] a0002f38: 1a000016 bne a0002f98 if (tty->device.firstOpen) a0002f3c: e5953098 ldr r3, [r5, #152] ; 0x98 a0002f40: e3530000 cmp r3, #0 a0002f44: 0a000003 beq a0002f58 (*tty->device.firstOpen)(major, minor, arg); a0002f48: e1a00009 mov r0, r9 a0002f4c: e1a0100a mov r1, sl a0002f50: e1a02008 mov r2, r8 a0002f54: e12fff33 blx r3 /* * start I/O tasks, if needed */ if (tty->device.outputUsesInterrupts == TERMIOS_TASK_DRIVEN) { a0002f58: e59530b4 ldr r3, [r5, #180] ; 0xb4 a0002f5c: e3530002 cmp r3, #2 a0002f60: 1a00000c bne a0002f98 sc = rtems_task_start( a0002f64: e59500c4 ldr r0, [r5, #196] ; 0xc4 a0002f68: e59f1094 ldr r1, [pc, #148] ; a0003004 a0002f6c: e1a02005 mov r2, r5 a0002f70: eb0008e5 bl a000530c tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) a0002f74: e3500000 cmp r0, #0 a0002f78: 1a000005 bne a0002f94 rtems_fatal_error_occurred (sc); sc = rtems_task_start( a0002f7c: e59500c8 ldr r0, [r5, #200] ; 0xc8 a0002f80: e59f1080 ldr r1, [pc, #128] ; a0003008 a0002f84: e1a02005 mov r2, r5 a0002f88: eb0008df bl a000530c tty->txTaskId, rtems_termios_txdaemon, (rtems_task_argument)tty); if (sc != RTEMS_SUCCESSFUL) a0002f8c: e3500000 cmp r0, #0 a0002f90: 0a000000 beq a0002f98 rtems_fatal_error_occurred (sc); a0002f94: eb00095d bl a0005510 } } rtems_semaphore_release (rtems_termios_ttyMutex); a0002f98: e59f302c ldr r3, [pc, #44] ; a0002fcc a0002f9c: e5930000 ldr r0, [r3] a0002fa0: eb00080a bl a0004fd0 return RTEMS_SUCCESSFUL; } a0002fa4: e1a00006 mov r0, r6 a0002fa8: e28dd010 add sp, sp, #16 a0002fac: 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)); a0002fb0: e3a00001 mov r0, #1 a0002fb4: e3a010e8 mov r1, #232 ; 0xe8 a0002fb8: ebfffac1 bl a0001ac4 if (tty == NULL) { a0002fbc: e2504000 subs r4, r0, #0 static char c = 'a'; /* * Create a new device */ tty = calloc (1, sizeof (struct rtems_termios_tty)); a0002fc0: e1a05000 mov r5, r0 if (tty == NULL) { a0002fc4: 1affff15 bne a0002c20 a0002fc8: eaffff21 b a0002c54 <== NOT EXECUTED =============================================================================== a0003544 : * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { a0003544: e92d47f0 push {r4, r5, r6, r7, r8, r9, sl, lr} a0003548: e1a04002 mov r4, r2 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { a000354c: e59220b4 ldr r2, [r2, #180] ; 0xb4 * Send characters to device-specific code */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { a0003550: e1a03000 mov r3, r0 a0003554: e1a06001 mov r6, r1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { a0003558: e3520000 cmp r2, #0 */ void rtems_termios_puts ( const void *_buf, int len, struct rtems_termios_tty *tty) { const unsigned char *buf = _buf; a000355c: e1a08000 mov r8, r0 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; a0003560: 15945080 ldrne r5, [r4, #128] ; 0x80 * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { tty->rawOutBufState = rob_wait; a0003564: 13a0a002 movne sl, #2 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; a0003568: 13a09001 movne r9, #1 const unsigned char *buf = _buf; unsigned int newHead; rtems_interrupt_level level; rtems_status_code sc; if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { a000356c: 1a000032 bne a000363c (*tty->device.write)(tty->minor, (void *)buf, len); a0003570: e594c0a4 ldr ip, [r4, #164] ; 0xa4 a0003574: e5940010 ldr r0, [r4, #16] a0003578: e1a01003 mov r1, r3 a000357c: e1a02006 mov r2, r6 a0003580: e12fff3c blx ip return; a0003584: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} * len -= ncopy * * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; a0003588: e5941088 ldr r1, [r4, #136] ; 0x88 a000358c: e2850001 add r0, r5, #1 a0003590: eb00301e bl a000f610 <__umodsi3> a0003594: e1a05000 mov r5, r0 rtems_interrupt_disable (level); a0003598: ebfffd6a bl a0002b48 a000359c: e1a07000 mov r7, r0 while (newHead == tty->rawOutBuf.Tail) { a00035a0: ea00000a b a00035d0 tty->rawOutBufState = rob_wait; a00035a4: e584a094 str sl, [r4, #148] ; 0x94 a00035a8: e129f007 msr CPSR_fc, r7 rtems_interrupt_enable (level); sc = rtems_semaphore_obtain( a00035ac: e3a01000 mov r1, #0 a00035b0: e594008c ldr r0, [r4, #140] ; 0x8c a00035b4: e1a02001 mov r2, r1 a00035b8: eb00063e bl a0004eb8 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) a00035bc: e3500000 cmp r0, #0 a00035c0: 0a000000 beq a00035c8 rtems_fatal_error_occurred (sc); a00035c4: eb0007d1 bl a0005510 <== NOT EXECUTED rtems_interrupt_disable (level); a00035c8: ebfffd5e bl a0002b48 a00035cc: e1a07000 mov r7, r0 * To minimize latency, the memcpy should be done * with interrupts enabled. */ newHead = (newHead + 1) % tty->rawOutBuf.Size; rtems_interrupt_disable (level); while (newHead == tty->rawOutBuf.Tail) { a00035d0: e5943084 ldr r3, [r4, #132] ; 0x84 a00035d4: e1550003 cmp r5, r3 a00035d8: 0afffff1 beq a00035a4 tty->rawOutBuf.Semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT); if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; a00035dc: e5943080 ldr r3, [r4, #128] ; 0x80 a00035e0: e4d81001 ldrb r1, [r8], #1 a00035e4: e594207c ldr r2, [r4, #124] ; 0x7c a00035e8: e7c21003 strb r1, [r2, r3] tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { a00035ec: e5943094 ldr r3, [r4, #148] ; 0x94 if (sc != RTEMS_SUCCESSFUL) rtems_fatal_error_occurred (sc); rtems_interrupt_disable (level); } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; a00035f0: e5845080 str r5, [r4, #128] ; 0x80 if (tty->rawOutBufState == rob_idle) { a00035f4: e3530000 cmp r3, #0 a00035f8: 1a00000d bne a0003634 /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { a00035fc: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003600: e3130010 tst r3, #16 (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; a0003604: 159430b8 ldrne r3, [r4, #184] ; 0xb8 a0003608: 13833020 orrne r3, r3, #32 a000360c: 158430b8 strne r3, [r4, #184] ; 0xb8 } tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { a0003610: 1a000006 bne a0003630 (*tty->device.write)(tty->minor, (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); a0003614: e5942084 ldr r2, [r4, #132] ; 0x84 tty->rawOutBuf.theBuf[tty->rawOutBuf.Head] = *buf++; tty->rawOutBuf.Head = newHead; if (tty->rawOutBufState == rob_idle) { /* check, whether XOFF has been received */ if (!(tty->flow_ctrl & FL_ORCVXOF)) { (*tty->device.write)(tty->minor, a0003618: e594107c ldr r1, [r4, #124] ; 0x7c a000361c: e59430a4 ldr r3, [r4, #164] ; 0xa4 a0003620: e5940010 ldr r0, [r4, #16] a0003624: e0811002 add r1, r1, r2 a0003628: e3a02001 mov r2, #1 a000362c: e12fff33 blx r3 (char *)&tty->rawOutBuf.theBuf[tty->rawOutBuf.Tail],1); } else { /* remember that output has been stopped due to flow ctrl*/ tty->flow_ctrl |= FL_OSTOP; } tty->rawOutBufState = rob_busy; a0003630: e5849094 str r9, [r4, #148] ; 0x94 a0003634: e129f007 msr CPSR_fc, r7 } rtems_interrupt_enable (level); len--; a0003638: e2466001 sub r6, r6, #1 if (tty->device.outputUsesInterrupts == TERMIOS_POLLED) { (*tty->device.write)(tty->minor, (void *)buf, len); return; } newHead = tty->rawOutBuf.Head; while (len) { a000363c: e3560000 cmp r6, #0 a0003640: 1affffd0 bne a0003588 a0003644: e8bd87f0 pop {r4, r5, r6, r7, r8, r9, sl, pc} =============================================================================== a0003c9c : rtems_status_code rtems_termios_read (void *arg) { rtems_libio_rw_args_t *args = arg; struct rtems_termios_tty *tty = args->iop->data1; a0003c9c: e5903000 ldr r3, [r0] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { a0003ca0: 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; a0003ca4: 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); a0003ca8: 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; a0003cac: e5908010 ldr r8, [r0, #16] char *buffer = args->buffer; a0003cb0: e590b00c ldr fp, [r0, #12] return RTEMS_SUCCESSFUL; } rtems_status_code rtems_termios_read (void *arg) { a0003cb4: 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); a0003cb8: e1a02001 mov r2, r1 a0003cbc: e5940014 ldr r0, [r4, #20] a0003cc0: eb00047c bl a0004eb8 if (sc != RTEMS_SUCCESSFUL) a0003cc4: e2507000 subs r7, r0, #0 a0003cc8: 1a0000bd bne a0003fc4 return sc; if (rtems_termios_linesw[tty->t_line].l_read != NULL) { a0003ccc: e59420cc ldr r2, [r4, #204] ; 0xcc a0003cd0: e59f32f4 ldr r3, [pc, #756] ; a0003fcc a0003cd4: e0833282 add r3, r3, r2, lsl #5 a0003cd8: e5933008 ldr r3, [r3, #8] a0003cdc: e3530000 cmp r3, #0 a0003ce0: 0a000004 beq a0003cf8 sc = rtems_termios_linesw[tty->t_line].l_read(tty,args); a0003ce4: e1a00004 mov r0, r4 a0003ce8: e1a01005 mov r1, r5 a0003cec: e12fff33 blx r3 a0003cf0: e1a07000 mov r7, r0 a0003cf4: ea0000ae b a0003fb4 tty->tty_rcvwakeup = 0; rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { a0003cf8: e5942024 ldr r2, [r4, #36] ; 0x24 a0003cfc: e5943020 ldr r3, [r4, #32] a0003d00: e1520003 cmp r2, r3 a0003d04: 1a0000a1 bne a0003f90 tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; a0003d08: e5943028 ldr r3, [r4, #40] ; 0x28 rtems_semaphore_release (tty->isem); return sc; } if (tty->cindex == tty->ccount) { tty->cindex = tty->ccount = 0; a0003d0c: e5847020 str r7, [r4, #32] a0003d10: e5847024 str r7, [r4, #36] ; 0x24 tty->read_start_column = tty->column; a0003d14: e584302c str r3, [r4, #44] ; 0x2c if (tty->device.pollRead != NULL && a0003d18: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0003d1c: e3530000 cmp r3, #0 a0003d20: 0a00003b beq a0003e14 a0003d24: e59430b4 ldr r3, [r4, #180] ; 0xb4 a0003d28: e3530000 cmp r3, #0 a0003d2c: 1a000038 bne a0003e14 static rtems_status_code fillBufferPoll (struct rtems_termios_tty *tty) { int n; if (tty->termios.c_lflag & ICANON) { a0003d30: e594303c ldr r3, [r4, #60] ; 0x3c a0003d34: e3130002 tst r3, #2 a0003d38: 0a00000d beq a0003d74 for (;;) { n = (*tty->device.pollRead)(tty->minor); a0003d3c: e59430a0 ldr r3, [r4, #160] ; 0xa0 a0003d40: e5940010 ldr r0, [r4, #16] a0003d44: e12fff33 blx r3 if (n < 0) { a0003d48: e3500000 cmp r0, #0 a0003d4c: aa000002 bge a0003d5c rtems_task_wake_after (1); a0003d50: e3a00001 mov r0, #1 a0003d54: eb000584 bl a000536c a0003d58: eafffff7 b a0003d3c } else { if (siproc (n, tty)) a0003d5c: e20000ff and r0, r0, #255 ; 0xff a0003d60: e1a01004 mov r1, r4 a0003d64: ebffff88 bl a0003b8c a0003d68: e3500000 cmp r0, #0 a0003d6c: 0afffff2 beq a0003d3c a0003d70: ea000086 b a0003f90 } } } else { rtems_interval then, now; then = rtems_clock_get_ticks_since_boot(); a0003d74: eb0002c3 bl a0004888 <== NOT EXECUTED a0003d78: e1a06000 mov r6, r0 <== NOT EXECUTED for (;;) { n = (*tty->device.pollRead)(tty->minor); a0003d7c: e59430a0 ldr r3, [r4, #160] ; 0xa0 <== NOT EXECUTED a0003d80: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0003d84: e12fff33 blx r3 <== NOT EXECUTED if (n < 0) { a0003d88: e3500000 cmp r0, #0 <== NOT EXECUTED a0003d8c: aa000013 bge a0003de0 <== NOT EXECUTED if (tty->termios.c_cc[VMIN]) { a0003d90: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED a0003d94: e3530000 cmp r3, #0 <== NOT EXECUTED a0003d98: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED a0003d9c: 0a000005 beq a0003db8 <== NOT EXECUTED if (tty->termios.c_cc[VTIME] && tty->ccount) { a0003da0: e3530000 cmp r3, #0 <== NOT EXECUTED a0003da4: 0a00000a beq a0003dd4 <== NOT EXECUTED a0003da8: e5943020 ldr r3, [r4, #32] <== NOT EXECUTED a0003dac: e3530000 cmp r3, #0 <== NOT EXECUTED a0003db0: 0a000007 beq a0003dd4 <== NOT EXECUTED a0003db4: ea000001 b a0003dc0 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { break; } } } else { if (!tty->termios.c_cc[VTIME]) a0003db8: e3530000 cmp r3, #0 <== NOT EXECUTED a0003dbc: 0a000073 beq a0003f90 <== NOT EXECUTED break; now = rtems_clock_get_ticks_since_boot(); a0003dc0: eb0002b0 bl a0004888 <== NOT EXECUTED if ((now - then) > tty->vtimeTicks) { a0003dc4: e5943054 ldr r3, [r4, #84] ; 0x54 <== NOT EXECUTED a0003dc8: e0660000 rsb r0, r6, r0 <== NOT EXECUTED a0003dcc: e1500003 cmp r0, r3 <== NOT EXECUTED a0003dd0: 8a00006e bhi a0003f90 <== NOT EXECUTED break; } } rtems_task_wake_after (1); a0003dd4: e3a00001 mov r0, #1 <== NOT EXECUTED a0003dd8: eb000563 bl a000536c <== NOT EXECUTED a0003ddc: eaffffe6 b a0003d7c <== NOT EXECUTED } else { siproc (n, tty); a0003de0: e20000ff and r0, r0, #255 ; 0xff <== NOT EXECUTED a0003de4: e1a01004 mov r1, r4 <== NOT EXECUTED a0003de8: ebffff67 bl a0003b8c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) a0003dec: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED a0003df0: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED a0003df4: e1520003 cmp r2, r3 <== NOT EXECUTED a0003df8: aa000064 bge a0003f90 <== NOT EXECUTED break; if (tty->termios.c_cc[VMIN] && tty->termios.c_cc[VTIME]) a0003dfc: e3530000 cmp r3, #0 <== NOT EXECUTED a0003e00: 0affffdd beq a0003d7c <== NOT EXECUTED a0003e04: e5d43046 ldrb r3, [r4, #70] ; 0x46 <== NOT EXECUTED a0003e08: e3530000 cmp r3, #0 <== NOT EXECUTED a0003e0c: 0affffda beq a0003d7c <== NOT EXECUTED a0003e10: eaffffd7 b a0003d74 <== 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)( a0003e14: 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; a0003e18: e594a074 ldr sl, [r4, #116] ; 0x74 rtems_status_code sc; int wait = (int)1; a0003e1c: e3a06001 mov r6, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && (tty->ccount < (CBUFSIZE-1))) { a0003e20: e59f91a8 ldr r9, [pc, #424] ; a0003fd0 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)( a0003e24: e58d2000 str r2, [sp] a0003e28: ea000040 b a0003f30 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; a0003e2c: e594005c ldr r0, [r4, #92] ; 0x5c a0003e30: e5941064 ldr r1, [r4, #100] ; 0x64 a0003e34: e2800001 add r0, r0, #1 a0003e38: eb002df4 bl a000f610 <__umodsi3> c = tty->rawInBuf.theBuf[newHead]; a0003e3c: e5943058 ldr r3, [r4, #88] ; 0x58 a0003e40: e7d3a000 ldrb sl, [r3, r0] tty->rawInBuf.Head = newHead; a0003e44: e584005c str r0, [r4, #92] ; 0x5c if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) a0003e48: e5943060 ldr r3, [r4, #96] ; 0x60 a0003e4c: e5942064 ldr r2, [r4, #100] ; 0x64 % tty->rawInBuf.Size) a0003e50: e5941064 ldr r1, [r4, #100] ; 0x64 unsigned int newHead; newHead = (tty->rawInBuf.Head + 1) % tty->rawInBuf.Size; c = tty->rawInBuf.theBuf[newHead]; tty->rawInBuf.Head = newHead; if(((tty->rawInBuf.Tail-newHead+tty->rawInBuf.Size) a0003e54: e0823003 add r3, r2, r3 % tty->rawInBuf.Size) a0003e58: e0600003 rsb r0, r0, r3 a0003e5c: eb002deb bl a000f610 <__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) a0003e60: e59430bc ldr r3, [r4, #188] ; 0xbc a0003e64: e1500003 cmp r0, r3 a0003e68: 2a00001f bcs a0003eec % tty->rawInBuf.Size) < tty->lowwater) { tty->flow_ctrl &= ~FL_IREQXOF; a0003e6c: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003e70: e3c33001 bic r3, r3, #1 a0003e74: e58430b8 str r3, [r4, #184] ; 0xb8 /* if tx stopped and XON should be sent... */ if (((tty->flow_ctrl & (FL_MDXON | FL_ISNTXOF)) a0003e78: e59420b8 ldr r2, [r4, #184] ; 0xb8 a0003e7c: e59f3150 ldr r3, [pc, #336] ; a0003fd4 a0003e80: e0023003 and r3, r2, r3 a0003e84: e59f2148 ldr r2, [pc, #328] ; a0003fd4 a0003e88: e1530002 cmp r3, r2 a0003e8c: 1a00000b bne a0003ec0 == (FL_MDXON | FL_ISNTXOF)) && ((tty->rawOutBufState == rob_idle) a0003e90: e5943094 ldr r3, [r4, #148] ; 0x94 <== NOT EXECUTED a0003e94: e3530000 cmp r3, #0 <== NOT EXECUTED a0003e98: 0a000002 beq a0003ea8 <== NOT EXECUTED || (tty->flow_ctrl & FL_OSTOP))) { a0003e9c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003ea0: e3130020 tst r3, #32 <== NOT EXECUTED a0003ea4: 0a000005 beq a0003ec0 <== NOT EXECUTED /* XON should be sent now... */ (*tty->device.write)( a0003ea8: e59430a4 ldr r3, [r4, #164] ; 0xa4 <== NOT EXECUTED a0003eac: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0003eb0: e59d1000 ldr r1, [sp] <== NOT EXECUTED a0003eb4: e3a02001 mov r2, #1 <== NOT EXECUTED a0003eb8: e12fff33 blx r3 <== NOT EXECUTED a0003ebc: ea00000a b a0003eec <== NOT EXECUTED tty->minor, (void *)&(tty->termios.c_cc[VSTART]), 1); } else if (tty->flow_ctrl & FL_MDRTS) { a0003ec0: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0003ec4: e3130c01 tst r3, #256 ; 0x100 a0003ec8: 0a000007 beq a0003eec tty->flow_ctrl &= ~FL_IRTSOFF; a0003ecc: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0003ed0: e3c33004 bic r3, r3, #4 <== NOT EXECUTED a0003ed4: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED /* activate RTS line */ if (tty->device.startRemoteTx != NULL) { a0003ed8: e59430b0 ldr r3, [r4, #176] ; 0xb0 <== NOT EXECUTED a0003edc: e3530000 cmp r3, #0 <== NOT EXECUTED a0003ee0: 0a000001 beq a0003eec <== NOT EXECUTED tty->device.startRemoteTx(tty->minor); a0003ee4: e5940010 ldr r0, [r4, #16] <== NOT EXECUTED a0003ee8: e12fff33 blx r3 <== NOT EXECUTED } } } /* continue processing new character */ if (tty->termios.c_lflag & ICANON) { a0003eec: e594303c ldr r3, [r4, #60] ; 0x3c a0003ef0: e3130002 tst r3, #2 a0003ef4: 0a000005 beq a0003f10 if (siproc (c, tty)) a0003ef8: e1a0000a mov r0, sl a0003efc: e1a01004 mov r1, r4 a0003f00: ebffff21 bl a0003b8c wait = 0; a0003f04: e3500000 cmp r0, #0 a0003f08: 13a06000 movne r6, #0 a0003f0c: ea000006 b a0003f2c } else { siproc (c, tty); a0003f10: e1a0000a mov r0, sl <== NOT EXECUTED a0003f14: e1a01004 mov r1, r4 <== NOT EXECUTED a0003f18: ebffff1b bl a0003b8c <== NOT EXECUTED if (tty->ccount >= tty->termios.c_cc[VMIN]) a0003f1c: e5d43047 ldrb r3, [r4, #71] ; 0x47 <== NOT EXECUTED a0003f20: e5942020 ldr r2, [r4, #32] <== NOT EXECUTED wait = 0; a0003f24: e1520003 cmp r2, r3 <== NOT EXECUTED a0003f28: a3a06000 movge r6, #0 <== NOT EXECUTED } timeout = tty->rawInBufSemaphoreTimeout; a0003f2c: e594a070 ldr sl, [r4, #112] ; 0x70 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0003f30: e594205c ldr r2, [r4, #92] ; 0x5c a0003f34: e5943060 ldr r3, [r4, #96] ; 0x60 a0003f38: e1520003 cmp r2, r3 a0003f3c: 0a000004 beq a0003f54 (tty->ccount < (CBUFSIZE-1))) { a0003f40: e5993008 ldr r3, [r9, #8] while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0003f44: e5942020 ldr r2, [r4, #32] (tty->ccount < (CBUFSIZE-1))) { a0003f48: e2433001 sub r3, r3, #1 while ( wait ) { /* * Process characters read from raw queue */ while ((tty->rawInBuf.Head != tty->rawInBuf.Tail) && a0003f4c: e1520003 cmp r2, r3 a0003f50: baffffb5 blt a0003e2c } /* * Wait for characters */ if ( wait ) { a0003f54: e3560000 cmp r6, #0 a0003f58: 0a00000c beq a0003f90 sc = rtems_semaphore_obtain( a0003f5c: e5940068 ldr r0, [r4, #104] ; 0x68 a0003f60: e594106c ldr r1, [r4, #108] ; 0x6c a0003f64: e1a0200a mov r2, sl a0003f68: eb0003d2 bl a0004eb8 tty->rawInBuf.Semaphore, tty->rawInBufSemaphoreOptions, timeout); if (sc != RTEMS_SUCCESSFUL) a0003f6c: e3500000 cmp r0, #0 a0003f70: 0affffee beq a0003f30 a0003f74: ea000005 b a0003f90 <== NOT EXECUTED if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; a0003f78: e594201c ldr r2, [r4, #28] count--; a0003f7c: e2488001 sub r8, r8, #1 if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; a0003f80: e7d22003 ldrb r2, [r2, r3] a0003f84: e2833001 add r3, r3, #1 a0003f88: e4cb2001 strb r2, [fp], #1 a0003f8c: e5843024 str r3, [r4, #36] ; 0x24 sc = fillBufferQueue (tty); if (sc != RTEMS_SUCCESSFUL) tty->cindex = tty->ccount = 0; } while (count && (tty->cindex < tty->ccount)) { a0003f90: e3580000 cmp r8, #0 a0003f94: 0a000003 beq a0003fa8 a0003f98: e5943024 ldr r3, [r4, #36] ; 0x24 a0003f9c: e5942020 ldr r2, [r4, #32] a0003fa0: e1530002 cmp r3, r2 a0003fa4: bafffff3 blt a0003f78 *buffer++ = tty->cbuf[tty->cindex++]; count--; } args->bytes_moved = args->count - count; a0003fa8: e5953010 ldr r3, [r5, #16] a0003fac: e0688003 rsb r8, r8, r3 a0003fb0: e5858018 str r8, [r5, #24] tty->tty_rcvwakeup = 0; a0003fb4: e3a03000 mov r3, #0 a0003fb8: e58430e4 str r3, [r4, #228] ; 0xe4 rtems_semaphore_release (tty->isem); a0003fbc: e5940014 ldr r0, [r4, #20] a0003fc0: eb000402 bl a0004fd0 return sc; } a0003fc4: e1a00007 mov r0, r7 a0003fc8: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a00042e4 : int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) a00042e4: e59020b8 ldr r2, [r0, #184] ; 0xb8 a00042e8: e59f31b8 ldr r3, [pc, #440] ; a00044a8 * 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) { a00042ec: e92d4070 push {r4, r5, r6, lr} int nToSend; rtems_interrupt_level level; int len; /* check for XOF/XON to send */ if ((tty->flow_ctrl & (FL_MDXOF | FL_IREQXOF | FL_ISNTXOF)) a00042f0: e0023003 and r3, r2, r3 a00042f4: e59f21b0 ldr r2, [pc, #432] ; a00044ac * 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) { a00042f8: 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)) a00042fc: e1530002 cmp r3, r2 a0004300: 1a00000c bne a0004338 == (FL_MDXOF | FL_IREQXOF)) { /* XOFF should be sent now... */ (*tty->device.write)(tty->minor, (void *)&(tty->termios.c_cc[VSTOP]), 1); a0004304: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED a0004308: e284104a add r1, r4, #74 ; 0x4a <== NOT EXECUTED a000430c: e2422b01 sub r2, r2, #1024 ; 0x400 <== NOT EXECUTED a0004310: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED a0004314: e12fff33 blx r3 <== NOT EXECUTED rtems_interrupt_disable(level); a0004318: ebfffa0a bl a0002b48 <== NOT EXECUTED tty->t_dqlen--; a000431c: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED a0004320: e2433001 sub r3, r3, #1 <== NOT EXECUTED a0004324: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl |= FL_ISNTXOF; a0004328: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a000432c: e3833002 orr r3, r3, #2 <== NOT EXECUTED a0004330: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED rtems_interrupt_enable(level); a0004334: ea00000f b a0004378 <== NOT EXECUTED nToSend = 1; } else if ((tty->flow_ctrl & (FL_IREQXOF | FL_ISNTXOF)) == FL_ISNTXOF) { a0004338: e59030b8 ldr r3, [r0, #184] ; 0xb8 a000433c: e2033003 and r3, r3, #3 a0004340: e3530002 cmp r3, #2 a0004344: 1a00000e bne a0004384 * 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); a0004348: e59030a4 ldr r3, [r0, #164] ; 0xa4 <== NOT EXECUTED a000434c: e2841049 add r1, r4, #73 ; 0x49 <== NOT EXECUTED a0004350: e3a02001 mov r2, #1 <== NOT EXECUTED a0004354: e5900010 ldr r0, [r0, #16] <== NOT EXECUTED a0004358: e12fff33 blx r3 <== NOT EXECUTED rtems_interrupt_disable(level); a000435c: ebfff9f9 bl a0002b48 <== NOT EXECUTED tty->t_dqlen--; a0004360: e5943090 ldr r3, [r4, #144] ; 0x90 <== NOT EXECUTED a0004364: e2433001 sub r3, r3, #1 <== NOT EXECUTED a0004368: e5843090 str r3, [r4, #144] ; 0x90 <== NOT EXECUTED tty->flow_ctrl &= ~FL_ISNTXOF; a000436c: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004370: e3c33002 bic r3, r3, #2 <== NOT EXECUTED a0004374: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004378: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 1; a000437c: e3a05001 mov r5, #1 <== NOT EXECUTED a0004380: ea000046 b a00044a0 <== NOT EXECUTED } else { if ( tty->rawOutBuf.Head == tty->rawOutBuf.Tail ) { a0004384: e5902080 ldr r2, [r0, #128] ; 0x80 a0004388: e5903084 ldr r3, [r0, #132] ; 0x84 a000438c: e1520003 cmp r2, r3 a0004390: 1a000005 bne a00043ac /* * buffer was empty */ if (tty->rawOutBufState == rob_wait) { a0004394: e5903094 ldr r3, [r0, #148] ; 0x94 a0004398: e3530002 cmp r3, #2 a000439c: 1a00003e bne a000449c /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); a00043a0: e590008c ldr r0, [r0, #140] ; 0x8c <== NOT EXECUTED a00043a4: eb000309 bl a0004fd0 <== NOT EXECUTED a00043a8: ea00003b b a000449c <== NOT EXECUTED } return 0; } rtems_interrupt_disable(level); a00043ac: ebfff9e5 bl a0002b48 len = tty->t_dqlen; tty->t_dqlen = 0; a00043b0: e3a03000 mov r3, #0 } return 0; } rtems_interrupt_disable(level); len = tty->t_dqlen; a00043b4: e5942090 ldr r2, [r4, #144] ; 0x90 tty->t_dqlen = 0; a00043b8: e5843090 str r3, [r4, #144] ; 0x90 a00043bc: e129f000 msr CPSR_fc, r0 rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; a00043c0: e5943084 ldr r3, [r4, #132] ; 0x84 a00043c4: e5941088 ldr r1, [r4, #136] ; 0x88 a00043c8: e0820003 add r0, r2, r3 a00043cc: eb002c8f bl a000f610 <__umodsi3> tty->rawOutBuf.Tail = newTail; if (tty->rawOutBufState == rob_wait) { a00043d0: e5943094 ldr r3, [r4, #148] ; 0x94 rtems_interrupt_disable(level); len = tty->t_dqlen; tty->t_dqlen = 0; rtems_interrupt_enable(level); newTail = (tty->rawOutBuf.Tail + len) % tty->rawOutBuf.Size; a00043d4: e1a06000 mov r6, r0 tty->rawOutBuf.Tail = newTail; a00043d8: e5840084 str r0, [r4, #132] ; 0x84 if (tty->rawOutBufState == rob_wait) { a00043dc: e3530002 cmp r3, #2 a00043e0: 1a000001 bne a00043ec /* * wake up any pending writer task */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); a00043e4: e594008c ldr r0, [r4, #140] ; 0x8c a00043e8: eb0002f8 bl a0004fd0 } if (newTail == tty->rawOutBuf.Head) { a00043ec: e5943080 ldr r3, [r4, #128] ; 0x80 a00043f0: e1560003 cmp r6, r3 a00043f4: 1a000009 bne a0004420 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a00043f8: e59430d4 ldr r3, [r4, #212] ; 0xd4 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; a00043fc: e3a05000 mov r5, #0 a0004400: e5845094 str r5, [r4, #148] ; 0x94 nToSend = 0; /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a0004404: e1530005 cmp r3, r5 if (newTail == tty->rawOutBuf.Head) { /* * Buffer has become empty */ tty->rawOutBufState = rob_idle; nToSend = 0; a0004408: 01a05003 moveq r5, r3 /* * check to see if snd wakeup callback was set */ if ( tty->tty_snd.sw_pfn != NULL) { a000440c: 0a000020 beq a0004494 (*tty->tty_snd.sw_pfn)(&tty->termios, tty->tty_snd.sw_arg); a0004410: e2840030 add r0, r4, #48 ; 0x30 <== NOT EXECUTED a0004414: e59410d8 ldr r1, [r4, #216] ; 0xd8 <== NOT EXECUTED a0004418: e12fff33 blx r3 <== NOT EXECUTED a000441c: ea00001c b a0004494 <== NOT EXECUTED } } /* check, whether output should stop due to received XOFF */ else if ((tty->flow_ctrl & (FL_MDXON | FL_ORCVXOF)) a0004420: e59430b8 ldr r3, [r4, #184] ; 0xb8 a0004424: e2033e21 and r3, r3, #528 ; 0x210 a0004428: e3530e21 cmp r3, #528 ; 0x210 a000442c: 1a000008 bne a0004454 == (FL_MDXON | FL_ORCVXOF)) { /* Buffer not empty, but output stops due to XOFF */ /* set flag, that output has been stopped */ rtems_interrupt_disable(level); a0004430: ebfff9c4 bl a0002b48 <== NOT EXECUTED tty->flow_ctrl |= FL_OSTOP; a0004434: e59430b8 ldr r3, [r4, #184] ; 0xb8 <== NOT EXECUTED a0004438: e3833020 orr r3, r3, #32 <== NOT EXECUTED a000443c: e58430b8 str r3, [r4, #184] ; 0xb8 <== NOT EXECUTED tty->rawOutBufState = rob_busy; /*apm*/ a0004440: e3a03001 mov r3, #1 <== NOT EXECUTED a0004444: e5843094 str r3, [r4, #148] ; 0x94 <== NOT EXECUTED a0004448: e129f000 msr CPSR_fc, r0 <== NOT EXECUTED rtems_interrupt_enable(level); nToSend = 0; a000444c: e3a05000 mov r5, #0 <== NOT EXECUTED a0004450: ea00000f b a0004494 <== NOT EXECUTED } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) a0004454: e5943080 ldr r3, [r4, #128] ; 0x80 /* for outgoing flow control */ if (tty->flow_ctrl & (FL_MDXON | FL_MDXOF)) { nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( a0004458: e594107c ldr r1, [r4, #124] ; 0x7c a000445c: e5940010 ldr r0, [r4, #16] nToSend = 0; } else { /* * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) a0004460: e1560003 cmp r6, r3 nToSend = tty->rawOutBuf.Size - newTail; a0004464: 85945088 ldrhi r5, [r4, #136] ; 0x88 else nToSend = tty->rawOutBuf.Head - newTail; a0004468: 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)) { a000446c: e59430b8 ldr r3, [r4, #184] ; 0xb8 nToSend = 1; } tty->rawOutBufState = rob_busy; /*apm*/ (*tty->device.write)( a0004470: e0811006 add r1, r1, r6 * Buffer not empty, start tranmitter */ if (newTail > tty->rawOutBuf.Head) nToSend = tty->rawOutBuf.Size - newTail; else nToSend = tty->rawOutBuf.Head - newTail; a0004474: 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)) { a0004478: e3130c06 tst r3, #1536 ; 0x600 nToSend = 1; a000447c: 13a05001 movne r5, #1 } tty->rawOutBufState = rob_busy; /*apm*/ a0004480: e3a03001 mov r3, #1 a0004484: e5843094 str r3, [r4, #148] ; 0x94 (*tty->device.write)( a0004488: e1a02005 mov r2, r5 a000448c: e59430a4 ldr r3, [r4, #164] ; 0xa4 a0004490: e12fff33 blx r3 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ a0004494: e5846084 str r6, [r4, #132] ; 0x84 a0004498: ea000000 b a00044a0 /* * this should never happen... */ rtems_semaphore_release (tty->rawOutBuf.Semaphore); } return 0; a000449c: e3a05000 mov r5, #0 tty->minor, &tty->rawOutBuf.theBuf[newTail], nToSend); } tty->rawOutBuf.Tail = newTail; /*apm*/ } return nToSend; } a00044a0: e1a00005 mov r0, r5 a00044a4: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000427c : /* * this task actually processes any receive events */ static rtems_task rtems_termios_rxdaemon(rtems_task_argument argument) { a000427c: e92d40f3 push {r0, r1, r4, r5, r6, r7, lr} a0004280: e1a04000 mov r4, r0 while (1) { /* * wait for rtems event */ rtems_event_receive( a0004284: e3a05000 mov r5, #0 if (c != EOF) { /* * pollRead did call enqueue on its own */ c_buf = c; rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); a0004288: e28d6007 add r6, sp, #7 while (1) { /* * wait for rtems event */ rtems_event_receive( a000428c: e1a0300d mov r3, sp a0004290: e3a00003 mov r0, #3 a0004294: e3a01002 mov r1, #2 a0004298: e3a02000 mov r2, #0 a000429c: eb000197 bl a0004900 (TERMIOS_RX_PROC_EVENT | TERMIOS_RX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_RX_TERMINATE_EVENT) != 0) { a00042a0: e59d3000 ldr r3, [sp] a00042a4: e3130001 tst r3, #1 a00042a8: 0a000002 beq a00042b8 tty->rxTaskId = 0; a00042ac: e58450c4 str r5, [r4, #196] ; 0xc4 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); a00042b0: e1a00005 mov r0, r5 <== NOT EXECUTED a00042b4: eb0003be bl a00051b4 <== NOT EXECUTED } /* * do something */ c = tty->device.pollRead(tty->minor); a00042b8: e59430a0 ldr r3, [r4, #160] ; 0xa0 a00042bc: e5940010 ldr r0, [r4, #16] a00042c0: e12fff33 blx r3 if (c != EOF) { a00042c4: e3700001 cmn r0, #1 a00042c8: 0affffef beq a000428c /* * pollRead did call enqueue on its own */ c_buf = c; a00042cc: e5cd0007 strb r0, [sp, #7] rtems_termios_enqueue_raw_characters ( tty,&c_buf,1); a00042d0: e1a01006 mov r1, r6 a00042d4: e1a00004 mov r0, r4 a00042d8: e3a02001 mov r2, #1 a00042dc: ebffff40 bl a0003fe4 a00042e0: eaffffe9 b a000428c =============================================================================== a00044b0 : /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { a00044b0: e92d40f1 push {r0, r4, r5, r6, r7, lr} } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a00044b4: e59f6058 ldr r6, [pc, #88] ; a0004514 /* * this task actually processes any transmit events */ static rtems_task rtems_termios_txdaemon(rtems_task_argument argument) { a00044b8: e1a04000 mov r4, r0 while (1) { /* * wait for rtems event */ rtems_event_receive( a00044bc: e3a05000 mov r5, #0 a00044c0: e1a0300d mov r3, sp a00044c4: e3a00003 mov r0, #3 a00044c8: e3a01002 mov r1, #2 a00044cc: e3a02000 mov r2, #0 a00044d0: eb00010a bl a0004900 (TERMIOS_TX_START_EVENT | TERMIOS_TX_TERMINATE_EVENT), RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_NO_TIMEOUT, &the_event ); if ((the_event & TERMIOS_TX_TERMINATE_EVENT) != 0) { a00044d4: e59d3000 ldr r3, [sp] a00044d8: e3130001 tst r3, #1 a00044dc: 0a000002 beq a00044ec tty->txTaskId = 0; a00044e0: e58450c8 str r5, [r4, #200] ; 0xc8 <== NOT EXECUTED rtems_task_delete(RTEMS_SELF); a00044e4: e1a00005 mov r0, r5 <== NOT EXECUTED a00044e8: eb000331 bl a00051b4 <== NOT EXECUTED } /* * call any line discipline start function */ if (rtems_termios_linesw[tty->t_line].l_start != NULL) { a00044ec: e59430cc ldr r3, [r4, #204] ; 0xcc a00044f0: e0863283 add r3, r6, r3, lsl #5 a00044f4: e5933014 ldr r3, [r3, #20] a00044f8: e3530000 cmp r3, #0 a00044fc: 0a000001 beq a0004508 rtems_termios_linesw[tty->t_line].l_start(tty); a0004500: e1a00004 mov r0, r4 <== NOT EXECUTED a0004504: e12fff33 blx r3 <== NOT EXECUTED } /* * try to push further characters to device */ rtems_termios_refill_transmitter(tty); a0004508: e1a00004 mov r0, r4 a000450c: ebffff74 bl a00042e4 } a0004510: eaffffea b a00044c0 =============================================================================== a00061bc : { int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { a00061bc: e3100202 tst r0, #536870912 ; 0x20000000 static int rtems_verror( rtems_error_code_t error_flag, const char *printf_format, va_list arglist ) { a00061c0: e92d41f0 push {r4, r5, r6, r7, r8, lr} a00061c4: e1a05000 mov r5, r0 a00061c8: e1a08001 mov r8, r1 a00061cc: e1a04002 mov r4, r2 int local_errno = 0; int chars_written = 0; rtems_status_code status; if (error_flag & RTEMS_ERROR_PANIC) { a00061d0: 0a00000e beq a0006210 if (rtems_panic_in_progress++) a00061d4: e59f212c ldr r2, [pc, #300] ; a0006308 a00061d8: e5923000 ldr r3, [r2] a00061dc: e2831001 add r1, r3, #1 a00061e0: e3530000 cmp r3, #0 a00061e4: e5821000 str r1, [r2] a00061e8: 0a000003 beq a00061fc rtems_fatal_error_occurred( 99 ); } } #endif _Thread_Dispatch_disable_level += 1; a00061ec: e59f3118 ldr r3, [pc, #280] ; a000630c <== NOT EXECUTED a00061f0: e5932000 ldr r2, [r3] <== NOT EXECUTED a00061f4: e2822001 add r2, r2, #1 <== NOT EXECUTED a00061f8: e5832000 str r2, [r3] <== NOT EXECUTED _Thread_Disable_dispatch(); /* disable task switches */ /* don't aggravate things */ if (rtems_panic_in_progress > 2) a00061fc: e59f3104 ldr r3, [pc, #260] ; a0006308 a0006200: e5933000 ldr r3, [r3] a0006204: e3530002 cmp r3, #2 return 0; a0006208: 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) a000620c: ca00003b bgt a0006300 return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ a0006210: e59f30f8 ldr r3, [pc, #248] ; a0006310 status = error_flag & ~RTEMS_ERROR_MASK; a0006214: e3c56207 bic r6, r5, #1879048192 ; 0x70000000 /* don't aggravate things */ if (rtems_panic_in_progress > 2) return 0; } (void) fflush(stdout); /* in case stdout/stderr same */ a0006218: e5933000 ldr r3, [r3] a000621c: e5930008 ldr r0, [r3, #8] a0006220: eb002c06 bl a0011240 status = error_flag & ~RTEMS_ERROR_MASK; if (error_flag & RTEMS_ERROR_ERRNO) /* include errno? */ a0006224: e2155101 ands r5, r5, #1073741824 ; 0x40000000 a0006228: 0a000001 beq a0006234 local_errno = errno; a000622c: eb002b0c bl a0010e64 <__errno> a0006230: 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); a0006234: e59f70d4 ldr r7, [pc, #212] ; a0006310 a0006238: e1a02004 mov r2, r4 a000623c: e1a01008 mov r1, r8 a0006240: e5973000 ldr r3, [r7] a0006244: e593000c ldr r0, [r3, #12] a0006248: eb004473 bl a001741c if (status) a000624c: 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); a0006250: e1a04000 mov r4, r0 if (status) a0006254: 0a000008 beq a000627c chars_written += fprintf(stderr, " (status: %s)", rtems_status_text(status)); a0006258: e5973000 ldr r3, [r7] a000625c: e1a00006 mov r0, r6 a0006260: e593700c ldr r7, [r3, #12] a0006264: ebffffd0 bl a00061ac a0006268: e59f10a4 ldr r1, [pc, #164] ; a0006314 a000626c: e1a02000 mov r2, r0 a0006270: e1a00007 mov r0, r7 a0006274: eb002cd7 bl a00115d8 #endif chars_written += vfprintf(stderr, printf_format, arglist); if (status) chars_written += a0006278: e0844000 add r4, r4, r0 fprintf(stderr, " (status: %s)", rtems_status_text(status)); if (local_errno) { a000627c: e3550000 cmp r5, #0 a0006280: 0a000015 beq a00062dc if ((local_errno > 0) && *strerror(local_errno)) a0006284: da00000d ble a00062c0 a0006288: e1a00005 mov r0, r5 a000628c: eb002fda bl a00121fc a0006290: e5d03000 ldrb r3, [r0] a0006294: e3530000 cmp r3, #0 a0006298: 0a000008 beq a00062c0 chars_written += fprintf(stderr, " (errno: %s)", strerror(local_errno)); a000629c: e59f306c ldr r3, [pc, #108] ; a0006310 a00062a0: e1a00005 mov r0, r5 a00062a4: e5933000 ldr r3, [r3] a00062a8: e593600c ldr r6, [r3, #12] a00062ac: eb002fd2 bl a00121fc a00062b0: e59f1060 ldr r1, [pc, #96] ; a0006318 a00062b4: e1a02000 mov r2, r0 a00062b8: e1a00006 mov r0, r6 a00062bc: ea000004 b a00062d4 else chars_written += fprintf(stderr, " (unknown errno=%d)", local_errno); a00062c0: e59f3048 ldr r3, [pc, #72] ; a0006310 a00062c4: e59f1050 ldr r1, [pc, #80] ; a000631c a00062c8: e1a02005 mov r2, r5 a00062cc: e5933000 ldr r3, [r3] a00062d0: e593000c ldr r0, [r3, #12] a00062d4: eb002cbf bl a00115d8 a00062d8: e0844000 add r4, r4, r0 } chars_written += fprintf(stderr, "\n"); a00062dc: e59f502c ldr r5, [pc, #44] ; a0006310 a00062e0: e59f1038 ldr r1, [pc, #56] ; a0006320 a00062e4: e5953000 ldr r3, [r5] a00062e8: e593000c ldr r0, [r3, #12] a00062ec: eb002cb9 bl a00115d8 (void) fflush(stderr); a00062f0: 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"); a00062f4: e0804004 add r4, r0, r4 (void) fflush(stderr); a00062f8: e593000c ldr r0, [r3, #12] a00062fc: eb002bcf bl a0011240 return chars_written; } a0006300: e1a00004 mov r0, r4 a0006304: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} =============================================================================== a0002410 : /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { a0002410: e92d4ff1 push {r0, r4, r5, r6, r7, r8, r9, sl, fp, lr} unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a0002414: e59fb0dc ldr fp, [pc, #220] ; a00024f8 limit++; continue; } sign = 1; } if (!isdigit(c)) a0002418: e59f90dc ldr r9, [pc, #220] ; a00024fc scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; unsigned int limit = INT_MAX; int sign = 0; a000241c: e3a04000 mov r4, #0 /* * Extract an integer value from the database */ static int scanInt(FILE *fp, int *val) { a0002420: e1a05000 mov r5, r0 a0002424: e58d1000 str r1, [sp] int c; unsigned int i = 0; unsigned int limit = INT_MAX; a0002428: e3e08102 mvn r8, #-2147483648 ; 0x80000000 */ static int scanInt(FILE *fp, int *val) { int c; unsigned int i = 0; a000242c: e1a07004 mov r7, r4 sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) a0002430: e3a0a00a mov sl, #10 unsigned int limit = INT_MAX; int sign = 0; int d; for (;;) { c = getc(fp); a0002434: e5953004 ldr r3, [r5, #4] a0002438: e2433001 sub r3, r3, #1 a000243c: e3530000 cmp r3, #0 a0002440: e5853004 str r3, [r5, #4] a0002444: a5953000 ldrge r3, [r5] a0002448: a4d36001 ldrbge r6, [r3], #1 a000244c: a5853000 strge r3, [r5] a0002450: aa000003 bge a0002464 a0002454: e59b0000 ldr r0, [fp] <== NOT EXECUTED a0002458: e1a01005 mov r1, r5 <== NOT EXECUTED a000245c: eb003123 bl a000e8f0 <__srget_r> <== NOT EXECUTED a0002460: e1a06000 mov r6, r0 <== NOT EXECUTED if (c == ':') a0002464: e356003a cmp r6, #58 ; 0x3a a0002468: 0a000019 beq a00024d4 break; if (sign == 0) { a000246c: e3540000 cmp r4, #0 a0002470: 1a000004 bne a0002488 if (c == '-') { a0002474: e356002d cmp r6, #45 ; 0x2d sign = -1; limit++; a0002478: 02888001 addeq r8, r8, #1 c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { sign = -1; a000247c: 03e04000 mvneq r4, #0 for (;;) { c = getc(fp); if (c == ':') break; if (sign == 0) { if (c == '-') { a0002480: 0affffeb beq a0002434 sign = -1; limit++; continue; } sign = 1; a0002484: e3a04001 mov r4, #1 } if (!isdigit(c)) a0002488: e5993000 ldr r3, [r9] a000248c: e0833006 add r3, r3, r6 a0002490: e5d30001 ldrb r0, [r3, #1] a0002494: e2100004 ands r0, r0, #4 a0002498: 0a000015 beq a00024f4 return 0; d = c - '0'; if ((i > (limit / 10)) a000249c: e1a00008 mov r0, r8 a00024a0: e3a0100a mov r1, #10 a00024a4: eb003a1b bl a0010d18 <__aeabi_uidiv> a00024a8: e1570000 cmp r7, r0 a00024ac: 8a00000f bhi a00024f0 } sign = 1; } if (!isdigit(c)) return 0; d = c - '0'; a00024b0: e2466030 sub r6, r6, #48 ; 0x30 if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) a00024b4: 1a000004 bne a00024cc a00024b8: e1a00008 mov r0, r8 <== NOT EXECUTED a00024bc: e3a0100a mov r1, #10 <== NOT EXECUTED a00024c0: eb003aac bl a0010f78 <__umodsi3> <== NOT EXECUTED a00024c4: e1560000 cmp r6, r0 <== NOT EXECUTED a00024c8: 8a000008 bhi a00024f0 <== NOT EXECUTED return 0; i = i * 10 + d; a00024cc: e027679a mla r7, sl, r7, r6 a00024d0: eaffffd7 b a0002434 } if (sign == 0) a00024d4: e3540000 cmp r4, #0 return 0; a00024d8: 01a00004 moveq r0, r4 *val = i * sign; a00024dc: 10040497 mulne r4, r7, r4 a00024e0: 159d3000 ldrne r3, [sp] return 1; a00024e4: 13a00001 movne r0, #1 return 0; i = i * 10 + d; } if (sign == 0) return 0; *val = i * sign; a00024e8: 15834000 strne r4, [r3] return 1; a00024ec: ea000000 b a00024f4 if (!isdigit(c)) return 0; d = c - '0'; if ((i > (limit / 10)) || ((i == (limit / 10)) && (d > (limit % 10)))) return 0; a00024f0: e3a00000 mov r0, #0 <== NOT EXECUTED } if (sign == 0) return 0; *val = i * sign; return 1; } a00024f4: e8bd8ff8 pop {r3, r4, r5, r6, r7, r8, r9, sl, fp, pc} =============================================================================== a0002500 : /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { a0002500: e92d41f0 push {r4, r5, r6, r7, r8, lr} a0002504: e1a06003 mov r6, r3 int c; *name = *bufp; a0002508: e5923000 ldr r3, [r2] for (;;) { c = getc(fp); a000250c: e59f80dc ldr r8, [pc, #220] ; a00025f0 /* * Extract a string value from the database */ static int scanString(FILE *fp, char **name, char **bufp, size_t *nleft, int nlFlag) { a0002510: e59d7018 ldr r7, [sp, #24] a0002514: e1a04000 mov r4, r0 a0002518: e1a05002 mov r5, r2 int c; *name = *bufp; a000251c: e5813000 str r3, [r1] for (;;) { c = getc(fp); a0002520: e5943004 ldr r3, [r4, #4] a0002524: e2433001 sub r3, r3, #1 a0002528: e3530000 cmp r3, #0 a000252c: e5843004 str r3, [r4, #4] a0002530: a5943000 ldrge r3, [r4] a0002534: a4d30001 ldrbge r0, [r3], #1 a0002538: a5843000 strge r3, [r4] a000253c: aa000002 bge a000254c a0002540: e5980000 ldr r0, [r8] a0002544: e1a01004 mov r1, r4 a0002548: eb0030e8 bl a000e8f0 <__srget_r> if (c == ':') { a000254c: e350003a cmp r0, #58 ; 0x3a a0002550: 1a000002 bne a0002560 if (nlFlag) a0002554: e3570000 cmp r7, #0 a0002558: 0a000013 beq a00025ac a000255c: ea00001f b a00025e0 return 0; break; } if (c == '\n') { a0002560: e350000a cmp r0, #10 a0002564: 1a000002 bne a0002574 if (!nlFlag) a0002568: e3570000 cmp r7, #0 a000256c: 1a00000e bne a00025ac a0002570: ea000018 b a00025d8 return 0; break; } if (c == EOF) a0002574: e3700001 cmn r0, #1 a0002578: 0a000018 beq a00025e0 return 0; if (*nleft < 2) a000257c: e5963000 ldr r3, [r6] a0002580: e3530001 cmp r3, #1 a0002584: 9a000017 bls a00025e8 return 0; **bufp = c; a0002588: e5953000 ldr r3, [r5] a000258c: e5c30000 strb r0, [r3] ++(*bufp); a0002590: e5953000 ldr r3, [r5] a0002594: e2833001 add r3, r3, #1 a0002598: e5853000 str r3, [r5] --(*nleft); a000259c: e5963000 ldr r3, [r6] a00025a0: e2433001 sub r3, r3, #1 a00025a4: e5863000 str r3, [r6] } a00025a8: eaffffdc b a0002520 **bufp = '\0'; a00025ac: e5953000 ldr r3, [r5] a00025b0: e3a02000 mov r2, #0 ++(*bufp); --(*nleft); return 1; a00025b4: e3a00001 mov r0, #1 return 0; **bufp = c; ++(*bufp); --(*nleft); } **bufp = '\0'; a00025b8: e5c32000 strb r2, [r3] ++(*bufp); a00025bc: e5953000 ldr r3, [r5] a00025c0: e2833001 add r3, r3, #1 a00025c4: e5853000 str r3, [r5] --(*nleft); a00025c8: e5963000 ldr r3, [r6] a00025cc: e2433001 sub r3, r3, #1 a00025d0: e5863000 str r3, [r6] return 1; a00025d4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} return 0; break; } if (c == '\n') { if (!nlFlag) return 0; a00025d8: e1a00007 mov r0, r7 a00025dc: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} break; } if (c == EOF) return 0; a00025e0: e3a00000 mov r0, #0 a00025e4: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} if (*nleft < 2) return 0; a00025e8: e3a00000 mov r0, #0 <== NOT EXECUTED } **bufp = '\0'; ++(*bufp); --(*nleft); return 1; } a00025ec: e8bd81f0 pop {r4, r5, r6, r7, r8, pc} <== NOT EXECUTED =============================================================================== a0003b8c : int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { a0003b8c: e591203c ldr r2, [r1, #60] ; 0x3c a0003b90: e59f304c ldr r3, [pc, #76] ; a0003be4 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { a0003b94: e92d4030 push {r4, r5, lr} int i; /* * Obtain output semaphore if character will be echoed */ if (tty->termios.c_lflag & (ECHO|ECHOE|ECHOK|ECHONL|ECHOPRT|ECHOCTL|ECHOKE)) { a0003b98: e0023003 and r3, r2, r3 a0003b9c: e3530000 cmp r3, #0 /* * Process input character, with semaphore. */ static int siproc (unsigned char c, struct rtems_termios_tty *tty) { a0003ba0: e1a04001 mov r4, r1 a0003ba4: 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)) { a0003ba8: 0a00000b beq a0003bdc rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT); a0003bac: e5910018 ldr r0, [r1, #24] a0003bb0: e3a01000 mov r1, #0 a0003bb4: e1a02001 mov r2, r1 a0003bb8: eb0004be bl a0004eb8 i = iproc (c, tty); a0003bbc: e1a01004 mov r1, r4 a0003bc0: e1a00005 mov r0, r5 a0003bc4: ebffff88 bl a00039ec a0003bc8: e1a05000 mov r5, r0 rtems_semaphore_release (tty->osem); a0003bcc: e5940018 ldr r0, [r4, #24] a0003bd0: eb0004fe bl a0004fd0 } else { i = iproc (c, tty); } return i; } a0003bd4: e1a00005 mov r0, r5 a0003bd8: e8bd8030 pop {r4, r5, pc} a0003bdc: 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); a0003be0: eaffff81 b a00039ec <== NOT EXECUTED =============================================================================== a0007548 : int truncate( const char *path, off_t length ) { a0007548: e92d4070 push {r4, r5, r6, lr} <== NOT EXECUTED a000754c: e1a05001 mov r5, r1 <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); a0007550: e3a01001 mov r1, #1 <== NOT EXECUTED int truncate( const char *path, off_t length ) { a0007554: e1a06002 mov r6, r2 <== NOT EXECUTED int status; int fd; fd = open( path, O_WRONLY ); a0007558: ebfff778 bl a0005340 <== NOT EXECUTED if ( fd == -1 ) a000755c: e3700001 cmn r0, #1 <== NOT EXECUTED ) { int status; int fd; fd = open( path, O_WRONLY ); a0007560: e1a04000 mov r4, r0 <== NOT EXECUTED if ( fd == -1 ) return -1; a0007564: 01a05000 moveq r5, r0 <== NOT EXECUTED { int status; int fd; fd = open( path, O_WRONLY ); if ( fd == -1 ) a0007568: 0a000005 beq a0007584 <== NOT EXECUTED return -1; status = ftruncate( fd, length ); a000756c: e1a01005 mov r1, r5 <== NOT EXECUTED a0007570: e1a02006 mov r2, r6 <== NOT EXECUTED a0007574: eb00148a bl a000c7a4 <== NOT EXECUTED a0007578: e1a05000 mov r5, r0 <== NOT EXECUTED (void) close( fd ); a000757c: e1a00004 mov r0, r4 <== NOT EXECUTED a0007580: ebfff2fa bl a0004170 <== NOT EXECUTED return status; } a0007584: e1a00005 mov r0, r5 <== NOT EXECUTED a0007588: e8bd8070 pop {r4, r5, r6, pc} <== NOT EXECUTED =============================================================================== a0005530 : #include int unlink( const char *path ) { a0005530: e92d40f0 push {r4, r5, r6, r7, lr} a0005534: e24dd030 sub sp, sp, #48 ; 0x30 a0005538: e1a06000 mov r6, r0 /* * Get the node to be unlinked. Find the parent path first. */ parentpathlen = rtems_filesystem_dirname ( path ); a000553c: ebfff55b bl a0002ab0 if ( parentpathlen == 0 ) a0005540: e2504000 subs r4, r0, #0 a0005544: e28d3018 add r3, sp, #24 a0005548: 1a000005 bne a0005564 rtems_filesystem_get_start_loc( path, &i, &parentloc ); a000554c: e1a00006 mov r0, r6 a0005550: e28d102c add r1, sp, #44 ; 0x2c a0005554: e1a02003 mov r2, r3 a0005558: ebfff932 bl a0003a28 const char *name; rtems_filesystem_location_info_t parentloc; rtems_filesystem_location_info_t loc; int i; int result; bool free_parentloc = false; a000555c: e1a05004 mov r5, r4 a0005560: ea000008 b a0005588 parentpathlen = rtems_filesystem_dirname ( path ); if ( parentpathlen == 0 ) rtems_filesystem_get_start_loc( path, &i, &parentloc ); else { result = rtems_filesystem_evaluate_path( path, parentpathlen, a0005564: e3a02000 mov r2, #0 a0005568: e58d2000 str r2, [sp] a000556c: e1a00006 mov r0, r6 a0005570: e1a01004 mov r1, r4 a0005574: e2822002 add r2, r2, #2 a0005578: ebfff52e bl a0002a38 RTEMS_LIBIO_PERMS_WRITE, &parentloc, false ); if ( result != 0 ) a000557c: e3500000 cmp r0, #0 a0005580: 1a00003b bne a0005674 return -1; free_parentloc = true; a0005584: e3a05001 mov r5, #1 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; a0005588: e28dc004 add ip, sp, #4 a000558c: e28de018 add lr, sp, #24 a0005590: e8be000f ldm lr!, {r0, r1, r2, r3} a0005594: e8ac000f stmia ip!, {r0, r1, r2, r3} a0005598: e59e3000 ldr r3, [lr] name = path + parentpathlen; a000559c: e0864004 add r4, r6, r4 name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a00055a0: e1a00004 mov r0, r4 /* * Start from the parent to find the node that should be under it. */ loc = parentloc; a00055a4: e58c3000 str r3, [ip] name = path + parentpathlen; name += rtems_filesystem_prefix_separators( name, strlen( name ) ); a00055a8: eb002cb4 bl a0010880 a00055ac: e1a01000 mov r1, r0 a00055b0: e1a00004 mov r0, r4 a00055b4: ebfff54b bl a0002ae8 a00055b8: e0846000 add r6, r4, r0 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), a00055bc: e1a00006 mov r0, r6 a00055c0: eb002cae bl a0010880 a00055c4: e28d4004 add r4, sp, #4 a00055c8: e1a01000 mov r1, r0 a00055cc: e3a02000 mov r2, #0 a00055d0: e1a00006 mov r0, r6 a00055d4: e1a03004 mov r3, r4 a00055d8: e58d2000 str r2, [sp] a00055dc: ebfff4ed bl a0002998 0, &loc, false ); if ( result != 0 ) { a00055e0: e3500000 cmp r0, #0 a00055e4: 0a000004 beq a00055fc if ( free_parentloc ) a00055e8: e3550000 cmp r5, #0 <== NOT EXECUTED a00055ec: 0a000020 beq a0005674 <== NOT EXECUTED rtems_filesystem_freenode( &parentloc ); a00055f0: e28d0018 add r0, sp, #24 <== NOT EXECUTED a00055f4: ebfff54a bl a0002b24 <== NOT EXECUTED a00055f8: ea00001d b a0005674 <== NOT EXECUTED return -1; } if ( (*loc.ops->node_type_h)( &loc ) == RTEMS_FILESYSTEM_DIRECTORY ) { a00055fc: e59d3010 ldr r3, [sp, #16] a0005600: e1a00004 mov r0, r4 a0005604: e5933010 ldr r3, [r3, #16] a0005608: e12fff33 blx r3 a000560c: e3500001 cmp r0, #1 a0005610: 1a000009 bne a000563c rtems_filesystem_freenode( &loc ); a0005614: e1a00004 mov r0, r4 a0005618: ebfff541 bl a0002b24 if ( free_parentloc ) a000561c: e3550000 cmp r5, #0 a0005620: 0a000001 beq a000562c rtems_filesystem_freenode( &parentloc ); a0005624: e28d0018 add r0, sp, #24 <== NOT EXECUTED a0005628: ebfff53d bl a0002b24 <== NOT EXECUTED rtems_set_errno_and_return_minus_one( EISDIR ); a000562c: eb0028ce bl a000f96c <__errno> a0005630: e3a03015 mov r3, #21 a0005634: e5803000 str r3, [r0] a0005638: ea00000d b a0005674 } result = (*loc.ops->unlink_h)( &parentloc, &loc ); a000563c: e59d3010 ldr r3, [sp, #16] a0005640: e28d6018 add r6, sp, #24 a0005644: e1a01004 mov r1, r4 a0005648: e593300c ldr r3, [r3, #12] a000564c: e1a00006 mov r0, r6 a0005650: e12fff33 blx r3 a0005654: e1a07000 mov r7, r0 rtems_filesystem_freenode( &loc ); a0005658: e1a00004 mov r0, r4 a000565c: ebfff530 bl a0002b24 if ( free_parentloc ) a0005660: e3550000 cmp r5, #0 a0005664: 0a000003 beq a0005678 rtems_filesystem_freenode( &parentloc ); a0005668: e1a00006 mov r0, r6 a000566c: ebfff52c bl a0002b24 a0005670: ea000000 b a0005678 result = rtems_filesystem_evaluate_relative_path( name , strlen( name ), 0, &loc, false ); if ( result != 0 ) { if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return -1; a0005674: e3e07000 mvn r7, #0 rtems_filesystem_freenode( &loc ); if ( free_parentloc ) rtems_filesystem_freenode( &parentloc ); return result; } a0005678: e1a00007 mov r0, r7 a000567c: e28dd030 add sp, sp, #48 ; 0x30 a0005680: e8bd80f0 pop {r4, r5, r6, r7, pc} =============================================================================== a00057c4 : */ int unmount( const char *path ) { a00057c4: e92d4070 push {r4, r5, r6, lr} a00057c8: e24dd018 sub sp, sp, #24 a00057cc: 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 ) ) a00057d0: eb002251 bl a000e11c a00057d4: e28d4004 add r4, sp, #4 a00057d8: e3a03001 mov r3, #1 a00057dc: e1a01000 mov r1, r0 a00057e0: e58d3000 str r3, [sp] a00057e4: e1a00005 mov r0, r5 a00057e8: e3a02000 mov r2, #0 a00057ec: e1a03004 mov r3, r4 a00057f0: ebfff45d bl a000296c a00057f4: e3500000 cmp r0, #0 a00057f8: 1a000040 bne a0005900 return -1; mt_entry = loc.mt_entry; a00057fc: 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 ){ a0005800: e59d3004 ldr r3, [sp, #4] a0005804: e595201c ldr r2, [r5, #28] a0005808: e1520003 cmp r2, r3 a000580c: 0a000004 beq a0005824 rtems_filesystem_freenode( &loc ); a0005810: e1a00004 mov r0, r4 a0005814: ebfff48f bl a0002a58 rtems_set_errno_and_return_minus_one( EACCES ); a0005818: eb001cc3 bl a000cb2c <__errno> a000581c: e3a0300d mov r3, #13 a0005820: ea000011 b a000586c /* * Free the loc node and just use the nodes from the mt_entry . */ rtems_filesystem_freenode( &loc ); a0005824: e1a00004 mov r0, r4 a0005828: ebfff48a bl a0002a58 * 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 ) a000582c: e59f30d8 ldr r3, [pc, #216] ; a000590c a0005830: e5933000 ldr r3, [r3] a0005834: e5933014 ldr r3, [r3, #20] a0005838: e1530005 cmp r3, r5 a000583c: 0a000008 beq a0005864 /* * Verify there are no file systems below the path specified */ if ( rtems_filesystem_mount_iterate( is_fs_below_mount_point, a0005840: e59f00c8 ldr r0, [pc, #200] ; a0005910 a0005844: e595102c ldr r1, [r5, #44] ; 0x2c a0005848: ebfff6b5 bl a0003324 a000584c: e3500000 cmp r0, #0 a0005850: 1a000003 bne a0005864 * 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 ) a0005854: e1a00005 mov r0, r5 a0005858: ebfff566 bl a0002df8 a000585c: e3500001 cmp r0, #1 a0005860: 1a000003 bne a0005874 rtems_set_errno_and_return_minus_one( EBUSY ); a0005864: eb001cb0 bl a000cb2c <__errno> a0005868: e3a03010 mov r3, #16 a000586c: e5803000 str r3, [r0] a0005870: ea000022 b a0005900 * 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 ) a0005874: e5953014 ldr r3, [r5, #20] a0005878: e1a00005 mov r0, r5 a000587c: e5933028 ldr r3, [r3, #40] ; 0x28 a0005880: e12fff33 blx r3 a0005884: e2506000 subs r6, r0, #0 a0005888: 1a00001c bne a0005900 * 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){ a000588c: e5953028 ldr r3, [r5, #40] ; 0x28 a0005890: e1a00005 mov r0, r5 a0005894: e593302c ldr r3, [r3, #44] ; 0x2c a0005898: e12fff33 blx r3 a000589c: e2504000 subs r4, r0, #0 a00058a0: 0a000007 beq a00058c4 if (( fs_mount_loc->ops->mount_h )( mt_entry ) != 0 ) a00058a4: e5953014 ldr r3, [r5, #20] <== NOT EXECUTED a00058a8: e1a00005 mov r0, r5 <== NOT EXECUTED a00058ac: e5933020 ldr r3, [r3, #32] <== NOT EXECUTED a00058b0: e12fff33 blx r3 <== NOT EXECUTED a00058b4: e3500000 cmp r0, #0 <== NOT EXECUTED a00058b8: 0a000010 beq a0005900 <== NOT EXECUTED rtems_fatal_error_occurred( 0 ); a00058bc: e1a00006 mov r0, r6 <== NOT EXECUTED a00058c0: eb0003c5 bl a00067dc <== 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 ); a00058c4: e59f6048 ldr r6, [pc, #72] ; a0005914 a00058c8: e1a01004 mov r1, r4 a00058cc: e1a02004 mov r2, r4 a00058d0: e5960000 ldr r0, [r6] a00058d4: eb000242 bl a00061e4 */ RTEMS_INLINE_ROUTINE void rtems_chain_extract( rtems_chain_node *the_node ) { _Chain_Extract( the_node ); a00058d8: e1a00005 mov r0, r5 a00058dc: eb000475 bl a0006ab8 <_Chain_Extract> } static inline void rtems_libio_unlock( void ) { rtems_semaphore_release( rtems_libio_semaphore ); a00058e0: e5960000 ldr r0, [r6] a00058e4: eb000284 bl a00062fc /* * 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 ); a00058e8: e2850008 add r0, r5, #8 a00058ec: ebfff459 bl a0002a58 free( mt_entry ); a00058f0: e1a00005 mov r0, r5 a00058f4: ebfff45c bl a0002a6c return 0; a00058f8: e1a00004 mov r0, r4 a00058fc: ea000000 b a0005904 */ 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; a0005900: e3e00000 mvn r0, #0 rtems_filesystem_freenode( fs_mount_loc ); free( mt_entry ); return 0; } a0005904: e28dd018 add sp, sp, #24 a0005908: e8bd8070 pop {r4, r5, r6, pc} =============================================================================== a000576c : int utime( const char *path, const struct utimbuf *times ) { a000576c: e92d4030 push {r4, r5, lr} a0005770: e24dd020 sub sp, sp, #32 a0005774: e1a04001 mov r4, r1 a0005778: 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 ) ) a000577c: eb00243f bl a000e880 a0005780: e3a03001 mov r3, #1 a0005784: e1a01000 mov r1, r0 a0005788: e58d3000 str r3, [sp] a000578c: e1a00005 mov r0, r5 a0005790: e3a02000 mov r2, #0 a0005794: e28d3004 add r3, sp, #4 a0005798: ebfff333 bl a000246c a000579c: e3500000 cmp r0, #0 return -1; a00057a0: 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 ) ) a00057a4: 1a00000e bne a00057e4 return -1; if ( times == NULL ) { a00057a8: e3540000 cmp r4, #0 a00057ac: 1a000003 bne a00057c0 now.actime = now.modtime = time( NULL ); a00057b0: eb002485 bl a000e9cc